@@ -80,7 +82,7 @@ class StringEditCell extends Component {
}
}
-const SELECT_SOURCE = ["xx供应商", "yy供应商", "zz供应商", "aa供应商", "bb供应商"];
+const SELECT_SOURCE = ["男", "女"];
class SelectEditCell extends Component {
constructor(props, context) {
@@ -91,9 +93,9 @@ class SelectEditCell extends Component {
};
}
- handleSelect = (value) => {
+ handleSelect = value => {
this.setState({ value });
- }
+ };
commitChange = () => {
this.setState({ editable: false });
@@ -136,45 +138,340 @@ class SelectEditCell extends Component {
}
}
+const option = {
+ title: "树",
+ searchable: true,
+ multiple: false,
+ param: {
+ refCode: "neworganizition_tree"
+ },
+ checkStrictly: true,
+ disabled: false,
+ nodeDisplay: record => {
+ return record.refname;
+ },
+ displayField: record => {
+ return record.refname;
+ }, //显示内容的键
+ valueField: "refpk", //真实 value 的键
+ refModelUrl: {
+ treeUrl: "https://mock.yonyoucloud.com/mock/358/blobRefTree",
+ treeUrl: "/pap_basedoc/common-ref/blobRefTree"
+ },
+ matchUrl: "/pap_basedoc/common-ref/matchPKRefJSON",
+ filterUrl: "/pap_basedoc/common-ref/filterRefJSON",
+ lazyModal: false,
+ strictMode: true,
+ lang: "zh_CN",
+ treeData: [
+ {
+ code: "org1",
+ children: [
+ {
+ code: "bj",
+ entityType: "mainEntity",
+ name: "北京总部-简",
+ pid: "a4cf0601-51e6-4012-9967-b7a64a4b2d47",
+ refcode: "bj",
+ refpk: "5305416e-e7b4-4051-90bd-12d12942295b",
+ id: "5305416e-e7b4-4051-90bd-12d12942295b",
+ isLeaf: "true",
+ refname: "北京总部-简"
+ },
+ {
+ code: "xd",
+ entityType: "mainEntity",
+ name: "新道-简",
+ pid: "a4cf0601-51e6-4012-9967-b7a64a4b2d47",
+ refcode: "xd",
+ refpk: "b691afff-ea83-4a3f-affa-beb2be9cba52",
+ id: "b691afff-ea83-4a3f-affa-beb2be9cba52",
+ isLeaf: "true",
+ refname: "新道-简"
+ },
+ {
+ code: "yy3",
+ entityType: "mainEntity",
+ name: "test3",
+ pid: "a4cf0601-51e6-4012-9967-b7a64a4b2d47",
+ refcode: "yy3",
+ refpk: "e75694d9-7c00-4e9e-9573-d29465ae79a9",
+ id: "e75694d9-7c00-4e9e-9573-d29465ae79a9",
+ isLeaf: "true",
+ refname: "test3"
+ },
+ {
+ code: "yy1",
+ entityType: "mainEntity",
+ name: "test1",
+ pid: "a4cf0601-51e6-4012-9967-b7a64a4b2d47",
+ refcode: "yy1",
+ refpk: "fd32ceeb-57a8-4f44-816e-fa660f5715ab",
+ id: "fd32ceeb-57a8-4f44-816e-fa660f5715ab",
+ isLeaf: "true",
+ refname: "test1"
+ },
+ {
+ code: "dept2",
+ children: [
+ {
+ code: "cs",
+ entityType: "subEntity",
+ organization_id: "a4cf0601-51e6-4012-9967-b7a64a4b2d47",
+ name: "测试部-简",
+ pid: "0ebbb6d8-250a-4d1d-a019-7ae951629a2c",
+ refcode: "cs",
+ refpk: "cc43a66a-438d-4106-937f-bec44406f771",
+ id: "cc43a66a-438d-4106-937f-bec44406f771",
+ isLeaf: "true",
+ refname: "测试部-简"
+ },
+ {
+ code: "qd",
+ entityType: "subEntity",
+ organization_id: "a4cf0601-51e6-4012-9967-b7a64a4b2d47",
+ name: "前端部-简",
+ pid: "0ebbb6d8-250a-4d1d-a019-7ae951629a2c",
+ refcode: "qd",
+ refpk: "73a10edd-aae8-4f31-af25-1f48f0a3b344",
+ id: "73a10edd-aae8-4f31-af25-1f48f0a3b344",
+ isLeaf: "true",
+ refname: "前端部-简"
+ }
+ ],
+ entityType: "subEntity",
+ organization_id: "a4cf0601-51e6-4012-9967-b7a64a4b2d47",
+ name: "生产处",
+ refcode: "dept2",
+ refpk: "0ebbb6d8-250a-4d1d-a019-7ae951629a2c",
+ id: "0ebbb6d8-250a-4d1d-a019-7ae951629a2c",
+ refname: "生产处"
+ },
+ {
+ code: "dept1",
+ children: [
+ {
+ code: "dept1_2",
+ entityType: "subEntity",
+ organization_id: "a4cf0601-51e6-4012-9967-b7a64a4b2d47",
+ name: "财务二科",
+ pid: "95b60f35-ed0b-454e-b948-fb45ae30b911",
+ refcode: "dept1_2",
+ refpk: "55b7fff1-6579-4ca9-92b7-3271d288b9f3",
+ id: "55b7fff1-6579-4ca9-92b7-3271d288b9f3",
+ isLeaf: "true",
+ refname: "财务二科"
+ },
+ {
+ code: "dept1_1",
+ entityType: "subEntity",
+ organization_id: "a4cf0601-51e6-4012-9967-b7a64a4b2d47",
+ name: "财务一科",
+ pid: "95b60f35-ed0b-454e-b948-fb45ae30b911",
+ refcode: "dept1_1",
+ refpk: "9711d912-3184-4063-90c5-1facc727813c",
+ id: "9711d912-3184-4063-90c5-1facc727813c",
+ isLeaf: "true",
+ refname: "财务一科"
+ }
+ ],
+ entityType: "subEntity",
+ organization_id: "a4cf0601-51e6-4012-9967-b7a64a4b2d47",
+ name: "财务处",
+ refcode: "dept1",
+ refpk: "95b60f35-ed0b-454e-b948-fb45ae30b911",
+ id: "95b60f35-ed0b-454e-b948-fb45ae30b911",
+ refname: "财务处"
+ }
+ ],
+ entityType: "mainEntity",
+ name: "用友集团",
+ refcode: "org1",
+ refpk: "a4cf0601-51e6-4012-9967-b7a64a4b2d47",
+ id: "a4cf0601-51e6-4012-9967-b7a64a4b2d47",
+ refname: "用友集团"
+ }
+ ]
+};
+
+const RefEditCell = Form.createForm()(
+ class RefComponentWarpper extends Component {
+ constructor(props, context) {
+ super(props, context);
+ this.state = {
+ value: this.props.value.d,
+ editable: false
+ };
+ this.refWarp = React.createRef();
+ }
+
+ edit = () => {
+ this.setState({ editable: true }, () => this.refWarp.focus());
+ };
+
+ handleSelect = values => {
+ this.setState({ value: values[0] });
+ };
+
+ commitChange = () => {
+ this.setState({ editable: false });
+ if (this.props.onChange) {
+ this.props.onChange(this.state.value);
+ }
+ };
+
+ onRefBlur = e => {
+ // 消除点击子组件,父组件先失焦再聚焦的事件触发过程带来的副作用
+ const __REF_CONTENT__ = document.querySelector("div.ref-core-modal");
+ if (!__REF_CONTENT__ && e.target === this.refWarp) {
+ this.commitChange();
+ }
+ };
+
+ render() {
+ const { getFieldProps, getFieldError } = this.props.form;
+ const { value, editable } = this.state;
+ return editable ? (
+
(this.refWarp = el)}
+ className="editable-cell-input-wrapper"
+ tabIndex={-1}
+ onBlur={this.onRefBlur}
+ >
+
+
+ {getFieldError("code1")}
+
+
+ );
+ }
+ }
+);
+
const dataSource = [
- { name: "NU03910001", quality: "xx供应商", level: 70, key: "1" },
- { name: "NU03910002", quality: "yy供应商", level: 75, key: "2" },
- { name: "NU03910003", quality: "zz供应商", level: 50, key: "3" },
- { name: "NU03910004", quality: "aa供应商", level: 70, key: "4" },
- { name: "NU03910005", quality: "bb供应商", level: 60, key: "5" }
+ {
+ a: "ASVAL_201903280005",
+ b: "小张",
+ c: "男",
+ d: {
+ code: "dept1_2",
+ entityType: "subEntity",
+ organization_id: "a4cf0601-51e6-4012-9967-b7a64a4b2d47",
+ name: "财务二科",
+ pid: "95b60f35-ed0b-454e-b948-fb45ae30b911",
+ refcode: "dept1_2",
+ refpk: "55b7fff1-6579-4ca9-92b7-3271d288b9f3",
+ id: "55b7fff1-6579-4ca9-92b7-3271d288b9f3",
+ isLeaf: "true",
+ refname: "财务二科"
+ },
+ key: "1"
+ },
+ {
+ a: "ASVAL_201903200004",
+ b: "小明",
+ c: "男",
+ d: {
+ code: "dept1_2",
+ entityType: "subEntity",
+ organization_id: "a4cf0601-51e6-4012-9967-b7a64a4b2d47",
+ name: "财务二科",
+ pid: "95b60f35-ed0b-454e-b948-fb45ae30b911",
+ refcode: "dept1_2",
+ refpk: "55b7fff1-6579-4ca9-92b7-3271d288b9f3",
+ id: "55b7fff1-6579-4ca9-92b7-3271d288b9f3",
+ isLeaf: "true",
+ refname: "财务二科"
+ },
+ key: "2"
+ },
+ {
+ a: "ASVAL_201903120002",
+ b: "小红",
+ c: "女",
+ d: {
+ code: "dept1_1",
+ entityType: "subEntity",
+ organization_id: "a4cf0601-51e6-4012-9967-b7a64a4b2d47",
+ name: "财务一科",
+ pid: "95b60f35-ed0b-454e-b948-fb45ae30b911",
+ refcode: "dept1_1",
+ refpk: "9711d912-3184-4063-90c5-1facc727813c",
+ id: "9711d912-3184-4063-90c5-1facc727813c",
+ isLeaf: "true",
+ refname: "财务一科"
+ },
+ key: "3"
+ }
];
-class Demo501 extends Component {
+class Demo0502 extends Component {
constructor(props, context) {
super(props);
this.columns = [
{
- title: "订单编号",
- dataIndex: "name",
- key: "name",
+ title: "员工编号",
+ dataIndex: "a",
+ key: "a"
+ },
+ {
+ title: "名字",
+ dataIndex: "b",
+ key: "b",
render: (text, record, index) => (
)
},
{
- title: "供应商名称",
- dataIndex: "quality",
- key: "quality",
+ title: "性别",
+ dataIndex: "c",
+ key: "c",
+ width: 100,
render: (text, record, index) => (
)
},
{
- title: "采购数量",
- dataIndex: "level",
- key: "level"
+ title: "部门",
+ dataIndex: "d",
+ key: "d",
+ width: 215,
+ render: (text, record, index) => (
+
+ )
+ },
+ {
+ key: "placeholder"
}
];
@@ -193,11 +490,11 @@ class Demo501 extends Component {
render() {
return (
-
+
);
}
}
-export default Demo501;
+export default Demo0502;
diff --git a/demo/demolist/Demo0502.scss b/demo/demolist/Demo0502.scss
index 3e1fdcf..5b0fd2b 100644
--- a/demo/demolist/Demo0502.scss
+++ b/demo/demolist/Demo0502.scss
@@ -1,14 +1,42 @@
-.demo501 {
+.demo0502 {
+ .u-table-row {
+ td {
+ padding: 5px 8px;
+
+ input.error {
+ border-color: #F44336;
+ }
+ }
+ .editable-cell {
+ height: 30px;
+ }
+ &-hover {
+ .editable-cell-text-wrapper {
+ line-height: 18px;
+ border: 1px solid #c1c7d0;
+ }
+ }
+ .u-form-control,
+ .u-select-selection {
+ height: 30px;
+ }
+ }
+
.editable-cell-text-wrapper {
+ box-sizing: border-box;
+ line-height: 20px;
+ border-radius: 3px;
+
&:hover {
- border: 1px dashed #A5ADBA;
+ line-height: 18px;
+ border: 1px solid #a5adba;
}
}
.require {
position: absolute;
top: 2px;
- color: red;
+ color: #F44336;
font-size: 20px;
}
}
@@ -17,7 +45,7 @@
color: #F44336;
}
-.tp-501 {
+.tp-0502 {
.tooltip-arrow {
border-bottom-color: #F44336 !important;
}
diff --git a/demo/demolist/Demo1002.js b/demo/demolist/Demo1002.js
index 8b55992..849b9b6 100644
--- a/demo/demolist/Demo1002.js
+++ b/demo/demolist/Demo1002.js
@@ -13,28 +13,26 @@ import dragColumn from '../../src/lib/dragColumn';
const columns23 = [
{
- title: "名字",
+ title: "订单编号",
dataIndex: "a",
key: "a",
width: '200',
fixed:'left'
},
{
- title: "性别",
+ title: "单据日期",
dataIndex: "b",
key: "b",
width: '600'
},
{
- title: "年龄",
+ title: "供应商",
dataIndex: "c",
key: "c",
width: '200',
- sumCol: true,
- sorter: (a, b) => a.c - b.c
},
{
- title: "武功级别",
+ title: "联系人",
dataIndex: "d",
key: "d",
width: 500,
@@ -42,13 +40,9 @@ const columns23 = [
];
const data23 = [
- { a: "杨过", b: "男", c: 30,d:'内行', key: "2" },
- { a: "令狐冲", b: "男", c: 41,d:'大侠', key: "1" },
- { a: "郭靖", b: "男", c: 25,d:'大侠', key: "31" } , { a: "杨过", b: "男", c: 30,d:'内行', key: "21" },
- { a: "令狐冲", b: "男", c: 41,d:'大侠', key: "11" },
- { a: "郭靖", b: "男", c: 25,d:'大侠', key: "32" } , { a: "杨过", b: "男", c: 30,d:'内行', key: "22" },
- { a: "令狐冲", b: "男", c: 41,d:'大侠', key: "12" },
- { a: "郭靖", b: "男", c: 25,d:'大侠', key: "3" }
+ { a: "NU0391001", b: "2019-03-01", c: "xx供应商",d:'Tom', key: "2" },
+ { a: "NU0391002", b: "2018-11-02", c: "yy供应商",d:'Jack', key: "1" },
+ { a: "NU0391003", b: "2019-05-03", c: "zz供应商",d:'Jane', key: "3" }
];
const DragColumnTable = dragColumn(Table);
diff --git a/demo/demolist/Demo1101.js b/demo/demolist/Demo1101.js
index 6f2c1e8..a0986f2 100644
--- a/demo/demolist/Demo1101.js
+++ b/demo/demolist/Demo1101.js
@@ -27,9 +27,9 @@ const columns16 = [
);
}
},
- { title: "用户名", dataIndex: "a", key: "a", width: 250 },
- { id: "123", title: "性别", dataIndex: "b", key: "b", width: 100 },
- { title: "年龄", dataIndex: "c", key: "c", width: 200 },
+ { title: "订单编号", dataIndex: "a", key: "a", width: 250 },
+ { id: "123", title: "单据日期", dataIndex: "b", key: "b", width: 100 },
+ { title: "供应商", dataIndex: "c", key: "c", width: 200 },
];
const columns17 = [
@@ -48,16 +48,16 @@ const columns17 = [
);
}
},
- { title: "用户名", dataIndex: "a", key: "a", width: 100 },
- { id: "123", title: "性别", dataIndex: "b", key: "b", width: 100 },
- { title: "年龄", dataIndex: "c", key: "c", width: 200 },
+ { title: "订单编号", dataIndex: "a", key: "a", width: 100 },
+ { id: "123", title: "单据日期", dataIndex: "b", key: "b", width: 100 },
+ { title: "供应商", dataIndex: "c", key: "c", width: 200 },
];
const data16 = [
- { a: "令狐冲", b: "男", c: 41, d: "操作", key: "1" },
- { a: "杨过", b: "男", c: 67, d: "操作", key: "2" },
- { a: "郭靖", b: "男", c: 25, d: "操作", key: "3" }
+ { a: "NU0391001", b: "2019-03-01", c: "xx供应商", d: "操作", key: "1" },
+ { a: "NU0391002", b: "2018-11-02", c: "yy供应商", d: "操作", key: "2" },
+ { a: "NU0391003", b: "2019-05-03", c: "zz供应商", d: "操作", key: "3" }
];
@@ -86,15 +86,15 @@ class Demo16 extends Component {
if(expanded){
if(record.key==='1'){
new_obj[record.key] = [
- { a: "令狐冲", b: "男", c: 41, d: "操作", key: "1" },
- { a: "杨过", b: "男", c: 67, d: "操作", key: "2" }
+ { a: "NU0391056", b: "2019-03-01", c: "gys1", d: "操作", key: "1" },
+ { a: "NU0391057", b: "2018-11-02", c: "gys2", d: "操作", key: "2" },
]
this.setState({
data_obj:new_obj
})
}else{
new_obj[record.key] = [
- { a: "令狐冲", b: "男", c: 41, d: "操作", key: "1" }
+ { a: "NU0391079", b: "2019-04-17", c: "gys5", d: "操作", key: "3" },
]
this.setState({
data_obj:new_obj
diff --git a/demo/demolist/Demo1102.js b/demo/demolist/Demo1102.js
index 747283d..9fc203a 100644
--- a/demo/demolist/Demo1102.js
+++ b/demo/demolist/Demo1102.js
@@ -13,19 +13,19 @@ import Table from '../../src';
const columns4 = [
{
- title: "Name",
+ title: "订单编号",
dataIndex: "name",
key: "name",
width: "40%"
},
{
- title: "Age",
+ title: "单据日期",
dataIndex: "age",
key: "age",
width: "30%"
},
{
- title: "Address",
+ title: "供应商",
dataIndex: "address",
key: "address"
}
@@ -34,53 +34,53 @@ const columns4 = [
const data4 = [
{
key: 1,
- name: "John Brown sr.",
- age: 60,
- address: "New York No. 1 Lake Park",
+ name: "NU0391001",
+ age: "2019-03-01",
+ address: "供应商1",
children: [
{
key: 11,
- name: "John Brown",
- age: 42,
- address: "New York No. 2 Lake Park"
+ name: "NU0391002",
+ age: "2019-03-02",
+ address: "供应商2"
},
{
key: 12,
- name: "John Brown jr.",
- age: 30,
- address: "New York No. 3 Lake Park",
+ name: "NU0391003",
+ age: "2019-03-03",
+ address: "供应商3",
children: [
{
key: 121,
- name: "Jimmy Brown",
- age: 16,
- address: "New York No. 3 Lake Park"
+ name: "NU0391004",
+ age: "2019-03-04",
+ address: "供应商4"
}
]
},
{
key: 13,
- name: "Jim Green sr.",
- age: 72,
- address: "London No. 1 Lake Park",
+ name: "NU0391005",
+ age: "2019-03-05",
+ address: "供应商5",
children: [
{
key: 131,
- name: "Jim Green",
- age: 42,
- address: "London No. 2 Lake Park",
+ name: "NU0391006",
+ age: "2019-03-06",
+ address: "供应商6",
children: [
{
key: 1311,
- name: "Jim Green jr.",
- age: 25,
- address: "London No. 3 Lake Park"
+ name: "NU0391007",
+ age: "2019-03-07",
+ address: "供应商7"
},
{
key: 1312,
- name: "Jimmy Green sr.",
- age: 18,
- address: "London No. 4 Lake Park"
+ name: "NU0391008",
+ age: "2019-03-08",
+ address: "供应商8"
}
]
}
@@ -90,9 +90,9 @@ const data4 = [
},
{
key: 2,
- name: "Joe Black",
- age: 32,
- address: "Sidney No. 1 Lake Park"
+ name: "NU0391009",
+ age: "2019-03-09",
+ address: "供应商9"
}
];
class Demo4 extends Component {
diff --git a/demo/demolist/Demo1107.js b/demo/demolist/Demo1107.js
index 9c5430a..d8b018d 100644
--- a/demo/demolist/Demo1107.js
+++ b/demo/demolist/Demo1107.js
@@ -2,7 +2,7 @@
*
* @title 图片在表格中的展示
* @parent 扩展行 Expanded Row
-* @description 根据图片高度自动撑开行高,可结合图片查看器使用 http://design.yonyoucloud.com/tinper-bee/bee-viewer
+* @description 根据图片高度自动撑开行高,可结合图片查看器使用 http://design.yonyoucloud.com/tinper-bee/bee-viewer, 注:如果图片在固定列中,可以使用heightConsistent属性,当此属性为true,就不会出现错行问题
* demo1107
*/
diff --git a/demo/demolist/Demo1601.js b/demo/demolist/Demo1601.js
index 549ba2e..8aaa1b9 100644
--- a/demo/demolist/Demo1601.js
+++ b/demo/demolist/Demo1601.js
@@ -60,6 +60,7 @@ class Demo8 extends Component {
onSelect={this.handleSelect.bind(this)}
onDataNumSelect={this.dataNumSelect}
showJump={true}
+ noBorder={true}
total={100}
dataNum={2}
/>
diff --git a/demo/demolist/Demo1602.js b/demo/demolist/Demo1602.js
deleted file mode 100644
index 2eb8b20..0000000
--- a/demo/demolist/Demo1602.js
+++ /dev/null
@@ -1,141 +0,0 @@
-/**
- *
- * @title 表格+搜索
- * @parent 搜索 search
- * @description 搜索刷新表格数据
- * demo1602
- */
-
-import React, { Component } from "react";
-import {Icon,FormControl,InputGroup} from "tinper-bee";
-
-import Table from "../../src";
-
-class Search extends Component {
- state = {
- searchValue: "",
- empty: false
- };
-
- /**
- * 搜索
- */
- handleSearch = () => {
- let { onSearch } = this.props;
- this.setState({
- empty: true
- });
- onSearch && onSearch(this.state.searchValue);
- };
-
- /**
- * 捕获回车
- * @param e
- */
- handleKeyDown = e => {
- if (e.keyCode === 13) {
- this.handleSearch();
- }
- };
-
- /**
- * 输入框改变
- * @param e
- */
- handleChange = (e) => {
- this.setState({
- searchValue: e
- });
- };
-
- /**
- * 清空输入框
- */
- emptySearch = () => {
- let { onEmpty } = this.props;
- this.setState({
- searchValue: "",
- empty: false
- });
- onEmpty && onEmpty();
- };
-
- render() {
- return (
-
-
- {this.state.empty ? (
-
- ) : null}
-
-
-
-
-
- );
- }
-}
-
-const columns = [
- { title: "员工编号", dataIndex: "a", key: "a", width: 300, className: "rowClassName"},
- { title: "员工姓名", dataIndex: "b", key: "b", width: 500 },
- { title: "性别", dataIndex: "c", key: "c", width: 500 },
- { title: "部门", dataIndex: "d", key: "d", width: 200 }
-];
-
-const userData = [
- { a: "ASVAL_201903280005", b: "小张", c: "男", d: "财务二科", key: "1" },
- { a: "ASVAL_201903200004", b: "小明", c: "男", d: "财务一科", key: "2" },
- { a: "ASVAL_201903120002", b: "小红", c: "女", d: "财务一科", key: "3" }
-];
-
-class Demo9 extends Component {
- constructor(props) {
- super(props);
- this.state = {
- data: userData
- };
- }
-
- handleSearch = value => {
- if (value === "") {
- return this.setState({
- data: userData
- });
- }
- let regExp = new RegExp(value, "ig");
- let data = userData.filter(item => regExp.test(item.a));
- this.setState({
- data
- });
- };
-
- handleEmpty = () => {
- this.setState({
- data: userData
- });
- };
-
- render() {
- return (
-
- );
- }
-}
-
-export default Demo9;
diff --git a/demo/index.js b/demo/index.js
index 0488e10..2dd0bb4 100644
--- a/demo/index.js
+++ b/demo/index.js
@@ -8,7 +8,7 @@ import Button from '../src';
-var Demo0101 = require("./demolist/Demo0101");var Demo0102 = require("./demolist/Demo0102");var Demo0103 = require("./demolist/Demo0103");var Demo0104 = require("./demolist/Demo0104");var Demo0105 = require("./demolist/Demo0105");var Demo0106 = require("./demolist/Demo0106");var Demo0201 = require("./demolist/Demo0201");var Demo0202 = require("./demolist/Demo0202");var Demo0301 = require("./demolist/Demo0301");var Demo0302 = require("./demolist/Demo0302");var Demo0402 = require("./demolist/Demo0402");var Demo0404 = require("./demolist/Demo0404");var Demo0405 = require("./demolist/Demo0405");var Demo0501 = require("./demolist/Demo0501");var Demo0502 = require("./demolist/Demo0502");var Demo0601 = require("./demolist/Demo0601");var Demo0602 = require("./demolist/Demo0602");var Demo0603 = require("./demolist/Demo0603");var Demo0701 = require("./demolist/Demo0701");var Demo0702 = require("./demolist/Demo0702");var Demo0802 = require("./demolist/Demo0802");var Demo0901 = require("./demolist/Demo0901");var Demo0902 = require("./demolist/Demo0902");var Demo0903 = require("./demolist/Demo0903");var Demo1001 = require("./demolist/Demo1001");var Demo1002 = require("./demolist/Demo1002");var Demo1101 = require("./demolist/Demo1101");var Demo1102 = require("./demolist/Demo1102");var Demo1103 = require("./demolist/Demo1103");var Demo1105 = require("./demolist/Demo1105");var Demo1106 = require("./demolist/Demo1106");var Demo1107 = require("./demolist/Demo1107");var Demo1108 = require("./demolist/Demo1108");var Demo1301 = require("./demolist/Demo1301");var Demo1401 = require("./demolist/Demo1401");var Demo1402 = require("./demolist/Demo1402");var Demo1403 = require("./demolist/Demo1403");var Demo1404 = require("./demolist/Demo1404");var Demo1601 = require("./demolist/Demo1601");var Demo1602 = require("./demolist/Demo1602");var DemoArray = [{"example":
,"title":" 基本表格","code":"/**\n*\n* @title 基本表格\n* @parent 基础 Basic\n* @description 单元格数据过长时,可结合Tooltip组件使用。\n* demo0101\n*/\n\nimport React, { Component } from \"react\";\nimport {Button,Tooltip} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n {\n title: \"员工编号\", dataIndex: \"a\", key: \"a\", width: 120, className: \"rowClassName\",\n fixed:'left',\n render: (text, record, index) => {\n return (\n
\n {text}\n \n );\n }\n },\n { title: \"员工姓名\", dataIndex: \"b\", key: \"b\", width:100 },\n { title: \"性别\", dataIndex: \"c\", key: \"c\", width: 100 },\n { title: \"部门\", dataIndex: \"d\", key: \"d\", width: 100 },\n { title: \"职级\", dataIndex: \"e\", key: \"e\", width: 100 }\n];\n\nconst data = [\n { a: \"ASVAL_201903280005\", b: \"小张\", c: \"男\", d: \"财务二科\", e: \"M1\", key: \"1\" },\n { a: \"ASVAL_201903200004\", b: \"小明\", c: \"男\", d: \"财务一科\", e: \"T1\", key: \"2\" },\n { a: \"ASVAL_201903120002\", b: \"小红\", c: \"女\", d: \"财务一科\", e: \"T2\", key: \"3\" }\n];\n\nclass Demo01 extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n data: data\n }\n }\n handleClick = () => {\n console.log('这是第' , this.currentIndex , '行');\n console.log('内容:' , this.currentRecord);\n }\n\n render() {\n return (\n
\n );\n }\n}\n\n\n","desc":" 单元格数据过长时,可结合Tooltip组件使用。"},{"example":
,"title":" 默认无数据展示","code":"/**\r\n*\r\n* @title 默认无数据展示\r\n* @parent 基础 Basic\r\n* @description 无数据时默认展示图标,可在`emptyText`方法中自定义展示内容。\r\n* demo0102\r\n*/\r\n\r\n\r\nimport React, { Component } from 'react';\r\nimport { Table, Icon } from 'tinper-bee';\r\n\n\r\nconst columns02 = [\r\n {\r\n title: \"员工编号\",\r\n dataIndex: \"num\",\r\n key: \"num\",\r\n width: \"40%\"\r\n },\r\n {\r\n title: \"员工姓名\",\r\n dataIndex: \"name\",\r\n key: \"name\",\r\n width: \"30%\"\r\n },\r\n {\r\n title: \"部门\",\r\n dataIndex: \"department\",\r\n key: \"department\"\r\n }\r\n];\r\n \r\nconst data02 = [];\r\n\r\n// 在此自定义无数据时的展示内容\r\nconst emptyFunc = () => 'No Data';\r\n \r\nclass Demo02 extends Component {\r\n render() {\r\n return (\r\n
\r\n )\r\n }\r\n}\r\n\r\n","desc":" 无数据时默认展示图标,可在`emptyText`方法中自定义展示内容。"},{"example":
,"title":" 固定表头","code":"/**\r\n*\r\n* @title 固定表头\r\n* @parent 基础 Basic\r\n* @description 设置`scroll.y`指定滚动区域的高度,达到固定表头效果\r\n* demo0103\r\n*/\r\n\r\nimport React, { Component } from 'react';\r\nimport { Table } from 'tinper-bee';\r\n\r\nconst columns03 = [\r\n {\r\n title: \"序号\",\r\n dataIndex: \"index\",\r\n key: \"index\",\r\n width: 80, \r\n render(text, record, index) {\r\n return index + 1;\r\n }\r\n },\r\n {\r\n title: \"订单编号\",\r\n dataIndex: \"orderCode\",\r\n key: \"orderCode\",\r\n width: 200, \r\n },\r\n {\r\n title: \"供应商名称\",\r\n dataIndex: \"supplierName\",\r\n key: \"supplierName\",\r\n width: 200\r\n },\r\n {\r\n title: \"类型\",\r\n dataIndex: \"type_name\",\r\n key: \"type_name\",\r\n width: 200\r\n },\r\n {\r\n title: \"采购组织\",\r\n dataIndex: \"purchasing\",\r\n key: \"purchasing\",\r\n width: 200\r\n },\r\n {\r\n title: \"采购组\",\r\n dataIndex: \"purchasingGroup\",\r\n key: \"purchasingGroup\",\r\n width: 200\r\n },\r\n {\r\n title: \"凭证日期\",\r\n dataIndex: \"voucherDate\",\r\n key: \"voucherDate\",\r\n width: 200,\r\n },\r\n {\r\n title: \"审批状态\",\r\n dataIndex: \"approvalState_name\",\r\n key: \"approvalState_name\",\r\n width: 200\r\n },\r\n {\r\n title: \"确认状态\",\r\n dataIndex: \"confirmState_name\",\r\n key: \"confirmState_name\",\r\n width: 200\r\n }, \r\n {\r\n title: \"关闭状态\",\r\n dataIndex: \"closeState_name\",\r\n key: \"closeState_name\",\r\n width: 100\r\n }\r\n];\r\n\r\nconst data03 = [\r\n { \r\n orderCode:\"NU0391025\", \r\n supplierName: \"xx供应商\",\r\n type_name: \"1\",\r\n purchasing:'组织c', \r\n purchasingGroup:\"aa\",\r\n voucherDate:\"2018年03月18日\",\r\n approvalState_name:\"已审批\",\r\n confirmState_name:\"执行中\",\r\n closeState_name:\"未关闭\",\r\n key: \"1\"\r\n }, \r\n { \r\n orderCode:\"NU0391026\", \r\n supplierName: \"xx供应商\",\r\n type_name: \"2\",\r\n purchasing:'组织a', \r\n purchasingGroup:\"bb\",\r\n voucherDate:\"2018年02月05日\",\r\n approvalState_name:\"已审批\",\r\n confirmState_name:\"待确认\",\r\n closeState_name:\"未关闭\",\r\n key: \"2\"\r\n },\r\n { \r\n orderCode:\"NU0391027\", \r\n supplierName: \"xx供应商\",\r\n type_name: \"3\",\r\n purchasing:'组织b', \r\n purchasingGroup:\"aa\",\r\n voucherDate:\"2018年07月01日\",\r\n approvalState_name:\"已审批\",\r\n confirmState_name:\"终止\",\r\n closeState_name:\"已关闭\",\r\n key: \"3\"\r\n },\r\n { \r\n orderCode:\"NU0391028\", \r\n supplierName: \"xx供应商\",\r\n type_name: \"4\",\r\n purchasing:'组织c', \r\n purchasingGroup:\"cc\",\r\n voucherDate:\"2019年03月01日\",\r\n approvalState_name:\"未审批\",\r\n confirmState_name:\"待确认\",\r\n closeState_name:\"未关闭\",\r\n key: \"4\"\r\n },\r\n { \r\n orderCode:\"NU0391029\", \r\n supplierName: \"xx供应商\",\r\n type_name: \"5\",\r\n purchasing:'组织d', \r\n purchasingGroup:\"ss\",\r\n voucherDate:\"2019年02月14日\",\r\n approvalState_name:\"未审批\",\r\n confirmState_name:\"待确认\",\r\n closeState_name:\"未关闭\",\r\n key: \"5\"\r\n },\r\n { \r\n orderCode:\"NU0391030\", \r\n supplierName: \"xx供应商\",\r\n type_name: \"1\",\r\n purchasing:'组织e', \r\n purchasingGroup:\"zz\",\r\n voucherDate:\"2019年02月18日\",\r\n approvalState_name:\"已审批\",\r\n confirmState_name:\"终止\",\r\n closeState_name:\"已关闭\",\r\n key: \"6\"\r\n },\r\n { \r\n orderCode:\"NU0391031\", \r\n supplierName: \"xx供应商\",\r\n type_name: \"2\",\r\n purchasing:'组织f', \r\n purchasingGroup:\"qq\",\r\n voucherDate:\"2019年01月01日\",\r\n approvalState_name:\"已审批\",\r\n confirmState_name:\"执行中\",\r\n closeState_name:\"未关闭\",\r\n key: \"7\"\r\n },\r\n { \r\n orderCode:\"NU0391032\", \r\n supplierName: \"xx供应商\",\r\n type_name: \"3\",\r\n purchasing:'组织g', \r\n purchasingGroup:\"pp\",\r\n voucherDate:\"2019年01月31日\",\r\n approvalState_name:\"未审批\",\r\n confirmState_name:\"待确认\",\r\n closeState_name:\"未关闭\",\r\n key: \"8\"\r\n },\r\n];\r\n\r\nclass Demo03 extends Component {\r\n render() {\r\n return
;\r\n }\r\n}\r\n\r\n","desc":" 设置`scroll.y`指定滚动区域的高度,达到固定表头效果"},{"example":
,"title":" 隔行换色","code":"/**\n*\n* @title 隔行换色\n* @parent 基础 Basic\n* @description 可自定义斑马线颜色\n* demo0104\n*/\n\n\nimport React, { Component } from 'react';\nimport { Table } from 'tinper-bee';\n\nconst columns04 = [\n {title: \"序号\",dataIndex: \"index\",key: \"index\",width: 80, \n render(text, record, index) {\n return index + 1;\n }\n },\n {title: \"订单编号\",dataIndex: \"orderCode\",key: \"orderCode\",width: 200},\n {title: \"供应商名称\",dataIndex: \"supplierName\",key: \"supplierName\",width: 200},\n {title: \"类型\",dataIndex: \"type_name\",key: \"type_name\",width: 200},\n {title: \"采购组织\",dataIndex: \"purchasing\",key: \"purchasing\",width: 200},\n {title: \"采购组\",dataIndex: \"purchasingGroup\",key: \"purchasingGroup\",width: 200},\n {title: \"凭证日期\",dataIndex: \"voucherDate\",key: \"voucherDate\",width: 200}\n];\n\nconst data04 = [\n { \n orderCode:\"NU0391025\", \n supplierName: \"xx供应商\",\n type_name: \"1\",\n purchasing:'组织c', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年03月18日\",\n key: \"1\"\n }, \n { \n orderCode:\"NU0391026\", \n supplierName: \"xx供应商\",\n type_name: \"2\",\n purchasing:'组织a', \n purchasingGroup:\"bb\",\n voucherDate:\"2018年02月05日\",\n key: \"2\"\n },\n { \n orderCode:\"NU0391027\", \n supplierName: \"xx供应商\",\n type_name: \"3\",\n purchasing:'组织b', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年07月01日\",\n key: \"3\"\n },\n { \n orderCode:\"NU0391028\", \n supplierName: \"xx供应商\",\n type_name: \"4\",\n purchasing:'组织c', \n purchasingGroup:\"cc\",\n voucherDate:\"2019年03月01日\",\n key: \"4\"\n },\n { \n orderCode:\"NU0391029\", \n supplierName: \"xx供应商\",\n type_name: \"5\",\n purchasing:'组织d', \n purchasingGroup:\"ss\",\n voucherDate:\"2019年02月14日\",\n key: \"5\"\n },\n { \n orderCode:\"NU0391030\", \n supplierName: \"xx供应商\",\n type_name: \"1\",\n purchasing:'组织e', \n purchasingGroup:\"zz\",\n voucherDate:\"2019年02月18日\",\n key: \"6\"\n },\n { \n orderCode:\"NU0391031\", \n supplierName: \"xx供应商\",\n type_name: \"2\",\n purchasing:'组织f', \n purchasingGroup:\"qq\",\n voucherDate:\"2019年01月01日\",\n key: \"7\"\n },\n { \n orderCode:\"NU0391032\", \n supplierName: \"xx供应商\",\n type_name: \"3\",\n purchasing:'组织g', \n purchasingGroup:\"pp\",\n voucherDate:\"2019年01月31日\",\n key: \"8\"\n },\n];\n\nclass Demo04 extends Component {\n render() {\n return
\n }\n}\n\n","desc":" 可自定义斑马线颜色","scss_code":".demo04 {\n &.u-table tr:nth-child(2n){\n background: #f7f9fb;\n }\n &.u-table tr.u-table-row-hover, .u-table tr:hover{\n background: #ebecf0;\n }\n}"},{"example":
,"title":" 表格 Loading 加载","code":"/**\r\n*\r\n* @title 表格 Loading 加载\r\n* @parent 基础 Basic\r\n* @description loading可以传boolean或者object对象,object为bee-loading组件的参数类型\r\n* demo0105\r\n*/\r\n\r\nimport React, { Component } from \"react\";\r\nimport { Table } from 'tinper-bee';\r\nimport {Button,Tooltip} from \"tinper-bee\";\r\n\r\nconst columns05 = [\r\n { title: \"员工编号\", dataIndex: \"a\", key: \"a\", width: 300, className: \"rowClassName\",fixed:'left'},\r\n { title: \"员工姓名\", dataIndex: \"b\", key: \"b\", width: 500 },\r\n { title: \"性别\", dataIndex: \"c\", key: \"c\", width: 500 },\r\n { title: \"部门\", dataIndex: \"d\", key: \"d\", width: 200 }\r\n];\r\n\r\nconst data05 = [\r\n { a: \"ASVAL_201903280005\", b: \"小张\", c: \"男\", d: \"财务二科\", key: \"1\" },\r\n { a: \"ASVAL_201903200004\", b: \"小明\", c: \"男\", d: \"财务一科\", key: \"2\" },\r\n { a: \"ASVAL_201903120002\", b: \"小红\", c: \"女\", d: \"财务一科\", key: \"3\" }\r\n];\r\n\r\nclass Demo05 extends Component {\r\n constructor(props){\r\n super(props);\r\n this.state = {\r\n loading : true\r\n }\r\n }\r\n changeLoading = () => {\r\n this.setState({\r\n loading : !this.state.loading\r\n })\r\n }\r\n render() {\r\n return (\r\n
\r\n
\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\n\r\n","desc":" loading可以传boolean或者object对象,object为bee-loading组件的参数类型"},{"example":
,"title":" 单元格内容居中","code":"/**\n*\n* @title 单元格内容居中\n* @parent 基础 Basic\n* @description 在columns数据中设置`textAlign:'center'`,可实现单元格内容居中展示的效果。默认是居左显示。\n* demo0106\n*/\n\nimport React, { Component } from \"react\";\nimport {Button,Tooltip} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n {\n title: \"员工编号\", dataIndex: \"a\", key: \"a\", width: 120, className: \"rowClassName\",\n fixed:'left',\n textAlign:'center',\n render: (text, record, index) => {\n return (\n
\n {text}\n \n );\n }\n },\n { title: \"员工姓名\", dataIndex: \"b\", key: \"b\", width:100,textAlign:'center'},\n { title: \"性别\", dataIndex: \"c\", key: \"c\", width: 100,textAlign:'center'},\n { title: \"部门\", dataIndex: \"d\", key: \"d\", width: 100,textAlign:'center' },\n { title: \"职级\", dataIndex: \"e\", key: \"e\", width: 100,textAlign:'center' }\n];\n\nconst data = [\n { a: \"ASVAL_201903280005\", b: \"小张\", c: \"男\", d: \"财务二科\", e: \"M1\", key: \"1\" },\n { a: \"ASVAL_201903200004\", b: \"小明\", c: \"男\", d: \"财务一科\", e: \"T1\", key: \"2\" },\n { a: \"ASVAL_201903120002\", b: \"小红\", c: \"女\", d: \"财务一科\", e: \"T2\", key: \"3\" }\n];\n\nclass Demo06 extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n data: data\n }\n }\n handleClick = () => {\n console.log('这是第' , this.currentIndex , '行');\n console.log('内容:' , this.currentRecord);\n }\n\n render() {\n return (\n
\n );\n }\n}\n\n\n","desc":" 在columns数据中设置`textAlign:'center'`,可实现单元格内容居中展示的效果。默认是居左显示。"},{"example":
,"title":" 横向滚动条","code":"/**\n*\n* @title 横向滚动条\n* @parent 滚动 Scroll View\n* @description 设置`scroll`属性支持横向或纵向滚动,x/y的取值可以是正整数、百分比、布尔值\n* demo0201\n*/\n\nimport React, { Component } from \"react\";\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n {\n title: \"序号\",\n dataIndex: \"index\",\n key: \"index\",\n width: 100, \n render(text, record, index) {\n return index + 1;\n }\n },\n {\n title: \"订单编号\",\n dataIndex: \"orderCode\",\n key: \"orderCode\",\n width: 300, \n },\n {\n title: \"供应商名称\",\n dataIndex: \"supplierName\",\n key: \"supplierName\",\n width: 200\n },\n {\n title: \"类型\",\n dataIndex: \"type_name\",\n key: \"type_name\",\n width: 200\n },\n {\n title: \"采购组织\",\n dataIndex: \"purchasing\",\n key: \"purchasing\",\n width: 200\n },\n {\n title: \"采购组\",\n dataIndex: \"purchasingGroup\",\n key: \"purchasingGroup\",\n width: 200\n },\n {\n title: \"凭证日期\",\n dataIndex: \"voucherDate\",\n key: \"voucherDate\",\n width: 300,\n },\n {\n title: \"审批状态\",\n dataIndex: \"approvalState_name\",\n key: \"approvalState_name\",\n width: 200\n },\n {\n title: \"确认状态\",\n dataIndex: \"confirmState_name\",\n key: \"confirmState_name\",\n width: 200\n }, \n {\n title: \"关闭状态\",\n dataIndex: \"closeState_name\",\n key: \"closeState_name\",\n width: 100\n }\n];\n \nconst data = [\n { \n orderCode:\"NU0391025\", \n supplierName: \"xx供应商\",\n type_name: \"1\",\n purchasing:'组织c', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年03月18日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"执行中\",\n closeState_name:\"未关闭\",\n key: \"1\"\n }, \n { \n orderCode:\"NU0391026\", \n supplierName: \"xx供应商\",\n type_name: \"2\",\n purchasing:'组织a', \n purchasingGroup:\"bb\",\n voucherDate:\"2018年02月05日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"待确认\",\n closeState_name:\"未关闭\",\n key: \"2\"\n },\n { \n orderCode:\"NU0391027\", \n supplierName: \"xx供应商\",\n type_name: \"3\",\n purchasing:'组织b', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年07月01日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"终止\",\n closeState_name:\"已关闭\",\n key: \"3\"\n },\n { \n orderCode:\"NU0391028\", \n supplierName: \"xx供应商\",\n type_name: \"4\",\n purchasing:'组织c', \n purchasingGroup:\"cc\",\n voucherDate:\"2019年03月01日\",\n approvalState_name:\"未审批\",\n confirmState_name:\"待确认\",\n closeState_name:\"未关闭\",\n key: \"4\"\n },\n { \n orderCode:\"NU0391029\", \n supplierName: \"xx供应商\",\n type_name: \"5\",\n purchasing:'组织d', \n purchasingGroup:\"ss\",\n voucherDate:\"2019年02月14日\",\n approvalState_name:\"未审批\",\n confirmState_name:\"待确认\",\n closeState_name:\"未关闭\",\n key: \"5\"\n }\n];\n\nclass Demo11 extends Component {\n render() {\n return (\n
\n );\n }\n}\n\n\n","desc":" 设置`scroll`属性支持横向或纵向滚动,x/y的取值可以是正整数、百分比、布尔值"},{"example":
,"title":" 纵向滚动条","code":"/**\n*\n* @title 纵向滚动条\n* @parent 滚动 Scroll View\n* @description 设置`scroll`属性支持横向或纵向滚动,x/y的取值可以是正整数、百分比、布尔值\n* demo0202\n*/\n\nimport React, { Component } from \"react\";\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n {title: \"序号\",dataIndex: \"index\",key: \"index\",width: 80, \n render(text, record, index) {\n return index + 1;\n }\n },\n {title: \"订单编号\",dataIndex: \"orderCode\",key: \"orderCode\",width: 200},\n {title: \"供应商名称\",dataIndex: \"supplierName\",key: \"supplierName\",width: 200},\n {title: \"类型\",dataIndex: \"type_name\",key: \"type_name\",width: 200},\n {title: \"采购组织\",dataIndex: \"purchasing\",key: \"purchasing\",width: 200},\n {title: \"采购组\",dataIndex: \"purchasingGroup\",key: \"purchasingGroup\",width: 200},\n {title: \"凭证日期\",dataIndex: \"voucherDate\",key: \"voucherDate\",width: 200}\n];\n \nconst data = [\n { \n orderCode:\"NU0391025\", \n supplierName: \"xx供应商\",\n type_name: \"1\",\n purchasing:'组织c', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年03月18日\",\n key: \"1\"\n }, \n { \n orderCode:\"NU0391026\", \n supplierName: \"xx供应商\",\n type_name: \"2\",\n purchasing:'组织a', \n purchasingGroup:\"bb\",\n voucherDate:\"2018年02月05日\",\n key: \"2\"\n },\n { \n orderCode:\"NU0391027\", \n supplierName: \"xx供应商\",\n type_name: \"3\",\n purchasing:'组织b', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年07月01日\",\n key: \"3\"\n },\n { \n orderCode:\"NU0391028\", \n supplierName: \"xx供应商\",\n type_name: \"4\",\n purchasing:'组织c', \n purchasingGroup:\"cc\",\n voucherDate:\"2019年03月01日\",\n key: \"4\"\n },\n { \n orderCode:\"NU0391029\", \n supplierName: \"xx供应商\",\n type_name: \"5\",\n purchasing:'组织d', \n purchasingGroup:\"ss\",\n voucherDate:\"2019年02月14日\",\n key: \"5\"\n },\n { \n orderCode:\"NU0391030\", \n supplierName: \"xx供应商\",\n type_name: \"1\",\n purchasing:'组织e', \n purchasingGroup:\"zz\",\n voucherDate:\"2019年02月18日\",\n key: \"6\"\n },\n { \n orderCode:\"NU0391031\", \n supplierName: \"xx供应商\",\n type_name: \"2\",\n purchasing:'组织f', \n purchasingGroup:\"qq\",\n voucherDate:\"2019年01月01日\",\n key: \"7\"\n },\n { \n orderCode:\"NU0391032\", \n supplierName: \"xx供应商\",\n type_name: \"3\",\n purchasing:'组织g', \n purchasingGroup:\"pp\",\n voucherDate:\"2019年01月31日\",\n key: \"8\"\n },\n];\nclass Demo12 extends Component {\n render() {\n return (\n
\n );\n }\n}\n\n\n","desc":" 设置`scroll`属性支持横向或纵向滚动,x/y的取值可以是正整数、百分比、布尔值"},{"example":
,"title":" 渲染本地数据","code":"/**\n*\n* @title 渲染本地数据\n* @parent 数据操作 Data Opetation\n* @description 可自定义页头和页脚。\n* demo0301\n*/\n\nimport React, { Component } from \"react\";\nimport {Button,Tooltip} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n {\n title: \"员工编号\", dataIndex: \"a\", key: \"a\", width: 300, className: \"rowClassName\",\n fixed:'left',\n render: (text, record, index) => {\n return (\n
\n {text}\n \n );\n }\n },\n { title: \"员工姓名\", dataIndex: \"b\", key: \"b\", width: 500 },\n { title: \"性别\", dataIndex: \"c\", key: \"c\", width: 500 },\n { title: \"部门\", dataIndex: \"d\", key: \"d\", width: 200 }\n];\n\nconst data = [\n { a: \"ASVAL_201903280005\", b: \"小张\", c: \"男\", d: \"财务二科\", key: \"1\" },\n { a: \"ASVAL_201903200004\", b: \"小明\", c: \"男\", d: \"财务一科\", key: \"2\" },\n { a: \"ASVAL_201903120002\", b: \"小红\", c: \"女\", d: \"财务一科\", key: \"3\" }\n];\nclass Demo21 extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n data: data\n }\n }\n\n render() {\n return (\n
员工信息统计表
}\n footer={currentData => 合计: 共{data.length}条数据
}\n />\n );\n }\n}\n\n\n","desc":" 可自定义页头和页脚。"},{"example":,"title":" 渲染远程数据","code":"/**\n*\n* @title 渲染远程数据\n* @parent 数据操作 Data Opetation\n* @description 可通过 ajax 请求方式,从服务端读取并展现数据。也可自行接入其他数据处理方式。\n* demo0302\n*/\n\nimport React, { Component } from \"react\";\nimport {Button} from \"tinper-bee\";\nimport reqwest from 'reqwest';\nimport { Table } from 'tinper-bee';\n\nconst columns = [{\n title: 'Name',\n dataIndex: 'name',\n sorter: true,\n render: name => `${name.first} ${name.last}`,\n width: '20%',\n}, {\n title: 'Gender',\n dataIndex: 'gender',\n filters: [\n { text: 'Male', value: 'male' },\n { text: 'Female', value: 'female' },\n ],\n width: '20%',\n}, {\n title: 'Email',\n dataIndex: 'email',\n}];\n\nclass Demo22 extends Component {\n constructor(props) {\n super(props);\n this.state = {\n data: [],\n loading: false,\n }\n }\n\n fetch = (params = {}) => {\n console.log('params:', params);\n this.setState({ loading: true });\n reqwest({\n url: 'https://randomuser.me/api',\n method: 'get',\n data: {\n results: 10,\n ...params,\n },\n type: 'json',\n }).then((data) => {\n this.setState({\n loading: false,\n data: data.results,\n });\n });\n }\n\n render() {\n return (\n \n
\n
\n
\n );\n }\n}\n\n\n","desc":" 可通过 ajax 请求方式,从服务端读取并展现数据。也可自行接入其他数据处理方式。","scss_code":".demo22{\n .opt-btns{\n margin-bottom: 8px;\n }\n}"},{"example":,"title":" 多列表头","code":"/**\r\n *\r\n * @title 多列表头\r\n * @parent 列渲染 Custom Render\r\n * @description columns[n] 可以内嵌 children,以渲染分组表头。\r\n * 自定义表头高度需要传headerHeight,注:修改th的padding top和bottom置为0,否则会有影响\r\n * demo0402\r\n */\r\n\r\nimport React, { Component } from \"react\";\r\nimport { Table } from 'tinper-bee';\r\nimport {Button} from \"tinper-bee\";\r\n\r\nconst { ColumnGroup, Column } = Table;\r\n\r\nconst columns = [\r\n {\r\n title: \"Name\",\r\n dataIndex: \"name\",\r\n key: \"name\",\r\n width: 100,\r\n fixed: \"left\"\r\n },\r\n {\r\n title: \"Other\",\r\n width:600,\r\n children: [\r\n {\r\n title: \"Age\",\r\n dataIndex: \"age\",\r\n key: \"age\",\r\n width: 200\r\n },\r\n {\r\n title: \"Address\",\r\n children: [\r\n {\r\n title: \"Street\",\r\n dataIndex: \"street\",\r\n key: \"street\",\r\n width: 200\r\n },\r\n {\r\n title: \"Block\",\r\n children: [\r\n {\r\n title: \"Building\",\r\n dataIndex: \"building\",\r\n key: \"building\",\r\n width: 100\r\n },\r\n {\r\n title: \"Door No.\",\r\n dataIndex: \"number\",\r\n key: \"number\",\r\n width: 100\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n title: \"Company\",\r\n width:400,\r\n children: [\r\n {\r\n title: \"Company Address\",\r\n dataIndex: \"companyAddress\",\r\n key: \"companyAddress\",\r\n width:200,\r\n },\r\n {\r\n title: \"Company Name\",\r\n dataIndex: \"companyName\",\r\n key: \"companyName\",\r\n width:200,\r\n }\r\n ]\r\n },\r\n {\r\n title: \"Gender\",\r\n dataIndex: \"gender\",\r\n key: \"gender\",\r\n width: 60,\r\n fixed: \"right\"\r\n }\r\n];\r\n\r\nconst data = [];\r\nfor (let i = 0; i < 20; i++) {\r\n data.push({\r\n key: i,\r\n name: \"John Brown\",\r\n age: i + 1,\r\n street: \"Lake Park\",\r\n building: \"C\",\r\n number: 2035,\r\n companyAddress: \"Lake Street 42\",\r\n companyName: \"SoftLake Co\",\r\n gender: \"M\"\r\n });\r\n}\r\n\r\nclass Demo32 extends Component {\r\n render() {\r\n return (\r\n \r\n );\r\n }\r\n}\r\n\r\n\r\n","desc":" columns[n] 可以内嵌 children,以渲染分组表头。","scss_code":".demo32{\n .u-table-thead th {\n padding-top: 0px;\n padding-bottom: 0px;\n }\n}"},{"example":,"title":" 数据关联","code":"/**\n*\n* @title 数据关联\n* @parent 列渲染 Custom Render\n* @description 数据行关联自定义菜单显示\n* demo0404\n*/\n\nimport React, { Component } from 'react';\nimport {Icon,Checkbox,Dropdown,Menu} from 'tinper-bee';\nimport { Table } from 'tinper-bee';\nimport multiSelect from \"tinper-bee/lib/newMultiSelect\";;\nimport sort from \"tinper-bee/lib/sort\";;\n\nconst { Item } = Menu;\n\nconst data = [\n { \n num:\"NU0391025\", \n name: \"aa\",\n sex: \"男\",\n dept:'财务二科', \n rank:\"T1\",\n year:\"1\",\n seniority:\"1\",\n key: \"1\"\n }, \n { \n num:\"NU0391026\", \n name: \"bb\",\n sex: \"女\",\n dept:'财务一科', \n rank:\"M1\",\n year:\"1\",\n seniority:\"1\",\n key: \"2\"\n },\n { \n num:\"NU0391027\", \n name: \"dd\",\n sex: \"女\",\n dept:'财务一科', \n rank:\"T2\",\n year:\"2\",\n seniority:\"2\",\n key: \"3\"\n }\n];\n\nconst MultiSelectTable = multiSelect(Table, Checkbox);\nconst ComplexTable = sort(MultiSelectTable, Icon);\n\nclass Demo33 extends Component {\n constructor(props) {\n super(props);\n }\n getSelectedDataFunc = data => {\n console.log(data);\n }\n onSelect = (item) => {\n console.log(item);\n }\n render() {\n const menu1 = (\n );\n let columns = [\n { title: \"关联\",dataIndex: \"link\",key: \"link\",width: 80, \n render: (text, record, index) => {\n return (\n \n \n \n )\n }\n },\n { title: \"员工编号\",dataIndex: \"num\",key: \"num\",width: 200 },\n { title: \"员工姓名\",dataIndex: \"name\",key: \"name\", width: 200},\n { title: \"员工性别\",dataIndex: \"sex\",key: \"sex\",width: 200 },\n { title: \"部门\",dataIndex: \"dept\",key: \"dept\",width: 200},\n { title: \"职级\",dataIndex: \"rank\",key: \"rank\",width: 200},\n { title: \"工龄\",dataIndex: \"year\",key: \"year\",width: 200},\n { title: \"司龄\",dataIndex: \"seniority\",key: \"seniority\",width: 200}\n ];\n return \n }\n}\n\n","desc":" 数据行关联自定义菜单显示"},{"example":,"title":" 列合计(总计)","code":"/**\n *\n * @title 列合计(总计)\n * @parent 列渲染 Custom Render\n * @description 给需要计算合计的列(columns),设置sumCol值为true即可,支持动态设置数据源。\n * demo0405\n */\n\nimport React, { Component } from \"react\";\nimport {Button,Checkbox} from \"tinper-bee\";\nimport { Table } from 'tinper-bee'; \nimport sum from \"tinper-bee/lib/sum.js\";;\nimport multiSelect from \"tinper-bee/lib/multiSelect.js\";;\n \nlet ComplexTable = multiSelect(sum(Table), Checkbox);\n\nconst columns = [\n {\n title: \"单据编号\",\n dataIndex: \"num\",\n key: \"num\",\n width: 120,\n fixed: \"left\"\n },\n {\n title: \"单据日期\",\n dataIndex: \"date\",\n key: \"date\",\n width: 200,\n },\n {\n title: \"业务类型\",\n dataIndex: \"type\",\n key: \"type\",\n width: 200\n },\n {\n title: \"供应商\",\n dataIndex: \"supplier\",\n key: \"supplier\",\n width: 100\n },\n {\n title: \"联系人\",\n dataIndex: \"contact\",\n key: \"contact\",\n },\n {\n title: \"仓库\",\n dataIndex: \"warehouse\",\n key: \"warehouse\",\n width: 80,\n },\n {\n title: \"整单数量\",\n dataIndex: \"total\",\n key: \"total\",\n width: 100,\n sumCol: true\n },\n {\n title: \"金额\",\n dataIndex: \"money\",\n key: \"money\",\n width: 100,\n sumCol: true\n }\n];\n\nfunction getData(){\n const data = [];\n for (let i = 0; i < 5; i++) {\n data.push({\n key: i,\n num: \"NU039100\"+i,\n date: \"2019-03-01\",\n type: \"普通采购\",\n supplier: \"gys\"+i,\n contact: \"Tom\",\n warehouse: \"普通仓\",\n total: i + Math.floor(Math.random()*10),\n money: 20 * Math.floor(Math.random()*10)\n });\n }\n return data;\n}\n\nclass Demo35 extends Component {\n \n constructor(props) {\n super(props);\n this.state = {\n data: getData()\n };\n }\n\n changeData = ()=>{\n this.setState({\n data: getData()\n });\n }\n\n render() {\n const {data} = this.state;\n return (\n \n \n\n \n
\n );\n }\n}\n\n","desc":" 给需要计算合计的列(columns),设置sumCol值为true即可,支持动态设置数据源。"},{"example":,"title":" 编辑态表格","code":"/**\n*\n* @title 编辑态表格\n* @parent 编辑 Editor\n* @description 这是带有多种不同格式的编辑态表格(编辑态是通过使用不同的render来达到不同编辑格式)\n* demo0501\n*/\n\nimport React from \"react\";\nimport {Animate,Tooltip,FormControl,Button,Form,Icon,Checkbox,Select} from \"tinper-bee\";\nimport { Table, Datepicker } from 'tinper-bee';\nimport renderInput from \"tinper-bee/lib/InputRender.js\";;\nimport renderDate from \"tinper-bee/lib/DateRender.js\";;\nimport renderSelect from \"tinper-bee/lib/SelectRender.js\";;\n\nconst InputRender = renderInput(Form, FormControl, Icon);\nconst DateRender = renderDate(Datepicker, Icon);\nconst SelectRender = renderSelect(Select, Icon);\n\nconst format = \"YYYY-MM-DD\";\nconst format2 = \"YYYY-MM\";\nconst format3 = \"YYYY-MM-DD HH:mm:ss\";\n\nconst dateInputPlaceholder = \"选择日期\";\nconst dateInputPlaceholder2 = \"选择年月\";\nconst dataSource = [\n {\n key: \"boyuzhou\",\n value: \"jack\"\n },\n {\n key: \"renhualiu\",\n value: \"lucy\"\n },\n {\n key: \"yuzhao\",\n value: \"yiminghe\"\n }\n];\nclass Demo41 extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n dataSource: [\n {\n key: \"0\",\n name: \"沉鱼\",\n number: \"10\",\n age: \"y\",\n address: \"jack\",\n datepicker: \"2017-06-12\",\n MonthPicker: \"2017-02\"\n },\n {\n key: \"1\",\n name: \"落雁\",\n number: \"100\",\n age: \"y\",\n address: \"lucy\",\n datepicker: \"2017-06-12\",\n MonthPicker: \"2017-02\"\n },\n {\n key: \"2\",\n name: \"闭月\",\n number: \"1000\",\n age: \"n\",\n address: \"lucy\",\n datepicker: \"2017-06-12\",\n MonthPicker: \"2017-02\"\n },\n {\n key: \"3\",\n name: \"羞花\",\n number: \"9999\",\n age: \"y\",\n address: \"lucy\",\n datepicker: \"2017-06-12\",\n MonthPicker: \"2017-02\"\n }\n ],\n count: 4\n };\n this.columns = [\n {\n title: \"普通输入\",\n dataIndex: \"name\",\n key: \"name\",\n width: \"150px\",\n render: (text, record, index) => (\n \n \n \n }\n />\n )\n },\n {\n title: \"货币输入\",\n dataIndex: \"number\",\n key: \"number\",\n width: \"150px\",\n render: (text, record, index) => (\n \n \n \n }\n reg={/^[0-9]+$/}\n />\n )\n },\n {\n title: \"复选\",\n dataIndex: \"age\",\n key: \"age\",\n width: \"100px\",\n render: (text, record, index) => (\n \n )\n },\n {\n title: \"下拉框\",\n dataIndex: \"address\",\n key: \"address\",\n width: \"200px\",\n render: (text, record, index) => {\n return (\n \n \n \n \n \n \n );\n }\n },\n {\n title: \"年月日\",\n dataIndex: \"datepicker\",\n key: \"datepicker\",\n width: \"200px\",\n render: (text, record, index) => {\n return (\n \n );\n }\n },\n {\n title: \"年月\",\n dataIndex: \"MonthPicker\",\n key: \"MonthPicker\",\n width: \"200px\",\n render: (text, record, index) => {\n return (\n \n );\n }\n }\n ];\n }\n check = (flag, obj) => {\n console.log(flag);\n console.log(obj);\n };\n\n onInputChange = (index, key) => {\n return value => {\n const dataSource = [...this.state.dataSource];\n dataSource[index][key] = value;\n this.setState({ dataSource });\n };\n };\n onCheckChange = (index, key) => {\n return value => {\n const dataSource = [...this.state.dataSource];\n dataSource[index][key] = value;\n this.setState({ dataSource });\n };\n };\n onSelectChange = (index, key) => {\n return value => {\n console.log(`selected ${value}`);\n const dataSource = [...this.state.dataSource];\n dataSource[index][key] = value;\n this.setState({ dataSource });\n };\n };\n onDateChange = d => {\n console.log(d);\n };\n onDateSelect = d => {\n console.log(d);\n };\n onDelete = index => {\n return () => {\n const dataSource = [...this.state.dataSource];\n dataSource.splice(index, 1);\n this.setState({ dataSource });\n };\n };\n handleAdd = () => {\n const { count, dataSource } = this.state;\n const newData = {\n key: count,\n name: `凤姐 ${count}`,\n age: 32,\n address: \"jack\",\n datepicker: \"2017-06-12\",\n MonthPicker: \"2017-02\"\n };\n this.setState({\n dataSource: [...dataSource, newData],\n count: count + 1\n });\n };\n\n getBodyWrapper = body => {\n return (\n \n {body.props.children}\n \n );\n };\n getData = () => {\n console.log(this.state.dataSource);\n };\n render() {\n const { dataSource } = this.state;\n const columns = this.columns;\n return (\n \n
\n
\n
\n
\n );\n }\n}\n\n\n","desc":" 这是带有多种不同格式的编辑态表格(编辑态是通过使用不同的render来达到不同编辑格式)"},{"example":,"title":" 单元格编辑","code":"/**\n *\n * @title 单元格编辑\n * @description 可以对单元格进行编辑的表格,示例中给出输入框+必填校验、下拉框编辑模式,以及输入模式的必填校验。\n * demo0502\n */\nimport React, { Component } from \"react\";\nimport { Table } from 'tinper-bee';\nimport { Icon, Select, Tooltip } from \"tinper-bee\";\nconst Option = Select.Option;\n\nclass StringEditCell extends Component {\n constructor(props, context) {\n super(props);\n this.state = {\n value: this.props.value,\n editable: false\n };\n }\n\n commitChange = () => {\n if (this.state.value === \"\") return;\n this.setState({ editable: false });\n if (this.props.onChange) {\n this.props.onChange(this.state.value);\n }\n };\n\n edit = () => {\n this.setState({ editable: true });\n };\n\n handleKeydown = event => {\n if (event.keyCode == 13) {\n this.commitChange();\n }\n };\n\n handleChange = e => {\n this.setState({ value: e.target.value });\n };\n\n render() {\n const { value, editable } = this.state;\n return (\n \n {editable ? (\n
\n \n {value === \"\" ? (\n \n {\"请输入\" + this.props.colName}\n
\n }\n >\n
\n \n ) : null}\n
\n ) : (\n \n {value || \" \"}\n
\n )}\n \n );\n }\n}\n\nconst SELECT_SOURCE = [\"xx供应商\", \"yy供应商\", \"zz供应商\", \"aa供应商\", \"bb供应商\"];\n\nclass SelectEditCell extends Component {\n constructor(props, context) {\n super(props);\n this.state = {\n value: this.props.value,\n editable: false\n };\n }\n\n handleSelect = (value) => {\n this.setState({ value });\n }\n\n commitChange = () => {\n this.setState({ editable: false });\n if (this.props.onChange) {\n this.props.onChange(this.state.value);\n }\n };\n\n edit = () => {\n this.setState({ editable: true });\n };\n\n render() {\n const { value, editable } = this.state;\n return (\n \n {editable ? (\n
\n \n
\n ) : (\n
\n {value || \" \"}\n
\n )}\n
\n );\n }\n}\n\nconst dataSource = [\n { name: \"NU03910001\", quality: \"xx供应商\", level: 70, key: \"1\" },\n { name: \"NU03910002\", quality: \"yy供应商\", level: 75, key: \"2\" },\n { name: \"NU03910003\", quality: \"zz供应商\", level: 50, key: \"3\" },\n { name: \"NU03910004\", quality: \"aa供应商\", level: 70, key: \"4\" },\n { name: \"NU03910005\", quality: \"bb供应商\", level: 60, key: \"5\" }\n];\n\nclass Demo501 extends Component {\n constructor(props, context) {\n super(props);\n this.columns = [\n {\n title: \"订单编号\",\n dataIndex: \"name\",\n key: \"name\",\n render: (text, record, index) => (\n \n )\n },\n {\n title: \"供应商名称\",\n dataIndex: \"quality\",\n key: \"quality\",\n render: (text, record, index) => (\n \n )\n },\n {\n title: \"采购数量\",\n dataIndex: \"level\",\n key: \"level\"\n }\n ];\n\n this.state = {\n dataSource: dataSource\n };\n }\n\n onCellChange = (index, key) => {\n return value => {\n const { dataSource } = this.state;\n dataSource[index][key] = value;\n this.setState({ dataSource }, () => console.dir(this.state.dataSource));\n };\n };\n\n render() {\n return (\n \n );\n }\n}\n\n\n","desc":" 可以对单元格进行编辑的表格,示例中给出输入框+必填校验、下拉框编辑模式,以及输入模式的必填校验。","scss_code":".demo501 {\n .editable-cell-text-wrapper {\n &:hover {\n border: 1px dashed #A5ADBA;\n }\n }\n\n .require {\n position: absolute;\n top: 2px;\n color: red;\n font-size: 20px;\n }\n}\n\n.help-tip {\n color: #F44336;\n}\n\n.tp-501 {\n .tooltip-arrow {\n border-bottom-color: #F44336 !important;\n }\n\n .tooltip-inner {\n border-color: #F44336 !important;\n }\n}\n"},{"example":,"title":" 左侧固定列","code":"/**\n*\n* @title 左侧固定列\n* @parent 列操作-锁定 Fixed\n* @description 固定列到表格的左侧\n* demo0601\n*/\n\n\n\nimport React, { Component } from 'react';\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n {\n title: \"序号\",\n dataIndex: \"index\",\n key: \"index\",\n width: 80, \n fixed: 'left',\n render(text, record, index){return index + 1}\n },\n {\n title: \"订单编号\",\n dataIndex: \"orderCode\",\n key: \"orderCode\",\n width: 100, \n fixed: 'left',\n },\n {\n title: \"供应商名称\",\n dataIndex: \"supplierName\",\n key: \"supplierName\",\n width: 100\n },\n {\n title: \"类型\",\n dataIndex: \"type_name\",\n key: \"type_name\",\n width: 100\n },\n {\n title: \"采购组织\",\n dataIndex: \"purchasing\",\n key: \"purchasing\",\n width: 100\n },\n {\n title: \"采购组\",\n dataIndex: \"purchasingGroup\",\n key: \"purchasingGroup\",\n width: 100\n },\n {\n title: \"凭证日期\",\n dataIndex: \"voucherDate\",\n key: \"voucherDate\",\n width: 200,\n \n },\n {\n title: \"审批状态\",\n dataIndex: \"approvalState_name\",\n key: \"approvalState_name\",\n width: 100\n },\n {\n title: \"确认状态\",\n dataIndex: \"confirmState_name\",\n key: \"confirmState_name\",\n width: 100\n }, \n {\n title: \"关闭状态\",\n dataIndex: \"closeState_name\",\n key: \"closeState_name\",\n width: 100\n }\n];\n\nconst data = [\n { \n orderCode:\"NU0391025\", \n supplierName: \"xx供应商\",\n type_name: \"1\",\n purchasing:'组织c', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年03月18日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"执行中\",\n closeState_name:\"未关闭\",\n key: \"1\"\n }, \n { \n orderCode:\"NU0391026\", \n supplierName: \"xx供应商\",\n type_name: \"2\",\n purchasing:'组织a', \n purchasingGroup:\"bb\",\n voucherDate:\"2018年02月05日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"待确认\",\n closeState_name:\"未关闭\",\n key: \"2\"\n },\n { \n orderCode:\"NU0391027\", \n supplierName: \"xx供应商\",\n type_name: \"3\",\n purchasing:'组织b', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年07月01日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"终止\",\n closeState_name:\"已关闭\",\n key: \"3\"\n }\n];\n\nclass Demo51 extends Component {\n render() {\n return ;\n }\n}\n\n","desc":" 固定列到表格的左侧"},{"example":,"title":" 右侧固定列","code":"/**\n*\n* @title 右侧固定列\n* @parent 列操作-锁定 Fixed\n* @description 固定列到表格的右侧\n* demo0602\n*/\n\n\n\nimport React, { Component } from 'react';\nimport {Popconfirm} from 'tinper-bee';\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n {\n title: \"序号\",\n dataIndex: \"index\",\n key: \"index\",\n width: 80, \n render(text, record, index){return index + 1}\n },\n {\n title: \"订单编号\",\n dataIndex: \"orderCode\",\n key: \"orderCode\",\n width: 100, \n },\n {\n title: \"供应商名称\",\n dataIndex: \"supplierName\",\n key: \"supplierName\",\n width: 100\n },\n {\n title: \"类型\",\n dataIndex: \"type_name\",\n key: \"type_name\",\n width: 100\n },\n {\n title: \"采购组织\",\n dataIndex: \"purchasing\",\n key: \"purchasing\",\n width: 100\n },\n {\n title: \"采购组\",\n dataIndex: \"purchasingGroup\",\n key: \"purchasingGroup\",\n width: 100\n },\n {\n title: \"凭证日期\",\n dataIndex: \"voucherDate\",\n key: \"voucherDate\",\n width: 200,\n \n },\n {\n title: \"审批状态\",\n dataIndex: \"approvalState_name\",\n key: \"approvalState_name\",\n width: 100\n },\n {\n title: \"确认状态\",\n dataIndex: \"confirmState_name\",\n key: \"confirmState_name\",\n width: 100\n }, \n {\n title: \"关闭状态\",\n dataIndex: \"closeState_name\",\n key: \"closeState_name\",\n width: 100\n },\n {\n title: \"操作\",\n dataIndex: \"d\",\n key: \"d\",\n width:100,\n fixed: \"right\",\n render(text, record, index) {\n return (\n \n )\n }\n }\n];\n\nconst data = [\n { \n orderCode:\"NU0391025\", \n supplierName: \"xx供应商\",\n type_name: \"1\",\n purchasing:'组织c', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年03月18日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"执行中\",\n closeState_name:\"未关闭\",\n key: \"1\"\n }, \n { \n orderCode:\"NU0391026\", \n supplierName: \"xx供应商\",\n type_name: \"2\",\n purchasing:'组织a', \n purchasingGroup:\"bb\",\n voucherDate:\"2018年02月05日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"待确认\",\n closeState_name:\"未关闭\",\n key: \"2\"\n },\n { \n orderCode:\"NU0391027\", \n supplierName: \"xx供应商\",\n type_name: \"3\",\n purchasing:'组织b', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年07月01日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"终止\",\n closeState_name:\"已关闭\",\n key: \"3\"\n }\n];\n\nclass Demo52 extends Component {\n render() {\n return ;\n }\n}\n\n","desc":" 固定列到表格的右侧"},{"example":,"title":" 动态设置列锁定、解除锁定","code":"/**\n*\n* @title 动态设置列锁定、解除锁定\n* @parent 列操作-锁定 Fixed\n* @description 动态设置columns中数据的fixed属性值【fixed: \"left\",fixed: \"right\"】。\n* demo0603\n*/\nimport React, { Component } from 'react';\nimport {Icon,Menu,Dropdown} from \"tinper-bee\";\n\nimport { Table } from 'tinper-bee';\n\nconst { Item } = Menu;\n\nconst columns = [\n {\n title: \"序号\",\n dataIndex: \"index\",\n key: \"index\",\n width: 80, \n fixed: 'left',\n render(text, record, index){return index + 1}\n },\n {\n title: \"订单编号\",\n dataIndex: \"orderCode\",\n key: \"orderCode\",\n width: 100, \n fixed: 'left',\n },\n {\n title: \"供应商名称\",\n dataIndex: \"supplierName\",\n key: \"supplierName\",\n width: 150\n },\n {\n title: \"类型\",\n dataIndex: \"type_name\",\n key: \"type_name\",\n width: 100\n },\n {\n title: \"采购组织\",\n dataIndex: \"purchasing\",\n key: \"purchasing\",\n width: 100\n },\n {\n title: \"采购组\",\n dataIndex: \"purchasingGroup\",\n key: \"purchasingGroup\",\n width: 100\n },\n {\n title: \"凭证日期\",\n dataIndex: \"voucherDate\",\n key: \"voucherDate\",\n width: 200,\n \n },\n {\n title: \"审批状态\",\n dataIndex: \"approvalState_name\",\n key: \"approvalState_name\",\n width: 100\n },\n {\n title: \"确认状态\",\n dataIndex: \"confirmState_name\",\n key: \"confirmState_name\",\n width: 100\n }, \n {\n title: \"关闭状态\",\n dataIndex: \"closeState_name\",\n key: \"closeState_name\",\n width: 100\n }\n];\n\nconst data = [\n { \n orderCode:\"NU0391025\", \n supplierName: \"xx供应商\",\n type_name: \"1\",\n purchasing:'组织c', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年03月18日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"执行中\",\n closeState_name:\"未关闭\",\n key: \"1\"\n }, \n { \n orderCode:\"NU0391026\", \n supplierName: \"xx供应商\",\n type_name: \"2\",\n purchasing:'组织a', \n purchasingGroup:\"bb\",\n voucherDate:\"2018年02月05日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"待确认\",\n closeState_name:\"未关闭\",\n key: \"2\"\n },\n { \n orderCode:\"NU0391027\", \n supplierName: \"xx供应商\",\n type_name: \"3\",\n purchasing:'组织b', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年07月01日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"终止\",\n closeState_name:\"已关闭\",\n key: \"3\"\n }\n];\n \nclass Demo24 extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n columns:columns\n }\n }\n \n onSelect = ({key,item})=>{ \n console.log(`${key} selected`); //获取key\n let currentObject = item.props.data; //获取选中对象的数据\n let {columns} = this.state;\n let fixedCols = [];\n let nonColums = [];\n columns.find(da=>{\n if(da.key == key){\n da.fixed?delete da.fixed:da.fixed = 'left';\n }\n da.fixed?fixedCols.push(da):nonColums.push(da);\n });\n \n columns = [...fixedCols,...nonColums]\n\n this.setState({\n columns\n });\n }\n //表头增加下拉菜单\n renderColumnsDropdown(columns) {\n const icon ='uf-arrow-down';\n \n return columns.map((originColumn,index) => {\n let column = Object.assign({}, originColumn);\n let menuInfo = [], title='锁定';\n if(originColumn.fixed){\n title = '解锁'\n }\n menuInfo.push({\n info:title,\n key:originColumn.key,\n index:index\n });\n const menu = (\n )\n column.title = (\n \n {column.title}\n \n \n \n \n \n );\n return column;\n });\n \n }\n\n render() {\n let {columns} = this.state;\n columns = this.renderColumnsDropdown(columns);\n return(\n \n )\n }\n}\n\n","desc":" 动态设置columns中数据的fixed属性值【fixed: \"left\",fixed: \"right\"】。","scss_code":"th{\n .drop-menu{\n .uf{\n font-size: 12px;\n visibility: hidden;\n margin-left: 15px;\n }\n \n \n }\n &:hover{\n .uf{\n visibility: visible;\n }\n }\n\n}\n\n"},{"example":,"title":" 按条件、值过滤","code":"/**\n*\n* @title 按条件、值过滤\n* @parent 列操作-过滤 Filter\n* @description 可以根据输入项目以及判断条件对表格内的数据进行过滤。可在控制台查看序列化后的参数字符串。\n* demo0701\n*/\n\nimport React, { Component } from 'react';\nimport { Table } from 'tinper-bee';\n\nconst columns26 = [\n { title: \"姓名\", width: 180, dataIndex: \"name\", key: \"name\", filterType: \"text\", filterDropdown: \"show\" },\n { title: \"年龄\", width: 150, dataIndex: \"age\", key: \"age\", filterType: \"dropdown\", filterDropdown: \"show\" },\n { title: \"日期\", width: 200, dataIndex: \"date\", key: \"date\", filterType: \"date\", filterDropdown: \"show\", format: \"YYYY-MM-DD\" },\n { title: \"居住地址\", width: 150, dataIndex: \"address\", key: \"address\", filterType: \"dropdown\", filterDropdown: \"show\" },\n { title: \"备注\", dataIndex: \"mark\", key: \"mark\" }\n];\n\nconst data26 = [\n {\n key: \"1\",\n name: \"John Brown\",\n age: 32,\n date: \"2018-09-19\",\n address: \"朝阳区\",\n mark: \"无\"\n },\n {\n key: \"2\",\n name: \"Jim Green\",\n age: 40,\n date: \"2018-09-18\",\n address: \"朝阳区\",\n mark: \"无\"\n },\n {\n key: \"3\",\n name: \"Jim Green\",\n age: 40,\n date: \"2018-09-18\",\n address: \"东城区\",\n mark: \"无\"\n },\n {\n key: \"4\",\n name: \"Jim Green\",\n age: 40,\n date: \"2018-09-18\",\n address: \"东城区\",\n mark: \"无\"\n }, {\n key: \"5\",\n name: \"John Brown\",\n age: 32,\n date: \"2018-09-18\",\n address: \"海淀区\",\n mark: \"无\"\n },\n {\n key: \"6\",\n name: \"Jim Green\",\n age: 48,\n date: \"2018-09-18\",\n address: \"海淀区\",\n mark: \"无\"\n },\n {\n key: \"7\",\n name: \"Jim Green\",\n age: 40,\n date: \"2018-09-18\",\n address: \"海淀区\",\n mark: \"无\"\n },\n {\n key: \"8\",\n name: \"Jim Green\",\n age: 38,\n date: \"2018-09-18\",\n address: \"海淀区\",\n mark: \"无\"\n }\n];\n\nclass Demo26 extends Component {\n handlerFilterChange = (key, val, condition) => {\n console.log('参数:key=', key, ' value=', val, 'condition=', condition);\n }\n\n handlerFilterClear = (key) => {\n console.log('清除条件', key);\n }\n render() {\n return ()\n onFilterClear={this.handlerFilterClear}//触发输入操作以及其他的回调(key,val)=>()\n filterDelay={500}//输入文本多少ms触发回调函数,默认300ms\n filterable={true}//是否开启过滤数据功能\n bordered\n columns={columns26}\n data={data26} />;\n }\n}\n\n","desc":" 可以根据输入项目以及判断条件对表格内的数据进行过滤。可在控制台查看序列化后的参数字符串。"},{"example":,"title":" 复杂表格中行过滤","code":"/**\n*\n* @title 复杂表格中行过滤\n* @parent 列操作-过滤 Filter\n* @description 在过滤数据行的基础上增加列拖拽、动态菜单显示、下拉条件动态传入自定义等\n* demo0702\n*/\n\n/**\n * @description \n */\n\nimport React, { Component } from 'react';\nimport {Icon,Checkbox,Dropdown,Menu} from \"tinper-bee\";\n\nimport { Table } from 'tinper-bee';\nimport multiSelect from \"tinper-bee/lib/multiSelect\";;\nimport sort from \"tinper-bee/lib/sort\";;\n\nconst SubMenu = Menu.SubMenu;\nconst MenuItemGroup = Menu.ItemGroup;\n\nconst data27 = [\n {\n key: \"1\",\n name: \"John Brown\",\n age: 32,\n date: \"2018-09-19\",\n address: \"朝阳区\",\n mark: \"无\"\n },\n {\n key: \"2\",\n name: \"Jim Green\",\n age: 40,\n date: \"2018-09-18\",\n address: \"朝阳区\",\n mark: \"无\"\n },\n {\n key: \"3\",\n name: \"Jim Green\",\n age: 40,\n date: \"2018-09-18\",\n address: \"东城区\",\n mark: \"无\"\n },\n {\n key: \"4\",\n name: \"Jim Green\",\n age: 40,\n date: \"2018-09-18\",\n address: \"东城区\",\n mark: \"无\"\n }, {\n key: \"5\",\n name: \"John Brown\",\n age: 32,\n date: \"2018-09-18\",\n address: \"海淀区\",\n mark: \"无\"\n },\n {\n key: \"6\",\n name: \"Jim Green\",\n age: 48,\n date: \"2018-09-18\",\n address: \"海淀区\",\n mark: \"无\"\n },\n {\n key: \"7\",\n name: \"Jim Green\",\n age: 40,\n date: \"2018-09-18\",\n address: \"海淀区\",\n mark: \"无\"\n },\n {\n key: \"8\",\n name: \"Jim Green\",\n age: 38,\n date: \"2018-09-18\",\n address: \"海淀区\",\n mark: \"无\"\n }\n];\n\n\nconst MultiSelectTable = multiSelect(Table, Checkbox);\nconst ComplexTable = sort(MultiSelectTable, Icon);\nclass Demo27 extends Component {\n constructor(props) {\n super(props);\n this.state = {\n dropdownvalue: []\n }\n }\n handlerFilterChange = (key, val, condition) => {\n console.log('参数:key=', key, ' value=', val, 'condition=', condition);\n }\n\n handlerFilterClear = (key) => {\n console.log('清除条件', key);\n }\n getSelectedDataFunc = data => {\n console.log(data);\n }\n onClick = (item) => {\n console.log(item);\n }\n\n render() {\n const menu1 = (\n )\n let multiObj = {\n type: \"checkbox\"\n };\n let columns27 = [\n {\n title: \"\", width: 40, dataIndex: \"key\", key: \"key\", render: (text, record, index) => {\n return \n \n \n }\n },\n {\n title: \"姓名\",\n width: 180,\n dataIndex: \"name\",\n key: \"name\",\n filterType: \"text\",//输入框类型\n filterDropdown: \"show\",//显示条件\n filterDropdownType: \"string\"//字符条件\n },\n {\n title: \"年龄\",\n width: 180,\n dataIndex: \"age\",\n key: \"age\",\n filterType: \"number\",//输入框类型\n filterDropdown: \"show\",//显示条件\n filterDropdownType: \"number\"//字符条件\n },\n {\n title: \"日期\",\n width: 190,\n dataIndex: \"date\",\n key: \"date\",\n filterType: \"date\",//输入框类型\n filterDropdown: \"show\",//显示条件\n filterDropdownType: \"string\"//字符条件\n },\n {\n title: \"时间范围\",\n width: 290,\n dataIndex: \"mark\",\n key: \"mark\",\n filterType: \"daterange\",//输入框类型\n filterDropdown: \"show\",//显示条件\n filterDropdownType: \"number\"//字符条件\n },\n {\n title: \"地址\",\n width: 100,\n dataIndex: \"address\",\n key: \"address\",\n filterType: \"dropdown\",//输入框类型\n filterDropdown: \"show\",//显示条件\n filterDropdownType: \"number\"//字符条件\n }\n ];\n return ()\n onFilterClear={this.handlerFilterClear}//触发输入操作以及其他的回调(key,val)=>()\n filterDelay={500}//输入文本多少ms触发回调函数,默认500ms\n filterable={true}//是否开启过滤数据功能\n getSelectedDataFunc={this.getSelectedDataFunc}\n bordered\n multiSelect={multiObj}\n columns={columns27}\n data={data27} />;\n }\n}\n\n","desc":" 在过滤数据行的基础上增加列拖拽、动态菜单显示、下拉条件动态传入自定义等"},{"example":,"title":" 列过滤面板","code":"/**\n*\n* @title 列过滤面板\n* @parent 列操作-隐藏 Hide\n* @description 点击表头右侧按钮,设置显示或隐藏表格列。可以自定义设置显示某列,通过ifshow属性控制,默认值为true(显示表格所有列)。afterFilter方法为列过滤后触发的回调函数。\n* demo0802\n*/\n\n\nimport React, { Component } from 'react';\nimport {Icon,Popover} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\nimport filterColumn from \"tinper-bee/lib/filterColumn\";;\nimport sum from \"tinper-bee/lib/sum\";;\n\nconst data = [\n { \n orderCode:\"NU0391025\", \n supplierName: \"xx供应商\",\n type_name: \"1\",\n purchasing:'组织c', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年03月18日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"执行中\",\n closeState_name:\"未关闭\",\n key: \"1\"\n }, \n { \n orderCode:\"NU0391026\", \n supplierName: \"xx供应商\",\n type_name: \"2\",\n purchasing:'组织a', \n purchasingGroup:\"bb\",\n voucherDate:\"2018年02月05日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"待确认\",\n closeState_name:\"未关闭\",\n key: \"2\"\n },\n { \n orderCode:\"NU0391027\", \n supplierName: \"xx供应商\",\n type_name: \"3\",\n purchasing:'组织b', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年07月01日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"终止\",\n closeState_name:\"已关闭\",\n key: \"3\"\n }\n];\n\nconst FilterColumnTable = filterColumn(Table, Popover, Icon);\n\nconst defaultProps21 = {\n prefixCls: \"bee-table\"\n};\n\nclass Demo21 extends Component {\n constructor(props) {\n super(props);\n this.state ={\n columns: [\n {\n title: \"序号\",\n dataIndex: \"index\",\n key: \"index\",\n width: 80, \n fixed: 'left',\n render(text, record, index){return index + 1}\n },\n {\n title: \"订单编号\",\n dataIndex: \"orderCode\",\n key: \"orderCode\",\n width: 100, \n fixed: 'left',\n },\n {\n title: \"供应商名称\",\n dataIndex: \"supplierName\",\n key: \"supplierName\",\n width: 150\n },\n {\n title: \"类型\",\n dataIndex: \"type_name\",\n key: \"type_name\",\n width: 100\n },\n {\n title: \"采购组织\",\n dataIndex: \"purchasing\",\n key: \"purchasing\",\n width: 100\n },\n ]};\n }\n afterFilter = (optData,columns)=>{\n if(optData.key == 'b'){\n if(optData.ifshow){\n columns[2].ifshow = false;\n }else{\n columns[2].ifshow = true;\n }\n this.setState({\n columns21 :columns,\n showFilterPopover:true\n });\n }\n \n }\n \n render() {\n return ;\n }\n}\n\nDemo21.defaultProps = defaultProps21;\n","desc":" 点击表头右侧按钮,设置显示或隐藏表格列。可以自定义设置显示某列,通过ifshow属性控制,默认值为true(显示表格所有列)。afterFilter方法为列过滤后触发的回调函数。"},{"example":,"title":" 列排序","code":"/**\n* @title 列排序\n* @parent 列操作-排序 Sort\n* @description column中增加sorter: (a, b) => a.c - b.c 这里的a,b代表前后两个数据,c代表比较当前对象的字段名称\n* demo0901\n*/\n\n\nimport React, { Component } from 'react';\nimport {Icon} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\nimport sort from \"tinper-bee/lib/sort.js\";;\n\nlet ComplexTable = sort(Table, Icon);\nconst columns11 = [\n {\n title: \"单据编号\",\n dataIndex: \"num\",\n key: \"num\",\n width: 120,\n fixed: \"left\"\n },\n {\n title: \"单据日期\",\n dataIndex: \"date\",\n key: \"date\",\n width: 200,\n },\n {\n title: \"供应商\",\n dataIndex: \"supplier\",\n key: \"supplier\",\n width: 100\n },\n {\n title: \"联系人\",\n dataIndex: \"contact\",\n key: \"contact\",\n },\n {\n title: \"整单数量\",\n dataIndex: \"total\",\n key: \"total\",\n width: 150,\n sorter: (a, b) => a.total - b.total\n }\n];\n\nconst data11 = [\n { num: \"NU0391001\", date: \"2019-03-01\", supplier: 'xx供应商',contact:'Tom', total:30 ,key: \"1\" },\n { num: \"NU0391002\", date: \"2018-11-02\", supplier: 'yy供应商',contact:'Jack', total:41 ,key: \"2\" },\n { num: \"NU0391003\", date: \"2019-05-03\", supplier: 'zz供应商',contact:'Jane', total:25 ,key: \"3\" }\n];\n\nconst defaultProps11 = {\n prefixCls: \"bee-table\"\n};\nclass Demo11 extends Component {\n constructor(props) {\n super(props);\n this.state = {\n sortOrder: \"\",\n data: data11\n };\n }\n render() {\n\n return ;\n }\n}\nDemo11.defaultProps = defaultProps11;\n\n\n","desc":" column中增加sorter: (a, b) => a.c - b.c 这里的a,b代表前后两个数据,c代表比较当前对象的字段名称"},{"example":,"title":" 后端列排序","code":"/**\n* @title 后端列排序\n* @parent 列操作-排序 Sort\n* @description 可在控制台中查看序列化后的参数字符串,将参数传递给后端即可进行列排序\n* demo0902\n*/\n\n\nimport React, { Component } from 'react';\nimport {Icon} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\nimport sort from \"tinper-bee/lib/sort.js\";;\nlet ComplexTable = sort(Table, Icon);\n\n// const columns11 = [\n// {\n// title: \"名字\",\n// dataIndex: \"a\",\n// key: \"a\",\n// width: 100\n// },\n// {\n// title: \"性别\",\n// dataIndex: \"b\",\n// key: \"b\",\n// width: 100\n// },\n// {\n// title: \"年龄\",\n// dataIndex: \"c\",\n// key: \"c\",\n// width: 200,\n// sorter: (a, b) => a.c - b.c\n// },\n// {\n// title: \"武功级别\",\n// dataIndex: \"d\",\n// key: \"d\"\n// },\n// {\n// title: \"分数\",\n// dataIndex: \"e\",\n// key: \"e\",\n// sorter: (a, b) => a.c - b.c\n// },\n// ];\n\n// const data11 = [\n// { a: \"杨过\", b: \"男\", c: 30,d:'内行', e:139,key: \"2\" },\n// { a: \"令狐冲\", b: \"男\", c: 41,d:'大侠', e:109, key: \"1\" },\n// { a: \"郭靖\", b: \"男\", c: 25,d:'大侠', e:159, key: \"3\" }\n// ];\nconst columns11 = [\n {\n title: \"单据编号\",\n dataIndex: \"num\",\n key: \"num\",\n width: 120,\n fixed: \"left\"\n },\n {\n title: \"单据日期\",\n dataIndex: \"date\",\n key: \"date\",\n width: 200,\n },\n {\n title: \"供应商\",\n dataIndex: \"supplier\",\n key: \"supplier\",\n width: 100\n },\n {\n title: \"联系人\",\n dataIndex: \"contact\",\n key: \"contact\",\n },\n {\n title: \"整单数量\",\n dataIndex: \"total\",\n key: \"total\",\n width: 150,\n sorter: (a, b) => a.total - b.total\n },\n {\n title: \"金额\",\n dataIndex: \"money\",\n key: \"money\",\n width: 100,\n sorter: (a, b) => a.money - b.money\n }\n];\n\nconst data11 = [\n { num: \"NU0391001\", date: \"2019-03-01\", supplier: 'xx供应商',contact:'Tom', total:30 ,money: 100,key: \"1\" },\n { num: \"NU0391002\", date: \"2018-11-02\", supplier: 'yy供应商',contact:'Jack', total:41 ,money: 50,key: \"2\" },\n { num: \"NU0391003\", date: \"2019-05-03\", supplier: 'zz供应商',contact:'Jane', total:25 ,money: 200,key: \"3\" }\n];\n\nconst defaultProps = {\n prefixCls: \"bee-table\"\n};\nclass Demo28 extends Component {\n constructor(props) {\n super(props);\n this.state = {\n sortOrder: \"\",\n data: data11\n };\n }\n /**\n * 后端获取数据\n */\n sortFun = (sortParam)=>{\n console.info(sortParam);\n //将参数传递给后端排序\n }\n render() {\n let sortObj = {\n mode:'multiple',\n backSource:true,\n sortFun:this.sortFun\n }\n return ;\n }\n}\nDemo28.defaultProps = defaultProps;\n\n\n","desc":" 可在控制台中查看序列化后的参数字符串,将参数传递给后端即可进行列排序"},{"example":,"title":" 多列排序","code":"/**\n *\n * @title 多列排序\n * @parent 列操作-排序 Sort\n * @description 结合多列排序、全选功能、合计功能的表格示例。新增排序后触发的回调函数sorterClick。\n * demo0903\n */\n\nimport React, { Component } from \"react\";\nimport {Checkbox,Button,Icon} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\nimport multiSelect from \"tinper-bee/lib/multiSelect.js\";;\nimport sort from \"tinper-bee/lib/sort.js\";;\nimport sum from \"tinper-bee/lib/sum.js\";;\n\nconst columns13 = [\n {\n title: \"订单编号\",\n dataIndex: \"a\",\n key: \"a\",\n className:'dfasd',\n width: 200\n },\n {\n title: \"金额\",\n dataIndex: \"b\",\n key: \"b\",\n width: 200,\n sumCol: true,\n sorter: (a, b) => a.c - b.c,\n sorterClick:(data,type)=>{//排序的回调函数\n //type value is up or down\n console.log(\"data\",data);\n }\n },\n {\n title: \"整单数量\",\n dataIndex: \"c\",\n key: \"c\",\n width: 200,\n sumCol: true,\n sorter: (a, b) => a.c - b.c,\n sorterClick:(data,type)=>{//排序的回调函数\n //type value is up or down\n console.log(\"data\",data);\n }\n },\n {\n title: \"日销售量\",\n dataIndex: \"e\",\n key: \"e\",\n width: 200,\n sumCol: true,\n sorter: (a, b) => a.c - b.c,\n },\n {\n title: \"供应商\",\n dataIndex: \"d\",\n key: \"d\",\n width: 200\n }\n];\n\nconst data13 = [\n { a: \"NU0391001\", b: 675, c: 30, d: \"xx供应商\",e:100, key: \"2\" },\n { a: \"NU0391002\", b: 43, c: 41, d: \"yy供应商\",e:90, key: \"1\" },\n { a: \"NU0391003\", b: 43, c: 81, d: \"zz供应商\", e:120,key: \"4\" },\n { a: \"NU0391004\", b: 43, c: 81, d: \"aa供应商\", e:130,key: \"5\" },\n { a: \"NU0391005\", b: 153, c: 25, d: \"bb供应商\",e:90, key: \"3\" }\n];\n\n\n//拼接成复杂功能的table组件不能在render中定义,需要像此例子声明在组件的外侧,不然操作state会导致功能出现异常\nlet ComplexTable = multiSelect(sort(sum(Table, Icon)), Checkbox);\n\nclass Demo13 extends Component {\n constructor(props) {\n super(props);\n this.state = {\n data13: data13,\n selectedRow: this.selectedRow,\n selectDisabled: this.selectDisabled\n };\n }\n getSelectedDataFunc = data => {\n console.log(data);\n };\n selectDisabled = (record, index) => {\n // console.log(record);\n if (index === 1) {\n return true;\n }\n return false;\n };\n selectedRow = (record, index) => {\n // console.log(record);\n if (index === 0) {\n return true;\n }\n return false;\n };\n onClick = () => {\n this.setState({\n selectedRow: function() {}\n });\n };\n\n render() {\n let multiObj = {\n type: \"checkbox\"\n };\n let sortObj = {\n mode:'multiple'\n }\n \n return (\n \n \n \n
\n );\n }\n}\n","desc":" 结合多列排序、全选功能、合计功能的表格示例。新增排序后触发的回调函数sorterClick。"},{"example":,"title":" 拖拽改变列顺序","code":"/**\n*\n* @title 拖拽改变列顺序\n* @parent 列操作-拖拽 Drag\n* @description 点击选择表头并左右拖拽,可以改变表格列顺序。onDrop方法是拖拽交换列后触发的回调函数。注意:固定列不可以交换。\n* demo1001\n*/\nimport React, { Component } from 'react';\nimport {Icon} from \"tinper-bee\";\n\nimport { Table } from 'tinper-bee'; \nimport dragColumn from \"tinper-bee/lib/dragColumn\";;\n\nconst columns = [\n {\n title: \"订单编号\",\n dataIndex: \"a\",\n key: \"a\",\n width: 100\n },\n {\n title: \"单据日期\",\n dataIndex: \"b\",\n key: \"b\",\n width: 200\n },\n {\n title: \"供应商\",\n dataIndex: \"c\",\n key: \"c\",\n width: 200,\n sumCol: true,\n sorter: (a, b) => a.c - b.c\n },\n {\n title: \"联系人\",\n dataIndex: \"d\",\n key: \"d\",\n width: 200,\n }\n];\n\nconst data = [\n { a: \"NU0391001\", b: \"2019-03-01\", c: 'xx供应商',d:'Tom', key: \"2\" },\n { a: \"NU0391002\", b: \"2018-11-02\", c: 'yy供应商',d:'Jack', key: \"1\" },\n { a: \"NU0391003\", b: \"2019-05-03\", c: 'zz供应商',d:'Jane', key: \"3\" }\n];\n\nconst DragColumnTable = dragColumn(Table);\n\nconst defaultProps22 = {\n prefixCls: \"bee-table\"\n};\n\nclass Demo22 extends Component {\n constructor(props) {\n super(props); \n }\n \n render() {\n return {\n console.log(\"--拖拽交换列后触发事件\");\n console.log(\"event.target:\",event.target);\n console.log(\"data:\",data);\n console.log(\"拖拽完成后的columns:\",columns);\n }}\n />;\n }\n}\n\nDemo22.defaultProps = defaultProps22;\n","desc":" 点击选择表头并左右拖拽,可以改变表格列顺序。onDrop方法是拖拽交换列后触发的回调函数。注意:固定列不可以交换。"},{"example":,"title":" 拖拽改变列宽度","code":"/**\n*\n* @title 拖拽改变列宽度\n* @parent 列操作-拖拽 Drag\n* @description onDropBorder方法为调整列宽后触发的回调函数。注:不支持tree结构的表头、合并表头的table。\n* demo1002\n*/\nimport React, { Component } from 'react';\nimport {Icon} from \"tinper-bee\";\n\nimport { Table } from 'tinper-bee'; \nimport dragColumn from \"tinper-bee/lib/dragColumn\";;\n\nconst columns23 = [\n {\n title: \"名字\",\n dataIndex: \"a\",\n key: \"a\",\n width: '200',\n fixed:'left'\n },\n {\n title: \"性别\",\n dataIndex: \"b\",\n key: \"b\",\n width: '600'\n },\n {\n title: \"年龄\",\n dataIndex: \"c\",\n key: \"c\",\n width: '200',\n sumCol: true,\n sorter: (a, b) => a.c - b.c\n }, \n {\n title: \"武功级别\",\n dataIndex: \"d\",\n key: \"d\",\n width: 500,\n }\n];\n\nconst data23 = [\n { a: \"杨过\", b: \"男\", c: 30,d:'内行', key: \"2\" },\n { a: \"令狐冲\", b: \"男\", c: 41,d:'大侠', key: \"1\" },\n { a: \"郭靖\", b: \"男\", c: 25,d:'大侠', key: \"31\" } , { a: \"杨过\", b: \"男\", c: 30,d:'内行', key: \"21\" },\n { a: \"令狐冲\", b: \"男\", c: 41,d:'大侠', key: \"11\" },\n { a: \"郭靖\", b: \"男\", c: 25,d:'大侠', key: \"32\" } , { a: \"杨过\", b: \"男\", c: 30,d:'内行', key: \"22\" },\n { a: \"令狐冲\", b: \"男\", c: 41,d:'大侠', key: \"12\" },\n { a: \"郭靖\", b: \"男\", c: 25,d:'大侠', key: \"3\" }\n];\n\nconst DragColumnTable = dragColumn(Table);\n\nconst defaultProps23 = {\n prefixCls: \"bee-table\"\n};\n\nclass Demo23 extends Component {\n constructor(props) {\n super(props); \n }\n\n render() {\n return {\n console.log(width+\"--调整列宽后触发事件\",e.target);\n }}\n />;\n }\n}\nDemo23.defaultProps = defaultProps23;\n\n\n","desc":" onDropBorder方法为调整列宽后触发的回调函数。注:不支持tree结构的表头、合并表头的table。"},{"example":,"title":" 嵌套子表格","code":"/**\n*\n* @title 嵌套子表格\n* @parent 扩展行 Expanded Row\n* @description 通过expandedRowRender参数来实现子表格\n* demo1101\n*/\n\nimport React, { Component } from \"react\";\nimport { Popconfirm } from 'tinper-bee';\nimport { Table } from 'tinper-bee';\nimport dragColumn from \"tinper-bee/lib/dragColumn\";;\nconst DragColumnTable = dragColumn(Table);\nconst columns16 = [\n {\n title: \"操作\",\n dataIndex: \"d\",\n key: \"d\", \n width:200,\n render(text, record, index) {\n return (\n \n \n 一些操作\n \n \n );\n }\n },\n { title: \"用户名\", dataIndex: \"a\", key: \"a\", width: 250 },\n { id: \"123\", title: \"性别\", dataIndex: \"b\", key: \"b\", width: 100 },\n { title: \"年龄\", dataIndex: \"c\", key: \"c\", width: 200 },\n \n];\nconst columns17 = [\n {\n title: \"操作\",\n dataIndex: \"d\",\n key: \"d\",\n width:200,\n render(text, record, index) {\n return (\n \n \n 一些操作\n \n \n );\n }\n },\n { title: \"用户名\", dataIndex: \"a\", key: \"a\", width: 100 },\n { id: \"123\", title: \"性别\", dataIndex: \"b\", key: \"b\", width: 100 },\n { title: \"年龄\", dataIndex: \"c\", key: \"c\", width: 200 },\n \n];\n\nconst data16 = [\n { a: \"令狐冲\", b: \"男\", c: 41, d: \"操作\", key: \"1\" },\n { a: \"杨过\", b: \"男\", c: 67, d: \"操作\", key: \"2\" },\n { a: \"郭靖\", b: \"男\", c: 25, d: \"操作\", key: \"3\" }\n];\n\n\nclass Demo16 extends Component {\n constructor(props){\n super(props);\n this.state={\n data_obj:{}\n }\n }\n expandedRowRender = (record, index, indent) => {\n let height = 42 * (this.state.data_obj[record.key].length+ 2);\n \n return (\n \n );\n };\n getData=(expanded, record)=>{\n //当点击展开的时候才去请求数据\n let new_obj = Object.assign({},this.state.data_obj);\n if(expanded){\n if(record.key==='1'){\n new_obj[record.key] = [\n { a: \"令狐冲\", b: \"男\", c: 41, d: \"操作\", key: \"1\" },\n { a: \"杨过\", b: \"男\", c: 67, d: \"操作\", key: \"2\" }\n ]\n this.setState({\n data_obj:new_obj\n })\n }else{\n new_obj[record.key] = [\n { a: \"令狐冲\", b: \"男\", c: 41, d: \"操作\", key: \"1\" }\n ]\n this.setState({\n data_obj:new_obj\n })\n }\n }\n }\n haveExpandIcon=(record, index)=>{\n //控制是否显示行展开icon,该参数只有在和expandedRowRender同时使用才生效\n if(index == 0){\n return true;\n }\n return false;\n }\n render() {\n return (\n \n );\n }\n}\n\n\n","desc":" 通过expandedRowRender参数来实现子表格"},{"example":,"title":" 树型表格数据展示","code":"/**\n*\n* @title 树型表格数据展示\n* @parent 扩展行 Expanded Row\n* @description 通过在data中配置children数据,来自动生成树形表格\n* demo1102\n*/\n\n\nimport React, { Component } from 'react';\nimport { Table } from 'tinper-bee';\n\n\nconst columns4 = [\n {\n title: \"Name\",\n dataIndex: \"name\",\n key: \"name\",\n width: \"40%\"\n },\n {\n title: \"Age\",\n dataIndex: \"age\",\n key: \"age\",\n width: \"30%\"\n },\n {\n title: \"Address\",\n dataIndex: \"address\",\n key: \"address\"\n }\n];\n\nconst data4 = [\n {\n key: 1,\n name: \"John Brown sr.\",\n age: 60,\n address: \"New York No. 1 Lake Park\",\n children: [\n {\n key: 11,\n name: \"John Brown\",\n age: 42,\n address: \"New York No. 2 Lake Park\"\n },\n {\n key: 12,\n name: \"John Brown jr.\",\n age: 30,\n address: \"New York No. 3 Lake Park\",\n children: [\n {\n key: 121,\n name: \"Jimmy Brown\",\n age: 16,\n address: \"New York No. 3 Lake Park\"\n }\n ]\n },\n {\n key: 13,\n name: \"Jim Green sr.\",\n age: 72,\n address: \"London No. 1 Lake Park\",\n children: [\n {\n key: 131,\n name: \"Jim Green\",\n age: 42,\n address: \"London No. 2 Lake Park\",\n children: [\n {\n key: 1311,\n name: \"Jim Green jr.\",\n age: 25,\n address: \"London No. 3 Lake Park\"\n },\n {\n key: 1312,\n name: \"Jimmy Green sr.\",\n age: 18,\n address: \"London No. 4 Lake Park\"\n }\n ]\n }\n ]\n }\n ]\n },\n {\n key: 2,\n name: \"Joe Black\",\n age: 32,\n address: \"Sidney No. 1 Lake Park\"\n }\n];\nclass Demo4 extends Component {\n\n constructor(props){\n super(props);\n this.state = {\n data: data4,\n factoryValue: 0,\n selectedRow: new Array(data4.length)//状态同步\n }\n }\n\n render() {\n return {\n if (this.state.selectedRow[index]) {\n return 'selected';\n } else {\n return '';\n }\n }}\n onRowClick={(record,index,indent)=>{\n let selectedRow = new Array(this.state.data.length);\n selectedRow[index] = true;\n this.setState({\n factoryValue: record,\n selectedRow: selectedRow\n });\n }}\n \n columns={columns4} data={data4} />;\n }\n}\n\n\n","desc":" 通过在data中配置children数据,来自动生成树形表格"},{"example":,"title":" 自定义表格标题、表尾、选中行颜色","code":"/**\r\n*\r\n* @title 自定义表格标题、表尾、选中行颜色\r\n* @parent 扩展行 Expanded Row\r\n* @description 可根据业务场景设置不同的`title`和`footer`。选中行颜色可用rowClassName作为选择器自定义css样式。\r\n* demo1103\r\n*/\r\n\r\nimport React, { Component } from \"react\";\r\nimport {Button,Tooltip,} from \"tinper-bee\";\r\n\r\nimport { Table } from 'tinper-bee';\r\n\r\nconst columns = [\r\n { title: \"员工编号\", dataIndex: \"a\", key: \"a\", width: 300, className: \"rowClassName\"},\r\n { title: \"员工姓名\", dataIndex: \"b\", key: \"b\", width: 500 },\r\n { title: \"性别\", dataIndex: \"c\", key: \"c\", width: 500 },\r\n { title: \"部门\", dataIndex: \"d\", key: \"d\", width: 200 }\r\n];\r\n\r\nconst data = [\r\n { a: \"ASVAL_201903280005\", b: \"小张\", c: \"男\", d: \"财务二科\", key: \"1\" },\r\n { a: \"ASVAL_201903200004\", b: \"小明\", c: \"男\", d: \"财务一科\", key: \"2\" },\r\n { a: \"ASVAL_201903120002\", b: \"小红\", c: \"女\", d: \"财务一科\", key: \"3\" }\r\n];\r\n\r\nclass Demo26 extends Component {\r\n\r\n constructor(props){\r\n super(props);\r\n this.state = {\r\n data: data,\r\n selectedRowIndex: 0\r\n }\r\n }\r\n\r\n render() {\r\n return (\r\n {\r\n if (this.state.selectedRowIndex == index) {\r\n return 'selected';\r\n } else {\r\n return '';\r\n }\r\n }}\r\n onRowClick={(record,index,indent)=>{\r\n this.setState({ \r\n selectedRowIndex: index\r\n });\r\n }}\r\n title={currentData => 员工信息统计表
}\r\n footer={currentData => 合计: 共{data.length}条数据
}\r\n /> \r\n );\r\n }\r\n}\r\n\r\n\r\n","desc":" 可根据业务场景设置不同的`title`和`footer`。选中行颜色可用rowClassName作为选择器自定义css样式。"},{"example":,"title":" 紧凑型、宽松型","code":"/**\n*\n* @title 紧凑型、宽松型\n* @parent 扩展行 Expanded Row\n* @description 设置`size`属性使用紧凑型表格(`sm`)或宽松型表格(`lg`)。\n* demo1105\n*/\n\nimport React, { Component } from \"react\";\nimport {Button,Tooltip,Tag} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n { title: \"订单编号\", dataIndex: \"orderNum\", key: \"orderNum\", width: 100 },\n { title: \"采购组织\", dataIndex: \"org\", key: \"org\", width: 200 },\n { title: \"供应商\", dataIndex: \"supplier\", key: \"supplier\", width: 100 },\n { title: \"订单日期\", dataIndex: \"orderDate\", key: \"orderDate\", width: 150 },\n { title: \"总数量\", dataIndex: \"quantity\", key: \"quantity\", width: 100 },\n { title: \"单据状态\", dataIndex: \"status\", key: \"status\", width: 100 },\n { title: \"提交人\", dataIndex: \"submitter\", key: \"submitter\", width: 100 },\n { title: \"单位\", dataIndex: \"unit\", key: \"unit\", width: 100 },\n { title: \"总税价合计\", dataIndex: \"sum\", key: \"sum\", width: 100 },\n];\n\nconst data = [\n { \n orderNum: \"NU0391025\", \n org: \"用友网络科技股份有限公司\", \n supplier: \"xx供应商\", \n orderDate: '2018年03月18日', \n quantity: '100.00', \n status: '错误', \n submitter: '小张', \n unit: 'pc', \n sum:'8,487.00', \n key: \"1\" \n },\n { \n orderNum: \"NU0391026\", \n org: \"用友网络科技股份有限公司\", \n supplier: \"xx供应商\", \n orderDate: '2018年02月05日', \n quantity: '91.00', \n status: '正常', \n submitter: '小红', \n unit: 'pc', \n sum:'675.00', \n key: \"2\" \n },\n { \n orderNum: \"NU0391027\", \n org: \"用友网络科技股份有限公司\", \n supplier: \"xx供应商\", \n orderDate: '2018年07月01日', \n quantity: '98.00', \n status: '异常', \n submitter: '小李', \n unit: 'pc', \n sum:'1,531.00', \n key: \"3\" \n }\n];\n\nclass Demo1 extends Component {\n render() {\n return (\n \n );\n }\n}\n\n\n","desc":" 设置`size`属性使用紧凑型表格(`sm`)或宽松型表格(`lg`)。"},{"example":,"title":" 自定义行高","code":"/**\n*\n* @title 自定义行高\n* @parent 扩展行 Expanded Row\n* @description 设置`height`属性自定义表体行高,设置`headerHeight`属性自定义表头高度。鼠标hover行时呼出操作按钮。\n* demo1106\n*/\n\nimport React, { Component } from \"react\";\nimport {Button,Tooltip} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n { title: \"员工编号\", dataIndex: \"a\", key: \"a\", width: 300, className: \"rowClassName\"},\n { title: \"员工姓名\", dataIndex: \"b\", key: \"b\", width: 500 },\n { title: \"性别\", dataIndex: \"c\", key: \"c\", width: 500 },\n { title: \"部门\", dataIndex: \"d\", key: \"d\", width: 200 }\n];\n\nconst data = [\n { a: \"ASVAL_201903280005\", b: \"小张\", c: \"男\", d: \"财务二科\", key: \"1\" },\n { a: \"ASVAL_201903200004\", b: \"小明\", c: \"男\", d: \"财务一科\", key: \"2\" },\n { a: \"ASVAL_201903120002\", b: \"小红\", c: \"女\", d: \"财务一科\", key: \"3\" }\n];\n\nclass Demo1 extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n data: data,\n selectedRowIndex: 0\n }\n }\n handleClick = () => {\n console.log('这是第' , this.currentIndex , '行');\n console.log('内容:' , this.currentRecord);\n }\n\n onRowHover=(index,record)=>{\n this.currentIndex = index;\n this.currentRecord = record;\n }\n\n getHoverContent=()=>{\n return
\n }\n\n render() {\n return (\n {\n this.setState({\n selectedRowIndex: index\n });\n }}\n />\n\n \n );\n }\n}\n\n\n","desc":" 设置`height`属性自定义表体行高,设置`headerHeight`属性自定义表头高度。鼠标hover行时呼出操作按钮。"},{"example":,"title":" 图片在表格中的展示","code":"/**\n*\n* @title 图片在表格中的展示\n* @parent 扩展行 Expanded Row\n* @description 根据图片高度自动撑开行高,可结合图片查看器使用 http://design.yonyoucloud.com/tinper-bee/bee-viewer\n* demo1107\n*/\n\nimport React, { Component } from \"react\";\nimport {Button,Tooltip} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n {\n title: \"序号\",\n dataIndex: \"index\",\n key: \"index\",\n width: 80,\n render(text, record, index) {\n return index + 1;\n }\n },\n {\n title: \"组织部门\",\n dataIndex: \"orgDept\",\n key: \"orgDept\",\n width: 100,\n },\n {\n title: \"设施管理部门\",\n dataIndex: \"facilityManageUnit\",\n key: \"facilityManageUnit\",\n width: 150,\n },\n {\n title: \"案卷编号\",\n dataIndex: \"docketnum\",\n key: \"docketnum\",\n width: 100,\n },\n {\n title: \"数量\",\n dataIndex: \"num\",\n key: \"num\",\n width: 100,\n },\n {\n title: \"首次发现时间\",\n dataIndex: \"discoveryTime\",\n key: \"discoveryTime\",\n width: 150,\n },\n {\n title: \"实际修复时间\",\n dataIndex: \"repairTime\",\n key: \"repairTime\",\n width: 150,\n },\n {\n title: \"图样\",\n dataIndex: \"picture\",\n key: \"picture\",\n render(text, record, index) {\n return \n }\n }\n];\n\nconst data = [\n { key: \"1\", orgDept: \"组织1\", facilityManageUnit: \"部门1\", docketnum: 41, num: \"1\", discoveryTime: \"2018-10-17\", repairTime: \"2018-10-30\", picture: \"http://design.yonyoucloud.com/static/bee.tinper.org-demo/swiper-demo-1-min.jpg\"},\n { key: \"2\", orgDept: \"组织2\", facilityManageUnit: \"部门2\", docketnum: 30, num: \"2\", discoveryTime: \"2019-01-15\", repairTime: \"2019-01-20\", picture: \"http://design.yonyoucloud.com/static/bee.tinper.org-demo/swiper-demo-2-min.jpg\"},\n { key: \"3\", orgDept: \"组织3\", facilityManageUnit: \"部门3\", docketnum: 35, num: \"3\", discoveryTime: \"2019-04-10\", repairTime: \"2019-04-17\", picture: \"http://design.yonyoucloud.com/static/bee.tinper.org-demo/swiper-demo-3-min.jpg\"}\n];\n\nclass Demo105 extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n data: data,\n selectedRowIndex: 0\n }\n }\n handleClick = () => {\n console.log('这是第' , this.currentIndex , '行');\n console.log('内容:' , this.currentRecord);\n }\n\n onRowHover=(index,record)=>{\n this.currentIndex = index;\n this.currentRecord = record;\n }\n\n getHoverContent=()=>{\n return
\n }\n\n render() {\n return (\n \n );\n }\n}\n\n\n","desc":" 根据图片高度自动撑开行高,可结合图片查看器使用 http://design.yonyoucloud.com/tinper-bee/bee-viewer"},{"example":,"title":" 自定义行、列合并","code":"/**\n*\n* @title 自定义行、列合并\n* @parent 扩展行 Expanded Row\n* @description 表头只支持列合并,使用 column 里的 colSpan 进行设置。表格支持行/列合并,使用 render 里的单元格属性 colSpan 或者 rowSpan 设值为 0 时,设置的表格不会渲染。\n* demo1108\n*/\n\nimport React, { Component } from \"react\";\nimport { Table } from 'tinper-bee';\n\nconst renderContent = (value, row, index) => {\n const obj = {\n children: value,\n props: {},\n };\n if (index === 4) {\n obj.props.colSpan = 0;\n }\n return obj;\n};\n\nconst columns = [{\n title: 'Name',\n key: \"name\",\n dataIndex: 'name',\n render: (text, row, index) => {\n if (index < 4) {\n return {text};\n }\n return {\n children: {text},\n props: {\n colSpan: 5,\n },\n };\n },\n}, {\n title: 'Age',\n key: \"Age\",\n dataIndex: 'age',\n render: renderContent,\n}, {\n title: 'Home phone',\n colSpan: 2,\n key: \"tel\",\n dataIndex: 'tel',\n render: (value, row, index) => {\n const obj = {\n children: value,\n props: {},\n };\n if (index === 2) {\n obj.props.rowSpan = 2;\n }\n if (index === 3) {\n obj.props.rowSpan = 0;\n }\n if (index === 4) {\n obj.props.colSpan = 0;\n }\n return obj;\n },\n}, {\n title: 'Phone',\n colSpan: 0,\n key: \"phone\",\n dataIndex: 'phone',\n render: renderContent,\n}, {\n title: 'Address',\n key: \"address\",\n dataIndex: 'address',\n render: renderContent,\n}];\n\nconst data = [{\n key: '1',\n name: 'John Brown',\n age: 32,\n tel: '0571-22098909',\n phone: 18889898989,\n address: 'New York No. 1 Lake Park',\n}, {\n key: '2',\n name: 'Jim Green',\n tel: '0571-22098333',\n phone: 18889898888,\n age: 42,\n address: 'London No. 1 Lake Park',\n}, {\n key: '3',\n name: 'Joe Black',\n age: 32,\n tel: '0575-22098909',\n phone: 18900010002,\n address: 'Sidney No. 1 Lake Park',\n}, {\n key: '4',\n name: 'Jim Red',\n age: 18,\n tel: '0575-22098909',\n phone: 18900010002,\n address: 'London No. 2 Lake Park',\n}, {\n key: '5',\n name: 'Jake White',\n age: 18,\n tel: '0575-22098909',\n phone: 18900010002,\n address: 'Dublin No. 2 Lake Park',\n}];\n\nclass Demo15 extends Component {\n render() {\n return (\n \n );\n }\n}\n\n\n\n","desc":" 表头只支持列合并,使用 column 里的 colSpan 进行设置。表格支持行/列合并,使用 render 里的单元格属性 colSpan 或者 rowSpan 设值为 0 时,设置的表格不会渲染。"},{"example":,"title":" 多选表格","code":"/**\r\n*\r\n* @title 多选表格\r\n* @parent 行操作-选择\r\n* @description 支持多选、全选和禁止选择。getSelectedDataFunc方法是选中行的回调函数,返回当前选中的数据数组。给data数据添加_checked参数可设置当前数据是否选中,添加_disabled参数可禁止选择当前数据。\r\n* demo1301\r\n*/\r\n\r\n\r\nimport React, { Component } from 'react';\r\nimport {Checkbox} from \"tinper-bee\";\r\n\r\nimport { Table } from 'tinper-bee';\r\nimport multiSelect from \"tinper-bee/lib/multiSelect.js\";;\r\n\r\nconst columns = [\r\n { title: \"员工编号\", dataIndex: \"a\", key: \"a\", width: 300, className: \"rowClassName\"},\r\n { title: \"员工姓名\", dataIndex: \"b\", key: \"b\", width: 500 },\r\n { title: \"性别\", dataIndex: \"c\", key: \"c\", width: 500 },\r\n { title: \"部门\", dataIndex: \"d\", key: \"d\", width: 200 }\r\n];\r\n\r\nconst data = [\r\n { a: \"ASVAL_201903280005\", b: \"小张\", c: \"男\", d: \"财务二科\", key: \"1\",_checked:true },\r\n { a: \"ASVAL_201903200004\", b: \"小明\", c: \"男\", d: \"财务一科\", key: \"2\",_checked:false },\r\n { a: \"ASVAL_201903120002\", b: \"小红\", c: \"女\", d: \"财务一科\", key: \"3\",_checked:false },\r\n { a: \"ASVAL_201903280010\", b: \"小王\", c: \"女\", d: \"财务二科\", key: \"4\",_disabled:true },\r\n { a: \"ASVAL_201903200021\", b: \"小李\", c: \"男\", d: \"财务一科\", key: \"5\",_checked:false}\r\n];\r\n//拼接成复杂功能的table组件不能在render中定义,需要像此例子声明在组件的外侧,不然操作state会导致功能出现异常\r\nlet MultiSelectTable = multiSelect(Table, Checkbox);\r\n\r\nclass Demo12 extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n data: data\r\n };\r\n }\r\n /**\r\n *@param selectedList:当前选中的行数据\r\n *@param record 当前操作行数据\r\n *@param index 当前操作行索引\r\n * @memberof Demo12\r\n */\r\n getSelectedDataFunc = (selectedList,record,index) => {\r\n console.log(\"selectedList\", selectedList,\"index\",index);\r\n // 如果在回调中增加setState逻辑,需要同步data中的_checked属性。即下面的代码\r\n // const allChecked = selectedList.length == 0?false:true;\r\n // record为undefind则为全选或者全不选\r\n // if(!record){\r\n // data12.forEach(item=>{\r\n // item._checked = allChecked;\r\n // })\r\n // }else{\r\n // data12[index]['_checked'] = record._checked;\r\n // } \r\n\r\n \r\n };\r\n \r\n render() {\r\n let multiObj = {\r\n type: \"checkbox\"\r\n };\r\n return (\r\n {\r\n if (record._checked) {\r\n return 'selected';\r\n } else {\r\n return '';\r\n }\r\n }}\r\n getSelectedDataFunc={this.getSelectedDataFunc}/>\r\n );\r\n }\r\n}\r\n\r\n","desc":" 支持多选、全选和禁止选择。getSelectedDataFunc方法是选中行的回调函数,返回当前选中的数据数组。给data数据添加_checked参数可设置当前数据是否选中,添加_disabled参数可禁止选择当前数据。"},{"example":,"title":" 万行以上数据渲染","code":"/**\n*\n* @title 万行以上数据渲染\n* @parent 无限滚动 Infinite-scroll\n* @description 万行数据渲染\n* demo1401\n*/\n\nimport React, { Component } from \"react\";\nimport {Tooltip} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\nimport BigData from \"tinper-bee/lib/bigData\";;\nconst BigDataTable = BigData(Table);\nconst columns = [\n {\n title:'序号',\n dataIndex:'index',\n width:'60',\n key:'index',\n render:(text,record,index)=>{\n return index\n }\n },\n {\n title: \"用户名\", dataIndex: \"a\", key: \"a\", width: 580, className: \"rowClassName\",\n render: (text, record, index) => {\n return (\n \n {text}\n \n );\n }\n },\n { id: \"123\", title: \"性别\", dataIndex: \"b\", key: \"b\", width: 80},\n { title: \"年龄\", dataIndex: \"c\", key: \"c\", width: 200 }\n\n];\n\nconst data = [ ...new Array(10000) ].map((e, i) => {\n const rs = { a: i + 'a', b: i + 'b', c: i + 'c', d: i + 'd', key: i };\n if(i%3==0){\n rs.b = '女';\n }\n return rs;\n })\n\n\nclass Demo30 extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n data: data,\n selectedRowIndex: 0\n }\n }\n\n render() {\n return (\n {\n console.log('currentIndex--'+index);\n }}\n />\n\n \n );\n }\n}\n\n","desc":" 万行数据渲染","scss_code":".big-data tr td {\n // height: 48px;\n}"},{"example":,"title":" 嵌套子表格滚动加载","code":"/**\n*\n* @title 嵌套子表格滚动加载\n* @parent 无限滚动 Infinite-scroll\n* @description 通过expandedRowRender参数来实现子表格\n* demo1402\n*/\n\nimport React, { Component } from \"react\";\nimport {Popconfirm} from 'tinper-bee';\nimport { Table } from 'tinper-bee';\nimport BigData from \"tinper-bee/lib/bigData\";;\nconst BigDataTable = BigData(Table);\nconst outColumns = [\n {\n title: \"操作\",\n dataIndex: \"d\",\n key: \"d\", \n width:200,\n render(text, record, index) {\n return (\n \n \n 一些操作\n \n \n );\n }\n },\n { title: \"用户名\", dataIndex: \"a\", key: \"a\", width: 250 },\n { id: \"123\", title: \"性别\", dataIndex: \"b\", key: \"b\", width: 100 },\n { title: \"年龄\", dataIndex: \"c\", key: \"c\", width: 200 },\n \n];\nconst innerColumns = [\n {\n title: \"操作\",\n dataIndex: \"d\",\n key: \"d\",\n width:200,\n render(text, record, index) {\n return (\n \n \n 一些操作\n \n \n );\n }\n },\n { title: \"用户名\", dataIndex: \"a\", key: \"a\", width: 100 },\n { id: \"123\", title: \"性别\", dataIndex: \"b\", key: \"b\", width: 100 },\n { title: \"年龄\", dataIndex: \"c\", key: \"c\", width: 200 },\n \n];\n\nconst data16 = [ ...new Array(10000) ].map((e, i) => {\n return { a: i + 'a', b: i + 'b', c: i + 'c', d: i + 'd', key: i };\n })\n\n\n\n\n\nclass Demo31 extends Component {\n constructor(props){\n super(props);\n this.state={\n data_obj:{\n 0:[\n { a: \"令狐冲\", b: \"男\", c: 41, d: \"操作\", key: \"1\" },\n { a: \"杨过\", b: \"男\", c: 67, d: \"操作\", key: \"2\" }\n ],\n 1: [\n { a: \"令狐冲\", b: \"男\", c: 41, d: \"操作\", key: \"1\" },\n { a: \"菲菲\", b: \"nv\", c: 67, d: \"操作\", key: \"2\" }\n ],\n }\n }\n }\n expandedRowRender = (record, index, indent) => {\n let height = 200;\n let innderData = [ ...new Array(100) ].map((e, i) => {\n return { a: index+\"-\"+ i + 'a', b: i + 'b', c: i + 'c', d: i + 'd', key: index+\"-\"+ i };\n })\n return (\n \n );\n };\n getData=(expanded, record)=>{\n //当点击展开的时候才去请求数据\n let new_obj = Object.assign({},this.state.data_obj);\n if(expanded){\n if(record.key==='1'){\n new_obj[record.key] = [\n { a: \"令狐冲\", b: \"男\", c: 41, d: \"操作\", key: \"1\" },\n { a: \"杨过\", b: \"男\", c: 67, d: \"操作\", key: \"2\" }\n ]\n this.setState({\n data_obj:new_obj\n })\n }else{\n new_obj[record.key] = [\n { a: \"令狐冲\", b: \"男\", c: 41, d: \"操作\", key: \"1\" },\n { a: \"菲菲\", b: \"nv\", c: 67, d: \"操作\", key: \"2\" }\n ]\n this.setState({\n data_obj:new_obj\n })\n }\n }\n }\n haveExpandIcon=(record, index)=>{\n //控制是否显示行展开icon,该参数只有在和expandedRowRender同时使用才生效\n if(index == 0){\n return true;\n }\n return false;\n }\n render() {\n return (\n \n );\n }\n}\n\n\n","desc":" 通过expandedRowRender参数来实现子表格"},{"example":,"title":" 多功能表格滚动加载","code":"/**\n*\n* @title 多功能表格滚动加载\n* @parent 无限滚动 Infinite-scroll\n* @description\n* demo1403\n*/\n\nimport React, { Component } from \"react\";\nimport {Tooltip,Checkbox,Icon,Popover} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\nimport BigData from \"tinper-bee/lib/bigData\";;\nimport multiSelect from \"tinper-bee/lib/multiSelect\";;\nimport filterColumn from \"tinper-bee/lib/filterColumn\";;\n\nlet ComplexTable = filterColumn(multiSelect(BigData(Table), Checkbox), Popover, Icon);\n\nconst columns = [\n {\n title:'序号',\n dataIndex:'index',\n width:'80',\n key:'index',\n render:(text,record,index)=>{\n return index\n }\n },\n {\n title: \"用户名\", dataIndex: \"a\", key: \"a\", width: 580, className: \"rowClassName\",\n render: (text, record, index) => {\n return (\n \n {text}\n \n );\n }\n },\n { id: \"123\", title: \"性别\", dataIndex: \"b\", key: \"b\", width: 80},\n { title: \"年龄\", dataIndex: \"c\", key: \"c\", width: 200 }\n];\n\nconst data = [ ...new Array(10000) ].map((e, i) => {\n const rs = { a: i + 'a', b: i + 'b', c: i + 'c', d: i + 'd', key: i };\n if(i%3==0){\n rs.b = '女';\n }\n return rs;\n })\n\n\nclass Demo32 extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n data: data,\n selectedRowIndex: 0\n }\n }\n getSelectedDataFunc = data => {\n console.log(data);\n };\n\n render() {\n return (\n {\n this.setState({\n selectedRowIndex: index\n });\n }}\n getSelectedDataFunc={this.getSelectedDataFunc}/>\n\n );\n }\n}\n\n\n","desc":""},{"example":,"title":" 层级树大数据场景","code":"/**\n* @title 层级树大数据场景\n* @parent 无限滚动 Infinite-scroll\n* @description\n* demo1404\n*/\nimport React, { Component } from \"react\";\nimport {Tooltip} from \"tinper-bee\";\n\nimport { Table } from 'tinper-bee';\nimport BigData from \"tinper-bee/lib/bigData\";;\nconst BigDataTable = BigData(Table);\nconst columns = [\n {\n title:'序号',\n dataIndex:'index',\n width:'150',\n key:'index',\n render:(text,record,index)=>{\n return index\n }\n },\n {\n title: \"用户名\", dataIndex: \"a\", key: \"a\", width: 580, className: \"rowClassName\",\n render: (text, record, index) => {\n return (\n \n {text}\n \n );\n }\n },\n { id: \"123\", title: \"性别\", dataIndex: \"b\", key: \"b\", width: 80},\n { title: \"年龄\", dataIndex: \"c\", key: \"c\", width: 200 }\n];\n\nconst data = [ ...new Array(1000) ].map((e, i) => {\n const rs = { a: i + 'a', b: i + 'b', c: i + 'c', d: i + 'd', key: i };\n if(i%3==0){\n rs.b = '女';\n rs.children = [];\n for(let subi=0;subi<3;subi++){\n rs.children.push({a: i +subi + 'asub', b: i +subi + 'bsub', c: i + subi +'csub', d: i + subi +'dsub', key: i+ `${subi} sub`});\n }\n }else{\n rs.children = [];\n for(let subi=0;subi<3;subi++){\n rs.children.push({a: i +subi + 'asub', b: i +subi + 'bsub', c: i + subi +'csub', d: i + subi +'dsub', key: i+ `${subi} sub`});\n }\n }\n return rs;\n })\n\n\nclass Demo34 extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n data: data,\n selectedRowIndex: 0\n }\n }\n onExpandedRowsChange = (params)=>{\n console.log(params);\n }\n onExpand = (expandKeys)=>{\n console.log('expand---'+expandKeys);\n }\n render() {\n return (\n {\n console.log('currentIndex--'+index);\n }}\n />\n\n \n );\n }\n}\n\n","desc":""},{"example":,"title":" 表格+分页","code":"/**\n * @title 表格+分页\n * @parent 分页 Pagination\n * @description 点击分页联动表格\n * demo1601\n */\n\nimport React, { Component } from \"react\";\nimport {Pagination} from \"tinper-bee\";\n\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n { title: \"员工编号\", dataIndex: \"a\", key: \"a\", width: 300, className: \"rowClassName\"},\n { title: \"员工姓名\", dataIndex: \"b\", key: \"b\", width: 500 },\n { title: \"性别\", dataIndex: \"c\", key: \"c\", width: 500 },\n { title: \"部门\", dataIndex: \"d\", key: \"d\", width: 200 }\n];\n\nconst pageData = {\n 1: [\n { a: \"ASVAL_201903280005\", b: \"小张\", c: \"男\", d: \"财务二科\", key: \"1\" },\n { a: \"ASVAL_201903200004\", b: \"小明\", c: \"男\", d: \"财务一科\", key: \"2\" },\n { a: \"ASVAL_201903120002\", b: \"小红\", c: \"女\", d: \"财务一科\", key: \"3\" }\n ],\n 2: [\n { a: \"ASVAL_201903280010\", b: \"小王\", c: \"女\", d: \"财务二科\", key: \"4\" },\n { a: \"ASVAL_201903200021\", b: \"小李\", c: \"男\", d: \"财务一科\", key: \"5\" },\n ]\n};\n\nclass Demo8 extends Component {\n constructor(props) {\n super(props);\n this.state = {\n data: pageData[1],\n activePage: 1\n };\n }\n\n handleSelect(eventKey) {\n this.setState({\n data: pageData[eventKey],\n activePage: eventKey\n });\n }\n\n render() {\n return (\n \n );\n }\n}\n\n","desc":" 点击分页联动表格","scss_code":".demo8{\n .u-table {\n margin-bottom: 11px;\n }\n .u-pagination{\n display: flex;\n align-items: center;\n justify-content: center;\n }\n}"},{"example":,"title":" 表格+搜索","code":"/**\n *\n * @title 表格+搜索\n * @parent 搜索 search\n * @description 搜索刷新表格数据\n * demo1602\n */\n\nimport React, { Component } from \"react\";\nimport {Icon,FormControl,InputGroup} from \"tinper-bee\";\n\nimport { Table } from 'tinper-bee';\n\nclass Search extends Component {\n state = {\n searchValue: \"\",\n empty: false\n };\n\n /**\n * 搜索\n */\n handleSearch = () => {\n let { onSearch } = this.props;\n this.setState({\n empty: true\n });\n onSearch && onSearch(this.state.searchValue);\n };\n\n /**\n * 捕获回车\n * @param e\n */\n handleKeyDown = e => {\n if (e.keyCode === 13) {\n this.handleSearch();\n }\n };\n\n /**\n * 输入框改变\n * @param e\n */\n handleChange = (e) => {\n this.setState({\n searchValue: e\n });\n };\n\n /**\n * 清空输入框\n */\n emptySearch = () => {\n let { onEmpty } = this.props;\n this.setState({\n searchValue: \"\",\n empty: false\n });\n onEmpty && onEmpty();\n };\n\n render() {\n return (\n \n \n {this.state.empty ? (\n \n ) : null}\n\n \n \n \n \n );\n }\n}\n\nconst columns = [\n { title: \"员工编号\", dataIndex: \"a\", key: \"a\", width: 300, className: \"rowClassName\"},\n { title: \"员工姓名\", dataIndex: \"b\", key: \"b\", width: 500 },\n { title: \"性别\", dataIndex: \"c\", key: \"c\", width: 500 },\n { title: \"部门\", dataIndex: \"d\", key: \"d\", width: 200 }\n];\n\nconst userData = [\n { a: \"ASVAL_201903280005\", b: \"小张\", c: \"男\", d: \"财务二科\", key: \"1\" },\n { a: \"ASVAL_201903200004\", b: \"小明\", c: \"男\", d: \"财务一科\", key: \"2\" },\n { a: \"ASVAL_201903120002\", b: \"小红\", c: \"女\", d: \"财务一科\", key: \"3\" }\n];\n\nclass Demo9 extends Component {\n constructor(props) {\n super(props);\n this.state = {\n data: userData\n };\n }\n\n handleSearch = value => {\n if (value === \"\") {\n return this.setState({\n data: userData\n });\n }\n let regExp = new RegExp(value, \"ig\");\n let data = userData.filter(item => regExp.test(item.a));\n this.setState({\n data\n });\n };\n\n handleEmpty = () => {\n this.setState({\n data: userData\n });\n };\n\n render() {\n return (\n \n );\n }\n}\n\n\n","desc":" 搜索刷新表格数据"}]
+var Demo0101 = require("./demolist/Demo0101");var Demo0102 = require("./demolist/Demo0102");var Demo0103 = require("./demolist/Demo0103");var Demo0104 = require("./demolist/Demo0104");var Demo0105 = require("./demolist/Demo0105");var Demo0106 = require("./demolist/Demo0106");var Demo0201 = require("./demolist/Demo0201");var Demo0202 = require("./demolist/Demo0202");var Demo0301 = require("./demolist/Demo0301");var Demo0302 = require("./demolist/Demo0302");var Demo0402 = require("./demolist/Demo0402");var Demo0404 = require("./demolist/Demo0404");var Demo0405 = require("./demolist/Demo0405");var Demo0502 = require("./demolist/Demo0502");var Demo0601 = require("./demolist/Demo0601");var Demo0602 = require("./demolist/Demo0602");var Demo0603 = require("./demolist/Demo0603");var Demo0701 = require("./demolist/Demo0701");var Demo0702 = require("./demolist/Demo0702");var Demo0802 = require("./demolist/Demo0802");var Demo0901 = require("./demolist/Demo0901");var Demo0902 = require("./demolist/Demo0902");var Demo0903 = require("./demolist/Demo0903");var Demo1001 = require("./demolist/Demo1001");var Demo1002 = require("./demolist/Demo1002");var Demo1101 = require("./demolist/Demo1101");var Demo1102 = require("./demolist/Demo1102");var Demo1103 = require("./demolist/Demo1103");var Demo1105 = require("./demolist/Demo1105");var Demo1106 = require("./demolist/Demo1106");var Demo1107 = require("./demolist/Demo1107");var Demo1108 = require("./demolist/Demo1108");var Demo1301 = require("./demolist/Demo1301");var Demo1401 = require("./demolist/Demo1401");var Demo1402 = require("./demolist/Demo1402");var Demo1403 = require("./demolist/Demo1403");var Demo1404 = require("./demolist/Demo1404");var Demo1601 = require("./demolist/Demo1601");var DemoArray = [{"example":,"title":" 基本表格","code":"/**\n*\n* @title 基本表格\n* @parent 基础 Basic\n* @description 单元格数据过长时,可结合Tooltip组件使用。\n* demo0101\n*/\n\nimport React, { Component } from \"react\";\nimport {Button,Tooltip} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n {\n title: \"员工编号\", dataIndex: \"a\", key: \"a\", width: 120, className: \"rowClassName\",\n fixed:'left',\n render: (text, record, index) => {\n return (\n \n {text}\n \n );\n }\n },\n { title: \"员工姓名\", dataIndex: \"b\", key: \"b\", width:100 },\n { title: \"性别\", dataIndex: \"c\", key: \"c\", width: 100 },\n { title: \"部门\", dataIndex: \"d\", key: \"d\", width: 100 },\n { title: \"职级\", dataIndex: \"e\", key: \"e\", width: 100 }\n];\n\nconst data = [\n { a: \"ASVAL_201903280005\", b: \"小张\", c: \"男\", d: \"财务二科\", e: \"M1\", key: \"1\" },\n { a: \"ASVAL_201903200004\", b: \"小明\", c: \"男\", d: \"财务一科\", e: \"T1\", key: \"2\" },\n { a: \"ASVAL_201903120002\", b: \"小红\", c: \"女\", d: \"财务一科\", e: \"T2\", key: \"3\" }\n];\n\nclass Demo01 extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n data: data\n }\n }\n handleClick = () => {\n console.log('这是第' , this.currentIndex , '行');\n console.log('内容:' , this.currentRecord);\n }\n\n render() {\n return (\n \n );\n }\n}\n\n\n","desc":" 单元格数据过长时,可结合Tooltip组件使用。"},{"example":,"title":" 默认无数据展示","code":"/**\r\n*\r\n* @title 默认无数据展示\r\n* @parent 基础 Basic\r\n* @description 无数据时默认展示图标,可在`emptyText`方法中自定义展示内容。\r\n* demo0102\r\n*/\r\n\r\n\r\nimport React, { Component } from 'react';\r\nimport { Table, Icon } from 'tinper-bee';\r\n\n\r\nconst columns02 = [\r\n {\r\n title: \"员工编号\",\r\n dataIndex: \"num\",\r\n key: \"num\",\r\n width: \"40%\"\r\n },\r\n {\r\n title: \"员工姓名\",\r\n dataIndex: \"name\",\r\n key: \"name\",\r\n width: \"30%\"\r\n },\r\n {\r\n title: \"部门\",\r\n dataIndex: \"department\",\r\n key: \"department\"\r\n }\r\n];\r\n \r\nconst data02 = [];\r\n\r\n// 在此自定义无数据时的展示内容\r\nconst emptyFunc = () => 'No Data';\r\n \r\nclass Demo02 extends Component {\r\n render() {\r\n return (\r\n \r\n )\r\n }\r\n}\r\n\r\n","desc":" 无数据时默认展示图标,可在`emptyText`方法中自定义展示内容。"},{"example":,"title":" 固定表头","code":"/**\r\n*\r\n* @title 固定表头\r\n* @parent 基础 Basic\r\n* @description 设置`scroll.y`指定滚动区域的高度,达到固定表头效果\r\n* demo0103\r\n*/\r\n\r\nimport React, { Component } from 'react';\r\nimport { Table } from 'tinper-bee';\r\n\r\nconst columns03 = [\r\n {\r\n title: \"序号\",\r\n dataIndex: \"index\",\r\n key: \"index\",\r\n width: 80, \r\n render(text, record, index) {\r\n return index + 1;\r\n }\r\n },\r\n {\r\n title: \"订单编号\",\r\n dataIndex: \"orderCode\",\r\n key: \"orderCode\",\r\n width: 200, \r\n },\r\n {\r\n title: \"供应商名称\",\r\n dataIndex: \"supplierName\",\r\n key: \"supplierName\",\r\n width: 200\r\n },\r\n {\r\n title: \"类型\",\r\n dataIndex: \"type_name\",\r\n key: \"type_name\",\r\n width: 200\r\n },\r\n {\r\n title: \"采购组织\",\r\n dataIndex: \"purchasing\",\r\n key: \"purchasing\",\r\n width: 200\r\n },\r\n {\r\n title: \"采购组\",\r\n dataIndex: \"purchasingGroup\",\r\n key: \"purchasingGroup\",\r\n width: 200\r\n },\r\n {\r\n title: \"凭证日期\",\r\n dataIndex: \"voucherDate\",\r\n key: \"voucherDate\",\r\n width: 200,\r\n },\r\n {\r\n title: \"审批状态\",\r\n dataIndex: \"approvalState_name\",\r\n key: \"approvalState_name\",\r\n width: 200\r\n },\r\n {\r\n title: \"确认状态\",\r\n dataIndex: \"confirmState_name\",\r\n key: \"confirmState_name\",\r\n width: 200\r\n }, \r\n {\r\n title: \"关闭状态\",\r\n dataIndex: \"closeState_name\",\r\n key: \"closeState_name\",\r\n width: 100\r\n }\r\n];\r\n\r\nconst data03 = [\r\n { \r\n orderCode:\"NU0391025\", \r\n supplierName: \"xx供应商\",\r\n type_name: \"1\",\r\n purchasing:'组织c', \r\n purchasingGroup:\"aa\",\r\n voucherDate:\"2018年03月18日\",\r\n approvalState_name:\"已审批\",\r\n confirmState_name:\"执行中\",\r\n closeState_name:\"未关闭\",\r\n key: \"1\"\r\n }, \r\n { \r\n orderCode:\"NU0391026\", \r\n supplierName: \"xx供应商\",\r\n type_name: \"2\",\r\n purchasing:'组织a', \r\n purchasingGroup:\"bb\",\r\n voucherDate:\"2018年02月05日\",\r\n approvalState_name:\"已审批\",\r\n confirmState_name:\"待确认\",\r\n closeState_name:\"未关闭\",\r\n key: \"2\"\r\n },\r\n { \r\n orderCode:\"NU0391027\", \r\n supplierName: \"xx供应商\",\r\n type_name: \"3\",\r\n purchasing:'组织b', \r\n purchasingGroup:\"aa\",\r\n voucherDate:\"2018年07月01日\",\r\n approvalState_name:\"已审批\",\r\n confirmState_name:\"终止\",\r\n closeState_name:\"已关闭\",\r\n key: \"3\"\r\n },\r\n { \r\n orderCode:\"NU0391028\", \r\n supplierName: \"xx供应商\",\r\n type_name: \"4\",\r\n purchasing:'组织c', \r\n purchasingGroup:\"cc\",\r\n voucherDate:\"2019年03月01日\",\r\n approvalState_name:\"未审批\",\r\n confirmState_name:\"待确认\",\r\n closeState_name:\"未关闭\",\r\n key: \"4\"\r\n },\r\n { \r\n orderCode:\"NU0391029\", \r\n supplierName: \"xx供应商\",\r\n type_name: \"5\",\r\n purchasing:'组织d', \r\n purchasingGroup:\"ss\",\r\n voucherDate:\"2019年02月14日\",\r\n approvalState_name:\"未审批\",\r\n confirmState_name:\"待确认\",\r\n closeState_name:\"未关闭\",\r\n key: \"5\"\r\n },\r\n { \r\n orderCode:\"NU0391030\", \r\n supplierName: \"xx供应商\",\r\n type_name: \"1\",\r\n purchasing:'组织e', \r\n purchasingGroup:\"zz\",\r\n voucherDate:\"2019年02月18日\",\r\n approvalState_name:\"已审批\",\r\n confirmState_name:\"终止\",\r\n closeState_name:\"已关闭\",\r\n key: \"6\"\r\n },\r\n { \r\n orderCode:\"NU0391031\", \r\n supplierName: \"xx供应商\",\r\n type_name: \"2\",\r\n purchasing:'组织f', \r\n purchasingGroup:\"qq\",\r\n voucherDate:\"2019年01月01日\",\r\n approvalState_name:\"已审批\",\r\n confirmState_name:\"执行中\",\r\n closeState_name:\"未关闭\",\r\n key: \"7\"\r\n },\r\n { \r\n orderCode:\"NU0391032\", \r\n supplierName: \"xx供应商\",\r\n type_name: \"3\",\r\n purchasing:'组织g', \r\n purchasingGroup:\"pp\",\r\n voucherDate:\"2019年01月31日\",\r\n approvalState_name:\"未审批\",\r\n confirmState_name:\"待确认\",\r\n closeState_name:\"未关闭\",\r\n key: \"8\"\r\n },\r\n];\r\n\r\nclass Demo03 extends Component {\r\n render() {\r\n return ;\r\n }\r\n}\r\n\r\n","desc":" 设置`scroll.y`指定滚动区域的高度,达到固定表头效果"},{"example":,"title":" 隔行换色","code":"/**\n*\n* @title 隔行换色\n* @parent 基础 Basic\n* @description 可自定义斑马线颜色\n* demo0104\n*/\n\n\nimport React, { Component } from 'react';\nimport { Table } from 'tinper-bee';\n\nconst columns04 = [\n {title: \"序号\",dataIndex: \"index\",key: \"index\",width: 80, \n render(text, record, index) {\n return index + 1;\n }\n },\n {title: \"订单编号\",dataIndex: \"orderCode\",key: \"orderCode\",width: 200},\n {title: \"供应商名称\",dataIndex: \"supplierName\",key: \"supplierName\",width: 200},\n {title: \"类型\",dataIndex: \"type_name\",key: \"type_name\",width: 200},\n {title: \"采购组织\",dataIndex: \"purchasing\",key: \"purchasing\",width: 200},\n {title: \"采购组\",dataIndex: \"purchasingGroup\",key: \"purchasingGroup\",width: 200},\n {title: \"凭证日期\",dataIndex: \"voucherDate\",key: \"voucherDate\",width: 200}\n];\n\nconst data04 = [\n { \n orderCode:\"NU0391025\", \n supplierName: \"xx供应商\",\n type_name: \"1\",\n purchasing:'组织c', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年03月18日\",\n key: \"1\"\n }, \n { \n orderCode:\"NU0391026\", \n supplierName: \"xx供应商\",\n type_name: \"2\",\n purchasing:'组织a', \n purchasingGroup:\"bb\",\n voucherDate:\"2018年02月05日\",\n key: \"2\"\n },\n { \n orderCode:\"NU0391027\", \n supplierName: \"xx供应商\",\n type_name: \"3\",\n purchasing:'组织b', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年07月01日\",\n key: \"3\"\n },\n { \n orderCode:\"NU0391028\", \n supplierName: \"xx供应商\",\n type_name: \"4\",\n purchasing:'组织c', \n purchasingGroup:\"cc\",\n voucherDate:\"2019年03月01日\",\n key: \"4\"\n },\n { \n orderCode:\"NU0391029\", \n supplierName: \"xx供应商\",\n type_name: \"5\",\n purchasing:'组织d', \n purchasingGroup:\"ss\",\n voucherDate:\"2019年02月14日\",\n key: \"5\"\n },\n { \n orderCode:\"NU0391030\", \n supplierName: \"xx供应商\",\n type_name: \"1\",\n purchasing:'组织e', \n purchasingGroup:\"zz\",\n voucherDate:\"2019年02月18日\",\n key: \"6\"\n },\n { \n orderCode:\"NU0391031\", \n supplierName: \"xx供应商\",\n type_name: \"2\",\n purchasing:'组织f', \n purchasingGroup:\"qq\",\n voucherDate:\"2019年01月01日\",\n key: \"7\"\n },\n { \n orderCode:\"NU0391032\", \n supplierName: \"xx供应商\",\n type_name: \"3\",\n purchasing:'组织g', \n purchasingGroup:\"pp\",\n voucherDate:\"2019年01月31日\",\n key: \"8\"\n },\n];\n\nclass Demo04 extends Component {\n render() {\n return \n }\n}\n\n","desc":" 可自定义斑马线颜色","scss_code":".demo04 {\n &.u-table tr:nth-child(2n){\n background: #f7f9fb;\n }\n &.u-table tr.u-table-row-hover, .u-table tr:hover{\n background: #ebecf0;\n }\n}"},{"example":,"title":" 表格 Loading 加载","code":"/**\r\n*\r\n* @title 表格 Loading 加载\r\n* @parent 基础 Basic\r\n* @description loading可以传boolean或者object对象,object为bee-loading组件的参数类型\r\n* demo0105\r\n*/\r\n\r\nimport React, { Component } from \"react\";\r\nimport { Table } from 'tinper-bee';\r\nimport {Button,Tooltip} from \"tinper-bee\";\r\n\r\nconst columns05 = [\r\n { title: \"员工编号\", dataIndex: \"a\", key: \"a\", width: 300, className: \"rowClassName\",fixed:'left'},\r\n { title: \"员工姓名\", dataIndex: \"b\", key: \"b\", width: 500 },\r\n { title: \"性别\", dataIndex: \"c\", key: \"c\", width: 500 },\r\n { title: \"部门\", dataIndex: \"d\", key: \"d\", width: 200 }\r\n];\r\n\r\nconst data05 = [\r\n { a: \"ASVAL_201903280005\", b: \"小张\", c: \"男\", d: \"财务二科\", key: \"1\" },\r\n { a: \"ASVAL_201903200004\", b: \"小明\", c: \"男\", d: \"财务一科\", key: \"2\" },\r\n { a: \"ASVAL_201903120002\", b: \"小红\", c: \"女\", d: \"财务一科\", key: \"3\" }\r\n];\r\n\r\nclass Demo05 extends Component {\r\n constructor(props){\r\n super(props);\r\n this.state = {\r\n loading : true\r\n }\r\n }\r\n changeLoading = () => {\r\n this.setState({\r\n loading : !this.state.loading\r\n })\r\n }\r\n render() {\r\n return (\r\n \r\n
\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\n\r\n","desc":" loading可以传boolean或者object对象,object为bee-loading组件的参数类型"},{"example":,"title":" 单元格内容居中","code":"/**\n*\n* @title 单元格内容居中\n* @parent 基础 Basic\n* @description 在columns数据中设置`textAlign:'center'`,可实现单元格内容居中展示的效果。默认是居左显示。\n* demo0106\n*/\n\nimport React, { Component } from \"react\";\nimport {Button,Tooltip} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n {\n title: \"员工编号\", dataIndex: \"a\", key: \"a\", width: 120, className: \"rowClassName\",\n fixed:'left',\n textAlign:'center',\n render: (text, record, index) => {\n return (\n \n {text}\n \n );\n }\n },\n { title: \"员工姓名\", dataIndex: \"b\", key: \"b\", width:100,textAlign:'center'},\n { title: \"性别\", dataIndex: \"c\", key: \"c\", width: 100,textAlign:'center'},\n { title: \"部门\", dataIndex: \"d\", key: \"d\", width: 100,textAlign:'center' },\n { title: \"职级\", dataIndex: \"e\", key: \"e\", width: 100,textAlign:'center' }\n];\n\nconst data = [\n { a: \"ASVAL_201903280005\", b: \"小张\", c: \"男\", d: \"财务二科\", e: \"M1\", key: \"1\" },\n { a: \"ASVAL_201903200004\", b: \"小明\", c: \"男\", d: \"财务一科\", e: \"T1\", key: \"2\" },\n { a: \"ASVAL_201903120002\", b: \"小红\", c: \"女\", d: \"财务一科\", e: \"T2\", key: \"3\" }\n];\n\nclass Demo06 extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n data: data\n }\n }\n handleClick = () => {\n console.log('这是第' , this.currentIndex , '行');\n console.log('内容:' , this.currentRecord);\n }\n\n render() {\n return (\n \n );\n }\n}\n\n\n","desc":" 在columns数据中设置`textAlign:'center'`,可实现单元格内容居中展示的效果。默认是居左显示。"},{"example":,"title":" 横向滚动条","code":"/**\n*\n* @title 横向滚动条\n* @parent 滚动 Scroll View\n* @description 设置`scroll`属性支持横向或纵向滚动,x的取值可以是:正整数(自动转为相应的像素值)、百分比(相对于表格真实宽度的百分比,大于100%时会出现滚动条)、布尔值。y的取值是正整数。\n* demo0201\n*/\n\nimport React, { Component } from \"react\";\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n {\n title: \"序号\",\n dataIndex: \"index\",\n key: \"index\",\n width: 100, \n render(text, record, index) {\n return index + 1;\n }\n },\n {\n title: \"订单编号\",\n dataIndex: \"orderCode\",\n key: \"orderCode\",\n width: 300, \n },\n {\n title: \"供应商名称\",\n dataIndex: \"supplierName\",\n key: \"supplierName\",\n width: 200\n },\n {\n title: \"类型\",\n dataIndex: \"type_name\",\n key: \"type_name\",\n width: 200\n },\n {\n title: \"采购组织\",\n dataIndex: \"purchasing\",\n key: \"purchasing\",\n width: 200\n },\n {\n title: \"采购组\",\n dataIndex: \"purchasingGroup\",\n key: \"purchasingGroup\",\n width: 200\n },\n {\n title: \"凭证日期\",\n dataIndex: \"voucherDate\",\n key: \"voucherDate\",\n width: 300,\n },\n {\n title: \"审批状态\",\n dataIndex: \"approvalState_name\",\n key: \"approvalState_name\",\n width: 200\n },\n {\n title: \"确认状态\",\n dataIndex: \"confirmState_name\",\n key: \"confirmState_name\",\n width: 200\n }, \n {\n title: \"关闭状态\",\n dataIndex: \"closeState_name\",\n key: \"closeState_name\",\n width: 100\n }\n];\n \nconst data = [\n { \n orderCode:\"NU0391025\", \n supplierName: \"xx供应商\",\n type_name: \"1\",\n purchasing:'组织c', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年03月18日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"执行中\",\n closeState_name:\"未关闭\",\n key: \"1\"\n }, \n { \n orderCode:\"NU0391026\", \n supplierName: \"xx供应商\",\n type_name: \"2\",\n purchasing:'组织a', \n purchasingGroup:\"bb\",\n voucherDate:\"2018年02月05日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"待确认\",\n closeState_name:\"未关闭\",\n key: \"2\"\n },\n { \n orderCode:\"NU0391027\", \n supplierName: \"xx供应商\",\n type_name: \"3\",\n purchasing:'组织b', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年07月01日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"终止\",\n closeState_name:\"已关闭\",\n key: \"3\"\n },\n { \n orderCode:\"NU0391028\", \n supplierName: \"xx供应商\",\n type_name: \"4\",\n purchasing:'组织c', \n purchasingGroup:\"cc\",\n voucherDate:\"2019年03月01日\",\n approvalState_name:\"未审批\",\n confirmState_name:\"待确认\",\n closeState_name:\"未关闭\",\n key: \"4\"\n },\n { \n orderCode:\"NU0391029\", \n supplierName: \"xx供应商\",\n type_name: \"5\",\n purchasing:'组织d', \n purchasingGroup:\"ss\",\n voucherDate:\"2019年02月14日\",\n approvalState_name:\"未审批\",\n confirmState_name:\"待确认\",\n closeState_name:\"未关闭\",\n key: \"5\"\n }\n];\n\nclass Demo11 extends Component {\n render() {\n return (\n \n );\n }\n}\n\n\n","desc":" 设置`scroll`属性支持横向或纵向滚动,x的取值可以是:正整数(自动转为相应的像素值)、百分比(相对于表格真实宽度的百分比,大于100%时会出现滚动条)、布尔值。y的取值是正整数。"},{"example":,"title":" 纵向滚动条","code":"/**\n*\n* @title 纵向滚动条\n* @parent 滚动 Scroll View\n* @description 设置`scroll`属性支持横向或纵向滚动,x/y的取值可以是正整数、百分比、布尔值\n* demo0202\n*/\n\nimport React, { Component } from \"react\";\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n {title: \"序号\",dataIndex: \"index\",key: \"index\",width: 80, \n render(text, record, index) {\n return index + 1;\n }\n },\n {title: \"订单编号\",dataIndex: \"orderCode\",key: \"orderCode\",width: 200},\n {title: \"供应商名称\",dataIndex: \"supplierName\",key: \"supplierName\",width: 200},\n {title: \"类型\",dataIndex: \"type_name\",key: \"type_name\",width: 200},\n {title: \"采购组织\",dataIndex: \"purchasing\",key: \"purchasing\",width: 200},\n {title: \"采购组\",dataIndex: \"purchasingGroup\",key: \"purchasingGroup\",width: 200},\n {title: \"凭证日期\",dataIndex: \"voucherDate\",key: \"voucherDate\",width: 200}\n];\n \nconst data = [\n { \n orderCode:\"NU0391025\", \n supplierName: \"xx供应商\",\n type_name: \"1\",\n purchasing:'组织c', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年03月18日\",\n key: \"1\"\n }, \n { \n orderCode:\"NU0391026\", \n supplierName: \"xx供应商\",\n type_name: \"2\",\n purchasing:'组织a', \n purchasingGroup:\"bb\",\n voucherDate:\"2018年02月05日\",\n key: \"2\"\n },\n { \n orderCode:\"NU0391027\", \n supplierName: \"xx供应商\",\n type_name: \"3\",\n purchasing:'组织b', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年07月01日\",\n key: \"3\"\n },\n { \n orderCode:\"NU0391028\", \n supplierName: \"xx供应商\",\n type_name: \"4\",\n purchasing:'组织c', \n purchasingGroup:\"cc\",\n voucherDate:\"2019年03月01日\",\n key: \"4\"\n },\n { \n orderCode:\"NU0391029\", \n supplierName: \"xx供应商\",\n type_name: \"5\",\n purchasing:'组织d', \n purchasingGroup:\"ss\",\n voucherDate:\"2019年02月14日\",\n key: \"5\"\n },\n { \n orderCode:\"NU0391030\", \n supplierName: \"xx供应商\",\n type_name: \"1\",\n purchasing:'组织e', \n purchasingGroup:\"zz\",\n voucherDate:\"2019年02月18日\",\n key: \"6\"\n },\n { \n orderCode:\"NU0391031\", \n supplierName: \"xx供应商\",\n type_name: \"2\",\n purchasing:'组织f', \n purchasingGroup:\"qq\",\n voucherDate:\"2019年01月01日\",\n key: \"7\"\n },\n { \n orderCode:\"NU0391032\", \n supplierName: \"xx供应商\",\n type_name: \"3\",\n purchasing:'组织g', \n purchasingGroup:\"pp\",\n voucherDate:\"2019年01月31日\",\n key: \"8\"\n },\n];\nclass Demo12 extends Component {\n render() {\n return (\n \n );\n }\n}\n\n\n","desc":" 设置`scroll`属性支持横向或纵向滚动,x/y的取值可以是正整数、百分比、布尔值"},{"example":,"title":" 渲染本地数据","code":"/**\n*\n* @title 渲染本地数据\n* @parent 数据操作 Data Opetation\n* @description 可自定义页头和页脚。\n* demo0301\n*/\n\nimport React, { Component } from \"react\";\nimport {Button,Tooltip} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n {\n title: \"员工编号\", dataIndex: \"a\", key: \"a\", width: 300, className: \"rowClassName\",\n fixed:'left',\n render: (text, record, index) => {\n return (\n \n {text}\n \n );\n }\n },\n { title: \"员工姓名\", dataIndex: \"b\", key: \"b\", width: 500 },\n { title: \"性别\", dataIndex: \"c\", key: \"c\", width: 500 },\n { title: \"部门\", dataIndex: \"d\", key: \"d\", width: 200 }\n];\n\nconst data = [\n { a: \"ASVAL_201903280005\", b: \"小张\", c: \"男\", d: \"财务二科\", key: \"1\" },\n { a: \"ASVAL_201903200004\", b: \"小明\", c: \"男\", d: \"财务一科\", key: \"2\" },\n { a: \"ASVAL_201903120002\", b: \"小红\", c: \"女\", d: \"财务一科\", key: \"3\" }\n];\nclass Demo21 extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n data: data\n }\n }\n\n render() {\n return (\n 员工信息统计表
}\n footer={currentData => 合计: 共{data.length}条数据
}\n />\n );\n }\n}\n\n\n","desc":" 可自定义页头和页脚。"},{"example":,"title":" 渲染远程数据","code":"/**\n*\n* @title 渲染远程数据\n* @parent 数据操作 Data Opetation\n* @description 可通过 ajax 请求方式,从服务端读取并展现数据。也可自行接入其他数据处理方式。\n* demo0302\n*/\n\nimport React, { Component } from \"react\";\nimport {Button} from \"tinper-bee\";\nimport reqwest from 'reqwest';\nimport { Table } from 'tinper-bee';\n\nconst columns = [{\n title: 'Name',\n dataIndex: 'name',\n sorter: true,\n render: name => `${name.first} ${name.last}`,\n width: '20%',\n}, {\n title: 'Gender',\n dataIndex: 'gender',\n filters: [\n { text: 'Male', value: 'male' },\n { text: 'Female', value: 'female' },\n ],\n width: '20%',\n}, {\n title: 'Email',\n dataIndex: 'email',\n}];\n\nclass Demo22 extends Component {\n constructor(props) {\n super(props);\n this.state = {\n data: [],\n loading: false,\n }\n }\n\n fetch = (params = {}) => {\n console.log('params:', params);\n this.setState({ loading: true });\n reqwest({\n url: 'https://randomuser.me/api',\n method: 'get',\n data: {\n results: 10,\n ...params,\n },\n type: 'json',\n }).then((data) => {\n this.setState({\n loading: false,\n data: data.results,\n });\n });\n }\n\n render() {\n return (\n \n
\n
\n
\n );\n }\n}\n\n\n","desc":" 可通过 ajax 请求方式,从服务端读取并展现数据。也可自行接入其他数据处理方式。","scss_code":".demo22{\n .opt-btns{\n margin-bottom: 8px;\n }\n}"},{"example":,"title":" 多列表头","code":"/**\r\n *\r\n * @title 多列表头\r\n * @parent 列渲染 Custom Render\r\n * @description columns[n] 可以内嵌 children,以渲染分组表头。\r\n * 自定义表头高度需要传headerHeight,注:修改th的padding top和bottom置为0,否则会有影响\r\n * demo0402\r\n */\r\n\r\nimport React, { Component } from \"react\";\r\nimport { Table } from 'tinper-bee';\r\nimport {Button} from \"tinper-bee\";\r\n\r\nconst { ColumnGroup, Column } = Table;\r\n\r\nconst columns = [\r\n {\r\n title: \"Name\",\r\n dataIndex: \"name\",\r\n key: \"name\",\r\n width: 100,\r\n fixed: \"left\"\r\n },\r\n {\r\n title: \"Other\",\r\n width:600,\r\n children: [\r\n {\r\n title: \"Age\",\r\n dataIndex: \"age\",\r\n key: \"age\",\r\n width: 200\r\n },\r\n {\r\n title: \"Address\",\r\n children: [\r\n {\r\n title: \"Street\",\r\n dataIndex: \"street\",\r\n key: \"street\",\r\n width: 200\r\n },\r\n {\r\n title: \"Block\",\r\n children: [\r\n {\r\n title: \"Building\",\r\n dataIndex: \"building\",\r\n key: \"building\",\r\n width: 100\r\n },\r\n {\r\n title: \"Door No.\",\r\n dataIndex: \"number\",\r\n key: \"number\",\r\n width: 100\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n title: \"Company\",\r\n width:400,\r\n children: [\r\n {\r\n title: \"Company Address\",\r\n dataIndex: \"companyAddress\",\r\n key: \"companyAddress\",\r\n width:200,\r\n },\r\n {\r\n title: \"Company Name\",\r\n dataIndex: \"companyName\",\r\n key: \"companyName\",\r\n width:200,\r\n }\r\n ]\r\n },\r\n {\r\n title: \"Gender\",\r\n dataIndex: \"gender\",\r\n key: \"gender\",\r\n width: 60,\r\n fixed: \"right\"\r\n }\r\n];\r\n\r\nconst data = [];\r\nfor (let i = 0; i < 20; i++) {\r\n data.push({\r\n key: i,\r\n name: \"John Brown\",\r\n age: i + 1,\r\n street: \"Lake Park\",\r\n building: \"C\",\r\n number: 2035,\r\n companyAddress: \"Lake Street 42\",\r\n companyName: \"SoftLake Co\",\r\n gender: \"M\"\r\n });\r\n}\r\n\r\nclass Demo32 extends Component {\r\n render() {\r\n return (\r\n \r\n );\r\n }\r\n}\r\n\r\n\r\n","desc":" columns[n] 可以内嵌 children,以渲染分组表头。","scss_code":".demo32{\n .u-table-thead th {\n padding-top: 0px;\n padding-bottom: 0px;\n }\n}"},{"example":,"title":" 数据关联","code":"/**\n*\n* @title 数据关联\n* @parent 列渲染 Custom Render\n* @description 数据行关联自定义菜单显示\n* demo0404\n*/\n\nimport React, { Component } from 'react';\nimport {Icon,Checkbox,Dropdown,Menu} from 'tinper-bee';\nimport { Table } from 'tinper-bee';\nimport multiSelect from \"tinper-bee/lib/newMultiSelect\";;\nimport sort from \"tinper-bee/lib/sort\";;\n\nconst { Item } = Menu;\n\nconst data = [\n { \n num:\"NU0391025\", \n name: \"aa\",\n sex: \"男\",\n dept:'财务二科', \n rank:\"T1\",\n year:\"1\",\n seniority:\"1\",\n key: \"1\"\n }, \n { \n num:\"NU0391026\", \n name: \"bb\",\n sex: \"女\",\n dept:'财务一科', \n rank:\"M1\",\n year:\"1\",\n seniority:\"1\",\n key: \"2\"\n },\n { \n num:\"NU0391027\", \n name: \"dd\",\n sex: \"女\",\n dept:'财务一科', \n rank:\"T2\",\n year:\"2\",\n seniority:\"2\",\n key: \"3\"\n }\n];\n\nconst MultiSelectTable = multiSelect(Table, Checkbox);\nconst ComplexTable = sort(MultiSelectTable, Icon);\n\nclass Demo33 extends Component {\n constructor(props) {\n super(props);\n }\n getSelectedDataFunc = data => {\n console.log(data);\n }\n onSelect = (item) => {\n console.log(item);\n }\n render() {\n const menu1 = (\n );\n let columns = [\n { title: \"关联\",dataIndex: \"link\",key: \"link\",width: 80, \n render: (text, record, index) => {\n return (\n \n \n \n )\n }\n },\n { title: \"员工编号\",dataIndex: \"num\",key: \"num\",width: 200 },\n { title: \"员工姓名\",dataIndex: \"name\",key: \"name\", width: 200},\n { title: \"员工性别\",dataIndex: \"sex\",key: \"sex\",width: 200 },\n { title: \"部门\",dataIndex: \"dept\",key: \"dept\",width: 200},\n { title: \"职级\",dataIndex: \"rank\",key: \"rank\",width: 200},\n { title: \"工龄\",dataIndex: \"year\",key: \"year\",width: 200},\n { title: \"司龄\",dataIndex: \"seniority\",key: \"seniority\",width: 200}\n ];\n return \n }\n}\n\n","desc":" 数据行关联自定义菜单显示"},{"example":,"title":" 列合计(总计)","code":"/**\n *\n * @title 列合计(总计)\n * @parent 列渲染 Custom Render\n * @description 给需要计算合计的列(columns),设置sumCol值为true即可,支持动态设置数据源。\n * demo0405\n */\n\nimport React, { Component } from \"react\";\nimport {Checkbox} from \"tinper-bee\";\nimport { Table } from 'tinper-bee'; \nimport sum from \"tinper-bee/lib/sum.js\";;\nimport multiSelect from \"tinper-bee/lib/multiSelect.js\";;\n \nlet ComplexTable = multiSelect(sum(Table), Checkbox);\nlet _sum = 0;\nconst columns = [\n {\n title: \"单据编号\",\n dataIndex: \"num\",\n key: \"num\",\n width: 120,\n fixed: \"left\"\n },\n {\n title: \"单据日期\",\n dataIndex: \"date\",\n key: \"date\",\n width: 200,\n },\n {\n title: \"业务类型\",\n dataIndex: \"type\",\n key: \"type\",\n width: 200\n },\n {\n title: \"供应商\",\n dataIndex: \"supplier\",\n key: \"supplier\",\n width: 100\n },\n {\n title: \"联系人\",\n dataIndex: \"contact\",\n key: \"contact\",\n },\n {\n title: \"仓库\",\n dataIndex: \"warehouse\",\n key: \"warehouse\",\n width: 80,\n },\n {\n title: \"整单数量\",\n dataIndex: \"total\",\n key: \"total\",\n width: 100,\n sumCol: true\n },\n {\n title: \"金额\",\n dataIndex: \"money\",\n key: \"money\",\n width: 100,\n sumCol: true\n }\n];\n\nfunction getData(){\n const data = [];\n for (let i = 0; i < 5; i++) {\n data.push({\n key: i,\n num: \"NU039100\"+i,\n date: \"2019-03-01\",\n type: \"普通采购\",\n supplier: \"gys\"+i,\n contact: \"Tom\",\n warehouse: \"普通仓\",\n total: i + Math.floor(Math.random()*10),\n money: 20 * Math.floor(Math.random()*10)\n });\n _sum += data[i].total;\n _sum += data[i].money;\n }\n return data;\n}\n\nclass Demo35 extends Component {\n \n constructor(props) {\n super(props);\n this.state = {\n data: getData(),\n sum:_sum\n };\n }\n\n render() {\n const {data} = this.state;\n return (\n \n );\n }\n}\n\n","desc":" 给需要计算合计的列(columns),设置sumCol值为true即可,支持动态设置数据源。"},{"example":,"title":" 单元格编辑","code":"/**\n *\n * @title 单元格编辑\n * @parent 编辑 Editor\n * @description 可以对单元格进行编辑的表格,示例中给出输入框、下拉框、参照的编辑模式,以及两类校验。(通过对 coloums 配置 render 属性实现渲染不同格式的编辑态单元格)\n * demo0502\n */\nimport React, { Component } from \"react\";\nimport { Table } from 'tinper-bee';\nimport { Icon, Select, Tooltip, Form } from \"tinper-bee\";\nconst Option = Select.Option;\nimport { RefTreeWithInput } from \"ref-tree\";\n\nclass StringEditCell extends Component {\n constructor(props, context) {\n super(props);\n this.state = {\n value: this.props.value,\n editable: false\n };\n }\n\n commitChange = () => {\n if (this.state.value === \"\") return;\n this.setState({ editable: false });\n if (this.props.onChange) {\n this.props.onChange(this.state.value);\n }\n };\n\n edit = () => {\n this.setState({ editable: true });\n };\n\n handleKeydown = event => {\n if (event.keyCode == 13) {\n this.commitChange();\n }\n };\n\n handleChange = e => {\n this.setState({ value: e.target.value });\n };\n\n render() {\n const { value, editable } = this.state;\n return (\n \n {editable ? (\n
\n \n {value === \"\" ? (\n \n {\"请输入\" + this.props.colName}\n
\n }\n >\n
\n \n ) : null}\n
\n ) : (\n \n {value || \" \"}\n
\n )}\n \n );\n }\n}\n\nconst SELECT_SOURCE = [\"男\", \"女\"];\n\nclass SelectEditCell extends Component {\n constructor(props, context) {\n super(props);\n this.state = {\n value: this.props.value,\n editable: false\n };\n }\n\n handleSelect = value => {\n this.setState({ value });\n };\n\n commitChange = () => {\n this.setState({ editable: false });\n if (this.props.onChange) {\n this.props.onChange(this.state.value);\n }\n };\n\n edit = () => {\n this.setState({ editable: true });\n };\n\n render() {\n const { value, editable } = this.state;\n return (\n \n {editable ? (\n
\n \n
\n ) : (\n
\n {value || \" \"}\n
\n )}\n
\n );\n }\n}\n\nconst option = {\n title: \"树\",\n searchable: true,\n multiple: false,\n param: {\n refCode: \"neworganizition_tree\"\n },\n checkStrictly: true,\n disabled: false,\n nodeDisplay: record => {\n return record.refname;\n },\n displayField: record => {\n return record.refname;\n }, //显示内容的键\n valueField: \"refpk\", //真实 value 的键\n refModelUrl: {\n treeUrl: \"https://mock.yonyoucloud.com/mock/358/blobRefTree\",\n treeUrl: \"/pap_basedoc/common-ref/blobRefTree\"\n },\n matchUrl: \"/pap_basedoc/common-ref/matchPKRefJSON\",\n filterUrl: \"/pap_basedoc/common-ref/filterRefJSON\",\n lazyModal: false,\n strictMode: true,\n lang: \"zh_CN\",\n treeData: [\n {\n code: \"org1\",\n children: [\n {\n code: \"bj\",\n entityType: \"mainEntity\",\n name: \"北京总部-简\",\n pid: \"a4cf0601-51e6-4012-9967-b7a64a4b2d47\",\n refcode: \"bj\",\n refpk: \"5305416e-e7b4-4051-90bd-12d12942295b\",\n id: \"5305416e-e7b4-4051-90bd-12d12942295b\",\n isLeaf: \"true\",\n refname: \"北京总部-简\"\n },\n {\n code: \"xd\",\n entityType: \"mainEntity\",\n name: \"新道-简\",\n pid: \"a4cf0601-51e6-4012-9967-b7a64a4b2d47\",\n refcode: \"xd\",\n refpk: \"b691afff-ea83-4a3f-affa-beb2be9cba52\",\n id: \"b691afff-ea83-4a3f-affa-beb2be9cba52\",\n isLeaf: \"true\",\n refname: \"新道-简\"\n },\n {\n code: \"yy3\",\n entityType: \"mainEntity\",\n name: \"test3\",\n pid: \"a4cf0601-51e6-4012-9967-b7a64a4b2d47\",\n refcode: \"yy3\",\n refpk: \"e75694d9-7c00-4e9e-9573-d29465ae79a9\",\n id: \"e75694d9-7c00-4e9e-9573-d29465ae79a9\",\n isLeaf: \"true\",\n refname: \"test3\"\n },\n {\n code: \"yy1\",\n entityType: \"mainEntity\",\n name: \"test1\",\n pid: \"a4cf0601-51e6-4012-9967-b7a64a4b2d47\",\n refcode: \"yy1\",\n refpk: \"fd32ceeb-57a8-4f44-816e-fa660f5715ab\",\n id: \"fd32ceeb-57a8-4f44-816e-fa660f5715ab\",\n isLeaf: \"true\",\n refname: \"test1\"\n },\n {\n code: \"dept2\",\n children: [\n {\n code: \"cs\",\n entityType: \"subEntity\",\n organization_id: \"a4cf0601-51e6-4012-9967-b7a64a4b2d47\",\n name: \"测试部-简\",\n pid: \"0ebbb6d8-250a-4d1d-a019-7ae951629a2c\",\n refcode: \"cs\",\n refpk: \"cc43a66a-438d-4106-937f-bec44406f771\",\n id: \"cc43a66a-438d-4106-937f-bec44406f771\",\n isLeaf: \"true\",\n refname: \"测试部-简\"\n },\n {\n code: \"qd\",\n entityType: \"subEntity\",\n organization_id: \"a4cf0601-51e6-4012-9967-b7a64a4b2d47\",\n name: \"前端部-简\",\n pid: \"0ebbb6d8-250a-4d1d-a019-7ae951629a2c\",\n refcode: \"qd\",\n refpk: \"73a10edd-aae8-4f31-af25-1f48f0a3b344\",\n id: \"73a10edd-aae8-4f31-af25-1f48f0a3b344\",\n isLeaf: \"true\",\n refname: \"前端部-简\"\n }\n ],\n entityType: \"subEntity\",\n organization_id: \"a4cf0601-51e6-4012-9967-b7a64a4b2d47\",\n name: \"生产处\",\n refcode: \"dept2\",\n refpk: \"0ebbb6d8-250a-4d1d-a019-7ae951629a2c\",\n id: \"0ebbb6d8-250a-4d1d-a019-7ae951629a2c\",\n refname: \"生产处\"\n },\n {\n code: \"dept1\",\n children: [\n {\n code: \"dept1_2\",\n entityType: \"subEntity\",\n organization_id: \"a4cf0601-51e6-4012-9967-b7a64a4b2d47\",\n name: \"财务二科\",\n pid: \"95b60f35-ed0b-454e-b948-fb45ae30b911\",\n refcode: \"dept1_2\",\n refpk: \"55b7fff1-6579-4ca9-92b7-3271d288b9f3\",\n id: \"55b7fff1-6579-4ca9-92b7-3271d288b9f3\",\n isLeaf: \"true\",\n refname: \"财务二科\"\n },\n {\n code: \"dept1_1\",\n entityType: \"subEntity\",\n organization_id: \"a4cf0601-51e6-4012-9967-b7a64a4b2d47\",\n name: \"财务一科\",\n pid: \"95b60f35-ed0b-454e-b948-fb45ae30b911\",\n refcode: \"dept1_1\",\n refpk: \"9711d912-3184-4063-90c5-1facc727813c\",\n id: \"9711d912-3184-4063-90c5-1facc727813c\",\n isLeaf: \"true\",\n refname: \"财务一科\"\n }\n ],\n entityType: \"subEntity\",\n organization_id: \"a4cf0601-51e6-4012-9967-b7a64a4b2d47\",\n name: \"财务处\",\n refcode: \"dept1\",\n refpk: \"95b60f35-ed0b-454e-b948-fb45ae30b911\",\n id: \"95b60f35-ed0b-454e-b948-fb45ae30b911\",\n refname: \"财务处\"\n }\n ],\n entityType: \"mainEntity\",\n name: \"用友集团\",\n refcode: \"org1\",\n refpk: \"a4cf0601-51e6-4012-9967-b7a64a4b2d47\",\n id: \"a4cf0601-51e6-4012-9967-b7a64a4b2d47\",\n refname: \"用友集团\"\n }\n ]\n};\n\nconst RefEditCell = Form.createForm()(\n class RefComponentWarpper extends Component {\n constructor(props, context) {\n super(props, context);\n this.state = {\n value: this.props.value.d,\n editable: false\n };\n this.refWarp = React.createRef();\n }\n\n edit = () => {\n this.setState({ editable: true }, () => this.refWarp.focus());\n };\n\n handleSelect = values => {\n this.setState({ value: values[0] });\n };\n\n commitChange = () => {\n this.setState({ editable: false });\n if (this.props.onChange) {\n this.props.onChange(this.state.value);\n }\n };\n\n onRefBlur = e => {\n // 消除点击子组件,父组件先失焦再聚焦的事件触发过程带来的副作用\n const __REF_CONTENT__ = document.querySelector(\"div.ref-core-modal\");\n if (!__REF_CONTENT__ && e.target === this.refWarp) {\n this.commitChange();\n }\n };\n\n render() {\n const { getFieldProps, getFieldError } = this.props.form;\n const { value, editable } = this.state;\n return editable ? (\n (this.refWarp = el)}\n className=\"editable-cell-input-wrapper\"\n tabIndex={-1}\n onBlur={this.onRefBlur}\n >\n \n \n {getFieldError(\"code1\")}\n \n
\n ) : (\n \n {value.name || \" \"}\n
\n );\n }\n }\n);\n\nconst dataSource = [\n {\n a: \"ASVAL_201903280005\",\n b: \"小张\",\n c: \"男\",\n d: {\n code: \"dept1_2\",\n entityType: \"subEntity\",\n organization_id: \"a4cf0601-51e6-4012-9967-b7a64a4b2d47\",\n name: \"财务二科\",\n pid: \"95b60f35-ed0b-454e-b948-fb45ae30b911\",\n refcode: \"dept1_2\",\n refpk: \"55b7fff1-6579-4ca9-92b7-3271d288b9f3\",\n id: \"55b7fff1-6579-4ca9-92b7-3271d288b9f3\",\n isLeaf: \"true\",\n refname: \"财务二科\"\n },\n key: \"1\"\n },\n {\n a: \"ASVAL_201903200004\",\n b: \"小明\",\n c: \"男\",\n d: {\n code: \"dept1_2\",\n entityType: \"subEntity\",\n organization_id: \"a4cf0601-51e6-4012-9967-b7a64a4b2d47\",\n name: \"财务二科\",\n pid: \"95b60f35-ed0b-454e-b948-fb45ae30b911\",\n refcode: \"dept1_2\",\n refpk: \"55b7fff1-6579-4ca9-92b7-3271d288b9f3\",\n id: \"55b7fff1-6579-4ca9-92b7-3271d288b9f3\",\n isLeaf: \"true\",\n refname: \"财务二科\"\n },\n key: \"2\"\n },\n {\n a: \"ASVAL_201903120002\",\n b: \"小红\",\n c: \"女\",\n d: {\n code: \"dept1_1\",\n entityType: \"subEntity\",\n organization_id: \"a4cf0601-51e6-4012-9967-b7a64a4b2d47\",\n name: \"财务一科\",\n pid: \"95b60f35-ed0b-454e-b948-fb45ae30b911\",\n refcode: \"dept1_1\",\n refpk: \"9711d912-3184-4063-90c5-1facc727813c\",\n id: \"9711d912-3184-4063-90c5-1facc727813c\",\n isLeaf: \"true\",\n refname: \"财务一科\"\n },\n key: \"3\"\n }\n];\n\nclass Demo0502 extends Component {\n constructor(props, context) {\n super(props);\n this.columns = [\n {\n title: \"员工编号\",\n dataIndex: \"a\",\n key: \"a\"\n },\n {\n title: \"名字\",\n dataIndex: \"b\",\n key: \"b\",\n render: (text, record, index) => (\n \n )\n },\n {\n title: \"性别\",\n dataIndex: \"c\",\n key: \"c\",\n width: 100,\n render: (text, record, index) => (\n \n )\n },\n {\n title: \"部门\",\n dataIndex: \"d\",\n key: \"d\",\n width: 215,\n render: (text, record, index) => (\n \n )\n },\n {\n key: \"placeholder\"\n }\n ];\n\n this.state = {\n dataSource: dataSource\n };\n }\n\n onCellChange = (index, key) => {\n return value => {\n const { dataSource } = this.state;\n dataSource[index][key] = value;\n this.setState({ dataSource }, () => console.dir(this.state.dataSource));\n };\n };\n\n render() {\n return (\n \n );\n }\n}\n\n\n","desc":" 可以对单元格进行编辑的表格,示例中给出输入框、下拉框、参照的编辑模式,以及两类校验。(通过对 coloums 配置 render 属性实现渲染不同格式的编辑态单元格)","scss_code":".demo0502 {\n .u-table-row {\n td {\n padding: 5px 8px;\n\n input.error {\n border-color: #F44336;\n }\n }\n .editable-cell {\n height: 30px;\n }\n &-hover {\n .editable-cell-text-wrapper {\n line-height: 18px;\n border: 1px solid #c1c7d0;\n }\n }\n .u-form-control,\n .u-select-selection {\n height: 30px;\n }\n }\n\n .editable-cell-text-wrapper {\n box-sizing: border-box;\n line-height: 20px;\n border-radius: 3px;\n\n &:hover {\n line-height: 18px;\n border: 1px solid #a5adba;\n }\n }\n\n .require {\n position: absolute;\n top: 2px;\n color: #F44336;\n font-size: 20px;\n }\n}\n\n.help-tip {\n color: #F44336;\n}\n\n.tp-0502 {\n .tooltip-arrow {\n border-bottom-color: #F44336 !important;\n }\n\n .tooltip-inner {\n border-color: #F44336 !important;\n }\n}\n"},{"example":,"title":" 左侧固定列","code":"/**\n*\n* @title 左侧固定列\n* @parent 列操作-锁定 Fixed\n* @description 固定列到表格的左侧\n* demo0601\n*/\n\n\n\nimport React, { Component } from 'react';\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n {\n title: \"序号\",\n dataIndex: \"index\",\n key: \"index\",\n width: 80, \n fixed: 'left',\n render(text, record, index){return index + 1}\n },\n {\n title: \"订单编号\",\n dataIndex: \"orderCode\",\n key: \"orderCode\",\n width: 100, \n fixed: 'left',\n },\n {\n title: \"供应商名称\",\n dataIndex: \"supplierName\",\n key: \"supplierName\",\n width: 100\n },\n {\n title: \"类型\",\n dataIndex: \"type_name\",\n key: \"type_name\",\n width: 100\n },\n {\n title: \"采购组织\",\n dataIndex: \"purchasing\",\n key: \"purchasing\",\n width: 100\n },\n {\n title: \"采购组\",\n dataIndex: \"purchasingGroup\",\n key: \"purchasingGroup\",\n width: 100\n },\n {\n title: \"凭证日期\",\n dataIndex: \"voucherDate\",\n key: \"voucherDate\",\n width: 200,\n \n },\n {\n title: \"审批状态\",\n dataIndex: \"approvalState_name\",\n key: \"approvalState_name\",\n width: 100\n },\n {\n title: \"确认状态\",\n dataIndex: \"confirmState_name\",\n key: \"confirmState_name\",\n width: 100\n }, \n {\n title: \"关闭状态\",\n dataIndex: \"closeState_name\",\n key: \"closeState_name\",\n width: 100\n }\n];\n\nconst data = [\n { \n orderCode:\"NU0391025\", \n supplierName: \"xx供应商\",\n type_name: \"1\",\n purchasing:'组织c', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年03月18日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"执行中\",\n closeState_name:\"未关闭\",\n key: \"1\"\n }, \n { \n orderCode:\"NU0391026\", \n supplierName: \"xx供应商\",\n type_name: \"2\",\n purchasing:'组织a', \n purchasingGroup:\"bb\",\n voucherDate:\"2018年02月05日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"待确认\",\n closeState_name:\"未关闭\",\n key: \"2\"\n },\n { \n orderCode:\"NU0391027\", \n supplierName: \"xx供应商\",\n type_name: \"3\",\n purchasing:'组织b', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年07月01日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"终止\",\n closeState_name:\"已关闭\",\n key: \"3\"\n }\n];\n\nclass Demo51 extends Component {\n render() {\n return ;\n }\n}\n\n","desc":" 固定列到表格的左侧"},{"example":,"title":" 右侧固定列","code":"/**\n*\n* @title 右侧固定列\n* @parent 列操作-锁定 Fixed\n* @description 固定列到表格的右侧\n* demo0602\n*/\n\n\n\nimport React, { Component } from 'react';\nimport {Popconfirm} from 'tinper-bee';\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n {\n title: \"序号\",\n dataIndex: \"index\",\n key: \"index\",\n width: 80, \n render(text, record, index){return index + 1}\n },\n {\n title: \"订单编号\",\n dataIndex: \"orderCode\",\n key: \"orderCode\",\n width: 100, \n },\n {\n title: \"供应商名称\",\n dataIndex: \"supplierName\",\n key: \"supplierName\",\n width: 100\n },\n {\n title: \"类型\",\n dataIndex: \"type_name\",\n key: \"type_name\",\n width: 100\n },\n {\n title: \"采购组织\",\n dataIndex: \"purchasing\",\n key: \"purchasing\",\n width: 100\n },\n {\n title: \"采购组\",\n dataIndex: \"purchasingGroup\",\n key: \"purchasingGroup\",\n width: 100\n },\n {\n title: \"凭证日期\",\n dataIndex: \"voucherDate\",\n key: \"voucherDate\",\n width: 200,\n \n },\n {\n title: \"审批状态\",\n dataIndex: \"approvalState_name\",\n key: \"approvalState_name\",\n width: 100\n },\n {\n title: \"确认状态\",\n dataIndex: \"confirmState_name\",\n key: \"confirmState_name\",\n width: 100\n }, \n {\n title: \"关闭状态\",\n dataIndex: \"closeState_name\",\n key: \"closeState_name\",\n width: 100\n },\n {\n title: \"操作\",\n dataIndex: \"d\",\n key: \"d\",\n width:100,\n fixed: \"right\",\n render(text, record, index) {\n return (\n \n )\n }\n }\n];\n\nconst data = [\n { \n orderCode:\"NU0391025\", \n supplierName: \"xx供应商\",\n type_name: \"1\",\n purchasing:'组织c', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年03月18日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"执行中\",\n closeState_name:\"未关闭\",\n key: \"1\"\n }, \n { \n orderCode:\"NU0391026\", \n supplierName: \"xx供应商\",\n type_name: \"2\",\n purchasing:'组织a', \n purchasingGroup:\"bb\",\n voucherDate:\"2018年02月05日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"待确认\",\n closeState_name:\"未关闭\",\n key: \"2\"\n },\n { \n orderCode:\"NU0391027\", \n supplierName: \"xx供应商\",\n type_name: \"3\",\n purchasing:'组织b', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年07月01日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"终止\",\n closeState_name:\"已关闭\",\n key: \"3\"\n }\n];\n\nclass Demo52 extends Component {\n render() {\n return ;\n }\n}\n\n","desc":" 固定列到表格的右侧"},{"example":,"title":" 动态设置列锁定、解除锁定","code":"/**\n*\n* @title 动态设置列锁定、解除锁定\n* @parent 列操作-锁定 Fixed\n* @description 动态设置columns中数据的fixed属性值【fixed: \"left\",fixed: \"right\"】。\n* demo0603\n*/\nimport React, { Component } from 'react';\nimport {Icon,Menu,Dropdown} from \"tinper-bee\";\n\nimport { Table } from 'tinper-bee';\n\nconst { Item } = Menu;\n\nconst columns = [\n {\n title: \"序号\",\n dataIndex: \"index\",\n key: \"index\",\n width: 80, \n fixed: 'left',\n render(text, record, index){return index + 1}\n },\n {\n title: \"订单编号\",\n dataIndex: \"orderCode\",\n key: \"orderCode\",\n width: 100, \n fixed: 'left',\n },\n {\n title: \"供应商名称\",\n dataIndex: \"supplierName\",\n key: \"supplierName\",\n width: 150\n },\n {\n title: \"类型\",\n dataIndex: \"type_name\",\n key: \"type_name\",\n width: 100\n },\n {\n title: \"采购组织\",\n dataIndex: \"purchasing\",\n key: \"purchasing\",\n width: 100\n },\n {\n title: \"采购组\",\n dataIndex: \"purchasingGroup\",\n key: \"purchasingGroup\",\n width: 100\n },\n {\n title: \"凭证日期\",\n dataIndex: \"voucherDate\",\n key: \"voucherDate\",\n width: 200,\n \n },\n {\n title: \"审批状态\",\n dataIndex: \"approvalState_name\",\n key: \"approvalState_name\",\n width: 100\n },\n {\n title: \"确认状态\",\n dataIndex: \"confirmState_name\",\n key: \"confirmState_name\",\n width: 100\n }, \n {\n title: \"关闭状态\",\n dataIndex: \"closeState_name\",\n key: \"closeState_name\",\n width: 100\n }\n];\n\nconst data = [\n { \n orderCode:\"NU0391025\", \n supplierName: \"xx供应商\",\n type_name: \"1\",\n purchasing:'组织c', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年03月18日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"执行中\",\n closeState_name:\"未关闭\",\n key: \"1\"\n }, \n { \n orderCode:\"NU0391026\", \n supplierName: \"xx供应商\",\n type_name: \"2\",\n purchasing:'组织a', \n purchasingGroup:\"bb\",\n voucherDate:\"2018年02月05日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"待确认\",\n closeState_name:\"未关闭\",\n key: \"2\"\n },\n { \n orderCode:\"NU0391027\", \n supplierName: \"xx供应商\",\n type_name: \"3\",\n purchasing:'组织b', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年07月01日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"终止\",\n closeState_name:\"已关闭\",\n key: \"3\"\n }\n];\n \nclass Demo24 extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n columns:columns\n }\n }\n \n onSelect = ({key,item})=>{ \n console.log(`${key} selected`); //获取key\n let currentObject = item.props.data; //获取选中对象的数据\n let {columns} = this.state;\n let fixedCols = [];\n let nonColums = [];\n columns.find(da=>{\n if(da.key == key){\n da.fixed?delete da.fixed:da.fixed = 'left';\n }\n da.fixed?fixedCols.push(da):nonColums.push(da);\n });\n \n columns = [...fixedCols,...nonColums]\n\n this.setState({\n columns\n });\n }\n //表头增加下拉菜单\n renderColumnsDropdown(columns) {\n const icon ='uf-arrow-down';\n \n return columns.map((originColumn,index) => {\n let column = Object.assign({}, originColumn);\n let menuInfo = [], title='锁定';\n if(originColumn.fixed){\n title = '解锁'\n }\n menuInfo.push({\n info:title,\n key:originColumn.key,\n index:index\n });\n const menu = (\n )\n column.title = (\n \n {column.title}\n \n \n \n \n \n );\n return column;\n });\n \n }\n\n render() {\n let {columns} = this.state;\n columns = this.renderColumnsDropdown(columns);\n return(\n \n )\n }\n}\n\n","desc":" 动态设置columns中数据的fixed属性值【fixed: \"left\",fixed: \"right\"】。","scss_code":"th{\n .drop-menu{\n .uf{\n font-size: 12px;\n visibility: hidden;\n margin-left: 15px;\n }\n \n \n }\n &:hover{\n .uf{\n visibility: visible;\n }\n }\n\n}\n\n"},{"example":,"title":" 按条件、值过滤","code":"/**\n*\n* @title 按条件、值过滤\n* @parent 列操作-过滤 Filter\n* @description 可以根据输入项目以及判断条件对表格内的数据进行过滤。可在控制台查看序列化后的参数字符串。\n* demo0701\n*/\n\nimport React, { Component } from 'react';\nimport { Table } from 'tinper-bee';\n\nconst columns26 = [\n { title: \"姓名\", width: 180, dataIndex: \"name\", key: \"name\", filterType: \"text\", filterDropdown: \"show\" },\n { title: \"年龄\", width: 150, dataIndex: \"age\", key: \"age\", filterType: \"dropdown\", filterDropdown: \"show\" },\n { title: \"日期\", width: 200, dataIndex: \"date\", key: \"date\", filterType: \"date\", filterDropdown: \"show\", format: \"YYYY-MM-DD\" },\n { title: \"居住地址\", width: 150, dataIndex: \"address\", key: \"address\", filterType: \"dropdown\", filterDropdown: \"show\" },\n { title: \"备注\", dataIndex: \"mark\", key: \"mark\" }\n];\n\nconst data26 = [\n {\n key: \"1\",\n name: \"John Brown\",\n age: 32,\n date: \"2018-09-19\",\n address: \"朝阳区\",\n mark: \"无\"\n },\n {\n key: \"2\",\n name: \"Jim Green\",\n age: 40,\n date: \"2018-09-18\",\n address: \"朝阳区\",\n mark: \"无\"\n },\n {\n key: \"3\",\n name: \"Jim Green\",\n age: 40,\n date: \"2018-09-18\",\n address: \"东城区\",\n mark: \"无\"\n },\n {\n key: \"4\",\n name: \"Jim Green\",\n age: 40,\n date: \"2018-09-18\",\n address: \"东城区\",\n mark: \"无\"\n }, {\n key: \"5\",\n name: \"John Brown\",\n age: 32,\n date: \"2018-09-18\",\n address: \"海淀区\",\n mark: \"无\"\n },\n {\n key: \"6\",\n name: \"Jim Green\",\n age: 48,\n date: \"2018-09-18\",\n address: \"海淀区\",\n mark: \"无\"\n },\n {\n key: \"7\",\n name: \"Jim Green\",\n age: 40,\n date: \"2018-09-18\",\n address: \"海淀区\",\n mark: \"无\"\n },\n {\n key: \"8\",\n name: \"Jim Green\",\n age: 38,\n date: \"2018-09-18\",\n address: \"海淀区\",\n mark: \"无\"\n }\n];\n\nclass Demo26 extends Component {\n handlerFilterChange = (key, val, condition) => {\n console.log('参数:key=', key, ' value=', val, 'condition=', condition);\n }\n\n handlerFilterClear = (key) => {\n console.log('清除条件', key);\n }\n render() {\n return ()\n onFilterClear={this.handlerFilterClear}//触发输入操作以及其他的回调(key,val)=>()\n filterDelay={500}//输入文本多少ms触发回调函数,默认300ms\n filterable={true}//是否开启过滤数据功能\n bordered\n columns={columns26}\n data={data26} />;\n }\n}\n\n","desc":" 可以根据输入项目以及判断条件对表格内的数据进行过滤。可在控制台查看序列化后的参数字符串。"},{"example":,"title":" 复杂表格中行过滤","code":"/**\n*\n* @title 复杂表格中行过滤\n* @parent 列操作-过滤 Filter\n* @description 在过滤数据行的基础上增加列拖拽、动态菜单显示、下拉条件动态传入自定义等\n* demo0702\n*/\n\n/**\n * @description \n */\n\nimport React, { Component } from 'react';\nimport {Icon,Checkbox,Dropdown,Menu} from \"tinper-bee\";\n\nimport { Table } from 'tinper-bee';\nimport multiSelect from \"tinper-bee/lib/multiSelect\";;\nimport sort from \"tinper-bee/lib/sort\";;\n\nconst SubMenu = Menu.SubMenu;\nconst MenuItemGroup = Menu.ItemGroup;\n\nconst data27 = [\n {\n key: \"1\",\n name: \"John Brown\",\n age: 32,\n date: \"2018-09-19\",\n address: \"朝阳区\",\n mark: \"无\"\n },\n {\n key: \"2\",\n name: \"Jim Green\",\n age: 40,\n date: \"2018-09-18\",\n address: \"朝阳区\",\n mark: \"无\"\n },\n {\n key: \"3\",\n name: \"Jim Green\",\n age: 40,\n date: \"2018-09-18\",\n address: \"东城区\",\n mark: \"无\"\n },\n {\n key: \"4\",\n name: \"Jim Green\",\n age: 40,\n date: \"2018-09-18\",\n address: \"东城区\",\n mark: \"无\"\n }, {\n key: \"5\",\n name: \"John Brown\",\n age: 32,\n date: \"2018-09-18\",\n address: \"海淀区\",\n mark: \"无\"\n },\n {\n key: \"6\",\n name: \"Jim Green\",\n age: 48,\n date: \"2018-09-18\",\n address: \"海淀区\",\n mark: \"无\"\n },\n {\n key: \"7\",\n name: \"Jim Green\",\n age: 40,\n date: \"2018-09-18\",\n address: \"海淀区\",\n mark: \"无\"\n },\n {\n key: \"8\",\n name: \"Jim Green\",\n age: 38,\n date: \"2018-09-18\",\n address: \"海淀区\",\n mark: \"无\"\n }\n];\n\n\nconst MultiSelectTable = multiSelect(Table, Checkbox);\nconst ComplexTable = sort(MultiSelectTable, Icon);\nclass Demo27 extends Component {\n constructor(props) {\n super(props);\n this.state = {\n dropdownvalue: []\n }\n }\n handlerFilterChange = (key, val, condition) => {\n console.log('参数:key=', key, ' value=', val, 'condition=', condition);\n }\n\n handlerFilterClear = (key) => {\n console.log('清除条件', key);\n }\n getSelectedDataFunc = data => {\n console.log(data);\n }\n onClick = (item) => {\n console.log(item);\n }\n\n render() {\n const menu1 = (\n )\n let multiObj = {\n type: \"checkbox\"\n };\n let columns27 = [\n {\n title: \"\", width: 40, dataIndex: \"key\", key: \"key\", render: (text, record, index) => {\n return \n \n \n }\n },\n {\n title: \"姓名\",\n width: 180,\n dataIndex: \"name\",\n key: \"name\",\n filterType: \"text\",//输入框类型\n filterDropdown: \"show\",//显示条件\n filterDropdownType: \"string\"//字符条件\n },\n {\n title: \"年龄\",\n width: 180,\n dataIndex: \"age\",\n key: \"age\",\n filterType: \"number\",//输入框类型\n filterDropdown: \"show\",//显示条件\n filterDropdownType: \"number\"//字符条件\n },\n {\n title: \"日期\",\n width: 190,\n dataIndex: \"date\",\n key: \"date\",\n filterType: \"date\",//输入框类型\n filterDropdown: \"show\",//显示条件\n filterDropdownType: \"string\"//字符条件\n },\n {\n title: \"时间范围\",\n width: 290,\n dataIndex: \"mark\",\n key: \"mark\",\n filterType: \"daterange\",//输入框类型\n filterDropdown: \"show\",//显示条件\n filterDropdownType: \"number\"//字符条件\n },\n {\n title: \"地址\",\n width: 100,\n dataIndex: \"address\",\n key: \"address\",\n filterType: \"dropdown\",//输入框类型\n filterDropdown: \"show\",//显示条件\n filterDropdownType: \"number\"//字符条件\n }\n ];\n return ()\n onFilterClear={this.handlerFilterClear}//触发输入操作以及其他的回调(key,val)=>()\n filterDelay={500}//输入文本多少ms触发回调函数,默认500ms\n filterable={true}//是否开启过滤数据功能\n getSelectedDataFunc={this.getSelectedDataFunc}\n bordered\n multiSelect={multiObj}\n columns={columns27}\n data={data27} />;\n }\n}\n\n","desc":" 在过滤数据行的基础上增加列拖拽、动态菜单显示、下拉条件动态传入自定义等"},{"example":,"title":" 列过滤面板","code":"/**\n*\n* @title 列过滤面板\n* @parent 列操作-隐藏 Hide\n* @description 点击表头右侧按钮,设置显示或隐藏表格列。可以自定义设置显示某列,通过ifshow属性控制,默认值为true(显示表格所有列)。afterFilter方法为列过滤后触发的回调函数。\n* demo0802\n*/\n\n\nimport React, { Component } from 'react';\nimport {Icon,Popover} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\nimport filterColumn from \"tinper-bee/lib/filterColumn\";;\nimport sum from \"tinper-bee/lib/sum\";;\n\nconst data = [\n { \n orderCode:\"NU0391025\", \n supplierName: \"xx供应商\",\n type_name: \"1\",\n purchasing:'组织c', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年03月18日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"执行中\",\n closeState_name:\"未关闭\",\n key: \"1\"\n }, \n { \n orderCode:\"NU0391026\", \n supplierName: \"xx供应商\",\n type_name: \"2\",\n purchasing:'组织a', \n purchasingGroup:\"bb\",\n voucherDate:\"2018年02月05日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"待确认\",\n closeState_name:\"未关闭\",\n key: \"2\"\n },\n { \n orderCode:\"NU0391027\", \n supplierName: \"xx供应商\",\n type_name: \"3\",\n purchasing:'组织b', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年07月01日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"终止\",\n closeState_name:\"已关闭\",\n key: \"3\"\n }\n];\n\nconst FilterColumnTable = filterColumn(Table, Popover, Icon);\n\nconst defaultProps21 = {\n prefixCls: \"bee-table\"\n};\n\nclass Demo21 extends Component {\n constructor(props) {\n super(props);\n this.state ={\n columns: [\n {\n title: \"序号\",\n dataIndex: \"index\",\n key: \"index\",\n width: 80, \n fixed: 'left',\n render(text, record, index){return index + 1}\n },\n {\n title: \"订单编号\",\n dataIndex: \"orderCode\",\n key: \"orderCode\",\n width: 100, \n fixed: 'left',\n },\n {\n title: \"供应商名称\",\n dataIndex: \"supplierName\",\n key: \"supplierName\",\n width: 150\n },\n {\n title: \"类型\",\n dataIndex: \"type_name\",\n key: \"type_name\",\n width: 100\n },\n {\n title: \"采购组织\",\n dataIndex: \"purchasing\",\n key: \"purchasing\",\n width: 100\n },\n ]};\n }\n afterFilter = (optData,columns)=>{\n if(optData.key == 'b'){\n if(optData.ifshow){\n columns[2].ifshow = false;\n }else{\n columns[2].ifshow = true;\n }\n this.setState({\n columns21 :columns,\n showFilterPopover:true\n });\n }\n \n }\n \n render() {\n return ;\n }\n}\n\nDemo21.defaultProps = defaultProps21;\n","desc":" 点击表头右侧按钮,设置显示或隐藏表格列。可以自定义设置显示某列,通过ifshow属性控制,默认值为true(显示表格所有列)。afterFilter方法为列过滤后触发的回调函数。"},{"example":,"title":" 列排序","code":"/**\n* @title 列排序\n* @parent 列操作-排序 Sort\n* @description column中增加sorter: (a, b) => a.c - b.c 这里的a,b代表前后两个数据,c代表比较当前对象的字段名称\n* demo0901\n*/\n\n\nimport React, { Component } from 'react';\nimport {Icon} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\nimport sort from \"tinper-bee/lib/sort.js\";;\n\nlet ComplexTable = sort(Table, Icon);\nconst columns11 = [\n {\n title: \"单据编号\",\n dataIndex: \"num\",\n key: \"num\",\n width: 120,\n fixed: \"left\"\n },\n {\n title: \"单据日期\",\n dataIndex: \"date\",\n key: \"date\",\n width: 200,\n },\n {\n title: \"供应商\",\n dataIndex: \"supplier\",\n key: \"supplier\",\n width: 100\n },\n {\n title: \"联系人\",\n dataIndex: \"contact\",\n key: \"contact\",\n },\n {\n title: \"整单数量\",\n dataIndex: \"total\",\n key: \"total\",\n width: 150,\n sorter: (a, b) => a.total - b.total\n }\n];\n\nconst data11 = [\n { num: \"NU0391001\", date: \"2019-03-01\", supplier: 'xx供应商',contact:'Tom', total:30 ,key: \"1\" },\n { num: \"NU0391002\", date: \"2018-11-02\", supplier: 'yy供应商',contact:'Jack', total:41 ,key: \"2\" },\n { num: \"NU0391003\", date: \"2019-05-03\", supplier: 'zz供应商',contact:'Jane', total:25 ,key: \"3\" }\n];\n\nconst defaultProps11 = {\n prefixCls: \"bee-table\"\n};\nclass Demo11 extends Component {\n constructor(props) {\n super(props);\n this.state = {\n sortOrder: \"\",\n data: data11\n };\n }\n render() {\n\n return ;\n }\n}\nDemo11.defaultProps = defaultProps11;\n\n\n","desc":" column中增加sorter: (a, b) => a.c - b.c 这里的a,b代表前后两个数据,c代表比较当前对象的字段名称"},{"example":,"title":" 后端列排序","code":"/**\n* @title 后端列排序\n* @parent 列操作-排序 Sort\n* @description 可在控制台中查看序列化后的参数字符串,将参数传递给后端即可进行列排序\n* demo0902\n*/\n\n\nimport React, { Component } from 'react';\nimport {Icon} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\nimport sort from \"tinper-bee/lib/sort.js\";;\nlet ComplexTable = sort(Table, Icon);\n\n// const columns11 = [\n// {\n// title: \"名字\",\n// dataIndex: \"a\",\n// key: \"a\",\n// width: 100\n// },\n// {\n// title: \"性别\",\n// dataIndex: \"b\",\n// key: \"b\",\n// width: 100\n// },\n// {\n// title: \"年龄\",\n// dataIndex: \"c\",\n// key: \"c\",\n// width: 200,\n// sorter: (a, b) => a.c - b.c\n// },\n// {\n// title: \"武功级别\",\n// dataIndex: \"d\",\n// key: \"d\"\n// },\n// {\n// title: \"分数\",\n// dataIndex: \"e\",\n// key: \"e\",\n// sorter: (a, b) => a.c - b.c\n// },\n// ];\n\n// const data11 = [\n// { a: \"杨过\", b: \"男\", c: 30,d:'内行', e:139,key: \"2\" },\n// { a: \"令狐冲\", b: \"男\", c: 41,d:'大侠', e:109, key: \"1\" },\n// { a: \"郭靖\", b: \"男\", c: 25,d:'大侠', e:159, key: \"3\" }\n// ];\nconst columns11 = [\n {\n title: \"单据编号\",\n dataIndex: \"num\",\n key: \"num\",\n width: 120,\n fixed: \"left\"\n },\n {\n title: \"单据日期\",\n dataIndex: \"date\",\n key: \"date\",\n width: 200,\n },\n {\n title: \"供应商\",\n dataIndex: \"supplier\",\n key: \"supplier\",\n width: 100\n },\n {\n title: \"联系人\",\n dataIndex: \"contact\",\n key: \"contact\",\n },\n {\n title: \"整单数量\",\n dataIndex: \"total\",\n key: \"total\",\n width: 150,\n sorter: (a, b) => a.total - b.total\n },\n {\n title: \"金额\",\n dataIndex: \"money\",\n key: \"money\",\n width: 100,\n sorter: (a, b) => a.money - b.money\n }\n];\n\nconst data11 = [\n { num: \"NU0391001\", date: \"2019-03-01\", supplier: 'xx供应商',contact:'Tom', total:30 ,money: 100,key: \"1\" },\n { num: \"NU0391002\", date: \"2018-11-02\", supplier: 'yy供应商',contact:'Jack', total:41 ,money: 50,key: \"2\" },\n { num: \"NU0391003\", date: \"2019-05-03\", supplier: 'zz供应商',contact:'Jane', total:25 ,money: 200,key: \"3\" }\n];\n\nconst defaultProps = {\n prefixCls: \"bee-table\"\n};\nclass Demo28 extends Component {\n constructor(props) {\n super(props);\n this.state = {\n sortOrder: \"\",\n data: data11\n };\n }\n /**\n * 后端获取数据\n */\n sortFun = (sortParam)=>{\n console.info(sortParam);\n //将参数传递给后端排序\n }\n render() {\n let sortObj = {\n mode:'multiple',\n backSource:true,\n sortFun:this.sortFun\n }\n return ;\n }\n}\nDemo28.defaultProps = defaultProps;\n\n\n","desc":" 可在控制台中查看序列化后的参数字符串,将参数传递给后端即可进行列排序"},{"example":,"title":" 多列排序","code":"/**\n *\n * @title 多列排序\n * @parent 列操作-排序 Sort\n * @description 结合多列排序、全选功能、合计功能的表格示例。新增排序后触发的回调函数sorterClick。\n * demo0903\n */\n\nimport React, { Component } from \"react\";\nimport {Checkbox,Button,Icon} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\nimport multiSelect from \"tinper-bee/lib/multiSelect.js\";;\nimport sort from \"tinper-bee/lib/sort.js\";;\nimport sum from \"tinper-bee/lib/sum.js\";;\n\nconst columns13 = [\n {\n title: \"订单编号\",\n dataIndex: \"a\",\n key: \"a\",\n className:'dfasd',\n width: 200\n },\n {\n title: \"金额\",\n dataIndex: \"b\",\n key: \"b\",\n width: 200,\n sumCol: true,\n sorter: (a, b) => a.c - b.c,\n sorterClick:(data,type)=>{//排序的回调函数\n //type value is up or down\n console.log(\"data\",data);\n }\n },\n {\n title: \"整单数量\",\n dataIndex: \"c\",\n key: \"c\",\n width: 200,\n sumCol: true,\n sorter: (a, b) => a.c - b.c,\n sorterClick:(data,type)=>{//排序的回调函数\n //type value is up or down\n console.log(\"data\",data);\n }\n },\n {\n title: \"日销售量\",\n dataIndex: \"e\",\n key: \"e\",\n width: 200,\n sumCol: true,\n sorter: (a, b) => a.c - b.c,\n },\n {\n title: \"供应商\",\n dataIndex: \"d\",\n key: \"d\",\n width: 200\n }\n];\n\nconst data13 = [\n { a: \"NU0391001\", b: 675, c: 30, d: \"xx供应商\",e:100, key: \"2\" },\n { a: \"NU0391002\", b: 43, c: 41, d: \"yy供应商\",e:90, key: \"1\" },\n { a: \"NU0391003\", b: 43, c: 81, d: \"zz供应商\", e:120,key: \"4\" },\n { a: \"NU0391004\", b: 43, c: 81, d: \"aa供应商\", e:130,key: \"5\" },\n { a: \"NU0391005\", b: 153, c: 25, d: \"bb供应商\",e:90, key: \"3\" }\n];\n\n\n//拼接成复杂功能的table组件不能在render中定义,需要像此例子声明在组件的外侧,不然操作state会导致功能出现异常\nlet ComplexTable = multiSelect(sort(sum(Table, Icon)), Checkbox);\n\nclass Demo13 extends Component {\n constructor(props) {\n super(props);\n this.state = {\n data13: data13,\n selectedRow: this.selectedRow,\n selectDisabled: this.selectDisabled\n };\n }\n getSelectedDataFunc = data => {\n console.log(data);\n };\n selectDisabled = (record, index) => {\n // console.log(record);\n if (index === 1) {\n return true;\n }\n return false;\n };\n selectedRow = (record, index) => {\n // console.log(record);\n if (index === 0) {\n return true;\n }\n return false;\n };\n onClick = () => {\n this.setState({\n selectedRow: function() {}\n });\n };\n\n render() {\n let multiObj = {\n type: \"checkbox\"\n };\n let sortObj = {\n mode:'multiple'\n }\n \n return (\n \n \n \n
\n );\n }\n}\n","desc":" 结合多列排序、全选功能、合计功能的表格示例。新增排序后触发的回调函数sorterClick。"},{"example":,"title":" 拖拽改变列顺序","code":"/**\n*\n* @title 拖拽改变列顺序\n* @parent 列操作-拖拽 Drag\n* @description 点击选择表头并左右拖拽,可以改变表格列顺序。onDrop方法是拖拽交换列后触发的回调函数。注意:固定列不可以交换。\n* demo1001\n*/\nimport React, { Component } from 'react';\nimport {Icon} from \"tinper-bee\";\n\nimport { Table } from 'tinper-bee'; \nimport dragColumn from \"tinper-bee/lib/dragColumn\";;\n\nconst columns = [\n {\n title: \"订单编号\",\n dataIndex: \"a\",\n key: \"a\",\n width: 100\n },\n {\n title: \"单据日期\",\n dataIndex: \"b\",\n key: \"b\",\n width: 200\n },\n {\n title: \"供应商\",\n dataIndex: \"c\",\n key: \"c\",\n width: 200,\n sumCol: true,\n sorter: (a, b) => a.c - b.c\n },\n {\n title: \"联系人\",\n dataIndex: \"d\",\n key: \"d\",\n width: 200,\n }\n];\n\nconst data = [\n { a: \"NU0391001\", b: \"2019-03-01\", c: 'xx供应商',d:'Tom', key: \"2\" },\n { a: \"NU0391002\", b: \"2018-11-02\", c: 'yy供应商',d:'Jack', key: \"1\" },\n { a: \"NU0391003\", b: \"2019-05-03\", c: 'zz供应商',d:'Jane', key: \"3\" }\n];\n\nconst DragColumnTable = dragColumn(Table);\n\nconst defaultProps22 = {\n prefixCls: \"bee-table\"\n};\n\nclass Demo22 extends Component {\n constructor(props) {\n super(props); \n }\n \n render() {\n return {\n console.log(\"--拖拽交换列后触发事件\");\n console.log(\"event.target:\",event.target);\n console.log(\"data:\",data);\n console.log(\"拖拽完成后的columns:\",columns);\n }}\n />;\n }\n}\n\nDemo22.defaultProps = defaultProps22;\n","desc":" 点击选择表头并左右拖拽,可以改变表格列顺序。onDrop方法是拖拽交换列后触发的回调函数。注意:固定列不可以交换。"},{"example":,"title":" 拖拽改变列宽度","code":"/**\n*\n* @title 拖拽改变列宽度\n* @parent 列操作-拖拽 Drag\n* @description onDropBorder方法为调整列宽后触发的回调函数。注:不支持tree结构的表头、合并表头的table。\n* demo1002\n*/\nimport React, { Component } from 'react';\nimport {Icon} from \"tinper-bee\";\n\nimport { Table } from 'tinper-bee'; \nimport dragColumn from \"tinper-bee/lib/dragColumn\";;\n\nconst columns23 = [\n {\n title: \"订单编号\",\n dataIndex: \"a\",\n key: \"a\",\n width: '200',\n fixed:'left'\n },\n {\n title: \"单据日期\",\n dataIndex: \"b\",\n key: \"b\",\n width: '600'\n },\n {\n title: \"供应商\",\n dataIndex: \"c\",\n key: \"c\",\n width: '200',\n }, \n {\n title: \"联系人\",\n dataIndex: \"d\",\n key: \"d\",\n width: 500,\n }\n];\n\nconst data23 = [\n { a: \"NU0391001\", b: \"2019-03-01\", c: \"xx供应商\",d:'Tom', key: \"2\" },\n { a: \"NU0391002\", b: \"2018-11-02\", c: \"yy供应商\",d:'Jack', key: \"1\" },\n { a: \"NU0391003\", b: \"2019-05-03\", c: \"zz供应商\",d:'Jane', key: \"3\" }\n];\n\nconst DragColumnTable = dragColumn(Table);\n\nconst defaultProps23 = {\n prefixCls: \"bee-table\"\n};\n\nclass Demo23 extends Component {\n constructor(props) {\n super(props); \n }\n\n render() {\n return {\n console.log(width+\"--调整列宽后触发事件\",e.target);\n }}\n />;\n }\n}\nDemo23.defaultProps = defaultProps23;\n\n\n","desc":" onDropBorder方法为调整列宽后触发的回调函数。注:不支持tree结构的表头、合并表头的table。"},{"example":,"title":" 嵌套子表格","code":"/**\n*\n* @title 嵌套子表格\n* @parent 扩展行 Expanded Row\n* @description 通过expandedRowRender参数来实现子表格\n* demo1101\n*/\n\nimport React, { Component } from \"react\";\nimport { Popconfirm } from 'tinper-bee';\nimport { Table } from 'tinper-bee';\nimport dragColumn from \"tinper-bee/lib/dragColumn\";;\nconst DragColumnTable = dragColumn(Table);\nconst columns16 = [\n {\n title: \"操作\",\n dataIndex: \"d\",\n key: \"d\", \n width:200,\n render(text, record, index) {\n return (\n \n \n 一些操作\n \n \n );\n }\n },\n { title: \"订单编号\", dataIndex: \"a\", key: \"a\", width: 250 },\n { id: \"123\", title: \"单据日期\", dataIndex: \"b\", key: \"b\", width: 100 },\n { title: \"供应商\", dataIndex: \"c\", key: \"c\", width: 200 },\n \n];\nconst columns17 = [\n {\n title: \"操作\",\n dataIndex: \"d\",\n key: \"d\",\n width:200,\n render(text, record, index) {\n return (\n \n \n 一些操作\n \n \n );\n }\n },\n { title: \"订单编号\", dataIndex: \"a\", key: \"a\", width: 100 },\n { id: \"123\", title: \"单据日期\", dataIndex: \"b\", key: \"b\", width: 100 },\n { title: \"供应商\", dataIndex: \"c\", key: \"c\", width: 200 },\n \n];\n\nconst data16 = [\n { a: \"NU0391001\", b: \"2019-03-01\", c: \"xx供应商\", d: \"操作\", key: \"1\" },\n { a: \"NU0391002\", b: \"2018-11-02\", c: \"yy供应商\", d: \"操作\", key: \"2\" },\n { a: \"NU0391003\", b: \"2019-05-03\", c: \"zz供应商\", d: \"操作\", key: \"3\" }\n];\n\n\nclass Demo16 extends Component {\n constructor(props){\n super(props);\n this.state={\n data_obj:{}\n }\n }\n expandedRowRender = (record, index, indent) => {\n let height = 42 * (this.state.data_obj[record.key].length+ 2);\n \n return (\n \n );\n };\n getData=(expanded, record)=>{\n //当点击展开的时候才去请求数据\n let new_obj = Object.assign({},this.state.data_obj);\n if(expanded){\n if(record.key==='1'){\n new_obj[record.key] = [\n { a: \"NU0391056\", b: \"2019-03-01\", c: \"gys1\", d: \"操作\", key: \"1\" },\n { a: \"NU0391057\", b: \"2018-11-02\", c: \"gys2\", d: \"操作\", key: \"2\" },\n ]\n this.setState({\n data_obj:new_obj\n })\n }else{\n new_obj[record.key] = [\n { a: \"NU0391079\", b: \"2019-04-17\", c: \"gys5\", d: \"操作\", key: \"3\" },\n ]\n this.setState({\n data_obj:new_obj\n })\n }\n }\n }\n haveExpandIcon=(record, index)=>{\n //控制是否显示行展开icon,该参数只有在和expandedRowRender同时使用才生效\n if(index == 0){\n return true;\n }\n return false;\n }\n render() {\n return (\n \n );\n }\n}\n\n\n","desc":" 通过expandedRowRender参数来实现子表格"},{"example":,"title":" 树型表格数据展示","code":"/**\n*\n* @title 树型表格数据展示\n* @parent 扩展行 Expanded Row\n* @description 通过在data中配置children数据,来自动生成树形表格\n* demo1102\n*/\n\n\nimport React, { Component } from 'react';\nimport { Table } from 'tinper-bee';\n\n\nconst columns4 = [\n {\n title: \"订单编号\",\n dataIndex: \"name\",\n key: \"name\",\n width: \"40%\"\n },\n {\n title: \"单据日期\",\n dataIndex: \"age\",\n key: \"age\",\n width: \"30%\"\n },\n {\n title: \"供应商\",\n dataIndex: \"address\",\n key: \"address\"\n }\n];\n\nconst data4 = [\n {\n key: 1,\n name: \"NU0391001\",\n age: \"2019-03-01\",\n address: \"供应商1\",\n children: [\n {\n key: 11,\n name: \"NU0391002\",\n age: \"2019-03-02\",\n address: \"供应商2\"\n },\n {\n key: 12,\n name: \"NU0391003\",\n age: \"2019-03-03\",\n address: \"供应商3\",\n children: [\n {\n key: 121,\n name: \"NU0391004\",\n age: \"2019-03-04\",\n address: \"供应商4\"\n }\n ]\n },\n {\n key: 13,\n name: \"NU0391005\",\n age: \"2019-03-05\",\n address: \"供应商5\",\n children: [\n {\n key: 131,\n name: \"NU0391006\",\n age: \"2019-03-06\",\n address: \"供应商6\",\n children: [\n {\n key: 1311,\n name: \"NU0391007\",\n age: \"2019-03-07\",\n address: \"供应商7\"\n },\n {\n key: 1312,\n name: \"NU0391008\",\n age: \"2019-03-08\",\n address: \"供应商8\"\n }\n ]\n }\n ]\n }\n ]\n },\n {\n key: 2,\n name: \"NU0391009\",\n age: \"2019-03-09\",\n address: \"供应商9\"\n }\n];\nclass Demo4 extends Component {\n\n constructor(props){\n super(props);\n this.state = {\n data: data4,\n factoryValue: 0,\n selectedRow: new Array(data4.length)//状态同步\n }\n }\n\n render() {\n return {\n if (this.state.selectedRow[index]) {\n return 'selected';\n } else {\n return '';\n }\n }}\n onRowClick={(record,index,indent)=>{\n let selectedRow = new Array(this.state.data.length);\n selectedRow[index] = true;\n this.setState({\n factoryValue: record,\n selectedRow: selectedRow\n });\n }}\n \n columns={columns4} data={data4} />;\n }\n}\n\n\n","desc":" 通过在data中配置children数据,来自动生成树形表格"},{"example":,"title":" 自定义表格标题、表尾、选中行颜色","code":"/**\r\n*\r\n* @title 自定义表格标题、表尾、选中行颜色\r\n* @parent 扩展行 Expanded Row\r\n* @description 可根据业务场景设置不同的`title`和`footer`。选中行颜色可用rowClassName作为选择器自定义css样式。\r\n* demo1103\r\n*/\r\n\r\nimport React, { Component } from \"react\";\r\nimport {Button,Tooltip,} from \"tinper-bee\";\r\n\r\nimport { Table } from 'tinper-bee';\r\n\r\nconst columns = [\r\n { title: \"员工编号\", dataIndex: \"a\", key: \"a\", width: 300, className: \"rowClassName\"},\r\n { title: \"员工姓名\", dataIndex: \"b\", key: \"b\", width: 500 },\r\n { title: \"性别\", dataIndex: \"c\", key: \"c\", width: 500 },\r\n { title: \"部门\", dataIndex: \"d\", key: \"d\", width: 200 }\r\n];\r\n\r\nconst data = [\r\n { a: \"ASVAL_201903280005\", b: \"小张\", c: \"男\", d: \"财务二科\", key: \"1\" },\r\n { a: \"ASVAL_201903200004\", b: \"小明\", c: \"男\", d: \"财务一科\", key: \"2\" },\r\n { a: \"ASVAL_201903120002\", b: \"小红\", c: \"女\", d: \"财务一科\", key: \"3\" }\r\n];\r\n\r\nclass Demo26 extends Component {\r\n\r\n constructor(props){\r\n super(props);\r\n this.state = {\r\n data: data,\r\n selectedRowIndex: 0\r\n }\r\n }\r\n\r\n render() {\r\n return (\r\n {\r\n if (this.state.selectedRowIndex == index) {\r\n return 'selected';\r\n } else {\r\n return '';\r\n }\r\n }}\r\n onRowClick={(record,index,indent)=>{\r\n this.setState({ \r\n selectedRowIndex: index\r\n });\r\n }}\r\n title={currentData => 员工信息统计表
}\r\n footer={currentData => 合计: 共{data.length}条数据
}\r\n /> \r\n );\r\n }\r\n}\r\n\r\n\r\n","desc":" 可根据业务场景设置不同的`title`和`footer`。选中行颜色可用rowClassName作为选择器自定义css样式。"},{"example":,"title":" 紧凑型、宽松型","code":"/**\n*\n* @title 紧凑型、宽松型\n* @parent 扩展行 Expanded Row\n* @description 设置`size`属性使用紧凑型表格(`sm`)或宽松型表格(`lg`)。\n* demo1105\n*/\n\nimport React, { Component } from \"react\";\nimport {Button,Tooltip,Tag} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n { title: \"订单编号\", dataIndex: \"orderNum\", key: \"orderNum\", width: 100 },\n { title: \"采购组织\", dataIndex: \"org\", key: \"org\", width: 200 },\n { title: \"供应商\", dataIndex: \"supplier\", key: \"supplier\", width: 100 },\n { title: \"订单日期\", dataIndex: \"orderDate\", key: \"orderDate\", width: 150 },\n { title: \"总数量\", dataIndex: \"quantity\", key: \"quantity\", width: 100 },\n { title: \"单据状态\", dataIndex: \"status\", key: \"status\", width: 100 },\n { title: \"提交人\", dataIndex: \"submitter\", key: \"submitter\", width: 100 },\n { title: \"单位\", dataIndex: \"unit\", key: \"unit\", width: 100 },\n { title: \"总税价合计\", dataIndex: \"sum\", key: \"sum\", width: 100 },\n];\n\nconst data = [\n { \n orderNum: \"NU0391025\", \n org: \"用友网络科技股份有限公司\", \n supplier: \"xx供应商\", \n orderDate: '2018年03月18日', \n quantity: '100.00', \n status: '错误', \n submitter: '小张', \n unit: 'pc', \n sum:'8,487.00', \n key: \"1\" \n },\n { \n orderNum: \"NU0391026\", \n org: \"用友网络科技股份有限公司\", \n supplier: \"xx供应商\", \n orderDate: '2018年02月05日', \n quantity: '91.00', \n status: '正常', \n submitter: '小红', \n unit: 'pc', \n sum:'675.00', \n key: \"2\" \n },\n { \n orderNum: \"NU0391027\", \n org: \"用友网络科技股份有限公司\", \n supplier: \"xx供应商\", \n orderDate: '2018年07月01日', \n quantity: '98.00', \n status: '异常', \n submitter: '小李', \n unit: 'pc', \n sum:'1,531.00', \n key: \"3\" \n }\n];\n\nclass Demo1 extends Component {\n render() {\n return (\n \n );\n }\n}\n\n\n","desc":" 设置`size`属性使用紧凑型表格(`sm`)或宽松型表格(`lg`)。"},{"example":,"title":" 自定义行高","code":"/**\n*\n* @title 自定义行高\n* @parent 扩展行 Expanded Row\n* @description 设置`height`属性自定义表体行高,设置`headerHeight`属性自定义表头高度。鼠标hover行时呼出操作按钮。\n* demo1106\n*/\n\nimport React, { Component } from \"react\";\nimport {Button,Tooltip} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n { title: \"员工编号\", dataIndex: \"a\", key: \"a\", width: 300, className: \"rowClassName\"},\n { title: \"员工姓名\", dataIndex: \"b\", key: \"b\", width: 500 },\n { title: \"性别\", dataIndex: \"c\", key: \"c\", width: 500 },\n { title: \"部门\", dataIndex: \"d\", key: \"d\", width: 200 }\n];\n\nconst data = [\n { a: \"ASVAL_201903280005\", b: \"小张\", c: \"男\", d: \"财务二科\", key: \"1\" },\n { a: \"ASVAL_201903200004\", b: \"小明\", c: \"男\", d: \"财务一科\", key: \"2\" },\n { a: \"ASVAL_201903120002\", b: \"小红\", c: \"女\", d: \"财务一科\", key: \"3\" }\n];\n\nclass Demo1 extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n data: data,\n selectedRowIndex: 0\n }\n }\n handleClick = () => {\n console.log('这是第' , this.currentIndex , '行');\n console.log('内容:' , this.currentRecord);\n }\n\n onRowHover=(index,record)=>{\n this.currentIndex = index;\n this.currentRecord = record;\n }\n\n getHoverContent=()=>{\n return
\n }\n\n render() {\n return (\n {\n this.setState({\n selectedRowIndex: index\n });\n }}\n />\n\n \n );\n }\n}\n\n\n","desc":" 设置`height`属性自定义表体行高,设置`headerHeight`属性自定义表头高度。鼠标hover行时呼出操作按钮。"},{"example":,"title":" 图片在表格中的展示","code":"/**\n*\n* @title 图片在表格中的展示\n* @parent 扩展行 Expanded Row\n* @description 根据图片高度自动撑开行高,可结合图片查看器使用 http://design.yonyoucloud.com/tinper-bee/bee-viewer, 注:如果图片在固定列中,可以使用heightConsistent属性,当此属性为true,就不会出现错行问题\n* demo1107\n*/\n\nimport React, { Component } from \"react\";\nimport {Button,Tooltip} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n {\n title: \"序号\",\n dataIndex: \"index\",\n key: \"index\",\n width: 80,\n render(text, record, index) {\n return index + 1;\n }\n },\n {\n title: \"组织部门\",\n dataIndex: \"orgDept\",\n key: \"orgDept\",\n width: 100,\n },\n {\n title: \"设施管理部门\",\n dataIndex: \"facilityManageUnit\",\n key: \"facilityManageUnit\",\n width: 150,\n },\n {\n title: \"案卷编号\",\n dataIndex: \"docketnum\",\n key: \"docketnum\",\n width: 100,\n },\n {\n title: \"数量\",\n dataIndex: \"num\",\n key: \"num\",\n width: 100,\n },\n {\n title: \"首次发现时间\",\n dataIndex: \"discoveryTime\",\n key: \"discoveryTime\",\n width: 150,\n },\n {\n title: \"实际修复时间\",\n dataIndex: \"repairTime\",\n key: \"repairTime\",\n width: 150,\n },\n {\n title: \"图样\",\n dataIndex: \"picture\",\n key: \"picture\",\n render(text, record, index) {\n return \n }\n }\n];\n\nconst data = [\n { key: \"1\", orgDept: \"组织1\", facilityManageUnit: \"部门1\", docketnum: 41, num: \"1\", discoveryTime: \"2018-10-17\", repairTime: \"2018-10-30\", picture: \"http://design.yonyoucloud.com/static/bee.tinper.org-demo/swiper-demo-1-min.jpg\"},\n { key: \"2\", orgDept: \"组织2\", facilityManageUnit: \"部门2\", docketnum: 30, num: \"2\", discoveryTime: \"2019-01-15\", repairTime: \"2019-01-20\", picture: \"http://design.yonyoucloud.com/static/bee.tinper.org-demo/swiper-demo-2-min.jpg\"},\n { key: \"3\", orgDept: \"组织3\", facilityManageUnit: \"部门3\", docketnum: 35, num: \"3\", discoveryTime: \"2019-04-10\", repairTime: \"2019-04-17\", picture: \"http://design.yonyoucloud.com/static/bee.tinper.org-demo/swiper-demo-3-min.jpg\"}\n];\n\nclass Demo105 extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n data: data,\n selectedRowIndex: 0\n }\n }\n handleClick = () => {\n console.log('这是第' , this.currentIndex , '行');\n console.log('内容:' , this.currentRecord);\n }\n\n onRowHover=(index,record)=>{\n this.currentIndex = index;\n this.currentRecord = record;\n }\n\n getHoverContent=()=>{\n return
\n }\n\n render() {\n return (\n \n );\n }\n}\n\n\n","desc":" 根据图片高度自动撑开行高,可结合图片查看器使用 http://design.yonyoucloud.com/tinper-bee/bee-viewer, 注:如果图片在固定列中,可以使用heightConsistent属性,当此属性为true,就不会出现错行问题"},{"example":,"title":" 自定义行、列合并","code":"/**\n*\n* @title 自定义行、列合并\n* @parent 扩展行 Expanded Row\n* @description 表头只支持列合并,使用 column 里的 colSpan 进行设置。表格支持行/列合并,使用 render 里的单元格属性 colSpan 或者 rowSpan 设值为 0 时,设置的表格不会渲染。\n* demo1108\n*/\n\nimport React, { Component } from \"react\";\nimport { Table } from 'tinper-bee';\n\nconst renderContent = (value, row, index) => {\n const obj = {\n children: value,\n props: {},\n };\n if (index === 4) {\n obj.props.colSpan = 0;\n }\n return obj;\n};\n\nconst columns = [{\n title: 'Name',\n key: \"name\",\n dataIndex: 'name',\n render: (text, row, index) => {\n if (index < 4) {\n return {text};\n }\n return {\n children: {text},\n props: {\n colSpan: 5,\n },\n };\n },\n}, {\n title: 'Age',\n key: \"Age\",\n dataIndex: 'age',\n render: renderContent,\n}, {\n title: 'Home phone',\n colSpan: 2,\n key: \"tel\",\n dataIndex: 'tel',\n render: (value, row, index) => {\n const obj = {\n children: value,\n props: {},\n };\n if (index === 2) {\n obj.props.rowSpan = 2;\n }\n if (index === 3) {\n obj.props.rowSpan = 0;\n }\n if (index === 4) {\n obj.props.colSpan = 0;\n }\n return obj;\n },\n}, {\n title: 'Phone',\n colSpan: 0,\n key: \"phone\",\n dataIndex: 'phone',\n render: renderContent,\n}, {\n title: 'Address',\n key: \"address\",\n dataIndex: 'address',\n render: renderContent,\n}];\n\nconst data = [{\n key: '1',\n name: 'John Brown',\n age: 32,\n tel: '0571-22098909',\n phone: 18889898989,\n address: 'New York No. 1 Lake Park',\n}, {\n key: '2',\n name: 'Jim Green',\n tel: '0571-22098333',\n phone: 18889898888,\n age: 42,\n address: 'London No. 1 Lake Park',\n}, {\n key: '3',\n name: 'Joe Black',\n age: 32,\n tel: '0575-22098909',\n phone: 18900010002,\n address: 'Sidney No. 1 Lake Park',\n}, {\n key: '4',\n name: 'Jim Red',\n age: 18,\n tel: '0575-22098909',\n phone: 18900010002,\n address: 'London No. 2 Lake Park',\n}, {\n key: '5',\n name: 'Jake White',\n age: 18,\n tel: '0575-22098909',\n phone: 18900010002,\n address: 'Dublin No. 2 Lake Park',\n}];\n\nclass Demo15 extends Component {\n render() {\n return (\n \n );\n }\n}\n\n\n\n","desc":" 表头只支持列合并,使用 column 里的 colSpan 进行设置。表格支持行/列合并,使用 render 里的单元格属性 colSpan 或者 rowSpan 设值为 0 时,设置的表格不会渲染。"},{"example":,"title":" 多选表格","code":"/**\r\n*\r\n* @title 多选表格\r\n* @parent 行操作-选择\r\n* @description 支持多选、全选和禁止选择。getSelectedDataFunc方法是选中行的回调函数,返回当前选中的数据数组。给data数据添加_checked参数可设置当前数据是否选中,添加_disabled参数可禁止选择当前数据。\r\n* demo1301\r\n*/\r\n\r\n\r\nimport React, { Component } from 'react';\r\nimport {Checkbox} from \"tinper-bee\";\r\n\r\nimport { Table } from 'tinper-bee';\r\nimport multiSelect from \"tinper-bee/lib/multiSelect.js\";;\r\n\r\nconst columns = [\r\n { title: \"员工编号\", dataIndex: \"a\", key: \"a\", width: 300, className: \"rowClassName\"},\r\n { title: \"员工姓名\", dataIndex: \"b\", key: \"b\", width: 500 },\r\n { title: \"性别\", dataIndex: \"c\", key: \"c\", width: 500 },\r\n { title: \"部门\", dataIndex: \"d\", key: \"d\", width: 200 }\r\n];\r\n\r\nconst data = [\r\n { a: \"ASVAL_201903280005\", b: \"小张\", c: \"男\", d: \"财务二科\", key: \"1\",_checked:true },\r\n { a: \"ASVAL_201903200004\", b: \"小明\", c: \"男\", d: \"财务一科\", key: \"2\",_checked:false },\r\n { a: \"ASVAL_201903120002\", b: \"小红\", c: \"女\", d: \"财务一科\", key: \"3\",_checked:false },\r\n { a: \"ASVAL_201903280010\", b: \"小王\", c: \"女\", d: \"财务二科\", key: \"4\",_disabled:true },\r\n { a: \"ASVAL_201903200021\", b: \"小李\", c: \"男\", d: \"财务一科\", key: \"5\",_checked:false}\r\n];\r\n//拼接成复杂功能的table组件不能在render中定义,需要像此例子声明在组件的外侧,不然操作state会导致功能出现异常\r\nlet MultiSelectTable = multiSelect(Table, Checkbox);\r\n\r\nclass Demo12 extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n data: data\r\n };\r\n }\r\n /**\r\n *@param selectedList:当前选中的行数据\r\n *@param record 当前操作行数据\r\n *@param index 当前操作行索引\r\n * @memberof Demo12\r\n */\r\n getSelectedDataFunc = (selectedList,record,index) => {\r\n console.log(\"selectedList\", selectedList,\"index\",index);\r\n // 如果在回调中增加setState逻辑,需要同步data中的_checked属性。即下面的代码\r\n // const allChecked = selectedList.length == 0?false:true;\r\n // record为undefind则为全选或者全不选\r\n // if(!record){\r\n // data12.forEach(item=>{\r\n // item._checked = allChecked;\r\n // })\r\n // }else{\r\n // data12[index]['_checked'] = record._checked;\r\n // } \r\n\r\n \r\n };\r\n \r\n render() {\r\n let multiObj = {\r\n type: \"checkbox\"\r\n };\r\n return (\r\n {\r\n if (record._checked) {\r\n return 'selected';\r\n } else {\r\n return '';\r\n }\r\n }}\r\n getSelectedDataFunc={this.getSelectedDataFunc}/>\r\n );\r\n }\r\n}\r\n\r\n","desc":" 支持多选、全选和禁止选择。getSelectedDataFunc方法是选中行的回调函数,返回当前选中的数据数组。给data数据添加_checked参数可设置当前数据是否选中,添加_disabled参数可禁止选择当前数据。"},{"example":,"title":" 万行以上数据渲染","code":"/**\n*\n* @title 万行以上数据渲染\n* @parent 无限滚动 Infinite-scroll\n* @description 万行数据渲染\n* demo1401\n*/\n\nimport React, { Component } from \"react\";\nimport {Tooltip} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\nimport BigData from \"tinper-bee/lib/bigData\";;\nconst BigDataTable = BigData(Table);\nconst columns = [\n {\n title:'序号',\n dataIndex:'index',\n width:'60',\n key:'index',\n render:(text,record,index)=>{\n return index\n }\n },\n {\n title: \"用户名\", dataIndex: \"a\", key: \"a\", width: 580, className: \"rowClassName\",\n render: (text, record, index) => {\n return (\n \n {text}\n \n );\n }\n },\n { id: \"123\", title: \"性别\", dataIndex: \"b\", key: \"b\", width: 80},\n { title: \"年龄\", dataIndex: \"c\", key: \"c\", width: 200 }\n\n];\n\nconst data = [ ...new Array(10000) ].map((e, i) => {\n const rs = { a: i + 'a', b: i + 'b', c: i + 'c', d: i + 'd', key: i };\n if(i%3==0){\n rs.b = '女';\n }\n return rs;\n })\n\n\nclass Demo30 extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n data: data,\n selectedRowIndex: 0\n }\n }\n\n render() {\n return (\n {\n console.log('currentIndex--'+index);\n }}\n />\n\n \n );\n }\n}\n\n","desc":" 万行数据渲染","scss_code":".big-data tr td {\n // height: 48px;\n}"},{"example":,"title":" 嵌套子表格滚动加载","code":"/**\n*\n* @title 嵌套子表格滚动加载\n* @parent 无限滚动 Infinite-scroll\n* @description 通过expandedRowRender参数来实现子表格\n* demo1402\n*/\n\nimport React, { Component } from \"react\";\nimport {Popconfirm} from 'tinper-bee';\nimport { Table } from 'tinper-bee';\nimport BigData from \"tinper-bee/lib/bigData\";;\nconst BigDataTable = BigData(Table);\nconst outColumns = [\n {\n title: \"操作\",\n dataIndex: \"d\",\n key: \"d\", \n width:200,\n render(text, record, index) {\n return (\n \n \n 一些操作\n \n \n );\n }\n },\n { title: \"用户名\", dataIndex: \"a\", key: \"a\", width: 250 },\n { id: \"123\", title: \"性别\", dataIndex: \"b\", key: \"b\", width: 100 },\n { title: \"年龄\", dataIndex: \"c\", key: \"c\", width: 200 },\n \n];\nconst innerColumns = [\n {\n title: \"操作\",\n dataIndex: \"d\",\n key: \"d\",\n width:200,\n render(text, record, index) {\n return (\n \n \n 一些操作\n \n \n );\n }\n },\n { title: \"用户名\", dataIndex: \"a\", key: \"a\", width: 100 },\n { id: \"123\", title: \"性别\", dataIndex: \"b\", key: \"b\", width: 100 },\n { title: \"年龄\", dataIndex: \"c\", key: \"c\", width: 200 },\n \n];\n\nconst data16 = [ ...new Array(10000) ].map((e, i) => {\n return { a: i + 'a', b: i + 'b', c: i + 'c', d: i + 'd', key: i };\n })\n\n\n\n\n\nclass Demo31 extends Component {\n constructor(props){\n super(props);\n this.state={\n data_obj:{\n 0:[\n { a: \"令狐冲\", b: \"男\", c: 41, d: \"操作\", key: \"1\" },\n { a: \"杨过\", b: \"男\", c: 67, d: \"操作\", key: \"2\" }\n ],\n 1: [\n { a: \"令狐冲\", b: \"男\", c: 41, d: \"操作\", key: \"1\" },\n { a: \"菲菲\", b: \"nv\", c: 67, d: \"操作\", key: \"2\" }\n ],\n }\n }\n }\n expandedRowRender = (record, index, indent) => {\n let height = 200;\n let innderData = [ ...new Array(100) ].map((e, i) => {\n return { a: index+\"-\"+ i + 'a', b: i + 'b', c: i + 'c', d: i + 'd', key: index+\"-\"+ i };\n })\n return (\n \n );\n };\n getData=(expanded, record)=>{\n //当点击展开的时候才去请求数据\n let new_obj = Object.assign({},this.state.data_obj);\n if(expanded){\n if(record.key==='1'){\n new_obj[record.key] = [\n { a: \"令狐冲\", b: \"男\", c: 41, d: \"操作\", key: \"1\" },\n { a: \"杨过\", b: \"男\", c: 67, d: \"操作\", key: \"2\" }\n ]\n this.setState({\n data_obj:new_obj\n })\n }else{\n new_obj[record.key] = [\n { a: \"令狐冲\", b: \"男\", c: 41, d: \"操作\", key: \"1\" },\n { a: \"菲菲\", b: \"nv\", c: 67, d: \"操作\", key: \"2\" }\n ]\n this.setState({\n data_obj:new_obj\n })\n }\n }\n }\n haveExpandIcon=(record, index)=>{\n //控制是否显示行展开icon,该参数只有在和expandedRowRender同时使用才生效\n if(index == 0){\n return true;\n }\n return false;\n }\n render() {\n return (\n \n );\n }\n}\n\n\n","desc":" 通过expandedRowRender参数来实现子表格"},{"example":,"title":" 多功能表格滚动加载","code":"/**\n*\n* @title 多功能表格滚动加载\n* @parent 无限滚动 Infinite-scroll\n* @description\n* demo1403\n*/\n\nimport React, { Component } from \"react\";\nimport {Tooltip,Checkbox,Icon,Popover} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\nimport BigData from \"tinper-bee/lib/bigData\";;\nimport multiSelect from \"tinper-bee/lib/multiSelect\";;\nimport filterColumn from \"tinper-bee/lib/filterColumn\";;\n\nlet ComplexTable = filterColumn(multiSelect(BigData(Table), Checkbox), Popover, Icon);\n\nconst columns = [\n {\n title:'序号',\n dataIndex:'index',\n width:'80',\n key:'index',\n render:(text,record,index)=>{\n return index\n }\n },\n {\n title: \"用户名\", dataIndex: \"a\", key: \"a\", width: 580, className: \"rowClassName\",\n render: (text, record, index) => {\n return (\n \n {text}\n \n );\n }\n },\n { id: \"123\", title: \"性别\", dataIndex: \"b\", key: \"b\", width: 80},\n { title: \"年龄\", dataIndex: \"c\", key: \"c\", width: 200 }\n];\n\nconst data = [ ...new Array(10000) ].map((e, i) => {\n const rs = { a: i + 'a', b: i + 'b', c: i + 'c', d: i + 'd', key: i };\n if(i%3==0){\n rs.b = '女';\n }\n return rs;\n })\n\n\nclass Demo32 extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n data: data,\n selectedRowIndex: 0\n }\n }\n getSelectedDataFunc = data => {\n console.log(data);\n };\n\n render() {\n return (\n {\n this.setState({\n selectedRowIndex: index\n });\n }}\n getSelectedDataFunc={this.getSelectedDataFunc}/>\n\n );\n }\n}\n\n\n","desc":""},{"example":,"title":" 层级树大数据场景","code":"/**\n* @title 层级树大数据场景\n* @parent 无限滚动 Infinite-scroll\n* @description\n* demo1404\n*/\nimport React, { Component } from \"react\";\nimport {Tooltip} from \"tinper-bee\";\n\nimport { Table } from 'tinper-bee';\nimport BigData from \"tinper-bee/lib/bigData\";;\nconst BigDataTable = BigData(Table);\nconst columns = [\n {\n title:'序号',\n dataIndex:'index',\n width:'150',\n key:'index',\n render:(text,record,index)=>{\n return index\n }\n },\n {\n title: \"用户名\", dataIndex: \"a\", key: \"a\", width: 580, className: \"rowClassName\",\n render: (text, record, index) => {\n return (\n \n {text}\n \n );\n }\n },\n { id: \"123\", title: \"性别\", dataIndex: \"b\", key: \"b\", width: 80},\n { title: \"年龄\", dataIndex: \"c\", key: \"c\", width: 200 }\n];\n\nconst data = [ ...new Array(1000) ].map((e, i) => {\n const rs = { a: i + 'a', b: i + 'b', c: i + 'c', d: i + 'd', key: i };\n if(i%3==0){\n rs.b = '女';\n rs.children = [];\n for(let subi=0;subi<3;subi++){\n rs.children.push({a: i +subi + 'asub', b: i +subi + 'bsub', c: i + subi +'csub', d: i + subi +'dsub', key: i+ `${subi} sub`});\n }\n }else{\n rs.children = [];\n for(let subi=0;subi<3;subi++){\n rs.children.push({a: i +subi + 'asub', b: i +subi + 'bsub', c: i + subi +'csub', d: i + subi +'dsub', key: i+ `${subi} sub`});\n }\n }\n return rs;\n })\n\n\nclass Demo34 extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n data: data,\n selectedRowIndex: 0\n }\n }\n onExpandedRowsChange = (params)=>{\n console.log(params);\n }\n onExpand = (expandKeys)=>{\n console.log('expand---'+expandKeys);\n }\n render() {\n return (\n {\n console.log('currentIndex--'+index);\n }}\n />\n\n \n );\n }\n}\n\n","desc":""},{"example":,"title":" 表格+分页","code":"/**\n * @title 表格+分页\n * @parent 分页 Pagination\n * @description 点击分页联动表格\n * demo1601\n */\n\nimport React, { Component } from \"react\";\nimport {Pagination} from \"tinper-bee\";\n\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n { title: \"员工编号\", dataIndex: \"a\", key: \"a\", width: 300, className: \"rowClassName\"},\n { title: \"员工姓名\", dataIndex: \"b\", key: \"b\", width: 500 },\n { title: \"性别\", dataIndex: \"c\", key: \"c\", width: 500 },\n { title: \"部门\", dataIndex: \"d\", key: \"d\", width: 200 }\n];\n\nconst pageData = {\n 1: [\n { a: \"ASVAL_201903280005\", b: \"小张\", c: \"男\", d: \"财务二科\", key: \"1\" },\n { a: \"ASVAL_201903200004\", b: \"小明\", c: \"男\", d: \"财务一科\", key: \"2\" },\n { a: \"ASVAL_201903120002\", b: \"小红\", c: \"女\", d: \"财务一科\", key: \"3\" }\n ],\n 2: [\n { a: \"ASVAL_201903280010\", b: \"小王\", c: \"女\", d: \"财务二科\", key: \"4\" },\n { a: \"ASVAL_201903200021\", b: \"小李\", c: \"男\", d: \"财务一科\", key: \"5\" },\n ]\n};\n\nclass Demo8 extends Component {\n constructor(props) {\n super(props);\n this.state = {\n data: pageData[1],\n activePage: 1\n };\n }\n\n handleSelect(eventKey) {\n this.setState({\n data: pageData[eventKey],\n activePage: eventKey\n });\n }\n\n render() {\n return (\n \n );\n }\n}\n\n","desc":" 点击分页联动表格","scss_code":".demo8{\n .u-table {\n margin-bottom: 11px;\n }\n .u-pagination{\n display: flex;\n align-items: center;\n justify-content: center;\n }\n}"}]
class Demo extends Component {
diff --git a/dist/demo.css b/dist/demo.css
index 70b616b..9628e50 100644
--- a/dist/demo.css
+++ b/dist/demo.css
@@ -1,632 +1,3 @@
-/* FormGroup */
-/* Navlayout */
-.u-table {
- font-size: 12px;
- color: #212121;
- position: relative;
- line-height: 1.33;
- overflow: hidden; }
- .u-table-body {
- position: relative; }
- .u-table-hiden-drag {
- position: relative; }
- .u-table-hiden-drag-li {
- position: absolute;
- top: 0px;
- left: 0px; }
- .u-table table {
- width: 100%;
- border-collapse: collapse;
- text-align: left; }
- .u-table th {
- font-weight: bold;
- text-align: left;
- line-height: 16px; }
- .u-table th[colspan] {
- text-align: center; }
- .u-table th ::last-child {
- overflow: hidden; }
- .u-table td {
- border-bottom: 1px solid rgb(193, 199, 208);
- line-height: 1.33; }
- .u-table td a {
- color: #2196F3; }
- .u-table td a:hover {
- color: #1565c0; }
- .u-table td a:active {
- color: #1565c0; }
- .u-table thead tr:last-child {
- border-bottom: 1px solid #C1C7D0; }
- .u-table thead tr > th:last-child {
- border-right: none; }
- .u-table tr:hover td .uf-eye {
- visibility: visible !important; }
- .u-table tr tr a {
- color: #2196F3; }
- .u-table tr tr a:hover {
- color: #1565c0; }
- .u-table tr tr a:active {
- color: #1565c0; }
- .u-table tr.tr-row-hover {
- background: rgb(235, 236, 240); }
- .u-table th,
- .u-table td {
- padding: 12px 8px;
- word-break: break-all; }
- .u-table th.text-center,
- .u-table td.text-center {
- text-align: center; }
- .u-table th.text-right,
- .u-table td.text-right {
- text-align: right; }
- .u-table-sm td {
- padding: 8px 8px; }
- .u-table-lg td {
- padding: 16px 8px; }
- .u-table tr.filterable th {
- padding-top: 5px !important;
- padding-bottom: 5px !important; }
- .u-table tr.filterable th .filterContext {
- height: 35px; }
- .u-table tr.filterable th .u-select-selection--single {
- height: 26px; }
- .u-table-row-hover {
- background: rgb(235, 236, 240); }
- .u-table-scroll {
- overflow: auto; }
- .u-table-bordered table {
- border: 1px solid rgb(193, 199, 208);
- box-sizing: border-box;
- table-layout: fixed; }
- .u-table-bordered .u-table-header > table {
- border-bottom: 0; }
- .u-table-bordered .u-table-header ~ .u-table-body table, .u-table-bordered .u-table-header ~ .u-table-body-outer table {
- border-top: 0px; }
- .u-table-bordered th {
- border-bottom: 1px solid rgb(193, 199, 208);
- box-sizing: border-box; }
- .u-table-bordered th,
- .u-table-bordered td {
- border-right: 1px solid rgb(193, 199, 208);
- box-sizing: border-box; }
- .u-table-drag-border tr th.th-can-not-drag {
- overflow: hidden; }
- .u-table-header {
- overflow: hidden;
- background: rgb(241, 242, 245);
- color: rgb(33, 33, 33); }
- .u-table.fixed-height td {
- padding: 0px 8px; }
- .u-table-fixed-header .u-table-body {
- background: #fff;
- position: relative; }
- .u-table-fixed-left .u-table-body-inner {
- margin-right: -20px;
- padding-right: 20px; }
- .u-table-fixed-header .u-table-fixed-left .u-table-body-inner {
- padding-right: 0px; }
- .u-table-fixed-header .u-table-body-inner {
- height: 100%; }
- .u-table-fixed-header .u-table-scroll .u-table-header {
- overflow-x: scroll;
- padding-bottom: 20px;
- margin-bottom: -20px;
- overflow-y: scroll;
- box-sizing: border-box; }
- .u-table-title {
- padding: 12px 8px;
- border-top: 1px solid rgb(193, 199, 208); }
- .u-table-content {
- position: relative; }
- .u-table-footer {
- padding: 12px 8px;
- border-bottom: 1px solid rgb(193, 199, 208); }
- .u-table-footer .u-table-scroll {
- overflow-x: hidden; }
- .u-table-footer .u-table {
- margin: -12px -8px; }
- .u-table-placeholder {
- padding: 12px 8px;
- background: #fff;
- border-bottom: 1px solid rgb(193, 199, 208);
- text-align: center;
- position: relative; }
- .u-table-placeholder .table-nodata {
- font-size: 48px; }
- .u-table-expand-icon-col {
- width: 10px; }
- .u-table-row .u-table tr, .u-table-expanded-row .u-table tr {
- background: #fff; }
- .u-table-row .u-table tr.u-table-row-hover, .u-table-expanded-row .u-table tr.u-table-row-hover {
- background: rgb(235, 236, 240); }
- .u-table-row-expand-icon, .u-table-expanded-row-expand-icon {
- cursor: pointer;
- display: inline-block;
- margin-right: 0px;
- width: 16px;
- height: 16px;
- text-align: center;
- line-height: 16px;
- border: 1px solid rgb(193, 199, 208);
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- background: #fff;
- margin-right: 10px; }
- .u-table-row-spaced, .u-table-expanded-row-spaced {
- visibility: hidden; }
- .u-table-row-spaced:after, .u-table-expanded-row-spaced:after {
- content: "."; }
- .u-table-row-expanded:after, .u-table-expanded-row-expanded:after {
- content: "-"; }
- .u-table-row-collapsed:after, .u-table-expanded-row-collapsed:after {
- content: "+"; }
- .u-table-row.selected {
- background: #FFF7E7; }
- .u-table tr.u-table-expanded-row {
- background: #f7f7f7; }
- .u-table tr.u-table-expanded-row:hover {
- background: #f7f7f7; }
- .u-table tr.u-table-expanded-row .u-table {
- z-index: 1; }
- .u-table-column-hidden {
- display: none; }
- .u-table-prev-columns-page, .u-table-next-columns-page {
- cursor: pointer;
- color: #666;
- z-index: 1; }
- .u-table-prev-columns-page:hover, .u-table-next-columns-page:hover {
- color: #2db7f5; }
- .u-table-prev-columns-page-disabled, .u-table-next-columns-page-disabled {
- cursor: not-allowed;
- color: #999; }
- .u-table-prev-columns-page-disabled:hover, .u-table-next-columns-page-disabled:hover {
- color: #999; }
- .u-table-prev-columns-page {
- margin-right: 8px; }
- .u-table-prev-columns-page:before {
- content: "<"; }
- .u-table-next-columns-page {
- float: right; }
- .u-table-next-columns-page:before {
- content: ">"; }
- .u-table-fixed-left, .u-table-fixed-right {
- position: absolute;
- top: 0;
- overflow: hidden;
- z-index: 1; }
- .u-table-fixed-left table, .u-table-fixed-right table {
- width: auto;
- background: #fff; }
- .u-table-fixed-left {
- left: 0;
- box-shadow: 4px 0 4px rgba(100, 100, 100, 0.1); }
- .u-table-fixed-left-body-inner {
- margin-right: -20px;
- padding-right: 20px; }
- .u-table-fixed-left-fixed-header .u-table-fixed-left .u-table-fixed-left-body-inner {
- padding-right: 0; }
- .u-table-fixed-right {
- right: 0;
- box-shadow: -4px 0 4px rgba(100, 100, 100, 0.1); }
- .u-table-fixed-right-expanded-row {
- color: transparent;
- pointer-events: none; }
- .u-table-scroll-position-left .u-table-fixed-left {
- box-shadow: none; }
- .u-table-scroll-position-right .u-table-fixed-right {
- box-shadow: none; }
- .u-table-thead .filter-text, .u-table-thead .filter-dropdown, .u-table-thead .filter-date {
- font-weight: normal; }
- .u-table-thead .filter-wrap {
- display: -ms-flexbox;
- display: flex;
- -ms-flex-pack: center;
- justify-content: center;
- -ms-flex-align: center;
- align-items: center; }
- .u-table-thead .filter-wrap .filter-btns {
- min-width: 58px; }
- .u-table-thead th {
- background: rgb(241, 242, 245);
- color: rgb(33, 33, 33);
- background-clip: padding-box;
- -moz-user-select: -moz-none;
- -webkit-user-select: none;
- /*
- Introduced in IE 10.
- */
- -ms-user-select: none;
- user-select: none; }
- .u-table-thead th .bee-table-column-sorter {
- position: relative;
- margin-left: 4px;
- height: 16px;
- vertical-align: middle;
- text-align: center;
- display: inline-block;
- margin-top: -3px; }
- .u-table-thead th .bee-table-column-sorter i {
- padding: 0px;
- font-weight: 600;
- color: #505F79; }
- .u-table-thead th .bee-table-column-sorter > .bee-table-column-sorter-down,
- .u-table-thead th .bee-table-column-sorter > .bee-table-column-sorter-up, .u-table-thead th .bee-table-column-sorter > .bee-table-column-sorter-flat {
- line-height: 16px;
- display: block;
- width: 34px;
- cursor: pointer; }
- .u-table-thead th .bee-table-column-sorter-down.on .uf-triangle-down,
- .u-table-thead th .bee-table-column-sorter-down.on .uf-triangle-up,
- .u-table-thead th .bee-table-column-sorter-up.on .uf-triangle-down,
- .u-table-thead th .bee-table-column-sorter-up.on .uf-triangle-up {
- color: #108ee9; }
- .u-table-thead th .bee-table-column-sorter .uf-triangle-down,
- .u-table-thead th .bee-table-column-sorter .uf-triangle-up {
- filter: none;
- font-size: 12px; }
- .u-table-thead th .bee-table-column-sorter .uf-triangle-down,
- .u-table-thead th .bee-table-column-sorter .uf-triangle-up {
- display: inline-block;
- padding: 0;
- font-size: 12px;
- font-size: 8px\9;
- transform: scale(0.66667) rotate(0deg);
- -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', M11=1, M12=0, M21=0, M22=1)";
- zoom: 1;
- line-height: 4px;
- height: 4px;
- color: #999; }
- .u-table-thead th:hover .bee-table-column-sorter {
- display: inline-block; }
- .u-table-thead .th-drag {
- cursor: move; }
- .u-table-thead .th-drag:hover {
- background: rgb(235, 236, 240); }
- .u-table-thead .th-drag-hover {
- background: #ccc; }
- .u-table-thead-th {
- position: relative; }
- .u-table-thead-th-drag-gap {
- height: 100%;
- position: absolute;
- right: -10px;
- top: 0;
- width: 20px;
- box-sizing: border-box;
- z-index: 1; }
- .u-table-thead-th-drag-gap .online {
- height: 100%;
- width: 1px;
- background: transparent;
- margin: 0 auto; }
- .u-table-thead-th-drag-gap .online-hover {
- background: #000000; }
- .u-table-thead-th-drag-gap:hover {
- cursor: col-resize; }
- .u-table-thead-th-drag-gap:hover .online {
- background: #000000; }
- .u-table-thead-th:last-child-drag-gap {
- border: none; }
- .u-table-filter-column-pop-cont {
- margin: 0px;
- max-height: 300px;
- overflow-y: scroll;
- color: #212121; }
- .u-table-filter-column-clear-setting {
- cursor: pointer;
- margin-bottom: 4px; }
- .u-table-filter-column-cont {
- position: relative; }
- .u-table-filter-column-filter-icon {
- position: absolute;
- width: 30px;
- height: 38px;
- line-height: 38px;
- right: 12px;
- top: 1px;
- z-index: 2;
- background: rgb(241, 242, 245);
- text-align: center;
- cursor: pointer; }
- .u-table-filter-column-filter-icon i.uf {
- padding: 0px;
- color: #505F79; }
- .u-table-filter-column-pop-cont-item {
- margin-top: 8px;
- font-size: 12px;
- cursor: pointer; }
- .u-table-filter-column-pop-cont-item .u-checkbox {
- margin: 0px; }
- .u-table-filter-column-pop-cont-item > span {
- margin-left: -3px;
- max-width: 132px;
- width: auto !important;
- min-width: 56px;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- display: inline-block;
- vertical-align: middle; }
- .u-table-filter-column-pop .u-modal-dialog {
- border: 1px solid #ccc;
- background: #fff; }
- .u-table-row-fixed-columns-in-body {
- display: none;
- pointer-events: none; }
- .u-table .u-checkbox {
- height: 14px;
- line-height: 14px;
- margin: 0px; }
- .u-table .u-checkbox .u-checkbox-label {
- line-height: 14px;
- padding-left: 16px; }
- .u-table .u-checkbox .u-checkbox-label:before, .u-table .u-checkbox .u-checkbox-label:after {
- width: 14px;
- height: 14px; }
- .u-table .u-table-scroll tr td:first-child, .u-table .u-table-scroll tr th:first-child, .u-table .u-table-fixed-left tr td:first-child, .u-table .u-table-fixed-left tr th:first-child {
- padding-left: 12px; }
- .u-table.has-fixed-left .u-table-scroll tr td:first-child, .u-table.has-fixed-left .u-table-scroll tr th:first-child {
- padding-left: 8px; }
-
-.u-table:focus {
- outline: none;
- box-shadow: 0 0 0; }
-
-.u-table-bordered .u-table-drag-gap {
- background: #e9e9e9; }
-
-.u-table.bordered table {
- border-collapse: collapse; }
-
-.u-table.bordered th,
-.u-table.bordered td {
- border: 1px solid rgb(193, 199, 208); }
-
-.move-enter,
-.move-appear {
- opacity: 0;
- animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
- animation-duration: 2.5s;
- animation-fill-mode: both;
- animation-play-state: paused; }
-
-.move-leave {
- animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
- animation-duration: 0.5s;
- animation-fill-mode: both;
- animation-play-state: paused; }
-
-.move-enter.move-enter-active,
-.move-appear.move-enter-active {
- animation-name: moveLeftIn;
- animation-play-state: running; }
-
-.move-leave.move-leave-active {
- animation-name: moveRightOut;
- animation-play-state: running; }
-
-@keyframes moveLeftIn {
- 0% {
- transform-origin: 0 0;
- transform: translateX(30px);
- opacity: 0;
- background: rgb(238,238,238); }
- 20% {
- transform-origin: 0 0;
- transform: translateX(0);
- opacity: 1; }
- 80% {
- background: rgb(238,238,238); }
- 100% {
- background: transparent;
- opacity: 1; } }
-
-@keyframes moveRightOut {
- 0% {
- transform-origin: 0 0;
- transform: translateX(0);
- opacity: 1; }
- 100% {
- transform-origin: 0 0;
- transform: translateX(-30px);
- opacity: 0; } }
-
-.formItem-style {
- height: unset;
- min-height: unset;
- padding: 0; }
-
-.errMessage-style {
- display: none;
- border: none;
- /* margin-top: 5px; */
- /* margin-bottom: 5px; */
- background: transparent;
- color: #f22c1d;
- /* padding-left: 12px; */
- /* padding-right: 12px; */
- margin: 0;
- position: absolute;
- padding: 0;
- top: 3px;
- right: 0; }
-
-.editable-cell {
- position: relative; }
-
-.editable-cell-input-wrapper,
-.editable-cell-text-wrapper {
- padding-right: 24px; }
-
-.editable-cell-input-wrapper .u-form-item.formItem-style .u-label {
- display: none; }
-
-.editable-cell-input-wrapper .u-input-group .u-form-control {
- height: 26px;
- font-size: 12px; }
-
-.editable-cell-text-wrapper {
- padding: 5px 24px 5px 5px;
- height: 30px; }
-
-.editable-cell-icon,
-.editable-cell-icon-check {
- position: absolute;
- top: 0;
- right: 0;
- width: 20px;
- cursor: pointer; }
-
-.editable-cell-icon {
- line-height: 28px;
- display: none; }
-
-.editable-cell-icon-check {
- line-height: 28px; }
-
-.editable-cell:hover .editable-cell-icon {
- display: inline-block; }
-
-.editable-cell-icon:hover,
-.editable-cell-icon-check:hover {
- color: #2db7f5; }
-
-.editable-add-btn {
- margin-bottom: 8px; }
-
-.search-component {
- margin-bottom: 20px; }
- .search-component .empty-search {
- position: absolute;
- right: 45px;
- z-index: 20;
- top: 5px;
- color: #524e4e;
- cursor: pointer; }
- .search-component.u-input-group.simple {
- float: right; }
- .search-component.u-input-group.simple .u-form-control {
- width: 251px;
- background: #f5f5f5;
- border-color: #f5f5f5;
- border-radius: 20px; }
- .search-component.u-input-group.simple .u-input-group-btn {
- top: 3px;
- right: 20px;
- position: absolute; }
-
-.col-resize-container {
- height: 0px;
- position: relative; }
- .col-resize-container + .table-col-resizer:first-of-type {
- table-layout: fixed; }
- .col-resize-container .active-drag .icon {
- visibility: visible; }
- .col-resize-container .last-handle {
- display: none; }
- .col-resize-container .drag-handle {
- margin-left: -5px;
- position: absolute;
- z-index: 5;
- width: 10px;
- cursor: col-resize; }
- .col-resize-container .drag-handle .icon {
- color: #40b0dc;
- top: -1px;
- position: absolute;
- visibility: hidden; }
- .col-resize-container .drag-handle .icon:first-child {
- left: -2px; }
- .col-resize-container .drag-handle .icon:last-child {
- left: 6px; }
- .col-resize-container .drag-handle:hover .icon {
- visibility: visible; }
- .col-resize-container .drag-handle:hover .col-resizer {
- border: 1px solid; }
- .col-resize-container .drag-handle.disabled-drag {
- cursor: default;
- display: none; }
- .col-resize-container .drag-handle .col-resizer {
- position: absolute;
- width: 1px;
- height: 100%;
- top: 0px;
- left: 3px; }
-
-.u-filter-dropdown-menu-wrap {
- z-index: 1800; }
- .u-filter-dropdown-menu-wrap .u-dropdown-menu li.u-dropdown-menu-item {
- line-height: 26px;
- height: 26px;
- padding: 0px 16px 0 16px;
- cursor: pointer; }
-
-.filter-wrap .u-form-control {
- height: 26px; }
-
-.filter-wrap .u-input-number.u-input-group.simple .u-input-group-btn .icon-group {
- height: 26px; }
-
-.u-row-hover {
- position: absolute;
- right: 24px;
- display: none;
- -ms-flex-align: center;
- align-items: center;
- -ms-flex-pack: center;
- justify-content: center;
- background: transparent; }
-
-.u-row-hover2 {
- position: absolute;
- left: 100; }
-
-::-webkit-scrollbar {
- width: 8px;
- height: 8px; }
-
-::-webkit-scrollbar-button {
- display: none; }
-
-::-webkit-scrollbar-thumb {
- background: #d5d5d5 !important;
- border-radius: 5px; }
-
-::-webkit-scrollbar-thumb {
- border-radius: 4px;
- background-color: #d5d5d5;
- position: absolute; }
-
-::-webkit-scrollbar-track {
- display: none; }
-
-::-webkit-scrollbar-track-piece {
- display: none; }
-
-.header-dispaly-in-row.u-table table {
- table-layout: fixed; }
-
-.header-dispaly-in-row th {
- text-overflow: ellipsis;
- white-space: nowrap;
- vertical-align: middle;
- overflow: hidden; }
-
-.body-dispaly-in-row.u-table table {
- table-layout: fixed; }
-
-.body-dispaly-in-row td {
- text-overflow: ellipsis;
- white-space: nowrap;
- vertical-align: middle;
- overflow: hidden; }
-
-.u-table-drag-hidden-cont {
- position: absolute;
- top: -1000px; }
-
.selected {
background: #FFF7E7; }
@@ -654,22 +25,43 @@
padding-top: 0px;
padding-bottom: 0px; }
-.demo501 .editable-cell-text-wrapper:hover {
- border: 1px dashed #A5ADBA; }
+.demo0502 .u-table-row td {
+ padding: 5px 8px; }
+ .demo0502 .u-table-row td input.error {
+ border-color: #F44336; }
-.demo501 .require {
+.demo0502 .u-table-row .editable-cell {
+ height: 30px; }
+
+.demo0502 .u-table-row-hover .editable-cell-text-wrapper {
+ line-height: 18px;
+ border: 1px solid #c1c7d0; }
+
+.demo0502 .u-table-row .u-form-control,
+.demo0502 .u-table-row .u-select-selection {
+ height: 30px; }
+
+.demo0502 .editable-cell-text-wrapper {
+ box-sizing: border-box;
+ line-height: 20px;
+ border-radius: 3px; }
+ .demo0502 .editable-cell-text-wrapper:hover {
+ line-height: 18px;
+ border: 1px solid #a5adba; }
+
+.demo0502 .require {
position: absolute;
top: 2px;
- color: red;
+ color: #F44336;
font-size: 20px; }
.help-tip {
color: #F44336; }
-.tp-501 .tooltip-arrow {
+.tp-0502 .tooltip-arrow {
border-bottom-color: #F44336 !important; }
-.tp-501 .tooltip-inner {
+.tp-0502 .tooltip-inner {
border-color: #F44336 !important; }
th .drop-menu .uf {
diff --git a/dist/demo.css.map b/dist/demo.css.map
index 2bdd948..2a63f6d 100644
--- a/dist/demo.css.map
+++ b/dist/demo.css.map
@@ -1 +1 @@
-{"version":3,"sources":["../node_modules/tinper-bee-core/scss/minxin-variables.scss","../src/Table.scss","TableDemo.scss","demolist/Demo0104.scss","demolist/Demo0302.scss","demolist/Demo0402.scss","demolist/Demo0502.scss","demolist/Demo0603.scss","demolist/Demo1601.scss"],"names":[],"mappings":"AAsXA,eAAe;AAWf,iBAAiB;ACzWjB;EACE,gBApBmB;EAqBnB,eDiBuB;ECfvB,mBAAkB;EAClB,kBAvBgB;EAwBhB,iBAAgB,EAilBjB;EAhlBC;IAEE,mBAAkB,EACnB;EACD;IACE,mBAAkB,EAOnB;IANC;MACE,mBAAkB;MAClB,SAAQ;MACR,UAAS,EAEV;EAlBL;IAqBI,YAAW;IACX,0BAAyB;IACzB,iBAAgB,EACjB;EAxBH;IA4BI,kBA9ByB;IA+BzB,iBAAgB;IAEhB,kBAAiB,EAOlB;IAtCH;MAiCM,mBAAkB,EACnB;IAlCL;MAoCM,iBAAgB,EACjB;EArCL;IAyCI,4CAzD4D;IA0D5D,kBA5Dc,EAsEf;IApDH;MA4CM,eAAc,EAOf;MAnDL;QA8CQ,eAAc,EACf;MA/CP;QAiDQ,eAAc,EACf;EAlDP;IAuDM,iCA5DyB,EA6D1B;EAxDL;IA0DM,mBAAkB,EACnB;EA3DL;IAmEU,+BAA8B,EAC/B;EApET;IAwEM,eAAc,EAOf;IA/EL;MA0EQ,eAAc,EACf;IA3EP;MA6EQ,eAAc,EACf;EA9EP;IAkFI,+BD0G8D,ECzG/D;EAnFH;;IAuFI,kBAnGoB;IAoGpB,sBAAqB,EAOtB;IA/FH;;MA0FM,mBAAkB,EACnB;IA3FL;;MA6FM,kBAAiB,EAClB;EAEF;IAEG,iBA9GkB,EA+GnB;EAEF;IAEG,kBAnHkB,EAoHnB;EAxGL;IA8GQ,4BAA2B;IAC3B,+BAA8B,EAO/B;IAtHP;MAiHU,aAAY,EACb;IAlHT;MAoHU,aAAY,EACb;EAIP;IACE,+BAAuD,EACxD;EAED;IACE,eAAc,EACf;EACA;IAEG,qCAlJ0D;IAmJ1D,uBAAsB;IACtB,oBAAmB,EAEpB;EANF;IASK,iBAAgB,EACnB;EAVF;IAaK,gBAAgB,EACjB;EAdJ;IAkBG,4CAlK0D;IAmK1D,uBAAsB,EACvB;EApBF;;IAuBG,2CAvK0D;IAwK1D,uBAAsB,EACvB;EAEF;IAGK,iBAAgB,EACjB;EAGL;IACE,iBAAgB;IAChB,+BD2xC2E;IC1xC3E,uBD2xC+D,EC1xChE;EAtKH;IAyKI,iBArLoB,EAsLrB;EAED;IACE,iBAAgB;IAChB,mBAAkB,EACnB;EACD;IACE,oBAAmB;IACnB,oBAAmB,EACpB;EAEA;IACC,mBAAkB,EACnB;EAED;IACE,aAAY,EAEb;EAGD;IACE,mBAAkB;IAClB,qBAAoB;IACpB,qBAAoB;IACpB,mBAAkB;IAClB,uBAAsB,EACvB;EAED;IACE,kBApNoB;IAqNpB,yCAzN4D,EA0N7D;EAED;IACE,mBAAkB,EACnB;EAED;IACE,kBA7NoB;IA8NpB,4CAlO4D,EAsO7D;IANA;MAIG,mBAAkB,EACnB;EAEH;IACE,mBApOoB,EAqOrB;EAED;IACE,kBAA8B;IAC9B,iBAAgB;IAChB,4CA9O4D;IA+O5D,mBAAkB;IAClB,mBAAkB,EAEnB;IAPA;MAMgB,gBAAc,EAAI;EAGnC;IACE,YAAW,EACZ;EACA;IAIK,iBAAgB,EACjB;EALJ;IAOK,+BAAuD,EACxD;EAEH;IACE,gBAAe;IACf,sBAAqB;IACrB,kBAAiB;IACjB,YAAW;IACX,aAAY;IACZ,mBAAkB;IAClB,kBAAiB;IACjB,qCAzQ0D;IA0Q1D,0BAAiB;IAAjB,uBAAiB;IAAjB,sBAAiB;IAAjB,kBAAiB;IACjB,iBAAgB;IAChB,mBAAkB,EACnB;EACD;IACE,mBAAkB,EACnB;EACD;IACE,aAAY,EACb;EAED;IACE,aAAY,EACb;EAED;IACE,aAAY,EACb;EAEF;IAEG,oBAAmB,EACpB;EAhRL;IAmRI,oBAAmB,EAQpB;IA3RH;MAqRM,oBAAmB,EACpB;IAtRL;MAyRM,WAAU,EACX;EAEH;IACE,cAAa,EACd;EACD;IAEE,gBAAe;IACf,YAAW;IACX,WAAU,EAWX;IAfA;MAMG,eAAc,EACf;IACD;MACE,oBAAmB;MACnB,YAAW,EAIZ;MANA;QAIG,YAAW,EACZ;EAGL;IACE,kBAAiB,EAIlB;IALA;MAGG,aAAY,EACb;EAEH;IACE,aAAY,EAIb;IALA;MAGG,aAAY,EACb;EAGH;IAEE,mBAAkB;IAClB,OAAM;IACN,iBAAgB;IAChB,WAAU,EAKX;IAVA;MAOG,YAAW;MACX,iBAAgB,EACjB;EAGH;IACE,QAAO;IACP,+CAA8C,EAQ/C;IAPC;MACE,oBAAmB;MACnB,oBAAmB,EACpB;IACD;MACE,iBAAgB,EACjB;EAGH;IACE,SAAQ;IACR,gDAA+C,EAShD;IALC;MACE,mBAAkB;MAClB,qBAAoB,EACrB;EAIH;IACE,iBAAgB,EACjB;EAED;IACE,iBAAgB,EACjB;EAEA;IAEG,oBAAmB,EACpB;EAHF;IAKG,qBAAa;IAAb,cAAa;IACb,sBAAuB;IAAvB,wBAAuB;IACvB,uBAAmB;IAAnB,oBAAmB,EAIpB;IAXF;MASK,gBAAe,EAChB;EAVJ;IAaG,+BDykCyE;ICxkCzE,uBDykC6D;ICxkC7D,6BAA2B;IAE3B,4BAA2B;IAE3B,0BAAyB;IACzB;;QAEE;IACA,sBAAqB;IACrB,kBAAiB,EA+DpB;IAvFF;MA8BK,mBAAkB;MAClB,iBAAgB;MAChB,aAAY;MACZ,uBAAsB;MACtB,mBAAkB;MAClB,sBAAqB;MACrB,iBAAgB,EAejB;MAnDJ;QAsCO,aAAY;QACZ,iBAAgB;QAChB,eAlZS,EAmZV;MAzCN;;QA6CO,kBAAiB;QACjB,eAAc;QACd,YAAW;QACX,gBAAe,EAChB;IAjDN;;;;MAyDK,eAAc,EACf;IA1DJ;;MA8DK,aAAY;MACZ,gBAAe,EAChB;IAhEJ;;MAmEK,sBAAqB;MACrB,WAAU;MACV,gBAAe;MACf,iBAAgB;MAGhB,uCAAyC;MACzC,+GAA8G;MAC9G,QAAO;MACP,iBAAgB;MAChB,YAAW;MACX,YAAW,EAGZ;IAjFJ;MAoFS,sBAAqB,EACxB;EArFN;IAyFG,aAAY,EACb;EA1FF;IA4FG,+BDzQ4D,EC2Q7D;EA9FF;IAoGG,iBAAgB,EACjB;EACD;IACE,mBAAkB,EAgCnB;IA9BC;MACE,aAAY;MACZ,mBAAkB;MAClB,aAAY;MACZ,OAAM;MAIN,YAAW;MAEX,uBAAsB;MACtB,WAAU,EAYX;MAvBA;QAcG,aAAY;QACZ,WAAU;QACV,wBAAsB;QACtB,eAAc,EACf;MAlBF;QAoBG,oBAAkB,EACnB;IAGH;MACE,mBAAkB,EAInB;MALA;QAGG,oBACF,EAAC;EAGJ;IAEG,aAAY,EACb;EAOH;IACE,YAAW;IACX,kBAAiB;IACjB,mBAAkB;IAClB,eAAa,EACd;EACD;IAEE,gBAAe;IACf,mBAAkB,EACnB;EACD;IACE,mBAAkB,EACnB;EACD;IACE,mBAAkB;IAClB,YAAW;IACX,aAAa;IACb,kBAAiB;IACjB,YAAY;IACZ,SAAQ;IACR,WAAU;IACV,+BD86ByE;IC76BzE,mBAAkB;IAClB,gBAAe,EAKhB;IAfA;MAYG,aAAY;MACZ,eAvhBW,EAwhBZ;EAEH;IACE,gBAAe;IACf,gBAAe;IAEf,gBAAe,EAKhB;IATA;MAMG,YAAW,EAEZ;EAEH;IACE,kBAAiB;IACjB,iBAAgB;IAChB,uBAAsB;IACtB,gBAAe;IACf,iBAAgB;IAChB,wBAAuB;IACvB,oBAAmB;IACnB,sBAAqB;IACrB,uBAAsB,EACvB;EACD;IACE,uBAAsB;IACtB,iBAAgB,EACjB;EAGH;IAEE,cAAY;IACZ,qBAAoB,EACrB;EAxjBH;IA2jBI,aAjkBiB;IAkkBjB,kBAlkBiB;IAmkBjB,YAAU,EASX;IAtkBH;MA+jBM,kBArkBe;MAskBf,mBAAkB,EAKnB;MArkBL;QAkkBQ,YAxkBa;QAykBb,aAzkBa,EA0kBd;EApkBP;IA0kBQ,mBArlBuB,EAslBxB;EA3kBP;IAklBU,kBA9lBc,EA+lBf;;AAKT;EACE,cAAa;EAGb,kBAAiB,EAClB;;AAEC;EAEI,oBAAkB,EACnB;;AAEL;EAEI,0BAAyB,EAC1B;;AAHH;;EAMI,qCA1nB4D,EA2nB7D;;AAGH;;EAEE,WAAU;EACV,+DAA8D;EAC9D,yBAAwB;EACxB,0BAAyB;EACzB,6BAA4B,EAC7B;;AAED;EACE,kEAAiE;EACjE,yBAAwB;EACxB,0BAAyB;EACzB,6BAA4B,EAC7B;;AAED;;EAEE,2BAA0B;EAC1B,8BAA6B,EAC9B;;AAED;EACE,6BAA4B;EAC5B,8BAA6B,EAC9B;;AAED;EACE;IACE,sBAAqB;IACrB,4BAA2B;IAC3B,WAAU;IACV,6BDxmB+C,EAAA;EC0mBjD;IACE,sBAAqB;IACrB,yBAAwB;IACxB,WAAU,EAAA;EAEZ;IACE,6BDhnB+C,EAAA;ECknBjD;IACE,wBAAuB;IACvB,WAAU,EAAA,EAAA;;AAId;EACE;IACE,sBAAqB;IACrB,yBAAwB;IACxB,WAAU,EAAA;EAEZ;IACE,sBAAqB;IACrB,6BAA4B;IAC5B,WAAU,EAAA,EAAA;;AAId;EACE,cAAa;EACb,kBAAiB;EACjB,WAAU,EACX;;AACD;EACE,cAAa;EACb,aAAY;EACZ,sBAAsB;EACtB,yBAAyB;EACzB,wBAAuB;EACvB,eAAc;EACd,yBAAyB;EACzB,0BAA0B;EAC1B,UAAS;EACT,mBAAkB;EAClB,WAAU;EACV,SAAQ;EACR,SAAQ,EACT;;AAED;EACE,mBAAkB,EACnB;;AAED;;EAEE,oBAAmB,EACpB;;AACD;EAEI,cAAa,EACd;;AAHH;EAKI,aAAY;EACZ,gBAAe,EAChB;;AAGH;EACE,0BAAyB;EACzB,aAAY,EACb;;AAED;;EAEE,mBAAkB;EAClB,OAAM;EACN,SAAQ;EACR,YAAW;EACX,gBAAe,EAChB;;AAED;EACE,kBAAiB;EACjB,cAAa,EACd;;AAED;EACE,kBAAiB,EAClB;;AAED;EACE,sBAAqB,EACtB;;AAED;;EAEE,eAAc,EACf;;AAED;EACE,mBAAkB,EACnB;;AAED;EACE,oBAAmB,EAuBpB;EAxBD;IAGI,mBAAkB;IAClB,YAAW;IACX,YAAW;IACX,SAAQ;IACR,eAAc;IACd,gBAAe,EAChB;EATH;IAWI,aAAY,EACb;EAZH;IAcI,aAAY;IACZ,oBAAmB;IACnB,sBAAqB;IACrB,oBAAmB,EACpB;EAlBH;IAoBI,SAAQ;IACR,YAAW;IACX,mBAAkB,EACnB;;AAIH;EACE,YAAW;EACX,mBAAkB,EAyDnB;EA3DD;IAKI,oBAAmB,EACpB;EANH;IASI,oBAAmB,EACpB;EAVH;IAaI,cAAa,EACd;EAdH;IAiBI,kBAAiB;IACjB,mBAAkB;IAClB,WAAU;IACV,YAAW;IACX,mBAAkB,EAqCnB;IA1DH;MAwBM,eAAc;MACd,UAAS;MACT,mBAAkB;MAClB,mBAAkB,EAQnB;MAnCL;QA8BQ,WACF,EAAC;MA/BP;QAiCQ,UACF,EAAC;IAlCP;MAuCQ,oBAAmB,EACpB;IAxCP;MA0CQ,kBAAiB,EAClB;IA3CP;MA+CM,gBAAe;MACf,cAAa,EACd;IAjDL;MAoDM,mBAAkB;MAClB,WAAU;MACV,aAAY;MACZ,SAAQ;MACR,UAAS,EACV;;AAIL;EACI,cAAa,EAShB;EAVD;IAIY,kBAr1BoB;IAs1BpB,aAt1BoB;IAu1BpB,yBAAwB;IACxB,gBAAe,EAClB;;AAGT;EAEI,aA91B4B,EA+1B7B;;AAHH;EAKI,aAj2B4B,EAk2B7B;;AAEH;EACE,mBAAkB;EAClB,YAAW;EACX,cAAa;EACb,uBAAmB;EAAnB,oBAAmB;EACnB,sBAAuB;EAAvB,wBAAuB;EACvB,wBAAuB,EACxB;;AAED;EACE,mBAAkB;EAClB,UAAS,EACV;;AAGD;EACE,WAAU;EACV,YAAW,EACZ;;AACD;EACE,cAAa,EACd;;AACD;EACE,+BAA8B;EAC9B,mBAAkB,EACnB;;AACD;EACE,mBAAkB;EAClB,0BAAyB;EACzB,mBAAkB,EACnB;;AAED;EACE,cAAa,EACd;;AAED;EACE,cAAa,EACd;;AAGD;EAGM,oBAAmB,EACpB;;AAJL;EAOI,wBAAuB;EACvB,oBAAmB;EACnB,uBAAsB;EACtB,iBAAgB,EACjB;;AAEH;EAGM,oBAAmB,EACpB;;AAJL;EAQI,wBAAuB;EACvB,oBAAmB;EACnB,uBAAsB;EACtB,iBAAgB,EACjB;;AAEH;EACE,mBAAkB;EAClB,aAAW,EACZ;;ACz6BD;EACE,oBAAmB,EACpB;;AAED;EACE,aAAY,EAMb;EAPD;IAII,YAAW,EACZ;;AAGH;EACE,YAAW;EACX,oBAAmB,EAIpB;EAND;IAII,oBAAmB,EACpB;;ACxCH;EAEQ,oBAAmB,EACtB;;AAHL;EAKQ,oBAAmB,EACtB;;ACNL;EAEQ,mBAAkB,EACrB;;ACHL;EAEQ,iBAAgB;EAChB,oBAAmB,EACtB;;ACJL;EAGM,2BAA0B,EAC3B;;AAJL;EAQI,mBAAkB;EAClB,SAAQ;EACR,WAAU;EACV,gBAAe,EAChB;;AAGH;EACE,eAAc,EACf;;AAED;EAEI,wCAAuC,EACxC;;AAHH;EAMI,iCAAgC,EACjC;;AC1BH;EAGY,gBAAe;EACf,mBAAkB;EAClB,kBAAiB,EACpB;;AANT;EAYgB,oBAAmB,EAC1B;;;ACbT;EAEQ,oBAAmB,EACtB;;AAHL;EAKQ,qBAAa;EAAb,cAAa;EACb,uBAAmB;EAAnB,oBAAmB;EACnB,sBAAuB;EAAvB,wBAAuB,EAC1B","file":"demo.css","sourcesContent":["\r\n\r\n// $performance_font: 'Helvetica', 'Arial', sans-serif !default;\r\n\r\n@import \"minxin-colors\";\r\n\r\n\r\n\r\n@function strip-units($number) {\r\n @return $number / ($number * 0 + 1);\r\n}\r\n$unit: 10px !default;\r\n// IMAGES\r\n$image_path: '/images' !default;\r\n\r\n\r\n\r\n//默认颜色\r\n$trim-color-classes: false !default;\r\n\r\n@import \"minxin-themeColors\";\r\n\r\n//对比色\r\n$color-primary-contrast: $color-dark-contrast !default;\r\n$color-accent-contrast: $color-dark-contrast !default;\r\n//字体颜色\r\n$color-text: $palette-grey-900 !default;\r\n\r\n//不明所以 $primary-color: unquote(\"rgba(#{$palette-grey-500}, 0.20)\") !default;\r\n\r\n// -- Fonts 字体大小权重预定义\r\n$preferred-font: 'Open Sans','Helvetica Neue',Arial,'Hiragino Sans GB','Microsoft YaHei',sans-serif !default;\r\n$font-size: 1.6 * $unit !default;\r\n$font-size-tiny: 1.2 * $unit !default;\r\n$font-size-small: 1.4 * $unit !default;\r\n$font-size-normal: $font-size !default;\r\n$font-size-big: 1.8 * $unit !default;\r\n$font-weight-thin: 300 !default;\r\n$font-weight-normal: 400 !default;\r\n$font-weight-semi-bold: 500 !default;\r\n$font-weight-bold: 700 !default;\r\n$font-color:unquote(\"rgb(#{$palette-u-gray-800})\") !default;\r\n// 白色背景下的文字颜色\r\n$font-color-base: #212121 !default;\r\n\r\n$font-weight-override: false;\r\n$font-weight-light: 300;\r\n$font-weight-normal: 400;\r\n$font-weight-medium: 500;\r\n$font-weight-bold: 700;\r\n$font-weight-base: $font-weight-normal;\r\n\r\n\r\n\r\n\r\n$gray-base: unquote(\"rgb(#{$palette-grey-900})\") !default;\r\n$gray-darkest: unquote(\"rgb(#{$palette-grey-800})\") !default;\r\n$gray-darker: unquote(\"rgb(#{$palette-grey-700})\") !default;\r\n$gray-dark: unquote(\"rgb(#{$palette-grey-600})\") !default;\r\n$gray: unquote(\"rgb(#{$palette-grey-500})\") !default;\r\n$gray-light: unquote(\"rgb(#{$palette-grey-400})\") !default;\r\n$gray-lighter: unquote(\"rgb(#{$palette-grey-300})\") !default;\r\n$gray-lightest:unquote(\"rgb(#{$palette-grey-200})\") !default;\r\n$inverse: unquote(\"rgb(#{$color-white})\") !default;\r\n// $border-color-base: $gray-lighter;\r\n$border-color-base: unquote(\"rgb(#{$border-color})\") !default;\r\n$line-height-base: 1.57142857;\r\n\r\n// 边框圆角\r\n$border-radius-base: $border-radius;\r\n\r\n// 阴影\r\n\r\n$shadow-key-umbra-opacity: 0.2 !default;\r\n$shadow-key-penumbra-opacity: 0.14 !default;\r\n$shadow-ambient-shadow-opacity: 0.12 !default;\r\n\r\n$shadow-base: 0 1px 5px $gray-lighter;\r\n\r\n\r\n\r\n//-- Indexes\r\n$z-index-highest: 300;\r\n$z-index-higher: 200;\r\n$z-index-high: 100;\r\n$z-index-normal: 1;\r\n$z-index-low: -100;\r\n$z-index-lower: -200;\r\n\r\n$zindex-modal: 1700;\r\n$zindex-modal-background: 1600;\r\n$zIndex-notification: 1560;\r\n$zIndex-message: 1550;\r\n$zIndex-popconfirm: 1540;\r\n$zIndex-popover: 1540;\r\n$zIndex-tooltip: 1530;\r\n$zIndex-alert: 1510;\r\n$zindex-navbar-fixed: 1500;\r\n$zindex-menubar: 1400;\r\n$zindex-overlay: 1300;\r\n$zindex-dropdown: 1200;\r\n$zindex-navbar: 1200;\r\n$zindex-header: 1100;\r\n$zindex-footer: 1000;\r\n$zindex-backtop:2000;\r\n\r\n// 文本字体\r\n\r\n//todo\r\n$text-color-primary: unquote(\"rgba(#{$color-black}, 0.87)\") !default;\r\n$text-link-color: unquote(\"rgb(#{$color-accent})\") !default;\r\n\r\n$target-elements-directly: true !default;\r\n\r\n\r\n$global-selected-color: unquote(\"rgb(#{$palette-blue-100})\") !default;\r\n\r\n\r\n// 控件\r\n$cursor-disabled: not-allowed;\r\n\r\n\r\n$title-color: $gray-darkest;\r\n//todo\r\n$subtitle-color: $gray-darker;\r\n$text-color: $gray-dark;\r\n\r\n$prompt-color: $gray;\r\n//全局不同状态颜色\r\n//todo\r\n$active-color-base: unquote(\"rgb(#{$palette-blue-800})\") !default;\r\n$normal-color-base: unquote(\"rgb(#{$palette-blue-600})\") !default;\r\n$hover-color-base: unquote(\"rgb(#{$palette-blue-400})\") !default;\r\n\r\n$bg-color-base: $gray-lightest;\r\n\r\n//disable颜色\r\n$disabled-color-base: #909090;\r\n$disabled-border-color: $gray-lighter;\r\n$disabled-bg-color: $gray-lightest;\r\n\r\n// 全局链接颜色\r\n$link-color: $normal-color-base;\r\n$link-hover-color: $hover-color-base;\r\n$link-active-color: $active-color-base;\r\n\r\n// 品牌色\r\n$brand-default: $gray-lighter;\r\n$brand-default-hover: $gray-lightest;\r\n$brand-default-active: $gray-light;\r\n// $brand-default: unquote(\"rgb(#{$color-primary})\");\r\n// $brand-default-hover: unquote(\"rgb(#{$color-primary-light})\");\r\n// $brand-default-active: unquote(\"rgb(#{$color-primary-dark})\");\r\n\r\n$brand-primary : unquote(\"rgb(#{$primary-color})\") !default;\r\n$brand-primary-hover: unquote(\"rgb(#{$primary-color-light})\") !default;\r\n$brand-primary-active: unquote(\"rgb(#{$primary-color-dark})\") !default;\r\n\r\n$brand-secondary : unquote(\"rgb(#{$secondary-color})\") !default;\r\n$brand-secondary-hover: unquote(\"rgb(#{$secondary-color-light})\") !default;\r\n$brand-secondary-active: unquote(\"rgb(#{$secondary-color-dark})\") !default;\r\n\r\n$brand-success: unquote(\"rgb(#{$palette-green-500})\") !default;\r\n$brand-success-hover: unquote(\"rgb(#{$palette-green-300})\") !default;\r\n$brand-success-active: unquote(\"rgb(#{$palette-green-700})\") !default;\r\n\r\n$brand-info: unquote(\"rgb(#{$palette-cyan-500})\") !default;\r\n$brand-info-hover: unquote(\"rgb(#{$palette-cyan-300})\") !default;\r\n$brand-info-active: unquote(\"rgb(#{$palette-cyan-700})\") !default;\r\n\r\n$brand-warning: unquote(\"rgb(#{$palette-orange-500})\") !default;\r\n$brand-warning-hover: unquote(\"rgb(#{$palette-orange-300})\") !default;\r\n$brand-warning-active: unquote(\"rgb(#{$palette-orange-700})\") !default;\r\n\r\n\r\n$brand-news: unquote(\"rgb(#{$palette-blue-500})\") !default;\r\n$brand-news-hover: unquote(\"rgb(#{$palette-blue-300})\") !default;\r\n$brand-news-active: unquote(\"rgb(#{$palette-blue-700})\") !default;\r\n\r\n$brand-danger: unquote(\"rgb(#{$palette-red-500})\") !default;\r\n$brand-danger-hover: unquote(\"rgb(#{$palette-red-300})\") !default;\r\n$brand-danger-active: unquote(\"rgb(#{$palette-red-700})\") !default;\r\n\r\n$brand-dark: $gray-darker;\r\n$brand-dark-hover: $gray-dark;\r\n$brand-dark-active: $gray-darkest;\r\n\r\n$brand-light : unquote(\"rgb(#{$color-dark-contrast})\") !default;\r\n$brand-light-hover: unquote(\"rgb(#{$palette-grey-200})\") !default;\r\n$brand-light-active: unquote(\"rgb(#{$palette-grey-400})\") !default;\r\n\r\n$brand-light-primary : unquote(\"rgb(#{$palette-blue-100})\") !default;\r\n$brand-light-success: unquote(\"rgb(#{$palette-green-100})\") !default;\r\n$brand-light-info: unquote(\"rgb(#{$palette-cyan-100})\") !default;\r\n$brand-light-warning: unquote(\"rgb(#{$palette-orange-100})\") !default;\r\n$brand-light-news: unquote(\"rgb(#{$palette-blue-100})\") !default;\r\n$brand-light-danger: unquote(\"rgb(#{$palette-red-100})\") !default;\r\n\r\n//不同背景下对应的文字颜色\r\n\r\n$color-news: unquote(\"rgb(#{$palette-blue-500})\") !default;\r\n$color-success: unquote(\"rgb(#{$palette-green-500})\") !default;\r\n$color-info: unquote(\"rgb(#{$palette-cyan-500})\") !default;\r\n$color-warning: unquote(\"rgb(#{$palette-orange-500})\") !default;\r\n$color-danger: unquote(\"rgb(#{$palette-red-500})\") !default;\r\n$color-light: $gray-darker !default;\r\n\r\n//redius\r\n\r\n$default-border-radius: $border-radius;\r\n\r\n// hover时的背景色,包括select、dropdown、table、datepicker、tree、menu等组件\r\n$hover-bg-color-base: unquote(\"rgb(#{$item-hover-bg-color-base})\") !default;\r\n// // selected背景色,包括:select、menu等\r\n$selected-bg-color-base: unquote(\"rgb(#{$item-selected-bg-color-base})\") !default;\r\n\r\n// UButton\r\n\r\n// Button 基础背景色.\r\n// 默认按钮()\r\n$button-default-color: unquote(\"rgb(#{$default-color})\");\r\n$button-default-color-IE8: unquote(\"rgb(#{$default-color})\");\r\n\r\n// 边框按钮(shape:'border')\r\n$button-border-bg-color: unquote(\"rgb(#{$color-dark-contrast})\");\r\n\r\n// Button 不同状态下的背景色 :hover、active、focus状态.\r\n$button-hover-color: unquote(\"rgb(#{$default-color-light})\");\r\n$button-active-color: unquote(\"rgb(#{$default-color-dark})\");\r\n$button-focus-color: unquote(\"rgb(#{$default-color-light})\");\r\n\r\n// Button 配置不同colors属性时的背景色.\r\n$button-primary-color: $brand-primary;\r\n$button-primary-active-color: $brand-primary-active;\r\n$button-primary-hover-color: $brand-primary-hover;\r\n$button-secondary-color: $brand-secondary;\r\n$button-secondary-active-color: $brand-secondary-active;\r\n$button-secondary-hover-color: $brand-secondary-hover;\r\n$button-success-color: $brand-success;\r\n$button-success-active-color: $brand-success-active;\r\n$button-success-hover-color: $brand-success-hover;\r\n$button-info-color: $brand-info;\r\n$button-info-active-color: $brand-info-active;\r\n$button-info-hover-color: $brand-info-hover;\r\n$button-warning-color: $brand-warning;\r\n$button-warning-active-color: $brand-warning-active;\r\n$button-warning-hover-color: $brand-warning-hover;\r\n$button-danger-color: $brand-danger;\r\n$button-danger-active-color: $brand-danger-active;\r\n$button-danger-hover-color: $brand-danger-hover;\r\n$button-dark-color: $brand-dark;\r\n$button-dark-active-color: $brand-dark-active;\r\n$button-dark-hover-color: $brand-dark-hover;\r\n$button-light-color: $brand-light;\r\n$button-light-active-color: $brand-light-active;\r\n$button-light-hover-color: $brand-light-hover;\r\n\r\n// Button 文字颜色.\r\n// 主按钮(colors:'primary')\r\n$button-primary-text-color: unquote(\"rgb(#{$text-color-base})\") !default;\r\n$button-text-color: $button-primary-text-color;\r\n// 次按钮(colors:'secondary')\r\n$button-second-text-color: unquote(\"rgb(#{$button-secondary-text-color})\") !default;\r\n// 默认按钮()\r\n$button-default-text-color: unquote(\"rgb(#{$palette-grey-900})\") !default;\r\n// 边框按钮(shape:'border')\r\n// $button-border-text-color: unquote(\"rgb(#{$primary-color})\") !default;\r\n\r\n// Button 边框样式及颜色.\r\n$button-border-style: unquote(\"solid\") !default;\r\n$button-border-color: $border-color-base;\r\n$button-default-border-color: $button-default-color !default;\r\n\r\n// Button 不同状态下的边框颜色 :hover、active、focus状态.\r\n$button-hover-border-color: $brand-default-hover;\r\n$button-active-border-color: $brand-default-active;\r\n$button-focus-border-color: $brand-default-active;\r\n\r\n// FAB colors and sizes.\r\n$button-fab-color-alt: unquote(\"rgb(#{$color-accent})\") !default;\r\n$button-fab-hover-color-alt: unquote(\"rgb(#{$color-accent-light})\") !default;\r\n$button-fab-active-color-alt: unquote(\"rgb(#{$color-accent})\") !default;\r\n$button-fab-text-color-alt: unquote(\"rgb(#{$color-accent-contrast})\") !default;\r\n$button-fab-ripple-color-alt: unquote(\"rgb(#{$color-accent-contrast})\") !default;\r\n\r\n// Icon button colors and sizes.\r\n$button-icon-color: unquote(\"rgb(#{$palette-grey-700})\") !default;\r\n$button-icon-focus-color: $button-focus-color !default;\r\n\r\n// Button 最小宽度、高度、内边距、外边距、行高、边框粗细、圆角.\r\n$button-min-width: 72/10 * $unit !default;\r\n$button-height: 36/10 * $unit !default;\r\n$button-padding: 4/10* $unit 13/10 * $unit !default;\r\n$button-padding-IE8: 4px 13px !default;\r\n$button-top-padding: 1310 * $unit !default;\r\n$button-left-padding: 6/10* $unit !default;\r\n$button-line-height:1.57142857;\r\n$button-margin: 4/10 * $unit !default;\r\n$button-border-radius: 3/10 * $unit !default;\r\n$button-border-width: 1/10 * $unit !default;\r\n\r\n$button-fab-size: 38/10 * $unit !default;\r\n$button-fab-size-mini: 30/10 * $unit !default;\r\n$button-fab-font-size: 14/10 * $unit !default;\r\n\r\n$button-icon-size: 32/10 * $unit !default;\r\n$button-icon-size-mini: 13/10 * $unit !default;\r\n\r\n$button-raised-font-size: 14/10 * $unit !default;\r\n\r\n// Button 大按钮\r\n$button-padding-y-lg:8px;\r\n$button-padding-x-lg:15px;\r\n$font-size-lg:1.4 * $unit;\r\n\r\n\r\n// Button 特大型按钮\r\n$button-padding-y-xg:10.5px;\r\n$button-padding-x-xg:18px;\r\n$font-size-xg:1.6 * $unit;\r\n\r\n\r\n// Button 小型按钮\r\n$button-padding-y-sm:3px;\r\n$button-padding-x-sm:5px;\r\n$font-size-sm:1.2 * $unit;\r\n\r\n\r\n\r\n// UText\r\n\r\n\r\n$form-control-border-radius: $border-radius-base;\r\n$form-control-default-font-size: 14px;\r\n$form-control-lg-font-size: 14px;\r\n$form-control-sm-font-size: 12px;\r\n$form-control-default-height: 32px;\r\n$form-control-lg-height: 40px;\r\n$form-control-sm-height: 26px;\r\n$form-control-color: #424242;\r\n$form-control-bg-color: #fff;\r\n$form-control-border-color: $border-color-base;\r\n$form-control-disable-bg-color: #F7F9FB;\r\n$form-control-disable-color: $disabled-color-base;\r\n$form-control-disable-border-color: #DFE1E6;\r\n\r\n$input-text-background-color: transparent !default;\r\n$input-text-label-color: unquote(\"rgba(#{$color-black}, 0.26)\") !default;\r\n$input-text-bottom-border-color: unquote(\"rgba(#{$color-black}, 0.12)\") !default;\r\n$input-text-bottom-border-color-IE8: unquote(\"rgb(#{$color-black})\") !default;\r\n$input-text-highlight-color: unquote(\"rgb(#{$primary-color})\") !default;\r\n$input-text-disabled-color: $input-text-bottom-border-color !default;\r\n$input-text-disabled-text-color: $input-text-label-color !default;\r\n$input-text-error-color: unquote(\"rgb(222, 50, 38)\") !default;\r\n$input-text-must-color:unquote(\"rgb(#{$palette-red-A700})\") !default;\r\n\r\n\r\n$input-text-font-size: 14px !default;\r\n$input-text-width: 100% !default;\r\n$input-text-padding: 4px !default;\r\n$input-text-vertical-spacing: 20px !default;\r\n\r\n$input-text-button-size: 32px !default;\r\n$input-text-floating-label-fontsize: 12px !default;\r\n$input-text-expandable-icon-top: 16px !default;\r\n$input-text-height:36px !default;\r\n$input-text-normal-width:360px !default;\r\n$input-text-short-width:180px !default;\r\n$input-text-normal-border-color:unquote(\"rgb(#{$palette-u-gray-400})\") !default;\r\n$input-text-color:unquote(\"rgb(#{$palette-u-gray-A200})\") !default;\r\n$input-text-focus-border-color:unquote(\"rgb(#{$palette-u-blue-400})\") !default;\r\n$input-lable-color:unquote(\"rgb(#{$palette-u-gray-900})\") !default;\r\n\r\n\r\n/* FormGroup */\r\n\r\n$error-input-border:$brand-danger;\r\n$warning-input-border:$brand-warning;\r\n$success-input-border:$brand-success;\r\n$success-addon-bg: $brand-light-success;\r\n$warning-addon-bg: $brand-light-warning;\r\n$error-addon-bg: $brand-light-danger;\r\n$form-group-margin-top: 15px;\r\n$form-group-margin-bottom: 15px;\r\n\r\n/* Navlayout */\r\n\r\n$layout-nav-color: unquote(\"rgb(#{$palette-grey-100})\") !default;\r\n\r\n// Drawer\r\n$layout-drawer-bg-color: unquote(\"rgb(#{$palette-grey-50})\") !default;\r\n$layout-drawer-border-color: unquote(\"rgb(#{$palette-grey-300})\") !default;\r\n$layout-text-color: unquote(\"rgb(#{$palette-grey-800})\") !default;\r\n$layout-drawer-navigation-color: #757575 !default;\r\n$layout-drawer-navigation-link-active-background: unquote(\"rgb(#{$palette-grey-200})\") !default;\r\n$layout-drawer-navigation-link-active-color: $layout-text-color !default;\r\n\r\n// Header\r\n$layout-header-bg-color: unquote(\"rgb(#{$primary-color})\") !default;\r\n$layout-header-text-color: unquote(\"rgb(#{$color-primary-contrast})\") !default;\r\n$layout-header-nav-hover-color: unquote(\"rgba(#{$palette-grey-700}, 0.6)\") !default;\r\n$layout-header-tab-text-color: unquote(\"rgba(#{$color-primary-contrast}, 0.6)\") !default;\r\n\r\n// Tabs\r\n$layout-header-tab-highlight: unquote(\"rgb(#{$color-accent})\") !default;\r\n\r\n$layout-nav-link-font-size: 13px !default;\r\n\r\n$layout-drawer-narrow: 240px !default;\r\n$layout-drawer-wide: 456px !default;\r\n$layout-drawer-width: $layout-drawer-narrow !default;\r\n\r\n$layout-header-icon-size: 32px !default;\r\n$layout-screen-size-threshold: 1024px !default;\r\n$layout-header-icon-margin: 24px !default;\r\n$layout-drawer-button-mobile-size: 44px !default;\r\n$layout-drawer-button-desktop-size: 34px !default;\r\n$layout-drawer-button-desktop-margin-top: 5px !default;\r\n$layout-drawer-button-mobile-margin-top: 10px !default;\r\n\r\n$layout-header-mobile-row-height: 56px !default;\r\n$layout-mobile-header-height: $layout-header-mobile-row-height;\r\n$layout-header-desktop-row-height: 44px !default;\r\n$layout-desktop-header-height: $layout-header-desktop-row-height;\r\n\r\n$layout-header-desktop-baseline: 80px !default;\r\n$layout-header-mobile-baseline: 72px !default;\r\n$layout-header-mobile-indent: 16px !default;\r\n$layout-header-desktop-indent: 40px !default;\r\n\r\n$layout-tab-font-size: 14px !default;\r\n$layout-tab-bar-height: 48px !default;\r\n$layout-tab-mobile-padding: 12px !default;\r\n$layout-tab-desktop-padding: 24px !default;\r\n$layout-tab-highlight-thickness: 2px !default;\r\n\r\n// gridlayout\r\n\r\n// Extra small screen / phone\r\n//$screen-xs: 480px;\r\n\r\n$screen-xs-min: 480px;\r\n// Deprecated `@screen-phone` as of v3.0.1\r\n//@screen-phone: @screen-xs-min;\r\n\r\n// Small screen / tablet\r\n// Deprecated `@screen-sm` as of v3.0.1\r\n//@screen-sm: 768px;\r\n$screen-sm-min: 768px;\r\n// Deprecated `@screen-tablet` as of v3.0.1\r\n//@screen-tablet: @screen-sm-min;\r\n\r\n// Medium screen / desktop\r\n// Deprecated `@screen-md` as of v3.0.1\r\n//@screen-md: 992px;\r\n$screen-md-min: 992px;\r\n// Deprecated `@screen-desktop` as of v3.0.1\r\n//@screen-desktop: @screen-md-min;\r\n\r\n// Large screen / wide desktop\r\n// Deprecated `@screen-lg` as of v3.0.1\r\n//@screen-lg: 1200px;\r\n$screen-lg-min: 1200px;\r\n// Deprecated `@screen-lg-desktop` as of v3.0.1\r\n//@screen-lg-desktop: @screen-lg-min;\r\n$screen-xs-max: ($screen-sm-min - 1 );\r\n\r\n$screen-sm-max: ($screen-sm-min - 1 );\r\n\r\n$screen-md-max: ($screen-lg-min - 1 );\r\n\r\n\r\n\r\n\r\n// Number of columns in the grid.\r\n$grid-columns: 12;\r\n// Padding between columns. Gets divided in half for the left and right.\r\n$grid-gutter-width: 30px;\r\n// Navbar collapse\r\n// Point at which the navbar becomes uncollapsed.\r\n$grid-float-breakpoint: 768px;\r\n// Point at which the navbar begins collapsing.\r\n$grid-float-breakpoint-max: ($grid-float-breakpoint - 1);\r\n\r\n\r\n// Small screen / tablet\r\n$container-tablet: (720px + $grid-gutter-width);\r\n// For `@screen-sm-min` and up.\r\n$container-sm: $container-tablet;\r\n\r\n// Medium screen / desktop\r\n$container-desktop: (940px + $grid-gutter-width);\r\n// For `@screen-md-min` and up.\r\n$container-md: $container-desktop;\r\n\r\n// Large screen / wide desktop\r\n$container-large-desktop: (1140px + $grid-gutter-width);\r\n// For `@screen-lg-min` and up.\r\n$container-lg: $container-large-desktop;\r\n\r\n\r\n\r\n// menu\r\n\r\n$default-dropdown-bg-color: unquote(\"rgb(#{$color-white})\") !default;\r\n$menu-expand-duration: 0.3s !default;\r\n$menu-fade-duration: 0.2s !default;\r\n\r\n// Default Item Colors\r\n$default-item-text-color: unquote(\"rgba(#{$color-black}, 0.87)\") !default;\r\n$default-item-text-color-IE8: unquote(\"rgb(#{$color-black})\") !default;\r\n$default-item-outline-color: unquote(\"rgb(#{$palette-u-blue-400})\") !default;\r\n$default-item-hover-bg-color: unquote(\"rgb(#{$palette-u-blue-100})\") !default;\r\n$default-item-focus-bg-color: unquote(\"rgb(#{$palette-u-blue-200})\") !default;\r\n$default-item-active-bg-color: unquote(\"rgb(#{$palette-u-blue-200})\") !default;\r\n$default-item-divider-color: unquote(\"rgba(#{$color-black}, 0.12)\") !default;\r\n\r\n// Disabled Button Colors\r\n$disabled-item-text-color: unquote(\"rgb(#{$palette-grey-400})\") !default;\r\n\r\n// Tile\r\n$tile-width: 100%;\r\n\r\n$tile-default-border-color: #e9e9e9;\r\n$tile-default-hover-shadow-color: rgba(0, 0, 0, 0.2);\r\n\r\n$tile-primary-border-color: $button-primary-color;\r\n$tile-primary-hover-shadow-color: $button-primary-hover-color;\r\n\r\n$tile-danger-border-color: $button-danger-color;\r\n$tile-danger-hover-shadow-color: $button-danger-hover-color;\r\n\r\n$tile-warning-border-color: $button-warning-color;\r\n$tile-warning-hover-shadow-color: $button-warning-hover-color;\r\n\r\n$tile-success-border-color: $button-success-color;\r\n$tile-success-hover-shadow-color: $button-success-hover-color;\r\n\r\n$tile-info-border-color: $button-info-color;\r\n$tile-info-hover-shadow-color: $button-info-hover-color;\r\n\r\n// Alert\r\n$alert-news-bg: $brand-light-news;\r\n$alert-success-bg: $brand-light-success;\r\n$alert-info-bg: $brand-light-info;\r\n$alert-warning-bg: $brand-light-warning;\r\n$alert-danger-bg: $brand-light-danger;\r\n\r\n\r\n$alert-dark-news-bg: $brand-news;\r\n$alert-dark-success-bg: $brand-success;\r\n$alert-dark-info-bg: $brand-info;\r\n$alert-dark-warning-bg: $brand-warning;\r\n$alert-dark-danger-bg: $brand-danger;\r\n\r\n$alert-news-color: $color-news;\r\n$alert-success-color: $color-success;\r\n$alert-info-color: $color-info;\r\n$alert-warning-color: $color-warning;\r\n$alert-danger-color: $color-danger;\r\n\r\n$timeline-primary-color: $brand-primary;\r\n$timeline-news-color: $color-news;\r\n$timeline-success-color: $color-success;\r\n$timeline-info-color: $color-info;\r\n$timeline-warning-color: $color-warning;\r\n$timeline-danger-color: $color-danger;\r\n\r\n$alert-padding:10px;\r\n$alert-font-size:12px;\r\n$alert-border-radius: $border-radius;\r\n$alert-text-padding-left: 15px;\r\n$alert-text-padding-right: 15px;\r\n$alert-close-font-size: 21px;\r\n$alert-close-opacity: .2;\r\n$alert-close-font-weight: 700;\r\n\r\n//Checkbox\r\n\r\n$checkbox-color: unquote(\"rgb(#{$primary-color})\") !default;\r\n$checkbox-off-color: unquote(\"rgb(#{$palette-u-gray-600})\") !default;\r\n$checkbox-off-color-IE8: unquote(\"rgb(#{$palette-u-gray-600})\") !default;\r\n$checkbox-disabled-color: unquote(\"rgb(#{$palette-u-gray-600})\") !default;\r\n$checkbox-focus-color: unquote(\"rgba(#{$palette-u-blue-500}, 0.26)\") !default;\r\n$checkbox-image-path: $image_path;\r\n\r\n$checkbox-label-font-size: 13px !default;\r\n$checkbox-label-height: 24px !default;\r\n$checkbox-button-size: 16px !default;\r\n$checkbox-inner-margin: 2px !default;\r\n$checkbox-padding: 8px !default;\r\n$checkbox-top-offset:\r\n ($checkbox-label-height - $checkbox-button-size - $checkbox-inner-margin) / 2;\r\n$checkbox-ripple-size: $checkbox-label-height * 1.5;\r\n\r\n$checkbox-primary-bg: $brand-primary;\r\n$checkbox-success-bg: $brand-success;\r\n$checkbox-info-bg: $brand-info;\r\n$checkbox-warning-bg: $brand-warning;\r\n$checkbox-danger-bg: $brand-danger;\r\n$checkbox-dark-bg: $brand-dark;\r\n\r\n$progress-primary-bg: $brand-primary;\r\n$progress-success-bg: $brand-success;\r\n$progress-info-bg: $brand-info;\r\n$progress-warning-bg: $brand-warning;\r\n$progress-danger-bg: $brand-danger;\r\n$progress-dark-bg: $brand-dark;\r\n\r\n$primary-color-opacity:unquote(\"rgba(#{$primary-color}, 0.7)\") !default;\r\n$color-success-opacity:unquote(\"rgba(#{$palette-green-500}, 0.7)\") !default;\r\n$color-info-opacity:unquote(\"rgba(#{$palette-cyan-500}, 0.7)\") !default;\r\n$color-warning-opacity:unquote(\"rgba(#{$palette-orange-500}, 0.7)\") !default;\r\n$color-danger-opacity:unquote(\"rgba(#{$palette-red-500}, 0.7)\") !default;\r\n$color-dark-opacity:unquote(\"rgba(#{$palette-grey-700}, 0.7)\") !default;\r\n\r\n\r\n$progress-sm-height: 10px;\r\n$progress-xs-height: 5px;\r\n$progress-xs-width: 170px;\r\n$progress-default-height: 20px;\r\n$progress-sm-lable-font-size: 10px;\r\n$progress-sm-lable-line-height: 10px;\r\n$progress-xs-lable-line-height: 8px;\r\n$progress-xs-lable-margin-left: 140px;\r\n$progress-xs-lable-font-size: 10px;\r\n$progress-xs-lable-color: #000;\r\n\r\n// Radio\r\n\r\n$radio-color: unquote(\"rgb(#{$primary-color})\") !default;\r\n$radio-off-color: unquote(\"rgb(#{$palette-u-gray-600})\") !default;\r\n$radio-off-color-IE8: unquote(\"rgb(#{$palette-u-gray-600})\") !default;\r\n$radio-disabled-color: $disabled-color-base !default;\r\n\r\n$radio-label-font-size: 13px !default;\r\n$radio-label-height: 32px !default;\r\n$radio-button-size: 16px !default;\r\n$radio-inner-margin: $radio-button-size / 4;\r\n$radio-padding: 8px !default;\r\n$radio-top-offset: ($radio-label-height - $radio-button-size) / 2;\r\n$radio-ripple-size: 42px !default;\r\n\r\n$radio-primary-bg: $brand-primary;\r\n$radio-success-bg: $brand-success;\r\n$radio-info-bg: $brand-info;\r\n$radio-warning-bg: $brand-warning;\r\n$radio-danger-bg: $brand-danger;\r\n$radio-dark-bg: $brand-dark;\r\n\r\n$radio-disabled-bg: #f7f7f7;\r\n$radio-diabled-border-color: #d9d9d9;\r\n\r\n$radio-border-color: #d9d9d9;\r\n$radio-bg-color: #fff;\r\n$radio-color:#212121;\r\n\r\n$radio-checked-bg-color: #fff;\r\n$radio-checked-color: $brand-primary;\r\n$radio-checked-border-color: $radio-checked-color;\r\n\r\n$radio-icon-height: 18px;\r\n$radio-icon-width: 18px;\r\n$radio-icon-checked-height: 8px;\r\n$radio-icon-checked-width: 8px;\r\n\r\n$radio-button-lg-height:42px;\r\n$radio-button-lg-line-height:26px;\r\n\r\n$radio-button-sm-height:22px;\r\n$radio-button-sm-line-height:20px;\r\n\r\n$radio-button-height: 28px;\r\n$radio-button-line-height: 26px;\r\n\r\n\r\n\r\n\r\n\r\n//loading\r\n\r\n$loading-color-1: unquote(\"rgb(#{$palette-blue-400})\") !default;\r\n$loading-color-2: unquote(\"rgb(#{$palette-red-500})\") !default;\r\n$loading-color-3: unquote(\"rgb(#{$palette-yellow-600})\") !default;\r\n$loading-color-4: unquote(\"rgb(#{$palette-green-500})\") !default;\r\n\r\n$loading-single-color: unquote(\"rgb(#{$primary-color})\") !default;\r\n\r\n$loading-size: 28px !default;\r\n$loading-stroke-width: 3px !default;\r\n\r\n// Amount of circle the arc takes up.\r\n$loading-arc-size: 270deg !default;\r\n// Time it takes to expand and contract arc.\r\n$loading-arc-time: 1333ms !default;\r\n// How much the start location of the arc should rotate each time.\r\n$loading-arc-start-rot: 216deg !default;\r\n\r\n$loading-duration: 360 * $loading-arc-time / (\r\n strip-units($loading-arc-start-rot + (360deg - $loading-arc-size)));\r\n\r\n// datetimepicker\r\n$timepicker-border-gap-color:#ccc;\r\n$timepicker-font-size:14px;\r\n\r\n$date-bg-color: unquote(\"rgb(#{$primary-color})\") !default;\r\n\r\n// message\r\n$snackbar-color: unquote(\"rgb(#{$color-white})\") !default;\r\n$snackbar-background-color: unquote(\"rgb(#{$primary-color})\") !default;\r\n$snackbar-color-cancel: unquote(\"rgb(#{$palette-red-500})\") !default;\r\n$snackbar-color-accept: unquote(\"rgb(#{$palette-green-500})\") !default;\r\n$snackbar-color-warning: unquote(\"rgb(#{$palette-lime-200})\") !default;\r\n\r\n// DATA TABLE\r\n\r\n$data-table-font-size: 13px !default;\r\n$data-table-header-font-size: 12px !default;\r\n$data-table-header-sort-icon-size: 16px !default;\r\n\r\n$data-table-header-color: rgba(#000, 0.54) !default;\r\n$data-table-header-sorted-color: rgba(#000, 0.87) !default;\r\n$data-table-divider-color: rgba(#000, 0.12) !default;\r\n$data-table-divider-color-IE8: rgb(0,0,0) !default;\r\n\r\n//$data-table-hover-color: #eeeeee !default;\r\n$data-table-hover-color: #E9F7FC !default;\r\n$data-table-selection-color: #C4EAF6 !default;\r\n\r\n$data-table-dividers: 1px solid $data-table-divider-color !default;\r\n$data-table-dividers-IE8: 1px solid $data-table-divider-color-IE8 !default;\r\n\r\n$data-table-row-height: 48px !default;\r\n$data-table-last-row-height: 56px !default;\r\n$data-table-header-height: 56px !default;\r\n\r\n$data-table-column-spacing: 36px !default;\r\n$data-table-column-padding: $data-table-column-spacing / 2;\r\n\r\n$data-table-card-header-height: 64px !default;\r\n$data-table-card-title-top: 20px !default;\r\n$data-table-card-padding: 24px !default;\r\n$data-table-button-padding-right: 16px !default;\r\n$data-table-cell-top: $data-table-card-padding / 2;\r\n\r\n// $line-height-computed: round(($font-size-small * $line-height-base));\r\n$line-height-computed: round((14px * $line-height-base));\r\n$table-bg: transparent;\r\n$table-cell-padding: 8px;\r\n$table-border-color: $border-color-base;\r\n$table-bg-hover: $bg-color-base;\r\n$table-bg-active: $table-bg-hover;\r\n$table-bg-accent: unquote(\"rgba(#{$palette-grey-200},.3)\") !default;\r\n\r\n\r\n\r\n\r\n// tooltip\r\n$tooltip-max-width: 200px;\r\n$tooltip-color: #fff;\r\n$tooltip-bg: #42526E;\r\n$tooltip-inverse-border-color: #d9d9d9;\r\n$tooltip-inverse-color: rgb(51,51,51);\r\n$tooltip-arrow-color: $tooltip-bg;\r\n$tooltip-opacity: 1;\r\n\r\n\r\n// 进度条\r\n$bar-height: 4px !default;\r\n$progress-main-color: unquote(\"rgb(#{$primary-color})\") !default;\r\n$progress-secondary-color: unquote(\"rgba(#{$color-primary-contrast}, 0.7)\") !default;\r\n$progress-fallback-buffer-color: unquote(\"rgba(#{$color-primary-contrast}, 0.9)\") !default;\r\n$progress-image-path: $image_path;\r\n$progress-buffer-bar-border:unquote(\"rgb(#{$palette-u-gray-600})\") !default;\r\n\r\n// Tabs\r\n$layout-header-tab-highlight: unquote(\"rgb(#{$color-accent})\") !default;\r\n\r\n\r\n\r\n$tab-highlight-color: unquote(\"rgb(#{$primary-color})\") !default;\r\n$tab-text-color: unquote(\"rgba(#{$color-black}, 0.54)\") !default;\r\n$tab-active-text-color: unquote(\"rgba(#{$color-black}, 0.87)\") !default;\r\n$tab-border-color: unquote(\"rgb(#{$palette-grey-300})\") !default;\r\n\r\n\r\n\r\n//CARD\r\n\r\n$card-width: 330px !default;\r\n$card-height: 200px !default;\r\n$card-font-size: 13px !default;\r\n$card-title-font-size: 24px !default;\r\n$card-subtitle-font-size: 10px !default;\r\n$card-horizontal-padding: 16px !default;\r\n$card-vertical-padding: 16px !default;\r\n\r\n$card-title-perspective-origin-x: 165px !default;\r\n$card-title-perspective-origin-y: 56px !default;\r\n\r\n$card-title-transform-origin-x: 165px !default;\r\n$card-title-transform-origin-y: 56px !default;\r\n\r\n$card-title-text-transform-origin-x: 149px !default;\r\n$card-title-text-transform-origin-y: 48px !default;\r\n\r\n$card-supporting-text-font-size: 1.4 * $unit !default;\r\n$card-supporting-text-line-height: 18px !default;\r\n\r\n$card-actions-font-size: 13px !default;\r\n\r\n$card-title-text-font-weight: 300 !default;\r\n$card-z-index: 1 !default;\r\n\r\n// Cover image\r\n$card-cover-image-height: 186px !default;\r\n$card-background-image-url: '' !default;\r\n\r\n\r\n\r\n$card-background-color: unquote(\"rgb(#{$color-white})\") !default;\r\n$card-text-color: unquote(\"rgb(#{$color-black})\") !default;\r\n$card-image-placeholder-color: unquote(\"rgb(#{$color-accent})\") !default;\r\n$card-supporting-text-text-color: unquote(\"rgba(#{$color-black}, 0.54)\") !default;\r\n$card-border-color: rgba(0,0,0,0.1) !default;\r\n$card-subtitle-color: unquote(\"rgba(#{$color-black}, 0.54)\") !default;\r\n\r\n\r\n$input-border:unquote(\"rgb(#{$palette-u-gray-500})\");\r\n$input-border-focus:unquote(\"rgb(#{$primary-color})\");\r\n$input-border-disabled:unquote(\"rgb(#{$palette-u-gray-100})\");\r\n$input-bg-disabled:unquote(\"rgb(#{$palette-u-gray-100})\");\r\n$input-color:unquote(\"rgb(#{$palette-u-gray-A100})\");\r\n$form-input-height:36px;\r\n$form-input-height-sm:28px;\r\n$form-input-padding-left:12px;\r\n$form-label-color:unquote(\"rgb(#{$palette-u-gray-900})\");\r\n$form-control-feedback-color:unquote(\"rgb(#{$palette-u-gray-700})\");\r\n$form-validate-error-color:unquote(\"rgb(#{$palette-u-red-600})\");\r\n\r\n\r\n// BADGE\r\n$badge-font-size: 12px !default;\r\n$badge-color: unquote(\"rgb(#{$color-accent-contrast})\") !default;\r\n$badge-color-inverse: unquote(\"rgb(#{$color-accent})\") !default;\r\n$badge-background: unquote(\"rgb(#{$color-accent})\") !default;\r\n$badge-background-inverse: unquote(\"rgba(#{$color-accent-contrast},0.2)\") !default;\r\n$badge-size : 22px !default;\r\n$badge-padding: 2px !default;\r\n$badge-overlap: 12px !default;\r\n\r\n$badge-primary-color:#FFFFFF;\r\n$badge-primary-bg:$brand-primary;\r\n\r\n$badge-success-color:#FFFFFF;\r\n$badge-success-bg: $brand-success;\r\n\r\n$badge-info-color:#FFFFFF;\r\n$badge-info-bg:$brand-info;\r\n\r\n$badge-warning-color:#FFFFFF;\r\n$badge-warning-bg:$brand-warning;\r\n\r\n$badge-danger-color:#FFFFFF;\r\n$badge-danger-bg:$brand-danger;\r\n\r\n$badge-dark-color:#FFFFFF;\r\n$badge-dark-bg:$brand-dark;\r\n\r\n$badge-font-size: 12px;\r\n$badge-font-dataicon-size: 10px;\r\n$badge-default-dataicon-fontcolor: #757575;\r\n$badge-default-dataicon-bgcolor: #fff;\r\n$badge-default-dataicon-bordercolor: $border-color-base;\r\n\r\n// labels\r\n$tag-padding: .25em .6em .25em;\r\n$tag-border-radius: 0.3em;\r\n$tag-bg: #eeeeee;\r\n$tag-round-border-radius: 1em;\r\n$tag-default-color: #757575;\r\n$tag-default-bg:#e0e0e0;\r\n$tag-lg-font-size: 16px;\r\n$tag-sm-font-size: 10px;\r\n$tag-sm-padding: .1em .5em .1em;\r\n$tag-default-hover-bg: $brand-default-hover;\r\n$tag-primary-hover-bg: $brand-primary-hover;\r\n$tag-success-hover-bg: $brand-success-hover;\r\n$tag-info-hover-bg: $brand-info-hover;\r\n$tag-warning-hover-bg: $brand-warning-hover;\r\n$tag-danger-hover-bg: $brand-danger-hover;\r\n$tag-dark-hover-bg: $brand-dark-hover;\r\n$tag-default-bg: $brand-default;\r\n$tag-primary-bg: $brand-primary;\r\n$tag-success-bg: $brand-success;\r\n$tag-info-bg: $brand-info;\r\n$tag-warning-bg: $brand-warning;\r\n$tag-danger-bg: $brand-danger;\r\n$tag-dark-bg: $brand-dark;\r\n$tag-default-hover-color:unquote(\"rgb(#{$palette-u-gray-500})\");\r\n\r\n\r\n// pagination\r\n$pagination-gap-hover-border:#7A869A;\r\n\r\n$pagination-link-padding: 7px 13px;\r\n$pagination-lg-font-size: 16px;\r\n$pagination-lg-padding-vertical: 9.5px;\r\n$pagination-lg-padding-horizontal: 15.5px;\r\n\r\n$pagination-small-font-size: 12px;\r\n$pagination-small-padding-vertical: 4px;\r\n$pagination-small-padding-horizontal: 9.5px;\r\n\r\n$pag-color: #666666;\r\n$pag-bg-color: #fff;\r\n$pag-border-color:#d7d7d7;\r\n$pag-hover-color: #666;\r\n$pag-hover-bg-color:$hover-bg-color-base;\r\n$pag-hover-border-color:#d7d7d7;\r\n$pag-active-color: #fff;\r\n$pag-active-bg-color:#7A869A;\r\n$pag-active-border-color:#7A869A;\r\n$pag-disabled-color: #777;\r\n$pag-disabled-bg-color:#fff;\r\n$pag-disabled-border-color:#ddd;\r\n\r\n$border-radius-base: $border-radius;\r\n$border-radius-large: 4px;\r\n$border-radius-small: 2px;\r\n\r\n$line-height-large: 1.3333333; // extra decimals for Win 8.1 Chrome\r\n$line-height-small: 1.5;\r\n// widget\r\n\r\n$widget-padding-left:30px;\r\n$widget-padding-top:10px;\r\n\r\n//tooltips\r\n\r\n$tooltip-default-bg: $brand-default;\r\n$tooltip-primary-bg: $brand-primary;\r\n$tooltip-success-bg: $brand-success;\r\n$tooltip-info-bg: $brand-info;\r\n$tooltip-warning-bg: $brand-warning;\r\n$tooltip-danger-bg: $brand-danger;\r\n$tooltip-dark-bg: $brand-dark;\r\n\r\n//menu Button\r\n\r\n$menu-default-bg: $brand-default;\r\n$menu-primary-bg: $brand-primary;\r\n$menu-success-bg: $brand-success;\r\n$menu-info-bg: $brand-info;\r\n$menu-warning-bg: $brand-warning;\r\n$menu-danger-bg: $brand-danger;\r\n$menu-dark-bg: $brand-dark;\r\n$menu-default-bg-hover: $brand-default-hover;\r\n$menu-primary-bg-hover: $brand-primary-hover;\r\n$menu-success-bg-hover: $brand-success-hover;\r\n$menu-info-bg-hover: $brand-info-hover;\r\n$menu-warning-bg-hover: $brand-warning-hover;\r\n$menu-danger-bg-hover: $brand-danger-hover;\r\n$menu-dark-bg-hover: $brand-dark-hover;\r\n\r\n\r\n// breadcrumbs\r\n\r\n$breadcrumb-padding-vertical: 8px;\r\n$breadcrumb-padding-horizontal: 10px;\r\n$breadcrumb-separator: \"/\\00a0\";\r\n$breadcrumb-bg: transparent;\r\n$breadcrumb-margin-bottom: 10px;\r\n\r\n$breadcrumb-color: $brand-primary;\r\n$breadcrumb-active-color: $text-color;\r\n\r\n$breadcrumb-icon-margin-right: 10px;\r\n$breadcrumb-arrow-separator: \"\\00bb\\00a0\";\r\n\r\n$breadcrumb-bg-color: #f5f5f5;\r\n$breadcrumb-active-color: #777;\r\n$breadcrumb-separate-color: #ccc;\r\n\r\n// list-group\r\n$list-group-media-heading-font-size : $font-size-small;//14px\r\n$list-group-link-disabled-color : $disabled-color-base;\r\n\r\n$list-group-link-disabled-bg : $gray-lightest;\r\n\r\n$list-group-active-color : $brand-primary;\r\n$list-group-link-active-color : unquote(\"rgb(#{$color-white})\") !default;\r\n$list-group-link-active-bg : $brand-primary;\r\n\r\n\r\n$list-group-item-icon-margin-right : 10px;\r\n\r\n$list-group-bg-inherit-item-border : rgba(0, 0, 0, 0.075);\r\n$list-group-bg-inherit-item-hover-bg : rgba(0, 0, 0, 0.075);\r\n\r\n\r\n$list-group-border-radius: $border-radius-base;\r\n\r\n\r\n\r\n$list-group-link-color: $text-color;\r\n$list-group-link-hover-color: $text-color;\r\n$list-group-link-heading-color: $title-color;\r\n\r\n$list-group-hover-bg: $bg-color-base;\r\n\r\n$list-group-disabled-bg: transparent;\r\n\r\n$list-group-disabled-color: $disabled-color-base;\r\n\r\n\r\n$list-group-disabled-text-color: $list-group-disabled-color;\r\n$list-group-active-bg: transparent;\r\n$list-group-active-border: $list-group-active-bg;\r\n// $list-group-active-text-color: lighten($list-group-active-color, 40%);\r\n$list-group-active-text-color: $list-group-active-color;\r\n\r\n$list-group-bg: #fff;\r\n$list-group-border: transparent;\r\n// $list-group-bordered-border : $border-color-base;\r\n// $list-group-bordered-active-color : $component-active-color;\r\n// $list-group-bordered-active-bg : $component-active-bg;\r\n// $list-group-bordered-active-border : $list-group-bordered-active-bg;\r\n\r\n// $list-group-gap-item-margin-bottom : 2px;\r\n\r\n//step\r\n$steps-margin-bottom: $line-height-computed;\r\n$step-padding-horizontal:20px;\r\n$step-padding-vertical: 12px;\r\n\r\n$step-vertical-padding-horizontal: 20px;\r\n$step-vertical-padding-vertical:18px;\r\n\r\n$step-color: $gray;\r\n$step-bg: $bg-color-base;\r\n$step-number-bg: $gray-lighter;\r\n$step-number-color: $inverse;\r\n\r\n$step-current-color: $inverse;\r\n$step-current-bg: $brand-primary;\r\n\r\n$step-done-color: $inverse;\r\n$step-done-bg:$brand-success;\r\n\r\n$step-error-color: $inverse;\r\n$step-error-bg: $brand-danger;\r\n\r\n$step-disabled-color:$gray-light;\r\n\r\n$step-font-size: inherit;\r\n$step-title-font-size: 20px;\r\n$step-icon-font-size:27px;\r\n$step-number-font-size:24px;\r\n$step-number-size: 40px;\r\n\r\n$step-lg-padding-horizontal:20px;\r\n$step-lg-padding-vertical:20px;\r\n$step-lg-font-size: 16px;\r\n$step-lg-title-font-size:22px;\r\n$step-lg-icon-font-size: 32px;\r\n$step-lg-number-font-size:28px;\r\n$step-lg-number-size:46px;\r\n\r\n$step-sm-font-size: 12px;\r\n$step-sm-title-font-size: 18px;\r\n$step-sm-icon-font-size: 24px;\r\n$step-sm-number-font-size: 24px;\r\n$step-sm-number-size: 30px;\r\n\r\n$step-xs-font-size: 10px;\r\n$step-xs-title-font-size: 16px;\r\n$step-xs-icon-font-size: 22px;\r\n$step-xs-number-font-size: 20px;\r\n$step-xs-number-size: 24px;\r\n\r\n// blog nav\r\n$blognav-active-color:unquote(\"rgb(#{$primary-color})\");\r\n// widget\r\n$widget-padding-left:30px;\r\n$widget-padding-top:10px;\r\n\r\n\r\n// couter 数据统计\r\n\r\n$counter-number-color: $gray-darkest;\r\n$counter-number-font-size: 20px;\r\n$counter-icon-font-size: $counter-number-font-size;\r\n\r\n$counter-lg-number-font-size: 40px;\r\n$counter-md-number-font-size: 30px;\r\n$counter-sm-number-font-size: 14px;\r\n\r\n$counter-lg-icon-font-size: $counter-lg-number-font-size;\r\n$counter-md-icon-font-size: $counter-md-number-font-size;\r\n$counter-sm-icon-font-size: $counter-sm-number-font-size;\r\n\r\n$counter-inverse-color: $inverse;\r\n\r\n\r\n// navbar\r\n\r\n\r\n$menu-active-color: #108ee9;\r\n$menu-border-active-color: #108ee9;\r\n$menu-selected-bg-color: #eaf8fe;\r\n$menu-group-titil-color: #999;\r\n$menu-group-title-padding-left: 32px;\r\n$menu-color: #666;\r\n$menu-border-color: #d9d9d9;\r\n\r\n$navbar-default-bg-color: #f8f8f8;\r\n$navbar-default-border-color: #e7e7e7;\r\n$navbar-default-color: #777;\r\n$navbar-default-hover-color: #333;\r\n$navbar-inverse-hover-color: #fff;\r\n$navbar-inverse-color: #9d9d9d;\r\n$navbar-inverse-bg-color: #222;\r\n$navbar-inverse-border-color: #080808;\r\n$navbar-border-radius: 4px;\r\n\r\n$navbar-side-container-border-color: #d9d9d9;\r\n$navbar-side-container-width: 242px;\r\n$navbar-side-container-border-shadow: #d9d9d9;\r\n\r\n// Basics of a navbar\r\n$navbar-height: 50px;\r\n$navbar-margin-bottom: $line-height-computed;\r\n$navbar-border-radius: $border-radius-base;\r\n$navbar-padding-horizontal: floor(($grid-gutter-width / 2));\r\n$navbar-padding-vertical: (($navbar-height - $line-height-computed) / 2);\r\n$navbar-collapse-max-height: 340px;\r\n\r\n$navbar-avatar-margin-horizontal: (($navbar-height - 32px) / 2);\r\n\r\n$navbar-brand-padding-horizontal: 20px;\r\n$navbar-brand-logo-height: 32px;\r\n\r\n$navbar-default-color: $text-color;\r\n$navbar-default-bg: $inverse;\r\n$navbar-default-border: $border-color-base;\r\n\r\n// Navbar links\r\n$navbar-default-link-color: $text-color;\r\n$navbar-default-link-hover-color: $gray-darker;\r\n$navbar-default-link-hover-bg: rgba(238,238,238, 30%);\r\n$navbar-default-link-active-color: $navbar-default-link-hover-color;\r\n$navbar-default-link-active-bg: rgba(238,238,238, 60%);\r\n$navbar-default-link-disabled-color: $disabled-color-base;\r\n$navbar-default-link-disabled-bg: transparent;\r\n\r\n// Navbar brand label\r\n$navbar-default-brand-color: $title-color;\r\n$navbar-default-brand-hover-color: $navbar-default-brand-color;\r\n$navbar-default-brand-hover-bg: none;\r\n\r\n// Navbar toggle\r\n$navbar-default-toggle-hover-bg: $navbar-default-link-hover-bg;\r\n$navbar-default-toggle-icon-bar-bg: $navbar-default-color;\r\n$navbar-default-toggle-border-color: transparent;\r\n\r\n\r\n// Inverted navbar\r\n// Reset inverted navbar basics\r\n$navbar-inverse-bg: $brand-primary;\r\n$navbar-inverse-border: rgba(0, 0, 0, .1);\r\n\r\n// Inverted navbar links\r\n$navbar-inverse-link-color: $inverse;\r\n$navbar-inverse-link-hover-color: $inverse;\r\n$navbar-inverse-link-hover-bg: rgba(0, 0, 0, .1);\r\n$navbar-inverse-link-active-color: $navbar-inverse-link-hover-color;\r\n$navbar-inverse-link-active-bg: $navbar-inverse-link-hover-bg;\r\n$navbar-inverse-link-disabled-color: $inverse;\r\n$navbar-inverse-link-disabled-bg: transparent;\r\n\r\n// Inverted navbar brand label\r\n$navbar-inverse-brand-color: $navbar-inverse-link-color;\r\n$navbar-inverse-brand-hover-color: $inverse;\r\n$navbar-inverse-brand-hover-bg: none;\r\n\r\n// Inverted navbar toggle\r\n$navbar-inverse-toggle-hover-bg: $navbar-inverse-link-hover-bg;\r\n$navbar-inverse-toggle-icon-bar-bg: $inverse;\r\n$navbar-inverse-toggle-border-color: transparent;\r\n\r\n//hamburger\r\n$hamburger-size: 17px;\r\n\r\n\r\n//panel\r\n$panel-header-padding : 10px 15px;\r\n$panel-footer-padding : 10px 15px;\r\n$panel-body-padding : 15px 15px;\r\n$panel-header-bg-color : #f5f5f5;\r\n$panel-footer-bg-color : #f5f5f5;\r\n$panel-bg-color : #fff;\r\n$panel-default-color : #757575;\r\n$panel-inner-border-color: #ddd;\r\n\r\n\r\n//modal\r\n$modal-header-padding : 15px;\r\n$modal-body-padding : 15px;\r\n$modal-footer-padding : 15px;\r\n$modal-content-bg-color: #fff;\r\n$modal-backdrop-bg: #000;\r\n$modal-backdrop-opacity: .6;\r\n$modal-header-border-color: transparent;\r\n$modal-footer-border-color: transparent;\r\n$modal-xlg: 976px;\r\n$modal-lg: 800px;\r\n$modal-sm: 400px;\r\n$modal-default: 600px;\r\n$modal-border-radius: $border-radius-base;\r\n\r\n//notification\r\n\r\n$zIndex-notification: $zIndex-notification;\r\n$notification-top: 30px;\r\n$notification-bottom: 30px;\r\n$notification-right: 30px;\r\n$notification-width: 300px;\r\n$notification-text-margin-right: 15px;\r\n$notice-padding: 15px;\r\n$notice-background: $gray-darkest;\r\n$notice-bottom: 15px;\r\n\r\n//message\r\n\r\n$message-font-size: 12px;\r\n\r\n$message-right: 30px;\r\n$message-width: 300px;\r\n$message-text-margin-right: 15px;\r\n$message-padding: 0;\r\n$message-content-padding: 15px;\r\n$message-background: $gray-darkest;\r\n\r\n//popconfirm\r\n\r\n$popconfirm-max-width: 300px;\r\n\r\n$popconfirm-dark-bg: $gray-darkest;\r\n$popconfirm-fallback-dark-border-color: $gray-darkest;\r\n$popconfirm-margin: 10px;\r\n$popconfirm-title-bg: #fff;\r\n$popconfirm-border-color:$border-color-base;\r\n$popconfirm-arrow-width: 10px;\r\n$popconfirm-arrow-color: $border-color-base;\r\n$popconfirm-arrow-outer-width: 0;\r\n$popconfirm-arrow-outer-color: $border-color-base;\r\n$popconfirm-border-right-color: $border-color-base;\r\n$popconfirm-fallback-border-color: #fff;\r\n\r\n//select\r\n\r\n$select-bg-color: #fff;\r\n$select-border-color: $border-color-base;\r\n$select-border-radius: $border-radius-base;\r\n$select-color: $font-color-base;\r\n$select-font-size: 12px;\r\n$select-dropdown-color: #666;\r\n$select-dropdown-bg-color: #fff;\r\n$select-dropdown-hover-bg: $hover-bg-color-base;\r\n$select-dropdown-selected-bg: $selected-bg-color-base;\r\n$select-dropdown-selected-color: rgb(134, 119, 119);\r\n$select-dropwdown-item-padding: 7px 16px;\r\n$select-disabled-color: $disabled-color-base;\r\n$select-disabled-bg: #f7f7f7;\r\n$select-disabled-border-color: #d9d9d9;\r\n//dropdown\r\n\r\n$dropdown-item-hover-bg-color: unquote(\"rgb(#{$palette-grey-100})\");\r\n$dropdown-item-divier-bg-color: $gray-lighter;\r\n$dropdown-border-color: $border-color-base;\r\n$dropdown-border-radius:3px;\r\n$dropdown-shadow: 0 1px 5px $dropdown-border-color;\r\n$dropdown-margin: 5px 0 0 0;\r\n$dropdown-menu-item-padding: 0px 16px 0 28px;\r\n$dropdown-menu-font-size: 12px;\r\n$dropdown-menu-item-height: 42px;\r\n$dropdown-menu-item-light-height: 42px;\r\n$dropdown-menu-title-font-size: 12px;\r\n$dropdown-menu-title-color: $disabled-color-base;\r\n$dropdown-menu-title-padding:8px 16px;\r\n$dropdown-menu-title-line-height: 1.5;\r\n\r\n//upload\r\n\r\n$upload-list-color: #108ee9;\r\n$upload-list-bg : #fff;\r\n$upload-list-hover-bg: #e7f4fd;\r\n$upload-list-error-color: #f50;\r\n$upload-thumbnail-height: 48px;\r\n$upload-thumbnail-width: 48px;\r\n$upload-thumbnail-img-height: 48px;\r\n$upload-thumbnail-img-width: 48px;\r\n\r\n//loading\r\n\r\n$loading-loadprimary: rgb(63, 81, 181);\r\n$loading-loadsuccess: #4caf50;\r\n$loading-loadwarn: rgb(255, 152, 0);\r\n$loading-lineanimating: (\r\n 1:line-scale 1s 0.1s infinite cubic-bezier(.2, .68, .18, 1.08),\r\n 2:line-scale 1s 0.2s infinite cubic-bezier(.2, .68, .18, 1.08),\r\n 3:line-scale 1s 0.3s infinite cubic-bezier(.2, .68, .18, 1.08),\r\n 4:line-scale 1s 0.4s infinite cubic-bezier(.2, .68, .18, 1.08),\r\n 5:line-scale 1s 0.5s infinite cubic-bezier(.2, .68, .18, 1.08)\r\n);\r\n$loading-linebackcolor: (\r\n 1: #F44336,\r\n 2: #7ED321,\r\n 3: #0084FF,\r\n 4: #FF9800,\r\n 5: #D0021B\r\n);\r\n$loading-back-width: 120px;\r\n$loading-back-height:110px;\r\n$loading-desc-font-size: 16px;\r\n$loading-desc-color: #cecece;\r\n$loading-rotate-bor:#c2c3c5;\r\n\r\n//两种加载的尺寸 width height\r\n$loading-rotate-sm-size: 25px;\r\n$loading-rotate-size:40px;\r\n$loading-rotate-lg-size:60px;\r\n\r\n$loading-line-sm-width: 4px;\r\n$loading-line-sm-height:35px;\r\n$loading-line-width:6px;\r\n$loading-line-height:50px;\r\n$loading-line-lg-width:8px;\r\n$loading-line-lg-height:90px ;\r\n\r\n//居中位置top left\r\n$loading-center-top:50%;\r\n$loading-center-left:50%;\r\n\r\n$loading-rotate-center-sm: -15px ;\r\n$loading-rotate-center:-22px;\r\n$loading-rotate-center-lg:-35px ;\r\n\r\n$loading-line-center-sm-top: -22px;\r\n$loading-line-center-sm-left:-20px;\r\n$loading-line-center-top:-30px;\r\n$loading-line-center-left:-25px;\r\n$loading-line-center-lg-top:-50px;\r\n$loading-line-center-lg-left:-30px;\r\n\r\n\r\n//switch\r\n\r\n\r\n//color\r\n$switch-border-color: $gray-lighter;\r\n$switch-back-color: $gray-lighter;\r\n$switch-checked-borColor: $brand-primary;\r\n$switch-checked-backColor: $brand-primary;\r\n\r\n// border-radius of different state switch\r\n$switch-border-radius: 20px;\r\n$switch-border-radius-after: 18px;\r\n\r\n// width height line-height of the three switches\r\n$switch-width: (default:44px, small:32px, large:60px);\r\n$switch-height: (default:22px, small:16px, large:30px);\r\n$switch-lineHeight: (default:20px, small:12px, large:12px);\r\n\r\n// style of u-switch-inner\r\n$switch-inner-fontSize: (default:12px, small:10px, large:18px);\r\n$switch-inner-left: (default:22px, small:16px, large:30px);\r\n$switch-inner-largeTop: 8px;\r\n\r\n// style of u-switch:active:after\r\n$switch-active-width: (default:24px, small:16px, large:32px);\r\n\r\n// style of u-switch:after\r\n$switch-after-widthHeight: 18px;\r\n$switch-after-widthHeight-sm: 14px;\r\n$switch-after-widthHeight-lg: 26px;\r\n$switch-after-top: 1px;\r\n$switch-after-top-sm: 0;\r\n$switch-after-top-lg: 1px;\r\n$switch-after-left: 0;\r\n$switch-after-left-sm: 0;\r\n$switch-after-left-lg: 0;\r\n\r\n// style of u-switch.is-checked\r\n$switch-checked-innerLeft: (default:8px, small:4px, large:8px);\r\n$switch-checked-afterLeft: (default:24px, small:16px, large:32px);\r\n$switch-checked-activeLeft: (default:16px, small:10px, large:26px);\r\n\r\n$switch-primary-bg: $brand-primary;\r\n$switch-dark-bg: $brand-dark;\r\n$switch-success-bg: $brand-success;\r\n$switch-warning-bg: $brand-warning;\r\n$switch-danger-bg: $brand-danger;\r\n$switch-info-bg: $brand-info;\r\n\r\n//tabs\r\n\r\n$tabs-basic-back: #f5f5f5;\r\n$tabs-cls-color: #666;\r\n$tabs-cls-width: 900px;\r\n$tabs-simple-conHeight: 120px;\r\n$tabs-simple-conPad: 16px;\r\n$tabs-simple-conWidth: 100%;\r\n\r\n$tabs-fontSize: (simple:14px, fill:14px, turn:14px, slide:14px, fade:14px, fadeup:14px);\r\n$tabs-lineHeight: (simple:2.3, fill:2.3, turn:2.3, slide:2.3, fade:2.3, fadeup:2.3);\r\n$tabs-marginBottom: -1px;\r\n\r\n$tabs-simple-tab: (padding:0 16px, margin:5px 0 5px 5px, radius:0 0 0 0, back:#fff);\r\n$tabs-simple-tabBorder: 1px solid #fff;\r\n$tabs-simple-activeBorder: 1px solid $brand-primary;\r\n$tabs-simple-activeColor: #fff;\r\n$tabs-simple-activeBorBottom: 1px solid $brand-primary;\r\n$tabs-simple-activeTopRadius: 5px;\r\n$tabs-simple-fontWeight: bold;\r\n\r\n$tabs-fill-tab: (padding: 0 16px, color:#666, back:#fff, afterBack:#d2d8d6, activeBack:$brand-primary);\r\n$tabs-fill-tab-maright: 5px;\r\n$tabs-fill-after-top: 0;\r\n$tabs-fill-after-left: 0;\r\n$tabs-fill-after-width: 100%;\r\n$tabs-fill-after-height: 100%;\r\n$tabs-fill-fontWeight: bold;\r\n\r\n$tabs-turn-tab: (padding: 0 16px, color:#fff, back:#f5f5f5, afterBack:$brand-primary, activeBack:$brand-primary);\r\n$tabs-turn-after-top: 0;\r\n$tabs-turn-after-left: 0;\r\n$tabs-turn-after-width: 100%;\r\n$tabs-turn-after-height: 100%;\r\n$tabs-turn-beforeBot: 32px;\r\n$tabs-turn-beforeRight: 15px;\r\n$tabs-turn-fontWeight: bold;\r\n$tabs-moveleft-conHeight: 120px;\r\n$tabs-moveleft-conPad: 16px;\r\n\r\n$tabs-slide-tabs: (width:25%, padding: 0 16px, back:#f5f5f5);\r\n$tabs-slide-child-bottom: 0;\r\n$tabs-slide-child-left: 0;\r\n$tabs-slide-child-height: 4px;\r\n$tabs-slide-child-back: $brand-primary;\r\n$tabs-slide-fontWeight: bold;\r\n\r\n$tabs-fade-tab: (marLeft:5px, marTop:5px, color:#666, padding:0 16px, radius:0 0 0 0);\r\n$tabs-fade-conPad: 16px;\r\n$tabs-fade-conBor: 5px;\r\n\r\n$tabs-fadeup-tab: (marTop:5px, color:#666, padding:0 16px, radius:0 0 0 0);\r\n$tabs-fadeup-top: -5px;\r\n$tabs-fadeup-left: 0;\r\n$tabs-fadeup-width: 100%;\r\n$tabs-fadeup-height: 100%;\r\n$tabs-fadeup-color: #666;\r\n$tabs-fadeup-conHeight: 120px;\r\n$tabs-fadeup-conPad: 16px;\r\n\r\n\r\n//rate\r\n$rate-star-default-color:$gray-lightest;\r\n$rate-star-active-color:$brand-primary;\r\n$rate-star-marginRight:8px;\r\n//backtop\r\n$back-top-padding:5px;\r\n$backtop-background:unquote(\"rgb(#{$palette-u-gray-600})\") !default;\r\n$backtop-color:unquote(\"rgb(#{$color-white})\") !default;\r\n$backtop-right:10px;\r\n$backtop-bottom:10px;\r\n$backtop-dom-right:40px;\r\n\r\n\r\n//dnd\r\n$dnd-list-background:unquote(\"rgb(#{$palette-grey-400})\")!default;\r\n$dnd-list-padding:8px;\r\n$dnd-list-dragging-background:unquote(\"rgb(#{$palette-light-blue-A200})\")!default;\r\n$dnd-item-color:unquote(\"rgb(#{$color-black})\")!default;\r\n$dnd-item-padding:16px;\r\n$dnd-item-margin:4px;\r\n$dnd-item-background:unquote(\"rgb(#{$palette-grey-500})\")!default;\r\n$dnd-item-dragging-background:unquote(\"rgb(#{$palette-blue-300})\")!default;\r\n\r\n// bee-tree\r\n$tree-checkbox-color: unquote(\"rgb(#{$primary-color})\") !default;\r\n$tree-node-bg-color: $hover-bg-color-base !default;\r\n\r\n// bee-table\r\n$table-head-background-color: unquote(\"rgb(#{$table-header-background-color})\") !default;\r\n$table-head-text-color: unquote(\"rgb(#{$table-header-text-color})\") !default;\r\n\r\n// bee-transfer\r\n$transfer-border-gap-color:#d9d9d9;\r\n\r\n// bee-transfer\r\n$cascader-border-gap-color:#ccc;","@import \"../node_modules/tinper-bee-core/scss/minxin-variables\";\n@import \"../node_modules/tinper-bee-core/scss/minxin-mixins\";\n// @import \"../node_modules/bee-loading/src/Loading\";\n\n$text-color: $font-color-base;\n$font-size-base: 12px;\n$line-height: 1.33;\n// 主题定制border:\n$table-border-color: unquote(\"rgb(#{$table-border-color-base})\");\n// $table-head-background-color: #f7f7f7;\n// $table-head-text-color: #666;\n$vertical-padding: 12px;\n$horizontal-padding: 8px;\n$first-horizontal-padding: 12px;\n// $table-border-color: #e9e9e9;\n\n$table-hover-color: #E7F2FC;\n$table-move-in-color: $bg-color-base;\n$checkbox-height:14px;\n$table-th-bottom-border:#C1C7D0;\n\n$filter-form-control-height:26px;\n$table-head-font-weight: bold;\n$icon-color:#505F79;\n.u-table {\n font-size: $font-size-base;\n color: $text-color;\n // transition: opacity 0.3s ease;\n position: relative;\n line-height: $line-height;\n overflow: hidden;\n &-body{\n // overflow: hidden!important;\n position: relative;\n }\n &-hiden-drag{\n position: relative;\n &-li{\n position: absolute;\n top: 0px;\n left: 0px;\n // height: 10px;//这个高度先注释掉了,加上后,在火狐浏览器上会站位置。滚动条拉到最右边有错行\n }\n }\n table {\n width: 100%;\n border-collapse: collapse;\n text-align: left;\n }\n\n th {\n // background: $table-head-background-color;\n font-weight: $table-head-font-weight;\n text-align: left;\n // transition: background 0.3s ease;\n line-height: 16px;\n &[colspan] {\n text-align: center;\n }\n ::last-child{\n overflow: hidden;\n }\n }\n\n td {\n border-bottom: 1px solid $table-border-color;\n line-height: $line-height;\n a{\n color: #2196F3;\n &:hover{\n color: #1565c0;\n }\n &:active{\n color: #1565c0;\n }\n }\n }\n thead{\n tr:last-child{\n border-bottom: 1px solid $table-th-bottom-border;\n }\n tr>th:last-child{\n border-right: none; \n }\n }\n tr {\n // transition: all 0.3s ease;\n &:hover {\n // background: $hover-bg-color-base;\n td {\n .uf-eye{\n visibility: visible !important;\n }\n }\n }\n tr a{\n color: #2196F3;\n &:hover{\n color: #1565c0;\n }\n &:active{\n color: #1565c0;\n }\n }\n }\n tr.tr-row-hover {\n background: $hover-bg-color-base;\n }\n\n th,\n td {\n padding: $vertical-padding $horizontal-padding;\n word-break: break-all;\n &.text-center{\n text-align: center;\n }\n &.text-right{\n text-align: right;\n }\n }\n &-sm {\n td {\n padding: 8px $horizontal-padding;\n }\n }\n &-lg {\n td {\n padding: 16px $horizontal-padding;\n }\n }\n tr {\n \n &.filterable{\n th{\n padding-top: 5px !important;\n padding-bottom: 5px !important;\n .filterContext{\n height: 35px;\n }\n .u-select-selection--single{\n height: 26px;\n }\n }\n }\n }\n &-row-hover {\n background:unquote(\"rgb(#{$table-row-hover-bg-color})\");\n }\n \n &-scroll {\n overflow: auto;\n }\n &-bordered {\n table {\n border: 1px solid $table-border-color;\n box-sizing: border-box;\n table-layout: fixed;\n // width:auto;\n }\n \n .u-table-header>table {\n border-bottom: 0;\n }\n .u-table-header~.u-table-body,.u-table-header~.u-table-body-outer{\n table{\n border-top: 0px ;\n }\n }\n\n th {\n border-bottom: 1px solid $table-border-color;\n box-sizing: border-box;\n }\n th,\n td {\n border-right: 1px solid $table-border-color;\n box-sizing: border-box;\n }\n }\n &-drag-border{\n tr {\n th.th-can-not-drag{ //拖拽tag影响了表格整体宽度\n overflow: hidden;\n }\n }\n }\n &-header {\n overflow: hidden;\n background: $table-head-background-color;\n color: $table-head-text-color;\n }\n\n &.fixed-height td {\n padding: 0px $horizontal-padding;\n }\n\n &-fixed-header &-body {\n background: #fff;\n position: relative;\n }\n &-fixed-left &-body-inner {\n margin-right: -20px;\n padding-right: 20px;\n }\n\n &-fixed-header &-fixed-left &-body-inner {\n padding-right: 0px;\n }\n\n &-fixed-header &-body-inner {\n height: 100%;\n // overflow: scroll;\n }\n\n\n &-fixed-header &-scroll &-header {\n overflow-x: scroll;\n padding-bottom: 20px;\n margin-bottom: -20px;\n overflow-y: scroll;\n box-sizing: border-box;\n }\n\n &-title {\n padding: $vertical-padding $horizontal-padding;\n border-top: 1px solid $table-border-color;\n }\n\n &-content {\n position: relative;\n }\n\n &-footer {\n padding: $vertical-padding $horizontal-padding;\n border-bottom: 1px solid $table-border-color;\n .u-table-scroll{\n overflow-x: hidden;\n }\n }\n &-footer & {\n margin: (-$vertical-padding) (-$horizontal-padding);\n }\n\n &-placeholder {\n padding: $vertical-padding 8px;\n background: #fff;\n border-bottom: 1px solid $table-border-color;\n text-align: center;\n position: relative;\n .table-nodata{ font-size:48px; }\n }\n\n &-expand-icon-col {\n width: 10px;\n }\n &-row,\n &-expanded-row {\n .u-table{\n tr{\n background: #fff;\n }\n tr.u-table-row-hover{\n background:unquote(\"rgb(#{$table-row-hover-bg-color})\");\n }\n }\n &-expand-icon {\n cursor: pointer;\n display: inline-block;\n margin-right: 0px;\n width: 16px;\n height: 16px;\n text-align: center;\n line-height: 16px;\n border: 1px solid $table-border-color;\n user-select: none;\n background: #fff;\n margin-right: 10px;\n }\n &-spaced {\n visibility: hidden;\n }\n &-spaced:after {\n content: \".\";\n }\n\n &-expanded:after {\n content: \"-\";\n }\n\n &-collapsed:after {\n content: \"+\";\n }\n }\n &-row{\n &.selected{\n background: #FFF7E7;\n }\n }\n tr.u-table-expanded-row {\n background: #f7f7f7;\n &:hover {\n background: #f7f7f7;\n }\n .u-table {\n // padding: 0 40px 0 20px;\n z-index: 1;\n }\n }\n &-column-hidden {\n display: none;\n }\n &-prev-columns-page,\n &-next-columns-page {\n cursor: pointer;\n color: #666;\n z-index: 1;\n &:hover {\n color: #2db7f5;\n }\n &-disabled {\n cursor: not-allowed;\n color: #999;\n &:hover {\n color: #999;\n }\n }\n }\n &-prev-columns-page {\n margin-right: 8px;\n &:before {\n content: \"<\";\n }\n }\n &-next-columns-page {\n float: right;\n &:before {\n content: \">\";\n }\n }\n\n &-fixed-left,\n &-fixed-right {\n position: absolute;\n top: 0;\n overflow: hidden;\n z-index: 1;\n table {\n width: auto;\n background: #fff;\n }\n }\n\n &-fixed-left {\n left: 0;\n box-shadow: 4px 0 4px rgba(100, 100, 100, 0.1);\n &-body-inner {\n margin-right: -20px;\n padding-right: 20px;\n }\n &-fixed-header & &-body-inner {\n padding-right: 0;\n }\n }\n\n &-fixed-right {\n right: 0;\n box-shadow: -4px 0 4px rgba(100, 100, 100, 0.1);\n\n // hide expand row content in right fixed Table\n // https://github.com/ant-design/ant-design/issues/1898\n &-expanded-row {\n color: transparent;\n pointer-events: none;\n }\n \n }\n \n &-scroll-position-left &-fixed-left {\n box-shadow: none;\n }\n\n &-scroll-position-right &-fixed-right {\n box-shadow: none;\n }\n\n &-thead{\n .filter-text,.filter-dropdown,.filter-date {\n font-weight: normal;\n }\n .filter-wrap{\n display: flex;\n justify-content: center;\n align-items: center;\n .filter-btns{\n min-width: 58px;\n }\n }\n th{\n background: $table-head-background-color;\n color: $table-head-text-color;\n background-clip:padding-box;\n //禁止选中文字\n -moz-user-select: -moz-none;\n -khtml-user-select: none;\n -webkit-user-select: none; \n /*\n Introduced in IE 10. \n */\n -ms-user-select: none;\n user-select: none;\n\n // overflow: hidden;\n // white-space: nowrap;\n // text-overflow: ellipsis;\n .bee-table-column-sorter {\n position: relative;\n margin-left: 4px;\n height: 16px;\n vertical-align: middle;\n text-align: center;\n display: inline-block;\n margin-top: -3px;\n i{\n padding: 0px;\n font-weight: 600;\n color: $icon-color;\n }\n \n & > .bee-table-column-sorter-down,\n & > .bee-table-column-sorter-up, & > .bee-table-column-sorter-flat {\n line-height: 16px;\n display: block;\n width: 34px;\n cursor: pointer;\n }\n \n }\n\n .bee-table-column-sorter-down.on .uf-triangle-down,\n .bee-table-column-sorter-down.on .uf-triangle-up,\n .bee-table-column-sorter-up.on .uf-triangle-down,\n .bee-table-column-sorter-up.on .uf-triangle-up {\n color: #108ee9;\n }\n .bee-table-column-sorter .uf-triangle-down,\n .bee-table-column-sorter .uf-triangle-up {\n -webkit-filter: none;\n filter: none;\n font-size: 12px;\n }\n .bee-table-column-sorter .uf-triangle-down,\n .bee-table-column-sorter .uf-triangle-up {\n display: inline-block;\n padding: 0;\n font-size: 12px;\n font-size: 8px\\9;\n -webkit-transform: scale(0.66666667) rotate(0deg);\n -ms-transform: scale(0.66666667) rotate(0deg);\n transform: scale(0.66666667) rotate(0deg);\n -ms-filter: \"progid:DXImageTransform.Microsoft.Matrix(sizingMethod='auto expand', M11=1, M12=0, M21=0, M22=1)\";\n zoom: 1;\n line-height: 4px;\n height: 4px;\n color: #999;\n // -webkit-transition: all 0.3s;\n // transition: all 0.3s;\n }\n &:hover{\n .bee-table-column-sorter {\n display: inline-block;\n }\n }\n }\n .th-drag{\n cursor: move;\n }\n .th-drag:hover{\n background: $hover-bg-color-base;\n\n }\n //为了区分是拖拽宽度还是交换列,先注释上面了\n // .th-drag:hover{\n // background:#ccc;\n // }\n .th-drag-hover{ \n background: #ccc;\n }\n &-th{\n position: relative;\n\n &-drag-gap{\n height: 100%;\n position: absolute;\n right: -10px;\n top: 0;\n // background:transparent;\n // width: 1px;\n // background:#ccc;\n width: 20px;\n \n box-sizing: border-box;\n z-index: 1;\n\n .online{\n height: 100%;\n width: 1px;\n background:transparent;//兼容火狐浏览器,如果table设置border,\n margin: 0 auto;\n }\n .online-hover{\n background:#000000;\n }\n \n }\n &-drag-gap:hover{\n cursor: col-resize;\n .online{\n background: #000000\n }\n }\n }\n &-th:last-child {\n &-drag-gap{\n border: none;\n }\n }\n }\n\n\n &-filter-column{\n \n &-pop-cont{\n margin: 0px;\n max-height: 300px;\n overflow-y: scroll;\n color:#212121;\n }\n &-clear-setting{ \n // border-bottom: 1px solid #ccc;\n cursor: pointer;\n margin-bottom: 4px;\n }\n &-cont{\n position: relative;\n }\n &-filter-icon{\n position: absolute;\n width: 30px;\n height: 38px ;\n line-height: 38px;\n right: 12px ;\n top:1px ;\n z-index: 2;\n background: $table-head-background-color;\n text-align: center;\n cursor: pointer;\n i.uf{\n padding: 0px;\n color: $icon-color;\n }\n }\n &-pop-cont-item{\n margin-top: 8px;\n font-size: 12px;\n // line-height: 30px;\n cursor: pointer;\n .u-checkbox {\n margin: 0px;\n\n }\n }\n &-pop-cont-item>span{\n margin-left: -3px;\n max-width: 132px;\n width: auto !important;\n min-width: 56px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n display: inline-block;\n vertical-align: middle;\n }\n &-pop .u-modal-dialog{\n border: 1px solid #ccc;\n background: #fff;\n }\n }\n //拖拽宽度代码\n &-row-fixed-columns-in-body{\n // visibility: hidden;\n display:none;\n pointer-events: none;\n }\n //固定列含有checkbox 样式复写\n .u-checkbox {\n height: $checkbox-height;\n line-height: $checkbox-height;\n margin:0px;\n .u-checkbox-label{\n line-height: $checkbox-height;\n padding-left: 16px;\n &:before,&:after {\n width: $checkbox-height;\n height: $checkbox-height;\n }\n }\n }\n .u-table-scroll,.u-table-fixed-left{\n tr{\n td:first-child, th:first-child{\n padding-left: $first-horizontal-padding\n }\n }\n }\n &.has-fixed-left{\n .u-table-scroll{\n tr{\n td:first-child, th:first-child{\n padding-left: $horizontal-padding\n }\n }\n }\n }\n}\n.u-table:focus{\n outline: none;\n // border-color: #9ecaed;\n // box-shadow: 0 0 10px #9ecaed;\n box-shadow: 0 0 0;\n}\n\n .u-table-bordered {\n .u-table-drag-gap{\n background:#e9e9e9;\n }\n }\n.u-table.bordered {\n table {\n border-collapse: collapse;\n }\n th,\n td {\n border: 1px solid $table-border-color;\n }\n}\n\n.move-enter,\n.move-appear {\n opacity: 0;\n animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);\n animation-duration: 2.5s;\n animation-fill-mode: both;\n animation-play-state: paused;\n}\n\n.move-leave {\n animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);\n animation-duration: 0.5s;\n animation-fill-mode: both;\n animation-play-state: paused;\n}\n\n.move-enter.move-enter-active,\n.move-appear.move-enter-active {\n animation-name: moveLeftIn;\n animation-play-state: running;\n}\n\n.move-leave.move-leave-active {\n animation-name: moveRightOut;\n animation-play-state: running;\n}\n\n@keyframes moveLeftIn {\n 0% {\n transform-origin: 0 0;\n transform: translateX(30px);\n opacity: 0;\n background: $table-move-in-color;\n }\n 20% {\n transform-origin: 0 0;\n transform: translateX(0);\n opacity: 1;\n }\n 80% {\n background: $table-move-in-color;\n }\n 100% {\n background: transparent;\n opacity: 1;\n }\n}\n\n@keyframes moveRightOut {\n 0% {\n transform-origin: 0 0;\n transform: translateX(0);\n opacity: 1;\n }\n 100% {\n transform-origin: 0 0;\n transform: translateX(-30px);\n opacity: 0;\n }\n}\n\n.formItem-style {\n height: unset;\n min-height: unset;\n padding: 0;\n}\n.errMessage-style {\n display: none;\n border: none;\n /* margin-top: 5px; */\n /* margin-bottom: 5px; */\n background: transparent;\n color: #f22c1d;\n /* padding-left: 12px; */\n /* padding-right: 12px; */\n margin: 0;\n position: absolute;\n padding: 0;\n top: 3px;\n right: 0;\n}\n\n.editable-cell {\n position: relative;\n}\n\n.editable-cell-input-wrapper,\n.editable-cell-text-wrapper {\n padding-right: 24px;\n}\n.editable-cell-input-wrapper {\n .u-form-item.formItem-style .u-label{\n display: none;\n }\n .u-input-group .u-form-control{\n height: 26px;\n font-size: 12px;\n }\n}\n\n.editable-cell-text-wrapper {\n padding: 5px 24px 5px 5px;\n height: 30px;\n}\n\n.editable-cell-icon,\n.editable-cell-icon-check {\n position: absolute;\n top: 0;\n right: 0;\n width: 20px;\n cursor: pointer;\n}\n\n.editable-cell-icon {\n line-height: 28px;\n display: none;\n}\n\n.editable-cell-icon-check {\n line-height: 28px;\n}\n\n.editable-cell:hover .editable-cell-icon {\n display: inline-block;\n}\n\n.editable-cell-icon:hover,\n.editable-cell-icon-check:hover {\n color: #2db7f5;\n}\n\n.editable-add-btn {\n margin-bottom: 8px;\n}\n\n.search-component {\n margin-bottom: 20px;\n .empty-search {\n position: absolute;\n right: 45px;\n z-index: 20;\n top: 5px;\n color: #524e4e;\n cursor: pointer;\n }\n &.u-input-group.simple {\n float: right;\n }\n &.u-input-group.simple .u-form-control {\n width: 251px;\n background: #f5f5f5;\n border-color: #f5f5f5;\n border-radius: 20px;\n }\n &.u-input-group.simple .u-input-group-btn {\n top: 3px;\n right: 20px;\n position: absolute;\n }\n}\n\n\n.col-resize-container {\n height: 0px;\n position: relative;\n\n & + .table-col-resizer:first-of-type {\n table-layout: fixed;\n }\n\n .active-drag .icon{\n visibility: visible;\n }\n\n .last-handle {\n display: none;\n }\n\n .drag-handle {\n margin-left: -5px;\n position: absolute;\n z-index: 5;\n width: 10px;\n cursor: col-resize;\n\n .icon {\n color: #40b0dc;\n top: -1px;\n position: absolute;\n visibility: hidden;\n\n &:first-child {\n left: -2px\n }\n &:last-child {\n left: 6px\n }\n }\n\n &:hover{\n .icon{\n visibility: visible;\n }\n .col-resizer {\n border: 1px solid;\n }\n }\n\n &.disabled-drag {\n cursor: default;\n display: none;\n }\n\n .col-resizer {\n position: absolute;\n width: 1px;\n height: 100%;\n top: 0px;\n left: 3px;\n }\n }\n}\n\n.u-filter-dropdown-menu-wrap {\n z-index: 1800;\n .u-dropdown-menu {\n li.u-dropdown-menu-item {\n line-height: $filter-form-control-height;\n height: $filter-form-control-height;\n padding: 0px 16px 0 16px;\n cursor: pointer;\n }\n }\n}\n.filter-wrap {\n .u-form-control{\n height: $filter-form-control-height;\n }\n .u-input-number.u-input-group.simple .u-input-group-btn .icon-group {\n height: $filter-form-control-height;\n }\n}\n.u-row-hover{\n position: absolute;\n right: 24px;\n display: none;\n align-items: center;\n justify-content: center;\n background: transparent;\n}\n\n.u-row-hover2{\n position: absolute;\n left: 100;\n}\n\n// 滚动条样式复写\n::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n}\n::-webkit-scrollbar-button {\n display: none;\n}\n::-webkit-scrollbar-thumb {\n background: #d5d5d5 !important;\n border-radius: 5px;\n}\n::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background-color: #d5d5d5;\n position: absolute;\n}\n\n::-webkit-scrollbar-track {\n display: none;\n}\n\n::-webkit-scrollbar-track-piece {\n display: none;\n}\n\n// 表格显示里面的内容显示在一行\n.header-dispaly-in-row{\n &.u-table{\n table{\n table-layout: fixed;\n }\n }\n th{\n text-overflow: ellipsis;\n white-space: nowrap;\n vertical-align: middle;\n overflow: hidden;\n }\n}\n.body-dispaly-in-row{\n &.u-table{\n table{\n table-layout: fixed;\n }\n \n }\n td{\n text-overflow: ellipsis;\n white-space: nowrap;\n vertical-align: middle;\n overflow: hidden;\n }\n}\n.u-table-drag-hidden-cont{\n position: absolute;\n top:-1000px;\n}\n","// @import \"../node_modules/tinper-bee-core/scss/index.scss\";\n// @import \"../node_modules/bee-panel/src/Panel.scss\";\n// @import \"../node_modules/bee-layout/src/Layout.scss\";\n// @import \"../node_modules/bee-button/src/Button.scss\";\n// @import \"../node_modules/bee-transition/src/Transition.scss\";\n// @import \"../node_modules/bee-popconfirm/src/Popconfirm.scss\";\n// @import \"../node_modules/bee-form-control/src/FormControl.scss\";\n// @import \"../node_modules/bee-pagination/src/Pagination.scss\";\n// @import \"../node_modules/bee-checkbox/src/Checkbox.scss\";\n// @import \"../node_modules/bee-select/src/Select.scss\";\n// @import \"../node_modules/bee-form/src/Form.scss\";\n// @import \"../node_modules/bee-popover/src/Popover.scss\";\n// @import \"../node_modules/bee-tooltip/src/Tooltip.scss\";\n// @import \"../node_modules/bee-message/build/Message.css\";\n// @import \"../node_modules/bee-dropdown/build/Dropdown.css\";\n// @import \"../node_modules/bee-input-number/build/InputNumber.css\";\n// @import \"../node_modules/bee-modal/build/Modal.css\";\n@import \"../src/Table.scss\";\n\n\n//引入日期控件样式文件\n// @import \"../node_modules/bee-datepicker/src/datepicker.scss\";\n\n.selected{\n background: #FFF7E7;\n}\n\n.demo25{\n height: 100%;\n\n .u-table-filter-column-filter-icon{\n right: 15px;\n }\n\n}\n.opt-btns .u-button{\n color: #fff;\n background: #505F79;\n &:hover, &:active{\n background: #344563;\n }\n}",".demo04 {\n &.u-table tr:nth-child(2n){\n background: #f7f9fb;\n }\n &.u-table tr.u-table-row-hover, .u-table tr:hover{\n background: #ebecf0;\n }\n}",".demo22{\n .opt-btns{\n margin-bottom: 8px;\n }\n}",".demo32{\n .u-table-thead th {\n padding-top: 0px;\n padding-bottom: 0px;\n }\n}",".demo501 {\n .editable-cell-text-wrapper {\n &:hover {\n border: 1px dashed #A5ADBA;\n }\n }\n\n .require {\n position: absolute;\n top: 2px;\n color: red;\n font-size: 20px;\n }\n}\n\n.help-tip {\n color: #F44336;\n}\n\n.tp-501 {\n .tooltip-arrow {\n border-bottom-color: #F44336 !important;\n }\n\n .tooltip-inner {\n border-color: #F44336 !important;\n }\n}\n","th{\n .drop-menu{\n .uf{\n font-size: 12px;\n visibility: hidden;\n margin-left: 15px;\n }\n \n \n }\n &:hover{\n .uf{\n visibility: visible;\n }\n }\n\n}\n\n",".demo8{\n .u-table {\n margin-bottom: 11px;\n }\n .u-pagination{\n display: flex;\n align-items: center;\n justify-content: center;\n }\n}"],"sourceRoot":"/source/"}
\ No newline at end of file
+{"version":3,"sources":["TableDemo.scss","demolist/Demo0104.scss","demolist/Demo0302.scss","demolist/Demo0402.scss","demolist/Demo0502.scss","demolist/Demo0603.scss","demolist/Demo1601.scss"],"names":[],"mappings":"AAsBA;EACE,oBAAoB,EACrB;;AAED;EACE,aAAa,EAMd;EAPD;IAII,YAAY,EACb;;AAGH;EACE,YAAY;EACZ,oBAAoB,EAIrB;EAND;IAII,oBAAoB,EACrB;;ACvCH;EAEQ,oBAAoB,EACvB;;AAHL;EAKQ,oBAAoB,EACvB;;ACNL;EAEQ,mBAAmB,EACtB;;ACHL;EAEQ,iBAAiB;EACjB,oBAAoB,EACvB;;ACJL;EAGM,iBAAiB,EAKlB;EARL;IAMQ,sBAAsB,EACvB;;AAPP;EAUM,aAAa,EACd;;AAXL;EAcQ,kBAAkB;EAClB,0BAA0B,EAC3B;;AAhBP;;EAoBM,aAAa,EACd;;AArBL;EAyBI,uBAAuB;EACvB,kBAAkB;EAClB,mBAAmB,EAMpB;EAjCH;IA8BM,kBAAkB;IAClB,0BAA0B,EAC3B;;AAhCL;EAoCI,mBAAmB;EACnB,SAAS;EACT,eAAe;EACf,gBAAgB,EACjB;;AAGH;EACE,eAAe,EAChB;;AAED;EAEI,wCAAwC,EACzC;;AAHH;EAMI,iCAAiC,EAClC;;ACtDH;EAGY,gBAAgB;EAChB,mBAAmB;EACnB,kBAAkB,EACrB;;AANT;EAYgB,oBAAoB,EAC3B;;;ACbT;EAEQ,oBAAoB,EACvB;;AAHL;EAKQ,qBAAc;EAAd,cAAc;EACd,uBAAoB;EAApB,oBAAoB;EACpB,sBAAwB;EAAxB,wBAAwB,EAC3B","file":"demo.css","sourcesContent":["// @import \"../node_modules/tinper-bee-core/scss/index.scss\";\n// @import \"../node_modules/bee-panel/src/Panel.scss\";\n// @import \"../node_modules/bee-layout/src/Layout.scss\";\n// @import \"../node_modules/bee-button/src/Button.scss\";\n// @import \"../node_modules/bee-transition/src/Transition.scss\";\n// @import \"../node_modules/bee-popconfirm/src/Popconfirm.scss\";\n// @import \"../node_modules/bee-form-control/src/FormControl.scss\";\n// @import \"../node_modules/bee-pagination/src/Pagination.scss\";\n// @import \"../node_modules/bee-checkbox/src/Checkbox.scss\";\n// @import \"../node_modules/bee-select/src/Select.scss\";\n// @import \"../node_modules/bee-popover/src/Popover.scss\";\n// @import \"../node_modules/bee-tooltip/src/Tooltip.scss\";\n// @import \"../node_modules/bee-message/build/Message.css\";\n// @import \"../node_modules/bee-dropdown/build/Dropdown.css\";\n// @import \"../node_modules/bee-input-number/build/InputNumber.css\";\n// @import \"../node_modules/bee-modal/build/Modal.css\";\n// @import \"../src/Table.scss\";\n\n\n//引入日期控件样式文件\n// @import \"../node_modules/bee-datepicker/src/datepicker.scss\";\n\n.selected{\n background: #FFF7E7;\n}\n\n.demo25{\n height: 100%;\n\n .u-table-filter-column-filter-icon{\n right: 15px;\n }\n\n}\n.opt-btns .u-button{\n color: #fff;\n background: #505F79;\n &:hover, &:active{\n background: #344563;\n }\n}",".demo04 {\n &.u-table tr:nth-child(2n){\n background: #f7f9fb;\n }\n &.u-table tr.u-table-row-hover, .u-table tr:hover{\n background: #ebecf0;\n }\n}",".demo22{\n .opt-btns{\n margin-bottom: 8px;\n }\n}",".demo32{\n .u-table-thead th {\n padding-top: 0px;\n padding-bottom: 0px;\n }\n}",".demo0502 {\n .u-table-row {\n td {\n padding: 5px 8px;\n\n input.error {\n border-color: #F44336;\n }\n }\n .editable-cell {\n height: 30px;\n }\n &-hover {\n .editable-cell-text-wrapper {\n line-height: 18px;\n border: 1px solid #c1c7d0;\n }\n }\n .u-form-control,\n .u-select-selection {\n height: 30px;\n }\n }\n\n .editable-cell-text-wrapper {\n box-sizing: border-box;\n line-height: 20px;\n border-radius: 3px;\n\n &:hover {\n line-height: 18px;\n border: 1px solid #a5adba;\n }\n }\n\n .require {\n position: absolute;\n top: 2px;\n color: #F44336;\n font-size: 20px;\n }\n}\n\n.help-tip {\n color: #F44336;\n}\n\n.tp-0502 {\n .tooltip-arrow {\n border-bottom-color: #F44336 !important;\n }\n\n .tooltip-inner {\n border-color: #F44336 !important;\n }\n}\n","th{\n .drop-menu{\n .uf{\n font-size: 12px;\n visibility: hidden;\n margin-left: 15px;\n }\n \n \n }\n &:hover{\n .uf{\n visibility: visible;\n }\n }\n\n}\n\n",".demo8{\n .u-table {\n margin-bottom: 11px;\n }\n .u-pagination{\n display: flex;\n align-items: center;\n justify-content: center;\n }\n}"],"sourceRoot":"/source/"}
\ No newline at end of file
diff --git a/dist/demo.js b/dist/demo.js
index a989559..13ab11b 100644
--- a/dist/demo.js
+++ b/dist/demo.js
@@ -66,7 +66,7 @@
var _beeClipboard2 = _interopRequireDefault(_beeClipboard);
- var _src = __webpack_require__(263);
+ var _src = __webpack_require__(157);
var _src2 = _interopRequireDefault(_src);
@@ -80,7 +80,7 @@
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
- var Demo0101 = __webpack_require__(590);var Demo0102 = __webpack_require__(593);var Demo0103 = __webpack_require__(594);var Demo0104 = __webpack_require__(595);var Demo0105 = __webpack_require__(596);var Demo0106 = __webpack_require__(597);var Demo0201 = __webpack_require__(598);var Demo0202 = __webpack_require__(599);var Demo0301 = __webpack_require__(600);var Demo0302 = __webpack_require__(601);var Demo0402 = __webpack_require__(604);var Demo0404 = __webpack_require__(605);var Demo0405 = __webpack_require__(610);var Demo0501 = __webpack_require__(612);var Demo0502 = __webpack_require__(616);var Demo0601 = __webpack_require__(617);var Demo0602 = __webpack_require__(618);var Demo0603 = __webpack_require__(619);var Demo0701 = __webpack_require__(620);var Demo0702 = __webpack_require__(621);var Demo0802 = __webpack_require__(622);var Demo0901 = __webpack_require__(627);var Demo0902 = __webpack_require__(628);var Demo0903 = __webpack_require__(629);var Demo1001 = __webpack_require__(630);var Demo1002 = __webpack_require__(632);var Demo1101 = __webpack_require__(633);var Demo1102 = __webpack_require__(634);var Demo1103 = __webpack_require__(635);var Demo1105 = __webpack_require__(636);var Demo1106 = __webpack_require__(637);var Demo1107 = __webpack_require__(638);var Demo1108 = __webpack_require__(639);var Demo1301 = __webpack_require__(640);var Demo1401 = __webpack_require__(641);var Demo1402 = __webpack_require__(643);var Demo1403 = __webpack_require__(644);var Demo1404 = __webpack_require__(645);var Demo1601 = __webpack_require__(646);var Demo1602 = __webpack_require__(647);var DemoArray = [{ "example": _react2['default'].createElement(Demo0101, null), "title": " 基本表格", "code": "/**\n*\n* @title 基本表格\n* @parent 基础 Basic\n* @description 单元格数据过长时,可结合Tooltip组件使用。\n* demo0101\n*/\n\nimport React, { Component } from \"react\";\nimport {Button,Tooltip} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n {\n title: \"员工编号\", dataIndex: \"a\", key: \"a\", width: 120, className: \"rowClassName\",\n fixed:'left',\n render: (text, record, index) => {\n return (\n \n {text}\n \n );\n }\n },\n { title: \"员工姓名\", dataIndex: \"b\", key: \"b\", width:100 },\n { title: \"性别\", dataIndex: \"c\", key: \"c\", width: 100 },\n { title: \"部门\", dataIndex: \"d\", key: \"d\", width: 100 },\n { title: \"职级\", dataIndex: \"e\", key: \"e\", width: 100 }\n];\n\nconst data = [\n { a: \"ASVAL_201903280005\", b: \"小张\", c: \"男\", d: \"财务二科\", e: \"M1\", key: \"1\" },\n { a: \"ASVAL_201903200004\", b: \"小明\", c: \"男\", d: \"财务一科\", e: \"T1\", key: \"2\" },\n { a: \"ASVAL_201903120002\", b: \"小红\", c: \"女\", d: \"财务一科\", e: \"T2\", key: \"3\" }\n];\n\nclass Demo01 extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n data: data\n }\n }\n handleClick = () => {\n console.log('这是第' , this.currentIndex , '行');\n console.log('内容:' , this.currentRecord);\n }\n\n render() {\n return (\n \n );\n }\n}\n\n\n", "desc": " 单元格数据过长时,可结合Tooltip组件使用。" }, { "example": _react2['default'].createElement(Demo0102, null), "title": " 默认无数据展示", "code": "/**\r\n*\r\n* @title 默认无数据展示\r\n* @parent 基础 Basic\r\n* @description 无数据时默认展示图标,可在`emptyText`方法中自定义展示内容。\r\n* demo0102\r\n*/\r\n\r\n\r\nimport React, { Component } from 'react';\r\nimport { Table, Icon } from 'tinper-bee';\r\n\n\r\nconst columns02 = [\r\n {\r\n title: \"员工编号\",\r\n dataIndex: \"num\",\r\n key: \"num\",\r\n width: \"40%\"\r\n },\r\n {\r\n title: \"员工姓名\",\r\n dataIndex: \"name\",\r\n key: \"name\",\r\n width: \"30%\"\r\n },\r\n {\r\n title: \"部门\",\r\n dataIndex: \"department\",\r\n key: \"department\"\r\n }\r\n];\r\n \r\nconst data02 = [];\r\n\r\n// 在此自定义无数据时的展示内容\r\nconst emptyFunc = () => 'No Data';\r\n \r\nclass Demo02 extends Component {\r\n render() {\r\n return (\r\n \r\n )\r\n }\r\n}\r\n\r\n", "desc": " 无数据时默认展示图标,可在`emptyText`方法中自定义展示内容。" }, { "example": _react2['default'].createElement(Demo0103, null), "title": " 固定表头", "code": "/**\r\n*\r\n* @title 固定表头\r\n* @parent 基础 Basic\r\n* @description 设置`scroll.y`指定滚动区域的高度,达到固定表头效果\r\n* demo0103\r\n*/\r\n\r\nimport React, { Component } from 'react';\r\nimport { Table } from 'tinper-bee';\r\n\r\nconst columns03 = [\r\n {\r\n title: \"序号\",\r\n dataIndex: \"index\",\r\n key: \"index\",\r\n width: 80, \r\n render(text, record, index) {\r\n return index + 1;\r\n }\r\n },\r\n {\r\n title: \"订单编号\",\r\n dataIndex: \"orderCode\",\r\n key: \"orderCode\",\r\n width: 200, \r\n },\r\n {\r\n title: \"供应商名称\",\r\n dataIndex: \"supplierName\",\r\n key: \"supplierName\",\r\n width: 200\r\n },\r\n {\r\n title: \"类型\",\r\n dataIndex: \"type_name\",\r\n key: \"type_name\",\r\n width: 200\r\n },\r\n {\r\n title: \"采购组织\",\r\n dataIndex: \"purchasing\",\r\n key: \"purchasing\",\r\n width: 200\r\n },\r\n {\r\n title: \"采购组\",\r\n dataIndex: \"purchasingGroup\",\r\n key: \"purchasingGroup\",\r\n width: 200\r\n },\r\n {\r\n title: \"凭证日期\",\r\n dataIndex: \"voucherDate\",\r\n key: \"voucherDate\",\r\n width: 200,\r\n },\r\n {\r\n title: \"审批状态\",\r\n dataIndex: \"approvalState_name\",\r\n key: \"approvalState_name\",\r\n width: 200\r\n },\r\n {\r\n title: \"确认状态\",\r\n dataIndex: \"confirmState_name\",\r\n key: \"confirmState_name\",\r\n width: 200\r\n }, \r\n {\r\n title: \"关闭状态\",\r\n dataIndex: \"closeState_name\",\r\n key: \"closeState_name\",\r\n width: 100\r\n }\r\n];\r\n\r\nconst data03 = [\r\n { \r\n orderCode:\"NU0391025\", \r\n supplierName: \"xx供应商\",\r\n type_name: \"1\",\r\n purchasing:'组织c', \r\n purchasingGroup:\"aa\",\r\n voucherDate:\"2018年03月18日\",\r\n approvalState_name:\"已审批\",\r\n confirmState_name:\"执行中\",\r\n closeState_name:\"未关闭\",\r\n key: \"1\"\r\n }, \r\n { \r\n orderCode:\"NU0391026\", \r\n supplierName: \"xx供应商\",\r\n type_name: \"2\",\r\n purchasing:'组织a', \r\n purchasingGroup:\"bb\",\r\n voucherDate:\"2018年02月05日\",\r\n approvalState_name:\"已审批\",\r\n confirmState_name:\"待确认\",\r\n closeState_name:\"未关闭\",\r\n key: \"2\"\r\n },\r\n { \r\n orderCode:\"NU0391027\", \r\n supplierName: \"xx供应商\",\r\n type_name: \"3\",\r\n purchasing:'组织b', \r\n purchasingGroup:\"aa\",\r\n voucherDate:\"2018年07月01日\",\r\n approvalState_name:\"已审批\",\r\n confirmState_name:\"终止\",\r\n closeState_name:\"已关闭\",\r\n key: \"3\"\r\n },\r\n { \r\n orderCode:\"NU0391028\", \r\n supplierName: \"xx供应商\",\r\n type_name: \"4\",\r\n purchasing:'组织c', \r\n purchasingGroup:\"cc\",\r\n voucherDate:\"2019年03月01日\",\r\n approvalState_name:\"未审批\",\r\n confirmState_name:\"待确认\",\r\n closeState_name:\"未关闭\",\r\n key: \"4\"\r\n },\r\n { \r\n orderCode:\"NU0391029\", \r\n supplierName: \"xx供应商\",\r\n type_name: \"5\",\r\n purchasing:'组织d', \r\n purchasingGroup:\"ss\",\r\n voucherDate:\"2019年02月14日\",\r\n approvalState_name:\"未审批\",\r\n confirmState_name:\"待确认\",\r\n closeState_name:\"未关闭\",\r\n key: \"5\"\r\n },\r\n { \r\n orderCode:\"NU0391030\", \r\n supplierName: \"xx供应商\",\r\n type_name: \"1\",\r\n purchasing:'组织e', \r\n purchasingGroup:\"zz\",\r\n voucherDate:\"2019年02月18日\",\r\n approvalState_name:\"已审批\",\r\n confirmState_name:\"终止\",\r\n closeState_name:\"已关闭\",\r\n key: \"6\"\r\n },\r\n { \r\n orderCode:\"NU0391031\", \r\n supplierName: \"xx供应商\",\r\n type_name: \"2\",\r\n purchasing:'组织f', \r\n purchasingGroup:\"qq\",\r\n voucherDate:\"2019年01月01日\",\r\n approvalState_name:\"已审批\",\r\n confirmState_name:\"执行中\",\r\n closeState_name:\"未关闭\",\r\n key: \"7\"\r\n },\r\n { \r\n orderCode:\"NU0391032\", \r\n supplierName: \"xx供应商\",\r\n type_name: \"3\",\r\n purchasing:'组织g', \r\n purchasingGroup:\"pp\",\r\n voucherDate:\"2019年01月31日\",\r\n approvalState_name:\"未审批\",\r\n confirmState_name:\"待确认\",\r\n closeState_name:\"未关闭\",\r\n key: \"8\"\r\n },\r\n];\r\n\r\nclass Demo03 extends Component {\r\n render() {\r\n return ;\r\n }\r\n}\r\n\r\n", "desc": " 设置`scroll.y`指定滚动区域的高度,达到固定表头效果" }, { "example": _react2['default'].createElement(Demo0104, null), "title": " 隔行换色", "code": "/**\n*\n* @title 隔行换色\n* @parent 基础 Basic\n* @description 可自定义斑马线颜色\n* demo0104\n*/\n\n\nimport React, { Component } from 'react';\nimport { Table } from 'tinper-bee';\n\nconst columns04 = [\n {title: \"序号\",dataIndex: \"index\",key: \"index\",width: 80, \n render(text, record, index) {\n return index + 1;\n }\n },\n {title: \"订单编号\",dataIndex: \"orderCode\",key: \"orderCode\",width: 200},\n {title: \"供应商名称\",dataIndex: \"supplierName\",key: \"supplierName\",width: 200},\n {title: \"类型\",dataIndex: \"type_name\",key: \"type_name\",width: 200},\n {title: \"采购组织\",dataIndex: \"purchasing\",key: \"purchasing\",width: 200},\n {title: \"采购组\",dataIndex: \"purchasingGroup\",key: \"purchasingGroup\",width: 200},\n {title: \"凭证日期\",dataIndex: \"voucherDate\",key: \"voucherDate\",width: 200}\n];\n\nconst data04 = [\n { \n orderCode:\"NU0391025\", \n supplierName: \"xx供应商\",\n type_name: \"1\",\n purchasing:'组织c', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年03月18日\",\n key: \"1\"\n }, \n { \n orderCode:\"NU0391026\", \n supplierName: \"xx供应商\",\n type_name: \"2\",\n purchasing:'组织a', \n purchasingGroup:\"bb\",\n voucherDate:\"2018年02月05日\",\n key: \"2\"\n },\n { \n orderCode:\"NU0391027\", \n supplierName: \"xx供应商\",\n type_name: \"3\",\n purchasing:'组织b', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年07月01日\",\n key: \"3\"\n },\n { \n orderCode:\"NU0391028\", \n supplierName: \"xx供应商\",\n type_name: \"4\",\n purchasing:'组织c', \n purchasingGroup:\"cc\",\n voucherDate:\"2019年03月01日\",\n key: \"4\"\n },\n { \n orderCode:\"NU0391029\", \n supplierName: \"xx供应商\",\n type_name: \"5\",\n purchasing:'组织d', \n purchasingGroup:\"ss\",\n voucherDate:\"2019年02月14日\",\n key: \"5\"\n },\n { \n orderCode:\"NU0391030\", \n supplierName: \"xx供应商\",\n type_name: \"1\",\n purchasing:'组织e', \n purchasingGroup:\"zz\",\n voucherDate:\"2019年02月18日\",\n key: \"6\"\n },\n { \n orderCode:\"NU0391031\", \n supplierName: \"xx供应商\",\n type_name: \"2\",\n purchasing:'组织f', \n purchasingGroup:\"qq\",\n voucherDate:\"2019年01月01日\",\n key: \"7\"\n },\n { \n orderCode:\"NU0391032\", \n supplierName: \"xx供应商\",\n type_name: \"3\",\n purchasing:'组织g', \n purchasingGroup:\"pp\",\n voucherDate:\"2019年01月31日\",\n key: \"8\"\n },\n];\n\nclass Demo04 extends Component {\n render() {\n return \n }\n}\n\n", "desc": " 可自定义斑马线颜色", "scss_code": ".demo04 {\n &.u-table tr:nth-child(2n){\n background: #f7f9fb;\n }\n &.u-table tr.u-table-row-hover, .u-table tr:hover{\n background: #ebecf0;\n }\n}" }, { "example": _react2['default'].createElement(Demo0105, null), "title": " 表格 Loading 加载", "code": "/**\r\n*\r\n* @title 表格 Loading 加载\r\n* @parent 基础 Basic\r\n* @description loading可以传boolean或者object对象,object为bee-loading组件的参数类型\r\n* demo0105\r\n*/\r\n\r\nimport React, { Component } from \"react\";\r\nimport { Table } from 'tinper-bee';\r\nimport {Button,Tooltip} from \"tinper-bee\";\r\n\r\nconst columns05 = [\r\n { title: \"员工编号\", dataIndex: \"a\", key: \"a\", width: 300, className: \"rowClassName\",fixed:'left'},\r\n { title: \"员工姓名\", dataIndex: \"b\", key: \"b\", width: 500 },\r\n { title: \"性别\", dataIndex: \"c\", key: \"c\", width: 500 },\r\n { title: \"部门\", dataIndex: \"d\", key: \"d\", width: 200 }\r\n];\r\n\r\nconst data05 = [\r\n { a: \"ASVAL_201903280005\", b: \"小张\", c: \"男\", d: \"财务二科\", key: \"1\" },\r\n { a: \"ASVAL_201903200004\", b: \"小明\", c: \"男\", d: \"财务一科\", key: \"2\" },\r\n { a: \"ASVAL_201903120002\", b: \"小红\", c: \"女\", d: \"财务一科\", key: \"3\" }\r\n];\r\n\r\nclass Demo05 extends Component {\r\n constructor(props){\r\n super(props);\r\n this.state = {\r\n loading : true\r\n }\r\n }\r\n changeLoading = () => {\r\n this.setState({\r\n loading : !this.state.loading\r\n })\r\n }\r\n render() {\r\n return (\r\n \r\n
\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\n\r\n", "desc": " loading可以传boolean或者object对象,object为bee-loading组件的参数类型" }, { "example": _react2['default'].createElement(Demo0106, null), "title": " 单元格内容居中", "code": "/**\n*\n* @title 单元格内容居中\n* @parent 基础 Basic\n* @description 在columns数据中设置`textAlign:'center'`,可实现单元格内容居中展示的效果。默认是居左显示。\n* demo0106\n*/\n\nimport React, { Component } from \"react\";\nimport {Button,Tooltip} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n {\n title: \"员工编号\", dataIndex: \"a\", key: \"a\", width: 120, className: \"rowClassName\",\n fixed:'left',\n textAlign:'center',\n render: (text, record, index) => {\n return (\n \n {text}\n \n );\n }\n },\n { title: \"员工姓名\", dataIndex: \"b\", key: \"b\", width:100,textAlign:'center'},\n { title: \"性别\", dataIndex: \"c\", key: \"c\", width: 100,textAlign:'center'},\n { title: \"部门\", dataIndex: \"d\", key: \"d\", width: 100,textAlign:'center' },\n { title: \"职级\", dataIndex: \"e\", key: \"e\", width: 100,textAlign:'center' }\n];\n\nconst data = [\n { a: \"ASVAL_201903280005\", b: \"小张\", c: \"男\", d: \"财务二科\", e: \"M1\", key: \"1\" },\n { a: \"ASVAL_201903200004\", b: \"小明\", c: \"男\", d: \"财务一科\", e: \"T1\", key: \"2\" },\n { a: \"ASVAL_201903120002\", b: \"小红\", c: \"女\", d: \"财务一科\", e: \"T2\", key: \"3\" }\n];\n\nclass Demo06 extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n data: data\n }\n }\n handleClick = () => {\n console.log('这是第' , this.currentIndex , '行');\n console.log('内容:' , this.currentRecord);\n }\n\n render() {\n return (\n \n );\n }\n}\n\n\n", "desc": " 在columns数据中设置`textAlign:'center'`,可实现单元格内容居中展示的效果。默认是居左显示。" }, { "example": _react2['default'].createElement(Demo0201, null), "title": " 横向滚动条", "code": "/**\n*\n* @title 横向滚动条\n* @parent 滚动 Scroll View\n* @description 设置`scroll`属性支持横向或纵向滚动,x/y的取值可以是正整数、百分比、布尔值\n* demo0201\n*/\n\nimport React, { Component } from \"react\";\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n {\n title: \"序号\",\n dataIndex: \"index\",\n key: \"index\",\n width: 100, \n render(text, record, index) {\n return index + 1;\n }\n },\n {\n title: \"订单编号\",\n dataIndex: \"orderCode\",\n key: \"orderCode\",\n width: 300, \n },\n {\n title: \"供应商名称\",\n dataIndex: \"supplierName\",\n key: \"supplierName\",\n width: 200\n },\n {\n title: \"类型\",\n dataIndex: \"type_name\",\n key: \"type_name\",\n width: 200\n },\n {\n title: \"采购组织\",\n dataIndex: \"purchasing\",\n key: \"purchasing\",\n width: 200\n },\n {\n title: \"采购组\",\n dataIndex: \"purchasingGroup\",\n key: \"purchasingGroup\",\n width: 200\n },\n {\n title: \"凭证日期\",\n dataIndex: \"voucherDate\",\n key: \"voucherDate\",\n width: 300,\n },\n {\n title: \"审批状态\",\n dataIndex: \"approvalState_name\",\n key: \"approvalState_name\",\n width: 200\n },\n {\n title: \"确认状态\",\n dataIndex: \"confirmState_name\",\n key: \"confirmState_name\",\n width: 200\n }, \n {\n title: \"关闭状态\",\n dataIndex: \"closeState_name\",\n key: \"closeState_name\",\n width: 100\n }\n];\n \nconst data = [\n { \n orderCode:\"NU0391025\", \n supplierName: \"xx供应商\",\n type_name: \"1\",\n purchasing:'组织c', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年03月18日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"执行中\",\n closeState_name:\"未关闭\",\n key: \"1\"\n }, \n { \n orderCode:\"NU0391026\", \n supplierName: \"xx供应商\",\n type_name: \"2\",\n purchasing:'组织a', \n purchasingGroup:\"bb\",\n voucherDate:\"2018年02月05日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"待确认\",\n closeState_name:\"未关闭\",\n key: \"2\"\n },\n { \n orderCode:\"NU0391027\", \n supplierName: \"xx供应商\",\n type_name: \"3\",\n purchasing:'组织b', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年07月01日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"终止\",\n closeState_name:\"已关闭\",\n key: \"3\"\n },\n { \n orderCode:\"NU0391028\", \n supplierName: \"xx供应商\",\n type_name: \"4\",\n purchasing:'组织c', \n purchasingGroup:\"cc\",\n voucherDate:\"2019年03月01日\",\n approvalState_name:\"未审批\",\n confirmState_name:\"待确认\",\n closeState_name:\"未关闭\",\n key: \"4\"\n },\n { \n orderCode:\"NU0391029\", \n supplierName: \"xx供应商\",\n type_name: \"5\",\n purchasing:'组织d', \n purchasingGroup:\"ss\",\n voucherDate:\"2019年02月14日\",\n approvalState_name:\"未审批\",\n confirmState_name:\"待确认\",\n closeState_name:\"未关闭\",\n key: \"5\"\n }\n];\n\nclass Demo11 extends Component {\n render() {\n return (\n \n );\n }\n}\n\n\n", "desc": " 设置`scroll`属性支持横向或纵向滚动,x/y的取值可以是正整数、百分比、布尔值" }, { "example": _react2['default'].createElement(Demo0202, null), "title": " 纵向滚动条", "code": "/**\n*\n* @title 纵向滚动条\n* @parent 滚动 Scroll View\n* @description 设置`scroll`属性支持横向或纵向滚动,x/y的取值可以是正整数、百分比、布尔值\n* demo0202\n*/\n\nimport React, { Component } from \"react\";\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n {title: \"序号\",dataIndex: \"index\",key: \"index\",width: 80, \n render(text, record, index) {\n return index + 1;\n }\n },\n {title: \"订单编号\",dataIndex: \"orderCode\",key: \"orderCode\",width: 200},\n {title: \"供应商名称\",dataIndex: \"supplierName\",key: \"supplierName\",width: 200},\n {title: \"类型\",dataIndex: \"type_name\",key: \"type_name\",width: 200},\n {title: \"采购组织\",dataIndex: \"purchasing\",key: \"purchasing\",width: 200},\n {title: \"采购组\",dataIndex: \"purchasingGroup\",key: \"purchasingGroup\",width: 200},\n {title: \"凭证日期\",dataIndex: \"voucherDate\",key: \"voucherDate\",width: 200}\n];\n \nconst data = [\n { \n orderCode:\"NU0391025\", \n supplierName: \"xx供应商\",\n type_name: \"1\",\n purchasing:'组织c', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年03月18日\",\n key: \"1\"\n }, \n { \n orderCode:\"NU0391026\", \n supplierName: \"xx供应商\",\n type_name: \"2\",\n purchasing:'组织a', \n purchasingGroup:\"bb\",\n voucherDate:\"2018年02月05日\",\n key: \"2\"\n },\n { \n orderCode:\"NU0391027\", \n supplierName: \"xx供应商\",\n type_name: \"3\",\n purchasing:'组织b', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年07月01日\",\n key: \"3\"\n },\n { \n orderCode:\"NU0391028\", \n supplierName: \"xx供应商\",\n type_name: \"4\",\n purchasing:'组织c', \n purchasingGroup:\"cc\",\n voucherDate:\"2019年03月01日\",\n key: \"4\"\n },\n { \n orderCode:\"NU0391029\", \n supplierName: \"xx供应商\",\n type_name: \"5\",\n purchasing:'组织d', \n purchasingGroup:\"ss\",\n voucherDate:\"2019年02月14日\",\n key: \"5\"\n },\n { \n orderCode:\"NU0391030\", \n supplierName: \"xx供应商\",\n type_name: \"1\",\n purchasing:'组织e', \n purchasingGroup:\"zz\",\n voucherDate:\"2019年02月18日\",\n key: \"6\"\n },\n { \n orderCode:\"NU0391031\", \n supplierName: \"xx供应商\",\n type_name: \"2\",\n purchasing:'组织f', \n purchasingGroup:\"qq\",\n voucherDate:\"2019年01月01日\",\n key: \"7\"\n },\n { \n orderCode:\"NU0391032\", \n supplierName: \"xx供应商\",\n type_name: \"3\",\n purchasing:'组织g', \n purchasingGroup:\"pp\",\n voucherDate:\"2019年01月31日\",\n key: \"8\"\n },\n];\nclass Demo12 extends Component {\n render() {\n return (\n \n );\n }\n}\n\n\n", "desc": " 设置`scroll`属性支持横向或纵向滚动,x/y的取值可以是正整数、百分比、布尔值" }, { "example": _react2['default'].createElement(Demo0301, null), "title": " 渲染本地数据", "code": "/**\n*\n* @title 渲染本地数据\n* @parent 数据操作 Data Opetation\n* @description 可自定义页头和页脚。\n* demo0301\n*/\n\nimport React, { Component } from \"react\";\nimport {Button,Tooltip} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n {\n title: \"员工编号\", dataIndex: \"a\", key: \"a\", width: 300, className: \"rowClassName\",\n fixed:'left',\n render: (text, record, index) => {\n return (\n \n {text}\n \n );\n }\n },\n { title: \"员工姓名\", dataIndex: \"b\", key: \"b\", width: 500 },\n { title: \"性别\", dataIndex: \"c\", key: \"c\", width: 500 },\n { title: \"部门\", dataIndex: \"d\", key: \"d\", width: 200 }\n];\n\nconst data = [\n { a: \"ASVAL_201903280005\", b: \"小张\", c: \"男\", d: \"财务二科\", key: \"1\" },\n { a: \"ASVAL_201903200004\", b: \"小明\", c: \"男\", d: \"财务一科\", key: \"2\" },\n { a: \"ASVAL_201903120002\", b: \"小红\", c: \"女\", d: \"财务一科\", key: \"3\" }\n];\nclass Demo21 extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n data: data\n }\n }\n\n render() {\n return (\n 员工信息统计表
}\n footer={currentData => 合计: 共{data.length}条数据
}\n />\n );\n }\n}\n\n\n", "desc": " 可自定义页头和页脚。" }, { "example": _react2['default'].createElement(Demo0302, null), "title": " 渲染远程数据", "code": "/**\n*\n* @title 渲染远程数据\n* @parent 数据操作 Data Opetation\n* @description 可通过 ajax 请求方式,从服务端读取并展现数据。也可自行接入其他数据处理方式。\n* demo0302\n*/\n\nimport React, { Component } from \"react\";\nimport {Button} from \"tinper-bee\";\nimport reqwest from 'reqwest';\nimport { Table } from 'tinper-bee';\n\nconst columns = [{\n title: 'Name',\n dataIndex: 'name',\n sorter: true,\n render: name => `${name.first} ${name.last}`,\n width: '20%',\n}, {\n title: 'Gender',\n dataIndex: 'gender',\n filters: [\n { text: 'Male', value: 'male' },\n { text: 'Female', value: 'female' },\n ],\n width: '20%',\n}, {\n title: 'Email',\n dataIndex: 'email',\n}];\n\nclass Demo22 extends Component {\n constructor(props) {\n super(props);\n this.state = {\n data: [],\n loading: false,\n }\n }\n\n fetch = (params = {}) => {\n console.log('params:', params);\n this.setState({ loading: true });\n reqwest({\n url: 'https://randomuser.me/api',\n method: 'get',\n data: {\n results: 10,\n ...params,\n },\n type: 'json',\n }).then((data) => {\n this.setState({\n loading: false,\n data: data.results,\n });\n });\n }\n\n render() {\n return (\n \n
\n
\n
\n );\n }\n}\n\n\n", "desc": " 可通过 ajax 请求方式,从服务端读取并展现数据。也可自行接入其他数据处理方式。", "scss_code": ".demo22{\n .opt-btns{\n margin-bottom: 8px;\n }\n}" }, { "example": _react2['default'].createElement(Demo0402, null), "title": " 多列表头", "code": "/**\r\n *\r\n * @title 多列表头\r\n * @parent 列渲染 Custom Render\r\n * @description columns[n] 可以内嵌 children,以渲染分组表头。\r\n * 自定义表头高度需要传headerHeight,注:修改th的padding top和bottom置为0,否则会有影响\r\n * demo0402\r\n */\r\n\r\nimport React, { Component } from \"react\";\r\nimport { Table } from 'tinper-bee';\r\nimport {Button} from \"tinper-bee\";\r\n\r\nconst { ColumnGroup, Column } = Table;\r\n\r\nconst columns = [\r\n {\r\n title: \"Name\",\r\n dataIndex: \"name\",\r\n key: \"name\",\r\n width: 100,\r\n fixed: \"left\"\r\n },\r\n {\r\n title: \"Other\",\r\n width:600,\r\n children: [\r\n {\r\n title: \"Age\",\r\n dataIndex: \"age\",\r\n key: \"age\",\r\n width: 200\r\n },\r\n {\r\n title: \"Address\",\r\n children: [\r\n {\r\n title: \"Street\",\r\n dataIndex: \"street\",\r\n key: \"street\",\r\n width: 200\r\n },\r\n {\r\n title: \"Block\",\r\n children: [\r\n {\r\n title: \"Building\",\r\n dataIndex: \"building\",\r\n key: \"building\",\r\n width: 100\r\n },\r\n {\r\n title: \"Door No.\",\r\n dataIndex: \"number\",\r\n key: \"number\",\r\n width: 100\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n title: \"Company\",\r\n width:400,\r\n children: [\r\n {\r\n title: \"Company Address\",\r\n dataIndex: \"companyAddress\",\r\n key: \"companyAddress\",\r\n width:200,\r\n },\r\n {\r\n title: \"Company Name\",\r\n dataIndex: \"companyName\",\r\n key: \"companyName\",\r\n width:200,\r\n }\r\n ]\r\n },\r\n {\r\n title: \"Gender\",\r\n dataIndex: \"gender\",\r\n key: \"gender\",\r\n width: 60,\r\n fixed: \"right\"\r\n }\r\n];\r\n\r\nconst data = [];\r\nfor (let i = 0; i < 20; i++) {\r\n data.push({\r\n key: i,\r\n name: \"John Brown\",\r\n age: i + 1,\r\n street: \"Lake Park\",\r\n building: \"C\",\r\n number: 2035,\r\n companyAddress: \"Lake Street 42\",\r\n companyName: \"SoftLake Co\",\r\n gender: \"M\"\r\n });\r\n}\r\n\r\nclass Demo32 extends Component {\r\n render() {\r\n return (\r\n \r\n );\r\n }\r\n}\r\n\r\n\r\n", "desc": " columns[n] 可以内嵌 children,以渲染分组表头。", "scss_code": ".demo32{\n .u-table-thead th {\n padding-top: 0px;\n padding-bottom: 0px;\n }\n}" }, { "example": _react2['default'].createElement(Demo0404, null), "title": " 数据关联", "code": "/**\n*\n* @title 数据关联\n* @parent 列渲染 Custom Render\n* @description 数据行关联自定义菜单显示\n* demo0404\n*/\n\nimport React, { Component } from 'react';\nimport {Icon,Checkbox,Dropdown,Menu} from 'tinper-bee';\nimport { Table } from 'tinper-bee';\nimport multiSelect from \"tinper-bee/lib/newMultiSelect\";;\nimport sort from \"tinper-bee/lib/sort\";;\n\nconst { Item } = Menu;\n\nconst data = [\n { \n num:\"NU0391025\", \n name: \"aa\",\n sex: \"男\",\n dept:'财务二科', \n rank:\"T1\",\n year:\"1\",\n seniority:\"1\",\n key: \"1\"\n }, \n { \n num:\"NU0391026\", \n name: \"bb\",\n sex: \"女\",\n dept:'财务一科', \n rank:\"M1\",\n year:\"1\",\n seniority:\"1\",\n key: \"2\"\n },\n { \n num:\"NU0391027\", \n name: \"dd\",\n sex: \"女\",\n dept:'财务一科', \n rank:\"T2\",\n year:\"2\",\n seniority:\"2\",\n key: \"3\"\n }\n];\n\nconst MultiSelectTable = multiSelect(Table, Checkbox);\nconst ComplexTable = sort(MultiSelectTable, Icon);\n\nclass Demo33 extends Component {\n constructor(props) {\n super(props);\n }\n getSelectedDataFunc = data => {\n console.log(data);\n }\n onSelect = (item) => {\n console.log(item);\n }\n render() {\n const menu1 = (\n );\n let columns = [\n { title: \"关联\",dataIndex: \"link\",key: \"link\",width: 80, \n render: (text, record, index) => {\n return (\n \n \n \n )\n }\n },\n { title: \"员工编号\",dataIndex: \"num\",key: \"num\",width: 200 },\n { title: \"员工姓名\",dataIndex: \"name\",key: \"name\", width: 200},\n { title: \"员工性别\",dataIndex: \"sex\",key: \"sex\",width: 200 },\n { title: \"部门\",dataIndex: \"dept\",key: \"dept\",width: 200},\n { title: \"职级\",dataIndex: \"rank\",key: \"rank\",width: 200},\n { title: \"工龄\",dataIndex: \"year\",key: \"year\",width: 200},\n { title: \"司龄\",dataIndex: \"seniority\",key: \"seniority\",width: 200}\n ];\n return \n }\n}\n\n", "desc": " 数据行关联自定义菜单显示" }, { "example": _react2['default'].createElement(Demo0405, null), "title": " 列合计(总计)", "code": "/**\n *\n * @title 列合计(总计)\n * @parent 列渲染 Custom Render\n * @description 给需要计算合计的列(columns),设置sumCol值为true即可,支持动态设置数据源。\n * demo0405\n */\n\nimport React, { Component } from \"react\";\nimport {Button,Checkbox} from \"tinper-bee\";\nimport { Table } from 'tinper-bee'; \nimport sum from \"tinper-bee/lib/sum.js\";;\nimport multiSelect from \"tinper-bee/lib/multiSelect.js\";;\n \nlet ComplexTable = multiSelect(sum(Table), Checkbox);\n\nconst columns = [\n {\n title: \"单据编号\",\n dataIndex: \"num\",\n key: \"num\",\n width: 120,\n fixed: \"left\"\n },\n {\n title: \"单据日期\",\n dataIndex: \"date\",\n key: \"date\",\n width: 200,\n },\n {\n title: \"业务类型\",\n dataIndex: \"type\",\n key: \"type\",\n width: 200\n },\n {\n title: \"供应商\",\n dataIndex: \"supplier\",\n key: \"supplier\",\n width: 100\n },\n {\n title: \"联系人\",\n dataIndex: \"contact\",\n key: \"contact\",\n },\n {\n title: \"仓库\",\n dataIndex: \"warehouse\",\n key: \"warehouse\",\n width: 80,\n },\n {\n title: \"整单数量\",\n dataIndex: \"total\",\n key: \"total\",\n width: 100,\n sumCol: true\n },\n {\n title: \"金额\",\n dataIndex: \"money\",\n key: \"money\",\n width: 100,\n sumCol: true\n }\n];\n\nfunction getData(){\n const data = [];\n for (let i = 0; i < 5; i++) {\n data.push({\n key: i,\n num: \"NU039100\"+i,\n date: \"2019-03-01\",\n type: \"普通采购\",\n supplier: \"gys\"+i,\n contact: \"Tom\",\n warehouse: \"普通仓\",\n total: i + Math.floor(Math.random()*10),\n money: 20 * Math.floor(Math.random()*10)\n });\n }\n return data;\n}\n\nclass Demo35 extends Component {\n \n constructor(props) {\n super(props);\n this.state = {\n data: getData()\n };\n }\n\n changeData = ()=>{\n this.setState({\n data: getData()\n });\n }\n\n render() {\n const {data} = this.state;\n return (\n \n \n\n \n
\n );\n }\n}\n\n", "desc": " 给需要计算合计的列(columns),设置sumCol值为true即可,支持动态设置数据源。" }, { "example": _react2['default'].createElement(Demo0501, null), "title": " 编辑态表格", "code": "/**\n*\n* @title 编辑态表格\n* @parent 编辑 Editor\n* @description 这是带有多种不同格式的编辑态表格(编辑态是通过使用不同的render来达到不同编辑格式)\n* demo0501\n*/\n\nimport React from \"react\";\nimport {Animate,Tooltip,FormControl,Button,Form,Icon,Checkbox,Select} from \"tinper-bee\";\nimport { Table, Datepicker } from 'tinper-bee';\nimport renderInput from \"tinper-bee/lib/InputRender.js\";;\nimport renderDate from \"tinper-bee/lib/DateRender.js\";;\nimport renderSelect from \"tinper-bee/lib/SelectRender.js\";;\n\nconst InputRender = renderInput(Form, FormControl, Icon);\nconst DateRender = renderDate(Datepicker, Icon);\nconst SelectRender = renderSelect(Select, Icon);\n\nconst format = \"YYYY-MM-DD\";\nconst format2 = \"YYYY-MM\";\nconst format3 = \"YYYY-MM-DD HH:mm:ss\";\n\nconst dateInputPlaceholder = \"选择日期\";\nconst dateInputPlaceholder2 = \"选择年月\";\nconst dataSource = [\n {\n key: \"boyuzhou\",\n value: \"jack\"\n },\n {\n key: \"renhualiu\",\n value: \"lucy\"\n },\n {\n key: \"yuzhao\",\n value: \"yiminghe\"\n }\n];\nclass Demo41 extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n dataSource: [\n {\n key: \"0\",\n name: \"沉鱼\",\n number: \"10\",\n age: \"y\",\n address: \"jack\",\n datepicker: \"2017-06-12\",\n MonthPicker: \"2017-02\"\n },\n {\n key: \"1\",\n name: \"落雁\",\n number: \"100\",\n age: \"y\",\n address: \"lucy\",\n datepicker: \"2017-06-12\",\n MonthPicker: \"2017-02\"\n },\n {\n key: \"2\",\n name: \"闭月\",\n number: \"1000\",\n age: \"n\",\n address: \"lucy\",\n datepicker: \"2017-06-12\",\n MonthPicker: \"2017-02\"\n },\n {\n key: \"3\",\n name: \"羞花\",\n number: \"9999\",\n age: \"y\",\n address: \"lucy\",\n datepicker: \"2017-06-12\",\n MonthPicker: \"2017-02\"\n }\n ],\n count: 4\n };\n this.columns = [\n {\n title: \"普通输入\",\n dataIndex: \"name\",\n key: \"name\",\n width: \"150px\",\n render: (text, record, index) => (\n \n \n \n }\n />\n )\n },\n {\n title: \"货币输入\",\n dataIndex: \"number\",\n key: \"number\",\n width: \"150px\",\n render: (text, record, index) => (\n \n \n \n }\n reg={/^[0-9]+$/}\n />\n )\n },\n {\n title: \"复选\",\n dataIndex: \"age\",\n key: \"age\",\n width: \"100px\",\n render: (text, record, index) => (\n \n )\n },\n {\n title: \"下拉框\",\n dataIndex: \"address\",\n key: \"address\",\n width: \"200px\",\n render: (text, record, index) => {\n return (\n \n \n \n \n \n \n );\n }\n },\n {\n title: \"年月日\",\n dataIndex: \"datepicker\",\n key: \"datepicker\",\n width: \"200px\",\n render: (text, record, index) => {\n return (\n \n );\n }\n },\n {\n title: \"年月\",\n dataIndex: \"MonthPicker\",\n key: \"MonthPicker\",\n width: \"200px\",\n render: (text, record, index) => {\n return (\n \n );\n }\n }\n ];\n }\n check = (flag, obj) => {\n console.log(flag);\n console.log(obj);\n };\n\n onInputChange = (index, key) => {\n return value => {\n const dataSource = [...this.state.dataSource];\n dataSource[index][key] = value;\n this.setState({ dataSource });\n };\n };\n onCheckChange = (index, key) => {\n return value => {\n const dataSource = [...this.state.dataSource];\n dataSource[index][key] = value;\n this.setState({ dataSource });\n };\n };\n onSelectChange = (index, key) => {\n return value => {\n console.log(`selected ${value}`);\n const dataSource = [...this.state.dataSource];\n dataSource[index][key] = value;\n this.setState({ dataSource });\n };\n };\n onDateChange = d => {\n console.log(d);\n };\n onDateSelect = d => {\n console.log(d);\n };\n onDelete = index => {\n return () => {\n const dataSource = [...this.state.dataSource];\n dataSource.splice(index, 1);\n this.setState({ dataSource });\n };\n };\n handleAdd = () => {\n const { count, dataSource } = this.state;\n const newData = {\n key: count,\n name: `凤姐 ${count}`,\n age: 32,\n address: \"jack\",\n datepicker: \"2017-06-12\",\n MonthPicker: \"2017-02\"\n };\n this.setState({\n dataSource: [...dataSource, newData],\n count: count + 1\n });\n };\n\n getBodyWrapper = body => {\n return (\n \n {body.props.children}\n \n );\n };\n getData = () => {\n console.log(this.state.dataSource);\n };\n render() {\n const { dataSource } = this.state;\n const columns = this.columns;\n return (\n \n
\n
\n
\n
\n );\n }\n}\n\n\n", "desc": " 这是带有多种不同格式的编辑态表格(编辑态是通过使用不同的render来达到不同编辑格式)" }, { "example": _react2['default'].createElement(Demo0502, null), "title": " 单元格编辑", "code": "/**\n *\n * @title 单元格编辑\n * @description 可以对单元格进行编辑的表格,示例中给出输入框+必填校验、下拉框编辑模式,以及输入模式的必填校验。\n * demo0502\n */\nimport React, { Component } from \"react\";\nimport { Table } from 'tinper-bee';\nimport { Icon, Select, Tooltip } from \"tinper-bee\";\nconst Option = Select.Option;\n\nclass StringEditCell extends Component {\n constructor(props, context) {\n super(props);\n this.state = {\n value: this.props.value,\n editable: false\n };\n }\n\n commitChange = () => {\n if (this.state.value === \"\") return;\n this.setState({ editable: false });\n if (this.props.onChange) {\n this.props.onChange(this.state.value);\n }\n };\n\n edit = () => {\n this.setState({ editable: true });\n };\n\n handleKeydown = event => {\n if (event.keyCode == 13) {\n this.commitChange();\n }\n };\n\n handleChange = e => {\n this.setState({ value: e.target.value });\n };\n\n render() {\n const { value, editable } = this.state;\n return (\n \n {editable ? (\n
\n \n {value === \"\" ? (\n \n {\"请输入\" + this.props.colName}\n
\n }\n >\n
\n \n ) : null}\n
\n ) : (\n \n {value || \" \"}\n
\n )}\n \n );\n }\n}\n\nconst SELECT_SOURCE = [\"xx供应商\", \"yy供应商\", \"zz供应商\", \"aa供应商\", \"bb供应商\"];\n\nclass SelectEditCell extends Component {\n constructor(props, context) {\n super(props);\n this.state = {\n value: this.props.value,\n editable: false\n };\n }\n\n handleSelect = (value) => {\n this.setState({ value });\n }\n\n commitChange = () => {\n this.setState({ editable: false });\n if (this.props.onChange) {\n this.props.onChange(this.state.value);\n }\n };\n\n edit = () => {\n this.setState({ editable: true });\n };\n\n render() {\n const { value, editable } = this.state;\n return (\n \n {editable ? (\n
\n \n
\n ) : (\n
\n {value || \" \"}\n
\n )}\n
\n );\n }\n}\n\nconst dataSource = [\n { name: \"NU03910001\", quality: \"xx供应商\", level: 70, key: \"1\" },\n { name: \"NU03910002\", quality: \"yy供应商\", level: 75, key: \"2\" },\n { name: \"NU03910003\", quality: \"zz供应商\", level: 50, key: \"3\" },\n { name: \"NU03910004\", quality: \"aa供应商\", level: 70, key: \"4\" },\n { name: \"NU03910005\", quality: \"bb供应商\", level: 60, key: \"5\" }\n];\n\nclass Demo501 extends Component {\n constructor(props, context) {\n super(props);\n this.columns = [\n {\n title: \"订单编号\",\n dataIndex: \"name\",\n key: \"name\",\n render: (text, record, index) => (\n \n )\n },\n {\n title: \"供应商名称\",\n dataIndex: \"quality\",\n key: \"quality\",\n render: (text, record, index) => (\n \n )\n },\n {\n title: \"采购数量\",\n dataIndex: \"level\",\n key: \"level\"\n }\n ];\n\n this.state = {\n dataSource: dataSource\n };\n }\n\n onCellChange = (index, key) => {\n return value => {\n const { dataSource } = this.state;\n dataSource[index][key] = value;\n this.setState({ dataSource }, () => console.dir(this.state.dataSource));\n };\n };\n\n render() {\n return (\n \n );\n }\n}\n\n\n", "desc": " 可以对单元格进行编辑的表格,示例中给出输入框+必填校验、下拉框编辑模式,以及输入模式的必填校验。", "scss_code": ".demo501 {\n .editable-cell-text-wrapper {\n &:hover {\n border: 1px dashed #A5ADBA;\n }\n }\n\n .require {\n position: absolute;\n top: 2px;\n color: red;\n font-size: 20px;\n }\n}\n\n.help-tip {\n color: #F44336;\n}\n\n.tp-501 {\n .tooltip-arrow {\n border-bottom-color: #F44336 !important;\n }\n\n .tooltip-inner {\n border-color: #F44336 !important;\n }\n}\n" }, { "example": _react2['default'].createElement(Demo0601, null), "title": " 左侧固定列", "code": "/**\n*\n* @title 左侧固定列\n* @parent 列操作-锁定 Fixed\n* @description 固定列到表格的左侧\n* demo0601\n*/\n\n\n\nimport React, { Component } from 'react';\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n {\n title: \"序号\",\n dataIndex: \"index\",\n key: \"index\",\n width: 80, \n fixed: 'left',\n render(text, record, index){return index + 1}\n },\n {\n title: \"订单编号\",\n dataIndex: \"orderCode\",\n key: \"orderCode\",\n width: 100, \n fixed: 'left',\n },\n {\n title: \"供应商名称\",\n dataIndex: \"supplierName\",\n key: \"supplierName\",\n width: 100\n },\n {\n title: \"类型\",\n dataIndex: \"type_name\",\n key: \"type_name\",\n width: 100\n },\n {\n title: \"采购组织\",\n dataIndex: \"purchasing\",\n key: \"purchasing\",\n width: 100\n },\n {\n title: \"采购组\",\n dataIndex: \"purchasingGroup\",\n key: \"purchasingGroup\",\n width: 100\n },\n {\n title: \"凭证日期\",\n dataIndex: \"voucherDate\",\n key: \"voucherDate\",\n width: 200,\n \n },\n {\n title: \"审批状态\",\n dataIndex: \"approvalState_name\",\n key: \"approvalState_name\",\n width: 100\n },\n {\n title: \"确认状态\",\n dataIndex: \"confirmState_name\",\n key: \"confirmState_name\",\n width: 100\n }, \n {\n title: \"关闭状态\",\n dataIndex: \"closeState_name\",\n key: \"closeState_name\",\n width: 100\n }\n];\n\nconst data = [\n { \n orderCode:\"NU0391025\", \n supplierName: \"xx供应商\",\n type_name: \"1\",\n purchasing:'组织c', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年03月18日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"执行中\",\n closeState_name:\"未关闭\",\n key: \"1\"\n }, \n { \n orderCode:\"NU0391026\", \n supplierName: \"xx供应商\",\n type_name: \"2\",\n purchasing:'组织a', \n purchasingGroup:\"bb\",\n voucherDate:\"2018年02月05日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"待确认\",\n closeState_name:\"未关闭\",\n key: \"2\"\n },\n { \n orderCode:\"NU0391027\", \n supplierName: \"xx供应商\",\n type_name: \"3\",\n purchasing:'组织b', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年07月01日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"终止\",\n closeState_name:\"已关闭\",\n key: \"3\"\n }\n];\n\nclass Demo51 extends Component {\n render() {\n return ;\n }\n}\n\n", "desc": " 固定列到表格的左侧" }, { "example": _react2['default'].createElement(Demo0602, null), "title": " 右侧固定列", "code": "/**\n*\n* @title 右侧固定列\n* @parent 列操作-锁定 Fixed\n* @description 固定列到表格的右侧\n* demo0602\n*/\n\n\n\nimport React, { Component } from 'react';\nimport {Popconfirm} from 'tinper-bee';\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n {\n title: \"序号\",\n dataIndex: \"index\",\n key: \"index\",\n width: 80, \n render(text, record, index){return index + 1}\n },\n {\n title: \"订单编号\",\n dataIndex: \"orderCode\",\n key: \"orderCode\",\n width: 100, \n },\n {\n title: \"供应商名称\",\n dataIndex: \"supplierName\",\n key: \"supplierName\",\n width: 100\n },\n {\n title: \"类型\",\n dataIndex: \"type_name\",\n key: \"type_name\",\n width: 100\n },\n {\n title: \"采购组织\",\n dataIndex: \"purchasing\",\n key: \"purchasing\",\n width: 100\n },\n {\n title: \"采购组\",\n dataIndex: \"purchasingGroup\",\n key: \"purchasingGroup\",\n width: 100\n },\n {\n title: \"凭证日期\",\n dataIndex: \"voucherDate\",\n key: \"voucherDate\",\n width: 200,\n \n },\n {\n title: \"审批状态\",\n dataIndex: \"approvalState_name\",\n key: \"approvalState_name\",\n width: 100\n },\n {\n title: \"确认状态\",\n dataIndex: \"confirmState_name\",\n key: \"confirmState_name\",\n width: 100\n }, \n {\n title: \"关闭状态\",\n dataIndex: \"closeState_name\",\n key: \"closeState_name\",\n width: 100\n },\n {\n title: \"操作\",\n dataIndex: \"d\",\n key: \"d\",\n width:100,\n fixed: \"right\",\n render(text, record, index) {\n return (\n \n )\n }\n }\n];\n\nconst data = [\n { \n orderCode:\"NU0391025\", \n supplierName: \"xx供应商\",\n type_name: \"1\",\n purchasing:'组织c', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年03月18日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"执行中\",\n closeState_name:\"未关闭\",\n key: \"1\"\n }, \n { \n orderCode:\"NU0391026\", \n supplierName: \"xx供应商\",\n type_name: \"2\",\n purchasing:'组织a', \n purchasingGroup:\"bb\",\n voucherDate:\"2018年02月05日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"待确认\",\n closeState_name:\"未关闭\",\n key: \"2\"\n },\n { \n orderCode:\"NU0391027\", \n supplierName: \"xx供应商\",\n type_name: \"3\",\n purchasing:'组织b', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年07月01日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"终止\",\n closeState_name:\"已关闭\",\n key: \"3\"\n }\n];\n\nclass Demo52 extends Component {\n render() {\n return ;\n }\n}\n\n", "desc": " 固定列到表格的右侧" }, { "example": _react2['default'].createElement(Demo0603, null), "title": " 动态设置列锁定、解除锁定", "code": "/**\n*\n* @title 动态设置列锁定、解除锁定\n* @parent 列操作-锁定 Fixed\n* @description 动态设置columns中数据的fixed属性值【fixed: \"left\",fixed: \"right\"】。\n* demo0603\n*/\nimport React, { Component } from 'react';\nimport {Icon,Menu,Dropdown} from \"tinper-bee\";\n\nimport { Table } from 'tinper-bee';\n\nconst { Item } = Menu;\n\nconst columns = [\n {\n title: \"序号\",\n dataIndex: \"index\",\n key: \"index\",\n width: 80, \n fixed: 'left',\n render(text, record, index){return index + 1}\n },\n {\n title: \"订单编号\",\n dataIndex: \"orderCode\",\n key: \"orderCode\",\n width: 100, \n fixed: 'left',\n },\n {\n title: \"供应商名称\",\n dataIndex: \"supplierName\",\n key: \"supplierName\",\n width: 150\n },\n {\n title: \"类型\",\n dataIndex: \"type_name\",\n key: \"type_name\",\n width: 100\n },\n {\n title: \"采购组织\",\n dataIndex: \"purchasing\",\n key: \"purchasing\",\n width: 100\n },\n {\n title: \"采购组\",\n dataIndex: \"purchasingGroup\",\n key: \"purchasingGroup\",\n width: 100\n },\n {\n title: \"凭证日期\",\n dataIndex: \"voucherDate\",\n key: \"voucherDate\",\n width: 200,\n \n },\n {\n title: \"审批状态\",\n dataIndex: \"approvalState_name\",\n key: \"approvalState_name\",\n width: 100\n },\n {\n title: \"确认状态\",\n dataIndex: \"confirmState_name\",\n key: \"confirmState_name\",\n width: 100\n }, \n {\n title: \"关闭状态\",\n dataIndex: \"closeState_name\",\n key: \"closeState_name\",\n width: 100\n }\n];\n\nconst data = [\n { \n orderCode:\"NU0391025\", \n supplierName: \"xx供应商\",\n type_name: \"1\",\n purchasing:'组织c', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年03月18日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"执行中\",\n closeState_name:\"未关闭\",\n key: \"1\"\n }, \n { \n orderCode:\"NU0391026\", \n supplierName: \"xx供应商\",\n type_name: \"2\",\n purchasing:'组织a', \n purchasingGroup:\"bb\",\n voucherDate:\"2018年02月05日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"待确认\",\n closeState_name:\"未关闭\",\n key: \"2\"\n },\n { \n orderCode:\"NU0391027\", \n supplierName: \"xx供应商\",\n type_name: \"3\",\n purchasing:'组织b', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年07月01日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"终止\",\n closeState_name:\"已关闭\",\n key: \"3\"\n }\n];\n \nclass Demo24 extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n columns:columns\n }\n }\n \n onSelect = ({key,item})=>{ \n console.log(`${key} selected`); //获取key\n let currentObject = item.props.data; //获取选中对象的数据\n let {columns} = this.state;\n let fixedCols = [];\n let nonColums = [];\n columns.find(da=>{\n if(da.key == key){\n da.fixed?delete da.fixed:da.fixed = 'left';\n }\n da.fixed?fixedCols.push(da):nonColums.push(da);\n });\n \n columns = [...fixedCols,...nonColums]\n\n this.setState({\n columns\n });\n }\n //表头增加下拉菜单\n renderColumnsDropdown(columns) {\n const icon ='uf-arrow-down';\n \n return columns.map((originColumn,index) => {\n let column = Object.assign({}, originColumn);\n let menuInfo = [], title='锁定';\n if(originColumn.fixed){\n title = '解锁'\n }\n menuInfo.push({\n info:title,\n key:originColumn.key,\n index:index\n });\n const menu = (\n )\n column.title = (\n \n {column.title}\n \n \n \n \n \n );\n return column;\n });\n \n }\n\n render() {\n let {columns} = this.state;\n columns = this.renderColumnsDropdown(columns);\n return(\n \n )\n }\n}\n\n", "desc": " 动态设置columns中数据的fixed属性值【fixed: \"left\",fixed: \"right\"】。", "scss_code": "th{\n .drop-menu{\n .uf{\n font-size: 12px;\n visibility: hidden;\n margin-left: 15px;\n }\n \n \n }\n &:hover{\n .uf{\n visibility: visible;\n }\n }\n\n}\n\n" }, { "example": _react2['default'].createElement(Demo0701, null), "title": " 按条件、值过滤", "code": "/**\n*\n* @title 按条件、值过滤\n* @parent 列操作-过滤 Filter\n* @description 可以根据输入项目以及判断条件对表格内的数据进行过滤。可在控制台查看序列化后的参数字符串。\n* demo0701\n*/\n\nimport React, { Component } from 'react';\nimport { Table } from 'tinper-bee';\n\nconst columns26 = [\n { title: \"姓名\", width: 180, dataIndex: \"name\", key: \"name\", filterType: \"text\", filterDropdown: \"show\" },\n { title: \"年龄\", width: 150, dataIndex: \"age\", key: \"age\", filterType: \"dropdown\", filterDropdown: \"show\" },\n { title: \"日期\", width: 200, dataIndex: \"date\", key: \"date\", filterType: \"date\", filterDropdown: \"show\", format: \"YYYY-MM-DD\" },\n { title: \"居住地址\", width: 150, dataIndex: \"address\", key: \"address\", filterType: \"dropdown\", filterDropdown: \"show\" },\n { title: \"备注\", dataIndex: \"mark\", key: \"mark\" }\n];\n\nconst data26 = [\n {\n key: \"1\",\n name: \"John Brown\",\n age: 32,\n date: \"2018-09-19\",\n address: \"朝阳区\",\n mark: \"无\"\n },\n {\n key: \"2\",\n name: \"Jim Green\",\n age: 40,\n date: \"2018-09-18\",\n address: \"朝阳区\",\n mark: \"无\"\n },\n {\n key: \"3\",\n name: \"Jim Green\",\n age: 40,\n date: \"2018-09-18\",\n address: \"东城区\",\n mark: \"无\"\n },\n {\n key: \"4\",\n name: \"Jim Green\",\n age: 40,\n date: \"2018-09-18\",\n address: \"东城区\",\n mark: \"无\"\n }, {\n key: \"5\",\n name: \"John Brown\",\n age: 32,\n date: \"2018-09-18\",\n address: \"海淀区\",\n mark: \"无\"\n },\n {\n key: \"6\",\n name: \"Jim Green\",\n age: 48,\n date: \"2018-09-18\",\n address: \"海淀区\",\n mark: \"无\"\n },\n {\n key: \"7\",\n name: \"Jim Green\",\n age: 40,\n date: \"2018-09-18\",\n address: \"海淀区\",\n mark: \"无\"\n },\n {\n key: \"8\",\n name: \"Jim Green\",\n age: 38,\n date: \"2018-09-18\",\n address: \"海淀区\",\n mark: \"无\"\n }\n];\n\nclass Demo26 extends Component {\n handlerFilterChange = (key, val, condition) => {\n console.log('参数:key=', key, ' value=', val, 'condition=', condition);\n }\n\n handlerFilterClear = (key) => {\n console.log('清除条件', key);\n }\n render() {\n return ()\n onFilterClear={this.handlerFilterClear}//触发输入操作以及其他的回调(key,val)=>()\n filterDelay={500}//输入文本多少ms触发回调函数,默认300ms\n filterable={true}//是否开启过滤数据功能\n bordered\n columns={columns26}\n data={data26} />;\n }\n}\n\n", "desc": " 可以根据输入项目以及判断条件对表格内的数据进行过滤。可在控制台查看序列化后的参数字符串。" }, { "example": _react2['default'].createElement(Demo0702, null), "title": " 复杂表格中行过滤", "code": "/**\n*\n* @title 复杂表格中行过滤\n* @parent 列操作-过滤 Filter\n* @description 在过滤数据行的基础上增加列拖拽、动态菜单显示、下拉条件动态传入自定义等\n* demo0702\n*/\n\n/**\n * @description \n */\n\nimport React, { Component } from 'react';\nimport {Icon,Checkbox,Dropdown,Menu} from \"tinper-bee\";\n\nimport { Table } from 'tinper-bee';\nimport multiSelect from \"tinper-bee/lib/multiSelect\";;\nimport sort from \"tinper-bee/lib/sort\";;\n\nconst SubMenu = Menu.SubMenu;\nconst MenuItemGroup = Menu.ItemGroup;\n\nconst data27 = [\n {\n key: \"1\",\n name: \"John Brown\",\n age: 32,\n date: \"2018-09-19\",\n address: \"朝阳区\",\n mark: \"无\"\n },\n {\n key: \"2\",\n name: \"Jim Green\",\n age: 40,\n date: \"2018-09-18\",\n address: \"朝阳区\",\n mark: \"无\"\n },\n {\n key: \"3\",\n name: \"Jim Green\",\n age: 40,\n date: \"2018-09-18\",\n address: \"东城区\",\n mark: \"无\"\n },\n {\n key: \"4\",\n name: \"Jim Green\",\n age: 40,\n date: \"2018-09-18\",\n address: \"东城区\",\n mark: \"无\"\n }, {\n key: \"5\",\n name: \"John Brown\",\n age: 32,\n date: \"2018-09-18\",\n address: \"海淀区\",\n mark: \"无\"\n },\n {\n key: \"6\",\n name: \"Jim Green\",\n age: 48,\n date: \"2018-09-18\",\n address: \"海淀区\",\n mark: \"无\"\n },\n {\n key: \"7\",\n name: \"Jim Green\",\n age: 40,\n date: \"2018-09-18\",\n address: \"海淀区\",\n mark: \"无\"\n },\n {\n key: \"8\",\n name: \"Jim Green\",\n age: 38,\n date: \"2018-09-18\",\n address: \"海淀区\",\n mark: \"无\"\n }\n];\n\n\nconst MultiSelectTable = multiSelect(Table, Checkbox);\nconst ComplexTable = sort(MultiSelectTable, Icon);\nclass Demo27 extends Component {\n constructor(props) {\n super(props);\n this.state = {\n dropdownvalue: []\n }\n }\n handlerFilterChange = (key, val, condition) => {\n console.log('参数:key=', key, ' value=', val, 'condition=', condition);\n }\n\n handlerFilterClear = (key) => {\n console.log('清除条件', key);\n }\n getSelectedDataFunc = data => {\n console.log(data);\n }\n onClick = (item) => {\n console.log(item);\n }\n\n render() {\n const menu1 = (\n )\n let multiObj = {\n type: \"checkbox\"\n };\n let columns27 = [\n {\n title: \"\", width: 40, dataIndex: \"key\", key: \"key\", render: (text, record, index) => {\n return \n \n \n }\n },\n {\n title: \"姓名\",\n width: 180,\n dataIndex: \"name\",\n key: \"name\",\n filterType: \"text\",//输入框类型\n filterDropdown: \"show\",//显示条件\n filterDropdownType: \"string\"//字符条件\n },\n {\n title: \"年龄\",\n width: 180,\n dataIndex: \"age\",\n key: \"age\",\n filterType: \"number\",//输入框类型\n filterDropdown: \"show\",//显示条件\n filterDropdownType: \"number\"//字符条件\n },\n {\n title: \"日期\",\n width: 190,\n dataIndex: \"date\",\n key: \"date\",\n filterType: \"date\",//输入框类型\n filterDropdown: \"show\",//显示条件\n filterDropdownType: \"string\"//字符条件\n },\n {\n title: \"时间范围\",\n width: 290,\n dataIndex: \"mark\",\n key: \"mark\",\n filterType: \"daterange\",//输入框类型\n filterDropdown: \"show\",//显示条件\n filterDropdownType: \"number\"//字符条件\n },\n {\n title: \"地址\",\n width: 100,\n dataIndex: \"address\",\n key: \"address\",\n filterType: \"dropdown\",//输入框类型\n filterDropdown: \"show\",//显示条件\n filterDropdownType: \"number\"//字符条件\n }\n ];\n return ()\n onFilterClear={this.handlerFilterClear}//触发输入操作以及其他的回调(key,val)=>()\n filterDelay={500}//输入文本多少ms触发回调函数,默认500ms\n filterable={true}//是否开启过滤数据功能\n getSelectedDataFunc={this.getSelectedDataFunc}\n bordered\n multiSelect={multiObj}\n columns={columns27}\n data={data27} />;\n }\n}\n\n", "desc": " 在过滤数据行的基础上增加列拖拽、动态菜单显示、下拉条件动态传入自定义等" }, { "example": _react2['default'].createElement(Demo0802, null), "title": " 列过滤面板", "code": "/**\n*\n* @title 列过滤面板\n* @parent 列操作-隐藏 Hide\n* @description 点击表头右侧按钮,设置显示或隐藏表格列。可以自定义设置显示某列,通过ifshow属性控制,默认值为true(显示表格所有列)。afterFilter方法为列过滤后触发的回调函数。\n* demo0802\n*/\n\n\nimport React, { Component } from 'react';\nimport {Icon,Popover} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\nimport filterColumn from \"tinper-bee/lib/filterColumn\";;\nimport sum from \"tinper-bee/lib/sum\";;\n\nconst data = [\n { \n orderCode:\"NU0391025\", \n supplierName: \"xx供应商\",\n type_name: \"1\",\n purchasing:'组织c', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年03月18日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"执行中\",\n closeState_name:\"未关闭\",\n key: \"1\"\n }, \n { \n orderCode:\"NU0391026\", \n supplierName: \"xx供应商\",\n type_name: \"2\",\n purchasing:'组织a', \n purchasingGroup:\"bb\",\n voucherDate:\"2018年02月05日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"待确认\",\n closeState_name:\"未关闭\",\n key: \"2\"\n },\n { \n orderCode:\"NU0391027\", \n supplierName: \"xx供应商\",\n type_name: \"3\",\n purchasing:'组织b', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年07月01日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"终止\",\n closeState_name:\"已关闭\",\n key: \"3\"\n }\n];\n\nconst FilterColumnTable = filterColumn(Table, Popover, Icon);\n\nconst defaultProps21 = {\n prefixCls: \"bee-table\"\n};\n\nclass Demo21 extends Component {\n constructor(props) {\n super(props);\n this.state ={\n columns: [\n {\n title: \"序号\",\n dataIndex: \"index\",\n key: \"index\",\n width: 80, \n fixed: 'left',\n render(text, record, index){return index + 1}\n },\n {\n title: \"订单编号\",\n dataIndex: \"orderCode\",\n key: \"orderCode\",\n width: 100, \n fixed: 'left',\n },\n {\n title: \"供应商名称\",\n dataIndex: \"supplierName\",\n key: \"supplierName\",\n width: 150\n },\n {\n title: \"类型\",\n dataIndex: \"type_name\",\n key: \"type_name\",\n width: 100\n },\n {\n title: \"采购组织\",\n dataIndex: \"purchasing\",\n key: \"purchasing\",\n width: 100\n },\n ]};\n }\n afterFilter = (optData,columns)=>{\n if(optData.key == 'b'){\n if(optData.ifshow){\n columns[2].ifshow = false;\n }else{\n columns[2].ifshow = true;\n }\n this.setState({\n columns21 :columns,\n showFilterPopover:true\n });\n }\n \n }\n \n render() {\n return ;\n }\n}\n\nDemo21.defaultProps = defaultProps21;\n", "desc": " 点击表头右侧按钮,设置显示或隐藏表格列。可以自定义设置显示某列,通过ifshow属性控制,默认值为true(显示表格所有列)。afterFilter方法为列过滤后触发的回调函数。" }, { "example": _react2['default'].createElement(Demo0901, null), "title": " 列排序", "code": "/**\n* @title 列排序\n* @parent 列操作-排序 Sort\n* @description column中增加sorter: (a, b) => a.c - b.c 这里的a,b代表前后两个数据,c代表比较当前对象的字段名称\n* demo0901\n*/\n\n\nimport React, { Component } from 'react';\nimport {Icon} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\nimport sort from \"tinper-bee/lib/sort.js\";;\n\nlet ComplexTable = sort(Table, Icon);\nconst columns11 = [\n {\n title: \"单据编号\",\n dataIndex: \"num\",\n key: \"num\",\n width: 120,\n fixed: \"left\"\n },\n {\n title: \"单据日期\",\n dataIndex: \"date\",\n key: \"date\",\n width: 200,\n },\n {\n title: \"供应商\",\n dataIndex: \"supplier\",\n key: \"supplier\",\n width: 100\n },\n {\n title: \"联系人\",\n dataIndex: \"contact\",\n key: \"contact\",\n },\n {\n title: \"整单数量\",\n dataIndex: \"total\",\n key: \"total\",\n width: 150,\n sorter: (a, b) => a.total - b.total\n }\n];\n\nconst data11 = [\n { num: \"NU0391001\", date: \"2019-03-01\", supplier: 'xx供应商',contact:'Tom', total:30 ,key: \"1\" },\n { num: \"NU0391002\", date: \"2018-11-02\", supplier: 'yy供应商',contact:'Jack', total:41 ,key: \"2\" },\n { num: \"NU0391003\", date: \"2019-05-03\", supplier: 'zz供应商',contact:'Jane', total:25 ,key: \"3\" }\n];\n\nconst defaultProps11 = {\n prefixCls: \"bee-table\"\n};\nclass Demo11 extends Component {\n constructor(props) {\n super(props);\n this.state = {\n sortOrder: \"\",\n data: data11\n };\n }\n render() {\n\n return ;\n }\n}\nDemo11.defaultProps = defaultProps11;\n\n\n", "desc": " column中增加sorter: (a, b) => a.c - b.c 这里的a,b代表前后两个数据,c代表比较当前对象的字段名称" }, { "example": _react2['default'].createElement(Demo0902, null), "title": " 后端列排序", "code": "/**\n* @title 后端列排序\n* @parent 列操作-排序 Sort\n* @description 可在控制台中查看序列化后的参数字符串,将参数传递给后端即可进行列排序\n* demo0902\n*/\n\n\nimport React, { Component } from 'react';\nimport {Icon} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\nimport sort from \"tinper-bee/lib/sort.js\";;\nlet ComplexTable = sort(Table, Icon);\n\n// const columns11 = [\n// {\n// title: \"名字\",\n// dataIndex: \"a\",\n// key: \"a\",\n// width: 100\n// },\n// {\n// title: \"性别\",\n// dataIndex: \"b\",\n// key: \"b\",\n// width: 100\n// },\n// {\n// title: \"年龄\",\n// dataIndex: \"c\",\n// key: \"c\",\n// width: 200,\n// sorter: (a, b) => a.c - b.c\n// },\n// {\n// title: \"武功级别\",\n// dataIndex: \"d\",\n// key: \"d\"\n// },\n// {\n// title: \"分数\",\n// dataIndex: \"e\",\n// key: \"e\",\n// sorter: (a, b) => a.c - b.c\n// },\n// ];\n\n// const data11 = [\n// { a: \"杨过\", b: \"男\", c: 30,d:'内行', e:139,key: \"2\" },\n// { a: \"令狐冲\", b: \"男\", c: 41,d:'大侠', e:109, key: \"1\" },\n// { a: \"郭靖\", b: \"男\", c: 25,d:'大侠', e:159, key: \"3\" }\n// ];\nconst columns11 = [\n {\n title: \"单据编号\",\n dataIndex: \"num\",\n key: \"num\",\n width: 120,\n fixed: \"left\"\n },\n {\n title: \"单据日期\",\n dataIndex: \"date\",\n key: \"date\",\n width: 200,\n },\n {\n title: \"供应商\",\n dataIndex: \"supplier\",\n key: \"supplier\",\n width: 100\n },\n {\n title: \"联系人\",\n dataIndex: \"contact\",\n key: \"contact\",\n },\n {\n title: \"整单数量\",\n dataIndex: \"total\",\n key: \"total\",\n width: 150,\n sorter: (a, b) => a.total - b.total\n },\n {\n title: \"金额\",\n dataIndex: \"money\",\n key: \"money\",\n width: 100,\n sorter: (a, b) => a.money - b.money\n }\n];\n\nconst data11 = [\n { num: \"NU0391001\", date: \"2019-03-01\", supplier: 'xx供应商',contact:'Tom', total:30 ,money: 100,key: \"1\" },\n { num: \"NU0391002\", date: \"2018-11-02\", supplier: 'yy供应商',contact:'Jack', total:41 ,money: 50,key: \"2\" },\n { num: \"NU0391003\", date: \"2019-05-03\", supplier: 'zz供应商',contact:'Jane', total:25 ,money: 200,key: \"3\" }\n];\n\nconst defaultProps = {\n prefixCls: \"bee-table\"\n};\nclass Demo28 extends Component {\n constructor(props) {\n super(props);\n this.state = {\n sortOrder: \"\",\n data: data11\n };\n }\n /**\n * 后端获取数据\n */\n sortFun = (sortParam)=>{\n console.info(sortParam);\n //将参数传递给后端排序\n }\n render() {\n let sortObj = {\n mode:'multiple',\n backSource:true,\n sortFun:this.sortFun\n }\n return ;\n }\n}\nDemo28.defaultProps = defaultProps;\n\n\n", "desc": " 可在控制台中查看序列化后的参数字符串,将参数传递给后端即可进行列排序" }, { "example": _react2['default'].createElement(Demo0903, null), "title": " 多列排序", "code": "/**\n *\n * @title 多列排序\n * @parent 列操作-排序 Sort\n * @description 结合多列排序、全选功能、合计功能的表格示例。新增排序后触发的回调函数sorterClick。\n * demo0903\n */\n\nimport React, { Component } from \"react\";\nimport {Checkbox,Button,Icon} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\nimport multiSelect from \"tinper-bee/lib/multiSelect.js\";;\nimport sort from \"tinper-bee/lib/sort.js\";;\nimport sum from \"tinper-bee/lib/sum.js\";;\n\nconst columns13 = [\n {\n title: \"订单编号\",\n dataIndex: \"a\",\n key: \"a\",\n className:'dfasd',\n width: 200\n },\n {\n title: \"金额\",\n dataIndex: \"b\",\n key: \"b\",\n width: 200,\n sumCol: true,\n sorter: (a, b) => a.c - b.c,\n sorterClick:(data,type)=>{//排序的回调函数\n //type value is up or down\n console.log(\"data\",data);\n }\n },\n {\n title: \"整单数量\",\n dataIndex: \"c\",\n key: \"c\",\n width: 200,\n sumCol: true,\n sorter: (a, b) => a.c - b.c,\n sorterClick:(data,type)=>{//排序的回调函数\n //type value is up or down\n console.log(\"data\",data);\n }\n },\n {\n title: \"日销售量\",\n dataIndex: \"e\",\n key: \"e\",\n width: 200,\n sumCol: true,\n sorter: (a, b) => a.c - b.c,\n },\n {\n title: \"供应商\",\n dataIndex: \"d\",\n key: \"d\",\n width: 200\n }\n];\n\nconst data13 = [\n { a: \"NU0391001\", b: 675, c: 30, d: \"xx供应商\",e:100, key: \"2\" },\n { a: \"NU0391002\", b: 43, c: 41, d: \"yy供应商\",e:90, key: \"1\" },\n { a: \"NU0391003\", b: 43, c: 81, d: \"zz供应商\", e:120,key: \"4\" },\n { a: \"NU0391004\", b: 43, c: 81, d: \"aa供应商\", e:130,key: \"5\" },\n { a: \"NU0391005\", b: 153, c: 25, d: \"bb供应商\",e:90, key: \"3\" }\n];\n\n\n//拼接成复杂功能的table组件不能在render中定义,需要像此例子声明在组件的外侧,不然操作state会导致功能出现异常\nlet ComplexTable = multiSelect(sort(sum(Table, Icon)), Checkbox);\n\nclass Demo13 extends Component {\n constructor(props) {\n super(props);\n this.state = {\n data13: data13,\n selectedRow: this.selectedRow,\n selectDisabled: this.selectDisabled\n };\n }\n getSelectedDataFunc = data => {\n console.log(data);\n };\n selectDisabled = (record, index) => {\n // console.log(record);\n if (index === 1) {\n return true;\n }\n return false;\n };\n selectedRow = (record, index) => {\n // console.log(record);\n if (index === 0) {\n return true;\n }\n return false;\n };\n onClick = () => {\n this.setState({\n selectedRow: function() {}\n });\n };\n\n render() {\n let multiObj = {\n type: \"checkbox\"\n };\n let sortObj = {\n mode:'multiple'\n }\n \n return (\n \n \n \n
\n );\n }\n}\n", "desc": " 结合多列排序、全选功能、合计功能的表格示例。新增排序后触发的回调函数sorterClick。" }, { "example": _react2['default'].createElement(Demo1001, null), "title": " 拖拽改变列顺序", "code": "/**\n*\n* @title 拖拽改变列顺序\n* @parent 列操作-拖拽 Drag\n* @description 点击选择表头并左右拖拽,可以改变表格列顺序。onDrop方法是拖拽交换列后触发的回调函数。注意:固定列不可以交换。\n* demo1001\n*/\nimport React, { Component } from 'react';\nimport {Icon} from \"tinper-bee\";\n\nimport { Table } from 'tinper-bee'; \nimport dragColumn from \"tinper-bee/lib/dragColumn\";;\n\nconst columns = [\n {\n title: \"订单编号\",\n dataIndex: \"a\",\n key: \"a\",\n width: 100\n },\n {\n title: \"单据日期\",\n dataIndex: \"b\",\n key: \"b\",\n width: 200\n },\n {\n title: \"供应商\",\n dataIndex: \"c\",\n key: \"c\",\n width: 200,\n sumCol: true,\n sorter: (a, b) => a.c - b.c\n },\n {\n title: \"联系人\",\n dataIndex: \"d\",\n key: \"d\",\n width: 200,\n }\n];\n\nconst data = [\n { a: \"NU0391001\", b: \"2019-03-01\", c: 'xx供应商',d:'Tom', key: \"2\" },\n { a: \"NU0391002\", b: \"2018-11-02\", c: 'yy供应商',d:'Jack', key: \"1\" },\n { a: \"NU0391003\", b: \"2019-05-03\", c: 'zz供应商',d:'Jane', key: \"3\" }\n];\n\nconst DragColumnTable = dragColumn(Table);\n\nconst defaultProps22 = {\n prefixCls: \"bee-table\"\n};\n\nclass Demo22 extends Component {\n constructor(props) {\n super(props); \n }\n \n render() {\n return {\n console.log(\"--拖拽交换列后触发事件\");\n console.log(\"event.target:\",event.target);\n console.log(\"data:\",data);\n console.log(\"拖拽完成后的columns:\",columns);\n }}\n />;\n }\n}\n\nDemo22.defaultProps = defaultProps22;\n", "desc": " 点击选择表头并左右拖拽,可以改变表格列顺序。onDrop方法是拖拽交换列后触发的回调函数。注意:固定列不可以交换。" }, { "example": _react2['default'].createElement(Demo1002, null), "title": " 拖拽改变列宽度", "code": "/**\n*\n* @title 拖拽改变列宽度\n* @parent 列操作-拖拽 Drag\n* @description onDropBorder方法为调整列宽后触发的回调函数。注:不支持tree结构的表头、合并表头的table。\n* demo1002\n*/\nimport React, { Component } from 'react';\nimport {Icon} from \"tinper-bee\";\n\nimport { Table } from 'tinper-bee'; \nimport dragColumn from \"tinper-bee/lib/dragColumn\";;\n\nconst columns23 = [\n {\n title: \"名字\",\n dataIndex: \"a\",\n key: \"a\",\n width: '200',\n fixed:'left'\n },\n {\n title: \"性别\",\n dataIndex: \"b\",\n key: \"b\",\n width: '600'\n },\n {\n title: \"年龄\",\n dataIndex: \"c\",\n key: \"c\",\n width: '200',\n sumCol: true,\n sorter: (a, b) => a.c - b.c\n }, \n {\n title: \"武功级别\",\n dataIndex: \"d\",\n key: \"d\",\n width: 500,\n }\n];\n\nconst data23 = [\n { a: \"杨过\", b: \"男\", c: 30,d:'内行', key: \"2\" },\n { a: \"令狐冲\", b: \"男\", c: 41,d:'大侠', key: \"1\" },\n { a: \"郭靖\", b: \"男\", c: 25,d:'大侠', key: \"31\" } , { a: \"杨过\", b: \"男\", c: 30,d:'内行', key: \"21\" },\n { a: \"令狐冲\", b: \"男\", c: 41,d:'大侠', key: \"11\" },\n { a: \"郭靖\", b: \"男\", c: 25,d:'大侠', key: \"32\" } , { a: \"杨过\", b: \"男\", c: 30,d:'内行', key: \"22\" },\n { a: \"令狐冲\", b: \"男\", c: 41,d:'大侠', key: \"12\" },\n { a: \"郭靖\", b: \"男\", c: 25,d:'大侠', key: \"3\" }\n];\n\nconst DragColumnTable = dragColumn(Table);\n\nconst defaultProps23 = {\n prefixCls: \"bee-table\"\n};\n\nclass Demo23 extends Component {\n constructor(props) {\n super(props); \n }\n\n render() {\n return {\n console.log(width+\"--调整列宽后触发事件\",e.target);\n }}\n />;\n }\n}\nDemo23.defaultProps = defaultProps23;\n\n\n", "desc": " onDropBorder方法为调整列宽后触发的回调函数。注:不支持tree结构的表头、合并表头的table。" }, { "example": _react2['default'].createElement(Demo1101, null), "title": " 嵌套子表格", "code": "/**\n*\n* @title 嵌套子表格\n* @parent 扩展行 Expanded Row\n* @description 通过expandedRowRender参数来实现子表格\n* demo1101\n*/\n\nimport React, { Component } from \"react\";\nimport { Popconfirm } from 'tinper-bee';\nimport { Table } from 'tinper-bee';\nimport dragColumn from \"tinper-bee/lib/dragColumn\";;\nconst DragColumnTable = dragColumn(Table);\nconst columns16 = [\n {\n title: \"操作\",\n dataIndex: \"d\",\n key: \"d\", \n width:200,\n render(text, record, index) {\n return (\n \n \n 一些操作\n \n \n );\n }\n },\n { title: \"用户名\", dataIndex: \"a\", key: \"a\", width: 250 },\n { id: \"123\", title: \"性别\", dataIndex: \"b\", key: \"b\", width: 100 },\n { title: \"年龄\", dataIndex: \"c\", key: \"c\", width: 200 },\n \n];\nconst columns17 = [\n {\n title: \"操作\",\n dataIndex: \"d\",\n key: \"d\",\n width:200,\n render(text, record, index) {\n return (\n \n \n 一些操作\n \n \n );\n }\n },\n { title: \"用户名\", dataIndex: \"a\", key: \"a\", width: 100 },\n { id: \"123\", title: \"性别\", dataIndex: \"b\", key: \"b\", width: 100 },\n { title: \"年龄\", dataIndex: \"c\", key: \"c\", width: 200 },\n \n];\n\nconst data16 = [\n { a: \"令狐冲\", b: \"男\", c: 41, d: \"操作\", key: \"1\" },\n { a: \"杨过\", b: \"男\", c: 67, d: \"操作\", key: \"2\" },\n { a: \"郭靖\", b: \"男\", c: 25, d: \"操作\", key: \"3\" }\n];\n\n\nclass Demo16 extends Component {\n constructor(props){\n super(props);\n this.state={\n data_obj:{}\n }\n }\n expandedRowRender = (record, index, indent) => {\n let height = 42 * (this.state.data_obj[record.key].length+ 2);\n \n return (\n \n );\n };\n getData=(expanded, record)=>{\n //当点击展开的时候才去请求数据\n let new_obj = Object.assign({},this.state.data_obj);\n if(expanded){\n if(record.key==='1'){\n new_obj[record.key] = [\n { a: \"令狐冲\", b: \"男\", c: 41, d: \"操作\", key: \"1\" },\n { a: \"杨过\", b: \"男\", c: 67, d: \"操作\", key: \"2\" }\n ]\n this.setState({\n data_obj:new_obj\n })\n }else{\n new_obj[record.key] = [\n { a: \"令狐冲\", b: \"男\", c: 41, d: \"操作\", key: \"1\" }\n ]\n this.setState({\n data_obj:new_obj\n })\n }\n }\n }\n haveExpandIcon=(record, index)=>{\n //控制是否显示行展开icon,该参数只有在和expandedRowRender同时使用才生效\n if(index == 0){\n return true;\n }\n return false;\n }\n render() {\n return (\n \n );\n }\n}\n\n\n", "desc": " 通过expandedRowRender参数来实现子表格" }, { "example": _react2['default'].createElement(Demo1102, null), "title": " 树型表格数据展示", "code": "/**\n*\n* @title 树型表格数据展示\n* @parent 扩展行 Expanded Row\n* @description 通过在data中配置children数据,来自动生成树形表格\n* demo1102\n*/\n\n\nimport React, { Component } from 'react';\nimport { Table } from 'tinper-bee';\n\n\nconst columns4 = [\n {\n title: \"Name\",\n dataIndex: \"name\",\n key: \"name\",\n width: \"40%\"\n },\n {\n title: \"Age\",\n dataIndex: \"age\",\n key: \"age\",\n width: \"30%\"\n },\n {\n title: \"Address\",\n dataIndex: \"address\",\n key: \"address\"\n }\n];\n\nconst data4 = [\n {\n key: 1,\n name: \"John Brown sr.\",\n age: 60,\n address: \"New York No. 1 Lake Park\",\n children: [\n {\n key: 11,\n name: \"John Brown\",\n age: 42,\n address: \"New York No. 2 Lake Park\"\n },\n {\n key: 12,\n name: \"John Brown jr.\",\n age: 30,\n address: \"New York No. 3 Lake Park\",\n children: [\n {\n key: 121,\n name: \"Jimmy Brown\",\n age: 16,\n address: \"New York No. 3 Lake Park\"\n }\n ]\n },\n {\n key: 13,\n name: \"Jim Green sr.\",\n age: 72,\n address: \"London No. 1 Lake Park\",\n children: [\n {\n key: 131,\n name: \"Jim Green\",\n age: 42,\n address: \"London No. 2 Lake Park\",\n children: [\n {\n key: 1311,\n name: \"Jim Green jr.\",\n age: 25,\n address: \"London No. 3 Lake Park\"\n },\n {\n key: 1312,\n name: \"Jimmy Green sr.\",\n age: 18,\n address: \"London No. 4 Lake Park\"\n }\n ]\n }\n ]\n }\n ]\n },\n {\n key: 2,\n name: \"Joe Black\",\n age: 32,\n address: \"Sidney No. 1 Lake Park\"\n }\n];\nclass Demo4 extends Component {\n\n constructor(props){\n super(props);\n this.state = {\n data: data4,\n factoryValue: 0,\n selectedRow: new Array(data4.length)//状态同步\n }\n }\n\n render() {\n return {\n if (this.state.selectedRow[index]) {\n return 'selected';\n } else {\n return '';\n }\n }}\n onRowClick={(record,index,indent)=>{\n let selectedRow = new Array(this.state.data.length);\n selectedRow[index] = true;\n this.setState({\n factoryValue: record,\n selectedRow: selectedRow\n });\n }}\n \n columns={columns4} data={data4} />;\n }\n}\n\n\n", "desc": " 通过在data中配置children数据,来自动生成树形表格" }, { "example": _react2['default'].createElement(Demo1103, null), "title": " 自定义表格标题、表尾、选中行颜色", "code": "/**\r\n*\r\n* @title 自定义表格标题、表尾、选中行颜色\r\n* @parent 扩展行 Expanded Row\r\n* @description 可根据业务场景设置不同的`title`和`footer`。选中行颜色可用rowClassName作为选择器自定义css样式。\r\n* demo1103\r\n*/\r\n\r\nimport React, { Component } from \"react\";\r\nimport {Button,Tooltip,} from \"tinper-bee\";\r\n\r\nimport { Table } from 'tinper-bee';\r\n\r\nconst columns = [\r\n { title: \"员工编号\", dataIndex: \"a\", key: \"a\", width: 300, className: \"rowClassName\"},\r\n { title: \"员工姓名\", dataIndex: \"b\", key: \"b\", width: 500 },\r\n { title: \"性别\", dataIndex: \"c\", key: \"c\", width: 500 },\r\n { title: \"部门\", dataIndex: \"d\", key: \"d\", width: 200 }\r\n];\r\n\r\nconst data = [\r\n { a: \"ASVAL_201903280005\", b: \"小张\", c: \"男\", d: \"财务二科\", key: \"1\" },\r\n { a: \"ASVAL_201903200004\", b: \"小明\", c: \"男\", d: \"财务一科\", key: \"2\" },\r\n { a: \"ASVAL_201903120002\", b: \"小红\", c: \"女\", d: \"财务一科\", key: \"3\" }\r\n];\r\n\r\nclass Demo26 extends Component {\r\n\r\n constructor(props){\r\n super(props);\r\n this.state = {\r\n data: data,\r\n selectedRowIndex: 0\r\n }\r\n }\r\n\r\n render() {\r\n return (\r\n {\r\n if (this.state.selectedRowIndex == index) {\r\n return 'selected';\r\n } else {\r\n return '';\r\n }\r\n }}\r\n onRowClick={(record,index,indent)=>{\r\n this.setState({ \r\n selectedRowIndex: index\r\n });\r\n }}\r\n title={currentData => 员工信息统计表
}\r\n footer={currentData => 合计: 共{data.length}条数据
}\r\n /> \r\n );\r\n }\r\n}\r\n\r\n\r\n", "desc": " 可根据业务场景设置不同的`title`和`footer`。选中行颜色可用rowClassName作为选择器自定义css样式。" }, { "example": _react2['default'].createElement(Demo1105, null), "title": " 紧凑型、宽松型", "code": "/**\n*\n* @title 紧凑型、宽松型\n* @parent 扩展行 Expanded Row\n* @description 设置`size`属性使用紧凑型表格(`sm`)或宽松型表格(`lg`)。\n* demo1105\n*/\n\nimport React, { Component } from \"react\";\nimport {Button,Tooltip,Tag} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n { title: \"订单编号\", dataIndex: \"orderNum\", key: \"orderNum\", width: 100 },\n { title: \"采购组织\", dataIndex: \"org\", key: \"org\", width: 200 },\n { title: \"供应商\", dataIndex: \"supplier\", key: \"supplier\", width: 100 },\n { title: \"订单日期\", dataIndex: \"orderDate\", key: \"orderDate\", width: 150 },\n { title: \"总数量\", dataIndex: \"quantity\", key: \"quantity\", width: 100 },\n { title: \"单据状态\", dataIndex: \"status\", key: \"status\", width: 100 },\n { title: \"提交人\", dataIndex: \"submitter\", key: \"submitter\", width: 100 },\n { title: \"单位\", dataIndex: \"unit\", key: \"unit\", width: 100 },\n { title: \"总税价合计\", dataIndex: \"sum\", key: \"sum\", width: 100 },\n];\n\nconst data = [\n { \n orderNum: \"NU0391025\", \n org: \"用友网络科技股份有限公司\", \n supplier: \"xx供应商\", \n orderDate: '2018年03月18日', \n quantity: '100.00', \n status: '错误', \n submitter: '小张', \n unit: 'pc', \n sum:'8,487.00', \n key: \"1\" \n },\n { \n orderNum: \"NU0391026\", \n org: \"用友网络科技股份有限公司\", \n supplier: \"xx供应商\", \n orderDate: '2018年02月05日', \n quantity: '91.00', \n status: '正常', \n submitter: '小红', \n unit: 'pc', \n sum:'675.00', \n key: \"2\" \n },\n { \n orderNum: \"NU0391027\", \n org: \"用友网络科技股份有限公司\", \n supplier: \"xx供应商\", \n orderDate: '2018年07月01日', \n quantity: '98.00', \n status: '异常', \n submitter: '小李', \n unit: 'pc', \n sum:'1,531.00', \n key: \"3\" \n }\n];\n\nclass Demo1 extends Component {\n render() {\n return (\n \n );\n }\n}\n\n\n", "desc": " 设置`size`属性使用紧凑型表格(`sm`)或宽松型表格(`lg`)。" }, { "example": _react2['default'].createElement(Demo1106, null), "title": " 自定义行高", "code": "/**\n*\n* @title 自定义行高\n* @parent 扩展行 Expanded Row\n* @description 设置`height`属性自定义表体行高,设置`headerHeight`属性自定义表头高度。鼠标hover行时呼出操作按钮。\n* demo1106\n*/\n\nimport React, { Component } from \"react\";\nimport {Button,Tooltip} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n { title: \"员工编号\", dataIndex: \"a\", key: \"a\", width: 300, className: \"rowClassName\"},\n { title: \"员工姓名\", dataIndex: \"b\", key: \"b\", width: 500 },\n { title: \"性别\", dataIndex: \"c\", key: \"c\", width: 500 },\n { title: \"部门\", dataIndex: \"d\", key: \"d\", width: 200 }\n];\n\nconst data = [\n { a: \"ASVAL_201903280005\", b: \"小张\", c: \"男\", d: \"财务二科\", key: \"1\" },\n { a: \"ASVAL_201903200004\", b: \"小明\", c: \"男\", d: \"财务一科\", key: \"2\" },\n { a: \"ASVAL_201903120002\", b: \"小红\", c: \"女\", d: \"财务一科\", key: \"3\" }\n];\n\nclass Demo1 extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n data: data,\n selectedRowIndex: 0\n }\n }\n handleClick = () => {\n console.log('这是第' , this.currentIndex , '行');\n console.log('内容:' , this.currentRecord);\n }\n\n onRowHover=(index,record)=>{\n this.currentIndex = index;\n this.currentRecord = record;\n }\n\n getHoverContent=()=>{\n return
\n }\n\n render() {\n return (\n {\n this.setState({\n selectedRowIndex: index\n });\n }}\n />\n\n \n );\n }\n}\n\n\n", "desc": " 设置`height`属性自定义表体行高,设置`headerHeight`属性自定义表头高度。鼠标hover行时呼出操作按钮。" }, { "example": _react2['default'].createElement(Demo1107, null), "title": " 图片在表格中的展示", "code": "/**\n*\n* @title 图片在表格中的展示\n* @parent 扩展行 Expanded Row\n* @description 根据图片高度自动撑开行高,可结合图片查看器使用 http://design.yonyoucloud.com/tinper-bee/bee-viewer\n* demo1107\n*/\n\nimport React, { Component } from \"react\";\nimport {Button,Tooltip} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n {\n title: \"序号\",\n dataIndex: \"index\",\n key: \"index\",\n width: 80,\n render(text, record, index) {\n return index + 1;\n }\n },\n {\n title: \"组织部门\",\n dataIndex: \"orgDept\",\n key: \"orgDept\",\n width: 100,\n },\n {\n title: \"设施管理部门\",\n dataIndex: \"facilityManageUnit\",\n key: \"facilityManageUnit\",\n width: 150,\n },\n {\n title: \"案卷编号\",\n dataIndex: \"docketnum\",\n key: \"docketnum\",\n width: 100,\n },\n {\n title: \"数量\",\n dataIndex: \"num\",\n key: \"num\",\n width: 100,\n },\n {\n title: \"首次发现时间\",\n dataIndex: \"discoveryTime\",\n key: \"discoveryTime\",\n width: 150,\n },\n {\n title: \"实际修复时间\",\n dataIndex: \"repairTime\",\n key: \"repairTime\",\n width: 150,\n },\n {\n title: \"图样\",\n dataIndex: \"picture\",\n key: \"picture\",\n render(text, record, index) {\n return \n }\n }\n];\n\nconst data = [\n { key: \"1\", orgDept: \"组织1\", facilityManageUnit: \"部门1\", docketnum: 41, num: \"1\", discoveryTime: \"2018-10-17\", repairTime: \"2018-10-30\", picture: \"http://design.yonyoucloud.com/static/bee.tinper.org-demo/swiper-demo-1-min.jpg\"},\n { key: \"2\", orgDept: \"组织2\", facilityManageUnit: \"部门2\", docketnum: 30, num: \"2\", discoveryTime: \"2019-01-15\", repairTime: \"2019-01-20\", picture: \"http://design.yonyoucloud.com/static/bee.tinper.org-demo/swiper-demo-2-min.jpg\"},\n { key: \"3\", orgDept: \"组织3\", facilityManageUnit: \"部门3\", docketnum: 35, num: \"3\", discoveryTime: \"2019-04-10\", repairTime: \"2019-04-17\", picture: \"http://design.yonyoucloud.com/static/bee.tinper.org-demo/swiper-demo-3-min.jpg\"}\n];\n\nclass Demo105 extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n data: data,\n selectedRowIndex: 0\n }\n }\n handleClick = () => {\n console.log('这是第' , this.currentIndex , '行');\n console.log('内容:' , this.currentRecord);\n }\n\n onRowHover=(index,record)=>{\n this.currentIndex = index;\n this.currentRecord = record;\n }\n\n getHoverContent=()=>{\n return
\n }\n\n render() {\n return (\n \n );\n }\n}\n\n\n", "desc": " 根据图片高度自动撑开行高,可结合图片查看器使用 http://design.yonyoucloud.com/tinper-bee/bee-viewer" }, { "example": _react2['default'].createElement(Demo1108, null), "title": " 自定义行、列合并", "code": "/**\n*\n* @title 自定义行、列合并\n* @parent 扩展行 Expanded Row\n* @description 表头只支持列合并,使用 column 里的 colSpan 进行设置。表格支持行/列合并,使用 render 里的单元格属性 colSpan 或者 rowSpan 设值为 0 时,设置的表格不会渲染。\n* demo1108\n*/\n\nimport React, { Component } from \"react\";\nimport { Table } from 'tinper-bee';\n\nconst renderContent = (value, row, index) => {\n const obj = {\n children: value,\n props: {},\n };\n if (index === 4) {\n obj.props.colSpan = 0;\n }\n return obj;\n};\n\nconst columns = [{\n title: 'Name',\n key: \"name\",\n dataIndex: 'name',\n render: (text, row, index) => {\n if (index < 4) {\n return {text};\n }\n return {\n children: {text},\n props: {\n colSpan: 5,\n },\n };\n },\n}, {\n title: 'Age',\n key: \"Age\",\n dataIndex: 'age',\n render: renderContent,\n}, {\n title: 'Home phone',\n colSpan: 2,\n key: \"tel\",\n dataIndex: 'tel',\n render: (value, row, index) => {\n const obj = {\n children: value,\n props: {},\n };\n if (index === 2) {\n obj.props.rowSpan = 2;\n }\n if (index === 3) {\n obj.props.rowSpan = 0;\n }\n if (index === 4) {\n obj.props.colSpan = 0;\n }\n return obj;\n },\n}, {\n title: 'Phone',\n colSpan: 0,\n key: \"phone\",\n dataIndex: 'phone',\n render: renderContent,\n}, {\n title: 'Address',\n key: \"address\",\n dataIndex: 'address',\n render: renderContent,\n}];\n\nconst data = [{\n key: '1',\n name: 'John Brown',\n age: 32,\n tel: '0571-22098909',\n phone: 18889898989,\n address: 'New York No. 1 Lake Park',\n}, {\n key: '2',\n name: 'Jim Green',\n tel: '0571-22098333',\n phone: 18889898888,\n age: 42,\n address: 'London No. 1 Lake Park',\n}, {\n key: '3',\n name: 'Joe Black',\n age: 32,\n tel: '0575-22098909',\n phone: 18900010002,\n address: 'Sidney No. 1 Lake Park',\n}, {\n key: '4',\n name: 'Jim Red',\n age: 18,\n tel: '0575-22098909',\n phone: 18900010002,\n address: 'London No. 2 Lake Park',\n}, {\n key: '5',\n name: 'Jake White',\n age: 18,\n tel: '0575-22098909',\n phone: 18900010002,\n address: 'Dublin No. 2 Lake Park',\n}];\n\nclass Demo15 extends Component {\n render() {\n return (\n \n );\n }\n}\n\n\n\n", "desc": " 表头只支持列合并,使用 column 里的 colSpan 进行设置。表格支持行/列合并,使用 render 里的单元格属性 colSpan 或者 rowSpan 设值为 0 时,设置的表格不会渲染。" }, { "example": _react2['default'].createElement(Demo1301, null), "title": " 多选表格", "code": "/**\r\n*\r\n* @title 多选表格\r\n* @parent 行操作-选择\r\n* @description 支持多选、全选和禁止选择。getSelectedDataFunc方法是选中行的回调函数,返回当前选中的数据数组。给data数据添加_checked参数可设置当前数据是否选中,添加_disabled参数可禁止选择当前数据。\r\n* demo1301\r\n*/\r\n\r\n\r\nimport React, { Component } from 'react';\r\nimport {Checkbox} from \"tinper-bee\";\r\n\r\nimport { Table } from 'tinper-bee';\r\nimport multiSelect from \"tinper-bee/lib/multiSelect.js\";;\r\n\r\nconst columns = [\r\n { title: \"员工编号\", dataIndex: \"a\", key: \"a\", width: 300, className: \"rowClassName\"},\r\n { title: \"员工姓名\", dataIndex: \"b\", key: \"b\", width: 500 },\r\n { title: \"性别\", dataIndex: \"c\", key: \"c\", width: 500 },\r\n { title: \"部门\", dataIndex: \"d\", key: \"d\", width: 200 }\r\n];\r\n\r\nconst data = [\r\n { a: \"ASVAL_201903280005\", b: \"小张\", c: \"男\", d: \"财务二科\", key: \"1\",_checked:true },\r\n { a: \"ASVAL_201903200004\", b: \"小明\", c: \"男\", d: \"财务一科\", key: \"2\",_checked:false },\r\n { a: \"ASVAL_201903120002\", b: \"小红\", c: \"女\", d: \"财务一科\", key: \"3\",_checked:false },\r\n { a: \"ASVAL_201903280010\", b: \"小王\", c: \"女\", d: \"财务二科\", key: \"4\",_disabled:true },\r\n { a: \"ASVAL_201903200021\", b: \"小李\", c: \"男\", d: \"财务一科\", key: \"5\",_checked:false}\r\n];\r\n//拼接成复杂功能的table组件不能在render中定义,需要像此例子声明在组件的外侧,不然操作state会导致功能出现异常\r\nlet MultiSelectTable = multiSelect(Table, Checkbox);\r\n\r\nclass Demo12 extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n data: data\r\n };\r\n }\r\n /**\r\n *@param selectedList:当前选中的行数据\r\n *@param record 当前操作行数据\r\n *@param index 当前操作行索引\r\n * @memberof Demo12\r\n */\r\n getSelectedDataFunc = (selectedList,record,index) => {\r\n console.log(\"selectedList\", selectedList,\"index\",index);\r\n // 如果在回调中增加setState逻辑,需要同步data中的_checked属性。即下面的代码\r\n // const allChecked = selectedList.length == 0?false:true;\r\n // record为undefind则为全选或者全不选\r\n // if(!record){\r\n // data12.forEach(item=>{\r\n // item._checked = allChecked;\r\n // })\r\n // }else{\r\n // data12[index]['_checked'] = record._checked;\r\n // } \r\n\r\n \r\n };\r\n \r\n render() {\r\n let multiObj = {\r\n type: \"checkbox\"\r\n };\r\n return (\r\n {\r\n if (record._checked) {\r\n return 'selected';\r\n } else {\r\n return '';\r\n }\r\n }}\r\n getSelectedDataFunc={this.getSelectedDataFunc}/>\r\n );\r\n }\r\n}\r\n\r\n", "desc": " 支持多选、全选和禁止选择。getSelectedDataFunc方法是选中行的回调函数,返回当前选中的数据数组。给data数据添加_checked参数可设置当前数据是否选中,添加_disabled参数可禁止选择当前数据。" }, { "example": _react2['default'].createElement(Demo1401, null), "title": " 万行以上数据渲染", "code": "/**\n*\n* @title 万行以上数据渲染\n* @parent 无限滚动 Infinite-scroll\n* @description 万行数据渲染\n* demo1401\n*/\n\nimport React, { Component } from \"react\";\nimport {Tooltip} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\nimport BigData from \"tinper-bee/lib/bigData\";;\nconst BigDataTable = BigData(Table);\nconst columns = [\n {\n title:'序号',\n dataIndex:'index',\n width:'60',\n key:'index',\n render:(text,record,index)=>{\n return index\n }\n },\n {\n title: \"用户名\", dataIndex: \"a\", key: \"a\", width: 580, className: \"rowClassName\",\n render: (text, record, index) => {\n return (\n \n {text}\n \n );\n }\n },\n { id: \"123\", title: \"性别\", dataIndex: \"b\", key: \"b\", width: 80},\n { title: \"年龄\", dataIndex: \"c\", key: \"c\", width: 200 }\n\n];\n\nconst data = [ ...new Array(10000) ].map((e, i) => {\n const rs = { a: i + 'a', b: i + 'b', c: i + 'c', d: i + 'd', key: i };\n if(i%3==0){\n rs.b = '女';\n }\n return rs;\n })\n\n\nclass Demo30 extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n data: data,\n selectedRowIndex: 0\n }\n }\n\n render() {\n return (\n {\n console.log('currentIndex--'+index);\n }}\n />\n\n \n );\n }\n}\n\n", "desc": " 万行数据渲染", "scss_code": ".big-data tr td {\n // height: 48px;\n}" }, { "example": _react2['default'].createElement(Demo1402, null), "title": " 嵌套子表格滚动加载", "code": "/**\n*\n* @title 嵌套子表格滚动加载\n* @parent 无限滚动 Infinite-scroll\n* @description 通过expandedRowRender参数来实现子表格\n* demo1402\n*/\n\nimport React, { Component } from \"react\";\nimport {Popconfirm} from 'tinper-bee';\nimport { Table } from 'tinper-bee';\nimport BigData from \"tinper-bee/lib/bigData\";;\nconst BigDataTable = BigData(Table);\nconst outColumns = [\n {\n title: \"操作\",\n dataIndex: \"d\",\n key: \"d\", \n width:200,\n render(text, record, index) {\n return (\n \n \n 一些操作\n \n \n );\n }\n },\n { title: \"用户名\", dataIndex: \"a\", key: \"a\", width: 250 },\n { id: \"123\", title: \"性别\", dataIndex: \"b\", key: \"b\", width: 100 },\n { title: \"年龄\", dataIndex: \"c\", key: \"c\", width: 200 },\n \n];\nconst innerColumns = [\n {\n title: \"操作\",\n dataIndex: \"d\",\n key: \"d\",\n width:200,\n render(text, record, index) {\n return (\n \n \n 一些操作\n \n \n );\n }\n },\n { title: \"用户名\", dataIndex: \"a\", key: \"a\", width: 100 },\n { id: \"123\", title: \"性别\", dataIndex: \"b\", key: \"b\", width: 100 },\n { title: \"年龄\", dataIndex: \"c\", key: \"c\", width: 200 },\n \n];\n\nconst data16 = [ ...new Array(10000) ].map((e, i) => {\n return { a: i + 'a', b: i + 'b', c: i + 'c', d: i + 'd', key: i };\n })\n\n\n\n\n\nclass Demo31 extends Component {\n constructor(props){\n super(props);\n this.state={\n data_obj:{\n 0:[\n { a: \"令狐冲\", b: \"男\", c: 41, d: \"操作\", key: \"1\" },\n { a: \"杨过\", b: \"男\", c: 67, d: \"操作\", key: \"2\" }\n ],\n 1: [\n { a: \"令狐冲\", b: \"男\", c: 41, d: \"操作\", key: \"1\" },\n { a: \"菲菲\", b: \"nv\", c: 67, d: \"操作\", key: \"2\" }\n ],\n }\n }\n }\n expandedRowRender = (record, index, indent) => {\n let height = 200;\n let innderData = [ ...new Array(100) ].map((e, i) => {\n return { a: index+\"-\"+ i + 'a', b: i + 'b', c: i + 'c', d: i + 'd', key: index+\"-\"+ i };\n })\n return (\n \n );\n };\n getData=(expanded, record)=>{\n //当点击展开的时候才去请求数据\n let new_obj = Object.assign({},this.state.data_obj);\n if(expanded){\n if(record.key==='1'){\n new_obj[record.key] = [\n { a: \"令狐冲\", b: \"男\", c: 41, d: \"操作\", key: \"1\" },\n { a: \"杨过\", b: \"男\", c: 67, d: \"操作\", key: \"2\" }\n ]\n this.setState({\n data_obj:new_obj\n })\n }else{\n new_obj[record.key] = [\n { a: \"令狐冲\", b: \"男\", c: 41, d: \"操作\", key: \"1\" },\n { a: \"菲菲\", b: \"nv\", c: 67, d: \"操作\", key: \"2\" }\n ]\n this.setState({\n data_obj:new_obj\n })\n }\n }\n }\n haveExpandIcon=(record, index)=>{\n //控制是否显示行展开icon,该参数只有在和expandedRowRender同时使用才生效\n if(index == 0){\n return true;\n }\n return false;\n }\n render() {\n return (\n \n );\n }\n}\n\n\n", "desc": " 通过expandedRowRender参数来实现子表格" }, { "example": _react2['default'].createElement(Demo1403, null), "title": " 多功能表格滚动加载", "code": "/**\n*\n* @title 多功能表格滚动加载\n* @parent 无限滚动 Infinite-scroll\n* @description\n* demo1403\n*/\n\nimport React, { Component } from \"react\";\nimport {Tooltip,Checkbox,Icon,Popover} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\nimport BigData from \"tinper-bee/lib/bigData\";;\nimport multiSelect from \"tinper-bee/lib/multiSelect\";;\nimport filterColumn from \"tinper-bee/lib/filterColumn\";;\n\nlet ComplexTable = filterColumn(multiSelect(BigData(Table), Checkbox), Popover, Icon);\n\nconst columns = [\n {\n title:'序号',\n dataIndex:'index',\n width:'80',\n key:'index',\n render:(text,record,index)=>{\n return index\n }\n },\n {\n title: \"用户名\", dataIndex: \"a\", key: \"a\", width: 580, className: \"rowClassName\",\n render: (text, record, index) => {\n return (\n \n {text}\n \n );\n }\n },\n { id: \"123\", title: \"性别\", dataIndex: \"b\", key: \"b\", width: 80},\n { title: \"年龄\", dataIndex: \"c\", key: \"c\", width: 200 }\n];\n\nconst data = [ ...new Array(10000) ].map((e, i) => {\n const rs = { a: i + 'a', b: i + 'b', c: i + 'c', d: i + 'd', key: i };\n if(i%3==0){\n rs.b = '女';\n }\n return rs;\n })\n\n\nclass Demo32 extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n data: data,\n selectedRowIndex: 0\n }\n }\n getSelectedDataFunc = data => {\n console.log(data);\n };\n\n render() {\n return (\n {\n this.setState({\n selectedRowIndex: index\n });\n }}\n getSelectedDataFunc={this.getSelectedDataFunc}/>\n\n );\n }\n}\n\n\n", "desc": "" }, { "example": _react2['default'].createElement(Demo1404, null), "title": " 层级树大数据场景", "code": "/**\n* @title 层级树大数据场景\n* @parent 无限滚动 Infinite-scroll\n* @description\n* demo1404\n*/\nimport React, { Component } from \"react\";\nimport {Tooltip} from \"tinper-bee\";\n\nimport { Table } from 'tinper-bee';\nimport BigData from \"tinper-bee/lib/bigData\";;\nconst BigDataTable = BigData(Table);\nconst columns = [\n {\n title:'序号',\n dataIndex:'index',\n width:'150',\n key:'index',\n render:(text,record,index)=>{\n return index\n }\n },\n {\n title: \"用户名\", dataIndex: \"a\", key: \"a\", width: 580, className: \"rowClassName\",\n render: (text, record, index) => {\n return (\n \n {text}\n \n );\n }\n },\n { id: \"123\", title: \"性别\", dataIndex: \"b\", key: \"b\", width: 80},\n { title: \"年龄\", dataIndex: \"c\", key: \"c\", width: 200 }\n];\n\nconst data = [ ...new Array(1000) ].map((e, i) => {\n const rs = { a: i + 'a', b: i + 'b', c: i + 'c', d: i + 'd', key: i };\n if(i%3==0){\n rs.b = '女';\n rs.children = [];\n for(let subi=0;subi<3;subi++){\n rs.children.push({a: i +subi + 'asub', b: i +subi + 'bsub', c: i + subi +'csub', d: i + subi +'dsub', key: i+ `${subi} sub`});\n }\n }else{\n rs.children = [];\n for(let subi=0;subi<3;subi++){\n rs.children.push({a: i +subi + 'asub', b: i +subi + 'bsub', c: i + subi +'csub', d: i + subi +'dsub', key: i+ `${subi} sub`});\n }\n }\n return rs;\n })\n\n\nclass Demo34 extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n data: data,\n selectedRowIndex: 0\n }\n }\n onExpandedRowsChange = (params)=>{\n console.log(params);\n }\n onExpand = (expandKeys)=>{\n console.log('expand---'+expandKeys);\n }\n render() {\n return (\n {\n console.log('currentIndex--'+index);\n }}\n />\n\n \n );\n }\n}\n\n", "desc": "" }, { "example": _react2['default'].createElement(Demo1601, null), "title": " 表格+分页", "code": "/**\n * @title 表格+分页\n * @parent 分页 Pagination\n * @description 点击分页联动表格\n * demo1601\n */\n\nimport React, { Component } from \"react\";\nimport {Pagination} from \"tinper-bee\";\n\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n { title: \"员工编号\", dataIndex: \"a\", key: \"a\", width: 300, className: \"rowClassName\"},\n { title: \"员工姓名\", dataIndex: \"b\", key: \"b\", width: 500 },\n { title: \"性别\", dataIndex: \"c\", key: \"c\", width: 500 },\n { title: \"部门\", dataIndex: \"d\", key: \"d\", width: 200 }\n];\n\nconst pageData = {\n 1: [\n { a: \"ASVAL_201903280005\", b: \"小张\", c: \"男\", d: \"财务二科\", key: \"1\" },\n { a: \"ASVAL_201903200004\", b: \"小明\", c: \"男\", d: \"财务一科\", key: \"2\" },\n { a: \"ASVAL_201903120002\", b: \"小红\", c: \"女\", d: \"财务一科\", key: \"3\" }\n ],\n 2: [\n { a: \"ASVAL_201903280010\", b: \"小王\", c: \"女\", d: \"财务二科\", key: \"4\" },\n { a: \"ASVAL_201903200021\", b: \"小李\", c: \"男\", d: \"财务一科\", key: \"5\" },\n ]\n};\n\nclass Demo8 extends Component {\n constructor(props) {\n super(props);\n this.state = {\n data: pageData[1],\n activePage: 1\n };\n }\n\n handleSelect(eventKey) {\n this.setState({\n data: pageData[eventKey],\n activePage: eventKey\n });\n }\n\n render() {\n return (\n \n );\n }\n}\n\n", "desc": " 点击分页联动表格", "scss_code": ".demo8{\n .u-table {\n margin-bottom: 11px;\n }\n .u-pagination{\n display: flex;\n align-items: center;\n justify-content: center;\n }\n}" }, { "example": _react2['default'].createElement(Demo1602, null), "title": " 表格+搜索", "code": "/**\n *\n * @title 表格+搜索\n * @parent 搜索 search\n * @description 搜索刷新表格数据\n * demo1602\n */\n\nimport React, { Component } from \"react\";\nimport {Icon,FormControl,InputGroup} from \"tinper-bee\";\n\nimport { Table } from 'tinper-bee';\n\nclass Search extends Component {\n state = {\n searchValue: \"\",\n empty: false\n };\n\n /**\n * 搜索\n */\n handleSearch = () => {\n let { onSearch } = this.props;\n this.setState({\n empty: true\n });\n onSearch && onSearch(this.state.searchValue);\n };\n\n /**\n * 捕获回车\n * @param e\n */\n handleKeyDown = e => {\n if (e.keyCode === 13) {\n this.handleSearch();\n }\n };\n\n /**\n * 输入框改变\n * @param e\n */\n handleChange = (e) => {\n this.setState({\n searchValue: e\n });\n };\n\n /**\n * 清空输入框\n */\n emptySearch = () => {\n let { onEmpty } = this.props;\n this.setState({\n searchValue: \"\",\n empty: false\n });\n onEmpty && onEmpty();\n };\n\n render() {\n return (\n \n \n {this.state.empty ? (\n \n ) : null}\n\n \n \n \n \n );\n }\n}\n\nconst columns = [\n { title: \"员工编号\", dataIndex: \"a\", key: \"a\", width: 300, className: \"rowClassName\"},\n { title: \"员工姓名\", dataIndex: \"b\", key: \"b\", width: 500 },\n { title: \"性别\", dataIndex: \"c\", key: \"c\", width: 500 },\n { title: \"部门\", dataIndex: \"d\", key: \"d\", width: 200 }\n];\n\nconst userData = [\n { a: \"ASVAL_201903280005\", b: \"小张\", c: \"男\", d: \"财务二科\", key: \"1\" },\n { a: \"ASVAL_201903200004\", b: \"小明\", c: \"男\", d: \"财务一科\", key: \"2\" },\n { a: \"ASVAL_201903120002\", b: \"小红\", c: \"女\", d: \"财务一科\", key: \"3\" }\n];\n\nclass Demo9 extends Component {\n constructor(props) {\n super(props);\n this.state = {\n data: userData\n };\n }\n\n handleSearch = value => {\n if (value === \"\") {\n return this.setState({\n data: userData\n });\n }\n let regExp = new RegExp(value, \"ig\");\n let data = userData.filter(item => regExp.test(item.a));\n this.setState({\n data\n });\n };\n\n handleEmpty = () => {\n this.setState({\n data: userData\n });\n };\n\n render() {\n return (\n \n );\n }\n}\n\n\n", "desc": " 搜索刷新表格数据" }];
+ var Demo0101 = __webpack_require__(530);var Demo0102 = __webpack_require__(532);var Demo0103 = __webpack_require__(533);var Demo0104 = __webpack_require__(534);var Demo0105 = __webpack_require__(535);var Demo0106 = __webpack_require__(536);var Demo0201 = __webpack_require__(537);var Demo0202 = __webpack_require__(538);var Demo0301 = __webpack_require__(539);var Demo0302 = __webpack_require__(540);var Demo0402 = __webpack_require__(543);var Demo0404 = __webpack_require__(544);var Demo0405 = __webpack_require__(549);var Demo0502 = __webpack_require__(551);var Demo0601 = __webpack_require__(553);var Demo0602 = __webpack_require__(554);var Demo0603 = __webpack_require__(555);var Demo0701 = __webpack_require__(556);var Demo0702 = __webpack_require__(557);var Demo0802 = __webpack_require__(558);var Demo0901 = __webpack_require__(564);var Demo0902 = __webpack_require__(565);var Demo0903 = __webpack_require__(566);var Demo1001 = __webpack_require__(567);var Demo1002 = __webpack_require__(569);var Demo1101 = __webpack_require__(570);var Demo1102 = __webpack_require__(571);var Demo1103 = __webpack_require__(572);var Demo1105 = __webpack_require__(573);var Demo1106 = __webpack_require__(574);var Demo1107 = __webpack_require__(575);var Demo1108 = __webpack_require__(576);var Demo1301 = __webpack_require__(577);var Demo1401 = __webpack_require__(578);var Demo1402 = __webpack_require__(580);var Demo1403 = __webpack_require__(581);var Demo1404 = __webpack_require__(582);var Demo1601 = __webpack_require__(583);var DemoArray = [{ "example": _react2['default'].createElement(Demo0101, null), "title": " 基本表格", "code": "/**\n*\n* @title 基本表格\n* @parent 基础 Basic\n* @description 单元格数据过长时,可结合Tooltip组件使用。\n* demo0101\n*/\n\nimport React, { Component } from \"react\";\nimport {Button,Tooltip} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n {\n title: \"员工编号\", dataIndex: \"a\", key: \"a\", width: 120, className: \"rowClassName\",\n fixed:'left',\n render: (text, record, index) => {\n return (\n \n {text}\n \n );\n }\n },\n { title: \"员工姓名\", dataIndex: \"b\", key: \"b\", width:100 },\n { title: \"性别\", dataIndex: \"c\", key: \"c\", width: 100 },\n { title: \"部门\", dataIndex: \"d\", key: \"d\", width: 100 },\n { title: \"职级\", dataIndex: \"e\", key: \"e\", width: 100 }\n];\n\nconst data = [\n { a: \"ASVAL_201903280005\", b: \"小张\", c: \"男\", d: \"财务二科\", e: \"M1\", key: \"1\" },\n { a: \"ASVAL_201903200004\", b: \"小明\", c: \"男\", d: \"财务一科\", e: \"T1\", key: \"2\" },\n { a: \"ASVAL_201903120002\", b: \"小红\", c: \"女\", d: \"财务一科\", e: \"T2\", key: \"3\" }\n];\n\nclass Demo01 extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n data: data\n }\n }\n handleClick = () => {\n console.log('这是第' , this.currentIndex , '行');\n console.log('内容:' , this.currentRecord);\n }\n\n render() {\n return (\n \n );\n }\n}\n\n\n", "desc": " 单元格数据过长时,可结合Tooltip组件使用。" }, { "example": _react2['default'].createElement(Demo0102, null), "title": " 默认无数据展示", "code": "/**\r\n*\r\n* @title 默认无数据展示\r\n* @parent 基础 Basic\r\n* @description 无数据时默认展示图标,可在`emptyText`方法中自定义展示内容。\r\n* demo0102\r\n*/\r\n\r\n\r\nimport React, { Component } from 'react';\r\nimport { Table, Icon } from 'tinper-bee';\r\n\n\r\nconst columns02 = [\r\n {\r\n title: \"员工编号\",\r\n dataIndex: \"num\",\r\n key: \"num\",\r\n width: \"40%\"\r\n },\r\n {\r\n title: \"员工姓名\",\r\n dataIndex: \"name\",\r\n key: \"name\",\r\n width: \"30%\"\r\n },\r\n {\r\n title: \"部门\",\r\n dataIndex: \"department\",\r\n key: \"department\"\r\n }\r\n];\r\n \r\nconst data02 = [];\r\n\r\n// 在此自定义无数据时的展示内容\r\nconst emptyFunc = () => 'No Data';\r\n \r\nclass Demo02 extends Component {\r\n render() {\r\n return (\r\n \r\n )\r\n }\r\n}\r\n\r\n", "desc": " 无数据时默认展示图标,可在`emptyText`方法中自定义展示内容。" }, { "example": _react2['default'].createElement(Demo0103, null), "title": " 固定表头", "code": "/**\r\n*\r\n* @title 固定表头\r\n* @parent 基础 Basic\r\n* @description 设置`scroll.y`指定滚动区域的高度,达到固定表头效果\r\n* demo0103\r\n*/\r\n\r\nimport React, { Component } from 'react';\r\nimport { Table } from 'tinper-bee';\r\n\r\nconst columns03 = [\r\n {\r\n title: \"序号\",\r\n dataIndex: \"index\",\r\n key: \"index\",\r\n width: 80, \r\n render(text, record, index) {\r\n return index + 1;\r\n }\r\n },\r\n {\r\n title: \"订单编号\",\r\n dataIndex: \"orderCode\",\r\n key: \"orderCode\",\r\n width: 200, \r\n },\r\n {\r\n title: \"供应商名称\",\r\n dataIndex: \"supplierName\",\r\n key: \"supplierName\",\r\n width: 200\r\n },\r\n {\r\n title: \"类型\",\r\n dataIndex: \"type_name\",\r\n key: \"type_name\",\r\n width: 200\r\n },\r\n {\r\n title: \"采购组织\",\r\n dataIndex: \"purchasing\",\r\n key: \"purchasing\",\r\n width: 200\r\n },\r\n {\r\n title: \"采购组\",\r\n dataIndex: \"purchasingGroup\",\r\n key: \"purchasingGroup\",\r\n width: 200\r\n },\r\n {\r\n title: \"凭证日期\",\r\n dataIndex: \"voucherDate\",\r\n key: \"voucherDate\",\r\n width: 200,\r\n },\r\n {\r\n title: \"审批状态\",\r\n dataIndex: \"approvalState_name\",\r\n key: \"approvalState_name\",\r\n width: 200\r\n },\r\n {\r\n title: \"确认状态\",\r\n dataIndex: \"confirmState_name\",\r\n key: \"confirmState_name\",\r\n width: 200\r\n }, \r\n {\r\n title: \"关闭状态\",\r\n dataIndex: \"closeState_name\",\r\n key: \"closeState_name\",\r\n width: 100\r\n }\r\n];\r\n\r\nconst data03 = [\r\n { \r\n orderCode:\"NU0391025\", \r\n supplierName: \"xx供应商\",\r\n type_name: \"1\",\r\n purchasing:'组织c', \r\n purchasingGroup:\"aa\",\r\n voucherDate:\"2018年03月18日\",\r\n approvalState_name:\"已审批\",\r\n confirmState_name:\"执行中\",\r\n closeState_name:\"未关闭\",\r\n key: \"1\"\r\n }, \r\n { \r\n orderCode:\"NU0391026\", \r\n supplierName: \"xx供应商\",\r\n type_name: \"2\",\r\n purchasing:'组织a', \r\n purchasingGroup:\"bb\",\r\n voucherDate:\"2018年02月05日\",\r\n approvalState_name:\"已审批\",\r\n confirmState_name:\"待确认\",\r\n closeState_name:\"未关闭\",\r\n key: \"2\"\r\n },\r\n { \r\n orderCode:\"NU0391027\", \r\n supplierName: \"xx供应商\",\r\n type_name: \"3\",\r\n purchasing:'组织b', \r\n purchasingGroup:\"aa\",\r\n voucherDate:\"2018年07月01日\",\r\n approvalState_name:\"已审批\",\r\n confirmState_name:\"终止\",\r\n closeState_name:\"已关闭\",\r\n key: \"3\"\r\n },\r\n { \r\n orderCode:\"NU0391028\", \r\n supplierName: \"xx供应商\",\r\n type_name: \"4\",\r\n purchasing:'组织c', \r\n purchasingGroup:\"cc\",\r\n voucherDate:\"2019年03月01日\",\r\n approvalState_name:\"未审批\",\r\n confirmState_name:\"待确认\",\r\n closeState_name:\"未关闭\",\r\n key: \"4\"\r\n },\r\n { \r\n orderCode:\"NU0391029\", \r\n supplierName: \"xx供应商\",\r\n type_name: \"5\",\r\n purchasing:'组织d', \r\n purchasingGroup:\"ss\",\r\n voucherDate:\"2019年02月14日\",\r\n approvalState_name:\"未审批\",\r\n confirmState_name:\"待确认\",\r\n closeState_name:\"未关闭\",\r\n key: \"5\"\r\n },\r\n { \r\n orderCode:\"NU0391030\", \r\n supplierName: \"xx供应商\",\r\n type_name: \"1\",\r\n purchasing:'组织e', \r\n purchasingGroup:\"zz\",\r\n voucherDate:\"2019年02月18日\",\r\n approvalState_name:\"已审批\",\r\n confirmState_name:\"终止\",\r\n closeState_name:\"已关闭\",\r\n key: \"6\"\r\n },\r\n { \r\n orderCode:\"NU0391031\", \r\n supplierName: \"xx供应商\",\r\n type_name: \"2\",\r\n purchasing:'组织f', \r\n purchasingGroup:\"qq\",\r\n voucherDate:\"2019年01月01日\",\r\n approvalState_name:\"已审批\",\r\n confirmState_name:\"执行中\",\r\n closeState_name:\"未关闭\",\r\n key: \"7\"\r\n },\r\n { \r\n orderCode:\"NU0391032\", \r\n supplierName: \"xx供应商\",\r\n type_name: \"3\",\r\n purchasing:'组织g', \r\n purchasingGroup:\"pp\",\r\n voucherDate:\"2019年01月31日\",\r\n approvalState_name:\"未审批\",\r\n confirmState_name:\"待确认\",\r\n closeState_name:\"未关闭\",\r\n key: \"8\"\r\n },\r\n];\r\n\r\nclass Demo03 extends Component {\r\n render() {\r\n return ;\r\n }\r\n}\r\n\r\n", "desc": " 设置`scroll.y`指定滚动区域的高度,达到固定表头效果" }, { "example": _react2['default'].createElement(Demo0104, null), "title": " 隔行换色", "code": "/**\n*\n* @title 隔行换色\n* @parent 基础 Basic\n* @description 可自定义斑马线颜色\n* demo0104\n*/\n\n\nimport React, { Component } from 'react';\nimport { Table } from 'tinper-bee';\n\nconst columns04 = [\n {title: \"序号\",dataIndex: \"index\",key: \"index\",width: 80, \n render(text, record, index) {\n return index + 1;\n }\n },\n {title: \"订单编号\",dataIndex: \"orderCode\",key: \"orderCode\",width: 200},\n {title: \"供应商名称\",dataIndex: \"supplierName\",key: \"supplierName\",width: 200},\n {title: \"类型\",dataIndex: \"type_name\",key: \"type_name\",width: 200},\n {title: \"采购组织\",dataIndex: \"purchasing\",key: \"purchasing\",width: 200},\n {title: \"采购组\",dataIndex: \"purchasingGroup\",key: \"purchasingGroup\",width: 200},\n {title: \"凭证日期\",dataIndex: \"voucherDate\",key: \"voucherDate\",width: 200}\n];\n\nconst data04 = [\n { \n orderCode:\"NU0391025\", \n supplierName: \"xx供应商\",\n type_name: \"1\",\n purchasing:'组织c', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年03月18日\",\n key: \"1\"\n }, \n { \n orderCode:\"NU0391026\", \n supplierName: \"xx供应商\",\n type_name: \"2\",\n purchasing:'组织a', \n purchasingGroup:\"bb\",\n voucherDate:\"2018年02月05日\",\n key: \"2\"\n },\n { \n orderCode:\"NU0391027\", \n supplierName: \"xx供应商\",\n type_name: \"3\",\n purchasing:'组织b', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年07月01日\",\n key: \"3\"\n },\n { \n orderCode:\"NU0391028\", \n supplierName: \"xx供应商\",\n type_name: \"4\",\n purchasing:'组织c', \n purchasingGroup:\"cc\",\n voucherDate:\"2019年03月01日\",\n key: \"4\"\n },\n { \n orderCode:\"NU0391029\", \n supplierName: \"xx供应商\",\n type_name: \"5\",\n purchasing:'组织d', \n purchasingGroup:\"ss\",\n voucherDate:\"2019年02月14日\",\n key: \"5\"\n },\n { \n orderCode:\"NU0391030\", \n supplierName: \"xx供应商\",\n type_name: \"1\",\n purchasing:'组织e', \n purchasingGroup:\"zz\",\n voucherDate:\"2019年02月18日\",\n key: \"6\"\n },\n { \n orderCode:\"NU0391031\", \n supplierName: \"xx供应商\",\n type_name: \"2\",\n purchasing:'组织f', \n purchasingGroup:\"qq\",\n voucherDate:\"2019年01月01日\",\n key: \"7\"\n },\n { \n orderCode:\"NU0391032\", \n supplierName: \"xx供应商\",\n type_name: \"3\",\n purchasing:'组织g', \n purchasingGroup:\"pp\",\n voucherDate:\"2019年01月31日\",\n key: \"8\"\n },\n];\n\nclass Demo04 extends Component {\n render() {\n return \n }\n}\n\n", "desc": " 可自定义斑马线颜色", "scss_code": ".demo04 {\n &.u-table tr:nth-child(2n){\n background: #f7f9fb;\n }\n &.u-table tr.u-table-row-hover, .u-table tr:hover{\n background: #ebecf0;\n }\n}" }, { "example": _react2['default'].createElement(Demo0105, null), "title": " 表格 Loading 加载", "code": "/**\r\n*\r\n* @title 表格 Loading 加载\r\n* @parent 基础 Basic\r\n* @description loading可以传boolean或者object对象,object为bee-loading组件的参数类型\r\n* demo0105\r\n*/\r\n\r\nimport React, { Component } from \"react\";\r\nimport { Table } from 'tinper-bee';\r\nimport {Button,Tooltip} from \"tinper-bee\";\r\n\r\nconst columns05 = [\r\n { title: \"员工编号\", dataIndex: \"a\", key: \"a\", width: 300, className: \"rowClassName\",fixed:'left'},\r\n { title: \"员工姓名\", dataIndex: \"b\", key: \"b\", width: 500 },\r\n { title: \"性别\", dataIndex: \"c\", key: \"c\", width: 500 },\r\n { title: \"部门\", dataIndex: \"d\", key: \"d\", width: 200 }\r\n];\r\n\r\nconst data05 = [\r\n { a: \"ASVAL_201903280005\", b: \"小张\", c: \"男\", d: \"财务二科\", key: \"1\" },\r\n { a: \"ASVAL_201903200004\", b: \"小明\", c: \"男\", d: \"财务一科\", key: \"2\" },\r\n { a: \"ASVAL_201903120002\", b: \"小红\", c: \"女\", d: \"财务一科\", key: \"3\" }\r\n];\r\n\r\nclass Demo05 extends Component {\r\n constructor(props){\r\n super(props);\r\n this.state = {\r\n loading : true\r\n }\r\n }\r\n changeLoading = () => {\r\n this.setState({\r\n loading : !this.state.loading\r\n })\r\n }\r\n render() {\r\n return (\r\n \r\n
\r\n
\r\n
\r\n );\r\n }\r\n}\r\n\r\n\r\n", "desc": " loading可以传boolean或者object对象,object为bee-loading组件的参数类型" }, { "example": _react2['default'].createElement(Demo0106, null), "title": " 单元格内容居中", "code": "/**\n*\n* @title 单元格内容居中\n* @parent 基础 Basic\n* @description 在columns数据中设置`textAlign:'center'`,可实现单元格内容居中展示的效果。默认是居左显示。\n* demo0106\n*/\n\nimport React, { Component } from \"react\";\nimport {Button,Tooltip} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n {\n title: \"员工编号\", dataIndex: \"a\", key: \"a\", width: 120, className: \"rowClassName\",\n fixed:'left',\n textAlign:'center',\n render: (text, record, index) => {\n return (\n \n {text}\n \n );\n }\n },\n { title: \"员工姓名\", dataIndex: \"b\", key: \"b\", width:100,textAlign:'center'},\n { title: \"性别\", dataIndex: \"c\", key: \"c\", width: 100,textAlign:'center'},\n { title: \"部门\", dataIndex: \"d\", key: \"d\", width: 100,textAlign:'center' },\n { title: \"职级\", dataIndex: \"e\", key: \"e\", width: 100,textAlign:'center' }\n];\n\nconst data = [\n { a: \"ASVAL_201903280005\", b: \"小张\", c: \"男\", d: \"财务二科\", e: \"M1\", key: \"1\" },\n { a: \"ASVAL_201903200004\", b: \"小明\", c: \"男\", d: \"财务一科\", e: \"T1\", key: \"2\" },\n { a: \"ASVAL_201903120002\", b: \"小红\", c: \"女\", d: \"财务一科\", e: \"T2\", key: \"3\" }\n];\n\nclass Demo06 extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n data: data\n }\n }\n handleClick = () => {\n console.log('这是第' , this.currentIndex , '行');\n console.log('内容:' , this.currentRecord);\n }\n\n render() {\n return (\n \n );\n }\n}\n\n\n", "desc": " 在columns数据中设置`textAlign:'center'`,可实现单元格内容居中展示的效果。默认是居左显示。" }, { "example": _react2['default'].createElement(Demo0201, null), "title": " 横向滚动条", "code": "/**\n*\n* @title 横向滚动条\n* @parent 滚动 Scroll View\n* @description 设置`scroll`属性支持横向或纵向滚动,x的取值可以是:正整数(自动转为相应的像素值)、百分比(相对于表格真实宽度的百分比,大于100%时会出现滚动条)、布尔值。y的取值是正整数。\n* demo0201\n*/\n\nimport React, { Component } from \"react\";\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n {\n title: \"序号\",\n dataIndex: \"index\",\n key: \"index\",\n width: 100, \n render(text, record, index) {\n return index + 1;\n }\n },\n {\n title: \"订单编号\",\n dataIndex: \"orderCode\",\n key: \"orderCode\",\n width: 300, \n },\n {\n title: \"供应商名称\",\n dataIndex: \"supplierName\",\n key: \"supplierName\",\n width: 200\n },\n {\n title: \"类型\",\n dataIndex: \"type_name\",\n key: \"type_name\",\n width: 200\n },\n {\n title: \"采购组织\",\n dataIndex: \"purchasing\",\n key: \"purchasing\",\n width: 200\n },\n {\n title: \"采购组\",\n dataIndex: \"purchasingGroup\",\n key: \"purchasingGroup\",\n width: 200\n },\n {\n title: \"凭证日期\",\n dataIndex: \"voucherDate\",\n key: \"voucherDate\",\n width: 300,\n },\n {\n title: \"审批状态\",\n dataIndex: \"approvalState_name\",\n key: \"approvalState_name\",\n width: 200\n },\n {\n title: \"确认状态\",\n dataIndex: \"confirmState_name\",\n key: \"confirmState_name\",\n width: 200\n }, \n {\n title: \"关闭状态\",\n dataIndex: \"closeState_name\",\n key: \"closeState_name\",\n width: 100\n }\n];\n \nconst data = [\n { \n orderCode:\"NU0391025\", \n supplierName: \"xx供应商\",\n type_name: \"1\",\n purchasing:'组织c', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年03月18日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"执行中\",\n closeState_name:\"未关闭\",\n key: \"1\"\n }, \n { \n orderCode:\"NU0391026\", \n supplierName: \"xx供应商\",\n type_name: \"2\",\n purchasing:'组织a', \n purchasingGroup:\"bb\",\n voucherDate:\"2018年02月05日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"待确认\",\n closeState_name:\"未关闭\",\n key: \"2\"\n },\n { \n orderCode:\"NU0391027\", \n supplierName: \"xx供应商\",\n type_name: \"3\",\n purchasing:'组织b', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年07月01日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"终止\",\n closeState_name:\"已关闭\",\n key: \"3\"\n },\n { \n orderCode:\"NU0391028\", \n supplierName: \"xx供应商\",\n type_name: \"4\",\n purchasing:'组织c', \n purchasingGroup:\"cc\",\n voucherDate:\"2019年03月01日\",\n approvalState_name:\"未审批\",\n confirmState_name:\"待确认\",\n closeState_name:\"未关闭\",\n key: \"4\"\n },\n { \n orderCode:\"NU0391029\", \n supplierName: \"xx供应商\",\n type_name: \"5\",\n purchasing:'组织d', \n purchasingGroup:\"ss\",\n voucherDate:\"2019年02月14日\",\n approvalState_name:\"未审批\",\n confirmState_name:\"待确认\",\n closeState_name:\"未关闭\",\n key: \"5\"\n }\n];\n\nclass Demo11 extends Component {\n render() {\n return (\n \n );\n }\n}\n\n\n", "desc": " 设置`scroll`属性支持横向或纵向滚动,x的取值可以是:正整数(自动转为相应的像素值)、百分比(相对于表格真实宽度的百分比,大于100%时会出现滚动条)、布尔值。y的取值是正整数。" }, { "example": _react2['default'].createElement(Demo0202, null), "title": " 纵向滚动条", "code": "/**\n*\n* @title 纵向滚动条\n* @parent 滚动 Scroll View\n* @description 设置`scroll`属性支持横向或纵向滚动,x/y的取值可以是正整数、百分比、布尔值\n* demo0202\n*/\n\nimport React, { Component } from \"react\";\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n {title: \"序号\",dataIndex: \"index\",key: \"index\",width: 80, \n render(text, record, index) {\n return index + 1;\n }\n },\n {title: \"订单编号\",dataIndex: \"orderCode\",key: \"orderCode\",width: 200},\n {title: \"供应商名称\",dataIndex: \"supplierName\",key: \"supplierName\",width: 200},\n {title: \"类型\",dataIndex: \"type_name\",key: \"type_name\",width: 200},\n {title: \"采购组织\",dataIndex: \"purchasing\",key: \"purchasing\",width: 200},\n {title: \"采购组\",dataIndex: \"purchasingGroup\",key: \"purchasingGroup\",width: 200},\n {title: \"凭证日期\",dataIndex: \"voucherDate\",key: \"voucherDate\",width: 200}\n];\n \nconst data = [\n { \n orderCode:\"NU0391025\", \n supplierName: \"xx供应商\",\n type_name: \"1\",\n purchasing:'组织c', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年03月18日\",\n key: \"1\"\n }, \n { \n orderCode:\"NU0391026\", \n supplierName: \"xx供应商\",\n type_name: \"2\",\n purchasing:'组织a', \n purchasingGroup:\"bb\",\n voucherDate:\"2018年02月05日\",\n key: \"2\"\n },\n { \n orderCode:\"NU0391027\", \n supplierName: \"xx供应商\",\n type_name: \"3\",\n purchasing:'组织b', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年07月01日\",\n key: \"3\"\n },\n { \n orderCode:\"NU0391028\", \n supplierName: \"xx供应商\",\n type_name: \"4\",\n purchasing:'组织c', \n purchasingGroup:\"cc\",\n voucherDate:\"2019年03月01日\",\n key: \"4\"\n },\n { \n orderCode:\"NU0391029\", \n supplierName: \"xx供应商\",\n type_name: \"5\",\n purchasing:'组织d', \n purchasingGroup:\"ss\",\n voucherDate:\"2019年02月14日\",\n key: \"5\"\n },\n { \n orderCode:\"NU0391030\", \n supplierName: \"xx供应商\",\n type_name: \"1\",\n purchasing:'组织e', \n purchasingGroup:\"zz\",\n voucherDate:\"2019年02月18日\",\n key: \"6\"\n },\n { \n orderCode:\"NU0391031\", \n supplierName: \"xx供应商\",\n type_name: \"2\",\n purchasing:'组织f', \n purchasingGroup:\"qq\",\n voucherDate:\"2019年01月01日\",\n key: \"7\"\n },\n { \n orderCode:\"NU0391032\", \n supplierName: \"xx供应商\",\n type_name: \"3\",\n purchasing:'组织g', \n purchasingGroup:\"pp\",\n voucherDate:\"2019年01月31日\",\n key: \"8\"\n },\n];\nclass Demo12 extends Component {\n render() {\n return (\n \n );\n }\n}\n\n\n", "desc": " 设置`scroll`属性支持横向或纵向滚动,x/y的取值可以是正整数、百分比、布尔值" }, { "example": _react2['default'].createElement(Demo0301, null), "title": " 渲染本地数据", "code": "/**\n*\n* @title 渲染本地数据\n* @parent 数据操作 Data Opetation\n* @description 可自定义页头和页脚。\n* demo0301\n*/\n\nimport React, { Component } from \"react\";\nimport {Button,Tooltip} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n {\n title: \"员工编号\", dataIndex: \"a\", key: \"a\", width: 300, className: \"rowClassName\",\n fixed:'left',\n render: (text, record, index) => {\n return (\n \n {text}\n \n );\n }\n },\n { title: \"员工姓名\", dataIndex: \"b\", key: \"b\", width: 500 },\n { title: \"性别\", dataIndex: \"c\", key: \"c\", width: 500 },\n { title: \"部门\", dataIndex: \"d\", key: \"d\", width: 200 }\n];\n\nconst data = [\n { a: \"ASVAL_201903280005\", b: \"小张\", c: \"男\", d: \"财务二科\", key: \"1\" },\n { a: \"ASVAL_201903200004\", b: \"小明\", c: \"男\", d: \"财务一科\", key: \"2\" },\n { a: \"ASVAL_201903120002\", b: \"小红\", c: \"女\", d: \"财务一科\", key: \"3\" }\n];\nclass Demo21 extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n data: data\n }\n }\n\n render() {\n return (\n 员工信息统计表
}\n footer={currentData => 合计: 共{data.length}条数据
}\n />\n );\n }\n}\n\n\n", "desc": " 可自定义页头和页脚。" }, { "example": _react2['default'].createElement(Demo0302, null), "title": " 渲染远程数据", "code": "/**\n*\n* @title 渲染远程数据\n* @parent 数据操作 Data Opetation\n* @description 可通过 ajax 请求方式,从服务端读取并展现数据。也可自行接入其他数据处理方式。\n* demo0302\n*/\n\nimport React, { Component } from \"react\";\nimport {Button} from \"tinper-bee\";\nimport reqwest from 'reqwest';\nimport { Table } from 'tinper-bee';\n\nconst columns = [{\n title: 'Name',\n dataIndex: 'name',\n sorter: true,\n render: name => `${name.first} ${name.last}`,\n width: '20%',\n}, {\n title: 'Gender',\n dataIndex: 'gender',\n filters: [\n { text: 'Male', value: 'male' },\n { text: 'Female', value: 'female' },\n ],\n width: '20%',\n}, {\n title: 'Email',\n dataIndex: 'email',\n}];\n\nclass Demo22 extends Component {\n constructor(props) {\n super(props);\n this.state = {\n data: [],\n loading: false,\n }\n }\n\n fetch = (params = {}) => {\n console.log('params:', params);\n this.setState({ loading: true });\n reqwest({\n url: 'https://randomuser.me/api',\n method: 'get',\n data: {\n results: 10,\n ...params,\n },\n type: 'json',\n }).then((data) => {\n this.setState({\n loading: false,\n data: data.results,\n });\n });\n }\n\n render() {\n return (\n \n
\n
\n
\n );\n }\n}\n\n\n", "desc": " 可通过 ajax 请求方式,从服务端读取并展现数据。也可自行接入其他数据处理方式。", "scss_code": ".demo22{\n .opt-btns{\n margin-bottom: 8px;\n }\n}" }, { "example": _react2['default'].createElement(Demo0402, null), "title": " 多列表头", "code": "/**\r\n *\r\n * @title 多列表头\r\n * @parent 列渲染 Custom Render\r\n * @description columns[n] 可以内嵌 children,以渲染分组表头。\r\n * 自定义表头高度需要传headerHeight,注:修改th的padding top和bottom置为0,否则会有影响\r\n * demo0402\r\n */\r\n\r\nimport React, { Component } from \"react\";\r\nimport { Table } from 'tinper-bee';\r\nimport {Button} from \"tinper-bee\";\r\n\r\nconst { ColumnGroup, Column } = Table;\r\n\r\nconst columns = [\r\n {\r\n title: \"Name\",\r\n dataIndex: \"name\",\r\n key: \"name\",\r\n width: 100,\r\n fixed: \"left\"\r\n },\r\n {\r\n title: \"Other\",\r\n width:600,\r\n children: [\r\n {\r\n title: \"Age\",\r\n dataIndex: \"age\",\r\n key: \"age\",\r\n width: 200\r\n },\r\n {\r\n title: \"Address\",\r\n children: [\r\n {\r\n title: \"Street\",\r\n dataIndex: \"street\",\r\n key: \"street\",\r\n width: 200\r\n },\r\n {\r\n title: \"Block\",\r\n children: [\r\n {\r\n title: \"Building\",\r\n dataIndex: \"building\",\r\n key: \"building\",\r\n width: 100\r\n },\r\n {\r\n title: \"Door No.\",\r\n dataIndex: \"number\",\r\n key: \"number\",\r\n width: 100\r\n }\r\n ]\r\n }\r\n ]\r\n }\r\n ]\r\n },\r\n {\r\n title: \"Company\",\r\n width:400,\r\n children: [\r\n {\r\n title: \"Company Address\",\r\n dataIndex: \"companyAddress\",\r\n key: \"companyAddress\",\r\n width:200,\r\n },\r\n {\r\n title: \"Company Name\",\r\n dataIndex: \"companyName\",\r\n key: \"companyName\",\r\n width:200,\r\n }\r\n ]\r\n },\r\n {\r\n title: \"Gender\",\r\n dataIndex: \"gender\",\r\n key: \"gender\",\r\n width: 60,\r\n fixed: \"right\"\r\n }\r\n];\r\n\r\nconst data = [];\r\nfor (let i = 0; i < 20; i++) {\r\n data.push({\r\n key: i,\r\n name: \"John Brown\",\r\n age: i + 1,\r\n street: \"Lake Park\",\r\n building: \"C\",\r\n number: 2035,\r\n companyAddress: \"Lake Street 42\",\r\n companyName: \"SoftLake Co\",\r\n gender: \"M\"\r\n });\r\n}\r\n\r\nclass Demo32 extends Component {\r\n render() {\r\n return (\r\n \r\n );\r\n }\r\n}\r\n\r\n\r\n", "desc": " columns[n] 可以内嵌 children,以渲染分组表头。", "scss_code": ".demo32{\n .u-table-thead th {\n padding-top: 0px;\n padding-bottom: 0px;\n }\n}" }, { "example": _react2['default'].createElement(Demo0404, null), "title": " 数据关联", "code": "/**\n*\n* @title 数据关联\n* @parent 列渲染 Custom Render\n* @description 数据行关联自定义菜单显示\n* demo0404\n*/\n\nimport React, { Component } from 'react';\nimport {Icon,Checkbox,Dropdown,Menu} from 'tinper-bee';\nimport { Table } from 'tinper-bee';\nimport multiSelect from \"tinper-bee/lib/newMultiSelect\";;\nimport sort from \"tinper-bee/lib/sort\";;\n\nconst { Item } = Menu;\n\nconst data = [\n { \n num:\"NU0391025\", \n name: \"aa\",\n sex: \"男\",\n dept:'财务二科', \n rank:\"T1\",\n year:\"1\",\n seniority:\"1\",\n key: \"1\"\n }, \n { \n num:\"NU0391026\", \n name: \"bb\",\n sex: \"女\",\n dept:'财务一科', \n rank:\"M1\",\n year:\"1\",\n seniority:\"1\",\n key: \"2\"\n },\n { \n num:\"NU0391027\", \n name: \"dd\",\n sex: \"女\",\n dept:'财务一科', \n rank:\"T2\",\n year:\"2\",\n seniority:\"2\",\n key: \"3\"\n }\n];\n\nconst MultiSelectTable = multiSelect(Table, Checkbox);\nconst ComplexTable = sort(MultiSelectTable, Icon);\n\nclass Demo33 extends Component {\n constructor(props) {\n super(props);\n }\n getSelectedDataFunc = data => {\n console.log(data);\n }\n onSelect = (item) => {\n console.log(item);\n }\n render() {\n const menu1 = (\n );\n let columns = [\n { title: \"关联\",dataIndex: \"link\",key: \"link\",width: 80, \n render: (text, record, index) => {\n return (\n \n \n \n )\n }\n },\n { title: \"员工编号\",dataIndex: \"num\",key: \"num\",width: 200 },\n { title: \"员工姓名\",dataIndex: \"name\",key: \"name\", width: 200},\n { title: \"员工性别\",dataIndex: \"sex\",key: \"sex\",width: 200 },\n { title: \"部门\",dataIndex: \"dept\",key: \"dept\",width: 200},\n { title: \"职级\",dataIndex: \"rank\",key: \"rank\",width: 200},\n { title: \"工龄\",dataIndex: \"year\",key: \"year\",width: 200},\n { title: \"司龄\",dataIndex: \"seniority\",key: \"seniority\",width: 200}\n ];\n return \n }\n}\n\n", "desc": " 数据行关联自定义菜单显示" }, { "example": _react2['default'].createElement(Demo0405, null), "title": " 列合计(总计)", "code": "/**\n *\n * @title 列合计(总计)\n * @parent 列渲染 Custom Render\n * @description 给需要计算合计的列(columns),设置sumCol值为true即可,支持动态设置数据源。\n * demo0405\n */\n\nimport React, { Component } from \"react\";\nimport {Checkbox} from \"tinper-bee\";\nimport { Table } from 'tinper-bee'; \nimport sum from \"tinper-bee/lib/sum.js\";;\nimport multiSelect from \"tinper-bee/lib/multiSelect.js\";;\n \nlet ComplexTable = multiSelect(sum(Table), Checkbox);\nlet _sum = 0;\nconst columns = [\n {\n title: \"单据编号\",\n dataIndex: \"num\",\n key: \"num\",\n width: 120,\n fixed: \"left\"\n },\n {\n title: \"单据日期\",\n dataIndex: \"date\",\n key: \"date\",\n width: 200,\n },\n {\n title: \"业务类型\",\n dataIndex: \"type\",\n key: \"type\",\n width: 200\n },\n {\n title: \"供应商\",\n dataIndex: \"supplier\",\n key: \"supplier\",\n width: 100\n },\n {\n title: \"联系人\",\n dataIndex: \"contact\",\n key: \"contact\",\n },\n {\n title: \"仓库\",\n dataIndex: \"warehouse\",\n key: \"warehouse\",\n width: 80,\n },\n {\n title: \"整单数量\",\n dataIndex: \"total\",\n key: \"total\",\n width: 100,\n sumCol: true\n },\n {\n title: \"金额\",\n dataIndex: \"money\",\n key: \"money\",\n width: 100,\n sumCol: true\n }\n];\n\nfunction getData(){\n const data = [];\n for (let i = 0; i < 5; i++) {\n data.push({\n key: i,\n num: \"NU039100\"+i,\n date: \"2019-03-01\",\n type: \"普通采购\",\n supplier: \"gys\"+i,\n contact: \"Tom\",\n warehouse: \"普通仓\",\n total: i + Math.floor(Math.random()*10),\n money: 20 * Math.floor(Math.random()*10)\n });\n _sum += data[i].total;\n _sum += data[i].money;\n }\n return data;\n}\n\nclass Demo35 extends Component {\n \n constructor(props) {\n super(props);\n this.state = {\n data: getData(),\n sum:_sum\n };\n }\n\n render() {\n const {data} = this.state;\n return (\n \n );\n }\n}\n\n", "desc": " 给需要计算合计的列(columns),设置sumCol值为true即可,支持动态设置数据源。" }, { "example": _react2['default'].createElement(Demo0502, null), "title": " 单元格编辑", "code": "/**\n *\n * @title 单元格编辑\n * @parent 编辑 Editor\n * @description 可以对单元格进行编辑的表格,示例中给出输入框、下拉框、参照的编辑模式,以及两类校验。(通过对 coloums 配置 render 属性实现渲染不同格式的编辑态单元格)\n * demo0502\n */\nimport React, { Component } from \"react\";\nimport { Table } from 'tinper-bee';\nimport { Icon, Select, Tooltip, Form } from \"tinper-bee\";\nconst Option = Select.Option;\nimport { RefTreeWithInput } from \"ref-tree\";\n\nclass StringEditCell extends Component {\n constructor(props, context) {\n super(props);\n this.state = {\n value: this.props.value,\n editable: false\n };\n }\n\n commitChange = () => {\n if (this.state.value === \"\") return;\n this.setState({ editable: false });\n if (this.props.onChange) {\n this.props.onChange(this.state.value);\n }\n };\n\n edit = () => {\n this.setState({ editable: true });\n };\n\n handleKeydown = event => {\n if (event.keyCode == 13) {\n this.commitChange();\n }\n };\n\n handleChange = e => {\n this.setState({ value: e.target.value });\n };\n\n render() {\n const { value, editable } = this.state;\n return (\n \n {editable ? (\n
\n \n {value === \"\" ? (\n \n {\"请输入\" + this.props.colName}\n
\n }\n >\n
\n \n ) : null}\n
\n ) : (\n \n {value || \" \"}\n
\n )}\n \n );\n }\n}\n\nconst SELECT_SOURCE = [\"男\", \"女\"];\n\nclass SelectEditCell extends Component {\n constructor(props, context) {\n super(props);\n this.state = {\n value: this.props.value,\n editable: false\n };\n }\n\n handleSelect = value => {\n this.setState({ value });\n };\n\n commitChange = () => {\n this.setState({ editable: false });\n if (this.props.onChange) {\n this.props.onChange(this.state.value);\n }\n };\n\n edit = () => {\n this.setState({ editable: true });\n };\n\n render() {\n const { value, editable } = this.state;\n return (\n \n {editable ? (\n
\n \n
\n ) : (\n
\n {value || \" \"}\n
\n )}\n
\n );\n }\n}\n\nconst option = {\n title: \"树\",\n searchable: true,\n multiple: false,\n param: {\n refCode: \"neworganizition_tree\"\n },\n checkStrictly: true,\n disabled: false,\n nodeDisplay: record => {\n return record.refname;\n },\n displayField: record => {\n return record.refname;\n }, //显示内容的键\n valueField: \"refpk\", //真实 value 的键\n refModelUrl: {\n treeUrl: \"https://mock.yonyoucloud.com/mock/358/blobRefTree\",\n treeUrl: \"/pap_basedoc/common-ref/blobRefTree\"\n },\n matchUrl: \"/pap_basedoc/common-ref/matchPKRefJSON\",\n filterUrl: \"/pap_basedoc/common-ref/filterRefJSON\",\n lazyModal: false,\n strictMode: true,\n lang: \"zh_CN\",\n treeData: [\n {\n code: \"org1\",\n children: [\n {\n code: \"bj\",\n entityType: \"mainEntity\",\n name: \"北京总部-简\",\n pid: \"a4cf0601-51e6-4012-9967-b7a64a4b2d47\",\n refcode: \"bj\",\n refpk: \"5305416e-e7b4-4051-90bd-12d12942295b\",\n id: \"5305416e-e7b4-4051-90bd-12d12942295b\",\n isLeaf: \"true\",\n refname: \"北京总部-简\"\n },\n {\n code: \"xd\",\n entityType: \"mainEntity\",\n name: \"新道-简\",\n pid: \"a4cf0601-51e6-4012-9967-b7a64a4b2d47\",\n refcode: \"xd\",\n refpk: \"b691afff-ea83-4a3f-affa-beb2be9cba52\",\n id: \"b691afff-ea83-4a3f-affa-beb2be9cba52\",\n isLeaf: \"true\",\n refname: \"新道-简\"\n },\n {\n code: \"yy3\",\n entityType: \"mainEntity\",\n name: \"test3\",\n pid: \"a4cf0601-51e6-4012-9967-b7a64a4b2d47\",\n refcode: \"yy3\",\n refpk: \"e75694d9-7c00-4e9e-9573-d29465ae79a9\",\n id: \"e75694d9-7c00-4e9e-9573-d29465ae79a9\",\n isLeaf: \"true\",\n refname: \"test3\"\n },\n {\n code: \"yy1\",\n entityType: \"mainEntity\",\n name: \"test1\",\n pid: \"a4cf0601-51e6-4012-9967-b7a64a4b2d47\",\n refcode: \"yy1\",\n refpk: \"fd32ceeb-57a8-4f44-816e-fa660f5715ab\",\n id: \"fd32ceeb-57a8-4f44-816e-fa660f5715ab\",\n isLeaf: \"true\",\n refname: \"test1\"\n },\n {\n code: \"dept2\",\n children: [\n {\n code: \"cs\",\n entityType: \"subEntity\",\n organization_id: \"a4cf0601-51e6-4012-9967-b7a64a4b2d47\",\n name: \"测试部-简\",\n pid: \"0ebbb6d8-250a-4d1d-a019-7ae951629a2c\",\n refcode: \"cs\",\n refpk: \"cc43a66a-438d-4106-937f-bec44406f771\",\n id: \"cc43a66a-438d-4106-937f-bec44406f771\",\n isLeaf: \"true\",\n refname: \"测试部-简\"\n },\n {\n code: \"qd\",\n entityType: \"subEntity\",\n organization_id: \"a4cf0601-51e6-4012-9967-b7a64a4b2d47\",\n name: \"前端部-简\",\n pid: \"0ebbb6d8-250a-4d1d-a019-7ae951629a2c\",\n refcode: \"qd\",\n refpk: \"73a10edd-aae8-4f31-af25-1f48f0a3b344\",\n id: \"73a10edd-aae8-4f31-af25-1f48f0a3b344\",\n isLeaf: \"true\",\n refname: \"前端部-简\"\n }\n ],\n entityType: \"subEntity\",\n organization_id: \"a4cf0601-51e6-4012-9967-b7a64a4b2d47\",\n name: \"生产处\",\n refcode: \"dept2\",\n refpk: \"0ebbb6d8-250a-4d1d-a019-7ae951629a2c\",\n id: \"0ebbb6d8-250a-4d1d-a019-7ae951629a2c\",\n refname: \"生产处\"\n },\n {\n code: \"dept1\",\n children: [\n {\n code: \"dept1_2\",\n entityType: \"subEntity\",\n organization_id: \"a4cf0601-51e6-4012-9967-b7a64a4b2d47\",\n name: \"财务二科\",\n pid: \"95b60f35-ed0b-454e-b948-fb45ae30b911\",\n refcode: \"dept1_2\",\n refpk: \"55b7fff1-6579-4ca9-92b7-3271d288b9f3\",\n id: \"55b7fff1-6579-4ca9-92b7-3271d288b9f3\",\n isLeaf: \"true\",\n refname: \"财务二科\"\n },\n {\n code: \"dept1_1\",\n entityType: \"subEntity\",\n organization_id: \"a4cf0601-51e6-4012-9967-b7a64a4b2d47\",\n name: \"财务一科\",\n pid: \"95b60f35-ed0b-454e-b948-fb45ae30b911\",\n refcode: \"dept1_1\",\n refpk: \"9711d912-3184-4063-90c5-1facc727813c\",\n id: \"9711d912-3184-4063-90c5-1facc727813c\",\n isLeaf: \"true\",\n refname: \"财务一科\"\n }\n ],\n entityType: \"subEntity\",\n organization_id: \"a4cf0601-51e6-4012-9967-b7a64a4b2d47\",\n name: \"财务处\",\n refcode: \"dept1\",\n refpk: \"95b60f35-ed0b-454e-b948-fb45ae30b911\",\n id: \"95b60f35-ed0b-454e-b948-fb45ae30b911\",\n refname: \"财务处\"\n }\n ],\n entityType: \"mainEntity\",\n name: \"用友集团\",\n refcode: \"org1\",\n refpk: \"a4cf0601-51e6-4012-9967-b7a64a4b2d47\",\n id: \"a4cf0601-51e6-4012-9967-b7a64a4b2d47\",\n refname: \"用友集团\"\n }\n ]\n};\n\nconst RefEditCell = Form.createForm()(\n class RefComponentWarpper extends Component {\n constructor(props, context) {\n super(props, context);\n this.state = {\n value: this.props.value.d,\n editable: false\n };\n this.refWarp = React.createRef();\n }\n\n edit = () => {\n this.setState({ editable: true }, () => this.refWarp.focus());\n };\n\n handleSelect = values => {\n this.setState({ value: values[0] });\n };\n\n commitChange = () => {\n this.setState({ editable: false });\n if (this.props.onChange) {\n this.props.onChange(this.state.value);\n }\n };\n\n onRefBlur = e => {\n // 消除点击子组件,父组件先失焦再聚焦的事件触发过程带来的副作用\n const __REF_CONTENT__ = document.querySelector(\"div.ref-core-modal\");\n if (!__REF_CONTENT__ && e.target === this.refWarp) {\n this.commitChange();\n }\n };\n\n render() {\n const { getFieldProps, getFieldError } = this.props.form;\n const { value, editable } = this.state;\n return editable ? (\n (this.refWarp = el)}\n className=\"editable-cell-input-wrapper\"\n tabIndex={-1}\n onBlur={this.onRefBlur}\n >\n \n \n {getFieldError(\"code1\")}\n \n
\n ) : (\n \n {value.name || \" \"}\n
\n );\n }\n }\n);\n\nconst dataSource = [\n {\n a: \"ASVAL_201903280005\",\n b: \"小张\",\n c: \"男\",\n d: {\n code: \"dept1_2\",\n entityType: \"subEntity\",\n organization_id: \"a4cf0601-51e6-4012-9967-b7a64a4b2d47\",\n name: \"财务二科\",\n pid: \"95b60f35-ed0b-454e-b948-fb45ae30b911\",\n refcode: \"dept1_2\",\n refpk: \"55b7fff1-6579-4ca9-92b7-3271d288b9f3\",\n id: \"55b7fff1-6579-4ca9-92b7-3271d288b9f3\",\n isLeaf: \"true\",\n refname: \"财务二科\"\n },\n key: \"1\"\n },\n {\n a: \"ASVAL_201903200004\",\n b: \"小明\",\n c: \"男\",\n d: {\n code: \"dept1_2\",\n entityType: \"subEntity\",\n organization_id: \"a4cf0601-51e6-4012-9967-b7a64a4b2d47\",\n name: \"财务二科\",\n pid: \"95b60f35-ed0b-454e-b948-fb45ae30b911\",\n refcode: \"dept1_2\",\n refpk: \"55b7fff1-6579-4ca9-92b7-3271d288b9f3\",\n id: \"55b7fff1-6579-4ca9-92b7-3271d288b9f3\",\n isLeaf: \"true\",\n refname: \"财务二科\"\n },\n key: \"2\"\n },\n {\n a: \"ASVAL_201903120002\",\n b: \"小红\",\n c: \"女\",\n d: {\n code: \"dept1_1\",\n entityType: \"subEntity\",\n organization_id: \"a4cf0601-51e6-4012-9967-b7a64a4b2d47\",\n name: \"财务一科\",\n pid: \"95b60f35-ed0b-454e-b948-fb45ae30b911\",\n refcode: \"dept1_1\",\n refpk: \"9711d912-3184-4063-90c5-1facc727813c\",\n id: \"9711d912-3184-4063-90c5-1facc727813c\",\n isLeaf: \"true\",\n refname: \"财务一科\"\n },\n key: \"3\"\n }\n];\n\nclass Demo0502 extends Component {\n constructor(props, context) {\n super(props);\n this.columns = [\n {\n title: \"员工编号\",\n dataIndex: \"a\",\n key: \"a\"\n },\n {\n title: \"名字\",\n dataIndex: \"b\",\n key: \"b\",\n render: (text, record, index) => (\n \n )\n },\n {\n title: \"性别\",\n dataIndex: \"c\",\n key: \"c\",\n width: 100,\n render: (text, record, index) => (\n \n )\n },\n {\n title: \"部门\",\n dataIndex: \"d\",\n key: \"d\",\n width: 215,\n render: (text, record, index) => (\n \n )\n },\n {\n key: \"placeholder\"\n }\n ];\n\n this.state = {\n dataSource: dataSource\n };\n }\n\n onCellChange = (index, key) => {\n return value => {\n const { dataSource } = this.state;\n dataSource[index][key] = value;\n this.setState({ dataSource }, () => console.dir(this.state.dataSource));\n };\n };\n\n render() {\n return (\n \n );\n }\n}\n\n\n", "desc": " 可以对单元格进行编辑的表格,示例中给出输入框、下拉框、参照的编辑模式,以及两类校验。(通过对 coloums 配置 render 属性实现渲染不同格式的编辑态单元格)", "scss_code": ".demo0502 {\n .u-table-row {\n td {\n padding: 5px 8px;\n\n input.error {\n border-color: #F44336;\n }\n }\n .editable-cell {\n height: 30px;\n }\n &-hover {\n .editable-cell-text-wrapper {\n line-height: 18px;\n border: 1px solid #c1c7d0;\n }\n }\n .u-form-control,\n .u-select-selection {\n height: 30px;\n }\n }\n\n .editable-cell-text-wrapper {\n box-sizing: border-box;\n line-height: 20px;\n border-radius: 3px;\n\n &:hover {\n line-height: 18px;\n border: 1px solid #a5adba;\n }\n }\n\n .require {\n position: absolute;\n top: 2px;\n color: #F44336;\n font-size: 20px;\n }\n}\n\n.help-tip {\n color: #F44336;\n}\n\n.tp-0502 {\n .tooltip-arrow {\n border-bottom-color: #F44336 !important;\n }\n\n .tooltip-inner {\n border-color: #F44336 !important;\n }\n}\n" }, { "example": _react2['default'].createElement(Demo0601, null), "title": " 左侧固定列", "code": "/**\n*\n* @title 左侧固定列\n* @parent 列操作-锁定 Fixed\n* @description 固定列到表格的左侧\n* demo0601\n*/\n\n\n\nimport React, { Component } from 'react';\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n {\n title: \"序号\",\n dataIndex: \"index\",\n key: \"index\",\n width: 80, \n fixed: 'left',\n render(text, record, index){return index + 1}\n },\n {\n title: \"订单编号\",\n dataIndex: \"orderCode\",\n key: \"orderCode\",\n width: 100, \n fixed: 'left',\n },\n {\n title: \"供应商名称\",\n dataIndex: \"supplierName\",\n key: \"supplierName\",\n width: 100\n },\n {\n title: \"类型\",\n dataIndex: \"type_name\",\n key: \"type_name\",\n width: 100\n },\n {\n title: \"采购组织\",\n dataIndex: \"purchasing\",\n key: \"purchasing\",\n width: 100\n },\n {\n title: \"采购组\",\n dataIndex: \"purchasingGroup\",\n key: \"purchasingGroup\",\n width: 100\n },\n {\n title: \"凭证日期\",\n dataIndex: \"voucherDate\",\n key: \"voucherDate\",\n width: 200,\n \n },\n {\n title: \"审批状态\",\n dataIndex: \"approvalState_name\",\n key: \"approvalState_name\",\n width: 100\n },\n {\n title: \"确认状态\",\n dataIndex: \"confirmState_name\",\n key: \"confirmState_name\",\n width: 100\n }, \n {\n title: \"关闭状态\",\n dataIndex: \"closeState_name\",\n key: \"closeState_name\",\n width: 100\n }\n];\n\nconst data = [\n { \n orderCode:\"NU0391025\", \n supplierName: \"xx供应商\",\n type_name: \"1\",\n purchasing:'组织c', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年03月18日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"执行中\",\n closeState_name:\"未关闭\",\n key: \"1\"\n }, \n { \n orderCode:\"NU0391026\", \n supplierName: \"xx供应商\",\n type_name: \"2\",\n purchasing:'组织a', \n purchasingGroup:\"bb\",\n voucherDate:\"2018年02月05日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"待确认\",\n closeState_name:\"未关闭\",\n key: \"2\"\n },\n { \n orderCode:\"NU0391027\", \n supplierName: \"xx供应商\",\n type_name: \"3\",\n purchasing:'组织b', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年07月01日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"终止\",\n closeState_name:\"已关闭\",\n key: \"3\"\n }\n];\n\nclass Demo51 extends Component {\n render() {\n return ;\n }\n}\n\n", "desc": " 固定列到表格的左侧" }, { "example": _react2['default'].createElement(Demo0602, null), "title": " 右侧固定列", "code": "/**\n*\n* @title 右侧固定列\n* @parent 列操作-锁定 Fixed\n* @description 固定列到表格的右侧\n* demo0602\n*/\n\n\n\nimport React, { Component } from 'react';\nimport {Popconfirm} from 'tinper-bee';\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n {\n title: \"序号\",\n dataIndex: \"index\",\n key: \"index\",\n width: 80, \n render(text, record, index){return index + 1}\n },\n {\n title: \"订单编号\",\n dataIndex: \"orderCode\",\n key: \"orderCode\",\n width: 100, \n },\n {\n title: \"供应商名称\",\n dataIndex: \"supplierName\",\n key: \"supplierName\",\n width: 100\n },\n {\n title: \"类型\",\n dataIndex: \"type_name\",\n key: \"type_name\",\n width: 100\n },\n {\n title: \"采购组织\",\n dataIndex: \"purchasing\",\n key: \"purchasing\",\n width: 100\n },\n {\n title: \"采购组\",\n dataIndex: \"purchasingGroup\",\n key: \"purchasingGroup\",\n width: 100\n },\n {\n title: \"凭证日期\",\n dataIndex: \"voucherDate\",\n key: \"voucherDate\",\n width: 200,\n \n },\n {\n title: \"审批状态\",\n dataIndex: \"approvalState_name\",\n key: \"approvalState_name\",\n width: 100\n },\n {\n title: \"确认状态\",\n dataIndex: \"confirmState_name\",\n key: \"confirmState_name\",\n width: 100\n }, \n {\n title: \"关闭状态\",\n dataIndex: \"closeState_name\",\n key: \"closeState_name\",\n width: 100\n },\n {\n title: \"操作\",\n dataIndex: \"d\",\n key: \"d\",\n width:100,\n fixed: \"right\",\n render(text, record, index) {\n return (\n \n )\n }\n }\n];\n\nconst data = [\n { \n orderCode:\"NU0391025\", \n supplierName: \"xx供应商\",\n type_name: \"1\",\n purchasing:'组织c', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年03月18日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"执行中\",\n closeState_name:\"未关闭\",\n key: \"1\"\n }, \n { \n orderCode:\"NU0391026\", \n supplierName: \"xx供应商\",\n type_name: \"2\",\n purchasing:'组织a', \n purchasingGroup:\"bb\",\n voucherDate:\"2018年02月05日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"待确认\",\n closeState_name:\"未关闭\",\n key: \"2\"\n },\n { \n orderCode:\"NU0391027\", \n supplierName: \"xx供应商\",\n type_name: \"3\",\n purchasing:'组织b', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年07月01日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"终止\",\n closeState_name:\"已关闭\",\n key: \"3\"\n }\n];\n\nclass Demo52 extends Component {\n render() {\n return ;\n }\n}\n\n", "desc": " 固定列到表格的右侧" }, { "example": _react2['default'].createElement(Demo0603, null), "title": " 动态设置列锁定、解除锁定", "code": "/**\n*\n* @title 动态设置列锁定、解除锁定\n* @parent 列操作-锁定 Fixed\n* @description 动态设置columns中数据的fixed属性值【fixed: \"left\",fixed: \"right\"】。\n* demo0603\n*/\nimport React, { Component } from 'react';\nimport {Icon,Menu,Dropdown} from \"tinper-bee\";\n\nimport { Table } from 'tinper-bee';\n\nconst { Item } = Menu;\n\nconst columns = [\n {\n title: \"序号\",\n dataIndex: \"index\",\n key: \"index\",\n width: 80, \n fixed: 'left',\n render(text, record, index){return index + 1}\n },\n {\n title: \"订单编号\",\n dataIndex: \"orderCode\",\n key: \"orderCode\",\n width: 100, \n fixed: 'left',\n },\n {\n title: \"供应商名称\",\n dataIndex: \"supplierName\",\n key: \"supplierName\",\n width: 150\n },\n {\n title: \"类型\",\n dataIndex: \"type_name\",\n key: \"type_name\",\n width: 100\n },\n {\n title: \"采购组织\",\n dataIndex: \"purchasing\",\n key: \"purchasing\",\n width: 100\n },\n {\n title: \"采购组\",\n dataIndex: \"purchasingGroup\",\n key: \"purchasingGroup\",\n width: 100\n },\n {\n title: \"凭证日期\",\n dataIndex: \"voucherDate\",\n key: \"voucherDate\",\n width: 200,\n \n },\n {\n title: \"审批状态\",\n dataIndex: \"approvalState_name\",\n key: \"approvalState_name\",\n width: 100\n },\n {\n title: \"确认状态\",\n dataIndex: \"confirmState_name\",\n key: \"confirmState_name\",\n width: 100\n }, \n {\n title: \"关闭状态\",\n dataIndex: \"closeState_name\",\n key: \"closeState_name\",\n width: 100\n }\n];\n\nconst data = [\n { \n orderCode:\"NU0391025\", \n supplierName: \"xx供应商\",\n type_name: \"1\",\n purchasing:'组织c', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年03月18日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"执行中\",\n closeState_name:\"未关闭\",\n key: \"1\"\n }, \n { \n orderCode:\"NU0391026\", \n supplierName: \"xx供应商\",\n type_name: \"2\",\n purchasing:'组织a', \n purchasingGroup:\"bb\",\n voucherDate:\"2018年02月05日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"待确认\",\n closeState_name:\"未关闭\",\n key: \"2\"\n },\n { \n orderCode:\"NU0391027\", \n supplierName: \"xx供应商\",\n type_name: \"3\",\n purchasing:'组织b', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年07月01日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"终止\",\n closeState_name:\"已关闭\",\n key: \"3\"\n }\n];\n \nclass Demo24 extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n columns:columns\n }\n }\n \n onSelect = ({key,item})=>{ \n console.log(`${key} selected`); //获取key\n let currentObject = item.props.data; //获取选中对象的数据\n let {columns} = this.state;\n let fixedCols = [];\n let nonColums = [];\n columns.find(da=>{\n if(da.key == key){\n da.fixed?delete da.fixed:da.fixed = 'left';\n }\n da.fixed?fixedCols.push(da):nonColums.push(da);\n });\n \n columns = [...fixedCols,...nonColums]\n\n this.setState({\n columns\n });\n }\n //表头增加下拉菜单\n renderColumnsDropdown(columns) {\n const icon ='uf-arrow-down';\n \n return columns.map((originColumn,index) => {\n let column = Object.assign({}, originColumn);\n let menuInfo = [], title='锁定';\n if(originColumn.fixed){\n title = '解锁'\n }\n menuInfo.push({\n info:title,\n key:originColumn.key,\n index:index\n });\n const menu = (\n )\n column.title = (\n \n {column.title}\n \n \n \n \n \n );\n return column;\n });\n \n }\n\n render() {\n let {columns} = this.state;\n columns = this.renderColumnsDropdown(columns);\n return(\n \n )\n }\n}\n\n", "desc": " 动态设置columns中数据的fixed属性值【fixed: \"left\",fixed: \"right\"】。", "scss_code": "th{\n .drop-menu{\n .uf{\n font-size: 12px;\n visibility: hidden;\n margin-left: 15px;\n }\n \n \n }\n &:hover{\n .uf{\n visibility: visible;\n }\n }\n\n}\n\n" }, { "example": _react2['default'].createElement(Demo0701, null), "title": " 按条件、值过滤", "code": "/**\n*\n* @title 按条件、值过滤\n* @parent 列操作-过滤 Filter\n* @description 可以根据输入项目以及判断条件对表格内的数据进行过滤。可在控制台查看序列化后的参数字符串。\n* demo0701\n*/\n\nimport React, { Component } from 'react';\nimport { Table } from 'tinper-bee';\n\nconst columns26 = [\n { title: \"姓名\", width: 180, dataIndex: \"name\", key: \"name\", filterType: \"text\", filterDropdown: \"show\" },\n { title: \"年龄\", width: 150, dataIndex: \"age\", key: \"age\", filterType: \"dropdown\", filterDropdown: \"show\" },\n { title: \"日期\", width: 200, dataIndex: \"date\", key: \"date\", filterType: \"date\", filterDropdown: \"show\", format: \"YYYY-MM-DD\" },\n { title: \"居住地址\", width: 150, dataIndex: \"address\", key: \"address\", filterType: \"dropdown\", filterDropdown: \"show\" },\n { title: \"备注\", dataIndex: \"mark\", key: \"mark\" }\n];\n\nconst data26 = [\n {\n key: \"1\",\n name: \"John Brown\",\n age: 32,\n date: \"2018-09-19\",\n address: \"朝阳区\",\n mark: \"无\"\n },\n {\n key: \"2\",\n name: \"Jim Green\",\n age: 40,\n date: \"2018-09-18\",\n address: \"朝阳区\",\n mark: \"无\"\n },\n {\n key: \"3\",\n name: \"Jim Green\",\n age: 40,\n date: \"2018-09-18\",\n address: \"东城区\",\n mark: \"无\"\n },\n {\n key: \"4\",\n name: \"Jim Green\",\n age: 40,\n date: \"2018-09-18\",\n address: \"东城区\",\n mark: \"无\"\n }, {\n key: \"5\",\n name: \"John Brown\",\n age: 32,\n date: \"2018-09-18\",\n address: \"海淀区\",\n mark: \"无\"\n },\n {\n key: \"6\",\n name: \"Jim Green\",\n age: 48,\n date: \"2018-09-18\",\n address: \"海淀区\",\n mark: \"无\"\n },\n {\n key: \"7\",\n name: \"Jim Green\",\n age: 40,\n date: \"2018-09-18\",\n address: \"海淀区\",\n mark: \"无\"\n },\n {\n key: \"8\",\n name: \"Jim Green\",\n age: 38,\n date: \"2018-09-18\",\n address: \"海淀区\",\n mark: \"无\"\n }\n];\n\nclass Demo26 extends Component {\n handlerFilterChange = (key, val, condition) => {\n console.log('参数:key=', key, ' value=', val, 'condition=', condition);\n }\n\n handlerFilterClear = (key) => {\n console.log('清除条件', key);\n }\n render() {\n return ()\n onFilterClear={this.handlerFilterClear}//触发输入操作以及其他的回调(key,val)=>()\n filterDelay={500}//输入文本多少ms触发回调函数,默认300ms\n filterable={true}//是否开启过滤数据功能\n bordered\n columns={columns26}\n data={data26} />;\n }\n}\n\n", "desc": " 可以根据输入项目以及判断条件对表格内的数据进行过滤。可在控制台查看序列化后的参数字符串。" }, { "example": _react2['default'].createElement(Demo0702, null), "title": " 复杂表格中行过滤", "code": "/**\n*\n* @title 复杂表格中行过滤\n* @parent 列操作-过滤 Filter\n* @description 在过滤数据行的基础上增加列拖拽、动态菜单显示、下拉条件动态传入自定义等\n* demo0702\n*/\n\n/**\n * @description \n */\n\nimport React, { Component } from 'react';\nimport {Icon,Checkbox,Dropdown,Menu} from \"tinper-bee\";\n\nimport { Table } from 'tinper-bee';\nimport multiSelect from \"tinper-bee/lib/multiSelect\";;\nimport sort from \"tinper-bee/lib/sort\";;\n\nconst SubMenu = Menu.SubMenu;\nconst MenuItemGroup = Menu.ItemGroup;\n\nconst data27 = [\n {\n key: \"1\",\n name: \"John Brown\",\n age: 32,\n date: \"2018-09-19\",\n address: \"朝阳区\",\n mark: \"无\"\n },\n {\n key: \"2\",\n name: \"Jim Green\",\n age: 40,\n date: \"2018-09-18\",\n address: \"朝阳区\",\n mark: \"无\"\n },\n {\n key: \"3\",\n name: \"Jim Green\",\n age: 40,\n date: \"2018-09-18\",\n address: \"东城区\",\n mark: \"无\"\n },\n {\n key: \"4\",\n name: \"Jim Green\",\n age: 40,\n date: \"2018-09-18\",\n address: \"东城区\",\n mark: \"无\"\n }, {\n key: \"5\",\n name: \"John Brown\",\n age: 32,\n date: \"2018-09-18\",\n address: \"海淀区\",\n mark: \"无\"\n },\n {\n key: \"6\",\n name: \"Jim Green\",\n age: 48,\n date: \"2018-09-18\",\n address: \"海淀区\",\n mark: \"无\"\n },\n {\n key: \"7\",\n name: \"Jim Green\",\n age: 40,\n date: \"2018-09-18\",\n address: \"海淀区\",\n mark: \"无\"\n },\n {\n key: \"8\",\n name: \"Jim Green\",\n age: 38,\n date: \"2018-09-18\",\n address: \"海淀区\",\n mark: \"无\"\n }\n];\n\n\nconst MultiSelectTable = multiSelect(Table, Checkbox);\nconst ComplexTable = sort(MultiSelectTable, Icon);\nclass Demo27 extends Component {\n constructor(props) {\n super(props);\n this.state = {\n dropdownvalue: []\n }\n }\n handlerFilterChange = (key, val, condition) => {\n console.log('参数:key=', key, ' value=', val, 'condition=', condition);\n }\n\n handlerFilterClear = (key) => {\n console.log('清除条件', key);\n }\n getSelectedDataFunc = data => {\n console.log(data);\n }\n onClick = (item) => {\n console.log(item);\n }\n\n render() {\n const menu1 = (\n )\n let multiObj = {\n type: \"checkbox\"\n };\n let columns27 = [\n {\n title: \"\", width: 40, dataIndex: \"key\", key: \"key\", render: (text, record, index) => {\n return \n \n \n }\n },\n {\n title: \"姓名\",\n width: 180,\n dataIndex: \"name\",\n key: \"name\",\n filterType: \"text\",//输入框类型\n filterDropdown: \"show\",//显示条件\n filterDropdownType: \"string\"//字符条件\n },\n {\n title: \"年龄\",\n width: 180,\n dataIndex: \"age\",\n key: \"age\",\n filterType: \"number\",//输入框类型\n filterDropdown: \"show\",//显示条件\n filterDropdownType: \"number\"//字符条件\n },\n {\n title: \"日期\",\n width: 190,\n dataIndex: \"date\",\n key: \"date\",\n filterType: \"date\",//输入框类型\n filterDropdown: \"show\",//显示条件\n filterDropdownType: \"string\"//字符条件\n },\n {\n title: \"时间范围\",\n width: 290,\n dataIndex: \"mark\",\n key: \"mark\",\n filterType: \"daterange\",//输入框类型\n filterDropdown: \"show\",//显示条件\n filterDropdownType: \"number\"//字符条件\n },\n {\n title: \"地址\",\n width: 100,\n dataIndex: \"address\",\n key: \"address\",\n filterType: \"dropdown\",//输入框类型\n filterDropdown: \"show\",//显示条件\n filterDropdownType: \"number\"//字符条件\n }\n ];\n return ()\n onFilterClear={this.handlerFilterClear}//触发输入操作以及其他的回调(key,val)=>()\n filterDelay={500}//输入文本多少ms触发回调函数,默认500ms\n filterable={true}//是否开启过滤数据功能\n getSelectedDataFunc={this.getSelectedDataFunc}\n bordered\n multiSelect={multiObj}\n columns={columns27}\n data={data27} />;\n }\n}\n\n", "desc": " 在过滤数据行的基础上增加列拖拽、动态菜单显示、下拉条件动态传入自定义等" }, { "example": _react2['default'].createElement(Demo0802, null), "title": " 列过滤面板", "code": "/**\n*\n* @title 列过滤面板\n* @parent 列操作-隐藏 Hide\n* @description 点击表头右侧按钮,设置显示或隐藏表格列。可以自定义设置显示某列,通过ifshow属性控制,默认值为true(显示表格所有列)。afterFilter方法为列过滤后触发的回调函数。\n* demo0802\n*/\n\n\nimport React, { Component } from 'react';\nimport {Icon,Popover} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\nimport filterColumn from \"tinper-bee/lib/filterColumn\";;\nimport sum from \"tinper-bee/lib/sum\";;\n\nconst data = [\n { \n orderCode:\"NU0391025\", \n supplierName: \"xx供应商\",\n type_name: \"1\",\n purchasing:'组织c', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年03月18日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"执行中\",\n closeState_name:\"未关闭\",\n key: \"1\"\n }, \n { \n orderCode:\"NU0391026\", \n supplierName: \"xx供应商\",\n type_name: \"2\",\n purchasing:'组织a', \n purchasingGroup:\"bb\",\n voucherDate:\"2018年02月05日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"待确认\",\n closeState_name:\"未关闭\",\n key: \"2\"\n },\n { \n orderCode:\"NU0391027\", \n supplierName: \"xx供应商\",\n type_name: \"3\",\n purchasing:'组织b', \n purchasingGroup:\"aa\",\n voucherDate:\"2018年07月01日\",\n approvalState_name:\"已审批\",\n confirmState_name:\"终止\",\n closeState_name:\"已关闭\",\n key: \"3\"\n }\n];\n\nconst FilterColumnTable = filterColumn(Table, Popover, Icon);\n\nconst defaultProps21 = {\n prefixCls: \"bee-table\"\n};\n\nclass Demo21 extends Component {\n constructor(props) {\n super(props);\n this.state ={\n columns: [\n {\n title: \"序号\",\n dataIndex: \"index\",\n key: \"index\",\n width: 80, \n fixed: 'left',\n render(text, record, index){return index + 1}\n },\n {\n title: \"订单编号\",\n dataIndex: \"orderCode\",\n key: \"orderCode\",\n width: 100, \n fixed: 'left',\n },\n {\n title: \"供应商名称\",\n dataIndex: \"supplierName\",\n key: \"supplierName\",\n width: 150\n },\n {\n title: \"类型\",\n dataIndex: \"type_name\",\n key: \"type_name\",\n width: 100\n },\n {\n title: \"采购组织\",\n dataIndex: \"purchasing\",\n key: \"purchasing\",\n width: 100\n },\n ]};\n }\n afterFilter = (optData,columns)=>{\n if(optData.key == 'b'){\n if(optData.ifshow){\n columns[2].ifshow = false;\n }else{\n columns[2].ifshow = true;\n }\n this.setState({\n columns21 :columns,\n showFilterPopover:true\n });\n }\n \n }\n \n render() {\n return ;\n }\n}\n\nDemo21.defaultProps = defaultProps21;\n", "desc": " 点击表头右侧按钮,设置显示或隐藏表格列。可以自定义设置显示某列,通过ifshow属性控制,默认值为true(显示表格所有列)。afterFilter方法为列过滤后触发的回调函数。" }, { "example": _react2['default'].createElement(Demo0901, null), "title": " 列排序", "code": "/**\n* @title 列排序\n* @parent 列操作-排序 Sort\n* @description column中增加sorter: (a, b) => a.c - b.c 这里的a,b代表前后两个数据,c代表比较当前对象的字段名称\n* demo0901\n*/\n\n\nimport React, { Component } from 'react';\nimport {Icon} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\nimport sort from \"tinper-bee/lib/sort.js\";;\n\nlet ComplexTable = sort(Table, Icon);\nconst columns11 = [\n {\n title: \"单据编号\",\n dataIndex: \"num\",\n key: \"num\",\n width: 120,\n fixed: \"left\"\n },\n {\n title: \"单据日期\",\n dataIndex: \"date\",\n key: \"date\",\n width: 200,\n },\n {\n title: \"供应商\",\n dataIndex: \"supplier\",\n key: \"supplier\",\n width: 100\n },\n {\n title: \"联系人\",\n dataIndex: \"contact\",\n key: \"contact\",\n },\n {\n title: \"整单数量\",\n dataIndex: \"total\",\n key: \"total\",\n width: 150,\n sorter: (a, b) => a.total - b.total\n }\n];\n\nconst data11 = [\n { num: \"NU0391001\", date: \"2019-03-01\", supplier: 'xx供应商',contact:'Tom', total:30 ,key: \"1\" },\n { num: \"NU0391002\", date: \"2018-11-02\", supplier: 'yy供应商',contact:'Jack', total:41 ,key: \"2\" },\n { num: \"NU0391003\", date: \"2019-05-03\", supplier: 'zz供应商',contact:'Jane', total:25 ,key: \"3\" }\n];\n\nconst defaultProps11 = {\n prefixCls: \"bee-table\"\n};\nclass Demo11 extends Component {\n constructor(props) {\n super(props);\n this.state = {\n sortOrder: \"\",\n data: data11\n };\n }\n render() {\n\n return ;\n }\n}\nDemo11.defaultProps = defaultProps11;\n\n\n", "desc": " column中增加sorter: (a, b) => a.c - b.c 这里的a,b代表前后两个数据,c代表比较当前对象的字段名称" }, { "example": _react2['default'].createElement(Demo0902, null), "title": " 后端列排序", "code": "/**\n* @title 后端列排序\n* @parent 列操作-排序 Sort\n* @description 可在控制台中查看序列化后的参数字符串,将参数传递给后端即可进行列排序\n* demo0902\n*/\n\n\nimport React, { Component } from 'react';\nimport {Icon} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\nimport sort from \"tinper-bee/lib/sort.js\";;\nlet ComplexTable = sort(Table, Icon);\n\n// const columns11 = [\n// {\n// title: \"名字\",\n// dataIndex: \"a\",\n// key: \"a\",\n// width: 100\n// },\n// {\n// title: \"性别\",\n// dataIndex: \"b\",\n// key: \"b\",\n// width: 100\n// },\n// {\n// title: \"年龄\",\n// dataIndex: \"c\",\n// key: \"c\",\n// width: 200,\n// sorter: (a, b) => a.c - b.c\n// },\n// {\n// title: \"武功级别\",\n// dataIndex: \"d\",\n// key: \"d\"\n// },\n// {\n// title: \"分数\",\n// dataIndex: \"e\",\n// key: \"e\",\n// sorter: (a, b) => a.c - b.c\n// },\n// ];\n\n// const data11 = [\n// { a: \"杨过\", b: \"男\", c: 30,d:'内行', e:139,key: \"2\" },\n// { a: \"令狐冲\", b: \"男\", c: 41,d:'大侠', e:109, key: \"1\" },\n// { a: \"郭靖\", b: \"男\", c: 25,d:'大侠', e:159, key: \"3\" }\n// ];\nconst columns11 = [\n {\n title: \"单据编号\",\n dataIndex: \"num\",\n key: \"num\",\n width: 120,\n fixed: \"left\"\n },\n {\n title: \"单据日期\",\n dataIndex: \"date\",\n key: \"date\",\n width: 200,\n },\n {\n title: \"供应商\",\n dataIndex: \"supplier\",\n key: \"supplier\",\n width: 100\n },\n {\n title: \"联系人\",\n dataIndex: \"contact\",\n key: \"contact\",\n },\n {\n title: \"整单数量\",\n dataIndex: \"total\",\n key: \"total\",\n width: 150,\n sorter: (a, b) => a.total - b.total\n },\n {\n title: \"金额\",\n dataIndex: \"money\",\n key: \"money\",\n width: 100,\n sorter: (a, b) => a.money - b.money\n }\n];\n\nconst data11 = [\n { num: \"NU0391001\", date: \"2019-03-01\", supplier: 'xx供应商',contact:'Tom', total:30 ,money: 100,key: \"1\" },\n { num: \"NU0391002\", date: \"2018-11-02\", supplier: 'yy供应商',contact:'Jack', total:41 ,money: 50,key: \"2\" },\n { num: \"NU0391003\", date: \"2019-05-03\", supplier: 'zz供应商',contact:'Jane', total:25 ,money: 200,key: \"3\" }\n];\n\nconst defaultProps = {\n prefixCls: \"bee-table\"\n};\nclass Demo28 extends Component {\n constructor(props) {\n super(props);\n this.state = {\n sortOrder: \"\",\n data: data11\n };\n }\n /**\n * 后端获取数据\n */\n sortFun = (sortParam)=>{\n console.info(sortParam);\n //将参数传递给后端排序\n }\n render() {\n let sortObj = {\n mode:'multiple',\n backSource:true,\n sortFun:this.sortFun\n }\n return ;\n }\n}\nDemo28.defaultProps = defaultProps;\n\n\n", "desc": " 可在控制台中查看序列化后的参数字符串,将参数传递给后端即可进行列排序" }, { "example": _react2['default'].createElement(Demo0903, null), "title": " 多列排序", "code": "/**\n *\n * @title 多列排序\n * @parent 列操作-排序 Sort\n * @description 结合多列排序、全选功能、合计功能的表格示例。新增排序后触发的回调函数sorterClick。\n * demo0903\n */\n\nimport React, { Component } from \"react\";\nimport {Checkbox,Button,Icon} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\nimport multiSelect from \"tinper-bee/lib/multiSelect.js\";;\nimport sort from \"tinper-bee/lib/sort.js\";;\nimport sum from \"tinper-bee/lib/sum.js\";;\n\nconst columns13 = [\n {\n title: \"订单编号\",\n dataIndex: \"a\",\n key: \"a\",\n className:'dfasd',\n width: 200\n },\n {\n title: \"金额\",\n dataIndex: \"b\",\n key: \"b\",\n width: 200,\n sumCol: true,\n sorter: (a, b) => a.c - b.c,\n sorterClick:(data,type)=>{//排序的回调函数\n //type value is up or down\n console.log(\"data\",data);\n }\n },\n {\n title: \"整单数量\",\n dataIndex: \"c\",\n key: \"c\",\n width: 200,\n sumCol: true,\n sorter: (a, b) => a.c - b.c,\n sorterClick:(data,type)=>{//排序的回调函数\n //type value is up or down\n console.log(\"data\",data);\n }\n },\n {\n title: \"日销售量\",\n dataIndex: \"e\",\n key: \"e\",\n width: 200,\n sumCol: true,\n sorter: (a, b) => a.c - b.c,\n },\n {\n title: \"供应商\",\n dataIndex: \"d\",\n key: \"d\",\n width: 200\n }\n];\n\nconst data13 = [\n { a: \"NU0391001\", b: 675, c: 30, d: \"xx供应商\",e:100, key: \"2\" },\n { a: \"NU0391002\", b: 43, c: 41, d: \"yy供应商\",e:90, key: \"1\" },\n { a: \"NU0391003\", b: 43, c: 81, d: \"zz供应商\", e:120,key: \"4\" },\n { a: \"NU0391004\", b: 43, c: 81, d: \"aa供应商\", e:130,key: \"5\" },\n { a: \"NU0391005\", b: 153, c: 25, d: \"bb供应商\",e:90, key: \"3\" }\n];\n\n\n//拼接成复杂功能的table组件不能在render中定义,需要像此例子声明在组件的外侧,不然操作state会导致功能出现异常\nlet ComplexTable = multiSelect(sort(sum(Table, Icon)), Checkbox);\n\nclass Demo13 extends Component {\n constructor(props) {\n super(props);\n this.state = {\n data13: data13,\n selectedRow: this.selectedRow,\n selectDisabled: this.selectDisabled\n };\n }\n getSelectedDataFunc = data => {\n console.log(data);\n };\n selectDisabled = (record, index) => {\n // console.log(record);\n if (index === 1) {\n return true;\n }\n return false;\n };\n selectedRow = (record, index) => {\n // console.log(record);\n if (index === 0) {\n return true;\n }\n return false;\n };\n onClick = () => {\n this.setState({\n selectedRow: function() {}\n });\n };\n\n render() {\n let multiObj = {\n type: \"checkbox\"\n };\n let sortObj = {\n mode:'multiple'\n }\n \n return (\n \n \n \n
\n );\n }\n}\n", "desc": " 结合多列排序、全选功能、合计功能的表格示例。新增排序后触发的回调函数sorterClick。" }, { "example": _react2['default'].createElement(Demo1001, null), "title": " 拖拽改变列顺序", "code": "/**\n*\n* @title 拖拽改变列顺序\n* @parent 列操作-拖拽 Drag\n* @description 点击选择表头并左右拖拽,可以改变表格列顺序。onDrop方法是拖拽交换列后触发的回调函数。注意:固定列不可以交换。\n* demo1001\n*/\nimport React, { Component } from 'react';\nimport {Icon} from \"tinper-bee\";\n\nimport { Table } from 'tinper-bee'; \nimport dragColumn from \"tinper-bee/lib/dragColumn\";;\n\nconst columns = [\n {\n title: \"订单编号\",\n dataIndex: \"a\",\n key: \"a\",\n width: 100\n },\n {\n title: \"单据日期\",\n dataIndex: \"b\",\n key: \"b\",\n width: 200\n },\n {\n title: \"供应商\",\n dataIndex: \"c\",\n key: \"c\",\n width: 200,\n sumCol: true,\n sorter: (a, b) => a.c - b.c\n },\n {\n title: \"联系人\",\n dataIndex: \"d\",\n key: \"d\",\n width: 200,\n }\n];\n\nconst data = [\n { a: \"NU0391001\", b: \"2019-03-01\", c: 'xx供应商',d:'Tom', key: \"2\" },\n { a: \"NU0391002\", b: \"2018-11-02\", c: 'yy供应商',d:'Jack', key: \"1\" },\n { a: \"NU0391003\", b: \"2019-05-03\", c: 'zz供应商',d:'Jane', key: \"3\" }\n];\n\nconst DragColumnTable = dragColumn(Table);\n\nconst defaultProps22 = {\n prefixCls: \"bee-table\"\n};\n\nclass Demo22 extends Component {\n constructor(props) {\n super(props); \n }\n \n render() {\n return {\n console.log(\"--拖拽交换列后触发事件\");\n console.log(\"event.target:\",event.target);\n console.log(\"data:\",data);\n console.log(\"拖拽完成后的columns:\",columns);\n }}\n />;\n }\n}\n\nDemo22.defaultProps = defaultProps22;\n", "desc": " 点击选择表头并左右拖拽,可以改变表格列顺序。onDrop方法是拖拽交换列后触发的回调函数。注意:固定列不可以交换。" }, { "example": _react2['default'].createElement(Demo1002, null), "title": " 拖拽改变列宽度", "code": "/**\n*\n* @title 拖拽改变列宽度\n* @parent 列操作-拖拽 Drag\n* @description onDropBorder方法为调整列宽后触发的回调函数。注:不支持tree结构的表头、合并表头的table。\n* demo1002\n*/\nimport React, { Component } from 'react';\nimport {Icon} from \"tinper-bee\";\n\nimport { Table } from 'tinper-bee'; \nimport dragColumn from \"tinper-bee/lib/dragColumn\";;\n\nconst columns23 = [\n {\n title: \"订单编号\",\n dataIndex: \"a\",\n key: \"a\",\n width: '200',\n fixed:'left'\n },\n {\n title: \"单据日期\",\n dataIndex: \"b\",\n key: \"b\",\n width: '600'\n },\n {\n title: \"供应商\",\n dataIndex: \"c\",\n key: \"c\",\n width: '200',\n }, \n {\n title: \"联系人\",\n dataIndex: \"d\",\n key: \"d\",\n width: 500,\n }\n];\n\nconst data23 = [\n { a: \"NU0391001\", b: \"2019-03-01\", c: \"xx供应商\",d:'Tom', key: \"2\" },\n { a: \"NU0391002\", b: \"2018-11-02\", c: \"yy供应商\",d:'Jack', key: \"1\" },\n { a: \"NU0391003\", b: \"2019-05-03\", c: \"zz供应商\",d:'Jane', key: \"3\" }\n];\n\nconst DragColumnTable = dragColumn(Table);\n\nconst defaultProps23 = {\n prefixCls: \"bee-table\"\n};\n\nclass Demo23 extends Component {\n constructor(props) {\n super(props); \n }\n\n render() {\n return {\n console.log(width+\"--调整列宽后触发事件\",e.target);\n }}\n />;\n }\n}\nDemo23.defaultProps = defaultProps23;\n\n\n", "desc": " onDropBorder方法为调整列宽后触发的回调函数。注:不支持tree结构的表头、合并表头的table。" }, { "example": _react2['default'].createElement(Demo1101, null), "title": " 嵌套子表格", "code": "/**\n*\n* @title 嵌套子表格\n* @parent 扩展行 Expanded Row\n* @description 通过expandedRowRender参数来实现子表格\n* demo1101\n*/\n\nimport React, { Component } from \"react\";\nimport { Popconfirm } from 'tinper-bee';\nimport { Table } from 'tinper-bee';\nimport dragColumn from \"tinper-bee/lib/dragColumn\";;\nconst DragColumnTable = dragColumn(Table);\nconst columns16 = [\n {\n title: \"操作\",\n dataIndex: \"d\",\n key: \"d\", \n width:200,\n render(text, record, index) {\n return (\n \n \n 一些操作\n \n \n );\n }\n },\n { title: \"订单编号\", dataIndex: \"a\", key: \"a\", width: 250 },\n { id: \"123\", title: \"单据日期\", dataIndex: \"b\", key: \"b\", width: 100 },\n { title: \"供应商\", dataIndex: \"c\", key: \"c\", width: 200 },\n \n];\nconst columns17 = [\n {\n title: \"操作\",\n dataIndex: \"d\",\n key: \"d\",\n width:200,\n render(text, record, index) {\n return (\n \n \n 一些操作\n \n \n );\n }\n },\n { title: \"订单编号\", dataIndex: \"a\", key: \"a\", width: 100 },\n { id: \"123\", title: \"单据日期\", dataIndex: \"b\", key: \"b\", width: 100 },\n { title: \"供应商\", dataIndex: \"c\", key: \"c\", width: 200 },\n \n];\n\nconst data16 = [\n { a: \"NU0391001\", b: \"2019-03-01\", c: \"xx供应商\", d: \"操作\", key: \"1\" },\n { a: \"NU0391002\", b: \"2018-11-02\", c: \"yy供应商\", d: \"操作\", key: \"2\" },\n { a: \"NU0391003\", b: \"2019-05-03\", c: \"zz供应商\", d: \"操作\", key: \"3\" }\n];\n\n\nclass Demo16 extends Component {\n constructor(props){\n super(props);\n this.state={\n data_obj:{}\n }\n }\n expandedRowRender = (record, index, indent) => {\n let height = 42 * (this.state.data_obj[record.key].length+ 2);\n \n return (\n \n );\n };\n getData=(expanded, record)=>{\n //当点击展开的时候才去请求数据\n let new_obj = Object.assign({},this.state.data_obj);\n if(expanded){\n if(record.key==='1'){\n new_obj[record.key] = [\n { a: \"NU0391056\", b: \"2019-03-01\", c: \"gys1\", d: \"操作\", key: \"1\" },\n { a: \"NU0391057\", b: \"2018-11-02\", c: \"gys2\", d: \"操作\", key: \"2\" },\n ]\n this.setState({\n data_obj:new_obj\n })\n }else{\n new_obj[record.key] = [\n { a: \"NU0391079\", b: \"2019-04-17\", c: \"gys5\", d: \"操作\", key: \"3\" },\n ]\n this.setState({\n data_obj:new_obj\n })\n }\n }\n }\n haveExpandIcon=(record, index)=>{\n //控制是否显示行展开icon,该参数只有在和expandedRowRender同时使用才生效\n if(index == 0){\n return true;\n }\n return false;\n }\n render() {\n return (\n \n );\n }\n}\n\n\n", "desc": " 通过expandedRowRender参数来实现子表格" }, { "example": _react2['default'].createElement(Demo1102, null), "title": " 树型表格数据展示", "code": "/**\n*\n* @title 树型表格数据展示\n* @parent 扩展行 Expanded Row\n* @description 通过在data中配置children数据,来自动生成树形表格\n* demo1102\n*/\n\n\nimport React, { Component } from 'react';\nimport { Table } from 'tinper-bee';\n\n\nconst columns4 = [\n {\n title: \"订单编号\",\n dataIndex: \"name\",\n key: \"name\",\n width: \"40%\"\n },\n {\n title: \"单据日期\",\n dataIndex: \"age\",\n key: \"age\",\n width: \"30%\"\n },\n {\n title: \"供应商\",\n dataIndex: \"address\",\n key: \"address\"\n }\n];\n\nconst data4 = [\n {\n key: 1,\n name: \"NU0391001\",\n age: \"2019-03-01\",\n address: \"供应商1\",\n children: [\n {\n key: 11,\n name: \"NU0391002\",\n age: \"2019-03-02\",\n address: \"供应商2\"\n },\n {\n key: 12,\n name: \"NU0391003\",\n age: \"2019-03-03\",\n address: \"供应商3\",\n children: [\n {\n key: 121,\n name: \"NU0391004\",\n age: \"2019-03-04\",\n address: \"供应商4\"\n }\n ]\n },\n {\n key: 13,\n name: \"NU0391005\",\n age: \"2019-03-05\",\n address: \"供应商5\",\n children: [\n {\n key: 131,\n name: \"NU0391006\",\n age: \"2019-03-06\",\n address: \"供应商6\",\n children: [\n {\n key: 1311,\n name: \"NU0391007\",\n age: \"2019-03-07\",\n address: \"供应商7\"\n },\n {\n key: 1312,\n name: \"NU0391008\",\n age: \"2019-03-08\",\n address: \"供应商8\"\n }\n ]\n }\n ]\n }\n ]\n },\n {\n key: 2,\n name: \"NU0391009\",\n age: \"2019-03-09\",\n address: \"供应商9\"\n }\n];\nclass Demo4 extends Component {\n\n constructor(props){\n super(props);\n this.state = {\n data: data4,\n factoryValue: 0,\n selectedRow: new Array(data4.length)//状态同步\n }\n }\n\n render() {\n return {\n if (this.state.selectedRow[index]) {\n return 'selected';\n } else {\n return '';\n }\n }}\n onRowClick={(record,index,indent)=>{\n let selectedRow = new Array(this.state.data.length);\n selectedRow[index] = true;\n this.setState({\n factoryValue: record,\n selectedRow: selectedRow\n });\n }}\n \n columns={columns4} data={data4} />;\n }\n}\n\n\n", "desc": " 通过在data中配置children数据,来自动生成树形表格" }, { "example": _react2['default'].createElement(Demo1103, null), "title": " 自定义表格标题、表尾、选中行颜色", "code": "/**\r\n*\r\n* @title 自定义表格标题、表尾、选中行颜色\r\n* @parent 扩展行 Expanded Row\r\n* @description 可根据业务场景设置不同的`title`和`footer`。选中行颜色可用rowClassName作为选择器自定义css样式。\r\n* demo1103\r\n*/\r\n\r\nimport React, { Component } from \"react\";\r\nimport {Button,Tooltip,} from \"tinper-bee\";\r\n\r\nimport { Table } from 'tinper-bee';\r\n\r\nconst columns = [\r\n { title: \"员工编号\", dataIndex: \"a\", key: \"a\", width: 300, className: \"rowClassName\"},\r\n { title: \"员工姓名\", dataIndex: \"b\", key: \"b\", width: 500 },\r\n { title: \"性别\", dataIndex: \"c\", key: \"c\", width: 500 },\r\n { title: \"部门\", dataIndex: \"d\", key: \"d\", width: 200 }\r\n];\r\n\r\nconst data = [\r\n { a: \"ASVAL_201903280005\", b: \"小张\", c: \"男\", d: \"财务二科\", key: \"1\" },\r\n { a: \"ASVAL_201903200004\", b: \"小明\", c: \"男\", d: \"财务一科\", key: \"2\" },\r\n { a: \"ASVAL_201903120002\", b: \"小红\", c: \"女\", d: \"财务一科\", key: \"3\" }\r\n];\r\n\r\nclass Demo26 extends Component {\r\n\r\n constructor(props){\r\n super(props);\r\n this.state = {\r\n data: data,\r\n selectedRowIndex: 0\r\n }\r\n }\r\n\r\n render() {\r\n return (\r\n {\r\n if (this.state.selectedRowIndex == index) {\r\n return 'selected';\r\n } else {\r\n return '';\r\n }\r\n }}\r\n onRowClick={(record,index,indent)=>{\r\n this.setState({ \r\n selectedRowIndex: index\r\n });\r\n }}\r\n title={currentData => 员工信息统计表
}\r\n footer={currentData => 合计: 共{data.length}条数据
}\r\n /> \r\n );\r\n }\r\n}\r\n\r\n\r\n", "desc": " 可根据业务场景设置不同的`title`和`footer`。选中行颜色可用rowClassName作为选择器自定义css样式。" }, { "example": _react2['default'].createElement(Demo1105, null), "title": " 紧凑型、宽松型", "code": "/**\n*\n* @title 紧凑型、宽松型\n* @parent 扩展行 Expanded Row\n* @description 设置`size`属性使用紧凑型表格(`sm`)或宽松型表格(`lg`)。\n* demo1105\n*/\n\nimport React, { Component } from \"react\";\nimport {Button,Tooltip,Tag} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n { title: \"订单编号\", dataIndex: \"orderNum\", key: \"orderNum\", width: 100 },\n { title: \"采购组织\", dataIndex: \"org\", key: \"org\", width: 200 },\n { title: \"供应商\", dataIndex: \"supplier\", key: \"supplier\", width: 100 },\n { title: \"订单日期\", dataIndex: \"orderDate\", key: \"orderDate\", width: 150 },\n { title: \"总数量\", dataIndex: \"quantity\", key: \"quantity\", width: 100 },\n { title: \"单据状态\", dataIndex: \"status\", key: \"status\", width: 100 },\n { title: \"提交人\", dataIndex: \"submitter\", key: \"submitter\", width: 100 },\n { title: \"单位\", dataIndex: \"unit\", key: \"unit\", width: 100 },\n { title: \"总税价合计\", dataIndex: \"sum\", key: \"sum\", width: 100 },\n];\n\nconst data = [\n { \n orderNum: \"NU0391025\", \n org: \"用友网络科技股份有限公司\", \n supplier: \"xx供应商\", \n orderDate: '2018年03月18日', \n quantity: '100.00', \n status: '错误', \n submitter: '小张', \n unit: 'pc', \n sum:'8,487.00', \n key: \"1\" \n },\n { \n orderNum: \"NU0391026\", \n org: \"用友网络科技股份有限公司\", \n supplier: \"xx供应商\", \n orderDate: '2018年02月05日', \n quantity: '91.00', \n status: '正常', \n submitter: '小红', \n unit: 'pc', \n sum:'675.00', \n key: \"2\" \n },\n { \n orderNum: \"NU0391027\", \n org: \"用友网络科技股份有限公司\", \n supplier: \"xx供应商\", \n orderDate: '2018年07月01日', \n quantity: '98.00', \n status: '异常', \n submitter: '小李', \n unit: 'pc', \n sum:'1,531.00', \n key: \"3\" \n }\n];\n\nclass Demo1 extends Component {\n render() {\n return (\n \n );\n }\n}\n\n\n", "desc": " 设置`size`属性使用紧凑型表格(`sm`)或宽松型表格(`lg`)。" }, { "example": _react2['default'].createElement(Demo1106, null), "title": " 自定义行高", "code": "/**\n*\n* @title 自定义行高\n* @parent 扩展行 Expanded Row\n* @description 设置`height`属性自定义表体行高,设置`headerHeight`属性自定义表头高度。鼠标hover行时呼出操作按钮。\n* demo1106\n*/\n\nimport React, { Component } from \"react\";\nimport {Button,Tooltip} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n { title: \"员工编号\", dataIndex: \"a\", key: \"a\", width: 300, className: \"rowClassName\"},\n { title: \"员工姓名\", dataIndex: \"b\", key: \"b\", width: 500 },\n { title: \"性别\", dataIndex: \"c\", key: \"c\", width: 500 },\n { title: \"部门\", dataIndex: \"d\", key: \"d\", width: 200 }\n];\n\nconst data = [\n { a: \"ASVAL_201903280005\", b: \"小张\", c: \"男\", d: \"财务二科\", key: \"1\" },\n { a: \"ASVAL_201903200004\", b: \"小明\", c: \"男\", d: \"财务一科\", key: \"2\" },\n { a: \"ASVAL_201903120002\", b: \"小红\", c: \"女\", d: \"财务一科\", key: \"3\" }\n];\n\nclass Demo1 extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n data: data,\n selectedRowIndex: 0\n }\n }\n handleClick = () => {\n console.log('这是第' , this.currentIndex , '行');\n console.log('内容:' , this.currentRecord);\n }\n\n onRowHover=(index,record)=>{\n this.currentIndex = index;\n this.currentRecord = record;\n }\n\n getHoverContent=()=>{\n return
\n }\n\n render() {\n return (\n {\n this.setState({\n selectedRowIndex: index\n });\n }}\n />\n\n \n );\n }\n}\n\n\n", "desc": " 设置`height`属性自定义表体行高,设置`headerHeight`属性自定义表头高度。鼠标hover行时呼出操作按钮。" }, { "example": _react2['default'].createElement(Demo1107, null), "title": " 图片在表格中的展示", "code": "/**\n*\n* @title 图片在表格中的展示\n* @parent 扩展行 Expanded Row\n* @description 根据图片高度自动撑开行高,可结合图片查看器使用 http://design.yonyoucloud.com/tinper-bee/bee-viewer, 注:如果图片在固定列中,可以使用heightConsistent属性,当此属性为true,就不会出现错行问题\n* demo1107\n*/\n\nimport React, { Component } from \"react\";\nimport {Button,Tooltip} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n {\n title: \"序号\",\n dataIndex: \"index\",\n key: \"index\",\n width: 80,\n render(text, record, index) {\n return index + 1;\n }\n },\n {\n title: \"组织部门\",\n dataIndex: \"orgDept\",\n key: \"orgDept\",\n width: 100,\n },\n {\n title: \"设施管理部门\",\n dataIndex: \"facilityManageUnit\",\n key: \"facilityManageUnit\",\n width: 150,\n },\n {\n title: \"案卷编号\",\n dataIndex: \"docketnum\",\n key: \"docketnum\",\n width: 100,\n },\n {\n title: \"数量\",\n dataIndex: \"num\",\n key: \"num\",\n width: 100,\n },\n {\n title: \"首次发现时间\",\n dataIndex: \"discoveryTime\",\n key: \"discoveryTime\",\n width: 150,\n },\n {\n title: \"实际修复时间\",\n dataIndex: \"repairTime\",\n key: \"repairTime\",\n width: 150,\n },\n {\n title: \"图样\",\n dataIndex: \"picture\",\n key: \"picture\",\n render(text, record, index) {\n return \n }\n }\n];\n\nconst data = [\n { key: \"1\", orgDept: \"组织1\", facilityManageUnit: \"部门1\", docketnum: 41, num: \"1\", discoveryTime: \"2018-10-17\", repairTime: \"2018-10-30\", picture: \"http://design.yonyoucloud.com/static/bee.tinper.org-demo/swiper-demo-1-min.jpg\"},\n { key: \"2\", orgDept: \"组织2\", facilityManageUnit: \"部门2\", docketnum: 30, num: \"2\", discoveryTime: \"2019-01-15\", repairTime: \"2019-01-20\", picture: \"http://design.yonyoucloud.com/static/bee.tinper.org-demo/swiper-demo-2-min.jpg\"},\n { key: \"3\", orgDept: \"组织3\", facilityManageUnit: \"部门3\", docketnum: 35, num: \"3\", discoveryTime: \"2019-04-10\", repairTime: \"2019-04-17\", picture: \"http://design.yonyoucloud.com/static/bee.tinper.org-demo/swiper-demo-3-min.jpg\"}\n];\n\nclass Demo105 extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n data: data,\n selectedRowIndex: 0\n }\n }\n handleClick = () => {\n console.log('这是第' , this.currentIndex , '行');\n console.log('内容:' , this.currentRecord);\n }\n\n onRowHover=(index,record)=>{\n this.currentIndex = index;\n this.currentRecord = record;\n }\n\n getHoverContent=()=>{\n return
\n }\n\n render() {\n return (\n \n );\n }\n}\n\n\n", "desc": " 根据图片高度自动撑开行高,可结合图片查看器使用 http://design.yonyoucloud.com/tinper-bee/bee-viewer, 注:如果图片在固定列中,可以使用heightConsistent属性,当此属性为true,就不会出现错行问题" }, { "example": _react2['default'].createElement(Demo1108, null), "title": " 自定义行、列合并", "code": "/**\n*\n* @title 自定义行、列合并\n* @parent 扩展行 Expanded Row\n* @description 表头只支持列合并,使用 column 里的 colSpan 进行设置。表格支持行/列合并,使用 render 里的单元格属性 colSpan 或者 rowSpan 设值为 0 时,设置的表格不会渲染。\n* demo1108\n*/\n\nimport React, { Component } from \"react\";\nimport { Table } from 'tinper-bee';\n\nconst renderContent = (value, row, index) => {\n const obj = {\n children: value,\n props: {},\n };\n if (index === 4) {\n obj.props.colSpan = 0;\n }\n return obj;\n};\n\nconst columns = [{\n title: 'Name',\n key: \"name\",\n dataIndex: 'name',\n render: (text, row, index) => {\n if (index < 4) {\n return {text};\n }\n return {\n children: {text},\n props: {\n colSpan: 5,\n },\n };\n },\n}, {\n title: 'Age',\n key: \"Age\",\n dataIndex: 'age',\n render: renderContent,\n}, {\n title: 'Home phone',\n colSpan: 2,\n key: \"tel\",\n dataIndex: 'tel',\n render: (value, row, index) => {\n const obj = {\n children: value,\n props: {},\n };\n if (index === 2) {\n obj.props.rowSpan = 2;\n }\n if (index === 3) {\n obj.props.rowSpan = 0;\n }\n if (index === 4) {\n obj.props.colSpan = 0;\n }\n return obj;\n },\n}, {\n title: 'Phone',\n colSpan: 0,\n key: \"phone\",\n dataIndex: 'phone',\n render: renderContent,\n}, {\n title: 'Address',\n key: \"address\",\n dataIndex: 'address',\n render: renderContent,\n}];\n\nconst data = [{\n key: '1',\n name: 'John Brown',\n age: 32,\n tel: '0571-22098909',\n phone: 18889898989,\n address: 'New York No. 1 Lake Park',\n}, {\n key: '2',\n name: 'Jim Green',\n tel: '0571-22098333',\n phone: 18889898888,\n age: 42,\n address: 'London No. 1 Lake Park',\n}, {\n key: '3',\n name: 'Joe Black',\n age: 32,\n tel: '0575-22098909',\n phone: 18900010002,\n address: 'Sidney No. 1 Lake Park',\n}, {\n key: '4',\n name: 'Jim Red',\n age: 18,\n tel: '0575-22098909',\n phone: 18900010002,\n address: 'London No. 2 Lake Park',\n}, {\n key: '5',\n name: 'Jake White',\n age: 18,\n tel: '0575-22098909',\n phone: 18900010002,\n address: 'Dublin No. 2 Lake Park',\n}];\n\nclass Demo15 extends Component {\n render() {\n return (\n \n );\n }\n}\n\n\n\n", "desc": " 表头只支持列合并,使用 column 里的 colSpan 进行设置。表格支持行/列合并,使用 render 里的单元格属性 colSpan 或者 rowSpan 设值为 0 时,设置的表格不会渲染。" }, { "example": _react2['default'].createElement(Demo1301, null), "title": " 多选表格", "code": "/**\r\n*\r\n* @title 多选表格\r\n* @parent 行操作-选择\r\n* @description 支持多选、全选和禁止选择。getSelectedDataFunc方法是选中行的回调函数,返回当前选中的数据数组。给data数据添加_checked参数可设置当前数据是否选中,添加_disabled参数可禁止选择当前数据。\r\n* demo1301\r\n*/\r\n\r\n\r\nimport React, { Component } from 'react';\r\nimport {Checkbox} from \"tinper-bee\";\r\n\r\nimport { Table } from 'tinper-bee';\r\nimport multiSelect from \"tinper-bee/lib/multiSelect.js\";;\r\n\r\nconst columns = [\r\n { title: \"员工编号\", dataIndex: \"a\", key: \"a\", width: 300, className: \"rowClassName\"},\r\n { title: \"员工姓名\", dataIndex: \"b\", key: \"b\", width: 500 },\r\n { title: \"性别\", dataIndex: \"c\", key: \"c\", width: 500 },\r\n { title: \"部门\", dataIndex: \"d\", key: \"d\", width: 200 }\r\n];\r\n\r\nconst data = [\r\n { a: \"ASVAL_201903280005\", b: \"小张\", c: \"男\", d: \"财务二科\", key: \"1\",_checked:true },\r\n { a: \"ASVAL_201903200004\", b: \"小明\", c: \"男\", d: \"财务一科\", key: \"2\",_checked:false },\r\n { a: \"ASVAL_201903120002\", b: \"小红\", c: \"女\", d: \"财务一科\", key: \"3\",_checked:false },\r\n { a: \"ASVAL_201903280010\", b: \"小王\", c: \"女\", d: \"财务二科\", key: \"4\",_disabled:true },\r\n { a: \"ASVAL_201903200021\", b: \"小李\", c: \"男\", d: \"财务一科\", key: \"5\",_checked:false}\r\n];\r\n//拼接成复杂功能的table组件不能在render中定义,需要像此例子声明在组件的外侧,不然操作state会导致功能出现异常\r\nlet MultiSelectTable = multiSelect(Table, Checkbox);\r\n\r\nclass Demo12 extends Component {\r\n constructor(props) {\r\n super(props);\r\n this.state = {\r\n data: data\r\n };\r\n }\r\n /**\r\n *@param selectedList:当前选中的行数据\r\n *@param record 当前操作行数据\r\n *@param index 当前操作行索引\r\n * @memberof Demo12\r\n */\r\n getSelectedDataFunc = (selectedList,record,index) => {\r\n console.log(\"selectedList\", selectedList,\"index\",index);\r\n // 如果在回调中增加setState逻辑,需要同步data中的_checked属性。即下面的代码\r\n // const allChecked = selectedList.length == 0?false:true;\r\n // record为undefind则为全选或者全不选\r\n // if(!record){\r\n // data12.forEach(item=>{\r\n // item._checked = allChecked;\r\n // })\r\n // }else{\r\n // data12[index]['_checked'] = record._checked;\r\n // } \r\n\r\n \r\n };\r\n \r\n render() {\r\n let multiObj = {\r\n type: \"checkbox\"\r\n };\r\n return (\r\n {\r\n if (record._checked) {\r\n return 'selected';\r\n } else {\r\n return '';\r\n }\r\n }}\r\n getSelectedDataFunc={this.getSelectedDataFunc}/>\r\n );\r\n }\r\n}\r\n\r\n", "desc": " 支持多选、全选和禁止选择。getSelectedDataFunc方法是选中行的回调函数,返回当前选中的数据数组。给data数据添加_checked参数可设置当前数据是否选中,添加_disabled参数可禁止选择当前数据。" }, { "example": _react2['default'].createElement(Demo1401, null), "title": " 万行以上数据渲染", "code": "/**\n*\n* @title 万行以上数据渲染\n* @parent 无限滚动 Infinite-scroll\n* @description 万行数据渲染\n* demo1401\n*/\n\nimport React, { Component } from \"react\";\nimport {Tooltip} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\nimport BigData from \"tinper-bee/lib/bigData\";;\nconst BigDataTable = BigData(Table);\nconst columns = [\n {\n title:'序号',\n dataIndex:'index',\n width:'60',\n key:'index',\n render:(text,record,index)=>{\n return index\n }\n },\n {\n title: \"用户名\", dataIndex: \"a\", key: \"a\", width: 580, className: \"rowClassName\",\n render: (text, record, index) => {\n return (\n \n {text}\n \n );\n }\n },\n { id: \"123\", title: \"性别\", dataIndex: \"b\", key: \"b\", width: 80},\n { title: \"年龄\", dataIndex: \"c\", key: \"c\", width: 200 }\n\n];\n\nconst data = [ ...new Array(10000) ].map((e, i) => {\n const rs = { a: i + 'a', b: i + 'b', c: i + 'c', d: i + 'd', key: i };\n if(i%3==0){\n rs.b = '女';\n }\n return rs;\n })\n\n\nclass Demo30 extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n data: data,\n selectedRowIndex: 0\n }\n }\n\n render() {\n return (\n {\n console.log('currentIndex--'+index);\n }}\n />\n\n \n );\n }\n}\n\n", "desc": " 万行数据渲染", "scss_code": ".big-data tr td {\n // height: 48px;\n}" }, { "example": _react2['default'].createElement(Demo1402, null), "title": " 嵌套子表格滚动加载", "code": "/**\n*\n* @title 嵌套子表格滚动加载\n* @parent 无限滚动 Infinite-scroll\n* @description 通过expandedRowRender参数来实现子表格\n* demo1402\n*/\n\nimport React, { Component } from \"react\";\nimport {Popconfirm} from 'tinper-bee';\nimport { Table } from 'tinper-bee';\nimport BigData from \"tinper-bee/lib/bigData\";;\nconst BigDataTable = BigData(Table);\nconst outColumns = [\n {\n title: \"操作\",\n dataIndex: \"d\",\n key: \"d\", \n width:200,\n render(text, record, index) {\n return (\n \n \n 一些操作\n \n \n );\n }\n },\n { title: \"用户名\", dataIndex: \"a\", key: \"a\", width: 250 },\n { id: \"123\", title: \"性别\", dataIndex: \"b\", key: \"b\", width: 100 },\n { title: \"年龄\", dataIndex: \"c\", key: \"c\", width: 200 },\n \n];\nconst innerColumns = [\n {\n title: \"操作\",\n dataIndex: \"d\",\n key: \"d\",\n width:200,\n render(text, record, index) {\n return (\n \n \n 一些操作\n \n \n );\n }\n },\n { title: \"用户名\", dataIndex: \"a\", key: \"a\", width: 100 },\n { id: \"123\", title: \"性别\", dataIndex: \"b\", key: \"b\", width: 100 },\n { title: \"年龄\", dataIndex: \"c\", key: \"c\", width: 200 },\n \n];\n\nconst data16 = [ ...new Array(10000) ].map((e, i) => {\n return { a: i + 'a', b: i + 'b', c: i + 'c', d: i + 'd', key: i };\n })\n\n\n\n\n\nclass Demo31 extends Component {\n constructor(props){\n super(props);\n this.state={\n data_obj:{\n 0:[\n { a: \"令狐冲\", b: \"男\", c: 41, d: \"操作\", key: \"1\" },\n { a: \"杨过\", b: \"男\", c: 67, d: \"操作\", key: \"2\" }\n ],\n 1: [\n { a: \"令狐冲\", b: \"男\", c: 41, d: \"操作\", key: \"1\" },\n { a: \"菲菲\", b: \"nv\", c: 67, d: \"操作\", key: \"2\" }\n ],\n }\n }\n }\n expandedRowRender = (record, index, indent) => {\n let height = 200;\n let innderData = [ ...new Array(100) ].map((e, i) => {\n return { a: index+\"-\"+ i + 'a', b: i + 'b', c: i + 'c', d: i + 'd', key: index+\"-\"+ i };\n })\n return (\n \n );\n };\n getData=(expanded, record)=>{\n //当点击展开的时候才去请求数据\n let new_obj = Object.assign({},this.state.data_obj);\n if(expanded){\n if(record.key==='1'){\n new_obj[record.key] = [\n { a: \"令狐冲\", b: \"男\", c: 41, d: \"操作\", key: \"1\" },\n { a: \"杨过\", b: \"男\", c: 67, d: \"操作\", key: \"2\" }\n ]\n this.setState({\n data_obj:new_obj\n })\n }else{\n new_obj[record.key] = [\n { a: \"令狐冲\", b: \"男\", c: 41, d: \"操作\", key: \"1\" },\n { a: \"菲菲\", b: \"nv\", c: 67, d: \"操作\", key: \"2\" }\n ]\n this.setState({\n data_obj:new_obj\n })\n }\n }\n }\n haveExpandIcon=(record, index)=>{\n //控制是否显示行展开icon,该参数只有在和expandedRowRender同时使用才生效\n if(index == 0){\n return true;\n }\n return false;\n }\n render() {\n return (\n \n );\n }\n}\n\n\n", "desc": " 通过expandedRowRender参数来实现子表格" }, { "example": _react2['default'].createElement(Demo1403, null), "title": " 多功能表格滚动加载", "code": "/**\n*\n* @title 多功能表格滚动加载\n* @parent 无限滚动 Infinite-scroll\n* @description\n* demo1403\n*/\n\nimport React, { Component } from \"react\";\nimport {Tooltip,Checkbox,Icon,Popover} from \"tinper-bee\";\nimport { Table } from 'tinper-bee';\nimport BigData from \"tinper-bee/lib/bigData\";;\nimport multiSelect from \"tinper-bee/lib/multiSelect\";;\nimport filterColumn from \"tinper-bee/lib/filterColumn\";;\n\nlet ComplexTable = filterColumn(multiSelect(BigData(Table), Checkbox), Popover, Icon);\n\nconst columns = [\n {\n title:'序号',\n dataIndex:'index',\n width:'80',\n key:'index',\n render:(text,record,index)=>{\n return index\n }\n },\n {\n title: \"用户名\", dataIndex: \"a\", key: \"a\", width: 580, className: \"rowClassName\",\n render: (text, record, index) => {\n return (\n \n {text}\n \n );\n }\n },\n { id: \"123\", title: \"性别\", dataIndex: \"b\", key: \"b\", width: 80},\n { title: \"年龄\", dataIndex: \"c\", key: \"c\", width: 200 }\n];\n\nconst data = [ ...new Array(10000) ].map((e, i) => {\n const rs = { a: i + 'a', b: i + 'b', c: i + 'c', d: i + 'd', key: i };\n if(i%3==0){\n rs.b = '女';\n }\n return rs;\n })\n\n\nclass Demo32 extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n data: data,\n selectedRowIndex: 0\n }\n }\n getSelectedDataFunc = data => {\n console.log(data);\n };\n\n render() {\n return (\n {\n this.setState({\n selectedRowIndex: index\n });\n }}\n getSelectedDataFunc={this.getSelectedDataFunc}/>\n\n );\n }\n}\n\n\n", "desc": "" }, { "example": _react2['default'].createElement(Demo1404, null), "title": " 层级树大数据场景", "code": "/**\n* @title 层级树大数据场景\n* @parent 无限滚动 Infinite-scroll\n* @description\n* demo1404\n*/\nimport React, { Component } from \"react\";\nimport {Tooltip} from \"tinper-bee\";\n\nimport { Table } from 'tinper-bee';\nimport BigData from \"tinper-bee/lib/bigData\";;\nconst BigDataTable = BigData(Table);\nconst columns = [\n {\n title:'序号',\n dataIndex:'index',\n width:'150',\n key:'index',\n render:(text,record,index)=>{\n return index\n }\n },\n {\n title: \"用户名\", dataIndex: \"a\", key: \"a\", width: 580, className: \"rowClassName\",\n render: (text, record, index) => {\n return (\n \n {text}\n \n );\n }\n },\n { id: \"123\", title: \"性别\", dataIndex: \"b\", key: \"b\", width: 80},\n { title: \"年龄\", dataIndex: \"c\", key: \"c\", width: 200 }\n];\n\nconst data = [ ...new Array(1000) ].map((e, i) => {\n const rs = { a: i + 'a', b: i + 'b', c: i + 'c', d: i + 'd', key: i };\n if(i%3==0){\n rs.b = '女';\n rs.children = [];\n for(let subi=0;subi<3;subi++){\n rs.children.push({a: i +subi + 'asub', b: i +subi + 'bsub', c: i + subi +'csub', d: i + subi +'dsub', key: i+ `${subi} sub`});\n }\n }else{\n rs.children = [];\n for(let subi=0;subi<3;subi++){\n rs.children.push({a: i +subi + 'asub', b: i +subi + 'bsub', c: i + subi +'csub', d: i + subi +'dsub', key: i+ `${subi} sub`});\n }\n }\n return rs;\n })\n\n\nclass Demo34 extends Component {\n\n constructor(props) {\n super(props);\n this.state = {\n data: data,\n selectedRowIndex: 0\n }\n }\n onExpandedRowsChange = (params)=>{\n console.log(params);\n }\n onExpand = (expandKeys)=>{\n console.log('expand---'+expandKeys);\n }\n render() {\n return (\n {\n console.log('currentIndex--'+index);\n }}\n />\n\n \n );\n }\n}\n\n", "desc": "" }, { "example": _react2['default'].createElement(Demo1601, null), "title": " 表格+分页", "code": "/**\n * @title 表格+分页\n * @parent 分页 Pagination\n * @description 点击分页联动表格\n * demo1601\n */\n\nimport React, { Component } from \"react\";\nimport {Pagination} from \"tinper-bee\";\n\nimport { Table } from 'tinper-bee';\n\nconst columns = [\n { title: \"员工编号\", dataIndex: \"a\", key: \"a\", width: 300, className: \"rowClassName\"},\n { title: \"员工姓名\", dataIndex: \"b\", key: \"b\", width: 500 },\n { title: \"性别\", dataIndex: \"c\", key: \"c\", width: 500 },\n { title: \"部门\", dataIndex: \"d\", key: \"d\", width: 200 }\n];\n\nconst pageData = {\n 1: [\n { a: \"ASVAL_201903280005\", b: \"小张\", c: \"男\", d: \"财务二科\", key: \"1\" },\n { a: \"ASVAL_201903200004\", b: \"小明\", c: \"男\", d: \"财务一科\", key: \"2\" },\n { a: \"ASVAL_201903120002\", b: \"小红\", c: \"女\", d: \"财务一科\", key: \"3\" }\n ],\n 2: [\n { a: \"ASVAL_201903280010\", b: \"小王\", c: \"女\", d: \"财务二科\", key: \"4\" },\n { a: \"ASVAL_201903200021\", b: \"小李\", c: \"男\", d: \"财务一科\", key: \"5\" },\n ]\n};\n\nclass Demo8 extends Component {\n constructor(props) {\n super(props);\n this.state = {\n data: pageData[1],\n activePage: 1\n };\n }\n\n handleSelect(eventKey) {\n this.setState({\n data: pageData[eventKey],\n activePage: eventKey\n });\n }\n\n render() {\n return (\n \n );\n }\n}\n\n", "desc": " 点击分页联动表格", "scss_code": ".demo8{\n .u-table {\n margin-bottom: 11px;\n }\n .u-pagination{\n display: flex;\n align-items: center;\n justify-content: center;\n }\n}" }];
var Demo = function (_Component) {
_inherits(Demo, _Component);
@@ -1473,7 +1473,7 @@
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
- default: obj
+ "default": obj
};
}
@@ -5604,6 +5604,16 @@
var documentWidth = documentElement.scrollWidth;
var documentHeight = documentElement.scrollHeight;
+ // scrollXXX on html is sync with body which means overflow: hidden on body gets wrong scrollXXX.
+ // We should cut this ourself.
+ var bodyStyle = window.getComputedStyle(body);
+ if (bodyStyle.overflowX === 'hidden') {
+ documentWidth = win.innerWidth;
+ }
+ if (bodyStyle.overflowY === 'hidden') {
+ documentHeight = win.innerHeight;
+ }
+
// Reset element position after calculate the visible area
if (element.style) {
element.style.position = originalPosition;
@@ -7544,28 +7554,20 @@
/* 79 */
/***/ (function(module, exports, __webpack_require__) {
- "use strict";
+ 'use strict';
var deselectCurrent = __webpack_require__(80);
- var defaultMessage = "Copy to clipboard: #{key}, Enter";
+ var defaultMessage = 'Copy to clipboard: #{key}, Enter';
function format(message) {
- var copyKey = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C";
+ var copyKey = (/mac os x/i.test(navigator.userAgent) ? '⌘' : 'Ctrl') + '+C';
return message.replace(/#{\s*key\s*}/g, copyKey);
}
function copy(text, options) {
- var debug,
- message,
- reselectPrevious,
- range,
- selection,
- mark,
- success = false;
- if (!options) {
- options = {};
- }
+ var debug, message, reselectPrevious, range, selection, mark, success = false;
+ if (!options) { options = {}; }
debug = options.debug || false;
try {
reselectPrevious = deselectCurrent();
@@ -7573,50 +7575,47 @@
range = document.createRange();
selection = document.getSelection();
- mark = document.createElement("span");
+ mark = document.createElement('span');
mark.textContent = text;
// reset user styles for span element
- mark.style.all = "unset";
+ mark.style.all = 'unset';
// prevents scrolling to the end of the page
- mark.style.position = "fixed";
+ mark.style.position = 'fixed';
mark.style.top = 0;
- mark.style.clip = "rect(0, 0, 0, 0)";
+ mark.style.clip = 'rect(0, 0, 0, 0)';
// used to preserve spaces and line breaks
- mark.style.whiteSpace = "pre";
+ mark.style.whiteSpace = 'pre';
// do not inherit user-select (it may be `none`)
- mark.style.webkitUserSelect = "text";
- mark.style.MozUserSelect = "text";
- mark.style.msUserSelect = "text";
- mark.style.userSelect = "text";
- mark.addEventListener("copy", function(e) {
- e.stopPropagation();
- });
+ mark.style.webkitUserSelect = 'text';
+ mark.style.MozUserSelect = 'text';
+ mark.style.msUserSelect = 'text';
+ mark.style.userSelect = 'text';
document.body.appendChild(mark);
- range.selectNodeContents(mark);
+ range.selectNode(mark);
selection.addRange(range);
- var successful = document.execCommand("copy");
+ var successful = document.execCommand('copy');
if (!successful) {
- throw new Error("copy command was unsuccessful");
+ throw new Error('copy command was unsuccessful');
}
success = true;
} catch (err) {
- debug && console.error("unable to copy using execCommand: ", err);
- debug && console.warn("trying IE specific stuff");
+ debug && console.error('unable to copy using execCommand: ', err);
+ debug && console.warn('trying IE specific stuff');
try {
- window.clipboardData.setData("text", text);
+ window.clipboardData.setData('text', text);
success = true;
} catch (err) {
- debug && console.error("unable to copy using clipboardData: ", err);
- debug && console.error("falling back to prompt");
- message = format("message" in options ? options.message : defaultMessage);
+ debug && console.error('unable to copy using clipboardData: ', err);
+ debug && console.error('falling back to prompt');
+ message = format('message' in options ? options.message : defaultMessage);
window.prompt(message, text);
}
} finally {
if (selection) {
- if (typeof selection.removeRange == "function") {
+ if (typeof selection.removeRange == 'function') {
selection.removeRange(range);
} else {
selection.removeAllRanges();
@@ -8182,22 +8181,26 @@
"use strict";
+ exports.__esModule = true;
+ exports.Transition = exports.TransitionGroup = exports.ReplaceTransition = exports.CSSTransition = void 0;
+
var _CSSTransition = _interopRequireDefault(__webpack_require__(86));
+ exports.CSSTransition = _CSSTransition.default;
+
var _ReplaceTransition = _interopRequireDefault(__webpack_require__(93));
+ exports.ReplaceTransition = _ReplaceTransition.default;
+
var _TransitionGroup = _interopRequireDefault(__webpack_require__(94));
+ exports.TransitionGroup = _TransitionGroup.default;
+
var _Transition = _interopRequireDefault(__webpack_require__(90));
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+ exports.Transition = _Transition.default;
- module.exports = {
- Transition: _Transition.default,
- TransitionGroup: _TransitionGroup.default,
- ReplaceTransition: _ReplaceTransition.default,
- CSSTransition: _CSSTransition.default
- };
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/***/ }),
/* 86 */
@@ -8240,17 +8243,27 @@
});
};
/**
- * A `Transition` component using CSS transitions and animations.
- * It's inspired by the excellent [ng-animate](http://www.nganimate.org/) library.
+ * A transition component inspired by the excellent
+ * [ng-animate](http://www.nganimate.org/) library, you should use it if you're
+ * using CSS transitions or animations. It's built upon the
+ * [`Transition`](https://reactcommunity.org/react-transition-group/transition)
+ * component, so it inherits all of its props.
*
* `CSSTransition` applies a pair of class names during the `appear`, `enter`,
- * and `exit` stages of the transition. The first class is applied and then a
- * second "active" class in order to activate the css animation. After the animation,
- * matching `done` class names are applied to persist the animation state.
+ * and `exit` states of the transition. The first class is applied and then a
+ * second `*-active` class in order to activate the CSSS transition. After the
+ * transition, matching `*-done` class names are applied to persist the
+ * transition state.
*
- * When the `in` prop is toggled to `true` the Component will get
- * the `example-enter` CSS class and the `example-enter-active` CSS class
- * added in the next tick. This is a convention based on the `classNames` prop.
+ * When the `in` prop is set to `true`, the child component will first receive
+ * the class `example-enter`, then the `example-enter-active` will be added in
+ * the next tick. `CSSTransition` [forces a
+ * reflow](https://github.com/reactjs/react-transition-group/blob/5007303e729a74be66a21c3e2205e4916821524b/src/CSSTransition.js#L208-L215)
+ * between before adding the `example-enter-active`. This is an important trick
+ * because it allows us to transition between `example-enter` and
+ * `example-enter-active` even though they were added immediately one after
+ * another. Most notably, this is what makes it possible for us to animate
+ * _appearance_.
*/
@@ -8591,13 +8604,24 @@
* it's used to animate the mounting and unmounting of a component, but can also
* be used to describe in-place transition states as well.
*
+ * ---
+ *
+ * **Note**: `Transition` is a platform-agnostic base component. If you're using
+ * transitions in CSS, you'll probably want to use
+ * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition)
+ * instead. It inherits all the features of `Transition`, but contains
+ * additional features necessary to play nice with CSS transitions (hence the
+ * name of the component).
+ *
+ * ---
+ *
* By default the `Transition` component does not alter the behavior of the
- * component it renders, it only tracks "enter" and "exit" states for the components.
- * It's up to you to give meaning and effect to those states. For example we can
- * add styles to a component when it enters or exits:
+ * component it renders, it only tracks "enter" and "exit" states for the
+ * components. It's up to you to give meaning and effect to those states. For
+ * example we can add styles to a component when it enters or exits:
*
* ```jsx
- * import Transition from 'react-transition-group/Transition';
+ * import { Transition } from 'react-transition-group';
*
* const duration = 300;
*
@@ -8613,7 +8637,7 @@
*
* const Fade = ({ in: inProp }) => (
*
- * {(state) => (
+ * {state => (
*
- *
+ * <>
+ *
+ * {state => (
+ * // ...
+ * )}
+ *
*
- *
+ * >
* );
* }
* ```
*
- * When the button is clicked the component will shift to the `'entering'` state and
- * stay there for 500ms (the value of `timeout`) before it finally switches to `'entered'`.
+ * When the button is clicked the component will shift to the `'entering'` state
+ * and stay there for 500ms (the value of `timeout`) before it finally switches
+ * to `'entered'`.
*
- * When `in` is `false` the same thing happens except the state moves from `'exiting'` to `'exited'`.
- *
- * ## Timing
- *
- * Timing is often the trickiest part of animation, mistakes can result in slight delays
- * that are hard to pin down. A common example is when you want to add an exit transition,
- * you should set the desired final styles when the state is `'exiting'`. That's when the
- * transition to those styles will start and, if you matched the `timeout` prop with the
- * CSS Transition duration, it will end exactly when the state changes to `'exited'`.
- *
- * > **Note**: For simpler transitions the `Transition` component might be enough, but
- * > take into account that it's platform-agnostic, while the `CSSTransition` component
- * > [forces reflows](https://github.com/reactjs/react-transition-group/blob/5007303e729a74be66a21c3e2205e4916821524b/src/CSSTransition.js#L208-L215)
- * > in order to make more complex transitions more predictable. For example, even though
- * > classes `example-enter` and `example-enter-active` are applied immediately one after
- * > another, you can still transition from one to the other because of the forced reflow
- * > (read [this issue](https://github.com/reactjs/react-transition-group/issues/159#issuecomment-322761171)
- * > for more info). Take this into account when choosing between `Transition` and
- * > `CSSTransition`.
+ * When `in` is `false` the same thing happens except the state moves from
+ * `'exiting'` to `'exited'`.
*/
exports.EXITING = EXITING;
@@ -8992,15 +9001,15 @@
};
Transition.propTypes = process.env.NODE_ENV !== "production" ? {
/**
- * A `function` child can be used instead of a React element.
- * This function is called with the current transition status
- * ('entering', 'entered', 'exiting', 'exited', 'unmounted'), which can be used
- * to apply context specific props to a component.
+ * A `function` child can be used instead of a React element. This function is
+ * called with the current transition status (`'entering'`, `'entered'`,
+ * `'exiting'`, `'exited'`, `'unmounted'`), which can be used to apply context
+ * specific props to a component.
*
* ```jsx
- *
- * {(status) => (
- *
+ *
+ * {state => (
+ *
* )}
*
* ```
@@ -9047,22 +9056,27 @@
/**
* The duration of the transition, in milliseconds.
- * Required unless `addEndListener` is provided
+ * Required unless `addEndListener` is provided.
*
- * You may specify a single timeout for all transitions like: `timeout={500}`,
- * or individually like:
+ * You may specify a single timeout for all transitions:
+ *
+ * ```jsx
+ * timeout={500}
+ * ```
+ *
+ * or individually:
*
* ```jsx
* timeout={{
+ * appear: 500,
* enter: 300,
* exit: 500,
- * appear: 500,
* }}
* ```
*
- * If the value of `appear` is not set, then the value from enter is taken.
- *
- * If the `enter` or `exit` value is `null` or `undefined`, then the timer is set to `0`
+ * - `appear` defaults to the value of `enter`
+ * - `enter` defaults to `0`
+ * - `exit` defaults to `0`
*
* @type {number | { enter?: number, exit?: number, appear?: number }}
*/
@@ -9687,12 +9701,12 @@
* remember to spread them through if you are wrapping the `` as
* with our `` example.
*
- * While this component is meant to make it easier to animate multiple
- * `Transition` or `CSSTransition` children, sometimes you want to transition a
- * single child by changing its content, e.g. routes, slides, images in a
- * carousel etc. In that case you can change the `key` prop of the child
- * component along with its content, that way `TransitionGroup` will know that
- * it should transition the child.
+ * While this component is meant for multiple `Transition` or `CSSTransition`
+ * children, sometimes you may want to have a single transition child with
+ * content that you want to be transitioned out and in when you change it
+ * (e.g. routes, images etc.) In that case you can change the `key` prop of
+ * the transition child as you change its content, this will cause
+ * `TransitionGroup` to transition the child out and back in.
*/
children: _propTypes.default.node,
@@ -9959,11 +9973,11 @@
var _beeModal2 = _interopRequireDefault(_beeModal);
- var _beeFormControl = __webpack_require__(261);
+ var _beeFormControl = __webpack_require__(153);
var _beeFormControl2 = _interopRequireDefault(_beeFormControl);
- var _beeButton = __webpack_require__(259);
+ var _beeButton = __webpack_require__(155);
var _beeButton2 = _interopRequireDefault(_beeButton);
@@ -11141,33 +11155,33 @@
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
var propTypes = {
- /**
- * @required
+ /**
+ * @required
*/
id: _propTypes2["default"].oneOfType([_propTypes2["default"].string, _propTypes2["default"].number]),
inverse: _propTypes2["default"].bool,
visible: _propTypes2["default"].bool,
onVisibleChange: _propTypes2["default"].func,
- /**
- * 相对目标元素显示上下左右的位置
+ /**
+ * 相对目标元素显示上下左右的位置
*/
placement: _propTypes2["default"].oneOf(['top', 'right', 'bottom', 'left']),
- /**
- * 绝对定位上边距.
+ /**
+ * 绝对定位上边距.
*/
positionTop: _propTypes2["default"].oneOfType([_propTypes2["default"].number, _propTypes2["default"].string]),
- /**
- * 绝对定位左边距
+ /**
+ * 绝对定位左边距
*/
positionLeft: _propTypes2["default"].oneOfType([_propTypes2["default"].number, _propTypes2["default"].string]),
- /**
- * 与目标Top的距离
+ /**
+ * 与目标Top的距离
*/
arrowOffsetTop: _propTypes2["default"].oneOfType([_propTypes2["default"].number, _propTypes2["default"].string]),
- /**
- * 与目标Left的距离
+ /**
+ * 与目标Left的距离
*/
arrowOffsetLeft: _propTypes2["default"].oneOfType([_propTypes2["default"].number, _propTypes2["default"].string])
};
@@ -11249,13 +11263,13 @@
}
};
- /**
- * @desc 鼠标划入时候的事件
+ /**
+ * @desc 鼠标划入时候的事件
*/
- /**
- * @desc 鼠标划出时候的事件
+ /**
+ * @desc 鼠标划出时候的事件
*/
@@ -13949,77 +13963,15 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
- value: true
+ value: true
});
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
var _Modal = __webpack_require__(135);
var _Modal2 = _interopRequireDefault(_Modal);
- var _confirm = __webpack_require__(258);
-
- var _confirm2 = _interopRequireDefault(_confirm);
-
- var _beeIcon = __webpack_require__(106);
-
- var _beeIcon2 = _interopRequireDefault(_beeIcon);
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
- _Modal2["default"].info = function (props) {
- var config = _extends({
- type: 'info',
- icon: React.createElement(_beeIcon2["default"], { type: 'uf-i-c-2' }),
- okCancel: false
- }, props);
- return (0, _confirm2["default"])(config);
- };
-
- _Modal2["default"].success = function (props) {
- var config = _extends({
- type: 'success',
- icon: React.createElement(_beeIcon2["default"], { type: 'uf-correct' }),
- okCancel: false
- }, props);
- return (0, _confirm2["default"])(config);
- };
-
- _Modal2["default"].error = function (props) {
- var config = _extends({
- type: 'error',
- icon: React.createElement(_beeIcon2["default"], { type: 'uf-close-bold' }),
- okCancel: false
- }, props);
- return (0, _confirm2["default"])(config);
- };
-
- _Modal2["default"].warning = function (props) {
- var config = _extends({
- type: 'warning',
- icon: React.createElement(_beeIcon2["default"], { type: 'uf-exc-t' }),
- okCancel: false
- }, props);
- return (0, _confirm2["default"])(config);
- };
-
- _Modal2["default"].confirm = function (props) {
- var config = _extends({
- type: 'confirm',
- okCancel: true
- }, props);
- return (0, _confirm2["default"])(config);
- };
-
- _Modal2["default"].destroyAll = function () {
- while (_Modal.destroyFns.length) {
- var close = _Modal.destroyFns.pop();
- if (close) {
- close();
- }
- }
- };
exports["default"] = _Modal2["default"];
module.exports = exports['default'];
@@ -14032,12 +13984,9 @@
Object.defineProperty(exports, "__esModule", {
value: true
});
- exports.destroyFns = undefined;
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
- var _extends2;
-
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _classnames = __webpack_require__(5);
@@ -14078,29 +14027,25 @@
var _tinperBeeCore = __webpack_require__(27);
- var _beeDnd = __webpack_require__(148);
-
- var _beeDnd2 = _interopRequireDefault(_beeDnd);
-
var _beeTransition = __webpack_require__(11);
- var _ModalBody = __webpack_require__(253);
+ var _ModalBody = __webpack_require__(148);
var _ModalBody2 = _interopRequireDefault(_ModalBody);
- var _ModalDialog = __webpack_require__(254);
+ var _ModalDialog = __webpack_require__(149);
var _ModalDialog2 = _interopRequireDefault(_ModalDialog);
- var _ModalFooter = __webpack_require__(255);
+ var _ModalFooter = __webpack_require__(150);
var _ModalFooter2 = _interopRequireDefault(_ModalFooter);
- var _ModalHeader = __webpack_require__(256);
+ var _ModalHeader = __webpack_require__(151);
var _ModalHeader2 = _interopRequireDefault(_ModalHeader);
- var _ModalTitle = __webpack_require__(257);
+ var _ModalTitle = __webpack_require__(152);
var _ModalTitle2 = _interopRequireDefault(_ModalTitle);
@@ -14112,6 +14057,8 @@
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
@@ -14120,51 +14067,49 @@
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+ var propTypes = _extends({}, _Modal2["default"].propTypes, _ModalDialog2["default"].propTypes, {
- var propTypes = _extends({}, _Modal2["default"].propTypes, _ModalDialog2["default"].propTypes, (_extends2 = {
-
- /**
- * 是否弹出遮罩层/遮罩层点击是否触发关闭
+ /**
+ * 是否弹出遮罩层/遮罩层点击是否触发关闭
*/
backdrop: _propTypes2["default"].oneOf(['static', true, false]),
- /**
- * 点击遮罩层是否允许关闭
+ /**
+ * 点击遮罩层是否允许关闭
*/
backdropClosable: _propTypes2["default"].bool,
- /**
- * esc触发关闭
+ /**
+ * esc触发关闭
*/
keyboard: _propTypes2["default"].bool,
- /**
- * 显隐时是否使用动画
+ /**
+ * 显隐时是否使用动画
*/
animation: _propTypes2["default"].bool,
- /**
- * 传递给模态框的样式
+ /**
+ * 传递给模态框的样式
*/
dialogComponentClass: _tinperBeeCore.elementType,
- /**
- * 自动设置焦点
+ /**
+ * 自动设置焦点
*/
autoFocus: _propTypes2["default"].bool,
- /**
- * 防止打开时焦点离开模态框
+ /**
+ * 防止打开时焦点离开模态框
*/
enforceFocus: _propTypes2["default"].bool,
- /**
- * 是否打开模态框
+ /**
+ * 是否打开模态框
*/
show: _propTypes2["default"].bool,
- /**
- * 关闭时的钩子函数
+ /**
+ * 关闭时的钩子函数
*/
onHide: _propTypes2["default"].func,
@@ -14180,40 +14125,28 @@
onExited: _propTypes2["default"].func,
- containerClassName: _propTypes2["default"].string
- }, _defineProperty(_extends2, 'containerClassName', _propTypes2["default"].string), _defineProperty(_extends2, 'container', _Modal2["default"].propTypes.container), _defineProperty(_extends2, 'size', _propTypes2["default"].oneOf(["sm", "lg", "xlg", ""])), _defineProperty(_extends2, 'width', _propTypes2["default"].oneOfType([_propTypes2["default"].number, _propTypes2["default"].string])), _defineProperty(_extends2, 'draggable', _propTypes2["default"].bool), _extends2));
+ /**
+ * 要添加到的元素
+ */
+ container: _Modal2["default"].propTypes.container,
+
+ /**
+ * 尺寸
+ */
+ size: _propTypes2["default"].oneOf(["sm", "lg", "xlg", ""]),
+ /**
+ * 自定义宽度
+ */
+ width: _propTypes2["default"].oneOfType([_propTypes2["default"].number, _propTypes2["default"].string])
+ });
var defaultProps = _extends({}, _Modal2["default"].defaultProps, {
backdropClosable: true,
animation: true,
dialogComponentClass: _ModalDialog2["default"],
- draggable: false,
clsPrefix: 'u-modal'
});
- var ModalFuncProps = {
- prefixCls: _propTypes2["default"].string,
- className: _propTypes2["default"].string,
- show: _propTypes2["default"].bool,
- title: _react2["default"].ReactNode,
- content: _react2["default"].ReactNode,
- onOk: _propTypes2["default"].func,
- onCancel: _propTypes2["default"].func,
- width: _propTypes2["default"].oneOfType([_propTypes2["default"].number, _propTypes2["default"].string]),
- okText: _propTypes2["default"].string,
- okType: _propTypes2["default"].string,
- cancelText: _propTypes2["default"].string,
- icon: _react2["default"].ReactNode,
- backdrop: _propTypes2["default"].oneOf(['static', true, false])
- };
-
- var ModalFunc = function ModalFunc(props) {
- destroy = function destroy() {};
- update = function update(newConfig) {};
- };
-
- var destroyFns = exports.destroyFns = [];
-
var childContextTypes = {
$u_modal: _propTypes2["default"].shape({
onHide: _propTypes2["default"].func
@@ -14313,10 +14246,7 @@
children = _props.children,
onEntering = _props.onEntering,
onExited = _props.onExited,
- backdropClassName = _props.backdropClassName,
- containerClassName = _props.containerClassName,
- draggable = _props.draggable,
- props = _objectWithoutProperties(_props, ['backdrop', 'backdropClosable', 'animation', 'show', 'dialogComponentClass', 'className', 'clsPrefix', 'style', 'size', 'width', 'children', 'onEntering', 'onExited', 'backdropClassName', 'containerClassName', 'draggable']);
+ props = _objectWithoutProperties(_props, ['backdrop', 'backdropClosable', 'animation', 'show', 'dialogComponentClass', 'className', 'clsPrefix', 'style', 'size', 'width', 'children', 'onEntering', 'onExited']);
var _splitComponent = (0, _tinperBeeCore.splitComponent)(props, _Modal2["default"]),
_splitComponent2 = _slicedToArray(_splitComponent, 2),
@@ -14344,7 +14274,7 @@
onExited: (0, _tinperBeeCore.createChainedFunction)(onExited, this.handleExited),
backdrop: backdrop,
backdropClassName: (0, _classnames2["default"])(backdropClasses, inClassName),
- containerClassName: (0, _classnames2["default"])(containerClasses, containerClassName),
+ containerClassName: (0, _classnames2["default"])(containerClasses),
transition: animation ? _beeTransition.Fade : undefined,
dialogTransitionTimeout: Modal.TRANSITION_DURATION,
backdropTransitionTimeout: Modal.BACKDROP_TRANSITION_DURATION
@@ -14353,10 +14283,9 @@
Dialog,
_extends({}, dialogProps, {
style: styleRes,
- className: (0, _classnames2["default"])(className, inClassName, backdropClassName),
+ className: (0, _classnames2["default"])(className, inClassName),
onClick: backdrop === true && !!backdropClosable ? this.handleDialogClick : null,
- size: size,
- draggable: draggable
+ size: size
}),
children
)
@@ -14366,17 +14295,6 @@
return Modal;
}(_react2["default"].Component);
- Modal.info = ModalFunc;
- Modal.success = ModalFunc;
- Modal.error = ModalFunc;
- Modal.warn = ModalFunc;
- Modal.warning = ModalFunc;
- Modal.confirm = ModalFunc;
-
- Modal.destroyAll = function () {
- return;
- };
-
Modal.propTypes = propTypes;
Modal.defaultProps = defaultProps;
Modal.childContextTypes = childContextTypes;
@@ -14392,6 +14310,7 @@
Modal.BACKDROP_TRANSITION_DURATION = 10000;
exports["default"] = Modal;
+ module.exports = exports['default'];
/***/ }),
/* 136 */
@@ -15485,16141 +15404,6 @@
value: true
});
- var _Dnd = __webpack_require__(149);
-
- var _Dnd2 = _interopRequireDefault(_Dnd);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- exports["default"] = _Dnd2["default"];
- module.exports = exports['default'];
-
-/***/ }),
-/* 149 */
-/***/ (function(module, exports, __webpack_require__) {
-
- 'use strict';
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
- var _react = __webpack_require__(1);
-
- var _react2 = _interopRequireDefault(_react);
-
- var _reactBeautifulDnd = __webpack_require__(150);
-
- var _reactDraggable = __webpack_require__(248);
-
- var _reactDraggable2 = _interopRequireDefault(_reactDraggable);
-
- var _propTypes = __webpack_require__(6);
-
- var _propTypes2 = _interopRequireDefault(_propTypes);
-
- var _lodash = __webpack_require__(249);
-
- var _lodash2 = _interopRequireDefault(_lodash);
-
- var _SortList = __webpack_require__(250);
-
- var _SortList2 = _interopRequireDefault(_SortList);
-
- var _Between = __webpack_require__(252);
-
- var _Between2 = _interopRequireDefault(_Between);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
-
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
-
- var propTypes = {
- onStart: _propTypes2["default"].func,
- onDrag: _propTypes2["default"].func,
- onStop: _propTypes2["default"].func,
- onDragUpdate: _propTypes2["default"].func,
- dropClass: _propTypes2["default"].string,
- dropOverClass: _propTypes2["default"].string,
- dragClass: _propTypes2["default"].string,
- dragingClass: _propTypes2["default"].string,
- draggedClass: _propTypes2["default"].string,
- className: _propTypes2["default"].string,
- style: _propTypes2["default"].object,
- list: _propTypes2["default"].array,
- otherList: _propTypes2["default"].array,
- type: _propTypes2["default"].oneOf(['vertical', 'horizontal', 'betweenVertical', 'betweenHorizontal']),
- showKey: _propTypes2["default"].string
-
- };
- var defaultProps = {
- onStart: function onStart() {},
- onDrag: function onDrag() {},
- onStop: function onStop() {},
- onDragUpdate: function onDragUpdate() {},
- list: false,
- otherList: [],
- dropClass: '',
- dropOverClass: '',
- dragClass: '',
- dragingClass: '',
- draggedClass: '',
- type: 'vertical'
- };
-
- var Dnd = function (_Component) {
- _inherits(Dnd, _Component);
-
- function Dnd(props) {
- _classCallCheck(this, Dnd);
-
- var _this = _possibleConstructorReturn(this, _Component.call(this, props));
-
- _this.state = {
- items: _this.props.list || []
- };
- return _this;
- }
-
- Dnd.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
- if (!(0, _lodash2["default"])(this.state.items, nextProps.list)) {
- this.setState({
- items: nextProps.list
- });
- }
- };
-
- Dnd.prototype.render = function render() {
- var _this2 = this;
-
- var self = this;
- var DndType = function DndType() {
- switch (_this2.props.type) {
- case 'vertical':
- return _react2["default"].createElement(_SortList2["default"], _this2.props);
- break;
- case 'horizontal':
- return _react2["default"].createElement(_SortList2["default"], _this2.props);
- break;
- case 'betweenVertical':
- return _react2["default"].createElement(_Between2["default"], _this2.props);
- break;
- case 'betweenHorizontal':
- return _react2["default"].createElement(_Between2["default"], _this2.props);
- break;
- default:
- return _react2["default"].createElement(_SortList2["default"], _this2.props);
- break;
- }
- };
- return _react2["default"].createElement(
- 'div',
- null,
- self.state.items.length ? DndType() : _react2["default"].createElement(
- _reactDraggable2["default"],
- _extends({ defaultClassName: this.props.dragClass,
- defaultClassNameDragging: this.props.dragingClass,
- defaultClassNameDragged: this.props.draggedClass
- }, this.props),
- self.props.children
- )
- );
- };
-
- return Dnd;
- }(_react.Component);
-
- Dnd.propTypes = propTypes;
- Dnd.defaultProps = defaultProps;
- Dnd.Drag = _reactDraggable2["default"];
- Dnd.DragDropContext = _reactBeautifulDnd.DragDropContext;
- Dnd.Droppable = _reactBeautifulDnd.Droppable;
- Dnd.Draggable = _reactBeautifulDnd.Draggable;
- exports["default"] = Dnd;
- module.exports = exports['default'];
-
-/***/ }),
-/* 150 */
-/***/ (function(module, exports, __webpack_require__) {
-
- /* WEBPACK VAR INJECTION */(function(process) {'use strict';
-
- Object.defineProperty(exports, '__esModule', { value: true });
-
- function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
-
- var _extends = _interopDefault(__webpack_require__(151));
- var invariant = _interopDefault(__webpack_require__(190));
- var cssBoxModel = __webpack_require__(191);
- var _Object$keys = _interopDefault(__webpack_require__(192));
- var memoizeOne = _interopDefault(__webpack_require__(196));
- var redux = __webpack_require__(197);
- var _Object$assign = _interopDefault(__webpack_require__(152));
- var rafSchd = _interopDefault(__webpack_require__(201));
- var _inheritsLoose = _interopDefault(__webpack_require__(202));
- var React = __webpack_require__(1);
- var React__default = _interopDefault(React);
- var PropTypes = _interopDefault(__webpack_require__(6));
- var reactRedux = __webpack_require__(209);
- var reactMotion = __webpack_require__(234);
-
- var vertical = {
- direction: 'vertical',
- line: 'y',
- crossAxisLine: 'x',
- start: 'top',
- end: 'bottom',
- size: 'height',
- crossAxisStart: 'left',
- crossAxisEnd: 'right',
- crossAxisSize: 'width'
- };
- var horizontal = {
- direction: 'horizontal',
- line: 'x',
- crossAxisLine: 'y',
- start: 'left',
- end: 'right',
- size: 'width',
- crossAxisStart: 'top',
- crossAxisEnd: 'bottom',
- crossAxisSize: 'height'
- };
-
- var origin = {
- x: 0,
- y: 0
- };
- var add = function add(point1, point2) {
- return {
- x: point1.x + point2.x,
- y: point1.y + point2.y
- };
- };
- var subtract = function subtract(point1, point2) {
- return {
- x: point1.x - point2.x,
- y: point1.y - point2.y
- };
- };
- var isEqual = function isEqual(point1, point2) {
- return point1.x === point2.x && point1.y === point2.y;
- };
- var negate = function negate(point) {
- return {
- x: point.x !== 0 ? -point.x : 0,
- y: point.y !== 0 ? -point.y : 0
- };
- };
- var absolute = function absolute(point) {
- return {
- x: Math.abs(point.x),
- y: Math.abs(point.y)
- };
- };
- var patch = function patch(line, value, otherValue) {
- var _ref;
-
- if (otherValue === void 0) {
- otherValue = 0;
- }
-
- return _ref = {}, _ref[line] = value, _ref[line === 'x' ? 'y' : 'x'] = otherValue, _ref;
- };
- var distance = function distance(point1, point2) {
- return Math.sqrt(Math.pow(point2.x - point1.x, 2) + Math.pow(point2.y - point1.y, 2));
- };
- var closest = function closest(target, points) {
- return Math.min.apply(Math, points.map(function (point) {
- return distance(target, point);
- }));
- };
- var apply = function apply(fn) {
- return function (point) {
- return {
- x: fn(point.x),
- y: fn(point.y)
- };
- };
- };
-
- var offsetByPosition = function offsetByPosition(spacing, point) {
- return {
- top: spacing.top + point.y,
- left: spacing.left + point.x,
- bottom: spacing.bottom + point.y,
- right: spacing.right + point.x
- };
- };
- var expandByPosition = function expandByPosition(spacing, position) {
- return {
- top: spacing.top - position.y,
- left: spacing.left - position.x,
- right: spacing.right + position.x,
- bottom: spacing.bottom + position.y
- };
- };
- var getCorners = function getCorners(spacing) {
- return [{
- x: spacing.left,
- y: spacing.top
- }, {
- x: spacing.right,
- y: spacing.top
- }, {
- x: spacing.left,
- y: spacing.bottom
- }, {
- x: spacing.right,
- y: spacing.bottom
- }];
- };
-
- var getMaxScroll = (function (_ref) {
- var scrollHeight = _ref.scrollHeight,
- scrollWidth = _ref.scrollWidth,
- height = _ref.height,
- width = _ref.width;
- var maxScroll = subtract({
- x: scrollWidth,
- y: scrollHeight
- }, {
- x: width,
- y: height
- });
- var adjustedMaxScroll = {
- x: Math.max(0, maxScroll.x),
- y: Math.max(0, maxScroll.y)
- };
- return adjustedMaxScroll;
- });
-
- var clip = function clip(frame, subject) {
- var result = cssBoxModel.getRect({
- top: Math.max(subject.top, frame.top),
- right: Math.min(subject.right, frame.right),
- bottom: Math.min(subject.bottom, frame.bottom),
- left: Math.max(subject.left, frame.left)
- });
-
- if (result.width <= 0 || result.height <= 0) {
- return null;
- }
-
- return result;
- };
- var getDroppableDimension = function getDroppableDimension(_ref) {
- var descriptor = _ref.descriptor,
- isEnabled = _ref.isEnabled,
- direction = _ref.direction,
- client = _ref.client,
- page = _ref.page,
- closest$$1 = _ref.closest;
-
- var scrollable = function () {
- if (!closest$$1) {
- return null;
- }
-
- var maxScroll = getMaxScroll({
- scrollHeight: closest$$1.scrollHeight,
- scrollWidth: closest$$1.scrollWidth,
- height: closest$$1.client.paddingBox.height,
- width: closest$$1.client.paddingBox.width
- });
- return {
- framePageMarginBox: closest$$1.page.marginBox,
- shouldClipSubject: closest$$1.shouldClipSubject,
- scroll: {
- initial: closest$$1.scroll,
- current: closest$$1.scroll,
- max: maxScroll,
- diff: {
- value: origin,
- displacement: origin
- }
- }
- };
- }();
-
- var subjectPageMarginBox = page.marginBox;
- var clippedPageMarginBox = scrollable && scrollable.shouldClipSubject ? clip(scrollable.framePageMarginBox, subjectPageMarginBox) : subjectPageMarginBox;
- var viewport = {
- closestScrollable: scrollable,
- subjectPageMarginBox: subjectPageMarginBox,
- clippedPageMarginBox: clippedPageMarginBox
- };
- var dimension = {
- descriptor: descriptor,
- axis: direction === 'vertical' ? vertical : horizontal,
- isEnabled: isEnabled,
- client: client,
- page: page,
- viewport: viewport
- };
- return dimension;
- };
- var scrollDroppable = function scrollDroppable(droppable, newScroll) {
- !droppable.viewport.closestScrollable ? process.env.NODE_ENV !== "production" ? invariant(false) : invariant(false) : void 0;
- var scrollable = droppable.viewport.closestScrollable;
- var framePageMarginBox = scrollable.framePageMarginBox;
- var scrollDiff = subtract(newScroll, scrollable.scroll.initial);
- var scrollDisplacement = negate(scrollDiff);
- var closestScrollable = {
- framePageMarginBox: scrollable.framePageMarginBox,
- shouldClipSubject: scrollable.shouldClipSubject,
- scroll: {
- initial: scrollable.scroll.initial,
- current: newScroll,
- diff: {
- value: scrollDiff,
- displacement: scrollDisplacement
- },
- max: scrollable.scroll.max
- }
- };
- var displacedSubject = offsetByPosition(droppable.viewport.subjectPageMarginBox, scrollDisplacement);
- var clippedPageMarginBox = closestScrollable.shouldClipSubject ? clip(framePageMarginBox, displacedSubject) : cssBoxModel.getRect(displacedSubject);
- var viewport = {
- closestScrollable: closestScrollable,
- subjectPageMarginBox: droppable.viewport.subjectPageMarginBox,
- clippedPageMarginBox: clippedPageMarginBox
- };
-
- var result = _extends({}, droppable, {
- viewport: viewport
- });
-
- return result;
- };
-
- var toDroppableMap = memoizeOne(function (droppables) {
- return droppables.reduce(function (previous, current) {
- previous[current.descriptor.id] = current;
- return previous;
- }, {});
- });
- var toDraggableMap = memoizeOne(function (draggables) {
- return draggables.reduce(function (previous, current) {
- previous[current.descriptor.id] = current;
- return previous;
- }, {});
- });
- var toDroppableList = memoizeOne(function (droppables) {
- return _Object$keys(droppables).map(function (id) {
- return droppables[id];
- });
- });
- var toDraggableList = memoizeOne(function (draggables) {
- return _Object$keys(draggables).map(function (id) {
- return draggables[id];
- });
- });
-
- var getDraggablesInsideDroppable = memoizeOne(function (droppable, draggables) {
- return toDraggableList(draggables).filter(function (draggable) {
- return droppable.descriptor.id === draggable.descriptor.droppableId;
- }).sort(function (a, b) {
- return a.descriptor.index - b.descriptor.index;
- });
- });
-
- var isWithin = (function (lowerBound, upperBound) {
- return function (value) {
- return value <= upperBound && value >= lowerBound;
- };
- });
-
- var isPositionInFrame = (function (frame) {
- var isWithinVertical = isWithin(frame.top, frame.bottom);
- var isWithinHorizontal = isWithin(frame.left, frame.right);
- return function (point) {
- return isWithinVertical(point.y) && isWithinVertical(point.y) && isWithinHorizontal(point.x) && isWithinHorizontal(point.x);
- };
- });
-
- var getRequiredGrowth = memoizeOne(function (draggable, draggables, droppable) {
- var getResult = function getResult(existingSpace) {
- var requiredSpace = draggable.page.marginBox[droppable.axis.size];
-
- if (requiredSpace <= existingSpace) {
- return null;
- }
-
- var requiredGrowth = patch(droppable.axis.line, requiredSpace - existingSpace);
- return requiredGrowth;
- };
-
- var dimensions = getDraggablesInsideDroppable(droppable, draggables);
-
- if (!dimensions.length) {
- var _existingSpace = droppable.page.marginBox[droppable.axis.size];
- return getResult(_existingSpace);
- }
-
- var endOfDraggables = dimensions[dimensions.length - 1].page.marginBox[droppable.axis.end];
- var endOfDroppable = droppable.page.marginBox[droppable.axis.end];
- var existingSpace = endOfDroppable - endOfDraggables;
- return getResult(existingSpace);
- });
- var getWithGrowth = memoizeOne(function (area, growth) {
- return cssBoxModel.getRect(expandByPosition(area, growth));
- });
-
- var getClippedRectWithPlaceholder = function getClippedRectWithPlaceholder(_ref) {
- var draggable = _ref.draggable,
- draggables = _ref.draggables,
- droppable = _ref.droppable,
- previousDroppableOverId = _ref.previousDroppableOverId;
- var isHome = draggable.descriptor.droppableId === droppable.descriptor.id;
- var wasOver = Boolean(previousDroppableOverId && previousDroppableOverId === droppable.descriptor.id);
- var clippedPageMarginBox = droppable.viewport.clippedPageMarginBox;
-
- if (!clippedPageMarginBox) {
- return clippedPageMarginBox;
- }
-
- if (isHome || !wasOver) {
- return clippedPageMarginBox;
- }
-
- var requiredGrowth = getRequiredGrowth(draggable, draggables, droppable);
-
- if (!requiredGrowth) {
- return clippedPageMarginBox;
- }
-
- var subjectWithGrowth = getWithGrowth(clippedPageMarginBox, requiredGrowth);
- var closestScrollable = droppable.viewport.closestScrollable;
-
- if (!closestScrollable) {
- return subjectWithGrowth;
- }
-
- if (!closestScrollable.shouldClipSubject) {
- return subjectWithGrowth;
- }
-
- return clip(closestScrollable.framePageMarginBox, subjectWithGrowth);
- };
-
- var getDroppableOver = (function (_ref2) {
- var target = _ref2.target,
- draggable = _ref2.draggable,
- draggables = _ref2.draggables,
- droppables = _ref2.droppables,
- previousDroppableOverId = _ref2.previousDroppableOverId;
- var maybe = toDroppableList(droppables).filter(function (droppable) {
- return droppable.isEnabled;
- }).find(function (droppable) {
- var withPlaceholder = getClippedRectWithPlaceholder({
- draggable: draggable,
- draggables: draggables,
- droppable: droppable,
- previousDroppableOverId: previousDroppableOverId
- });
-
- if (!withPlaceholder) {
- return false;
- }
-
- return isPositionInFrame(withPlaceholder)(target);
- });
- return maybe ? maybe.descriptor.id : null;
- });
-
- var noMovement = {
- displaced: [],
- amount: origin,
- isBeyondStartPosition: false
- };
- var noImpact = {
- movement: noMovement,
- direction: null,
- destination: null
- };
-
- var getDisplacementMap = memoizeOne(function (displaced) {
- return displaced.reduce(function (map, displacement) {
- map[displacement.draggableId] = displacement;
- return map;
- }, {});
- });
-
- var isPartiallyVisibleThroughFrame = (function (frame) {
- var isWithinVertical = isWithin(frame.top, frame.bottom);
- var isWithinHorizontal = isWithin(frame.left, frame.right);
- return function (subject) {
- var isContained = isWithinVertical(subject.top) && isWithinVertical(subject.bottom) && isWithinHorizontal(subject.left) && isWithinHorizontal(subject.right);
-
- if (isContained) {
- return true;
- }
-
- var isPartiallyVisibleVertically = isWithinVertical(subject.top) || isWithinVertical(subject.bottom);
- var isPartiallyVisibleHorizontally = isWithinHorizontal(subject.left) || isWithinHorizontal(subject.right);
- var isPartiallyContained = isPartiallyVisibleVertically && isPartiallyVisibleHorizontally;
-
- if (isPartiallyContained) {
- return true;
- }
-
- var isBiggerVertically = subject.top < frame.top && subject.bottom > frame.bottom;
- var isBiggerHorizontally = subject.left < frame.left && subject.right > frame.right;
- var isTargetBiggerThanFrame = isBiggerVertically && isBiggerHorizontally;
-
- if (isTargetBiggerThanFrame) {
- return true;
- }
-
- var isTargetBiggerOnOneAxis = isBiggerVertically && isPartiallyVisibleHorizontally || isBiggerHorizontally && isPartiallyVisibleVertically;
- return isTargetBiggerOnOneAxis;
- };
- });
-
- var isTotallyVisibleThroughFrame = (function (frame) {
- var isWithinVertical = isWithin(frame.top, frame.bottom);
- var isWithinHorizontal = isWithin(frame.left, frame.right);
- return function (subject) {
- var isContained = isWithinVertical(subject.top) && isWithinVertical(subject.bottom) && isWithinHorizontal(subject.left) && isWithinHorizontal(subject.right);
- return isContained;
- };
- });
-
- var isVisible = function isVisible(_ref) {
- var target = _ref.target,
- destination = _ref.destination,
- viewport = _ref.viewport,
- isVisibleThroughFrameFn = _ref.isVisibleThroughFrameFn;
- var displacement = destination.viewport.closestScrollable ? destination.viewport.closestScrollable.scroll.diff.displacement : origin;
- var withDisplacement = offsetByPosition(target, displacement);
-
- if (!destination.viewport.clippedPageMarginBox) {
- return false;
- }
-
- var isVisibleInDroppable = isVisibleThroughFrameFn(destination.viewport.clippedPageMarginBox)(withDisplacement);
- var isVisibleInViewport = isVisibleThroughFrameFn(viewport)(withDisplacement);
- return isVisibleInDroppable && isVisibleInViewport;
- };
-
- var isPartiallyVisible = function isPartiallyVisible(_ref2) {
- var target = _ref2.target,
- destination = _ref2.destination,
- viewport = _ref2.viewport;
- return isVisible({
- target: target,
- destination: destination,
- viewport: viewport,
- isVisibleThroughFrameFn: isPartiallyVisibleThroughFrame
- });
- };
- var isTotallyVisible = function isTotallyVisible(_ref3) {
- var target = _ref3.target,
- destination = _ref3.destination,
- viewport = _ref3.viewport;
- return isVisible({
- target: target,
- destination: destination,
- viewport: viewport,
- isVisibleThroughFrameFn: isTotallyVisibleThroughFrame
- });
- };
-
- var getDisplacement = (function (_ref) {
- var draggable = _ref.draggable,
- destination = _ref.destination,
- previousImpact = _ref.previousImpact,
- viewport = _ref.viewport;
- var id = draggable.descriptor.id;
- var map = getDisplacementMap(previousImpact.movement.displaced);
- var isVisible = isPartiallyVisible({
- target: draggable.page.marginBox,
- destination: destination,
- viewport: viewport
- });
-
- var shouldAnimate = function () {
- if (!isVisible) {
- return false;
- }
-
- var previous = map[id];
-
- if (!previous) {
- return true;
- }
-
- return previous.shouldAnimate;
- }();
-
- var displacement = {
- draggableId: id,
- isVisible: isVisible,
- shouldAnimate: shouldAnimate
- };
- return displacement;
- });
-
- var withDroppableScroll = (function (droppable, point) {
- var closestScrollable = droppable.viewport.closestScrollable;
-
- if (!closestScrollable) {
- return point;
- }
-
- return add(point, closestScrollable.scroll.diff.value);
- });
-
- var inHomeList = (function (_ref) {
- var pageBorderBoxCenter = _ref.pageBorderBoxCenter,
- draggable = _ref.draggable,
- home = _ref.home,
- insideHome = _ref.insideHome,
- previousImpact = _ref.previousImpact,
- viewport = _ref.viewport;
- var axis = home.axis;
- var originalCenter = draggable.page.borderBox.center;
- var currentCenter = withDroppableScroll(home, pageBorderBoxCenter);
- var isBeyondStartPosition = currentCenter[axis.line] - originalCenter[axis.line] > 0;
- var amount = patch(axis.line, draggable.client.marginBox[axis.size]);
- var displaced = insideHome.filter(function (child) {
- if (child === draggable) {
- return false;
- }
-
- var borderBox = child.page.borderBox;
-
- if (isBeyondStartPosition) {
- if (borderBox.center[axis.line] < originalCenter[axis.line]) {
- return false;
- }
-
- return currentCenter[axis.line] > borderBox[axis.start];
- }
-
- if (originalCenter[axis.line] < borderBox.center[axis.line]) {
- return false;
- }
-
- return currentCenter[axis.line] < borderBox[axis.end];
- }).map(function (dimension) {
- return getDisplacement({
- draggable: dimension,
- destination: home,
- previousImpact: previousImpact,
- viewport: viewport.frame
- });
- });
- var ordered = isBeyondStartPosition ? displaced.reverse() : displaced;
-
- var index = function () {
- var startIndex = draggable.descriptor.index;
- var length = ordered.length;
-
- if (!length) {
- return startIndex;
- }
-
- if (isBeyondStartPosition) {
- return startIndex + length;
- }
-
- return startIndex - length;
- }();
-
- var movement = {
- amount: amount,
- displaced: ordered,
- isBeyondStartPosition: isBeyondStartPosition
- };
- var impact = {
- movement: movement,
- direction: axis.direction,
- destination: {
- droppableId: home.descriptor.id,
- index: index
- }
- };
- return impact;
- });
-
- var inForeignList = (function (_ref) {
- var pageBorderBoxCenter = _ref.pageBorderBoxCenter,
- draggable = _ref.draggable,
- destination = _ref.destination,
- insideDestination = _ref.insideDestination,
- previousImpact = _ref.previousImpact,
- viewport = _ref.viewport;
- var axis = destination.axis;
- var currentCenter = withDroppableScroll(destination, pageBorderBoxCenter);
- var displaced = insideDestination.filter(function (child) {
- var threshold = child.page.borderBox[axis.end];
- return threshold > currentCenter[axis.line];
- }).map(function (dimension) {
- return getDisplacement({
- draggable: dimension,
- destination: destination,
- previousImpact: previousImpact,
- viewport: viewport.frame
- });
- });
- var newIndex = insideDestination.length - displaced.length;
- var movement = {
- amount: patch(axis.line, draggable.page.marginBox[axis.size]),
- displaced: displaced,
- isBeyondStartPosition: false
- };
- var impact = {
- movement: movement,
- direction: axis.direction,
- destination: {
- droppableId: destination.descriptor.id,
- index: newIndex
- }
- };
- return impact;
- });
-
- var getDragImpact = (function (_ref) {
- var pageBorderBoxCenter = _ref.pageBorderBoxCenter,
- draggable = _ref.draggable,
- draggables = _ref.draggables,
- droppables = _ref.droppables,
- previousImpact = _ref.previousImpact,
- viewport = _ref.viewport;
- var previousDroppableOverId = previousImpact.destination && previousImpact.destination.droppableId;
- var destinationId = getDroppableOver({
- target: pageBorderBoxCenter,
- draggable: draggable,
- draggables: draggables,
- droppables: droppables,
- previousDroppableOverId: previousDroppableOverId
- });
-
- if (!destinationId) {
- return noImpact;
- }
-
- var destination = droppables[destinationId];
-
- if (!destination.isEnabled) {
- return noImpact;
- }
-
- var home = droppables[draggable.descriptor.droppableId];
- var isWithinHomeDroppable = home.descriptor.id === destinationId;
- var insideDestination = getDraggablesInsideDroppable(destination, draggables);
-
- if (isWithinHomeDroppable) {
- return inHomeList({
- pageBorderBoxCenter: pageBorderBoxCenter,
- draggable: draggable,
- home: home,
- insideHome: insideDestination,
- previousImpact: previousImpact || noImpact,
- viewport: viewport
- });
- }
-
- return inForeignList({
- pageBorderBoxCenter: pageBorderBoxCenter,
- draggable: draggable,
- destination: destination,
- insideDestination: insideDestination,
- previousImpact: previousImpact || noImpact,
- viewport: viewport
- });
- });
-
- var getHomeLocation = (function (critical) {
- return {
- index: critical.draggable.index,
- droppableId: critical.droppable.id
- };
- });
-
- var getSafeClipped = function getSafeClipped(droppable) {
- var rect = droppable.viewport.clippedPageMarginBox;
- !rect ? process.env.NODE_ENV !== "production" ? invariant(false, 'Cannot get clipped area from droppable') : invariant(false) : void 0;
- return rect;
- };
-
- var getBestCrossAxisDroppable = (function (_ref) {
- var isMovingForward = _ref.isMovingForward,
- pageBorderBoxCenter = _ref.pageBorderBoxCenter,
- source = _ref.source,
- droppables = _ref.droppables,
- viewport = _ref.viewport;
- var sourceClipped = source.viewport.clippedPageMarginBox;
-
- if (!sourceClipped) {
- return null;
- }
-
- var axis = source.axis;
- var isBetweenSourceClipped = isWithin(sourceClipped[axis.start], sourceClipped[axis.end]);
- var candidates = toDroppableList(droppables).filter(function (droppable) {
- return droppable !== source;
- }).filter(function (droppable) {
- return droppable.isEnabled;
- }).filter(function (droppable) {
- var clippedPageMarginBox = droppable.viewport.clippedPageMarginBox;
-
- if (!clippedPageMarginBox) {
- return false;
- }
-
- return isPartiallyVisibleThroughFrame(viewport.frame)(clippedPageMarginBox);
- }).filter(function (droppable) {
- var targetClipped = getSafeClipped(droppable);
-
- if (isMovingForward) {
- return sourceClipped[axis.crossAxisEnd] < targetClipped[axis.crossAxisEnd];
- }
-
- return targetClipped[axis.crossAxisStart] < sourceClipped[axis.crossAxisStart];
- }).filter(function (droppable) {
- var targetClipped = getSafeClipped(droppable);
- var isBetweenDestinationClipped = isWithin(targetClipped[axis.start], targetClipped[axis.end]);
- return isBetweenSourceClipped(targetClipped[axis.start]) || isBetweenSourceClipped(targetClipped[axis.end]) || isBetweenDestinationClipped(sourceClipped[axis.start]) || isBetweenDestinationClipped(sourceClipped[axis.end]);
- }).sort(function (a, b) {
- var first = getSafeClipped(a)[axis.crossAxisStart];
- var second = getSafeClipped(b)[axis.crossAxisStart];
-
- if (isMovingForward) {
- return first - second;
- }
-
- return second - first;
- }).filter(function (droppable, index, array) {
- return getSafeClipped(droppable)[axis.crossAxisStart] === getSafeClipped(array[0])[axis.crossAxisStart];
- });
-
- if (!candidates.length) {
- return null;
- }
-
- if (candidates.length === 1) {
- return candidates[0];
- }
-
- var contains = candidates.filter(function (droppable) {
- var isWithinDroppable = isWithin(getSafeClipped(droppable)[axis.start], getSafeClipped(droppable)[axis.end]);
- return isWithinDroppable(pageBorderBoxCenter[axis.line]);
- });
-
- if (contains.length === 1) {
- return contains[0];
- }
-
- if (contains.length > 1) {
- return contains.sort(function (a, b) {
- return getSafeClipped(a)[axis.start] - getSafeClipped(b)[axis.start];
- })[0];
- }
-
- return candidates.sort(function (a, b) {
- var first = closest(pageBorderBoxCenter, getCorners(getSafeClipped(a)));
- var second = closest(pageBorderBoxCenter, getCorners(getSafeClipped(b)));
-
- if (first !== second) {
- return first - second;
- }
-
- return getSafeClipped(a)[axis.start] - getSafeClipped(b)[axis.start];
- })[0];
- });
-
- var withDroppableDisplacement = (function (droppable, point) {
- var closestScrollable = droppable.viewport.closestScrollable;
-
- if (!closestScrollable) {
- return point;
- }
-
- return add(point, closestScrollable.scroll.diff.displacement);
- });
-
- var getClosestDraggable = (function (_ref) {
- var axis = _ref.axis,
- viewport = _ref.viewport,
- pageBorderBoxCenter = _ref.pageBorderBoxCenter,
- destination = _ref.destination,
- insideDestination = _ref.insideDestination;
-
- if (!insideDestination.length) {
- return null;
- }
-
- var result = insideDestination.filter(function (draggable) {
- return isTotallyVisible({
- target: draggable.page.borderBox,
- destination: destination,
- viewport: viewport.frame
- });
- }).sort(function (a, b) {
- var distanceToA = distance(pageBorderBoxCenter, withDroppableDisplacement(destination, a.page.borderBox.center));
- var distanceToB = distance(pageBorderBoxCenter, withDroppableDisplacement(destination, b.page.borderBox.center));
-
- if (distanceToA < distanceToB) {
- return -1;
- }
-
- if (distanceToB < distanceToA) {
- return 1;
- }
-
- return a.page.borderBox[axis.start] - b.page.borderBox[axis.start];
- });
- return result.length ? result[0] : null;
- });
-
- var moveToEdge = (function (_ref) {
- var source = _ref.source,
- sourceEdge = _ref.sourceEdge,
- destination = _ref.destination,
- destinationEdge = _ref.destinationEdge,
- destinationAxis = _ref.destinationAxis;
-
- var getCorner = function getCorner(area) {
- return patch(destinationAxis.line, area[destinationAxis[destinationEdge]], area[destinationAxis.crossAxisStart]);
- };
-
- var corner = getCorner(destination);
- var centerDiff = absolute(subtract(source.center, getCorner(source)));
- var signed = patch(destinationAxis.line, (sourceEdge === 'end' ? -1 : 1) * centerDiff[destinationAxis.line], centerDiff[destinationAxis.crossAxisLine]);
- return add(corner, signed);
- });
-
- var toHomeList = (function (_ref) {
- var amount = _ref.amount,
- homeIndex = _ref.homeIndex,
- movingRelativeTo = _ref.movingRelativeTo,
- insideDestination = _ref.insideDestination,
- draggable = _ref.draggable,
- destination = _ref.destination,
- previousImpact = _ref.previousImpact,
- viewport = _ref.viewport;
- var axis = destination.axis;
- var targetIndex = insideDestination.indexOf(movingRelativeTo);
- !(targetIndex !== -1) ? process.env.NODE_ENV !== "production" ? invariant(false, 'Unable to find target in destination droppable') : invariant(false) : void 0;
-
- if (targetIndex === homeIndex) {
- var _newCenter = draggable.page.borderBox.center;
- var _newImpact = {
- movement: {
- displaced: [],
- amount: amount,
- isBeyondStartPosition: false
- },
- direction: destination.axis.direction,
- destination: {
- droppableId: destination.descriptor.id,
- index: homeIndex
- }
- };
- return {
- pageBorderBoxCenter: withDroppableDisplacement(destination, _newCenter),
- impact: _newImpact
- };
- }
-
- var isMovingPastOriginalIndex = targetIndex > homeIndex;
- var edge = isMovingPastOriginalIndex ? 'end' : 'start';
- var newCenter = moveToEdge({
- source: draggable.page.borderBox,
- sourceEdge: edge,
- destination: isMovingPastOriginalIndex ? movingRelativeTo.page.borderBox : movingRelativeTo.page.marginBox,
- destinationEdge: edge,
- destinationAxis: axis
- });
-
- var modified = function () {
- if (!isMovingPastOriginalIndex) {
- return insideDestination.slice(targetIndex, homeIndex);
- }
-
- var from = homeIndex + 1;
- var to = targetIndex + 1;
- return insideDestination.slice(from, to).reverse();
- }();
-
- var displaced = modified.map(function (dimension) {
- return getDisplacement({
- draggable: dimension,
- destination: destination,
- previousImpact: previousImpact,
- viewport: viewport.frame
- });
- });
- var newImpact = {
- movement: {
- displaced: displaced,
- amount: amount,
- isBeyondStartPosition: isMovingPastOriginalIndex
- },
- direction: axis.direction,
- destination: {
- droppableId: destination.descriptor.id,
- index: targetIndex
- }
- };
- return {
- pageBorderBoxCenter: withDroppableDisplacement(destination, newCenter),
- impact: newImpact
- };
- });
-
- var toForeignList = (function (_ref) {
- var amount = _ref.amount,
- pageBorderBoxCenter = _ref.pageBorderBoxCenter,
- movingRelativeTo = _ref.movingRelativeTo,
- insideDestination = _ref.insideDestination,
- draggable = _ref.draggable,
- destination = _ref.destination,
- previousImpact = _ref.previousImpact,
- viewport = _ref.viewport;
- var axis = destination.axis;
- var isGoingBeforeTarget = Boolean(movingRelativeTo && pageBorderBoxCenter[destination.axis.line] < movingRelativeTo.page.borderBox.center[destination.axis.line]);
-
- if (!movingRelativeTo) {
- var _newCenter = moveToEdge({
- source: draggable.page.borderBox,
- sourceEdge: 'start',
- destination: destination.page.contentBox,
- destinationEdge: 'start',
- destinationAxis: axis
- });
-
- var _newImpact = {
- movement: {
- displaced: [],
- amount: amount,
- isBeyondStartPosition: false
- },
- direction: axis.direction,
- destination: {
- droppableId: destination.descriptor.id,
- index: 0
- }
- };
- return {
- pageBorderBoxCenter: withDroppableDisplacement(destination, _newCenter),
- impact: _newImpact
- };
- }
-
- var targetIndex = insideDestination.indexOf(movingRelativeTo);
- !(targetIndex !== -1) ? process.env.NODE_ENV !== "production" ? invariant(false, 'The target was not found within its droppable') : invariant(false) : void 0;
- var proposedIndex = isGoingBeforeTarget ? targetIndex : targetIndex + 1;
- var newCenter = moveToEdge({
- source: draggable.page.borderBox,
- sourceEdge: 'start',
- destination: movingRelativeTo.page.marginBox,
- destinationEdge: isGoingBeforeTarget ? 'start' : 'end',
- destinationAxis: axis
- });
- var displaced = insideDestination.slice(proposedIndex, insideDestination.length).map(function (dimension) {
- return getDisplacement({
- draggable: dimension,
- destination: destination,
- viewport: viewport.frame,
- previousImpact: previousImpact
- });
- });
- var newImpact = {
- movement: {
- displaced: displaced,
- amount: amount,
- isBeyondStartPosition: false
- },
- direction: axis.direction,
- destination: {
- droppableId: destination.descriptor.id,
- index: proposedIndex
- }
- };
- return {
- pageBorderBoxCenter: withDroppableDisplacement(destination, newCenter),
- impact: newImpact
- };
- });
-
- var moveToNewDroppable = (function (_ref) {
- var pageBorderBoxCenter = _ref.pageBorderBoxCenter,
- destination = _ref.destination,
- insideDestination = _ref.insideDestination,
- draggable = _ref.draggable,
- movingRelativeTo = _ref.movingRelativeTo,
- home = _ref.home,
- previousImpact = _ref.previousImpact,
- viewport = _ref.viewport;
- var amount = patch(destination.axis.line, draggable.client.marginBox[destination.axis.size]);
-
- if (destination.descriptor.id === draggable.descriptor.droppableId) {
- !movingRelativeTo ? process.env.NODE_ENV !== "production" ? invariant(false, 'There will always be a target in the original list') : invariant(false) : void 0;
- return toHomeList({
- amount: amount,
- homeIndex: home.index,
- movingRelativeTo: movingRelativeTo,
- insideDestination: insideDestination,
- draggable: draggable,
- destination: destination,
- previousImpact: previousImpact,
- viewport: viewport
- });
- }
-
- return toForeignList({
- amount: amount,
- pageBorderBoxCenter: pageBorderBoxCenter,
- movingRelativeTo: movingRelativeTo,
- insideDestination: insideDestination,
- draggable: draggable,
- destination: destination,
- previousImpact: previousImpact,
- viewport: viewport
- });
- });
-
- var moveCrossAxis = (function (_ref) {
- var isMovingForward = _ref.isMovingForward,
- pageBorderBoxCenter = _ref.pageBorderBoxCenter,
- draggableId = _ref.draggableId,
- droppableId = _ref.droppableId,
- home = _ref.home,
- draggables = _ref.draggables,
- droppables = _ref.droppables,
- previousImpact = _ref.previousImpact,
- viewport = _ref.viewport;
- var draggable = draggables[draggableId];
- var source = droppables[droppableId];
- var destination = getBestCrossAxisDroppable({
- isMovingForward: isMovingForward,
- pageBorderBoxCenter: pageBorderBoxCenter,
- source: source,
- droppables: droppables,
- viewport: viewport
- });
-
- if (!destination) {
- return null;
- }
-
- var insideDestination = getDraggablesInsideDroppable(destination, draggables);
- var movingRelativeTo = getClosestDraggable({
- axis: destination.axis,
- pageBorderBoxCenter: pageBorderBoxCenter,
- destination: destination,
- insideDestination: insideDestination,
- viewport: viewport
- });
-
- if (insideDestination.length && !movingRelativeTo) {
- return null;
- }
-
- return moveToNewDroppable({
- pageBorderBoxCenter: pageBorderBoxCenter,
- destination: destination,
- draggable: draggable,
- movingRelativeTo: movingRelativeTo,
- insideDestination: insideDestination,
- home: home,
- previousImpact: previousImpact || noImpact,
- viewport: viewport
- });
- });
-
- var isTotallyVisibleInNewLocation = (function (_ref) {
- var draggable = _ref.draggable,
- destination = _ref.destination,
- newPageBorderBoxCenter = _ref.newPageBorderBoxCenter,
- viewport = _ref.viewport;
- var diff = subtract(newPageBorderBoxCenter, draggable.page.borderBox.center);
- var shifted = offsetByPosition(draggable.page.borderBox, diff);
- return isTotallyVisible({
- target: shifted,
- destination: destination,
- viewport: viewport
- });
- });
-
- var withFirstAdded = function withFirstAdded(_ref) {
- var add = _ref.add,
- previousImpact = _ref.previousImpact,
- droppable = _ref.droppable,
- draggables = _ref.draggables,
- viewport = _ref.viewport;
- var newDisplacement = {
- draggableId: add,
- isVisible: true,
- shouldAnimate: true
- };
- var added = [newDisplacement].concat(previousImpact.movement.displaced);
- var withUpdatedVisibility = added.map(function (current) {
- if (current === newDisplacement) {
- return current;
- }
-
- var updated = getDisplacement({
- draggable: draggables[current.draggableId],
- destination: droppable,
- previousImpact: previousImpact,
- viewport: viewport.frame
- });
- return updated;
- });
- return withUpdatedVisibility;
- };
-
- var forceVisibleDisplacement = function forceVisibleDisplacement(current) {
- if (current.isVisible) {
- return current;
- }
-
- return {
- draggableId: current.draggableId,
- isVisible: true,
- shouldAnimate: false
- };
- };
-
- var withFirstRemoved = function withFirstRemoved(_ref2) {
- var dragging = _ref2.dragging,
- isVisibleInNewLocation = _ref2.isVisibleInNewLocation,
- previousImpact = _ref2.previousImpact,
- droppable = _ref2.droppable,
- draggables = _ref2.draggables;
- var last = previousImpact.movement.displaced;
- !last.length ? process.env.NODE_ENV !== "production" ? invariant(false, 'Cannot remove displacement from empty list') : invariant(false) : void 0;
- var withFirstRestored = last.slice(1, last.length);
-
- if (!withFirstRestored.length) {
- return withFirstRestored;
- }
-
- if (isVisibleInNewLocation) {
- return withFirstRestored;
- }
-
- var axis = droppable.axis;
- var sizeOfRestored = draggables[last[0].draggableId].page.marginBox[axis.size];
- var sizeOfDragging = draggables[dragging].page.marginBox[axis.size];
- var buffer = sizeOfRestored + sizeOfDragging;
- var withUpdatedVisibility = withFirstRestored.map(function (displacement, index) {
- if (index === 0) {
- return forceVisibleDisplacement(displacement);
- }
-
- if (buffer > 0) {
- var current = draggables[displacement.draggableId];
- var size = current.page.marginBox[axis.size];
- buffer -= size;
- return forceVisibleDisplacement(displacement);
- }
-
- return {
- draggableId: displacement.draggableId,
- isVisible: false,
- shouldAnimate: false
- };
- });
- return withUpdatedVisibility;
- };
-
- var inHomeList$1 = (function (_ref) {
- var isMovingForward = _ref.isMovingForward,
- draggableId = _ref.draggableId,
- previousPageBorderBoxCenter = _ref.previousPageBorderBoxCenter,
- previousImpact = _ref.previousImpact,
- droppable = _ref.droppable,
- draggables = _ref.draggables,
- viewport = _ref.viewport;
- var location = previousImpact.destination;
- !location ? process.env.NODE_ENV !== "production" ? invariant(false, 'Cannot move to next index in home list when there is no previous destination') : invariant(false) : void 0;
- var draggable = draggables[draggableId];
- var axis = droppable.axis;
- var insideDroppable = getDraggablesInsideDroppable(droppable, draggables);
- var startIndex = draggable.descriptor.index;
- var currentIndex = location.index;
- var proposedIndex = isMovingForward ? currentIndex + 1 : currentIndex - 1;
-
- if (proposedIndex > insideDroppable.length - 1) {
- return null;
- }
-
- if (proposedIndex < 0) {
- return null;
- }
-
- var destination = insideDroppable[proposedIndex];
- var isMovingTowardStart = isMovingForward && proposedIndex <= startIndex || !isMovingForward && proposedIndex >= startIndex;
-
- var edge = function () {
- if (!isMovingTowardStart) {
- return isMovingForward ? 'end' : 'start';
- }
-
- return isMovingForward ? 'start' : 'end';
- }();
-
- var newPageBorderBoxCenter = moveToEdge({
- source: draggable.page.borderBox,
- sourceEdge: edge,
- destination: destination.page.borderBox,
- destinationEdge: edge,
- destinationAxis: droppable.axis
- });
- var isVisibleInNewLocation = isTotallyVisibleInNewLocation({
- draggable: draggable,
- destination: droppable,
- newPageBorderBoxCenter: newPageBorderBoxCenter,
- viewport: viewport.frame
- });
- var displaced = isMovingTowardStart ? withFirstRemoved({
- dragging: draggableId,
- isVisibleInNewLocation: isVisibleInNewLocation,
- previousImpact: previousImpact,
- droppable: droppable,
- draggables: draggables
- }) : withFirstAdded({
- add: destination.descriptor.id,
- previousImpact: previousImpact,
- droppable: droppable,
- draggables: draggables,
- viewport: viewport
- });
- var newImpact = {
- movement: {
- displaced: displaced,
- amount: patch(axis.line, draggable.page.marginBox[axis.size]),
- isBeyondStartPosition: proposedIndex > startIndex
- },
- destination: {
- droppableId: droppable.descriptor.id,
- index: proposedIndex
- },
- direction: droppable.axis.direction
- };
-
- if (isVisibleInNewLocation) {
- return {
- pageBorderBoxCenter: withDroppableDisplacement(droppable, newPageBorderBoxCenter),
- impact: newImpact,
- scrollJumpRequest: null
- };
- }
-
- var distance$$1 = subtract(newPageBorderBoxCenter, previousPageBorderBoxCenter);
- var distanceWithScroll = withDroppableDisplacement(droppable, distance$$1);
- return {
- pageBorderBoxCenter: previousPageBorderBoxCenter,
- impact: newImpact,
- scrollJumpRequest: distanceWithScroll
- };
- });
-
- var inForeignList$1 = (function (_ref) {
- var isMovingForward = _ref.isMovingForward,
- draggableId = _ref.draggableId,
- previousImpact = _ref.previousImpact,
- previousPageBorderBoxCenter = _ref.previousPageBorderBoxCenter,
- droppable = _ref.droppable,
- draggables = _ref.draggables,
- viewport = _ref.viewport;
- !previousImpact.destination ? process.env.NODE_ENV !== "production" ? invariant(false, 'Cannot move to next index where there is no previous destination') : invariant(false) : void 0;
- var location = previousImpact.destination;
- var draggable = draggables[draggableId];
- var axis = droppable.axis;
- var insideForeignDroppable = getDraggablesInsideDroppable(droppable, draggables);
- var currentIndex = location.index;
- var proposedIndex = isMovingForward ? currentIndex + 1 : currentIndex - 1;
- var lastIndex = insideForeignDroppable.length - 1;
-
- if (proposedIndex > insideForeignDroppable.length) {
- return null;
- }
-
- if (proposedIndex < 0) {
- return null;
- }
-
- var movingRelativeTo = insideForeignDroppable[Math.min(proposedIndex, lastIndex)];
- var isMovingPastLastIndex = proposedIndex > lastIndex;
- var sourceEdge = 'start';
-
- var destinationEdge = function () {
- if (isMovingPastLastIndex) {
- return 'end';
- }
-
- return 'start';
- }();
-
- var newPageBorderBoxCenter = moveToEdge({
- source: draggable.page.borderBox,
- sourceEdge: sourceEdge,
- destination: movingRelativeTo.page.marginBox,
- destinationEdge: destinationEdge,
- destinationAxis: droppable.axis
- });
- var isVisibleInNewLocation = isTotallyVisibleInNewLocation({
- draggable: draggable,
- destination: droppable,
- newPageBorderBoxCenter: newPageBorderBoxCenter,
- viewport: viewport.frame
- });
-
- var displaced = function () {
- if (isMovingForward) {
- return withFirstRemoved({
- dragging: draggableId,
- isVisibleInNewLocation: isVisibleInNewLocation,
- previousImpact: previousImpact,
- droppable: droppable,
- draggables: draggables
- });
- }
-
- return withFirstAdded({
- add: movingRelativeTo.descriptor.id,
- previousImpact: previousImpact,
- droppable: droppable,
- draggables: draggables,
- viewport: viewport
- });
- }();
-
- var newImpact = {
- movement: {
- displaced: displaced,
- amount: patch(axis.line, draggable.page.marginBox[axis.size]),
- isBeyondStartPosition: false
- },
- destination: {
- droppableId: droppable.descriptor.id,
- index: proposedIndex
- },
- direction: droppable.axis.direction
- };
-
- if (isVisibleInNewLocation) {
- return {
- pageBorderBoxCenter: withDroppableDisplacement(droppable, newPageBorderBoxCenter),
- impact: newImpact,
- scrollJumpRequest: null
- };
- }
-
- var distanceMoving = subtract(newPageBorderBoxCenter, previousPageBorderBoxCenter);
- var distanceWithScroll = withDroppableDisplacement(droppable, distanceMoving);
- return {
- pageBorderBoxCenter: previousPageBorderBoxCenter,
- impact: newImpact,
- scrollJumpRequest: distanceWithScroll
- };
- });
-
- var moveToNextIndex = (function (args) {
- var draggableId = args.draggableId,
- draggables = args.draggables,
- droppable = args.droppable;
- var draggable = draggables[draggableId];
- var isInHomeList = draggable.descriptor.droppableId === droppable.descriptor.id;
-
- if (!droppable.isEnabled) {
- return null;
- }
-
- if (isInHomeList) {
- return inHomeList$1(args);
- }
-
- return inForeignList$1(args);
- });
-
- var getClientSelection = function getClientSelection(pageBorderBoxCenter, currentScroll) {
- return subtract(pageBorderBoxCenter, currentScroll);
- };
-
- var moveInDirection = (function (_ref) {
- var state = _ref.state,
- type = _ref.type;
-
- var _ref2 = function () {
- if (state.impact.destination) {
- return {
- droppable: state.dimensions.droppables[state.impact.destination.droppableId],
- isMainAxisMovementAllowed: true
- };
- }
-
- return {
- droppable: state.dimensions.droppables[state.critical.droppable.id],
- isMainAxisMovementAllowed: false
- };
- }(),
- droppable = _ref2.droppable,
- isMainAxisMovementAllowed = _ref2.isMainAxisMovementAllowed;
-
- var direction = droppable.axis.direction;
- var isMovingOnMainAxis = direction === 'vertical' && (type === 'MOVE_UP' || type === 'MOVE_DOWN') || direction === 'horizontal' && (type === 'MOVE_LEFT' || type === 'MOVE_RIGHT');
-
- if (isMovingOnMainAxis && !isMainAxisMovementAllowed) {
- return null;
- }
-
- var isMovingForward = type === 'MOVE_DOWN' || type === 'MOVE_RIGHT';
-
- if (isMovingOnMainAxis) {
- var _result = moveToNextIndex({
- isMovingForward: isMovingForward,
- draggableId: state.critical.draggable.id,
- droppable: droppable,
- draggables: state.dimensions.draggables,
- previousPageBorderBoxCenter: state.current.page.borderBoxCenter,
- previousImpact: state.impact,
- viewport: state.viewport
- });
-
- if (!_result) {
- return null;
- }
-
- return {
- impact: _result.impact,
- clientSelection: getClientSelection(_result.pageBorderBoxCenter, state.viewport.scroll.current),
- scrollJumpRequest: _result.scrollJumpRequest
- };
- }
-
- var home = getHomeLocation(state.critical);
- var result = moveCrossAxis({
- isMovingForward: isMovingForward,
- pageBorderBoxCenter: state.current.page.borderBoxCenter,
- draggableId: state.critical.draggable.id,
- droppableId: droppable.descriptor.id,
- home: home,
- draggables: state.dimensions.draggables,
- droppables: state.dimensions.droppables,
- previousImpact: state.impact,
- viewport: state.viewport
- });
-
- if (!result) {
- return null;
- }
-
- return {
- clientSelection: getClientSelection(result.pageBorderBoxCenter, state.viewport.scroll.current),
- impact: result.impact,
- scrollJumpRequest: null
- };
- });
-
- var scrollViewport = (function (viewport, newScroll) {
- var diff = subtract(newScroll, viewport.scroll.initial);
- var displacement = negate(diff);
- var frame = cssBoxModel.getRect({
- top: newScroll.y,
- bottom: newScroll.y + viewport.frame.height,
- left: newScroll.x,
- right: newScroll.x + viewport.frame.width
- });
- var updated = {
- frame: frame,
- scroll: {
- initial: viewport.scroll.initial,
- max: viewport.scroll.max,
- current: newScroll,
- diff: {
- value: diff,
- displacement: displacement
- }
- }
- };
- return updated;
- });
-
- var getHomeImpact = (function (critical, dimensions) {
- var home = dimensions.droppables[critical.droppable.id];
- var axis = home.axis;
- var draggable = dimensions.draggables[critical.draggable.id];
- return {
- movement: {
- displaced: [],
- isBeyondStartPosition: false,
- amount: patch(axis.line, draggable.client.marginBox[axis.size])
- },
- direction: axis.direction,
- destination: getHomeLocation(critical)
- };
- });
-
- var getPageItemPositions = (function (client, windowScroll) {
- return {
- selection: add(client.selection, windowScroll),
- borderBoxCenter: add(client.borderBoxCenter, windowScroll),
- offset: add(client.offset, windowScroll)
- };
- });
-
- function isMovementAllowed(state) {
- return state.phase === 'DRAGGING' || state.phase === 'COLLECTING';
- }
-
- var idle = {
- phase: 'IDLE'
- };
- var preparing = {
- phase: 'PREPARING'
- };
-
- var moveWithPositionUpdates = function moveWithPositionUpdates(_ref) {
- var state = _ref.state,
- clientSelection = _ref.clientSelection,
- shouldAnimate = _ref.shouldAnimate,
- viewport = _ref.viewport,
- impact = _ref.impact,
- scrollJumpRequest = _ref.scrollJumpRequest;
- var newViewport = viewport || state.viewport;
- var currentWindowScroll = newViewport.scroll.current;
-
- var client = function () {
- var offset = subtract(clientSelection, state.initial.client.selection);
- return {
- offset: offset,
- selection: clientSelection,
- borderBoxCenter: add(state.initial.client.borderBoxCenter, offset)
- };
- }();
-
- var page = getPageItemPositions(client, currentWindowScroll);
- var current = {
- client: client,
- page: page
- };
-
- if (state.phase === 'COLLECTING') {
- return _extends({
- phase: 'COLLECTING'
- }, state, {
- current: current
- });
- }
-
- var newImpact = impact || getDragImpact({
- pageBorderBoxCenter: page.borderBoxCenter,
- draggable: state.dimensions.draggables[state.critical.draggable.id],
- draggables: state.dimensions.draggables,
- droppables: state.dimensions.droppables,
- previousImpact: state.impact,
- viewport: newViewport
- });
-
- var result = _extends({}, state, {
- current: current,
- shouldAnimate: shouldAnimate,
- impact: newImpact,
- scrollJumpRequest: scrollJumpRequest || null,
- viewport: newViewport
- });
-
- return result;
- };
-
- var reducer = (function (state, action) {
- if (state === void 0) {
- state = idle;
- }
-
- if (action.type === 'CLEAN') {
- return idle;
- }
-
- if (action.type === 'PREPARE') {
- return preparing;
- }
-
- if (action.type === 'INITIAL_PUBLISH') {
- !(state.phase === 'PREPARING') ? process.env.NODE_ENV !== "production" ? invariant(false, 'INITIAL_PUBLISH must come after a PREPARING phase') : invariant(false) : void 0;
- var _action$payload = action.payload,
- critical = _action$payload.critical,
- client = _action$payload.client,
- viewport = _action$payload.viewport,
- dimensions = _action$payload.dimensions,
- autoScrollMode = _action$payload.autoScrollMode;
- var initial = {
- client: client,
- page: {
- selection: add(client.selection, viewport.scroll.initial),
- borderBoxCenter: add(client.selection, viewport.scroll.initial),
- offset: origin
- }
- };
- var result = {
- phase: 'DRAGGING',
- isDragging: true,
- critical: critical,
- autoScrollMode: autoScrollMode,
- dimensions: dimensions,
- initial: initial,
- current: initial,
- impact: getHomeImpact(critical, dimensions),
- viewport: viewport,
- scrollJumpRequest: null,
- shouldAnimate: false
- };
- return result;
- }
-
- if (action.type === 'COLLECTION_STARTING') {
- var _extends2;
-
- if (state.phase === 'COLLECTING' || state.phase === 'DROP_PENDING') {
- return state;
- }
-
- !(state.phase === 'DRAGGING') ? process.env.NODE_ENV !== "production" ? invariant(false, "Collection cannot start from phase " + state.phase) : invariant(false) : void 0;
-
- var _result = _extends({
- phase: 'COLLECTING'
- }, state, (_extends2 = {}, _extends2["phase"] = 'COLLECTING', _extends2));
-
- return _result;
- }
-
- if (action.type === 'PUBLISH') {
- !(state.phase === 'COLLECTING' || state.phase === 'DROP_PENDING') ? process.env.NODE_ENV !== "production" ? invariant(false, "Unexpected " + action.type + " received in phase " + state.phase) : invariant(false) : void 0;
- process.env.NODE_ENV !== "production" ? invariant(false, "Dynamic additions and removals of Draggable and Droppable components\n is currently not supported. But will be soon!") : invariant(false);
- }
-
- if (action.type === 'MOVE') {
- if (state.phase === 'PREPARING') {
- return state;
- }
-
- if (state.phase === 'DROP_PENDING') {
- return state;
- }
-
- !isMovementAllowed(state) ? process.env.NODE_ENV !== "production" ? invariant(false, action.type + " not permitted in phase " + state.phase) : invariant(false) : void 0;
- var _action$payload2 = action.payload,
- _client = _action$payload2.client,
- shouldAnimate = _action$payload2.shouldAnimate;
-
- if (state.shouldAnimate === shouldAnimate && isEqual(_client, state.current.client.selection)) {
- return state;
- }
-
- var impact = state.autoScrollMode === 'JUMP' ? state.impact : null;
- return moveWithPositionUpdates({
- state: state,
- clientSelection: _client,
- impact: impact,
- shouldAnimate: shouldAnimate
- });
- }
-
- if (action.type === 'UPDATE_DROPPABLE_SCROLL') {
- var _extends3, _extends4;
-
- if (state.phase === 'PREPARING') {
- return state;
- }
-
- if (state.phase === 'DROP_PENDING') {
- return state;
- }
-
- !isMovementAllowed(state) ? process.env.NODE_ENV !== "production" ? invariant(false, action.type + " not permitted in phase " + state.phase) : invariant(false) : void 0;
- var _action$payload3 = action.payload,
- id = _action$payload3.id,
- offset = _action$payload3.offset;
- var target = state.dimensions.droppables[id];
-
- if (!target) {
- return state;
- }
-
- var updated = scrollDroppable(target, offset);
-
- var _dimensions = _extends({}, state.dimensions, {
- droppables: _extends({}, state.dimensions.droppables, (_extends3 = {}, _extends3[id] = updated, _extends3))
- });
-
- var _impact = function () {
- !isMovementAllowed(state) ? process.env.NODE_ENV !== "production" ? invariant(false) : invariant(false) : void 0;
-
- if (state.autoScrollMode === 'JUMP') {
- return state.impact;
- }
-
- return getDragImpact({
- pageBorderBoxCenter: state.current.page.borderBoxCenter,
- draggable: _dimensions.draggables[state.critical.draggable.id],
- draggables: _dimensions.draggables,
- droppables: _dimensions.droppables,
- previousImpact: state.impact,
- viewport: state.viewport
- });
- }();
-
- return _extends({
- phase: 'DRAGGING'
- }, state, (_extends4 = {}, _extends4["phase"] = state.phase, _extends4.impact = _impact, _extends4.dimensions = _dimensions, _extends4.scrollJumpRequest = null, _extends4));
- }
-
- if (action.type === 'UPDATE_DROPPABLE_IS_ENABLED') {
- var _extends5, _extends6;
-
- if (state.phase === 'DROP_PENDING') {
- return state;
- }
-
- !isMovementAllowed(state) ? process.env.NODE_ENV !== "production" ? invariant(false, "Attempting to move in an unsupported phase " + state.phase) : invariant(false) : void 0;
- var _action$payload4 = action.payload,
- _id = _action$payload4.id,
- isEnabled = _action$payload4.isEnabled;
- var _target = state.dimensions.droppables[_id];
- !_target ? process.env.NODE_ENV !== "production" ? invariant(false, "Cannot find Droppable[id: " + _id + "] to toggle its enabled state") : invariant(false) : void 0;
- !(_target.isEnabled !== isEnabled) ? process.env.NODE_ENV !== "production" ? invariant(false, "Trying to set droppable isEnabled to " + String(isEnabled) + "\n but it is already " + String(_target.isEnabled)) : invariant(false) : void 0;
-
- var _updated = _extends({}, _target, {
- isEnabled: isEnabled
- });
-
- var _dimensions2 = _extends({}, state.dimensions, {
- droppables: _extends({}, state.dimensions.droppables, (_extends5 = {}, _extends5[_id] = _updated, _extends5))
- });
-
- var _impact2 = getDragImpact({
- pageBorderBoxCenter: state.current.page.borderBoxCenter,
- draggable: _dimensions2.draggables[state.critical.draggable.id],
- draggables: _dimensions2.draggables,
- droppables: _dimensions2.droppables,
- previousImpact: state.impact,
- viewport: state.viewport
- });
-
- return _extends({
- phase: 'DRAGGING'
- }, state, (_extends6 = {}, _extends6["phase"] = state.phase, _extends6.impact = _impact2, _extends6.dimensions = _dimensions2, _extends6));
- }
-
- if (action.type === 'MOVE_BY_WINDOW_SCROLL') {
- if (state.phase === 'PREPARING') {
- return state;
- }
-
- if (state.phase === 'DROP_PENDING' || state.phase === 'DROP_ANIMATING') {
- return state;
- }
-
- !isMovementAllowed(state) ? process.env.NODE_ENV !== "production" ? invariant(false, "Cannot move by window in phase " + state.phase) : invariant(false) : void 0;
- var newScroll = action.payload.scroll;
-
- if (isEqual(state.viewport.scroll.current, newScroll)) {
- return state;
- }
-
- var isJumpScrolling = state.autoScrollMode === 'JUMP';
-
- var _impact3 = isJumpScrolling ? state.impact : null;
-
- var _viewport = scrollViewport(state.viewport, newScroll);
-
- return moveWithPositionUpdates({
- state: state,
- clientSelection: state.current.client.selection,
- viewport: _viewport,
- shouldAnimate: false,
- impact: _impact3
- });
- }
-
- if (action.type === 'UPDATE_VIEWPORT_MAX_SCROLL') {
- var _extends7;
-
- !state.isDragging ? process.env.NODE_ENV !== "production" ? invariant(false, 'Cannot update the max viewport scroll if not dragging') : invariant(false) : void 0;
- var existing = state.viewport;
-
- var _viewport2 = _extends({}, existing, {
- scroll: _extends({}, existing.scroll, {
- max: action.payload
- })
- });
-
- return _extends({
- phase: 'DRAGGING'
- }, state, (_extends7 = {}, _extends7["phase"] = state.phase, _extends7.viewport = _viewport2, _extends7));
- }
-
- if (action.type === 'MOVE_UP' || action.type === 'MOVE_DOWN' || action.type === 'MOVE_LEFT' || action.type === 'MOVE_RIGHT') {
- if (state.phase === 'PREPARING') {
- return state;
- }
-
- if (state.phase === 'COLLECTING' || state.phase === 'DROP_PENDING') {
- return state;
- }
-
- !(state.phase === 'DRAGGING') ? process.env.NODE_ENV !== "production" ? invariant(false, action.type + " received while not in DRAGGING phase") : invariant(false) : void 0;
-
- var _result2 = moveInDirection({
- state: state,
- type: action.type
- });
-
- if (!_result2) {
- return state;
- }
-
- return moveWithPositionUpdates({
- state: state,
- impact: _result2.impact,
- clientSelection: _result2.clientSelection,
- shouldAnimate: true,
- scrollJumpRequest: _result2.scrollJumpRequest
- });
- }
-
- if (action.type === 'DROP_PENDING') {
- var _extends8;
-
- var reason = action.payload.reason;
- !(state.phase === 'COLLECTING') ? process.env.NODE_ENV !== "production" ? invariant(false, 'Can only move into the DROP_PENDING phase from the COLLECTING phase') : invariant(false) : void 0;
-
- var newState = _extends({
- phase: 'DROP_PENDING'
- }, state, (_extends8 = {}, _extends8["phase"] = 'DROP_PENDING', _extends8.isWaiting = true, _extends8.reason = reason, _extends8));
-
- return newState;
- }
-
- if (action.type === 'DROP_ANIMATE') {
- var pending = action.payload;
- !(state.phase === 'DRAGGING' || state.phase === 'DROP_PENDING') ? process.env.NODE_ENV !== "production" ? invariant(false, "Cannot animate drop from phase " + state.phase) : invariant(false) : void 0;
- var _result3 = {
- phase: 'DROP_ANIMATING',
- pending: pending,
- dimensions: state.dimensions
- };
- return _result3;
- }
-
- if (action.type === 'DROP_COMPLETE') {
- return idle;
- }
-
- return state;
- });
-
- var lift = function lift(args) {
- return {
- type: 'LIFT',
- payload: args
- };
- };
- var initialPublish = function initialPublish(args) {
- return {
- type: 'INITIAL_PUBLISH',
- payload: args
- };
- };
- var publish = function publish(args) {
- return {
- type: 'PUBLISH',
- payload: args
- };
- };
- var collectionStarting = function collectionStarting() {
- return {
- type: 'COLLECTION_STARTING',
- payload: null
- };
- };
- var updateDroppableScroll = function updateDroppableScroll(args) {
- return {
- type: 'UPDATE_DROPPABLE_SCROLL',
- payload: args
- };
- };
- var updateDroppableIsEnabled = function updateDroppableIsEnabled(args) {
- return {
- type: 'UPDATE_DROPPABLE_IS_ENABLED',
- payload: args
- };
- };
- var move = function move(args) {
- return {
- type: 'MOVE',
- payload: args
- };
- };
- var moveByWindowScroll = function moveByWindowScroll(args) {
- return {
- type: 'MOVE_BY_WINDOW_SCROLL',
- payload: args
- };
- };
- var updateViewportMaxScroll = function updateViewportMaxScroll(max) {
- return {
- type: 'UPDATE_VIEWPORT_MAX_SCROLL',
- payload: max
- };
- };
- var moveUp = function moveUp() {
- return {
- type: 'MOVE_UP',
- payload: null
- };
- };
- var moveDown = function moveDown() {
- return {
- type: 'MOVE_DOWN',
- payload: null
- };
- };
- var moveRight = function moveRight() {
- return {
- type: 'MOVE_RIGHT',
- payload: null
- };
- };
- var moveLeft = function moveLeft() {
- return {
- type: 'MOVE_LEFT',
- payload: null
- };
- };
- var clean = function clean() {
- return {
- type: 'CLEAN',
- payload: null
- };
- };
- var prepare = function prepare() {
- return {
- type: 'PREPARE',
- payload: null
- };
- };
- var animateDrop = function animateDrop(pending) {
- return {
- type: 'DROP_ANIMATE',
- payload: pending
- };
- };
- var completeDrop = function completeDrop(result) {
- return {
- type: 'DROP_COMPLETE',
- payload: result
- };
- };
- var drop = function drop(args) {
- return {
- type: 'DROP',
- payload: args
- };
- };
- var dropPending = function dropPending(args) {
- return {
- type: 'DROP_PENDING',
- payload: args
- };
- };
- var dropAnimationFinished = function dropAnimationFinished() {
- return {
- type: 'DROP_ANIMATION_FINISHED',
- payload: null
- };
- };
-
- var lift$1 = (function (getMarshal) {
- var timeoutId = null;
-
- var tryAbortCriticalCollection = function tryAbortCriticalCollection() {
- if (timeoutId == null) {
- return;
- }
-
- clearTimeout(timeoutId);
- timeoutId = null;
- };
-
- return function (_ref) {
- var getState = _ref.getState,
- dispatch = _ref.dispatch;
- return function (next) {
- return function (action) {
- if (action.type === 'CLEAN') {
- tryAbortCriticalCollection();
- next(action);
- return;
- }
-
- if (action.type !== 'LIFT') {
- next(action);
- return;
- }
-
- !!timeoutId ? process.env.NODE_ENV !== "production" ? invariant(false, 'There should not be a pending complete lift phase when a lift action is fired') : invariant(false) : void 0;
- var marshal = getMarshal();
- var _action$payload = action.payload,
- id = _action$payload.id,
- client = _action$payload.client,
- autoScrollMode = _action$payload.autoScrollMode,
- viewport = _action$payload.viewport;
- var initial = getState();
-
- if (initial.phase === 'DROP_ANIMATING') {
- dispatch(completeDrop(initial.pending.result));
- }
-
- var postFlushState = getState();
- !(postFlushState.phase === 'IDLE') ? process.env.NODE_ENV !== "production" ? invariant(false, 'Incorrect phase to start a drag') : invariant(false) : void 0;
- dispatch(prepare());
- timeoutId = setTimeout(function () {
- timeoutId = null;
- var state = getState();
- !(state.phase === 'PREPARING') ? process.env.NODE_ENV !== "production" ? invariant(false, 'Invalid phase for completing lift') : invariant(false) : void 0;
- var scrollOptions = {
- shouldPublishImmediately: autoScrollMode === 'JUMP'
- };
- var request = {
- draggableId: id,
- scrollOptions: scrollOptions
- };
-
- var _marshal$startPublish = marshal.startPublishing(request, viewport.scroll.current),
- critical = _marshal$startPublish.critical,
- dimensions = _marshal$startPublish.dimensions;
-
- dispatch(initialPublish({
- critical: critical,
- dimensions: dimensions,
- client: client,
- autoScrollMode: autoScrollMode,
- viewport: viewport
- }));
- });
- };
- };
- };
- });
-
- var style = (function (marshal) {
- return function () {
- return function (next) {
- return function (action) {
- if (action.type === 'INITIAL_PUBLISH') {
- marshal.dragging();
- }
-
- if (action.type === 'COLLECTION_STARTING') {
- marshal.collecting();
- }
-
- if (action.type === 'PUBLISH') {
- marshal.dragging();
- }
-
- if (action.type === 'DROP_ANIMATE') {
- marshal.dropping(action.payload.result.reason);
- }
-
- if (action.type === 'CLEAN' || action.type === 'DROP_COMPLETE') {
- marshal.resting();
- }
-
- next(action);
- };
- };
- };
- });
-
- var getNewHomeClientBorderBoxCenter = (function (_ref) {
- var movement = _ref.movement,
- draggable = _ref.draggable,
- draggables = _ref.draggables,
- destination = _ref.destination;
- var originalCenter = draggable.client.borderBox.center;
-
- if (destination == null) {
- return originalCenter;
- }
-
- var displaced = movement.displaced,
- isBeyondStartPosition = movement.isBeyondStartPosition;
- var axis = destination.axis;
- var isWithinHomeDroppable = destination.descriptor.id === draggable.descriptor.droppableId;
-
- if (isWithinHomeDroppable && !displaced.length) {
- return originalCenter;
- }
-
- var draggablesInDestination = getDraggablesInsideDroppable(destination, draggables);
-
- var movingRelativeTo = function () {
- if (isWithinHomeDroppable) {
- return draggables[displaced[0].draggableId].client.borderBox;
- }
-
- if (displaced.length) {
- return draggables[displaced[0].draggableId].client.borderBox;
- }
-
- if (draggablesInDestination.length) {
- return draggablesInDestination[draggablesInDestination.length - 1].client.marginBox;
- }
-
- return destination.client.contentBox;
- }();
-
- var _ref2 = function () {
- if (isWithinHomeDroppable) {
- if (isBeyondStartPosition) {
- return {
- sourceEdge: 'end',
- destinationEdge: 'end'
- };
- }
-
- return {
- sourceEdge: 'start',
- destinationEdge: 'start'
- };
- }
-
- if (!displaced.length && draggablesInDestination.length) {
- return {
- sourceEdge: 'start',
- destinationEdge: 'end'
- };
- }
-
- return {
- sourceEdge: 'start',
- destinationEdge: 'start'
- };
- }(),
- sourceEdge = _ref2.sourceEdge,
- destinationEdge = _ref2.destinationEdge;
-
- var source = draggable.client.borderBox;
- var targetCenter = moveToEdge({
- source: source,
- sourceEdge: sourceEdge,
- destination: movingRelativeTo,
- destinationEdge: destinationEdge,
- destinationAxis: axis
- });
- return targetCenter;
- });
-
- var getScrollDisplacement = function getScrollDisplacement(droppable, viewport) {
- return withDroppableDisplacement(droppable, viewport.scroll.diff.displacement);
- };
-
- var drop$1 = (function (_ref) {
- var getState = _ref.getState,
- dispatch = _ref.dispatch;
- return function (next) {
- return function (action) {
- if (action.type !== 'DROP') {
- next(action);
- return;
- }
-
- var state = getState();
- var reason = action.payload.reason;
-
- if (state.phase === 'COLLECTING') {
- dispatch(dropPending({
- reason: reason
- }));
- return;
- }
-
- if (state.phase === 'PREPARING') {
- dispatch(clean());
- return;
- }
-
- if (state.phase === 'IDLE') {
- return;
- }
-
- var isWaitingForDrop = state.phase === 'DROP_PENDING' && state.isWaiting;
- !!isWaitingForDrop ? process.env.NODE_ENV !== "production" ? invariant(false, 'A DROP action occurred while DROP_PENDING and still waiting') : invariant(false) : void 0;
- !(state.phase === 'DRAGGING' || state.phase === 'DROP_PENDING') ? process.env.NODE_ENV !== "production" ? invariant(false, "Cannot drop in phase: " + state.phase) : invariant(false) : void 0;
- var critical = state.critical;
- var dimensions = state.dimensions;
- var impact = reason === 'DROP' ? state.impact : noImpact;
- var home = dimensions.droppables[state.critical.droppable.id];
- var draggable = dimensions.draggables[state.critical.draggable.id];
- var droppable = impact && impact.destination ? dimensions.droppables[impact.destination.droppableId] : null;
- var source = {
- index: critical.draggable.index,
- droppableId: critical.droppable.id
- };
- var destination = reason === 'DROP' ? impact.destination : null;
- var result = {
- draggableId: draggable.descriptor.id,
- type: home.descriptor.type,
- source: source,
- destination: destination,
- reason: reason
- };
-
- var clientOffset = function () {
- if (reason === 'CANCEL') {
- return origin;
- }
-
- var newBorderBoxClientCenter = getNewHomeClientBorderBoxCenter({
- movement: impact.movement,
- draggable: draggable,
- draggables: dimensions.draggables,
- destination: droppable
- });
- return subtract(newBorderBoxClientCenter, draggable.client.borderBox.center);
- }();
-
- var newHomeOffset = add(clientOffset, getScrollDisplacement(droppable || home, state.viewport));
- var isAnimationRequired = !isEqual(state.current.client.offset, newHomeOffset);
- var pending = {
- newHomeOffset: newHomeOffset,
- result: result,
- impact: impact
- };
-
- if (isAnimationRequired) {
- dispatch(animateDrop(pending));
- return;
- }
-
- dispatch(completeDrop(result));
- };
- };
- });
-
- var onDragStart = function onDragStart(start) {
- return "\n You have lifted an item in position " + (start.source.index + 1) + ".\n Use the arrow keys to move, space bar to drop, and escape to cancel.\n";
- };
-
- var onDragUpdate = function onDragUpdate(update) {
- if (!update.destination) {
- return 'You are currently not dragging over a droppable area';
- }
-
- if (update.source.droppableId === update.destination.droppableId) {
- return "You have moved the item to position " + (update.destination.index + 1);
- }
-
- return "\n You have moved the item from list " + update.source.droppableId + " in position " + (update.source.index + 1) + "\n to list " + update.destination.droppableId + " in position " + (update.destination.index + 1) + "\n ";
- };
-
- var onDragEnd = function onDragEnd(result) {
- if (result.reason === 'CANCEL') {
- return "\n Movement cancelled.\n The item has returned to its starting position of " + (result.source.index + 1) + "\n ";
- }
-
- if (!result.destination) {
- return "\n The item has been dropped while not over a droppable location.\n The item has returned to its starting position of " + (result.source.index + 1) + "\n ";
- }
-
- if (result.source.droppableId === result.destination.droppableId) {
- if (result.source.index === result.destination.index) {
- return "\n You have dropped the item.\n It has been dropped on its starting position of " + (result.source.index + 1) + "\n ";
- }
-
- return "\n You have dropped the item.\n It has moved from position " + (result.source.index + 1) + " to " + (result.destination.index + 1) + "\n ";
- }
-
- return "\n You have dropped the item.\n It has moved from position " + (result.source.index + 1) + " in list " + result.source.droppableId + "\n to position " + (result.destination.index + 1) + " in list " + result.destination.droppableId + "\n ";
- };
-
- var preset = {
- onDragStart: onDragStart,
- onDragUpdate: onDragUpdate,
- onDragEnd: onDragEnd
- };
-
- var records = {};
- var flag = '__react-beautiful-dnd-debug-timings-hook__';
-
- var isTimingsEnabled = function isTimingsEnabled() {
- return Boolean(window[flag]);
- };
-
- var start = function start(key) {
- if (process.env.NODE_ENV !== 'production') {
- if (!isTimingsEnabled()) {
- return;
- }
-
- var now = performance.now();
- records[key] = now;
- }
- };
- var finish = function finish(key) {
- if (process.env.NODE_ENV !== 'production') {
- if (!isTimingsEnabled()) {
- return;
- }
-
- var now = performance.now();
- var previous = records[key];
- !previous ? process.env.NODE_ENV !== "production" ? invariant(false, 'cannot finish timing as no previous time found') : invariant(false) : void 0;
- var result = now - previous;
- var rounded = result.toFixed(2);
-
- var style = function () {
- if (result < 12) {
- return {
- textColor: 'green',
- symbol: '✅'
- };
- }
-
- if (result < 40) {
- return {
- textColor: 'orange',
- symbol: '⚠️'
- };
- }
-
- return {
- textColor: 'red',
- symbol: '❌'
- };
- }();
-
- console.log(style.symbol + " %cTiming %c" + rounded + " %cms %c" + key, 'color: blue; font-weight: bold; ', "color: " + style.textColor + "; font-size: 1.1em;", 'color: grey;', 'color: purple; font-weight: bold;');
- }
- };
-
- var withTimings = function withTimings(key, fn) {
- start(key);
- fn();
- finish(key);
- };
-
- var areLocationsEqual = function areLocationsEqual(first, second) {
- if (first == null && second == null) {
- return true;
- }
-
- if (first == null || second == null) {
- return false;
- }
-
- return first.droppableId === second.droppableId && first.index === second.index;
- };
-
- var isCriticalEqual = function isCriticalEqual(first, second) {
- if (first === second) {
- return true;
- }
-
- var isDraggableEqual = first.draggable.id === second.draggable.id && first.draggable.droppableId === second.draggable.droppableId && first.draggable.type === second.draggable.type && first.draggable.index === second.draggable.index;
- var isDroppableEqual = first.droppable.id === second.droppable.id && first.droppable.type === second.droppable.type;
- return isDraggableEqual && isDroppableEqual;
- };
-
- var getExpiringAnnounce = function getExpiringAnnounce(announce) {
- var wasCalled = false;
- var isExpired = false;
- setTimeout(function () {
- isExpired = true;
- });
-
- var result = function result(message) {
- if (wasCalled) {
- if (process.env.NODE_ENV !== 'production') {
- console.warn('Announcement already made. Not making a second announcement');
- }
-
- return;
- }
-
- if (isExpired) {
- if (process.env.NODE_ENV !== 'production') {
- console.warn("\n Announcements cannot be made asynchronously.\n Default message has already been announced.\n ");
- }
-
- return;
- }
-
- wasCalled = true;
- announce(message);
- };
-
- result.wasCalled = function () {
- return wasCalled;
- };
-
- return result;
- };
-
- var getDragStart = function getDragStart(critical) {
- return {
- draggableId: critical.draggable.id,
- type: critical.droppable.type,
- source: {
- droppableId: critical.droppable.id,
- index: critical.draggable.index
- }
- };
- };
-
- var hooks = (function (getHooks, announce) {
- var execute = function execute(hook, data, getDefaultMessage) {
- if (!hook) {
- announce(getDefaultMessage(data));
- return;
- }
-
- var willExpire = getExpiringAnnounce(announce);
- var provided = {
- announce: willExpire
- };
- hook(data, provided);
-
- if (!willExpire.wasCalled()) {
- announce(getDefaultMessage(data));
- }
- };
-
- var publisher = function () {
- var lastLocation = null;
- var lastCritical = null;
- var _isDragStartPublished = false;
-
- var beforeStart = function beforeStart(critical) {
- !!_isDragStartPublished ? process.env.NODE_ENV !== "production" ? invariant(false, 'Cannot fire onBeforeDragStart as a drag start has already been published') : invariant(false) : void 0;
- withTimings('onBeforeDragStart', function () {
- var fn = getHooks().onBeforeDragStart;
-
- if (fn) {
- fn(getDragStart(critical));
- }
- });
- };
-
- var start$$1 = function start$$1(critical) {
- !!_isDragStartPublished ? process.env.NODE_ENV !== "production" ? invariant(false, 'Cannot fire onBeforeDragStart as a drag start has already been published') : invariant(false) : void 0;
- var data = getDragStart(critical);
- lastCritical = critical;
- lastLocation = data.source;
- _isDragStartPublished = true;
- withTimings('onDragStart', function () {
- return execute(getHooks().onDragStart, data, preset.onDragStart);
- });
- };
-
- var move = function move(critical, location) {
- !(_isDragStartPublished && lastCritical) ? process.env.NODE_ENV !== "production" ? invariant(false, 'Cannot fire onDragMove when onDragStart has not been called') : invariant(false) : void 0;
- var hasCriticalChanged = !isCriticalEqual(critical, lastCritical);
-
- if (hasCriticalChanged) {
- lastCritical = critical;
- }
-
- var hasLocationChanged = !areLocationsEqual(lastLocation, location);
-
- if (hasLocationChanged) {
- lastLocation = location;
- }
-
- if (!hasCriticalChanged && !hasLocationChanged) {
- return;
- }
-
- var data = _extends({}, getDragStart(critical), {
- destination: location
- });
-
- withTimings('onDragUpdate', function () {
- return execute(getHooks().onDragUpdate, data, preset.onDragUpdate);
- });
- };
-
- var drop = function drop(result) {
- !_isDragStartPublished ? process.env.NODE_ENV !== "production" ? invariant(false, 'Cannot fire onDragEnd when there is no matching onDragStart') : invariant(false) : void 0;
- _isDragStartPublished = false;
- lastLocation = null;
- lastCritical = null;
- withTimings('onDragEnd', function () {
- return execute(getHooks().onDragEnd, result, preset.onDragEnd);
- });
- };
-
- var abort = function abort() {
- !(_isDragStartPublished && lastCritical) ? process.env.NODE_ENV !== "production" ? invariant(false, 'Cannot cancel when onDragStart not fired') : invariant(false) : void 0;
-
- var result = _extends({}, getDragStart(lastCritical), {
- destination: null,
- reason: 'CANCEL'
- });
-
- drop(result);
- };
-
- return {
- beforeStart: beforeStart,
- start: start$$1,
- move: move,
- drop: drop,
- abort: abort,
- isDragStartPublished: function isDragStartPublished() {
- return _isDragStartPublished;
- }
- };
- }();
-
- return function (store) {
- return function (next) {
- return function (action) {
- if (action.type === 'INITIAL_PUBLISH') {
- var critical = action.payload.critical;
- publisher.beforeStart(critical);
- next(action);
- publisher.start(critical);
- return;
- }
-
- next(action);
-
- if (action.type === 'DROP_COMPLETE') {
- var result = action.payload;
- publisher.drop(result);
- return;
- }
-
- if (action.type === 'CLEAN') {
- if (publisher.isDragStartPublished()) {
- publisher.abort();
- }
-
- return;
- }
-
- if (!publisher.isDragStartPublished()) {
- return;
- }
-
- var state = store.getState();
-
- if (state.phase === 'DRAGGING') {
- publisher.move(state.critical, state.impact.destination);
- }
- };
- };
- };
- });
-
- var dropAnimationFinish = (function (store) {
- return function (next) {
- return function (action) {
- if (action.type !== 'DROP_ANIMATION_FINISHED') {
- next(action);
- return;
- }
-
- var state = store.getState();
- !(state.phase === 'DROP_ANIMATING') ? process.env.NODE_ENV !== "production" ? invariant(false, 'Cannot finish a drop animating when no drop is occurring') : invariant(false) : void 0;
- store.dispatch(completeDrop(state.pending.result));
- };
- };
- });
-
- var dimensionMarshalStopper = (function (getMarshal) {
- return function () {
- return function (next) {
- return function (action) {
- if (action.type === 'DROP_COMPLETE' || action.type === 'CLEAN' || action.type === 'DROP_ANIMATE') {
- var marshal = getMarshal();
- marshal.stopPublishing();
- }
-
- next(action);
- };
- };
- };
- });
-
- var shouldCancel = function shouldCancel(action) {
- return action.type === 'CANCEL' || action.type === 'DROP_ANIMATE' || action.type === 'DROP' || action.type === 'DROP_COMPLETE' || action.type === 'COLLECTION_STARTING';
- };
-
- var autoScroll = (function (getScroller) {
- return function (store) {
- return function (next) {
- return function (action) {
- if (shouldCancel(action)) {
- getScroller().cancel();
- next(action);
- return;
- }
-
- next(action);
- var state = store.getState();
-
- if (state.phase !== 'DRAGGING') {
- return;
- }
-
- if (state.autoScrollMode === 'FLUID') {
- getScroller().fluidScroll(state);
- return;
- }
-
- if (!state.scrollJumpRequest) {
- return;
- }
-
- getScroller().jumpScroll(state);
- };
- };
- };
- });
-
- var shouldCheckOnAction = function shouldCheckOnAction(action) {
- return action.type === 'MOVE' || action.type === 'MOVE_UP' || action.type === 'MOVE_RIGHT' || action.type === 'MOVE_DOWN' || action.type === 'MOVE_LEFT' || action.type === 'MOVE_BY_WINDOW_SCROLL';
- };
-
- var hasDroppableOverChanged = function hasDroppableOverChanged(previous, current) {
- if (!previous) {
- return Boolean(current);
- }
-
- if (!current) {
- return Boolean(previous);
- }
-
- return previous.droppableId !== current.droppableId;
- };
-
- var getNewMaxScroll = function getNewMaxScroll(previous, current, action) {
- if (!shouldCheckOnAction(action)) {
- return null;
- }
-
- if (!isMovementAllowed(previous) || !isMovementAllowed(current)) {
- return null;
- }
-
- if (!hasDroppableOverChanged(previous.impact.destination, current.impact.destination)) {
- return null;
- }
-
- var viewport = current.viewport;
- var doc = document.documentElement;
- !doc ? process.env.NODE_ENV !== "production" ? invariant(false, 'Could not find document.documentElement') : invariant(false) : void 0;
- var maxScroll = getMaxScroll({
- scrollHeight: doc.scrollHeight,
- scrollWidth: doc.scrollWidth,
- width: viewport.frame.width,
- height: viewport.frame.height
- });
-
- if (isEqual(maxScroll, viewport.scroll.max)) {
- return null;
- }
-
- return maxScroll;
- };
-
- var maxScrollUpdater = (function (store) {
- return function (next) {
- return function (action) {
- var previous = store.getState();
- next(action);
- var current = store.getState();
- var maxScroll = getNewMaxScroll(previous, current, action);
-
- if (maxScroll) {
- next(updateViewportMaxScroll(maxScroll));
- }
- };
- };
- });
-
- var composeEnhancers = typeof window === 'object' && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ : redux.compose;
- var createStore = (function (_ref) {
- var getDimensionMarshal = _ref.getDimensionMarshal,
- styleMarshal = _ref.styleMarshal,
- getHooks = _ref.getHooks,
- announce = _ref.announce,
- getScroller = _ref.getScroller;
- return redux.createStore(reducer, composeEnhancers(redux.applyMiddleware(style(styleMarshal), dimensionMarshalStopper(getDimensionMarshal), lift$1(getDimensionMarshal), drop$1, dropAnimationFinish, maxScrollUpdater, autoScroll(getScroller), hooks(getHooks, announce))));
- });
-
- var getEmptyMap = function getEmptyMap() {
- return {
- draggables: {},
- droppables: {}
- };
- };
-
- var timingKey = 'Publish collection from DOM';
- var createPublisher = (function (_ref) {
- var getProvided = _ref.getProvided,
- callbacks = _ref.callbacks;
-
- var advancedUsageWarning = function () {
- if (process.env.NODE_ENV === 'production') {
- return function () {};
- }
-
- var hasAnnounced = false;
- return function () {
- if (hasAnnounced) {
- return;
- }
-
- hasAnnounced = true;
-
- if (process.env.NODE_ENV === 'production') {
- return;
- }
-
- console.warn("\n Advanced usage warning: you are adding or removing a dimension during a drag\n This an advanced feature used to support dynamic interactions such as lazy loading lists.\n\n Keep in mind the following restrictions:\n\n - Draggable's can only be added to Droppable's that are scroll containers\n - Adding a Droppable cannot impact the placement of other Droppables\n (it cannot push a Droppable on the page)\n\n (This warning will be stripped in production builds)\n ".trim());
- };
- }();
-
- var additions = getEmptyMap();
- var removals = getEmptyMap();
- var frameId = null;
-
- var reset = function reset() {
- additions = getEmptyMap();
- removals = getEmptyMap();
- };
-
- var collect = function collect() {
- advancedUsageWarning();
-
- if (frameId) {
- return;
- }
-
- frameId = requestAnimationFrame(function () {
- frameId = null;
- callbacks.collectionStarting();
- start(timingKey);
-
- var _getProvided = getProvided(),
- entries = _getProvided.entries,
- collection = _getProvided.collection;
-
- var windowScroll = collection.initialWindowScroll;
-
- var draggables = _Object$keys(additions.draggables).map(function (id) {
- return entries.draggables[id].getDimension(windowScroll);
- });
-
- var droppables = _Object$keys(additions.droppables).map(function (id) {
- return entries.droppables[id].callbacks.getDimensionAndWatchScroll(windowScroll, collection.scrollOptions);
- });
-
- var result = {
- additions: {
- draggables: draggables,
- droppables: droppables
- },
- removals: {
- draggables: _Object$keys(removals.draggables),
- droppables: _Object$keys(removals.droppables)
- }
- };
- reset();
- finish(timingKey);
- callbacks.publish(result);
- });
- };
-
- var addDraggable = function addDraggable(id) {
- additions.draggables[id] = true;
-
- if (removals.draggables[id]) {
- delete removals.draggables[id];
- }
-
- collect();
- };
-
- var removeDraggable = function removeDraggable(id) {
- removals.draggables[id] = true;
-
- if (additions.draggables[id]) {
- delete additions.draggables[id];
- }
-
- collect();
- };
-
- var addDroppable = function addDroppable(id) {
- additions.droppables[id] = true;
-
- if (removals.droppables[id]) {
- delete removals.droppables[id];
- }
-
- collect();
- };
-
- var removeDroppable = function removeDroppable(id) {
- removals.droppables[id] = true;
-
- if (additions.droppables[id]) {
- delete additions.droppables[id];
- }
-
- collect();
- };
-
- var stop = function stop() {
- if (!frameId) {
- return;
- }
-
- cancelAnimationFrame(frameId);
- frameId = null;
- reset();
- };
-
- return {
- addDraggable: addDraggable,
- removeDraggable: removeDraggable,
- addDroppable: addDroppable,
- removeDroppable: removeDroppable,
- stop: stop
- };
- });
-
- var createDimensionMarshal = (function (callbacks) {
- var entries = {
- droppables: {},
- draggables: {}
- };
- var collection = null;
- var publisher = createPublisher({
- callbacks: {
- publish: callbacks.publish,
- collectionStarting: callbacks.collectionStarting
- },
- getProvided: function getProvided() {
- !collection ? process.env.NODE_ENV !== "production" ? invariant(false, 'Cannot get scroll options when there is no collection') : invariant(false) : void 0;
- return {
- entries: entries,
- collection: collection
- };
- }
- });
-
- var registerDraggable = function registerDraggable(descriptor, getDimension) {
- var entry = {
- descriptor: descriptor,
- getDimension: getDimension
- };
- entries.draggables[descriptor.id] = entry;
-
- if (!collection) {
- return;
- }
-
- if (collection.critical.draggable.type !== descriptor.type) {
- return;
- }
-
- publisher.addDraggable(descriptor.id);
- };
-
- var updateDraggable = function updateDraggable(previous, descriptor, getDimension) {
- !entries.draggables[previous.id] ? process.env.NODE_ENV !== "production" ? invariant(false, 'Cannot update draggable registration as no previous registration was found') : invariant(false) : void 0;
- delete entries.draggables[previous.id];
- var entry = {
- descriptor: descriptor,
- getDimension: getDimension
- };
- entries.draggables[descriptor.id] = entry;
- };
-
- var unregisterDraggable = function unregisterDraggable(descriptor) {
- var entry = entries.draggables[descriptor.id];
- !entry ? process.env.NODE_ENV !== "production" ? invariant(false, "Cannot unregister Draggable with id " + descriptor.id + " as it is not registered") : invariant(false) : void 0;
-
- if (entry.descriptor !== descriptor) {
- return;
- }
-
- delete entries.draggables[descriptor.id];
-
- if (!collection) {
- return;
- }
-
- !(collection.critical.draggable.id !== descriptor.id) ? process.env.NODE_ENV !== "production" ? invariant(false, 'Cannot remove the dragging item during a drag') : invariant(false) : void 0;
-
- if (descriptor.type !== collection.critical.draggable.type) {
- return;
- }
-
- publisher.removeDraggable(descriptor.id);
- };
-
- var registerDroppable = function registerDroppable(descriptor, droppableCallbacks) {
- var id = descriptor.id;
- entries.droppables[id] = {
- descriptor: descriptor,
- callbacks: droppableCallbacks
- };
-
- if (!collection) {
- return;
- }
-
- if (descriptor.type !== collection.critical.droppable.type) {
- return;
- }
-
- publisher.addDroppable(id);
- };
-
- var updateDroppable = function updateDroppable(previous, descriptor, droppableCallbacks) {
- !entries.droppables[previous.id] ? process.env.NODE_ENV !== "production" ? invariant(false, 'Cannot update droppable registration as no previous registration was found') : invariant(false) : void 0;
- delete entries.droppables[previous.id];
- var entry = {
- descriptor: descriptor,
- callbacks: droppableCallbacks
- };
- entries.droppables[descriptor.id] = entry;
-
- if (collection) {
- process.env.NODE_ENV !== "production" ? invariant(false, 'You are not able to update the id or type of a droppable during a drag') : invariant(false);
- }
- };
-
- var unregisterDroppable = function unregisterDroppable(descriptor) {
- var entry = entries.droppables[descriptor.id];
- !entry ? process.env.NODE_ENV !== "production" ? invariant(false, "Cannot unregister Droppable with id " + descriptor.id + " as as it is not registered") : invariant(false) : void 0;
-
- if (entry.descriptor !== descriptor) {
- return;
- }
-
- delete entries.droppables[descriptor.id];
-
- if (!collection) {
- return;
- }
-
- !(collection.critical.droppable.id !== descriptor.id) ? process.env.NODE_ENV !== "production" ? invariant(false, 'Cannot remove the home Droppable during a drag') : invariant(false) : void 0;
-
- if (collection.critical.droppable.type !== descriptor.type) {
- return;
- }
-
- publisher.removeDroppable(descriptor.id);
- };
-
- var updateDroppableIsEnabled = function updateDroppableIsEnabled(id, isEnabled) {
- !entries.droppables[id] ? process.env.NODE_ENV !== "production" ? invariant(false, "Cannot update the scroll on Droppable " + id + " as it is not registered") : invariant(false) : void 0;
-
- if (!collection) {
- return;
- }
-
- callbacks.updateDroppableIsEnabled({
- id: id,
- isEnabled: isEnabled
- });
- };
-
- var updateDroppableScroll = function updateDroppableScroll(id, newScroll) {
- !entries.droppables[id] ? process.env.NODE_ENV !== "production" ? invariant(false, "Cannot update the scroll on Droppable " + id + " as it is not registered") : invariant(false) : void 0;
-
- if (!collection) {
- return;
- }
-
- callbacks.updateDroppableScroll({
- id: id,
- offset: newScroll
- });
- };
-
- var scrollDroppable = function scrollDroppable(id, change) {
- var entry = entries.droppables[id];
- !entry ? process.env.NODE_ENV !== "production" ? invariant(false, "Cannot scroll Droppable " + id + " as it is not registered") : invariant(false) : void 0;
-
- if (!collection) {
- return;
- }
-
- entry.callbacks.scroll(change);
- };
-
- var getInitialPublish = function getInitialPublish(args) {
- var critical = args.critical,
- scrollOptions = args.scrollOptions,
- windowScroll = args.initialWindowScroll;
- var timingKey = 'Initial collection from DOM';
- start(timingKey);
- var home = critical.droppable;
-
- var droppables = _Object$keys(entries.droppables).map(function (id) {
- return entries.droppables[id];
- }).filter(function (entry) {
- return entry.descriptor.type === home.type;
- }).map(function (entry) {
- return entry.callbacks.getDimensionAndWatchScroll(windowScroll, scrollOptions);
- }).reduce(function (previous, dimension) {
- previous[dimension.descriptor.id] = dimension;
- return previous;
- }, {});
-
- var draggables = _Object$keys(entries.draggables).map(function (id) {
- return entries.draggables[id];
- }).filter(function (entry) {
- return entry.descriptor.type === critical.draggable.type;
- }).map(function (entry) {
- return entry.getDimension(windowScroll);
- }).reduce(function (previous, dimension) {
- previous[dimension.descriptor.id] = dimension;
- return previous;
- }, {});
-
- finish(timingKey);
- var dimensions = {
- draggables: draggables,
- droppables: droppables
- };
- var result = {
- dimensions: dimensions,
- critical: critical
- };
- return result;
- };
-
- var stopPublishing = function stopPublishing() {
- if (!collection) {
- return;
- }
-
- publisher.stop();
- var home = collection.critical.droppable;
-
- _Object$keys(entries.droppables).filter(function (id) {
- return entries.droppables[id].descriptor.type === home.type;
- }).forEach(function (id) {
- return entries.droppables[id].callbacks.unwatchScroll();
- });
-
- collection = null;
- };
-
- var startPublishing = function startPublishing(request, windowScroll) {
- !!collection ? process.env.NODE_ENV !== "production" ? invariant(false, 'Cannot start capturing critical dimensions as there is already a collection') : invariant(false) : void 0;
- var entry = entries.draggables[request.draggableId];
- !entry ? process.env.NODE_ENV !== "production" ? invariant(false, 'Cannot find critical draggable entry') : invariant(false) : void 0;
- var home = entries.droppables[entry.descriptor.droppableId];
- !home ? process.env.NODE_ENV !== "production" ? invariant(false, 'Cannot find critical droppable entry') : invariant(false) : void 0;
- var critical = {
- draggable: entry.descriptor,
- droppable: home.descriptor
- };
- collection = {
- scrollOptions: request.scrollOptions,
- critical: critical,
- initialWindowScroll: windowScroll
- };
- return getInitialPublish(collection);
- };
-
- var marshal = {
- registerDraggable: registerDraggable,
- updateDraggable: updateDraggable,
- unregisterDraggable: unregisterDraggable,
- registerDroppable: registerDroppable,
- updateDroppable: updateDroppable,
- unregisterDroppable: unregisterDroppable,
- updateDroppableIsEnabled: updateDroppableIsEnabled,
- scrollDroppable: scrollDroppable,
- updateDroppableScroll: updateDroppableScroll,
- startPublishing: startPublishing,
- stopPublishing: stopPublishing
- };
- return marshal;
- });
-
- var physics = function () {
- var base = {
- stiffness: 1000,
- damping: 60,
- precision: 0.99
- };
-
- var standard = _extends({}, base);
-
- var fast = _extends({}, base, {
- stiffness: base.stiffness * 2
- });
-
- return {
- standard: standard,
- fast: fast
- };
- }();
- var css = {
- outOfTheWay: 'transform 0.2s cubic-bezier(0.2, 0, 0, 1)'
- };
-
- var prefix = 'data-react-beautiful-dnd';
- var dragHandle = prefix + "-drag-handle";
- var draggable = prefix + "-draggable";
- var droppable = prefix + "-droppable";
-
- var getStyles = (function (styleContext) {
- var dragHandleSelector = "[" + dragHandle + "=\"" + styleContext + "\"]";
- var draggableSelector = "[" + draggable + "=\"" + styleContext + "\"]";
- var droppableSelector = "[" + droppable + "=\"" + styleContext + "\"]";
- var dragHandleStyles = {
- base: "\n " + dragHandleSelector + " {\n -webkit-touch-callout: none;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n touch-action: manipulation;\n }\n ",
- grabCursor: "\n " + dragHandleSelector + " {\n cursor: -webkit-grab;\n cursor: grab;\n }\n ",
- blockPointerEvents: "\n " + dragHandleSelector + " {\n pointer-events: none;\n }\n "
- };
- var draggableStyles = {
- animateMovement: "\n " + draggableSelector + " {\n transition: " + css.outOfTheWay + ";\n }\n "
- };
- var droppableStyles = {
- base: "\n " + droppableSelector + " {\n overflow-anchor: none;\n }\n "
- };
- var bodyStyles = {
- whileActiveDragging: "\n body {\n cursor: grabbing;\n cursor: -webkit-grabbing;\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n }\n "
- };
- var base = [dragHandleStyles.base, droppableStyles.base];
- var resting = base.concat([dragHandleStyles.grabCursor]);
- var collecting = base.concat([dragHandleStyles.blockPointerEvents, bodyStyles.whileActiveDragging]);
- var dragging = collecting.concat([draggableStyles.animateMovement]);
- var dropAnimating = base.concat([dragHandleStyles.grabCursor, draggableStyles.animateMovement]);
- var userCancel = base.concat([draggableStyles.animateMovement]);
- return {
- resting: resting.join(''),
- dragging: dragging.join(''),
- dropAnimating: dropAnimating.join(''),
- collecting: collecting.join(''),
- userCancel: userCancel.join('')
- };
- });
-
- var count = 0;
- var resetStyleContext = function resetStyleContext() {
- count = 0;
- };
-
- var getHead = function getHead() {
- var head = document.querySelector('head');
- !head ? process.env.NODE_ENV !== "production" ? invariant(false, 'Cannot find the head to append a style to') : invariant(false) : void 0;
- return head;
- };
-
- var createStyleMarshal = (function () {
- var context = "" + count++;
- var styles = getStyles(context);
- var el = null;
- var setStyle = memoizeOne(function (proposed) {
- !el ? process.env.NODE_ENV !== "production" ? invariant(false, 'Cannot set style of style tag if not mounted') : invariant(false) : void 0;
- el.innerHTML = proposed;
- });
-
- var mount = function mount() {
- !!el ? process.env.NODE_ENV !== "production" ? invariant(false, 'Style marshal already mounted') : invariant(false) : void 0;
- el = document.createElement('style');
- el.type = 'text/css';
- el.setAttribute(prefix, context);
- getHead().appendChild(el);
- setStyle(styles.resting);
- };
-
- var collecting = function collecting() {
- return setStyle(styles.collecting);
- };
-
- var dragging = function dragging() {
- return setStyle(styles.dragging);
- };
-
- var dropping = function dropping(reason) {
- if (reason === 'DROP') {
- setStyle(styles.dropAnimating);
- return;
- }
-
- setStyle(styles.userCancel);
- };
-
- var resting = function resting() {
- return setStyle(styles.resting);
- };
-
- var unmount = function unmount() {
- !el ? process.env.NODE_ENV !== "production" ? invariant(false, 'Cannot unmount style marshal as it is already unmounted') : invariant(false) : void 0;
- getHead().removeChild(el);
- el = null;
- };
-
- var marshal = {
- collecting: collecting,
- dragging: dragging,
- dropping: dropping,
- resting: resting,
- styleContext: context,
- mount: mount,
- unmount: unmount
- };
- return marshal;
- });
-
- var canStartDrag = (function (state, id) {
- if (state.phase === 'IDLE') {
- return true;
- }
-
- if (state.phase !== 'DROP_ANIMATING') {
- return false;
- }
-
- if (state.pending.result.draggableId === id) {
- return false;
- }
-
- return state.pending.result.reason === 'DROP';
- });
-
- var scrollWindow = (function (change) {
- window.scrollBy(change.x, change.y);
- });
-
- var count$1 = 0;
- var visuallyHidden = {
- position: 'absolute',
- width: '1px',
- height: '1px',
- margin: '-1px',
- border: '0',
- padding: '0',
- overflow: 'hidden',
- clip: 'rect(0 0 0 0)',
- 'clip-path': 'inset(100%)'
- };
-
- var getBody = function getBody() {
- !document.body ? process.env.NODE_ENV !== "production" ? invariant(false, 'Announcer cannot find document.body') : invariant(false) : void 0;
- return document.body;
- };
-
- var createAnnouncer = (function () {
- var id = "react-beautiful-dnd-announcement-" + count$1++;
- var el = null;
-
- var announce = function announce(message) {
- !el ? process.env.NODE_ENV !== "production" ? invariant(false, 'Cannot announce to unmounted node') : invariant(false) : void 0;
- el.textContent = message;
- };
-
- var mount = function mount() {
- !!el ? process.env.NODE_ENV !== "production" ? invariant(false, 'Announcer already mounted') : invariant(false) : void 0;
- el = document.createElement('div');
- el.id = id;
- el.setAttribute('aria-live', 'assertive');
- el.setAttribute('role', 'log');
- el.setAttribute('aria-atomic', 'true');
-
- _Object$assign(el.style, visuallyHidden);
-
- getBody().appendChild(el);
- };
-
- var unmount = function unmount() {
- !el ? process.env.NODE_ENV !== "production" ? invariant(false, 'Will not unmount annoucer as it is already unmounted') : invariant(false) : void 0;
- getBody().removeChild(el);
- el = null;
- };
-
- var announcer = {
- announce: announce,
- id: id,
- mount: mount,
- unmount: unmount
- };
- return announcer;
- });
-
- var getScrollableDroppables = memoizeOne(function (droppables) {
- return toDroppableList(droppables).filter(function (droppable) {
- if (!droppable.isEnabled) {
- return false;
- }
-
- if (!droppable.viewport.closestScrollable) {
- return false;
- }
-
- return true;
- });
- });
-
- var getScrollableDroppableOver = function getScrollableDroppableOver(target, droppables) {
- var maybe = getScrollableDroppables(droppables).find(function (droppable) {
- !droppable.viewport.closestScrollable ? process.env.NODE_ENV !== "production" ? invariant(false, 'Invalid result') : invariant(false) : void 0;
- return isPositionInFrame(droppable.viewport.closestScrollable.framePageMarginBox)(target);
- });
- return maybe;
- };
-
- var getBestScrollableDroppable = (function (_ref) {
- var center = _ref.center,
- destination = _ref.destination,
- droppables = _ref.droppables;
-
- if (destination) {
- var _dimension = droppables[destination.droppableId];
-
- if (!_dimension.viewport.closestScrollable) {
- return null;
- }
-
- return _dimension;
- }
-
- var dimension = getScrollableDroppableOver(center, droppables);
- return dimension;
- });
-
- var smallestSigned = apply(function (value) {
- if (value === 0) {
- return 0;
- }
-
- return value > 0 ? 1 : -1;
- });
- var getOverlap = function () {
- var getRemainder = function getRemainder(target, max) {
- if (target < 0) {
- return target;
- }
-
- if (target > max) {
- return target - max;
- }
-
- return 0;
- };
-
- return function (_ref) {
- var current = _ref.current,
- max = _ref.max,
- change = _ref.change;
- var targetScroll = add(current, change);
- var overlap = {
- x: getRemainder(targetScroll.x, max.x),
- y: getRemainder(targetScroll.y, max.y)
- };
-
- if (isEqual(overlap, origin)) {
- return null;
- }
-
- return overlap;
- };
- }();
- var canPartiallyScroll = function canPartiallyScroll(_ref2) {
- var rawMax = _ref2.max,
- current = _ref2.current,
- change = _ref2.change;
- var max = {
- x: Math.max(current.x, rawMax.x),
- y: Math.max(current.y, rawMax.y)
- };
- var smallestChange = smallestSigned(change);
- var overlap = getOverlap({
- max: max,
- current: current,
- change: smallestChange
- });
-
- if (!overlap) {
- return true;
- }
-
- if (smallestChange.x !== 0 && overlap.x === 0) {
- return true;
- }
-
- if (smallestChange.y !== 0 && overlap.y === 0) {
- return true;
- }
-
- return false;
- };
- var canScrollWindow = function canScrollWindow(viewport, change) {
- return canPartiallyScroll({
- current: viewport.scroll.current,
- max: viewport.scroll.max,
- change: change
- });
- };
- var getWindowOverlap = function getWindowOverlap(viewport, change) {
- if (!canScrollWindow(viewport, change)) {
- return null;
- }
-
- var max = viewport.scroll.max;
- var current = viewport.scroll.current;
- return getOverlap({
- current: current,
- max: max,
- change: change
- });
- };
- var canScrollDroppable = function canScrollDroppable(droppable, change) {
- var closest$$1 = droppable.viewport.closestScrollable;
-
- if (!closest$$1) {
- return false;
- }
-
- return canPartiallyScroll({
- current: closest$$1.scroll.current,
- max: closest$$1.scroll.max,
- change: change
- });
- };
- var getDroppableOverlap = function getDroppableOverlap(droppable, change) {
- var closest$$1 = droppable.viewport.closestScrollable;
-
- if (!closest$$1) {
- return null;
- }
-
- if (!canScrollDroppable(droppable, change)) {
- return null;
- }
-
- return getOverlap({
- current: closest$$1.scroll.current,
- max: closest$$1.scroll.max,
- change: change
- });
- };
-
- var config = {
- startFrom: 0.25,
- maxSpeedAt: 0.05,
- maxScrollSpeed: 28,
- ease: function ease(percentage) {
- return Math.pow(percentage, 2);
- }
- };
- var clean$1 = apply(function (value) {
- return value === 0 ? 0 : value;
- });
- var getPixelThresholds = function getPixelThresholds(container, axis) {
- var startFrom = container[axis.size] * config.startFrom;
- var maxSpeedAt = container[axis.size] * config.maxSpeedAt;
- var accelerationPlane = startFrom - maxSpeedAt;
- var thresholds = {
- startFrom: startFrom,
- maxSpeedAt: maxSpeedAt,
- accelerationPlane: accelerationPlane
- };
- return thresholds;
- };
-
- var getSpeed = function getSpeed(distance$$1, thresholds) {
- if (distance$$1 >= thresholds.startFrom) {
- return 0;
- }
-
- if (distance$$1 <= thresholds.maxSpeedAt) {
- return config.maxScrollSpeed;
- }
-
- var distancePastStart = thresholds.startFrom - distance$$1;
- var percentage = distancePastStart / thresholds.accelerationPlane;
- var transformed = config.ease(percentage);
- var speed = config.maxScrollSpeed * transformed;
- return speed;
- };
-
- var adjustForSizeLimits = function adjustForSizeLimits(_ref) {
- var container = _ref.container,
- subject = _ref.subject,
- proposedScroll = _ref.proposedScroll;
- var isTooBigVertically = subject.height > container.height;
- var isTooBigHorizontally = subject.width > container.width;
-
- if (!isTooBigHorizontally && !isTooBigVertically) {
- return proposedScroll;
- }
-
- if (isTooBigHorizontally && isTooBigVertically) {
- return null;
- }
-
- return {
- x: isTooBigHorizontally ? 0 : proposedScroll.x,
- y: isTooBigVertically ? 0 : proposedScroll.y
- };
- };
-
- var getRequiredScroll = function getRequiredScroll(_ref2) {
- var container = _ref2.container,
- subject = _ref2.subject,
- center = _ref2.center;
- var distance$$1 = {
- top: center.y - container.top,
- right: container.right - center.x,
- bottom: container.bottom - center.y,
- left: center.x - container.left
- };
-
- var y = function () {
- var thresholds = getPixelThresholds(container, vertical);
- var isCloserToBottom = distance$$1.bottom < distance$$1.top;
-
- if (isCloserToBottom) {
- return getSpeed(distance$$1.bottom, thresholds);
- }
-
- return -1 * getSpeed(distance$$1.top, thresholds);
- }();
-
- var x = function () {
- var thresholds = getPixelThresholds(container, horizontal);
- var isCloserToRight = distance$$1.right < distance$$1.left;
-
- if (isCloserToRight) {
- return getSpeed(distance$$1.right, thresholds);
- }
-
- return -1 * getSpeed(distance$$1.left, thresholds);
- }();
-
- var required = clean$1({
- x: x,
- y: y
- });
-
- if (isEqual(required, origin)) {
- return null;
- }
-
- var limited = adjustForSizeLimits({
- container: container,
- subject: subject,
- proposedScroll: required
- });
-
- if (!limited) {
- return null;
- }
-
- return isEqual(limited, origin) ? null : limited;
- };
-
- var withPlaceholder = function withPlaceholder(droppable, draggable) {
- var closest$$1 = droppable.viewport.closestScrollable;
-
- if (!closest$$1) {
- return null;
- }
-
- var isOverHome = droppable.descriptor.id === draggable.descriptor.droppableId;
- var max = closest$$1.scroll.max;
- var current = closest$$1.scroll.current;
-
- if (isOverHome) {
- return {
- max: max,
- current: current
- };
- }
-
- var spaceForPlaceholder = patch(droppable.axis.line, draggable.placeholder.client.borderBox[droppable.axis.size]);
- var newMax = add(max, spaceForPlaceholder);
- var newCurrent = {
- x: Math.min(current.x, newMax.x),
- y: Math.min(current.y, newMax.y)
- };
- return {
- max: newMax,
- current: newCurrent
- };
- };
-
- var createFluidScroller = (function (_ref3) {
- var scrollWindow = _ref3.scrollWindow,
- scrollDroppable = _ref3.scrollDroppable;
- var scheduleWindowScroll = rafSchd(scrollWindow);
- var scheduleDroppableScroll = rafSchd(scrollDroppable);
-
- var scroller = function scroller(state) {
- var center = state.current.page.borderBoxCenter;
- var draggable = state.dimensions.draggables[state.critical.draggable.id];
- var subject = draggable.page.marginBox;
- var viewport = state.viewport;
- var requiredWindowScroll = getRequiredScroll({
- container: viewport.frame,
- subject: subject,
- center: center
- });
-
- if (requiredWindowScroll && canScrollWindow(viewport, requiredWindowScroll)) {
- scheduleWindowScroll(requiredWindowScroll);
- return;
- }
-
- var droppable = getBestScrollableDroppable({
- center: center,
- destination: state.impact.destination,
- droppables: state.dimensions.droppables
- });
-
- if (!droppable) {
- return;
- }
-
- var closestScrollable = droppable.viewport.closestScrollable;
-
- if (!closestScrollable) {
- return;
- }
-
- var requiredFrameScroll = getRequiredScroll({
- container: closestScrollable.framePageMarginBox,
- subject: subject,
- center: center
- });
-
- if (!requiredFrameScroll) {
- return;
- }
-
- var result = withPlaceholder(droppable, draggable);
-
- if (!result) {
- return;
- }
-
- var closest$$1 = droppable.viewport.closestScrollable;
-
- if (!closest$$1) {
- return;
- }
-
- var canScrollDroppable$$1 = canPartiallyScroll({
- current: result.current,
- max: result.max,
- change: requiredFrameScroll
- });
-
- if (canScrollDroppable$$1) {
- scheduleDroppableScroll(droppable.descriptor.id, requiredFrameScroll);
- }
- };
-
- scroller.cancel = function () {
- scheduleWindowScroll.cancel();
- scheduleDroppableScroll.cancel();
- };
-
- return scroller;
- });
-
- var createJumpScroller = (function (_ref) {
- var move = _ref.move,
- scrollDroppable = _ref.scrollDroppable,
- scrollWindow = _ref.scrollWindow;
-
- var moveByOffset = function moveByOffset(state, offset) {
- var client = add(state.current.client.selection, offset);
- move({
- client: client,
- shouldAnimate: true
- });
- };
-
- var scrollDroppableAsMuchAsItCan = function scrollDroppableAsMuchAsItCan(droppable, change) {
- if (!canScrollDroppable(droppable, change)) {
- return change;
- }
-
- var overlap = getDroppableOverlap(droppable, change);
-
- if (!overlap) {
- scrollDroppable(droppable.descriptor.id, change);
- return null;
- }
-
- var whatTheDroppableCanScroll = subtract(change, overlap);
- scrollDroppable(droppable.descriptor.id, whatTheDroppableCanScroll);
- var remainder = subtract(change, whatTheDroppableCanScroll);
- return remainder;
- };
-
- var scrollWindowAsMuchAsItCan = function scrollWindowAsMuchAsItCan(viewport, change) {
- if (!canScrollWindow(viewport, change)) {
- return change;
- }
-
- var overlap = getWindowOverlap(viewport, change);
-
- if (!overlap) {
- scrollWindow(change);
- return null;
- }
-
- var whatTheWindowCanScroll = subtract(change, overlap);
- scrollWindow(whatTheWindowCanScroll);
- var remainder = subtract(change, whatTheWindowCanScroll);
- return remainder;
- };
-
- var jumpScroller = function jumpScroller(state) {
- var request = state.scrollJumpRequest;
-
- if (!request) {
- return;
- }
-
- var destination = state.impact.destination;
- !destination ? process.env.NODE_ENV !== "production" ? invariant(false, 'Cannot perform a jump scroll when there is no destination') : invariant(false) : void 0;
- var droppableRemainder = scrollDroppableAsMuchAsItCan(state.dimensions.droppables[destination.droppableId], request);
-
- if (!droppableRemainder) {
- return;
- }
-
- var viewport = state.viewport;
- var windowRemainder = scrollWindowAsMuchAsItCan(viewport, droppableRemainder);
-
- if (!windowRemainder) {
- return;
- }
-
- moveByOffset(state, windowRemainder);
- };
-
- return jumpScroller;
- });
-
- var createAutoScroller = (function (_ref) {
- var scrollDroppable = _ref.scrollDroppable,
- scrollWindow = _ref.scrollWindow,
- move = _ref.move;
- var fluidScroll = createFluidScroller({
- scrollWindow: scrollWindow,
- scrollDroppable: scrollDroppable
- });
- var jumpScroll = createJumpScroller({
- move: move,
- scrollWindow: scrollWindow,
- scrollDroppable: scrollDroppable
- });
- var marshal = {
- cancel: fluidScroll.cancel,
- fluidScroll: fluidScroll,
- jumpScroll: jumpScroll
- };
- return marshal;
- });
-
- var prefix$1 = function prefix(key) {
- return "private-react-beautiful-dnd-key-do-not-use-" + key;
- };
-
- var storeKey = prefix$1('store');
- var droppableIdKey = prefix$1('droppable-id');
- var droppableTypeKey = prefix$1('droppable-type');
- var dimensionMarshalKey = prefix$1('dimension-marshal');
- var styleContextKey = prefix$1('style-context');
- var canLiftContextKey = prefix$1('can-lift');
-
- var _DragDropContext$chil;
- var resetServerContext = function resetServerContext() {
- resetStyleContext();
- };
-
- var printFatalDevError = function printFatalDevError(error) {
- if (process.env.NODE_ENV === 'production') {
- return;
- }
-
- console.warn("\n An error has occurred while a drag is occurring.\n Any existing drag will be cancelled.\n\n Raw error:\n ");
- console.error(error);
- };
-
- var DragDropContext = function (_React$Component) {
- _inheritsLoose(DragDropContext, _React$Component);
-
- function DragDropContext(props, context) {
- var _this;
-
- _this = _React$Component.call(this, props, context) || this;
- _this.store = void 0;
- _this.dimensionMarshal = void 0;
- _this.styleMarshal = void 0;
- _this.autoScroller = void 0;
- _this.announcer = void 0;
- _this.unsubscribe = void 0;
-
- _this.canLift = function (id) {
- return canStartDrag(_this.store.getState(), id);
- };
-
- _this.onFatalError = function (error) {
- printFatalDevError(error);
-
- var state = _this.store.getState();
-
- if (state.phase !== 'IDLE') {
- _this.store.dispatch(clean());
- }
- };
-
- _this.onWindowError = function (error) {
- return _this.onFatalError(error);
- };
-
- _this.announcer = createAnnouncer();
- _this.styleMarshal = createStyleMarshal();
- _this.store = createStore({
- getDimensionMarshal: function getDimensionMarshal() {
- return _this.dimensionMarshal;
- },
- styleMarshal: _this.styleMarshal,
- getHooks: function getHooks() {
- return {
- onBeforeDragStart: _this.props.onBeforeDragStart,
- onDragStart: _this.props.onDragStart,
- onDragEnd: _this.props.onDragEnd,
- onDragUpdate: _this.props.onDragUpdate
- };
- },
- announce: _this.announcer.announce,
- getScroller: function getScroller() {
- return _this.autoScroller;
- }
- });
- var callbacks = redux.bindActionCreators({
- collectionStarting: collectionStarting,
- publish: publish,
- updateDroppableScroll: updateDroppableScroll,
- updateDroppableIsEnabled: updateDroppableIsEnabled
- }, _this.store.dispatch);
- _this.dimensionMarshal = createDimensionMarshal(callbacks);
- _this.autoScroller = createAutoScroller(_extends({
- scrollWindow: scrollWindow,
- scrollDroppable: _this.dimensionMarshal.scrollDroppable
- }, redux.bindActionCreators({
- move: move
- }, _this.store.dispatch)));
- return _this;
- }
-
- var _proto = DragDropContext.prototype;
-
- _proto.getChildContext = function getChildContext() {
- var _ref;
-
- return _ref = {}, _ref[storeKey] = this.store, _ref[dimensionMarshalKey] = this.dimensionMarshal, _ref[styleContextKey] = this.styleMarshal.styleContext, _ref[canLiftContextKey] = this.canLift, _ref;
- };
-
- _proto.componentDidMount = function componentDidMount() {
- window.addEventListener('error', this.onWindowError);
- this.styleMarshal.mount();
- this.announcer.mount();
- };
-
- _proto.componentDidCatch = function componentDidCatch(error) {
- this.onFatalError(error);
-
- if (error.message.indexOf('Invariant failed') !== -1) {
- this.setState({});
- return;
- }
-
- throw error;
- };
-
- _proto.componentWillUnmount = function componentWillUnmount() {
- window.removeEventListener('error', this.onWindowError);
- var state = this.store.getState();
-
- if (state.phase !== 'IDLE') {
- this.store.dispatch(clean());
- }
-
- this.styleMarshal.unmount();
- this.announcer.unmount();
- };
-
- _proto.render = function render() {
- return this.props.children;
- };
-
- return DragDropContext;
- }(React__default.Component);
-
- DragDropContext.childContextTypes = (_DragDropContext$chil = {}, _DragDropContext$chil[storeKey] = PropTypes.shape({
- dispatch: PropTypes.func.isRequired,
- subscribe: PropTypes.func.isRequired,
- getState: PropTypes.func.isRequired
- }).isRequired, _DragDropContext$chil[dimensionMarshalKey] = PropTypes.object.isRequired, _DragDropContext$chil[styleContextKey] = PropTypes.string.isRequired, _DragDropContext$chil[canLiftContextKey] = PropTypes.func.isRequired, _DragDropContext$chil);
-
- var isScrollable = function isScrollable() {
- for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {
- values[_key] = arguments[_key];
- }
-
- return values.some(function (value) {
- return value === 'auto' || value === 'scroll';
- });
- };
-
- var isElementScrollable = function isElementScrollable(el) {
- var style = window.getComputedStyle(el);
- return isScrollable(style.overflow, style.overflowY, style.overflowX);
- };
-
- var getClosestScrollable = function getClosestScrollable(el) {
- if (el == null) {
- return null;
- }
-
- if (!isElementScrollable(el)) {
- return getClosestScrollable(el.parentElement);
- }
-
- return el;
- };
-
- var _DroppableDimensionPu;
-
- var getScroll = function getScroll(el) {
- return {
- x: el.scrollLeft,
- y: el.scrollTop
- };
- };
-
- var checkForNestedScrollContainers = function checkForNestedScrollContainers(scrollable) {
- if (process.env.NODE_ENV === 'production') {
- return;
- }
-
- if (!scrollable) {
- return;
- }
-
- var anotherScrollParent = getClosestScrollable(scrollable.parentElement);
-
- if (!anotherScrollParent) {
- return;
- }
-
- console.warn("\n Droppable: unsupported nested scroll container detected.\n A Droppable can only have one scroll parent (which can be itself)\n Nested scroll containers are currently not supported.\n\n We hope to support nested scroll containers soon: https://github.com/atlassian/react-beautiful-dnd/issues/131\n ");
- };
-
- var listenerOptions = {
- passive: true
- };
-
- var DroppableDimensionPublisher = function (_React$Component) {
- _inheritsLoose(DroppableDimensionPublisher, _React$Component);
-
- function DroppableDimensionPublisher(props, context) {
- var _this;
-
- _this = _React$Component.call(this, props, context) || this;
- _this.watchingScroll = null;
- _this.callbacks = void 0;
- _this.publishedDescriptor = null;
-
- _this.getClosestScroll = function () {
- if (!_this.watchingScroll) {
- return origin;
- }
-
- return getScroll(_this.watchingScroll.closestScrollable);
- };
-
- _this.memoizedUpdateScroll = memoizeOne(function (x, y) {
- !_this.publishedDescriptor ? process.env.NODE_ENV !== "production" ? invariant(false, 'Cannot update scroll on unpublished droppable') : invariant(false) : void 0;
- var newScroll = {
- x: x,
- y: y
- };
- var marshal = _this.context[dimensionMarshalKey];
- marshal.updateDroppableScroll(_this.publishedDescriptor.id, newScroll);
- });
-
- _this.updateScroll = function () {
- var offset = _this.getClosestScroll();
-
- _this.memoizedUpdateScroll(offset.x, offset.y);
- };
-
- _this.scheduleScrollUpdate = rafSchd(_this.updateScroll);
-
- _this.onClosestScroll = function () {
- !_this.watchingScroll ? process.env.NODE_ENV !== "production" ? invariant(false, 'Could not find scroll options while scrolling') : invariant(false) : void 0;
- var options = _this.watchingScroll.options;
-
- if (options.shouldPublishImmediately) {
- _this.updateScroll();
-
- return;
- }
-
- _this.scheduleScrollUpdate();
- };
-
- _this.scroll = function (change) {
- !_this.watchingScroll ? process.env.NODE_ENV !== "production" ? invariant(false, 'Cannot scroll a droppable with no closest scrollable') : invariant(false) : void 0;
- var closestScrollable = _this.watchingScroll.closestScrollable;
- closestScrollable.scrollTop += change.y;
- closestScrollable.scrollLeft += change.x;
- };
-
- _this.watchScroll = function (closestScrollable, options) {
- !!_this.watchingScroll ? process.env.NODE_ENV !== "production" ? invariant(false, 'Droppable cannot watch scroll as it is already watching scroll') : invariant(false) : void 0;
-
- if (!closestScrollable) {
- return;
- }
-
- _this.watchingScroll = {
- options: options,
- closestScrollable: closestScrollable
- };
- closestScrollable.addEventListener('scroll', _this.onClosestScroll, listenerOptions);
- };
-
- _this.unwatchScroll = function () {
- var watching = _this.watchingScroll;
-
- if (!watching) {
- return;
- }
-
- _this.scheduleScrollUpdate.cancel();
-
- watching.closestScrollable.removeEventListener('scroll', _this.onClosestScroll, listenerOptions);
- _this.watchingScroll = null;
- };
-
- _this.getMemoizedDescriptor = memoizeOne(function (id, type) {
- return {
- id: id,
- type: type
- };
- });
-
- _this.publish = function () {
- var marshal = _this.context[dimensionMarshalKey];
-
- var descriptor = _this.getMemoizedDescriptor(_this.props.droppableId, _this.props.type);
-
- if (!_this.publishedDescriptor) {
- marshal.registerDroppable(descriptor, _this.callbacks);
- _this.publishedDescriptor = descriptor;
- return;
- }
-
- if (_this.publishedDescriptor === descriptor) {
- return;
- }
-
- marshal.updateDroppable(_this.publishedDescriptor, descriptor, _this.callbacks);
- _this.publishedDescriptor = descriptor;
- };
-
- _this.unpublish = function () {
- !_this.publishedDescriptor ? process.env.NODE_ENV !== "production" ? invariant(false, 'Cannot unpublish descriptor when none is published') : invariant(false) : void 0;
- var marshal = _this.context[dimensionMarshalKey];
- marshal.unregisterDroppable(_this.publishedDescriptor);
- _this.publishedDescriptor = null;
- };
-
- _this.getDimensionAndWatchScroll = function (windowScroll, options) {
- var _this$props = _this.props,
- direction = _this$props.direction,
- ignoreContainerClipping = _this$props.ignoreContainerClipping,
- isDropDisabled = _this$props.isDropDisabled,
- getDroppableRef = _this$props.getDroppableRef;
- var targetRef = getDroppableRef();
- var descriptor = _this.publishedDescriptor;
- !targetRef ? process.env.NODE_ENV !== "production" ? invariant(false, 'Cannot calculate a dimension when not attached to the DOM') : invariant(false) : void 0;
- !descriptor ? process.env.NODE_ENV !== "production" ? invariant(false, 'Cannot get dimension for unpublished droppable') : invariant(false) : void 0;
- var scrollableRef = getClosestScrollable(targetRef);
- checkForNestedScrollContainers(scrollableRef);
-
- _this.watchScroll(scrollableRef, options);
-
- var client = function () {
- var base = cssBoxModel.getBox(targetRef);
-
- if (!scrollableRef) {
- return base;
- }
-
- if (targetRef !== scrollableRef) {
- return base;
- }
-
- var top = base.paddingBox.top - scrollableRef.scrollTop;
- var left = base.paddingBox.left - scrollableRef.scrollLeft;
- var bottom = top + scrollableRef.scrollHeight;
- var right = left + scrollableRef.scrollWidth;
- var paddingBox = {
- top: top,
- right: right,
- bottom: bottom,
- left: left
- };
- var borderBox = {
- top: paddingBox.top - base.border.top,
- right: paddingBox.right + base.border.right,
- bottom: paddingBox.bottom + base.border.bottom,
- left: paddingBox.left - base.border.left
- };
- return cssBoxModel.createBox({
- borderBox: borderBox,
- margin: base.margin,
- border: base.border,
- padding: base.padding
- });
- }();
-
- var page = cssBoxModel.withScroll(client, windowScroll);
-
- var closest$$1 = function () {
- if (!scrollableRef) {
- return null;
- }
-
- var frameClient = cssBoxModel.getBox(scrollableRef);
- return {
- client: frameClient,
- page: cssBoxModel.withScroll(frameClient),
- scrollHeight: scrollableRef.scrollHeight,
- scrollWidth: scrollableRef.scrollWidth,
- scroll: getScroll(scrollableRef),
- shouldClipSubject: !ignoreContainerClipping
- };
- }();
-
- return getDroppableDimension({
- descriptor: descriptor,
- isEnabled: !isDropDisabled,
- direction: direction,
- client: client,
- page: page,
- closest: closest$$1
- });
- };
-
- var callbacks = {
- getDimensionAndWatchScroll: _this.getDimensionAndWatchScroll,
- unwatchScroll: _this.unwatchScroll,
- scroll: _this.scroll
- };
- _this.callbacks = callbacks;
- return _this;
- }
-
- var _proto = DroppableDimensionPublisher.prototype;
-
- _proto.componentDidMount = function componentDidMount() {
- this.publish();
- };
-
- _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
- this.publish();
-
- if (this.props.isDropDisabled === prevProps.isDropDisabled) {
- return;
- }
-
- var marshal = this.context[dimensionMarshalKey];
- marshal.updateDroppableIsEnabled(this.props.droppableId, !this.props.isDropDisabled);
- };
-
- _proto.componentWillUnmount = function componentWillUnmount() {
- if (this.watchingScroll) {
- if (process.env.NODE_ENV !== 'production') {
- console.warn('Unmounting droppable while it was watching scroll');
- }
-
- this.unwatchScroll();
- }
-
- this.unpublish();
- };
-
- _proto.render = function render() {
- return this.props.children;
- };
-
- return DroppableDimensionPublisher;
- }(React__default.Component);
-
- DroppableDimensionPublisher.contextTypes = (_DroppableDimensionPu = {}, _DroppableDimensionPu[dimensionMarshalKey] = PropTypes.object.isRequired, _DroppableDimensionPu);
-
- var Placeholder = function (_PureComponent) {
- _inheritsLoose(Placeholder, _PureComponent);
-
- function Placeholder() {
- return _PureComponent.apply(this, arguments) || this;
- }
-
- var _proto = Placeholder.prototype;
-
- _proto.componentDidMount = function componentDidMount() {
- if (this.props.onMount) {
- this.props.onMount();
- }
- };
-
- _proto.componentWillUnmount = function componentWillUnmount() {
- if (this.props.onUnmount) {
- this.props.onUnmount();
- }
- };
-
- _proto.render = function render() {
- var placeholder = this.props.placeholder;
- var client = placeholder.client,
- display = placeholder.display,
- tagName = placeholder.tagName;
- var style = {
- display: display,
- boxSizing: 'border-box',
- width: client.borderBox.width,
- height: client.borderBox.height,
- marginTop: client.margin.top,
- marginRight: client.margin.right,
- marginBottom: client.margin.bottom,
- marginLeft: client.margin.left,
- flexShrink: '0',
- flexGrow: '0',
- pointerEvents: 'none'
- };
- return React__default.createElement(tagName, {
- style: style
- });
- };
-
- return Placeholder;
- }(React.PureComponent);
-
- var throwIfRefIsInvalid = (function (ref) {
- !(ref && ref instanceof HTMLElement) ? process.env.NODE_ENV !== "production" ? invariant(false, "\n provided.innerRef has not been provided with a HTMLElement.\n\n You can find a guide on using the innerRef callback functions at:\n https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/guides/using-inner-ref.md\n ") : invariant(false) : void 0;
- });
-
- var _Droppable$contextTyp, _Droppable$childConte;
-
- var Droppable = function (_Component) {
- _inheritsLoose(Droppable, _Component);
-
- function Droppable(props, context) {
- var _this;
-
- _this = _Component.call(this, props, context) || this;
- _this.styleContext = void 0;
- _this.ref = null;
- _this.isPlaceholderMounted = false;
-
- _this.onPlaceholderMount = function () {
- _this.isPlaceholderMounted = true;
- };
-
- _this.onPlaceholderUnmount = function () {
- _this.isPlaceholderMounted = false;
- };
-
- _this.setRef = function (ref) {
- if (ref === null) {
- return;
- }
-
- if (ref === _this.ref) {
- return;
- }
-
- _this.ref = ref;
- throwIfRefIsInvalid(ref);
- };
-
- _this.getDroppableRef = function () {
- return _this.ref;
- };
-
- _this.styleContext = context[styleContextKey];
- return _this;
- }
-
- var _proto = Droppable.prototype;
-
- _proto.getChildContext = function getChildContext() {
- var _value;
-
- var value = (_value = {}, _value[droppableIdKey] = this.props.droppableId, _value[droppableTypeKey] = this.props.type, _value);
- return value;
- };
-
- _proto.componentDidMount = function componentDidMount() {
- throwIfRefIsInvalid(this.ref);
- this.warnIfPlaceholderNotMounted();
- };
-
- _proto.componentDidUpdate = function componentDidUpdate() {
- this.warnIfPlaceholderNotMounted();
- };
-
- _proto.warnIfPlaceholderNotMounted = function warnIfPlaceholderNotMounted() {
- if (process.env.NODE_ENV === 'production') {
- return;
- }
-
- if (!this.props.placeholder) {
- return;
- }
-
- if (this.isPlaceholderMounted) {
- return;
- }
-
- console.warn("\n Droppable setup issue: DroppableProvided > placeholder could not be found.\n Please be sure to add the {provided.placeholder} Node as a child of your Droppable\n\n More information: https://github.com/atlassian/react-beautiful-dnd#1-provided-droppableprovided\n ");
- };
-
- _proto.getPlaceholder = function getPlaceholder() {
- if (!this.props.placeholder) {
- return null;
- }
-
- return React__default.createElement(Placeholder, {
- placeholder: this.props.placeholder,
- onMount: this.onPlaceholderMount,
- onUnmount: this.onPlaceholderUnmount
- });
- };
-
- _proto.render = function render() {
- var _this$props = this.props,
- children = _this$props.children,
- direction = _this$props.direction,
- droppableId = _this$props.droppableId,
- ignoreContainerClipping = _this$props.ignoreContainerClipping,
- isDraggingOver = _this$props.isDraggingOver,
- isDropDisabled = _this$props.isDropDisabled,
- draggingOverWith = _this$props.draggingOverWith,
- type = _this$props.type;
- var provided = {
- innerRef: this.setRef,
- placeholder: this.getPlaceholder(),
- droppableProps: {
- 'data-react-beautiful-dnd-droppable': this.styleContext
- }
- };
- var snapshot = {
- isDraggingOver: isDraggingOver,
- draggingOverWith: draggingOverWith
- };
- return React__default.createElement(DroppableDimensionPublisher, {
- droppableId: droppableId,
- type: type,
- direction: direction,
- ignoreContainerClipping: ignoreContainerClipping,
- isDropDisabled: isDropDisabled,
- getDroppableRef: this.getDroppableRef
- }, children(provided, snapshot));
- };
-
- return Droppable;
- }(React.Component);
-
- Droppable.contextTypes = (_Droppable$contextTyp = {}, _Droppable$contextTyp[styleContextKey] = PropTypes.string.isRequired, _Droppable$contextTyp);
- Droppable.childContextTypes = (_Droppable$childConte = {}, _Droppable$childConte[droppableIdKey] = PropTypes.string.isRequired, _Droppable$childConte[droppableTypeKey] = PropTypes.string.isRequired, _Droppable$childConte);
-
- var isStrictEqual = (function (a, b) {
- return a === b;
- });
-
- var makeMapStateToProps = function makeMapStateToProps() {
- var getIsDraggingOver = function getIsDraggingOver(id, destination) {
- if (!destination) {
- return false;
- }
-
- return destination.droppableId === id;
- };
-
- var shouldUsePlaceholder = function shouldUsePlaceholder(id, descriptor, destination) {
- if (!destination) {
- return false;
- }
-
- if (id === descriptor.droppableId) {
- return false;
- }
-
- return id === destination.droppableId;
- };
-
- var getMapProps = memoizeOne(function (isDraggingOver, draggingOverWith, placeholder) {
- return {
- isDraggingOver: isDraggingOver,
- draggingOverWith: draggingOverWith,
- placeholder: placeholder
- };
- });
-
- var getDefault = function getDefault() {
- return getMapProps(false, null, null);
- };
-
- var selector = function selector(state, ownProps) {
- if (ownProps.isDropDisabled) {
- return getDefault();
- }
-
- var id = ownProps.droppableId;
-
- if (state.isDragging) {
- var destination = state.impact.destination;
- var isDraggingOver = getIsDraggingOver(id, destination);
- var draggableId = state.critical.draggable.id;
- var draggingOverWith = isDraggingOver ? draggableId : null;
- var draggable = state.dimensions.draggables[draggableId];
- var placeholder = shouldUsePlaceholder(id, draggable.descriptor, destination) ? draggable.placeholder : null;
- return getMapProps(isDraggingOver, draggingOverWith, placeholder);
- }
-
- if (state.phase === 'DROP_ANIMATING') {
- var _destination = state.pending.impact.destination;
-
- var _isDraggingOver = getIsDraggingOver(id, _destination);
-
- var _draggableId = state.pending.result.draggableId;
-
- var _draggingOverWith = _isDraggingOver ? _draggableId : null;
-
- var _draggable = state.dimensions.draggables[_draggableId];
-
- var _placeholder = shouldUsePlaceholder(id, _draggable.descriptor, _destination) ? _draggable.placeholder : null;
-
- return getMapProps(_isDraggingOver, _draggingOverWith, _placeholder);
- }
-
- return getDefault();
- };
-
- return selector;
- };
- var connectedDroppable = reactRedux.connect(makeMapStateToProps, null, null, {
- storeKey: storeKey,
- pure: true,
- areStatePropsEqual: isStrictEqual
- })(Droppable);
- connectedDroppable.defaultProps = {
- type: 'DEFAULT',
- isDropDisabled: false,
- direction: 'vertical',
- ignoreContainerClipping: false
- };
-
- var _DraggableDimensionPu;
-
- var DraggableDimensionPublisher = function (_Component) {
- _inheritsLoose(DraggableDimensionPublisher, _Component);
-
- function DraggableDimensionPublisher() {
- var _this;
-
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
-
- _this = _Component.call.apply(_Component, [this].concat(args)) || this;
- _this.publishedDescriptor = null;
- _this.getMemoizedDescriptor = memoizeOne(function (id, index, droppableId, type) {
- return {
- id: id,
- index: index,
- droppableId: droppableId,
- type: type
- };
- });
-
- _this.publish = function () {
- var marshal = _this.context[dimensionMarshalKey];
-
- var descriptor = _this.getMemoizedDescriptor(_this.props.draggableId, _this.props.index, _this.props.droppableId, _this.props.type);
-
- if (!_this.publishedDescriptor) {
- marshal.registerDraggable(descriptor, _this.getDimension);
- _this.publishedDescriptor = descriptor;
- return;
- }
-
- if (descriptor === _this.publishedDescriptor) {
- return;
- }
-
- marshal.updateDraggable(_this.publishedDescriptor, descriptor, _this.getDimension);
- _this.publishedDescriptor = descriptor;
- };
-
- _this.unpublish = function () {
- !_this.publishedDescriptor ? process.env.NODE_ENV !== "production" ? invariant(false, 'Cannot unpublish descriptor when none is published') : invariant(false) : void 0;
- var marshal = _this.context[dimensionMarshalKey];
- marshal.unregisterDraggable(_this.publishedDescriptor);
- _this.publishedDescriptor = null;
- };
-
- _this.getDimension = function (windowScroll) {
- var targetRef = _this.props.getDraggableRef();
-
- var descriptor = _this.publishedDescriptor;
- !targetRef ? process.env.NODE_ENV !== "production" ? invariant(false, 'DraggableDimensionPublisher cannot calculate a dimension when not attached to the DOM') : invariant(false) : void 0;
- !descriptor ? process.env.NODE_ENV !== "production" ? invariant(false, 'Cannot get dimension for unpublished draggable') : invariant(false) : void 0;
- var computedStyles = window.getComputedStyle(targetRef);
- var borderBox = targetRef.getBoundingClientRect();
- var client = cssBoxModel.calculateBox(borderBox, computedStyles);
- var page = cssBoxModel.withScroll(client, windowScroll);
- var placeholder = {
- client: client,
- tagName: targetRef.tagName.toLowerCase(),
- display: computedStyles.display
- };
- var dimension = {
- descriptor: descriptor,
- placeholder: placeholder,
- client: client,
- page: page
- };
- return dimension;
- };
-
- return _this;
- }
-
- var _proto = DraggableDimensionPublisher.prototype;
-
- _proto.componentDidMount = function componentDidMount() {
- this.publish();
- };
-
- _proto.componentDidUpdate = function componentDidUpdate() {
- this.publish();
- };
-
- _proto.componentWillUnmount = function componentWillUnmount() {
- this.unpublish();
- };
-
- _proto.render = function render() {
- return this.props.children;
- };
-
- return DraggableDimensionPublisher;
- }(React.Component);
-
- DraggableDimensionPublisher.contextTypes = (_DraggableDimensionPu = {}, _DraggableDimensionPu[dimensionMarshalKey] = PropTypes.object.isRequired, _DraggableDimensionPu);
-
- var DoubleRenderBlocker = function (_React$Component) {
- _inheritsLoose(DoubleRenderBlocker, _React$Component);
-
- function DoubleRenderBlocker() {
- return _React$Component.apply(this, arguments) || this;
- }
-
- var _proto = DoubleRenderBlocker.prototype;
-
- _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {
- if (isEqual(origin, nextProps.change)) {
- return true;
- }
-
- if (isEqual(this.props.change, nextProps.change)) {
- return false;
- }
-
- return true;
- };
-
- _proto.render = function render() {
- return this.props.children(this.props.change);
- };
-
- return DoubleRenderBlocker;
- }(React__default.Component);
-
- var Moveable = function (_Component) {
- _inheritsLoose(Moveable, _Component);
-
- function Moveable() {
- return _Component.apply(this, arguments) || this;
- }
-
- var _proto2 = Moveable.prototype;
-
- _proto2.getFinal = function getFinal() {
- var destination = this.props.destination;
- var speed = this.props.speed;
-
- if (speed === 'INSTANT') {
- return destination;
- }
-
- var config = speed === 'FAST' ? physics.fast : physics.standard;
- return {
- x: reactMotion.spring(destination.x, config),
- y: reactMotion.spring(destination.y, config)
- };
- };
-
- _proto2.render = function render() {
- var _this = this;
-
- var final = this.getFinal();
- return React__default.createElement(reactMotion.Motion, {
- defaultStyle: origin,
- style: final,
- onRest: this.props.onMoveEnd
- }, function (current) {
- var _this$props = _this.props,
- speed = _this$props.speed,
- destination = _this$props.destination,
- children = _this$props.children;
- var target = speed === 'INSTANT' ? destination : current;
- return React__default.createElement(DoubleRenderBlocker, {
- change: target
- }, children);
- });
- };
-
- return Moveable;
- }(React.Component);
-
- Moveable.defaultProps = {
- destination: origin
- };
-
- var getWindowFromRef = (function (ref) {
- return ref ? ref.ownerDocument.defaultView : window;
- });
-
- var selector = "[" + dragHandle + "]";
-
- var isSVG = function isSVG(el) {
- if (typeof SVGElement === 'undefined') {
- return false;
- }
-
- return el instanceof SVGElement;
- };
-
- var throwIfSVG = function throwIfSVG(el) {
- !!isSVG(el) ? process.env.NODE_ENV !== "production" ? invariant(false, "A drag handle cannot be an SVGElement: it has inconsistent focus support.\n\n More information: https://github.com/atlassian/react-beautiful-dnd/tree/master/docs/guides/dragging-svgs.md") : invariant(false) : void 0;
- };
-
- var getDragHandleRef = function getDragHandleRef(draggableRef) {
- if (draggableRef.hasAttribute(dragHandle)) {
- throwIfSVG(draggableRef);
- return draggableRef;
- }
-
- var el = draggableRef.querySelector(selector);
- throwIfSVG(draggableRef);
- !el ? process.env.NODE_ENV !== "production" ? invariant(false, "\n Cannot find drag handle element inside of Draggable.\n Please be sure to apply the {...provided.dragHandleProps} to your Draggable\n\n More information: https://github.com/atlassian/react-beautiful-dnd#draggable\n ") : invariant(false) : void 0;
- !(el instanceof HTMLElement) ? process.env.NODE_ENV !== "production" ? invariant(false, 'A drag handle must be a HTMLElement') : invariant(false) : void 0;
- return el;
- };
-
- var retainingFocusFor = null;
- var listenerOptions$1 = {
- capture: true
- };
-
- var clearRetentionOnFocusChange = function () {
- var isBound = false;
-
- var bind = function bind() {
- if (isBound) {
- return;
- }
-
- isBound = true;
- window.addEventListener('focus', onWindowFocusChange, listenerOptions$1);
- };
-
- var unbind = function unbind() {
- if (!isBound) {
- return;
- }
-
- isBound = false;
- window.removeEventListener('focus', onWindowFocusChange, listenerOptions$1);
- };
-
- var onWindowFocusChange = function onWindowFocusChange() {
- unbind();
- retainingFocusFor = null;
- };
-
- var result = function result() {
- return bind();
- };
-
- result.cancel = function () {
- return unbind();
- };
-
- return result;
- }();
-
- var retain = function retain(id) {
- retainingFocusFor = id;
- clearRetentionOnFocusChange();
- };
-
- var tryRestoreFocus = function tryRestoreFocus(id, draggableRef) {
- if (!retainingFocusFor) {
- return;
- }
-
- if (id !== retainingFocusFor) {
- return;
- }
-
- retainingFocusFor = null;
- clearRetentionOnFocusChange.cancel();
- var dragHandleRef = getDragHandleRef(draggableRef);
-
- if (!dragHandleRef) {
- console.warn('Could not find drag handle in the DOM to focus on it');
- return;
- }
-
- dragHandleRef.focus();
- };
-
- var retainer = {
- retain: retain,
- tryRestoreFocus: tryRestoreFocus
- };
-
- var interactiveTagNames = {
- input: true,
- button: true,
- textarea: true,
- select: true,
- option: true,
- optgroup: true,
- video: true,
- audio: true
- };
-
- var isAnInteractiveElement = function isAnInteractiveElement(parent, current) {
- if (current == null) {
- return false;
- }
-
- var hasAnInteractiveTag = Boolean(interactiveTagNames[current.tagName.toLowerCase()]);
-
- if (hasAnInteractiveTag) {
- return true;
- }
-
- var attribute = current.getAttribute('contenteditable');
-
- if (attribute === 'true' || attribute === '') {
- return true;
- }
-
- if (current === parent) {
- return false;
- }
-
- return isAnInteractiveElement(parent, current.parentElement);
- };
-
- var shouldAllowDraggingFromTarget = (function (event, props) {
- if (props.canDragInteractiveElements) {
- return true;
- }
-
- var target = event.target,
- currentTarget = event.currentTarget;
-
- if (!(target instanceof Element) || !(currentTarget instanceof Element)) {
- return true;
- }
-
- return !isAnInteractiveElement(currentTarget, target);
- });
-
- var createScheduler = (function (callbacks) {
- var memoizedMove = memoizeOne(function (x, y) {
- var point = {
- x: x,
- y: y
- };
- callbacks.onMove(point);
- });
- var move = rafSchd(function (point) {
- return memoizedMove(point.x, point.y);
- });
- var moveUp = rafSchd(callbacks.onMoveUp);
- var moveDown = rafSchd(callbacks.onMoveDown);
- var moveRight = rafSchd(callbacks.onMoveRight);
- var moveLeft = rafSchd(callbacks.onMoveLeft);
- var windowScrollMove = rafSchd(callbacks.onWindowScroll);
-
- var cancel = function cancel() {
- move.cancel();
- moveUp.cancel();
- moveDown.cancel();
- moveRight.cancel();
- moveLeft.cancel();
- windowScrollMove.cancel();
- };
-
- return {
- move: move,
- moveUp: moveUp,
- moveDown: moveDown,
- moveRight: moveRight,
- moveLeft: moveLeft,
- windowScrollMove: windowScrollMove,
- cancel: cancel
- };
- });
-
- var sloppyClickThreshold = 5;
- var isSloppyClickThresholdExceeded = (function (original, current) {
- return Math.abs(current.x - original.x) >= sloppyClickThreshold || Math.abs(current.y - original.y) >= sloppyClickThreshold;
- });
-
- var tab = 9;
- var enter = 13;
- var escape = 27;
- var space = 32;
- var pageUp = 33;
- var pageDown = 34;
- var end = 35;
- var home = 36;
- var arrowLeft = 37;
- var arrowUp = 38;
- var arrowRight = 39;
- var arrowDown = 40;
-
- var _preventedKeys;
- var preventedKeys = (_preventedKeys = {}, _preventedKeys[enter] = true, _preventedKeys[tab] = true, _preventedKeys);
- var preventStandardKeyEvents = (function (event) {
- if (preventedKeys[event.keyCode]) {
- event.preventDefault();
- }
- });
-
- var getOptions = function getOptions(shared, fromBinding) {
- return _extends({}, shared, fromBinding);
- };
-
- var bindEvents = function bindEvents(el, bindings, sharedOptions) {
- bindings.forEach(function (binding) {
- var options = getOptions(sharedOptions, binding.options);
- el.addEventListener(binding.eventName, binding.fn, options);
- });
- };
- var unbindEvents = function unbindEvents(el, bindings, sharedOptions) {
- bindings.forEach(function (binding) {
- var options = getOptions(sharedOptions, binding.options);
- el.removeEventListener(binding.eventName, binding.fn, options);
- });
- };
-
- var sharedOptions = {
- capture: true
- };
- var createPostDragEventPreventer = (function (getWindow) {
- var isBound = false;
-
- var bind = function bind() {
- if (isBound) {
- return;
- }
-
- isBound = true;
- bindEvents(getWindow(), pointerEvents, sharedOptions);
- };
-
- var unbind = function unbind() {
- if (!isBound) {
- return;
- }
-
- isBound = false;
- unbindEvents(getWindow(), pointerEvents, sharedOptions);
- };
-
- var pointerEvents = [{
- eventName: 'click',
- fn: function fn(event) {
- event.preventDefault();
- unbind();
- }
- }, {
- eventName: 'mousedown',
- fn: unbind
- }, {
- eventName: 'touchstart',
- fn: unbind
- }];
-
- var preventNext = function preventNext() {
- if (isBound) {
- unbind();
- }
-
- bind();
- };
-
- var preventer = {
- preventNext: preventNext,
- abort: unbind
- };
- return preventer;
- });
-
- var createEventMarshal = (function () {
- var isMouseDownHandled = false;
-
- var handle = function handle() {
- !!isMouseDownHandled ? process.env.NODE_ENV !== "production" ? invariant(false, 'Cannot handle mouse down as it is already handled') : invariant(false) : void 0;
- isMouseDownHandled = true;
- };
-
- var isHandled = function isHandled() {
- return isMouseDownHandled;
- };
-
- var reset = function reset() {
- isMouseDownHandled = false;
- };
-
- return {
- handle: handle,
- isHandled: isHandled,
- reset: reset
- };
- });
-
- var supportedEventName = function () {
- var base = 'visibilitychange';
-
- if (typeof document === 'undefined') {
- return base;
- }
-
- var candidates = [base, "ms" + base, "webkit" + base, "moz" + base, "o" + base];
- var supported = candidates.find(function (eventName) {
- return "on" + eventName in document;
- });
- return supported || base;
- }();
-
- var primaryButton = 0;
-
- var noop = function noop() {};
-
- var mouseDownMarshal = createEventMarshal();
- var createMouseSensor = (function (_ref) {
- var callbacks = _ref.callbacks,
- getWindow = _ref.getWindow,
- canStartCapturing = _ref.canStartCapturing;
- var state = {
- isDragging: false,
- pending: null
- };
-
- var setState = function setState(newState) {
- state = newState;
- };
-
- var isDragging = function isDragging() {
- return state.isDragging;
- };
-
- var isCapturing = function isCapturing() {
- return Boolean(state.pending || state.isDragging);
- };
-
- var schedule = createScheduler(callbacks);
- var postDragEventPreventer = createPostDragEventPreventer(getWindow);
-
- var startDragging = function startDragging(fn) {
- if (fn === void 0) {
- fn = noop;
- }
-
- setState({
- pending: null,
- isDragging: true
- });
- fn();
- };
-
- var stopDragging = function stopDragging(fn, shouldBlockClick) {
- if (fn === void 0) {
- fn = noop;
- }
-
- if (shouldBlockClick === void 0) {
- shouldBlockClick = true;
- }
-
- schedule.cancel();
- unbindWindowEvents();
- mouseDownMarshal.reset();
-
- if (shouldBlockClick) {
- postDragEventPreventer.preventNext();
- }
-
- setState({
- isDragging: false,
- pending: null
- });
- fn();
- };
-
- var startPendingDrag = function startPendingDrag(point) {
- setState({
- pending: point,
- isDragging: false
- });
- bindWindowEvents();
- };
-
- var stopPendingDrag = function stopPendingDrag() {
- stopDragging(noop, false);
- };
-
- var kill = function kill(fn) {
- if (fn === void 0) {
- fn = noop;
- }
-
- if (state.pending) {
- stopPendingDrag();
- return;
- }
-
- stopDragging(fn);
- };
-
- var unmount = function unmount() {
- kill();
- postDragEventPreventer.abort();
- };
-
- var cancel = function cancel() {
- kill(callbacks.onCancel);
- };
-
- var windowBindings = [{
- eventName: 'mousemove',
- fn: function fn(event) {
- var button = event.button,
- clientX = event.clientX,
- clientY = event.clientY;
-
- if (button !== primaryButton) {
- return;
- }
-
- var point = {
- x: clientX,
- y: clientY
- };
-
- if (state.isDragging) {
- event.preventDefault();
- schedule.move(point);
- return;
- }
-
- if (!state.pending) {
- kill();
- process.env.NODE_ENV !== "production" ? invariant(false, 'Expected there to be a pending drag') : invariant(false);
- }
-
- if (!isSloppyClickThresholdExceeded(state.pending, point)) {
- return;
- }
-
- event.preventDefault();
- startDragging(function () {
- return callbacks.onLift({
- clientSelection: point,
- autoScrollMode: 'FLUID'
- });
- });
- }
- }, {
- eventName: 'mouseup',
- fn: function fn(event) {
- if (state.pending) {
- stopPendingDrag();
- return;
- }
-
- event.preventDefault();
- stopDragging(callbacks.onDrop);
- }
- }, {
- eventName: 'mousedown',
- fn: function fn(event) {
- if (state.isDragging) {
- event.preventDefault();
- }
-
- stopDragging(callbacks.onCancel);
- }
- }, {
- eventName: 'keydown',
- fn: function fn(event) {
- if (!state.isDragging) {
- cancel();
- return;
- }
-
- if (event.keyCode === escape) {
- event.preventDefault();
- cancel();
- return;
- }
-
- preventStandardKeyEvents(event);
- }
- }, {
- eventName: 'resize',
- fn: cancel
- }, {
- eventName: 'scroll',
- options: {
- passive: true,
- capture: false
- },
- fn: function fn() {
- if (state.pending) {
- stopPendingDrag();
- return;
- }
-
- schedule.windowScrollMove();
- }
- }, {
- eventName: 'webkitmouseforcechanged',
- fn: function fn(event) {
- if (event.webkitForce == null || MouseEvent.WEBKIT_FORCE_AT_FORCE_MOUSE_DOWN == null) {
- if (process.env.NODE_ENV !== 'production') {
- console.warn('handling a mouse force changed event when it is not supported');
- }
-
- return;
- }
-
- var forcePressThreshold = MouseEvent.WEBKIT_FORCE_AT_FORCE_MOUSE_DOWN;
- var isForcePressing = event.webkitForce >= forcePressThreshold;
-
- if (isForcePressing) {
- cancel();
- }
- }
- }, {
- eventName: supportedEventName,
- fn: cancel
- }];
-
- var bindWindowEvents = function bindWindowEvents() {
- var win = getWindow();
- bindEvents(win, windowBindings, {
- capture: true
- });
- };
-
- var unbindWindowEvents = function unbindWindowEvents() {
- var win = getWindow();
- unbindEvents(win, windowBindings, {
- capture: true
- });
- };
-
- var onMouseDown = function onMouseDown(event) {
- if (mouseDownMarshal.isHandled()) {
- return;
- }
-
- !!isCapturing() ? process.env.NODE_ENV !== "production" ? invariant(false, 'Should not be able to perform a mouse down while a drag or pending drag is occurring') : invariant(false) : void 0;
-
- if (!canStartCapturing(event)) {
- return;
- }
-
- if (event.button !== primaryButton) {
- return;
- }
-
- if (event.ctrlKey || event.metaKey || event.shiftKey || event.altKey) {
- return;
- }
-
- mouseDownMarshal.handle();
- event.preventDefault();
- var point = {
- x: event.clientX,
- y: event.clientY
- };
- startPendingDrag(point);
- };
-
- var sensor = {
- onMouseDown: onMouseDown,
- kill: kill,
- isCapturing: isCapturing,
- isDragging: isDragging,
- unmount: unmount
- };
- return sensor;
- });
-
- var getBorderBoxCenterPosition = (function (el) {
- return cssBoxModel.getRect(el.getBoundingClientRect()).center;
- });
-
- var _scrollJumpKeys;
- var scrollJumpKeys = (_scrollJumpKeys = {}, _scrollJumpKeys[pageDown] = true, _scrollJumpKeys[pageUp] = true, _scrollJumpKeys[home] = true, _scrollJumpKeys[end] = true, _scrollJumpKeys);
-
- var noop$1 = function noop() {};
-
- var createKeyboardSensor = (function (_ref) {
- var callbacks = _ref.callbacks,
- getWindow = _ref.getWindow,
- getDraggableRef = _ref.getDraggableRef,
- canStartCapturing = _ref.canStartCapturing;
- var state = {
- isDragging: false
- };
-
- var setState = function setState(newState) {
- state = newState;
- };
-
- var startDragging = function startDragging(fn) {
- if (fn === void 0) {
- fn = noop$1;
- }
-
- setState({
- isDragging: true
- });
- bindWindowEvents();
- fn();
- };
-
- var stopDragging = function stopDragging(fn) {
- if (fn === void 0) {
- fn = noop$1;
- }
-
- schedule.cancel();
- unbindWindowEvents();
- setState({
- isDragging: false
- });
- fn();
- };
-
- var kill = function kill() {
- return stopDragging();
- };
-
- var cancel = function cancel() {
- stopDragging(callbacks.onCancel);
- };
-
- var isDragging = function isDragging() {
- return state.isDragging;
- };
-
- var schedule = createScheduler(callbacks);
-
- var onKeyDown = function onKeyDown(event) {
- if (!isDragging()) {
- if (event.defaultPrevented) {
- return;
- }
-
- if (!canStartCapturing(event)) {
- return;
- }
-
- if (event.keyCode !== space) {
- return;
- }
-
- var ref = getDraggableRef();
- !ref ? process.env.NODE_ENV !== "production" ? invariant(false, 'Cannot start a keyboard drag without a draggable ref') : invariant(false) : void 0;
- var center = getBorderBoxCenterPosition(ref);
- event.preventDefault();
- startDragging(function () {
- return callbacks.onLift({
- clientSelection: center,
- autoScrollMode: 'JUMP'
- });
- });
- return;
- }
-
- if (event.keyCode === escape) {
- event.preventDefault();
- cancel();
- return;
- }
-
- if (event.keyCode === space) {
- event.preventDefault();
- stopDragging(callbacks.onDrop);
- return;
- }
-
- if (event.keyCode === arrowDown) {
- event.preventDefault();
- schedule.moveDown();
- return;
- }
-
- if (event.keyCode === arrowUp) {
- event.preventDefault();
- schedule.moveUp();
- return;
- }
-
- if (event.keyCode === arrowRight) {
- event.preventDefault();
- schedule.moveRight();
- return;
- }
-
- if (event.keyCode === arrowLeft) {
- event.preventDefault();
- schedule.moveLeft();
- return;
- }
-
- if (scrollJumpKeys[event.keyCode]) {
- event.preventDefault();
- return;
- }
-
- preventStandardKeyEvents(event);
- };
-
- var windowBindings = [{
- eventName: 'mousedown',
- fn: cancel
- }, {
- eventName: 'mouseup',
- fn: cancel
- }, {
- eventName: 'click',
- fn: cancel
- }, {
- eventName: 'touchstart',
- fn: cancel
- }, {
- eventName: 'resize',
- fn: cancel
- }, {
- eventName: 'wheel',
- fn: cancel
- }, {
- eventName: 'scroll',
- options: {
- capture: false
- },
- fn: callbacks.onWindowScroll
- }, {
- eventName: supportedEventName,
- fn: cancel
- }];
-
- var bindWindowEvents = function bindWindowEvents() {
- bindEvents(getWindow(), windowBindings, {
- capture: true
- });
- };
-
- var unbindWindowEvents = function unbindWindowEvents() {
- unbindEvents(getWindow(), windowBindings, {
- capture: true
- });
- };
-
- var sensor = {
- onKeyDown: onKeyDown,
- kill: kill,
- isDragging: isDragging,
- isCapturing: isDragging,
- unmount: kill
- };
- return sensor;
- });
-
- var timeForLongPress = 150;
- var forcePressThreshold = 0.15;
- var touchStartMarshal = createEventMarshal();
-
- var noop$2 = function noop() {};
-
- var webkitHack = function () {
- var stub = {
- preventTouchMove: noop$2,
- releaseTouchMove: noop$2
- };
-
- if (typeof window === 'undefined') {
- return stub;
- }
-
- if (!('ontouchstart' in window)) {
- return stub;
- }
-
- var isBlocking = false;
- window.addEventListener('touchmove', function (event) {
- if (!isBlocking) {
- return;
- }
-
- if (event.defaultPrevented) {
- return;
- }
-
- event.preventDefault();
- }, {
- passive: false,
- capture: false
- });
-
- var preventTouchMove = function preventTouchMove() {
- isBlocking = true;
- };
-
- var releaseTouchMove = function releaseTouchMove() {
- isBlocking = false;
- };
-
- return {
- preventTouchMove: preventTouchMove,
- releaseTouchMove: releaseTouchMove
- };
- }();
-
- var initial = {
- isDragging: false,
- pending: null,
- hasMoved: false,
- longPressTimerId: null
- };
- var createTouchSensor = (function (_ref) {
- var callbacks = _ref.callbacks,
- getWindow = _ref.getWindow,
- canStartCapturing = _ref.canStartCapturing;
- var state = initial;
-
- var setState = function setState(partial) {
- state = _extends({}, state, partial);
- };
-
- var isDragging = function isDragging() {
- return state.isDragging;
- };
-
- var isCapturing = function isCapturing() {
- return Boolean(state.pending || state.isDragging || state.longPressTimerId);
- };
-
- var schedule = createScheduler(callbacks);
- var postDragEventPreventer = createPostDragEventPreventer(getWindow);
-
- var startDragging = function startDragging() {
- var pending = state.pending;
-
- if (!pending) {
- kill();
- process.env.NODE_ENV !== "production" ? invariant(false, 'cannot start a touch drag without a pending position') : invariant(false);
- }
-
- setState({
- isDragging: true,
- hasMoved: false,
- pending: null,
- longPressTimerId: null
- });
- callbacks.onLift({
- clientSelection: pending,
- autoScrollMode: 'FLUID'
- });
- };
-
- var stopDragging = function stopDragging(fn) {
- if (fn === void 0) {
- fn = noop$2;
- }
-
- schedule.cancel();
- touchStartMarshal.reset();
- webkitHack.releaseTouchMove();
- unbindWindowEvents();
- postDragEventPreventer.preventNext();
- setState(initial);
- fn();
- };
-
- var startPendingDrag = function startPendingDrag(event) {
- var touch = event.touches[0];
- var clientX = touch.clientX,
- clientY = touch.clientY;
- var point = {
- x: clientX,
- y: clientY
- };
- var longPressTimerId = setTimeout(startDragging, timeForLongPress);
- setState({
- longPressTimerId: longPressTimerId,
- pending: point,
- isDragging: false,
- hasMoved: false
- });
- bindWindowEvents();
- };
-
- var stopPendingDrag = function stopPendingDrag() {
- if (state.longPressTimerId) {
- clearTimeout(state.longPressTimerId);
- }
-
- schedule.cancel();
- touchStartMarshal.reset();
- webkitHack.releaseTouchMove();
- unbindWindowEvents();
- setState(initial);
- };
-
- var kill = function kill(fn) {
- if (fn === void 0) {
- fn = noop$2;
- }
-
- if (state.pending) {
- stopPendingDrag();
- return;
- }
-
- stopDragging(fn);
- };
-
- var unmount = function unmount() {
- kill();
- postDragEventPreventer.abort();
- };
-
- var cancel = function cancel() {
- kill(callbacks.onCancel);
- };
-
- var windowBindings = [{
- eventName: 'touchmove',
- options: {
- passive: false
- },
- fn: function fn(event) {
- if (!state.isDragging) {
- stopPendingDrag();
- return;
- }
-
- if (!state.hasMoved) {
- setState({
- hasMoved: true
- });
- }
-
- var _event$touches$ = event.touches[0],
- clientX = _event$touches$.clientX,
- clientY = _event$touches$.clientY;
- var point = {
- x: clientX,
- y: clientY
- };
- event.preventDefault();
- schedule.move(point);
- }
- }, {
- eventName: 'touchend',
- fn: function fn(event) {
- if (!state.isDragging) {
- stopPendingDrag();
- return;
- }
-
- event.preventDefault();
- stopDragging(callbacks.onDrop);
- }
- }, {
- eventName: 'touchcancel',
- fn: function fn(event) {
- if (!state.isDragging) {
- stopPendingDrag();
- return;
- }
-
- event.preventDefault();
- stopDragging(callbacks.onCancel);
- }
- }, {
- eventName: 'touchstart',
- fn: cancel
- }, {
- eventName: 'orientationchange',
- fn: cancel
- }, {
- eventName: 'resize',
- fn: cancel
- }, {
- eventName: 'scroll',
- options: {
- passive: true,
- capture: false
- },
- fn: function fn() {
- if (state.pending) {
- stopPendingDrag();
- return;
- }
-
- schedule.windowScrollMove();
- }
- }, {
- eventName: 'contextmenu',
- fn: function fn(event) {
- event.preventDefault();
- }
- }, {
- eventName: 'keydown',
- fn: function fn(event) {
- if (!state.isDragging) {
- cancel();
- return;
- }
-
- if (event.keyCode === escape) {
- event.preventDefault();
- }
-
- cancel();
- }
- }, {
- eventName: 'touchforcechange',
- fn: function fn(event) {
- if (state.hasMoved) {
- event.preventDefault();
- return;
- }
-
- var touch = event.touches[0];
-
- if (touch.force >= forcePressThreshold) {
- cancel();
- }
- }
- }, {
- eventName: supportedEventName,
- fn: cancel
- }];
-
- var bindWindowEvents = function bindWindowEvents() {
- bindEvents(getWindow(), windowBindings, {
- capture: true
- });
- };
-
- var unbindWindowEvents = function unbindWindowEvents() {
- unbindEvents(getWindow(), windowBindings, {
- capture: true
- });
- };
-
- var onTouchStart = function onTouchStart(event) {
- if (touchStartMarshal.isHandled()) {
- return;
- }
-
- !!isCapturing() ? process.env.NODE_ENV !== "production" ? invariant(false, 'Should not be able to perform a touch start while a drag or pending drag is occurring') : invariant(false) : void 0;
-
- if (!canStartCapturing(event)) {
- return;
- }
-
- touchStartMarshal.handle();
- webkitHack.preventTouchMove();
- startPendingDrag(event);
- };
-
- var sensor = {
- onTouchStart: onTouchStart,
- kill: kill,
- isCapturing: isCapturing,
- isDragging: isDragging,
- unmount: unmount
- };
- return sensor;
- });
-
- var _DragHandle$contextTy;
-
- var preventHtml5Dnd = function preventHtml5Dnd(event) {
- event.preventDefault();
- };
-
- var DragHandle = function (_Component) {
- _inheritsLoose(DragHandle, _Component);
-
- function DragHandle(props, context) {
- var _this;
-
- _this = _Component.call(this, props, context) || this;
- _this.mouseSensor = void 0;
- _this.keyboardSensor = void 0;
- _this.touchSensor = void 0;
- _this.sensors = void 0;
- _this.styleContext = void 0;
- _this.canLift = void 0;
- _this.isFocused = false;
- _this.lastDraggableRef = void 0;
-
- _this.onFocus = function () {
- _this.isFocused = true;
- };
-
- _this.onBlur = function () {
- _this.isFocused = false;
- };
-
- _this.onKeyDown = function (event) {
- if (_this.mouseSensor.isCapturing() || _this.touchSensor.isCapturing()) {
- return;
- }
-
- _this.keyboardSensor.onKeyDown(event);
- };
-
- _this.onMouseDown = function (event) {
- if (_this.keyboardSensor.isCapturing() || _this.mouseSensor.isCapturing()) {
- return;
- }
-
- _this.mouseSensor.onMouseDown(event);
- };
-
- _this.onTouchStart = function (event) {
- if (_this.mouseSensor.isCapturing() || _this.keyboardSensor.isCapturing()) {
- return;
- }
-
- _this.touchSensor.onTouchStart(event);
- };
-
- _this.canStartCapturing = function (event) {
- if (_this.isAnySensorCapturing()) {
- return false;
- }
-
- if (!_this.canLift(_this.props.draggableId)) {
- return false;
- }
-
- return shouldAllowDraggingFromTarget(event, _this.props);
- };
-
- _this.isAnySensorCapturing = function () {
- return _this.sensors.some(function (sensor) {
- return sensor.isCapturing();
- });
- };
-
- _this.getProvided = memoizeOne(function (isEnabled) {
- if (!isEnabled) {
- return null;
- }
-
- var provided = {
- onMouseDown: _this.onMouseDown,
- onKeyDown: _this.onKeyDown,
- onTouchStart: _this.onTouchStart,
- onFocus: _this.onFocus,
- onBlur: _this.onBlur,
- tabIndex: 0,
- 'data-react-beautiful-dnd-drag-handle': _this.styleContext,
- 'aria-roledescription': 'Draggable item. Press space bar to lift',
- draggable: false,
- onDragStart: preventHtml5Dnd
- };
- return provided;
- });
-
- var getWindow = function getWindow() {
- return getWindowFromRef(_this.props.getDraggableRef());
- };
-
- var args = {
- callbacks: _this.props.callbacks,
- getDraggableRef: _this.props.getDraggableRef,
- getWindow: getWindow,
- canStartCapturing: _this.canStartCapturing
- };
- _this.mouseSensor = createMouseSensor(args);
- _this.keyboardSensor = createKeyboardSensor(args);
- _this.touchSensor = createTouchSensor(args);
- _this.sensors = [_this.mouseSensor, _this.keyboardSensor, _this.touchSensor];
- _this.styleContext = context[styleContextKey];
- _this.canLift = context[canLiftContextKey];
- return _this;
- }
-
- var _proto = DragHandle.prototype;
-
- _proto.componentDidMount = function componentDidMount() {
- var draggableRef = this.props.getDraggableRef();
- this.lastDraggableRef = draggableRef;
- !draggableRef ? process.env.NODE_ENV !== "production" ? invariant(false, 'Cannot get draggable ref from drag handle') : invariant(false) : void 0;
-
- if (!this.props.isEnabled) {
- return;
- }
-
- var dragHandleRef = getDragHandleRef(draggableRef);
- retainer.tryRestoreFocus(this.props.draggableId, dragHandleRef);
- };
-
- _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
- var _this2 = this;
-
- var ref = this.props.getDraggableRef();
-
- if (ref !== this.lastDraggableRef) {
- this.lastDraggableRef = ref;
-
- if (!ref || !this.isFocused) {
- return;
- }
-
- if (!this.props.isEnabled) {
- return;
- }
-
- getDragHandleRef(ref).focus();
- }
-
- var isCapturing = this.isAnySensorCapturing();
-
- if (!isCapturing) {
- return;
- }
-
- var isDragStopping = prevProps.isDragging && !this.props.isDragging;
-
- if (isDragStopping) {
- this.sensors.forEach(function (sensor) {
- if (sensor.isCapturing()) {
- sensor.kill();
- }
- });
- }
-
- if (this.props.isEnabled) {
- return;
- }
-
- this.sensors.forEach(function (sensor) {
- if (!sensor.isCapturing()) {
- return;
- }
-
- var wasDragging = sensor.isDragging();
- sensor.kill();
-
- if (wasDragging) {
- if (process.env.NODE_ENV !== 'production') {
- console.warn('You have disabled dragging on a Draggable while it was dragging. The drag has been cancelled');
- }
-
- _this2.props.callbacks.onCancel();
- }
- });
- };
-
- _proto.componentWillUnmount = function componentWillUnmount() {
- var _this3 = this;
-
- this.sensors.forEach(function (sensor) {
- var wasDragging = sensor.isDragging();
- sensor.unmount();
-
- if (wasDragging) {
- _this3.props.callbacks.onCancel();
- }
- });
-
- var shouldRetainFocus = function () {
- if (!_this3.props.isEnabled) {
- return false;
- }
-
- if (!_this3.isFocused) {
- return false;
- }
-
- return _this3.props.isDragging || _this3.props.isDropAnimating;
- }();
-
- if (shouldRetainFocus) {
- retainer.retain(this.props.draggableId);
- }
- };
-
- _proto.render = function render() {
- var _this$props = this.props,
- children = _this$props.children,
- isEnabled = _this$props.isEnabled;
- return children(this.getProvided(isEnabled));
- };
-
- return DragHandle;
- }(React.Component);
-
- DragHandle.contextTypes = (_DragHandle$contextTy = {}, _DragHandle$contextTy[styleContextKey] = PropTypes.string.isRequired, _DragHandle$contextTy[canLiftContextKey] = PropTypes.func.isRequired, _DragHandle$contextTy);
-
- var getWindowScroll = (function () {
- return {
- x: window.pageXOffset,
- y: window.pageYOffset
- };
- });
-
- var getViewport = (function () {
- var scroll = getWindowScroll();
- var top = scroll.y;
- var left = scroll.x;
- var doc = document.documentElement;
- !doc ? process.env.NODE_ENV !== "production" ? invariant(false, 'Could not find document.documentElement') : invariant(false) : void 0;
- var width = doc.clientWidth;
- var height = doc.clientHeight;
- var right = left + width;
- var bottom = top + height;
- var frame = cssBoxModel.getRect({
- top: top,
- left: left,
- right: right,
- bottom: bottom
- });
- var maxScroll = getMaxScroll({
- scrollHeight: doc.scrollHeight,
- scrollWidth: doc.scrollWidth,
- width: frame.width,
- height: frame.height
- });
- var viewport = {
- frame: frame,
- scroll: {
- initial: scroll,
- current: scroll,
- max: maxScroll,
- diff: {
- value: origin,
- displacement: origin
- }
- }
- };
- return viewport;
- });
-
- var _Draggable$contextTyp;
- var zIndexOptions = {
- dragging: 5000,
- dropAnimating: 4500
- };
-
- var getTranslate = function getTranslate(offset) {
- if (isEqual(offset, origin)) {
- return null;
- }
-
- return "translate(" + offset.x + "px, " + offset.y + "px)";
- };
-
- var getSpeed$1 = function getSpeed(isDragging, shouldAnimateDragMovement, isDropAnimating) {
- if (isDropAnimating) {
- return 'STANDARD';
- }
-
- if (isDragging && shouldAnimateDragMovement) {
- return 'FAST';
- }
-
- return 'INSTANT';
- };
-
- var Draggable = function (_Component) {
- _inheritsLoose(Draggable, _Component);
-
- function Draggable(props, context) {
- var _this;
-
- _this = _Component.call(this, props, context) || this;
- _this.callbacks = void 0;
- _this.styleContext = void 0;
- _this.ref = null;
-
- _this.onMoveEnd = function () {
- if (_this.props.isDropAnimating) {
- _this.props.dropAnimationFinished();
- }
- };
-
- _this.onLift = function (options) {
- start('LIFT');
- var ref = _this.ref;
- !ref ? process.env.NODE_ENV !== "production" ? invariant(false) : invariant(false) : void 0;
- !!_this.props.isDragDisabled ? process.env.NODE_ENV !== "production" ? invariant(false, 'Cannot lift a Draggable when it is disabled') : invariant(false) : void 0;
- var clientSelection = options.clientSelection,
- autoScrollMode = options.autoScrollMode;
- var _this$props = _this.props,
- lift = _this$props.lift,
- draggableId = _this$props.draggableId;
- var client = {
- selection: clientSelection,
- borderBoxCenter: getBorderBoxCenterPosition(ref),
- offset: origin
- };
- lift({
- id: draggableId,
- client: client,
- autoScrollMode: autoScrollMode,
- viewport: getViewport()
- });
- finish('LIFT');
- };
-
- _this.setRef = function (ref) {
- if (ref === null) {
- return;
- }
-
- if (ref === _this.ref) {
- return;
- }
-
- _this.ref = ref;
- throwIfRefIsInvalid(ref);
- };
-
- _this.getDraggableRef = function () {
- return _this.ref;
- };
-
- _this.getDraggingStyle = memoizeOne(function (change, dimension, isDropAnimating) {
- var box = dimension.client;
- var style = {
- position: 'fixed',
- top: box.marginBox.top,
- left: box.marginBox.left,
- boxSizing: 'border-box',
- width: box.borderBox.width,
- height: box.borderBox.height,
- transition: 'none',
- zIndex: isDropAnimating ? zIndexOptions.dropAnimating : zIndexOptions.dragging,
- transform: getTranslate(change),
- pointerEvents: 'none'
- };
- return style;
- });
- _this.getNotDraggingStyle = memoizeOne(function (current, shouldAnimateDisplacement) {
- var style = {
- transform: getTranslate(current),
- transition: shouldAnimateDisplacement ? null : 'none'
- };
- return style;
- });
- _this.getProvided = memoizeOne(function (change, isDragging, isDropAnimating, shouldAnimateDisplacement, dimension, dragHandleProps) {
- var useDraggingStyle = isDragging || isDropAnimating;
-
- var draggableStyle = function () {
- if (!useDraggingStyle) {
- return _this.getNotDraggingStyle(change, shouldAnimateDisplacement);
- }
-
- !dimension ? process.env.NODE_ENV !== "production" ? invariant(false, 'draggable dimension required for dragging') : invariant(false) : void 0;
- return _this.getDraggingStyle(change, dimension, isDropAnimating);
- }();
-
- var provided = {
- innerRef: _this.setRef,
- draggableProps: {
- 'data-react-beautiful-dnd-draggable': _this.styleContext,
- style: draggableStyle
- },
- dragHandleProps: dragHandleProps
- };
- return provided;
- });
- _this.getSnapshot = memoizeOne(function (isDragging, isDropAnimating, draggingOver) {
- return {
- isDragging: isDragging || isDropAnimating,
- isDropAnimating: isDropAnimating,
- draggingOver: draggingOver
- };
- });
-
- _this.renderChildren = function (change, dragHandleProps) {
- var _this$props2 = _this.props,
- isDragging = _this$props2.isDragging,
- isDropAnimating = _this$props2.isDropAnimating,
- dimension = _this$props2.dimension,
- draggingOver = _this$props2.draggingOver,
- shouldAnimateDisplacement = _this$props2.shouldAnimateDisplacement,
- children = _this$props2.children;
- var child = children(_this.getProvided(change, isDragging, isDropAnimating, shouldAnimateDisplacement, dimension, dragHandleProps), _this.getSnapshot(isDragging, isDropAnimating, draggingOver));
- var isDraggingOrDropping = isDragging || isDropAnimating;
-
- var placeholder = function () {
- if (!isDraggingOrDropping) {
- return null;
- }
-
- !dimension ? process.env.NODE_ENV !== "production" ? invariant(false, 'Draggable: Dimension is required for dragging') : invariant(false) : void 0;
- return React__default.createElement(Placeholder, {
- placeholder: dimension.placeholder
- });
- }();
-
- return React__default.createElement(React.Fragment, null, child, placeholder);
- };
-
- var callbacks = {
- onLift: _this.onLift,
- onMove: function onMove(clientSelection) {
- return props.move({
- client: clientSelection,
- shouldAnimate: false
- });
- },
- onDrop: function onDrop() {
- return props.drop({
- reason: 'DROP'
- });
- },
- onCancel: function onCancel() {
- return props.drop({
- reason: 'CANCEL'
- });
- },
- onMoveUp: props.moveUp,
- onMoveDown: props.moveDown,
- onMoveRight: props.moveRight,
- onMoveLeft: props.moveLeft,
- onWindowScroll: function onWindowScroll() {
- return props.moveByWindowScroll({
- scroll: getWindowScroll()
- });
- }
- };
- _this.callbacks = callbacks;
- _this.styleContext = context[styleContextKey];
- return _this;
- }
-
- var _proto = Draggable.prototype;
-
- _proto.componentWillUnmount = function componentWillUnmount() {
- this.ref = null;
- };
-
- _proto.render = function render() {
- var _this2 = this;
-
- var _this$props3 = this.props,
- draggableId = _this$props3.draggableId,
- index = _this$props3.index,
- offset = _this$props3.offset,
- isDragging = _this$props3.isDragging,
- isDropAnimating = _this$props3.isDropAnimating,
- isDragDisabled = _this$props3.isDragDisabled,
- shouldAnimateDragMovement = _this$props3.shouldAnimateDragMovement,
- disableInteractiveElementBlocking = _this$props3.disableInteractiveElementBlocking;
- var droppableId = this.context[droppableIdKey];
- var type = this.context[droppableTypeKey];
- var speed = getSpeed$1(isDragging, shouldAnimateDragMovement, isDropAnimating);
- return React__default.createElement(DraggableDimensionPublisher, {
- key: draggableId,
- draggableId: draggableId,
- droppableId: droppableId,
- type: type,
- index: index,
- getDraggableRef: this.getDraggableRef
- }, React__default.createElement(Moveable, {
- speed: speed,
- destination: offset,
- onMoveEnd: this.onMoveEnd
- }, function (change) {
- return React__default.createElement(DragHandle, {
- draggableId: draggableId,
- isDragging: isDragging,
- isDropAnimating: isDropAnimating,
- isEnabled: !isDragDisabled,
- callbacks: _this2.callbacks,
- getDraggableRef: _this2.getDraggableRef,
- canDragInteractiveElements: disableInteractiveElementBlocking
- }, function (dragHandleProps) {
- return _this2.renderChildren(change, dragHandleProps);
- });
- }));
- };
-
- return Draggable;
- }(React.Component);
-
- Draggable.contextTypes = (_Draggable$contextTyp = {}, _Draggable$contextTyp[droppableIdKey] = PropTypes.string.isRequired, _Draggable$contextTyp[droppableTypeKey] = PropTypes.string.isRequired, _Draggable$contextTyp[styleContextKey] = PropTypes.string.isRequired, _Draggable$contextTyp);
-
- var defaultMapProps = {
- isDropAnimating: false,
- isDragging: false,
- offset: origin,
- shouldAnimateDragMovement: false,
- shouldAnimateDisplacement: true,
- dimension: null,
- draggingOver: null
- };
- var makeMapStateToProps$1 = function makeMapStateToProps() {
- var memoizedOffset = memoizeOne(function (x, y) {
- return {
- x: x,
- y: y
- };
- });
- var getNotDraggingProps = memoizeOne(function (offset, shouldAnimateDisplacement) {
- return {
- isDropAnimating: false,
- isDragging: false,
- offset: offset,
- shouldAnimateDisplacement: shouldAnimateDisplacement,
- shouldAnimateDragMovement: false,
- dimension: null,
- draggingOver: null
- };
- });
- var getDraggingProps = memoizeOne(function (offset, shouldAnimateDragMovement, dimension, draggingOver) {
- return {
- isDragging: true,
- isDropAnimating: false,
- shouldAnimateDisplacement: false,
- offset: offset,
- shouldAnimateDragMovement: shouldAnimateDragMovement,
- dimension: dimension,
- draggingOver: draggingOver
- };
- });
-
- var getOutOfTheWayMovement = function getOutOfTheWayMovement(id, movement) {
- var map = getDisplacementMap(movement.displaced);
- var displacement = map[id];
-
- if (!displacement) {
- return null;
- }
-
- if (!displacement.isVisible) {
- return null;
- }
-
- var amount = movement.isBeyondStartPosition ? negate(movement.amount) : movement.amount;
- return getNotDraggingProps(memoizedOffset(amount.x, amount.y), displacement.shouldAnimate);
- };
-
- var draggingSelector = function draggingSelector(state, ownProps) {
- if (state.isDragging) {
- if (state.critical.draggable.id !== ownProps.draggableId) {
- return null;
- }
-
- var offset = state.current.client.offset;
- var dimension = state.dimensions.draggables[ownProps.draggableId];
- var shouldAnimateDragMovement = state.shouldAnimate;
- var draggingOver = state.impact.destination ? state.impact.destination.droppableId : null;
- return getDraggingProps(memoizedOffset(offset.x, offset.y), shouldAnimateDragMovement, dimension, draggingOver);
- }
-
- if (state.phase === 'DROP_ANIMATING') {
- var pending = state.pending;
-
- if (pending.result.draggableId !== ownProps.draggableId) {
- return null;
- }
-
- var _draggingOver = pending.result.destination ? pending.result.destination.droppableId : null;
-
- return {
- isDragging: false,
- isDropAnimating: true,
- offset: pending.newHomeOffset,
- dimension: state.dimensions.draggables[ownProps.draggableId],
- draggingOver: _draggingOver,
- shouldAnimateDragMovement: false,
- shouldAnimateDisplacement: false
- };
- }
-
- return null;
- };
-
- var movingOutOfTheWaySelector = function movingOutOfTheWaySelector(state, ownProps) {
- if (state.isDragging) {
- if (state.critical.draggable.id === ownProps.draggableId) {
- return null;
- }
-
- return getOutOfTheWayMovement(ownProps.draggableId, state.impact.movement);
- }
-
- if (state.phase === 'DROP_ANIMATING') {
- if (state.pending.result.draggableId === ownProps.draggableId) {
- return null;
- }
-
- return getOutOfTheWayMovement(ownProps.draggableId, state.pending.impact.movement);
- }
-
- return null;
- };
-
- var selector = function selector(state, ownProps) {
- var dragging = draggingSelector(state, ownProps);
-
- if (dragging) {
- return dragging;
- }
-
- var movingOutOfTheWay = movingOutOfTheWaySelector(state, ownProps);
-
- if (movingOutOfTheWay) {
- return movingOutOfTheWay;
- }
-
- return defaultMapProps;
- };
-
- return selector;
- };
- var mapDispatchToProps = {
- lift: lift,
- move: move,
- moveUp: moveUp,
- moveDown: moveDown,
- moveLeft: moveLeft,
- moveRight: moveRight,
- moveByWindowScroll: moveByWindowScroll,
- drop: drop,
- dropAnimationFinished: dropAnimationFinished
- };
- var ConnectedDraggable = reactRedux.connect(makeMapStateToProps$1, mapDispatchToProps, null, {
- storeKey: storeKey,
- pure: true,
- areStatePropsEqual: isStrictEqual
- })(Draggable);
- ConnectedDraggable.defaultProps = {
- isDragDisabled: false,
- disableInteractiveElementBlocking: false
- };
-
- exports.DragDropContext = DragDropContext;
- exports.Droppable = connectedDroppable;
- exports.Draggable = ConnectedDraggable;
- exports.resetServerContext = resetServerContext;
-
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(33)))
-
-/***/ }),
-/* 151 */
-/***/ (function(module, exports, __webpack_require__) {
-
- var _Object$assign = __webpack_require__(152);
-
- function _extends() {
- module.exports = _extends = _Object$assign || function (target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
-
- for (var key in source) {
- if (Object.prototype.hasOwnProperty.call(source, key)) {
- target[key] = source[key];
- }
- }
- }
-
- return target;
- };
-
- return _extends.apply(this, arguments);
- }
-
- module.exports = _extends;
-
-/***/ }),
-/* 152 */
-/***/ (function(module, exports, __webpack_require__) {
-
- module.exports = __webpack_require__(153);
-
-/***/ }),
-/* 153 */
-/***/ (function(module, exports, __webpack_require__) {
-
- __webpack_require__(154);
- module.exports = __webpack_require__(157).Object.assign;
-
-
-/***/ }),
-/* 154 */
-/***/ (function(module, exports, __webpack_require__) {
-
- // 19.1.3.1 Object.assign(target, source)
- var $export = __webpack_require__(155);
-
- $export($export.S + $export.F, 'Object', { assign: __webpack_require__(171) });
-
-
-/***/ }),
-/* 155 */
-/***/ (function(module, exports, __webpack_require__) {
-
- var global = __webpack_require__(156);
- var core = __webpack_require__(157);
- var ctx = __webpack_require__(158);
- var hide = __webpack_require__(160);
- var has = __webpack_require__(170);
- var PROTOTYPE = 'prototype';
-
- var $export = function (type, name, source) {
- var IS_FORCED = type & $export.F;
- var IS_GLOBAL = type & $export.G;
- var IS_STATIC = type & $export.S;
- var IS_PROTO = type & $export.P;
- var IS_BIND = type & $export.B;
- var IS_WRAP = type & $export.W;
- var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
- var expProto = exports[PROTOTYPE];
- var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];
- var key, own, out;
- if (IS_GLOBAL) source = name;
- for (key in source) {
- // contains in native
- own = !IS_FORCED && target && target[key] !== undefined;
- if (own && has(exports, key)) continue;
- // export native or passed
- out = own ? target[key] : source[key];
- // prevent global pollution for namespaces
- exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
- // bind timers to global for call from export context
- : IS_BIND && own ? ctx(out, global)
- // wrap global constructors for prevent change them in library
- : IS_WRAP && target[key] == out ? (function (C) {
- var F = function (a, b, c) {
- if (this instanceof C) {
- switch (arguments.length) {
- case 0: return new C();
- case 1: return new C(a);
- case 2: return new C(a, b);
- } return new C(a, b, c);
- } return C.apply(this, arguments);
- };
- F[PROTOTYPE] = C[PROTOTYPE];
- return F;
- // make static versions for prototype methods
- })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
- // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
- if (IS_PROTO) {
- (exports.virtual || (exports.virtual = {}))[key] = out;
- // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
- if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);
- }
- }
- };
- // type bitmap
- $export.F = 1; // forced
- $export.G = 2; // global
- $export.S = 4; // static
- $export.P = 8; // proto
- $export.B = 16; // bind
- $export.W = 32; // wrap
- $export.U = 64; // safe
- $export.R = 128; // real proto method for `library`
- module.exports = $export;
-
-
-/***/ }),
-/* 156 */
-/***/ (function(module, exports) {
-
- // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
- var global = module.exports = typeof window != 'undefined' && window.Math == Math
- ? window : typeof self != 'undefined' && self.Math == Math ? self
- // eslint-disable-next-line no-new-func
- : Function('return this')();
- if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
-
-
-/***/ }),
-/* 157 */
-/***/ (function(module, exports) {
-
- var core = module.exports = { version: '2.6.4' };
- if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
-
-
-/***/ }),
-/* 158 */
-/***/ (function(module, exports, __webpack_require__) {
-
- // optional / simple context binding
- var aFunction = __webpack_require__(159);
- module.exports = function (fn, that, length) {
- aFunction(fn);
- if (that === undefined) return fn;
- switch (length) {
- case 1: return function (a) {
- return fn.call(that, a);
- };
- case 2: return function (a, b) {
- return fn.call(that, a, b);
- };
- case 3: return function (a, b, c) {
- return fn.call(that, a, b, c);
- };
- }
- return function (/* ...args */) {
- return fn.apply(that, arguments);
- };
- };
-
-
-/***/ }),
-/* 159 */
-/***/ (function(module, exports) {
-
- module.exports = function (it) {
- if (typeof it != 'function') throw TypeError(it + ' is not a function!');
- return it;
- };
-
-
-/***/ }),
-/* 160 */
-/***/ (function(module, exports, __webpack_require__) {
-
- var dP = __webpack_require__(161);
- var createDesc = __webpack_require__(169);
- module.exports = __webpack_require__(165) ? function (object, key, value) {
- return dP.f(object, key, createDesc(1, value));
- } : function (object, key, value) {
- object[key] = value;
- return object;
- };
-
-
-/***/ }),
-/* 161 */
-/***/ (function(module, exports, __webpack_require__) {
-
- var anObject = __webpack_require__(162);
- var IE8_DOM_DEFINE = __webpack_require__(164);
- var toPrimitive = __webpack_require__(168);
- var dP = Object.defineProperty;
-
- exports.f = __webpack_require__(165) ? Object.defineProperty : function defineProperty(O, P, Attributes) {
- anObject(O);
- P = toPrimitive(P, true);
- anObject(Attributes);
- if (IE8_DOM_DEFINE) try {
- return dP(O, P, Attributes);
- } catch (e) { /* empty */ }
- if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
- if ('value' in Attributes) O[P] = Attributes.value;
- return O;
- };
-
-
-/***/ }),
-/* 162 */
-/***/ (function(module, exports, __webpack_require__) {
-
- var isObject = __webpack_require__(163);
- module.exports = function (it) {
- if (!isObject(it)) throw TypeError(it + ' is not an object!');
- return it;
- };
-
-
-/***/ }),
-/* 163 */
-/***/ (function(module, exports) {
-
- module.exports = function (it) {
- return typeof it === 'object' ? it !== null : typeof it === 'function';
- };
-
-
-/***/ }),
-/* 164 */
-/***/ (function(module, exports, __webpack_require__) {
-
- module.exports = !__webpack_require__(165) && !__webpack_require__(166)(function () {
- return Object.defineProperty(__webpack_require__(167)('div'), 'a', { get: function () { return 7; } }).a != 7;
- });
-
-
-/***/ }),
-/* 165 */
-/***/ (function(module, exports, __webpack_require__) {
-
- // Thank's IE8 for his funny defineProperty
- module.exports = !__webpack_require__(166)(function () {
- return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
- });
-
-
-/***/ }),
-/* 166 */
-/***/ (function(module, exports) {
-
- module.exports = function (exec) {
- try {
- return !!exec();
- } catch (e) {
- return true;
- }
- };
-
-
-/***/ }),
-/* 167 */
-/***/ (function(module, exports, __webpack_require__) {
-
- var isObject = __webpack_require__(163);
- var document = __webpack_require__(156).document;
- // typeof document.createElement is 'object' in old IE
- var is = isObject(document) && isObject(document.createElement);
- module.exports = function (it) {
- return is ? document.createElement(it) : {};
- };
-
-
-/***/ }),
-/* 168 */
-/***/ (function(module, exports, __webpack_require__) {
-
- // 7.1.1 ToPrimitive(input [, PreferredType])
- var isObject = __webpack_require__(163);
- // instead of the ES6 spec version, we didn't implement @@toPrimitive case
- // and the second argument - flag - preferred type is a string
- module.exports = function (it, S) {
- if (!isObject(it)) return it;
- var fn, val;
- if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
- if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
- if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
- throw TypeError("Can't convert object to primitive value");
- };
-
-
-/***/ }),
-/* 169 */
-/***/ (function(module, exports) {
-
- module.exports = function (bitmap, value) {
- return {
- enumerable: !(bitmap & 1),
- configurable: !(bitmap & 2),
- writable: !(bitmap & 4),
- value: value
- };
- };
-
-
-/***/ }),
-/* 170 */
-/***/ (function(module, exports) {
-
- var hasOwnProperty = {}.hasOwnProperty;
- module.exports = function (it, key) {
- return hasOwnProperty.call(it, key);
- };
-
-
-/***/ }),
-/* 171 */
-/***/ (function(module, exports, __webpack_require__) {
-
- 'use strict';
- // 19.1.2.1 Object.assign(target, source, ...)
- var getKeys = __webpack_require__(172);
- var gOPS = __webpack_require__(187);
- var pIE = __webpack_require__(188);
- var toObject = __webpack_require__(189);
- var IObject = __webpack_require__(175);
- var $assign = Object.assign;
-
- // should work with symbols and should have deterministic property order (V8 bug)
- module.exports = !$assign || __webpack_require__(166)(function () {
- var A = {};
- var B = {};
- // eslint-disable-next-line no-undef
- var S = Symbol();
- var K = 'abcdefghijklmnopqrst';
- A[S] = 7;
- K.split('').forEach(function (k) { B[k] = k; });
- return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
- }) ? function assign(target, source) { // eslint-disable-line no-unused-vars
- var T = toObject(target);
- var aLen = arguments.length;
- var index = 1;
- var getSymbols = gOPS.f;
- var isEnum = pIE.f;
- while (aLen > index) {
- var S = IObject(arguments[index++]);
- var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);
- var length = keys.length;
- var j = 0;
- var key;
- while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key];
- } return T;
- } : $assign;
-
-
-/***/ }),
-/* 172 */
-/***/ (function(module, exports, __webpack_require__) {
-
- // 19.1.2.14 / 15.2.3.14 Object.keys(O)
- var $keys = __webpack_require__(173);
- var enumBugKeys = __webpack_require__(186);
-
- module.exports = Object.keys || function keys(O) {
- return $keys(O, enumBugKeys);
- };
-
-
-/***/ }),
-/* 173 */
-/***/ (function(module, exports, __webpack_require__) {
-
- var has = __webpack_require__(170);
- var toIObject = __webpack_require__(174);
- var arrayIndexOf = __webpack_require__(178)(false);
- var IE_PROTO = __webpack_require__(182)('IE_PROTO');
-
- module.exports = function (object, names) {
- var O = toIObject(object);
- var i = 0;
- var result = [];
- var key;
- for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
- // Don't enum bug & hidden keys
- while (names.length > i) if (has(O, key = names[i++])) {
- ~arrayIndexOf(result, key) || result.push(key);
- }
- return result;
- };
-
-
-/***/ }),
-/* 174 */
-/***/ (function(module, exports, __webpack_require__) {
-
- // to indexed object, toObject with fallback for non-array-like ES3 strings
- var IObject = __webpack_require__(175);
- var defined = __webpack_require__(177);
- module.exports = function (it) {
- return IObject(defined(it));
- };
-
-
-/***/ }),
-/* 175 */
-/***/ (function(module, exports, __webpack_require__) {
-
- // fallback for non-array-like ES3 and non-enumerable old V8 strings
- var cof = __webpack_require__(176);
- // eslint-disable-next-line no-prototype-builtins
- module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
- return cof(it) == 'String' ? it.split('') : Object(it);
- };
-
-
-/***/ }),
-/* 176 */
-/***/ (function(module, exports) {
-
- var toString = {}.toString;
-
- module.exports = function (it) {
- return toString.call(it).slice(8, -1);
- };
-
-
-/***/ }),
-/* 177 */
-/***/ (function(module, exports) {
-
- // 7.2.1 RequireObjectCoercible(argument)
- module.exports = function (it) {
- if (it == undefined) throw TypeError("Can't call method on " + it);
- return it;
- };
-
-
-/***/ }),
-/* 178 */
-/***/ (function(module, exports, __webpack_require__) {
-
- // false -> Array#indexOf
- // true -> Array#includes
- var toIObject = __webpack_require__(174);
- var toLength = __webpack_require__(179);
- var toAbsoluteIndex = __webpack_require__(181);
- module.exports = function (IS_INCLUDES) {
- return function ($this, el, fromIndex) {
- var O = toIObject($this);
- var length = toLength(O.length);
- var index = toAbsoluteIndex(fromIndex, length);
- var value;
- // Array#includes uses SameValueZero equality algorithm
- // eslint-disable-next-line no-self-compare
- if (IS_INCLUDES && el != el) while (length > index) {
- value = O[index++];
- // eslint-disable-next-line no-self-compare
- if (value != value) return true;
- // Array#indexOf ignores holes, Array#includes - not
- } else for (;length > index; index++) if (IS_INCLUDES || index in O) {
- if (O[index] === el) return IS_INCLUDES || index || 0;
- } return !IS_INCLUDES && -1;
- };
- };
-
-
-/***/ }),
-/* 179 */
-/***/ (function(module, exports, __webpack_require__) {
-
- // 7.1.15 ToLength
- var toInteger = __webpack_require__(180);
- var min = Math.min;
- module.exports = function (it) {
- return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
- };
-
-
-/***/ }),
-/* 180 */
-/***/ (function(module, exports) {
-
- // 7.1.4 ToInteger
- var ceil = Math.ceil;
- var floor = Math.floor;
- module.exports = function (it) {
- return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
- };
-
-
-/***/ }),
-/* 181 */
-/***/ (function(module, exports, __webpack_require__) {
-
- var toInteger = __webpack_require__(180);
- var max = Math.max;
- var min = Math.min;
- module.exports = function (index, length) {
- index = toInteger(index);
- return index < 0 ? max(index + length, 0) : min(index, length);
- };
-
-
-/***/ }),
-/* 182 */
-/***/ (function(module, exports, __webpack_require__) {
-
- var shared = __webpack_require__(183)('keys');
- var uid = __webpack_require__(185);
- module.exports = function (key) {
- return shared[key] || (shared[key] = uid(key));
- };
-
-
-/***/ }),
-/* 183 */
-/***/ (function(module, exports, __webpack_require__) {
-
- var core = __webpack_require__(157);
- var global = __webpack_require__(156);
- var SHARED = '__core-js_shared__';
- var store = global[SHARED] || (global[SHARED] = {});
-
- (module.exports = function (key, value) {
- return store[key] || (store[key] = value !== undefined ? value : {});
- })('versions', []).push({
- version: core.version,
- mode: __webpack_require__(184) ? 'pure' : 'global',
- copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
- });
-
-
-/***/ }),
-/* 184 */
-/***/ (function(module, exports) {
-
- module.exports = true;
-
-
-/***/ }),
-/* 185 */
-/***/ (function(module, exports) {
-
- var id = 0;
- var px = Math.random();
- module.exports = function (key) {
- return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
- };
-
-
-/***/ }),
-/* 186 */
-/***/ (function(module, exports) {
-
- // IE 8- don't enum bug keys
- module.exports = (
- 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
- ).split(',');
-
-
-/***/ }),
-/* 187 */
-/***/ (function(module, exports) {
-
- exports.f = Object.getOwnPropertySymbols;
-
-
-/***/ }),
-/* 188 */
-/***/ (function(module, exports) {
-
- exports.f = {}.propertyIsEnumerable;
-
-
-/***/ }),
-/* 189 */
-/***/ (function(module, exports, __webpack_require__) {
-
- // 7.1.13 ToObject(argument)
- var defined = __webpack_require__(177);
- module.exports = function (it) {
- return Object(defined(it));
- };
-
-
-/***/ }),
-/* 190 */
-/***/ (function(module, exports, __webpack_require__) {
-
- /* WEBPACK VAR INJECTION */(function(process) {'use strict';
-
- var isProduction = process.env.NODE_ENV === 'production';
- var prefix = 'Invariant failed';
- function invariant(condition, message) {
- if (condition) {
- return;
- }
-
- if (isProduction) {
- throw new Error(prefix);
- } else {
- throw new Error(prefix + ": " + (message || ''));
- }
- }
-
- module.exports = invariant;
-
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(33)))
-
-/***/ }),
-/* 191 */
-/***/ (function(module, exports, __webpack_require__) {
-
- /* WEBPACK VAR INJECTION */(function(process) {'use strict';
-
- Object.defineProperty(exports, '__esModule', { value: true });
-
- function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
-
- var invariant = _interopDefault(__webpack_require__(190));
-
- var getRect = function getRect(_ref) {
- var top = _ref.top,
- right = _ref.right,
- bottom = _ref.bottom,
- left = _ref.left;
- var width = right - left;
- var height = bottom - top;
- var rect = {
- top: top,
- right: right,
- bottom: bottom,
- left: left,
- width: width,
- height: height,
- x: left,
- y: top,
- center: {
- x: (right + left) / 2,
- y: (bottom + top) / 2
- }
- };
- return rect;
- };
- var expand = function expand(target, expandBy) {
- return {
- top: target.top - expandBy.top,
- left: target.left - expandBy.left,
- bottom: target.bottom + expandBy.bottom,
- right: target.right + expandBy.right
- };
- };
- var shrink = function shrink(target, shrinkBy) {
- return {
- top: target.top + shrinkBy.top,
- left: target.left + shrinkBy.left,
- bottom: target.bottom - shrinkBy.bottom,
- right: target.right - shrinkBy.right
- };
- };
-
- var shift = function shift(target, shiftBy) {
- return {
- top: target.top + shiftBy.y,
- left: target.left + shiftBy.x,
- bottom: target.bottom + shiftBy.y,
- right: target.right + shiftBy.x
- };
- };
-
- var noSpacing = {
- top: 0,
- right: 0,
- bottom: 0,
- left: 0
- };
- var createBox = function createBox(_ref2) {
- var borderBox = _ref2.borderBox,
- _ref2$margin = _ref2.margin,
- margin = _ref2$margin === void 0 ? noSpacing : _ref2$margin,
- _ref2$border = _ref2.border,
- border = _ref2$border === void 0 ? noSpacing : _ref2$border,
- _ref2$padding = _ref2.padding,
- padding = _ref2$padding === void 0 ? noSpacing : _ref2$padding;
- var marginBox = getRect(expand(borderBox, margin));
- var paddingBox = getRect(shrink(borderBox, border));
- var contentBox = getRect(shrink(paddingBox, padding));
- return {
- marginBox: marginBox,
- borderBox: getRect(borderBox),
- paddingBox: paddingBox,
- contentBox: contentBox,
- margin: margin,
- border: border,
- padding: padding
- };
- };
-
- var parse = function parse(raw) {
- var value = raw.slice(0, -2);
- var suffix = raw.slice(-2);
- !(suffix === 'px') ? process.env.NODE_ENV !== "production" ? invariant(false, "Expected value to be a pixel value.\n Expected form: 10px\n Actual value: " + raw + "\n ") : invariant(false) : void 0;
- var result = Number(value);
- !!isNaN(result) ? process.env.NODE_ENV !== "production" ? invariant(false, "Could not parse value [raw: " + raw + ", without suffix: " + value + "]") : invariant(false) : void 0;
- return result;
- };
-
- var getWindowScroll = function getWindowScroll() {
- return {
- x: window.pageXOffset,
- y: window.pageYOffset
- };
- };
-
- var offset = function offset(original, change) {
- var borderBox = original.borderBox,
- border = original.border,
- margin = original.margin,
- padding = original.padding;
- var shifted = shift(borderBox, change);
- return createBox({
- borderBox: shifted,
- border: border,
- margin: margin,
- padding: padding
- });
- };
- var withScroll = function withScroll(original, scroll) {
- if (scroll === void 0) {
- scroll = getWindowScroll();
- }
-
- return offset(original, scroll);
- };
- var calculateBox = function calculateBox(borderBox, styles) {
- var margin = {
- top: parse(styles.marginTop),
- right: parse(styles.marginRight),
- bottom: parse(styles.marginBottom),
- left: parse(styles.marginLeft)
- };
- var padding = {
- top: parse(styles.paddingTop),
- right: parse(styles.paddingRight),
- bottom: parse(styles.paddingBottom),
- left: parse(styles.paddingLeft)
- };
- var border = {
- top: parse(styles.borderTopWidth),
- right: parse(styles.borderRightWidth),
- bottom: parse(styles.borderBottomWidth),
- left: parse(styles.borderLeftWidth)
- };
- return createBox({
- borderBox: borderBox,
- margin: margin,
- padding: padding,
- border: border
- });
- };
- var getBox = function getBox(el) {
- var borderBox = el.getBoundingClientRect();
- var styles = window.getComputedStyle(el);
- return calculateBox(borderBox, styles);
- };
-
- exports.getRect = getRect;
- exports.expand = expand;
- exports.shrink = shrink;
- exports.createBox = createBox;
- exports.offset = offset;
- exports.withScroll = withScroll;
- exports.calculateBox = calculateBox;
- exports.getBox = getBox;
-
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(33)))
-
-/***/ }),
-/* 192 */
-/***/ (function(module, exports, __webpack_require__) {
-
- module.exports = __webpack_require__(193);
-
-/***/ }),
-/* 193 */
-/***/ (function(module, exports, __webpack_require__) {
-
- __webpack_require__(194);
- module.exports = __webpack_require__(157).Object.keys;
-
-
-/***/ }),
-/* 194 */
-/***/ (function(module, exports, __webpack_require__) {
-
- // 19.1.2.14 Object.keys(O)
- var toObject = __webpack_require__(189);
- var $keys = __webpack_require__(172);
-
- __webpack_require__(195)('keys', function () {
- return function keys(it) {
- return $keys(toObject(it));
- };
- });
-
-
-/***/ }),
-/* 195 */
-/***/ (function(module, exports, __webpack_require__) {
-
- // most Object methods by ES6 should accept primitives
- var $export = __webpack_require__(155);
- var core = __webpack_require__(157);
- var fails = __webpack_require__(166);
- module.exports = function (KEY, exec) {
- var fn = (core.Object || {})[KEY] || Object[KEY];
- var exp = {};
- exp[KEY] = exec(fn);
- $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);
- };
-
-
-/***/ }),
-/* 196 */
-/***/ (function(module, exports) {
-
- 'use strict';
-
- var simpleIsEqual = function simpleIsEqual(a, b) {
- return a === b;
- };
-
- function index (resultFn, isEqual) {
- if (isEqual === void 0) {
- isEqual = simpleIsEqual;
- }
-
- var lastThis;
- var lastArgs = [];
- var lastResult;
- var calledOnce = false;
-
- var isNewArgEqualToLast = function isNewArgEqualToLast(newArg, index) {
- return isEqual(newArg, lastArgs[index]);
- };
-
- var result = function result() {
- for (var _len = arguments.length, newArgs = new Array(_len), _key = 0; _key < _len; _key++) {
- newArgs[_key] = arguments[_key];
- }
-
- if (calledOnce && lastThis === this && newArgs.length === lastArgs.length && newArgs.every(isNewArgEqualToLast)) {
- return lastResult;
- }
-
- lastResult = resultFn.apply(this, newArgs);
- calledOnce = true;
- lastThis = this;
- lastArgs = newArgs;
- return lastResult;
- };
-
- return result;
- }
-
- module.exports = index;
-
-
-/***/ }),
-/* 197 */
-/***/ (function(module, exports, __webpack_require__) {
-
- /* WEBPACK VAR INJECTION */(function(process) {'use strict';
-
- Object.defineProperty(exports, '__esModule', { value: true });
-
- function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
-
- var $$observable = _interopDefault(__webpack_require__(198));
-
- /**
- * These are private action types reserved by Redux.
- * For any unknown actions, you must return the current state.
- * If the current state is undefined, you must return the initial state.
- * Do not reference these action types directly in your code.
- */
- var randomString = function randomString() {
- return Math.random().toString(36).substring(7).split('').join('.');
- };
-
- var ActionTypes = {
- INIT: "@@redux/INIT" + randomString(),
- REPLACE: "@@redux/REPLACE" + randomString(),
- PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() {
- return "@@redux/PROBE_UNKNOWN_ACTION" + randomString();
- }
- };
-
- /**
- * @param {any} obj The object to inspect.
- * @returns {boolean} True if the argument appears to be a plain object.
- */
- function isPlainObject(obj) {
- if (typeof obj !== 'object' || obj === null) return false;
- var proto = obj;
-
- while (Object.getPrototypeOf(proto) !== null) {
- proto = Object.getPrototypeOf(proto);
- }
-
- return Object.getPrototypeOf(obj) === proto;
- }
-
- /**
- * Creates a Redux store that holds the state tree.
- * The only way to change the data in the store is to call `dispatch()` on it.
- *
- * There should only be a single store in your app. To specify how different
- * parts of the state tree respond to actions, you may combine several reducers
- * into a single reducer function by using `combineReducers`.
- *
- * @param {Function} reducer A function that returns the next state tree, given
- * the current state tree and the action to handle.
- *
- * @param {any} [preloadedState] The initial state. You may optionally specify it
- * to hydrate the state from the server in universal apps, or to restore a
- * previously serialized user session.
- * If you use `combineReducers` to produce the root reducer function, this must be
- * an object with the same shape as `combineReducers` keys.
- *
- * @param {Function} [enhancer] The store enhancer. You may optionally specify it
- * to enhance the store with third-party capabilities such as middleware,
- * time travel, persistence, etc. The only store enhancer that ships with Redux
- * is `applyMiddleware()`.
- *
- * @returns {Store} A Redux store that lets you read the state, dispatch actions
- * and subscribe to changes.
- */
-
- function createStore(reducer, preloadedState, enhancer) {
- var _ref2;
-
- if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') {
- throw new Error('It looks like you are passing several store enhancers to ' + 'createStore(). This is not supported. Instead, compose them ' + 'together to a single function');
- }
-
- if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {
- enhancer = preloadedState;
- preloadedState = undefined;
- }
-
- if (typeof enhancer !== 'undefined') {
- if (typeof enhancer !== 'function') {
- throw new Error('Expected the enhancer to be a function.');
- }
-
- return enhancer(createStore)(reducer, preloadedState);
- }
-
- if (typeof reducer !== 'function') {
- throw new Error('Expected the reducer to be a function.');
- }
-
- var currentReducer = reducer;
- var currentState = preloadedState;
- var currentListeners = [];
- var nextListeners = currentListeners;
- var isDispatching = false;
-
- function ensureCanMutateNextListeners() {
- if (nextListeners === currentListeners) {
- nextListeners = currentListeners.slice();
- }
- }
- /**
- * Reads the state tree managed by the store.
- *
- * @returns {any} The current state tree of your application.
- */
-
-
- function getState() {
- if (isDispatching) {
- throw new Error('You may not call store.getState() while the reducer is executing. ' + 'The reducer has already received the state as an argument. ' + 'Pass it down from the top reducer instead of reading it from the store.');
- }
-
- return currentState;
- }
- /**
- * Adds a change listener. It will be called any time an action is dispatched,
- * and some part of the state tree may potentially have changed. You may then
- * call `getState()` to read the current state tree inside the callback.
- *
- * You may call `dispatch()` from a change listener, with the following
- * caveats:
- *
- * 1. The subscriptions are snapshotted just before every `dispatch()` call.
- * If you subscribe or unsubscribe while the listeners are being invoked, this
- * will not have any effect on the `dispatch()` that is currently in progress.
- * However, the next `dispatch()` call, whether nested or not, will use a more
- * recent snapshot of the subscription list.
- *
- * 2. The listener should not expect to see all state changes, as the state
- * might have been updated multiple times during a nested `dispatch()` before
- * the listener is called. It is, however, guaranteed that all subscribers
- * registered before the `dispatch()` started will be called with the latest
- * state by the time it exits.
- *
- * @param {Function} listener A callback to be invoked on every dispatch.
- * @returns {Function} A function to remove this change listener.
- */
-
-
- function subscribe(listener) {
- if (typeof listener !== 'function') {
- throw new Error('Expected the listener to be a function.');
- }
-
- if (isDispatching) {
- throw new Error('You may not call store.subscribe() while the reducer is executing. ' + 'If you would like to be notified after the store has been updated, subscribe from a ' + 'component and invoke store.getState() in the callback to access the latest state. ' + 'See https://redux.js.org/api-reference/store#subscribe(listener) for more details.');
- }
-
- var isSubscribed = true;
- ensureCanMutateNextListeners();
- nextListeners.push(listener);
- return function unsubscribe() {
- if (!isSubscribed) {
- return;
- }
-
- if (isDispatching) {
- throw new Error('You may not unsubscribe from a store listener while the reducer is executing. ' + 'See https://redux.js.org/api-reference/store#subscribe(listener) for more details.');
- }
-
- isSubscribed = false;
- ensureCanMutateNextListeners();
- var index = nextListeners.indexOf(listener);
- nextListeners.splice(index, 1);
- };
- }
- /**
- * Dispatches an action. It is the only way to trigger a state change.
- *
- * The `reducer` function, used to create the store, will be called with the
- * current state tree and the given `action`. Its return value will
- * be considered the **next** state of the tree, and the change listeners
- * will be notified.
- *
- * The base implementation only supports plain object actions. If you want to
- * dispatch a Promise, an Observable, a thunk, or something else, you need to
- * wrap your store creating function into the corresponding middleware. For
- * example, see the documentation for the `redux-thunk` package. Even the
- * middleware will eventually dispatch plain object actions using this method.
- *
- * @param {Object} action A plain object representing “what changed”. It is
- * a good idea to keep actions serializable so you can record and replay user
- * sessions, or use the time travelling `redux-devtools`. An action must have
- * a `type` property which may not be `undefined`. It is a good idea to use
- * string constants for action types.
- *
- * @returns {Object} For convenience, the same action object you dispatched.
- *
- * Note that, if you use a custom middleware, it may wrap `dispatch()` to
- * return something else (for example, a Promise you can await).
- */
-
-
- function dispatch(action) {
- if (!isPlainObject(action)) {
- throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');
- }
-
- if (typeof action.type === 'undefined') {
- throw new Error('Actions may not have an undefined "type" property. ' + 'Have you misspelled a constant?');
- }
-
- if (isDispatching) {
- throw new Error('Reducers may not dispatch actions.');
- }
-
- try {
- isDispatching = true;
- currentState = currentReducer(currentState, action);
- } finally {
- isDispatching = false;
- }
-
- var listeners = currentListeners = nextListeners;
-
- for (var i = 0; i < listeners.length; i++) {
- var listener = listeners[i];
- listener();
- }
-
- return action;
- }
- /**
- * Replaces the reducer currently used by the store to calculate the state.
- *
- * You might need this if your app implements code splitting and you want to
- * load some of the reducers dynamically. You might also need this if you
- * implement a hot reloading mechanism for Redux.
- *
- * @param {Function} nextReducer The reducer for the store to use instead.
- * @returns {void}
- */
-
-
- function replaceReducer(nextReducer) {
- if (typeof nextReducer !== 'function') {
- throw new Error('Expected the nextReducer to be a function.');
- }
-
- currentReducer = nextReducer;
- dispatch({
- type: ActionTypes.REPLACE
- });
- }
- /**
- * Interoperability point for observable/reactive libraries.
- * @returns {observable} A minimal observable of state changes.
- * For more information, see the observable proposal:
- * https://github.com/tc39/proposal-observable
- */
-
-
- function observable() {
- var _ref;
-
- var outerSubscribe = subscribe;
- return _ref = {
- /**
- * The minimal observable subscription method.
- * @param {Object} observer Any object that can be used as an observer.
- * The observer object should have a `next` method.
- * @returns {subscription} An object with an `unsubscribe` method that can
- * be used to unsubscribe the observable from the store, and prevent further
- * emission of values from the observable.
- */
- subscribe: function subscribe(observer) {
- if (typeof observer !== 'object' || observer === null) {
- throw new TypeError('Expected the observer to be an object.');
- }
-
- function observeState() {
- if (observer.next) {
- observer.next(getState());
- }
- }
-
- observeState();
- var unsubscribe = outerSubscribe(observeState);
- return {
- unsubscribe: unsubscribe
- };
- }
- }, _ref[$$observable] = function () {
- return this;
- }, _ref;
- } // When a store is created, an "INIT" action is dispatched so that every
- // reducer returns their initial state. This effectively populates
- // the initial state tree.
-
-
- dispatch({
- type: ActionTypes.INIT
- });
- return _ref2 = {
- dispatch: dispatch,
- subscribe: subscribe,
- getState: getState,
- replaceReducer: replaceReducer
- }, _ref2[$$observable] = observable, _ref2;
- }
-
- /**
- * Prints a warning in the console if it exists.
- *
- * @param {String} message The warning message.
- * @returns {void}
- */
- function warning(message) {
- /* eslint-disable no-console */
- if (typeof console !== 'undefined' && typeof console.error === 'function') {
- console.error(message);
- }
- /* eslint-enable no-console */
-
-
- try {
- // This error was thrown as a convenience so that if you enable
- // "break on all exceptions" in your console,
- // it would pause the execution at this line.
- throw new Error(message);
- } catch (e) {} // eslint-disable-line no-empty
-
- }
-
- function getUndefinedStateErrorMessage(key, action) {
- var actionType = action && action.type;
- var actionDescription = actionType && "action \"" + String(actionType) + "\"" || 'an action';
- return "Given " + actionDescription + ", reducer \"" + key + "\" returned undefined. " + "To ignore an action, you must explicitly return the previous state. " + "If you want this reducer to hold no value, you can return null instead of undefined.";
- }
-
- function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {
- var reducerKeys = Object.keys(reducers);
- var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';
-
- if (reducerKeys.length === 0) {
- return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';
- }
-
- if (!isPlainObject(inputState)) {
- return "The " + argumentName + " has unexpected type of \"" + {}.toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + "\". Expected argument to be an object with the following " + ("keys: \"" + reducerKeys.join('", "') + "\"");
- }
-
- var unexpectedKeys = Object.keys(inputState).filter(function (key) {
- return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];
- });
- unexpectedKeys.forEach(function (key) {
- unexpectedKeyCache[key] = true;
- });
- if (action && action.type === ActionTypes.REPLACE) return;
-
- if (unexpectedKeys.length > 0) {
- return "Unexpected " + (unexpectedKeys.length > 1 ? 'keys' : 'key') + " " + ("\"" + unexpectedKeys.join('", "') + "\" found in " + argumentName + ". ") + "Expected to find one of the known reducer keys instead: " + ("\"" + reducerKeys.join('", "') + "\". Unexpected keys will be ignored.");
- }
- }
-
- function assertReducerShape(reducers) {
- Object.keys(reducers).forEach(function (key) {
- var reducer = reducers[key];
- var initialState = reducer(undefined, {
- type: ActionTypes.INIT
- });
-
- if (typeof initialState === 'undefined') {
- throw new Error("Reducer \"" + key + "\" returned undefined during initialization. " + "If the state passed to the reducer is undefined, you must " + "explicitly return the initial state. The initial state may " + "not be undefined. If you don't want to set a value for this reducer, " + "you can use null instead of undefined.");
- }
-
- if (typeof reducer(undefined, {
- type: ActionTypes.PROBE_UNKNOWN_ACTION()
- }) === 'undefined') {
- throw new Error("Reducer \"" + key + "\" returned undefined when probed with a random type. " + ("Don't try to handle " + ActionTypes.INIT + " or other actions in \"redux/*\" ") + "namespace. They are considered private. Instead, you must return the " + "current state for any unknown actions, unless it is undefined, " + "in which case you must return the initial state, regardless of the " + "action type. The initial state may not be undefined, but can be null.");
- }
- });
- }
- /**
- * Turns an object whose values are different reducer functions, into a single
- * reducer function. It will call every child reducer, and gather their results
- * into a single state object, whose keys correspond to the keys of the passed
- * reducer functions.
- *
- * @param {Object} reducers An object whose values correspond to different
- * reducer functions that need to be combined into one. One handy way to obtain
- * it is to use ES6 `import * as reducers` syntax. The reducers may never return
- * undefined for any action. Instead, they should return their initial state
- * if the state passed to them was undefined, and the current state for any
- * unrecognized action.
- *
- * @returns {Function} A reducer function that invokes every reducer inside the
- * passed object, and builds a state object with the same shape.
- */
-
-
- function combineReducers(reducers) {
- var reducerKeys = Object.keys(reducers);
- var finalReducers = {};
-
- for (var i = 0; i < reducerKeys.length; i++) {
- var key = reducerKeys[i];
-
- if (process.env.NODE_ENV !== 'production') {
- if (typeof reducers[key] === 'undefined') {
- warning("No reducer provided for key \"" + key + "\"");
- }
- }
-
- if (typeof reducers[key] === 'function') {
- finalReducers[key] = reducers[key];
- }
- }
-
- var finalReducerKeys = Object.keys(finalReducers);
- var unexpectedKeyCache;
-
- if (process.env.NODE_ENV !== 'production') {
- unexpectedKeyCache = {};
- }
-
- var shapeAssertionError;
-
- try {
- assertReducerShape(finalReducers);
- } catch (e) {
- shapeAssertionError = e;
- }
-
- return function combination(state, action) {
- if (state === void 0) {
- state = {};
- }
-
- if (shapeAssertionError) {
- throw shapeAssertionError;
- }
-
- if (process.env.NODE_ENV !== 'production') {
- var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);
-
- if (warningMessage) {
- warning(warningMessage);
- }
- }
-
- var hasChanged = false;
- var nextState = {};
-
- for (var _i = 0; _i < finalReducerKeys.length; _i++) {
- var _key = finalReducerKeys[_i];
- var reducer = finalReducers[_key];
- var previousStateForKey = state[_key];
- var nextStateForKey = reducer(previousStateForKey, action);
-
- if (typeof nextStateForKey === 'undefined') {
- var errorMessage = getUndefinedStateErrorMessage(_key, action);
- throw new Error(errorMessage);
- }
-
- nextState[_key] = nextStateForKey;
- hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
- }
-
- return hasChanged ? nextState : state;
- };
- }
-
- function bindActionCreator(actionCreator, dispatch) {
- return function () {
- return dispatch(actionCreator.apply(this, arguments));
- };
- }
- /**
- * Turns an object whose values are action creators, into an object with the
- * same keys, but with every function wrapped into a `dispatch` call so they
- * may be invoked directly. This is just a convenience method, as you can call
- * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.
- *
- * For convenience, you can also pass a single function as the first argument,
- * and get a function in return.
- *
- * @param {Function|Object} actionCreators An object whose values are action
- * creator functions. One handy way to obtain it is to use ES6 `import * as`
- * syntax. You may also pass a single function.
- *
- * @param {Function} dispatch The `dispatch` function available on your Redux
- * store.
- *
- * @returns {Function|Object} The object mimicking the original object, but with
- * every action creator wrapped into the `dispatch` call. If you passed a
- * function as `actionCreators`, the return value will also be a single
- * function.
- */
-
-
- function bindActionCreators(actionCreators, dispatch) {
- if (typeof actionCreators === 'function') {
- return bindActionCreator(actionCreators, dispatch);
- }
-
- if (typeof actionCreators !== 'object' || actionCreators === null) {
- throw new Error("bindActionCreators expected an object or a function, instead received " + (actionCreators === null ? 'null' : typeof actionCreators) + ". " + "Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?");
- }
-
- var keys = Object.keys(actionCreators);
- var boundActionCreators = {};
-
- for (var i = 0; i < keys.length; i++) {
- var key = keys[i];
- var actionCreator = actionCreators[key];
-
- if (typeof actionCreator === 'function') {
- boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);
- }
- }
-
- return boundActionCreators;
- }
-
- function _defineProperty(obj, key, value) {
- if (key in obj) {
- Object.defineProperty(obj, key, {
- value: value,
- enumerable: true,
- configurable: true,
- writable: true
- });
- } else {
- obj[key] = value;
- }
-
- return obj;
- }
-
- function _objectSpread(target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i] != null ? arguments[i] : {};
- var ownKeys = Object.keys(source);
-
- if (typeof Object.getOwnPropertySymbols === 'function') {
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
- }));
- }
-
- ownKeys.forEach(function (key) {
- _defineProperty(target, key, source[key]);
- });
- }
-
- return target;
- }
-
- /**
- * Composes single-argument functions from right to left. The rightmost
- * function can take multiple arguments as it provides the signature for
- * the resulting composite function.
- *
- * @param {...Function} funcs The functions to compose.
- * @returns {Function} A function obtained by composing the argument functions
- * from right to left. For example, compose(f, g, h) is identical to doing
- * (...args) => f(g(h(...args))).
- */
- function compose() {
- for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {
- funcs[_key] = arguments[_key];
- }
-
- if (funcs.length === 0) {
- return function (arg) {
- return arg;
- };
- }
-
- if (funcs.length === 1) {
- return funcs[0];
- }
-
- return funcs.reduce(function (a, b) {
- return function () {
- return a(b.apply(void 0, arguments));
- };
- });
- }
-
- /**
- * Creates a store enhancer that applies middleware to the dispatch method
- * of the Redux store. This is handy for a variety of tasks, such as expressing
- * asynchronous actions in a concise manner, or logging every action payload.
- *
- * See `redux-thunk` package as an example of the Redux middleware.
- *
- * Because middleware is potentially asynchronous, this should be the first
- * store enhancer in the composition chain.
- *
- * Note that each middleware will be given the `dispatch` and `getState` functions
- * as named arguments.
- *
- * @param {...Function} middlewares The middleware chain to be applied.
- * @returns {Function} A store enhancer applying the middleware.
- */
-
- function applyMiddleware() {
- for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) {
- middlewares[_key] = arguments[_key];
- }
-
- return function (createStore) {
- return function () {
- var store = createStore.apply(void 0, arguments);
-
- var _dispatch = function dispatch() {
- throw new Error("Dispatching while constructing your middleware is not allowed. " + "Other middleware would not be applied to this dispatch.");
- };
-
- var middlewareAPI = {
- getState: store.getState,
- dispatch: function dispatch() {
- return _dispatch.apply(void 0, arguments);
- }
- };
- var chain = middlewares.map(function (middleware) {
- return middleware(middlewareAPI);
- });
- _dispatch = compose.apply(void 0, chain)(store.dispatch);
- return _objectSpread({}, store, {
- dispatch: _dispatch
- });
- };
- };
- }
-
- /*
- * This is a dummy function to check if the function name has been altered by minification.
- * If the function has been minified and NODE_ENV !== 'production', warn the user.
- */
-
- function isCrushed() {}
-
- if (process.env.NODE_ENV !== 'production' && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') {
- warning('You are currently using minified code outside of NODE_ENV === "production". ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or setting mode to production in webpack (https://webpack.js.org/concepts/mode/) ' + 'to ensure you have the correct code for your production build.');
- }
-
- exports.createStore = createStore;
- exports.combineReducers = combineReducers;
- exports.bindActionCreators = bindActionCreators;
- exports.applyMiddleware = applyMiddleware;
- exports.compose = compose;
- exports.__DO_NOT_USE__ActionTypes = ActionTypes;
-
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(33)))
-
-/***/ }),
-/* 198 */
-/***/ (function(module, exports, __webpack_require__) {
-
- /* WEBPACK VAR INJECTION */(function(global, module) {'use strict';
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _ponyfill = __webpack_require__(200);
-
- var _ponyfill2 = _interopRequireDefault(_ponyfill);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
-
- var root; /* global window */
-
-
- if (typeof self !== 'undefined') {
- root = self;
- } else if (typeof window !== 'undefined') {
- root = window;
- } else if (typeof global !== 'undefined') {
- root = global;
- } else if (true) {
- root = module;
- } else {
- root = Function('return this')();
- }
-
- var result = (0, _ponyfill2['default'])(root);
- exports['default'] = result;
- /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(199)(module)))
-
-/***/ }),
-/* 199 */
-/***/ (function(module, exports) {
-
- module.exports = function(module) {
- if(!module.webpackPolyfill) {
- module.deprecate = function() {};
- module.paths = [];
- // module.parent = undefined by default
- module.children = [];
- module.webpackPolyfill = 1;
- }
- return module;
- }
-
-
-/***/ }),
-/* 200 */
-/***/ (function(module, exports) {
-
- 'use strict';
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports['default'] = symbolObservablePonyfill;
- function symbolObservablePonyfill(root) {
- var result;
- var _Symbol = root.Symbol;
-
- if (typeof _Symbol === 'function') {
- if (_Symbol.observable) {
- result = _Symbol.observable;
- } else {
- result = _Symbol('observable');
- _Symbol.observable = result;
- }
- } else {
- result = '@@observable';
- }
-
- return result;
- };
-
-/***/ }),
-/* 201 */
-/***/ (function(module, exports) {
-
- 'use strict';
-
- var index = (function (fn) {
- var lastArgs = [];
- var frameId = null;
-
- var wrapperFn = function wrapperFn() {
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
-
- lastArgs = args;
-
- if (frameId) {
- return;
- }
-
- frameId = requestAnimationFrame(function () {
- frameId = null;
- fn.apply(undefined, lastArgs);
- });
- };
-
- wrapperFn.cancel = function () {
- if (!frameId) {
- return;
- }
-
- cancelAnimationFrame(frameId);
- frameId = null;
- };
-
- var resultFn = wrapperFn;
-
- return resultFn;
- });
-
- module.exports = index;
-
-
-/***/ }),
-/* 202 */
-/***/ (function(module, exports, __webpack_require__) {
-
- var _Object$create = __webpack_require__(203);
-
- function _inheritsLoose(subClass, superClass) {
- subClass.prototype = _Object$create(superClass.prototype);
- subClass.prototype.constructor = subClass;
- subClass.__proto__ = superClass;
- }
-
- module.exports = _inheritsLoose;
-
-/***/ }),
-/* 203 */
-/***/ (function(module, exports, __webpack_require__) {
-
- module.exports = __webpack_require__(204);
-
-/***/ }),
-/* 204 */
-/***/ (function(module, exports, __webpack_require__) {
-
- __webpack_require__(205);
- var $Object = __webpack_require__(157).Object;
- module.exports = function create(P, D) {
- return $Object.create(P, D);
- };
-
-
-/***/ }),
-/* 205 */
-/***/ (function(module, exports, __webpack_require__) {
-
- var $export = __webpack_require__(155);
- // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
- $export($export.S, 'Object', { create: __webpack_require__(206) });
-
-
-/***/ }),
-/* 206 */
-/***/ (function(module, exports, __webpack_require__) {
-
- // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
- var anObject = __webpack_require__(162);
- var dPs = __webpack_require__(207);
- var enumBugKeys = __webpack_require__(186);
- var IE_PROTO = __webpack_require__(182)('IE_PROTO');
- var Empty = function () { /* empty */ };
- var PROTOTYPE = 'prototype';
-
- // Create object with fake `null` prototype: use iframe Object with cleared prototype
- var createDict = function () {
- // Thrash, waste and sodomy: IE GC bug
- var iframe = __webpack_require__(167)('iframe');
- var i = enumBugKeys.length;
- var lt = '<';
- var gt = '>';
- var iframeDocument;
- iframe.style.display = 'none';
- __webpack_require__(208).appendChild(iframe);
- iframe.src = 'javascript:'; // eslint-disable-line no-script-url
- // createDict = iframe.contentWindow.Object;
- // html.removeChild(iframe);
- iframeDocument = iframe.contentWindow.document;
- iframeDocument.open();
- iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
- iframeDocument.close();
- createDict = iframeDocument.F;
- while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
- return createDict();
- };
-
- module.exports = Object.create || function create(O, Properties) {
- var result;
- if (O !== null) {
- Empty[PROTOTYPE] = anObject(O);
- result = new Empty();
- Empty[PROTOTYPE] = null;
- // add "__proto__" for Object.getPrototypeOf polyfill
- result[IE_PROTO] = O;
- } else result = createDict();
- return Properties === undefined ? result : dPs(result, Properties);
- };
-
-
-/***/ }),
-/* 207 */
-/***/ (function(module, exports, __webpack_require__) {
-
- var dP = __webpack_require__(161);
- var anObject = __webpack_require__(162);
- var getKeys = __webpack_require__(172);
-
- module.exports = __webpack_require__(165) ? Object.defineProperties : function defineProperties(O, Properties) {
- anObject(O);
- var keys = getKeys(Properties);
- var length = keys.length;
- var i = 0;
- var P;
- while (length > i) dP.f(O, P = keys[i++], Properties[P]);
- return O;
- };
-
-
-/***/ }),
-/* 208 */
-/***/ (function(module, exports, __webpack_require__) {
-
- var document = __webpack_require__(156).document;
- module.exports = document && document.documentElement;
-
-
-/***/ }),
-/* 209 */
-/***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
- var _interopRequireDefault = __webpack_require__(14);
-
- var _interopRequireWildcard = __webpack_require__(210);
-
- exports.__esModule = true;
-
- var _Provider = _interopRequireWildcard(__webpack_require__(211));
-
- exports.Provider = _Provider.default;
- exports.createProvider = _Provider.createProvider;
-
- var _connectAdvanced = _interopRequireDefault(__webpack_require__(215));
-
- exports.connectAdvanced = _connectAdvanced.default;
-
- var _connect = _interopRequireDefault(__webpack_require__(224));
-
- exports.connect = _connect.default;
-
-/***/ }),
-/* 210 */
-/***/ (function(module, exports) {
-
- function _interopRequireWildcard(obj) {
- if (obj && obj.__esModule) {
- return obj;
- } else {
- var newObj = {};
-
- if (obj != null) {
- for (var key in obj) {
- if (Object.prototype.hasOwnProperty.call(obj, key)) {
- var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
-
- if (desc.get || desc.set) {
- Object.defineProperty(newObj, key, desc);
- } else {
- newObj[key] = obj[key];
- }
- }
- }
- }
-
- newObj.default = obj;
- return newObj;
- }
- }
-
- module.exports = _interopRequireWildcard;
-
-/***/ }),
-/* 211 */
-/***/ (function(module, exports, __webpack_require__) {
-
- /* WEBPACK VAR INJECTION */(function(process) {"use strict";
-
- var _interopRequireDefault = __webpack_require__(14);
-
- exports.__esModule = true;
- exports.createProvider = createProvider;
- exports.default = void 0;
-
- var _inheritsLoose2 = _interopRequireDefault(__webpack_require__(212));
-
- var _react = __webpack_require__(1);
-
- var _propTypes = _interopRequireDefault(__webpack_require__(6));
-
- var _PropTypes = __webpack_require__(213);
-
- var _warning = _interopRequireDefault(__webpack_require__(214));
-
- var didWarnAboutReceivingStore = false;
-
- function warnAboutReceivingStore() {
- if (didWarnAboutReceivingStore) {
- return;
- }
-
- didWarnAboutReceivingStore = true;
- (0, _warning.default)(' does not support changing `store` on the fly. ' + 'It is most likely that you see this error because you updated to ' + 'Redux 2.x and React Redux 2.x which no longer hot reload reducers ' + 'automatically. See https://github.com/reduxjs/react-redux/releases/' + 'tag/v2.0.0 for the migration instructions.');
- }
-
- function createProvider(storeKey) {
- var _Provider$childContex;
-
- if (storeKey === void 0) {
- storeKey = 'store';
- }
-
- var subscriptionKey = storeKey + "Subscription";
-
- var Provider =
- /*#__PURE__*/
- function (_Component) {
- (0, _inheritsLoose2.default)(Provider, _Component);
- var _proto = Provider.prototype;
-
- _proto.getChildContext = function getChildContext() {
- var _ref;
-
- return _ref = {}, _ref[storeKey] = this[storeKey], _ref[subscriptionKey] = null, _ref;
- };
-
- function Provider(props, context) {
- var _this;
-
- _this = _Component.call(this, props, context) || this;
- _this[storeKey] = props.store;
- return _this;
- }
-
- _proto.render = function render() {
- return _react.Children.only(this.props.children);
- };
-
- return Provider;
- }(_react.Component);
-
- if (process.env.NODE_ENV !== 'production') {
- Provider.prototype.componentWillReceiveProps = function (nextProps) {
- if (this[storeKey] !== nextProps.store) {
- warnAboutReceivingStore();
- }
- };
- }
-
- Provider.propTypes = {
- store: _PropTypes.storeShape.isRequired,
- children: _propTypes.default.element.isRequired
- };
- Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[storeKey] = _PropTypes.storeShape.isRequired, _Provider$childContex[subscriptionKey] = _PropTypes.subscriptionShape, _Provider$childContex);
- return Provider;
- }
-
- var _default = createProvider();
-
- exports.default = _default;
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(33)))
-
-/***/ }),
-/* 212 */
-/***/ (function(module, exports) {
-
- function _inheritsLoose(subClass, superClass) {
- subClass.prototype = Object.create(superClass.prototype);
- subClass.prototype.constructor = subClass;
- subClass.__proto__ = superClass;
- }
-
- module.exports = _inheritsLoose;
-
-/***/ }),
-/* 213 */
-/***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
- var _interopRequireDefault = __webpack_require__(14);
-
- exports.__esModule = true;
- exports.storeShape = exports.subscriptionShape = void 0;
-
- var _propTypes = _interopRequireDefault(__webpack_require__(6));
-
- var subscriptionShape = _propTypes.default.shape({
- trySubscribe: _propTypes.default.func.isRequired,
- tryUnsubscribe: _propTypes.default.func.isRequired,
- notifyNestedSubs: _propTypes.default.func.isRequired,
- isSubscribed: _propTypes.default.func.isRequired
- });
-
- exports.subscriptionShape = subscriptionShape;
-
- var storeShape = _propTypes.default.shape({
- subscribe: _propTypes.default.func.isRequired,
- dispatch: _propTypes.default.func.isRequired,
- getState: _propTypes.default.func.isRequired
- });
-
- exports.storeShape = storeShape;
-
-/***/ }),
-/* 214 */
-/***/ (function(module, exports) {
-
- "use strict";
-
- exports.__esModule = true;
- exports.default = warning;
-
- /**
- * Prints a warning in the console if it exists.
- *
- * @param {String} message The warning message.
- * @returns {void}
- */
- function warning(message) {
- /* eslint-disable no-console */
- if (typeof console !== 'undefined' && typeof console.error === 'function') {
- console.error(message);
- }
- /* eslint-enable no-console */
-
-
- try {
- // This error was thrown as a convenience so that if you enable
- // "break on all exceptions" in your console,
- // it would pause the execution at this line.
- throw new Error(message);
- /* eslint-disable no-empty */
- } catch (e) {}
- /* eslint-enable no-empty */
-
- }
-
-/***/ }),
-/* 215 */
-/***/ (function(module, exports, __webpack_require__) {
-
- /* WEBPACK VAR INJECTION */(function(process) {"use strict";
-
- var _interopRequireDefault = __webpack_require__(14);
-
- exports.__esModule = true;
- exports.default = connectAdvanced;
-
- var _inheritsLoose2 = _interopRequireDefault(__webpack_require__(212));
-
- var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(216));
-
- var _extends2 = _interopRequireDefault(__webpack_require__(122));
-
- var _objectWithoutPropertiesLoose2 = _interopRequireDefault(__webpack_require__(217));
-
- var _hoistNonReactStatics = _interopRequireDefault(__webpack_require__(218));
-
- var _invariant = _interopRequireDefault(__webpack_require__(222));
-
- var _react = __webpack_require__(1);
-
- var _reactIs = __webpack_require__(219);
-
- var _Subscription = _interopRequireDefault(__webpack_require__(223));
-
- var _PropTypes = __webpack_require__(213);
-
- var hotReloadingVersion = 0;
- var dummyState = {};
-
- function noop() {}
-
- function makeSelectorStateful(sourceSelector, store) {
- // wrap the selector in an object that tracks its results between runs.
- var selector = {
- run: function runComponentSelector(props) {
- try {
- var nextProps = sourceSelector(store.getState(), props);
-
- if (nextProps !== selector.props || selector.error) {
- selector.shouldComponentUpdate = true;
- selector.props = nextProps;
- selector.error = null;
- }
- } catch (error) {
- selector.shouldComponentUpdate = true;
- selector.error = error;
- }
- }
- };
- return selector;
- }
-
- function connectAdvanced(
- /*
- selectorFactory is a func that is responsible for returning the selector function used to
- compute new props from state, props, and dispatch. For example:
- export default connectAdvanced((dispatch, options) => (state, props) => ({
- thing: state.things[props.thingId],
- saveThing: fields => dispatch(actionCreators.saveThing(props.thingId, fields)),
- }))(YourComponent)
- Access to dispatch is provided to the factory so selectorFactories can bind actionCreators
- outside of their selector as an optimization. Options passed to connectAdvanced are passed to
- the selectorFactory, along with displayName and WrappedComponent, as the second argument.
- Note that selectorFactory is responsible for all caching/memoization of inbound and outbound
- props. Do not use connectAdvanced directly without memoizing results between calls to your
- selector, otherwise the Connect component will re-render on every state or props change.
- */
- selectorFactory, // options object:
- _ref) {
- var _contextTypes, _childContextTypes;
-
- if (_ref === void 0) {
- _ref = {};
- }
-
- var _ref2 = _ref,
- _ref2$getDisplayName = _ref2.getDisplayName,
- getDisplayName = _ref2$getDisplayName === void 0 ? function (name) {
- return "ConnectAdvanced(" + name + ")";
- } : _ref2$getDisplayName,
- _ref2$methodName = _ref2.methodName,
- methodName = _ref2$methodName === void 0 ? 'connectAdvanced' : _ref2$methodName,
- _ref2$renderCountProp = _ref2.renderCountProp,
- renderCountProp = _ref2$renderCountProp === void 0 ? undefined : _ref2$renderCountProp,
- _ref2$shouldHandleSta = _ref2.shouldHandleStateChanges,
- shouldHandleStateChanges = _ref2$shouldHandleSta === void 0 ? true : _ref2$shouldHandleSta,
- _ref2$storeKey = _ref2.storeKey,
- storeKey = _ref2$storeKey === void 0 ? 'store' : _ref2$storeKey,
- _ref2$withRef = _ref2.withRef,
- withRef = _ref2$withRef === void 0 ? false : _ref2$withRef,
- connectOptions = (0, _objectWithoutPropertiesLoose2.default)(_ref2, ["getDisplayName", "methodName", "renderCountProp", "shouldHandleStateChanges", "storeKey", "withRef"]);
- var subscriptionKey = storeKey + 'Subscription';
- var version = hotReloadingVersion++;
- var contextTypes = (_contextTypes = {}, _contextTypes[storeKey] = _PropTypes.storeShape, _contextTypes[subscriptionKey] = _PropTypes.subscriptionShape, _contextTypes);
- var childContextTypes = (_childContextTypes = {}, _childContextTypes[subscriptionKey] = _PropTypes.subscriptionShape, _childContextTypes);
- return function wrapWithConnect(WrappedComponent) {
- (0, _invariant.default)((0, _reactIs.isValidElementType)(WrappedComponent), "You must pass a component to the function returned by " + (methodName + ". Instead received " + JSON.stringify(WrappedComponent)));
- var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component';
- var displayName = getDisplayName(wrappedComponentName);
- var selectorFactoryOptions = (0, _extends2.default)({}, connectOptions, {
- getDisplayName: getDisplayName,
- methodName: methodName,
- renderCountProp: renderCountProp,
- shouldHandleStateChanges: shouldHandleStateChanges,
- storeKey: storeKey,
- withRef: withRef,
- displayName: displayName,
- wrappedComponentName: wrappedComponentName,
- WrappedComponent: WrappedComponent // TODO Actually fix our use of componentWillReceiveProps
-
- /* eslint-disable react/no-deprecated */
-
- });
-
- var Connect =
- /*#__PURE__*/
- function (_Component) {
- (0, _inheritsLoose2.default)(Connect, _Component);
-
- function Connect(props, context) {
- var _this;
-
- _this = _Component.call(this, props, context) || this;
- _this.version = version;
- _this.state = {};
- _this.renderCount = 0;
- _this.store = props[storeKey] || context[storeKey];
- _this.propsMode = Boolean(props[storeKey]);
- _this.setWrappedInstance = _this.setWrappedInstance.bind((0, _assertThisInitialized2.default)((0, _assertThisInitialized2.default)(_this)));
- (0, _invariant.default)(_this.store, "Could not find \"" + storeKey + "\" in either the context or props of " + ("\"" + displayName + "\". Either wrap the root component in a , ") + ("or explicitly pass \"" + storeKey + "\" as a prop to \"" + displayName + "\"."));
-
- _this.initSelector();
-
- _this.initSubscription();
-
- return _this;
- }
-
- var _proto = Connect.prototype;
-
- _proto.getChildContext = function getChildContext() {
- var _ref3;
-
- // If this component received store from props, its subscription should be transparent
- // to any descendants receiving store+subscription from context; it passes along
- // subscription passed to it. Otherwise, it shadows the parent subscription, which allows
- // Connect to control ordering of notifications to flow top-down.
- var subscription = this.propsMode ? null : this.subscription;
- return _ref3 = {}, _ref3[subscriptionKey] = subscription || this.context[subscriptionKey], _ref3;
- };
-
- _proto.componentDidMount = function componentDidMount() {
- if (!shouldHandleStateChanges) return; // componentWillMount fires during server side rendering, but componentDidMount and
- // componentWillUnmount do not. Because of this, trySubscribe happens during ...didMount.
- // Otherwise, unsubscription would never take place during SSR, causing a memory leak.
- // To handle the case where a child component may have triggered a state change by
- // dispatching an action in its componentWillMount, we have to re-run the select and maybe
- // re-render.
-
- this.subscription.trySubscribe();
- this.selector.run(this.props);
- if (this.selector.shouldComponentUpdate) this.forceUpdate();
- };
-
- _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
- this.selector.run(nextProps);
- };
-
- _proto.shouldComponentUpdate = function shouldComponentUpdate() {
- return this.selector.shouldComponentUpdate;
- };
-
- _proto.componentWillUnmount = function componentWillUnmount() {
- if (this.subscription) this.subscription.tryUnsubscribe();
- this.subscription = null;
- this.notifyNestedSubs = noop;
- this.store = null;
- this.selector.run = noop;
- this.selector.shouldComponentUpdate = false;
- };
-
- _proto.getWrappedInstance = function getWrappedInstance() {
- (0, _invariant.default)(withRef, "To access the wrapped instance, you need to specify " + ("{ withRef: true } in the options argument of the " + methodName + "() call."));
- return this.wrappedInstance;
- };
-
- _proto.setWrappedInstance = function setWrappedInstance(ref) {
- this.wrappedInstance = ref;
- };
-
- _proto.initSelector = function initSelector() {
- var sourceSelector = selectorFactory(this.store.dispatch, selectorFactoryOptions);
- this.selector = makeSelectorStateful(sourceSelector, this.store);
- this.selector.run(this.props);
- };
-
- _proto.initSubscription = function initSubscription() {
- if (!shouldHandleStateChanges) return; // parentSub's source should match where store came from: props vs. context. A component
- // connected to the store via props shouldn't use subscription from context, or vice versa.
-
- var parentSub = (this.propsMode ? this.props : this.context)[subscriptionKey];
- this.subscription = new _Subscription.default(this.store, parentSub, this.onStateChange.bind(this)); // `notifyNestedSubs` is duplicated to handle the case where the component is unmounted in
- // the middle of the notification loop, where `this.subscription` will then be null. An
- // extra null check every change can be avoided by copying the method onto `this` and then
- // replacing it with a no-op on unmount. This can probably be avoided if Subscription's
- // listeners logic is changed to not call listeners that have been unsubscribed in the
- // middle of the notification loop.
-
- this.notifyNestedSubs = this.subscription.notifyNestedSubs.bind(this.subscription);
- };
-
- _proto.onStateChange = function onStateChange() {
- this.selector.run(this.props);
-
- if (!this.selector.shouldComponentUpdate) {
- this.notifyNestedSubs();
- } else {
- this.componentDidUpdate = this.notifyNestedSubsOnComponentDidUpdate;
- this.setState(dummyState);
- }
- };
-
- _proto.notifyNestedSubsOnComponentDidUpdate = function notifyNestedSubsOnComponentDidUpdate() {
- // `componentDidUpdate` is conditionally implemented when `onStateChange` determines it
- // needs to notify nested subs. Once called, it unimplements itself until further state
- // changes occur. Doing it this way vs having a permanent `componentDidUpdate` that does
- // a boolean check every time avoids an extra method call most of the time, resulting
- // in some perf boost.
- this.componentDidUpdate = undefined;
- this.notifyNestedSubs();
- };
-
- _proto.isSubscribed = function isSubscribed() {
- return Boolean(this.subscription) && this.subscription.isSubscribed();
- };
-
- _proto.addExtraProps = function addExtraProps(props) {
- if (!withRef && !renderCountProp && !(this.propsMode && this.subscription)) return props; // make a shallow copy so that fields added don't leak to the original selector.
- // this is especially important for 'ref' since that's a reference back to the component
- // instance. a singleton memoized selector would then be holding a reference to the
- // instance, preventing the instance from being garbage collected, and that would be bad
-
- var withExtras = (0, _extends2.default)({}, props);
- if (withRef) withExtras.ref = this.setWrappedInstance;
- if (renderCountProp) withExtras[renderCountProp] = this.renderCount++;
- if (this.propsMode && this.subscription) withExtras[subscriptionKey] = this.subscription;
- return withExtras;
- };
-
- _proto.render = function render() {
- var selector = this.selector;
- selector.shouldComponentUpdate = false;
-
- if (selector.error) {
- throw selector.error;
- } else {
- return (0, _react.createElement)(WrappedComponent, this.addExtraProps(selector.props));
- }
- };
-
- return Connect;
- }(_react.Component);
- /* eslint-enable react/no-deprecated */
-
-
- Connect.WrappedComponent = WrappedComponent;
- Connect.displayName = displayName;
- Connect.childContextTypes = childContextTypes;
- Connect.contextTypes = contextTypes;
- Connect.propTypes = contextTypes;
-
- if (process.env.NODE_ENV !== 'production') {
- Connect.prototype.componentWillUpdate = function componentWillUpdate() {
- var _this2 = this;
-
- // We are hot reloading!
- if (this.version !== version) {
- this.version = version;
- this.initSelector(); // If any connected descendants don't hot reload (and resubscribe in the process), their
- // listeners will be lost when we unsubscribe. Unfortunately, by copying over all
- // listeners, this does mean that the old versions of connected descendants will still be
- // notified of state changes; however, their onStateChange function is a no-op so this
- // isn't a huge deal.
-
- var oldListeners = [];
-
- if (this.subscription) {
- oldListeners = this.subscription.listeners.get();
- this.subscription.tryUnsubscribe();
- }
-
- this.initSubscription();
-
- if (shouldHandleStateChanges) {
- this.subscription.trySubscribe();
- oldListeners.forEach(function (listener) {
- return _this2.subscription.listeners.subscribe(listener);
- });
- }
- }
- };
- }
-
- return (0, _hoistNonReactStatics.default)(Connect, WrappedComponent);
- };
- }
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(33)))
-
-/***/ }),
-/* 216 */
-/***/ (function(module, exports) {
-
- function _assertThisInitialized(self) {
- if (self === void 0) {
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
- }
-
- return self;
- }
-
- module.exports = _assertThisInitialized;
-
-/***/ }),
-/* 217 */
-/***/ (function(module, exports) {
-
- function _objectWithoutPropertiesLoose(source, excluded) {
- if (source == null) return {};
- var target = {};
- var sourceKeys = Object.keys(source);
- var key, i;
-
- for (i = 0; i < sourceKeys.length; i++) {
- key = sourceKeys[i];
- if (excluded.indexOf(key) >= 0) continue;
- target[key] = source[key];
- }
-
- return target;
- }
-
- module.exports = _objectWithoutPropertiesLoose;
-
-/***/ }),
-/* 218 */
-/***/ (function(module, exports, __webpack_require__) {
-
- 'use strict';
-
- /**
- * Copyright 2015, Yahoo! Inc.
- * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
- */
- var ReactIs = __webpack_require__(219);
- var REACT_STATICS = {
- childContextTypes: true,
- contextType: true,
- contextTypes: true,
- defaultProps: true,
- displayName: true,
- getDefaultProps: true,
- getDerivedStateFromError: true,
- getDerivedStateFromProps: true,
- mixins: true,
- propTypes: true,
- type: true
- };
-
- var KNOWN_STATICS = {
- name: true,
- length: true,
- prototype: true,
- caller: true,
- callee: true,
- arguments: true,
- arity: true
- };
-
- var FORWARD_REF_STATICS = {
- '$$typeof': true,
- render: true,
- defaultProps: true,
- displayName: true,
- propTypes: true
- };
-
- var MEMO_STATICS = {
- '$$typeof': true,
- compare: true,
- defaultProps: true,
- displayName: true,
- propTypes: true,
- type: true
- };
-
- var TYPE_STATICS = {};
- TYPE_STATICS[ReactIs.ForwardRef] = FORWARD_REF_STATICS;
-
- function getStatics(component) {
- if (ReactIs.isMemo(component)) {
- return MEMO_STATICS;
- }
- return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;
- }
-
- var defineProperty = Object.defineProperty;
- var getOwnPropertyNames = Object.getOwnPropertyNames;
- var getOwnPropertySymbols = Object.getOwnPropertySymbols;
- var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
- var getPrototypeOf = Object.getPrototypeOf;
- var objectPrototype = Object.prototype;
-
- function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
- if (typeof sourceComponent !== 'string') {
- // don't hoist over string (html) components
-
- if (objectPrototype) {
- var inheritedComponent = getPrototypeOf(sourceComponent);
- if (inheritedComponent && inheritedComponent !== objectPrototype) {
- hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
- }
- }
-
- var keys = getOwnPropertyNames(sourceComponent);
-
- if (getOwnPropertySymbols) {
- keys = keys.concat(getOwnPropertySymbols(sourceComponent));
- }
-
- var targetStatics = getStatics(targetComponent);
- var sourceStatics = getStatics(sourceComponent);
-
- for (var i = 0; i < keys.length; ++i) {
- var key = keys[i];
- if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
- var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
- try {
- // Avoid failures from read-only properties
- defineProperty(targetComponent, key, descriptor);
- } catch (e) {}
- }
- }
-
- return targetComponent;
- }
-
- return targetComponent;
- }
-
- module.exports = hoistNonReactStatics;
-
-
-/***/ }),
-/* 219 */
-/***/ (function(module, exports, __webpack_require__) {
-
- /* WEBPACK VAR INJECTION */(function(process) {'use strict';
-
- if (process.env.NODE_ENV === 'production') {
- module.exports = __webpack_require__(220);
- } else {
- module.exports = __webpack_require__(221);
- }
-
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(33)))
-
-/***/ }),
-/* 220 */
-/***/ (function(module, exports) {
-
- /** @license React v16.8.1
- * react-is.production.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
- 'use strict';Object.defineProperty(exports,"__esModule",{value:!0});
- var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?Symbol.for("react.memo"):
- 60115,r=b?Symbol.for("react.lazy"):60116;function t(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case h:return a;default:return u}}case r:case q:case d:return u}}}function v(a){return t(a)===m}exports.typeOf=t;exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;
- exports.Fragment=e;exports.Lazy=r;exports.Memo=q;exports.Portal=d;exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||"object"===typeof a&&null!==a&&(a.$$typeof===r||a.$$typeof===q||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n)};exports.isAsyncMode=function(a){return v(a)||t(a)===l};exports.isConcurrentMode=v;exports.isContextConsumer=function(a){return t(a)===k};
- exports.isContextProvider=function(a){return t(a)===h};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return t(a)===n};exports.isFragment=function(a){return t(a)===e};exports.isLazy=function(a){return t(a)===r};exports.isMemo=function(a){return t(a)===q};exports.isPortal=function(a){return t(a)===d};exports.isProfiler=function(a){return t(a)===g};exports.isStrictMode=function(a){return t(a)===f};
- exports.isSuspense=function(a){return t(a)===p};
-
-
-/***/ }),
-/* 221 */
-/***/ (function(module, exports, __webpack_require__) {
-
- /* WEBPACK VAR INJECTION */(function(process) {/** @license React v16.8.1
- * react-is.development.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
- 'use strict';
-
-
-
- if (process.env.NODE_ENV !== "production") {
- (function() {
- 'use strict';
-
- Object.defineProperty(exports, '__esModule', { value: true });
-
- // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
- // nor polyfill, then a plain number is used for performance.
- var hasSymbol = typeof Symbol === 'function' && Symbol.for;
-
- var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
- var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
- var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
- var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
- var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
- var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
- var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;
- var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
- var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
- var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
- var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
- var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
- var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
-
- function isValidElementType(type) {
- return typeof type === 'string' || typeof type === 'function' ||
- // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
- type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE);
- }
-
- /**
- * Forked from fbjs/warning:
- * https://github.com/facebook/fbjs/blob/e66ba20ad5be433eb54423f2b097d829324d9de6/packages/fbjs/src/__forks__/warning.js
- *
- * Only change is we use console.warn instead of console.error,
- * and do nothing when 'console' is not supported.
- * This really simplifies the code.
- * ---
- * Similar to invariant but only logs a warning if the condition is not met.
- * This can be used to log issues in development environments in critical
- * paths. Removing the logging code for production environments will keep the
- * same logic and follow the same code paths.
- */
-
- var lowPriorityWarning = function () {};
-
- {
- var printWarning = function (format) {
- for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
- args[_key - 1] = arguments[_key];
- }
-
- var argIndex = 0;
- var message = 'Warning: ' + format.replace(/%s/g, function () {
- return args[argIndex++];
- });
- if (typeof console !== 'undefined') {
- console.warn(message);
- }
- try {
- // --- Welcome to debugging React ---
- // This error was thrown as a convenience so that you can use this stack
- // to find the callsite that caused this warning to fire.
- throw new Error(message);
- } catch (x) {}
- };
-
- lowPriorityWarning = function (condition, format) {
- if (format === undefined) {
- throw new Error('`lowPriorityWarning(condition, format, ...args)` requires a warning ' + 'message argument');
- }
- if (!condition) {
- for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
- args[_key2 - 2] = arguments[_key2];
- }
-
- printWarning.apply(undefined, [format].concat(args));
- }
- };
- }
-
- var lowPriorityWarning$1 = lowPriorityWarning;
-
- function typeOf(object) {
- if (typeof object === 'object' && object !== null) {
- var $$typeof = object.$$typeof;
- switch ($$typeof) {
- case REACT_ELEMENT_TYPE:
- var type = object.type;
-
- switch (type) {
- case REACT_ASYNC_MODE_TYPE:
- case REACT_CONCURRENT_MODE_TYPE:
- case REACT_FRAGMENT_TYPE:
- case REACT_PROFILER_TYPE:
- case REACT_STRICT_MODE_TYPE:
- case REACT_SUSPENSE_TYPE:
- return type;
- default:
- var $$typeofType = type && type.$$typeof;
-
- switch ($$typeofType) {
- case REACT_CONTEXT_TYPE:
- case REACT_FORWARD_REF_TYPE:
- case REACT_PROVIDER_TYPE:
- return $$typeofType;
- default:
- return $$typeof;
- }
- }
- case REACT_LAZY_TYPE:
- case REACT_MEMO_TYPE:
- case REACT_PORTAL_TYPE:
- return $$typeof;
- }
- }
-
- return undefined;
- }
-
- // AsyncMode is deprecated along with isAsyncMode
- var AsyncMode = REACT_ASYNC_MODE_TYPE;
- var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
- var ContextConsumer = REACT_CONTEXT_TYPE;
- var ContextProvider = REACT_PROVIDER_TYPE;
- var Element = REACT_ELEMENT_TYPE;
- var ForwardRef = REACT_FORWARD_REF_TYPE;
- var Fragment = REACT_FRAGMENT_TYPE;
- var Lazy = REACT_LAZY_TYPE;
- var Memo = REACT_MEMO_TYPE;
- var Portal = REACT_PORTAL_TYPE;
- var Profiler = REACT_PROFILER_TYPE;
- var StrictMode = REACT_STRICT_MODE_TYPE;
- var Suspense = REACT_SUSPENSE_TYPE;
-
- var hasWarnedAboutDeprecatedIsAsyncMode = false;
-
- // AsyncMode should be deprecated
- function isAsyncMode(object) {
- {
- if (!hasWarnedAboutDeprecatedIsAsyncMode) {
- hasWarnedAboutDeprecatedIsAsyncMode = true;
- lowPriorityWarning$1(false, 'The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
- }
- }
- return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
- }
- function isConcurrentMode(object) {
- return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
- }
- function isContextConsumer(object) {
- return typeOf(object) === REACT_CONTEXT_TYPE;
- }
- function isContextProvider(object) {
- return typeOf(object) === REACT_PROVIDER_TYPE;
- }
- function isElement(object) {
- return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
- }
- function isForwardRef(object) {
- return typeOf(object) === REACT_FORWARD_REF_TYPE;
- }
- function isFragment(object) {
- return typeOf(object) === REACT_FRAGMENT_TYPE;
- }
- function isLazy(object) {
- return typeOf(object) === REACT_LAZY_TYPE;
- }
- function isMemo(object) {
- return typeOf(object) === REACT_MEMO_TYPE;
- }
- function isPortal(object) {
- return typeOf(object) === REACT_PORTAL_TYPE;
- }
- function isProfiler(object) {
- return typeOf(object) === REACT_PROFILER_TYPE;
- }
- function isStrictMode(object) {
- return typeOf(object) === REACT_STRICT_MODE_TYPE;
- }
- function isSuspense(object) {
- return typeOf(object) === REACT_SUSPENSE_TYPE;
- }
-
- exports.typeOf = typeOf;
- exports.AsyncMode = AsyncMode;
- exports.ConcurrentMode = ConcurrentMode;
- exports.ContextConsumer = ContextConsumer;
- exports.ContextProvider = ContextProvider;
- exports.Element = Element;
- exports.ForwardRef = ForwardRef;
- exports.Fragment = Fragment;
- exports.Lazy = Lazy;
- exports.Memo = Memo;
- exports.Portal = Portal;
- exports.Profiler = Profiler;
- exports.StrictMode = StrictMode;
- exports.Suspense = Suspense;
- exports.isValidElementType = isValidElementType;
- exports.isAsyncMode = isAsyncMode;
- exports.isConcurrentMode = isConcurrentMode;
- exports.isContextConsumer = isContextConsumer;
- exports.isContextProvider = isContextProvider;
- exports.isElement = isElement;
- exports.isForwardRef = isForwardRef;
- exports.isFragment = isFragment;
- exports.isLazy = isLazy;
- exports.isMemo = isMemo;
- exports.isPortal = isPortal;
- exports.isProfiler = isProfiler;
- exports.isStrictMode = isStrictMode;
- exports.isSuspense = isSuspense;
- })();
- }
-
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(33)))
-
-/***/ }),
-/* 222 */
-/***/ (function(module, exports, __webpack_require__) {
-
- /* WEBPACK VAR INJECTION */(function(process) {/**
- * Copyright (c) 2013-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
- 'use strict';
-
- /**
- * Use invariant() to assert state which your program assumes to be true.
- *
- * Provide sprintf-style format (only %s is supported) and arguments
- * to provide information about what broke and what you were
- * expecting.
- *
- * The invariant message will be stripped in production, but the invariant
- * will remain to ensure logic does not differ in production.
- */
-
- var invariant = function(condition, format, a, b, c, d, e, f) {
- if (process.env.NODE_ENV !== 'production') {
- if (format === undefined) {
- throw new Error('invariant requires an error message argument');
- }
- }
-
- if (!condition) {
- var error;
- if (format === undefined) {
- error = new Error(
- 'Minified exception occurred; use the non-minified dev environment ' +
- 'for the full error message and additional helpful warnings.'
- );
- } else {
- var args = [a, b, c, d, e, f];
- var argIndex = 0;
- error = new Error(
- format.replace(/%s/g, function() { return args[argIndex++]; })
- );
- error.name = 'Invariant Violation';
- }
-
- error.framesToPop = 1; // we don't care about invariant's own frame
- throw error;
- }
- };
-
- module.exports = invariant;
-
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(33)))
-
-/***/ }),
-/* 223 */
-/***/ (function(module, exports) {
-
- "use strict";
-
- exports.__esModule = true;
- exports.default = void 0;
- // encapsulates the subscription logic for connecting a component to the redux store, as
- // well as nesting subscriptions of descendant components, so that we can ensure the
- // ancestor components re-render before descendants
- var CLEARED = null;
- var nullListeners = {
- notify: function notify() {}
- };
-
- function createListenerCollection() {
- // the current/next pattern is copied from redux's createStore code.
- // TODO: refactor+expose that code to be reusable here?
- var current = [];
- var next = [];
- return {
- clear: function clear() {
- next = CLEARED;
- current = CLEARED;
- },
- notify: function notify() {
- var listeners = current = next;
-
- for (var i = 0; i < listeners.length; i++) {
- listeners[i]();
- }
- },
- get: function get() {
- return next;
- },
- subscribe: function subscribe(listener) {
- var isSubscribed = true;
- if (next === current) next = current.slice();
- next.push(listener);
- return function unsubscribe() {
- if (!isSubscribed || current === CLEARED) return;
- isSubscribed = false;
- if (next === current) next = current.slice();
- next.splice(next.indexOf(listener), 1);
- };
- }
- };
- }
-
- var Subscription =
- /*#__PURE__*/
- function () {
- function Subscription(store, parentSub, onStateChange) {
- this.store = store;
- this.parentSub = parentSub;
- this.onStateChange = onStateChange;
- this.unsubscribe = null;
- this.listeners = nullListeners;
- }
-
- var _proto = Subscription.prototype;
-
- _proto.addNestedSub = function addNestedSub(listener) {
- this.trySubscribe();
- return this.listeners.subscribe(listener);
- };
-
- _proto.notifyNestedSubs = function notifyNestedSubs() {
- this.listeners.notify();
- };
-
- _proto.isSubscribed = function isSubscribed() {
- return Boolean(this.unsubscribe);
- };
-
- _proto.trySubscribe = function trySubscribe() {
- if (!this.unsubscribe) {
- this.unsubscribe = this.parentSub ? this.parentSub.addNestedSub(this.onStateChange) : this.store.subscribe(this.onStateChange);
- this.listeners = createListenerCollection();
- }
- };
-
- _proto.tryUnsubscribe = function tryUnsubscribe() {
- if (this.unsubscribe) {
- this.unsubscribe();
- this.unsubscribe = null;
- this.listeners.clear();
- this.listeners = nullListeners;
- }
- };
-
- return Subscription;
- }();
-
- exports.default = Subscription;
-
-/***/ }),
-/* 224 */
-/***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
- var _interopRequireDefault = __webpack_require__(14);
-
- exports.__esModule = true;
- exports.createConnect = createConnect;
- exports.default = void 0;
-
- var _extends2 = _interopRequireDefault(__webpack_require__(122));
-
- var _objectWithoutPropertiesLoose2 = _interopRequireDefault(__webpack_require__(217));
-
- var _connectAdvanced = _interopRequireDefault(__webpack_require__(215));
-
- var _shallowEqual = _interopRequireDefault(__webpack_require__(225));
-
- var _mapDispatchToProps = _interopRequireDefault(__webpack_require__(226));
-
- var _mapStateToProps = _interopRequireDefault(__webpack_require__(230));
-
- var _mergeProps = _interopRequireDefault(__webpack_require__(231));
-
- var _selectorFactory = _interopRequireDefault(__webpack_require__(232));
-
- /*
- connect is a facade over connectAdvanced. It turns its args into a compatible
- selectorFactory, which has the signature:
-
- (dispatch, options) => (nextState, nextOwnProps) => nextFinalProps
-
- connect passes its args to connectAdvanced as options, which will in turn pass them to
- selectorFactory each time a Connect component instance is instantiated or hot reloaded.
-
- selectorFactory returns a final props selector from its mapStateToProps,
- mapStateToPropsFactories, mapDispatchToProps, mapDispatchToPropsFactories, mergeProps,
- mergePropsFactories, and pure args.
-
- The resulting final props selector is called by the Connect component instance whenever
- it receives new props or store state.
- */
- function match(arg, factories, name) {
- for (var i = factories.length - 1; i >= 0; i--) {
- var result = factories[i](arg);
- if (result) return result;
- }
-
- return function (dispatch, options) {
- throw new Error("Invalid value of type " + typeof arg + " for " + name + " argument when connecting component " + options.wrappedComponentName + ".");
- };
- }
-
- function strictEqual(a, b) {
- return a === b;
- } // createConnect with default args builds the 'official' connect behavior. Calling it with
- // different options opens up some testing and extensibility scenarios
-
-
- function createConnect(_temp) {
- var _ref = _temp === void 0 ? {} : _temp,
- _ref$connectHOC = _ref.connectHOC,
- connectHOC = _ref$connectHOC === void 0 ? _connectAdvanced.default : _ref$connectHOC,
- _ref$mapStateToPropsF = _ref.mapStateToPropsFactories,
- mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? _mapStateToProps.default : _ref$mapStateToPropsF,
- _ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,
- mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? _mapDispatchToProps.default : _ref$mapDispatchToPro,
- _ref$mergePropsFactor = _ref.mergePropsFactories,
- mergePropsFactories = _ref$mergePropsFactor === void 0 ? _mergeProps.default : _ref$mergePropsFactor,
- _ref$selectorFactory = _ref.selectorFactory,
- selectorFactory = _ref$selectorFactory === void 0 ? _selectorFactory.default : _ref$selectorFactory;
-
- return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {
- if (_ref2 === void 0) {
- _ref2 = {};
- }
-
- var _ref3 = _ref2,
- _ref3$pure = _ref3.pure,
- pure = _ref3$pure === void 0 ? true : _ref3$pure,
- _ref3$areStatesEqual = _ref3.areStatesEqual,
- areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,
- _ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,
- areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? _shallowEqual.default : _ref3$areOwnPropsEqua,
- _ref3$areStatePropsEq = _ref3.areStatePropsEqual,
- areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? _shallowEqual.default : _ref3$areStatePropsEq,
- _ref3$areMergedPropsE = _ref3.areMergedPropsEqual,
- areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? _shallowEqual.default : _ref3$areMergedPropsE,
- extraOptions = (0, _objectWithoutPropertiesLoose2.default)(_ref3, ["pure", "areStatesEqual", "areOwnPropsEqual", "areStatePropsEqual", "areMergedPropsEqual"]);
- var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');
- var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');
- var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');
- return connectHOC(selectorFactory, (0, _extends2.default)({
- // used in error messages
- methodName: 'connect',
- // used to compute Connect's displayName from the wrapped component's displayName.
- getDisplayName: function getDisplayName(name) {
- return "Connect(" + name + ")";
- },
- // if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes
- shouldHandleStateChanges: Boolean(mapStateToProps),
- // passed through to selectorFactory
- initMapStateToProps: initMapStateToProps,
- initMapDispatchToProps: initMapDispatchToProps,
- initMergeProps: initMergeProps,
- pure: pure,
- areStatesEqual: areStatesEqual,
- areOwnPropsEqual: areOwnPropsEqual,
- areStatePropsEqual: areStatePropsEqual,
- areMergedPropsEqual: areMergedPropsEqual
- }, extraOptions));
- };
- }
-
- var _default = createConnect();
-
- exports.default = _default;
-
-/***/ }),
-/* 225 */
-/***/ (function(module, exports) {
-
- "use strict";
-
- exports.__esModule = true;
- exports.default = shallowEqual;
- var hasOwn = Object.prototype.hasOwnProperty;
-
- function is(x, y) {
- if (x === y) {
- return x !== 0 || y !== 0 || 1 / x === 1 / y;
- } else {
- return x !== x && y !== y;
- }
- }
-
- function shallowEqual(objA, objB) {
- if (is(objA, objB)) return true;
-
- if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
- return false;
- }
-
- var keysA = Object.keys(objA);
- var keysB = Object.keys(objB);
- if (keysA.length !== keysB.length) return false;
-
- for (var i = 0; i < keysA.length; i++) {
- if (!hasOwn.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {
- return false;
- }
- }
-
- return true;
- }
-
-/***/ }),
-/* 226 */
-/***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
- exports.__esModule = true;
- exports.whenMapDispatchToPropsIsFunction = whenMapDispatchToPropsIsFunction;
- exports.whenMapDispatchToPropsIsMissing = whenMapDispatchToPropsIsMissing;
- exports.whenMapDispatchToPropsIsObject = whenMapDispatchToPropsIsObject;
- exports.default = void 0;
-
- var _redux = __webpack_require__(197);
-
- var _wrapMapToProps = __webpack_require__(227);
-
- function whenMapDispatchToPropsIsFunction(mapDispatchToProps) {
- return typeof mapDispatchToProps === 'function' ? (0, _wrapMapToProps.wrapMapToPropsFunc)(mapDispatchToProps, 'mapDispatchToProps') : undefined;
- }
-
- function whenMapDispatchToPropsIsMissing(mapDispatchToProps) {
- return !mapDispatchToProps ? (0, _wrapMapToProps.wrapMapToPropsConstant)(function (dispatch) {
- return {
- dispatch: dispatch
- };
- }) : undefined;
- }
-
- function whenMapDispatchToPropsIsObject(mapDispatchToProps) {
- return mapDispatchToProps && typeof mapDispatchToProps === 'object' ? (0, _wrapMapToProps.wrapMapToPropsConstant)(function (dispatch) {
- return (0, _redux.bindActionCreators)(mapDispatchToProps, dispatch);
- }) : undefined;
- }
-
- var _default = [whenMapDispatchToPropsIsFunction, whenMapDispatchToPropsIsMissing, whenMapDispatchToPropsIsObject];
- exports.default = _default;
-
-/***/ }),
-/* 227 */
-/***/ (function(module, exports, __webpack_require__) {
-
- /* WEBPACK VAR INJECTION */(function(process) {"use strict";
-
- var _interopRequireDefault = __webpack_require__(14);
-
- exports.__esModule = true;
- exports.wrapMapToPropsConstant = wrapMapToPropsConstant;
- exports.getDependsOnOwnProps = getDependsOnOwnProps;
- exports.wrapMapToPropsFunc = wrapMapToPropsFunc;
-
- var _verifyPlainObject = _interopRequireDefault(__webpack_require__(228));
-
- function wrapMapToPropsConstant(getConstant) {
- return function initConstantSelector(dispatch, options) {
- var constant = getConstant(dispatch, options);
-
- function constantSelector() {
- return constant;
- }
-
- constantSelector.dependsOnOwnProps = false;
- return constantSelector;
- };
- } // dependsOnOwnProps is used by createMapToPropsProxy to determine whether to pass props as args
- // to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine
- // whether mapToProps needs to be invoked when props have changed.
- //
- // A length of one signals that mapToProps does not depend on props from the parent component.
- // A length of zero is assumed to mean mapToProps is getting args via arguments or ...args and
- // therefore not reporting its length accurately..
-
-
- function getDependsOnOwnProps(mapToProps) {
- return mapToProps.dependsOnOwnProps !== null && mapToProps.dependsOnOwnProps !== undefined ? Boolean(mapToProps.dependsOnOwnProps) : mapToProps.length !== 1;
- } // Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction,
- // this function wraps mapToProps in a proxy function which does several things:
- //
- // * Detects whether the mapToProps function being called depends on props, which
- // is used by selectorFactory to decide if it should reinvoke on props changes.
- //
- // * On first call, handles mapToProps if returns another function, and treats that
- // new function as the true mapToProps for subsequent calls.
- //
- // * On first call, verifies the first result is a plain object, in order to warn
- // the developer that their mapToProps function is not returning a valid result.
- //
-
-
- function wrapMapToPropsFunc(mapToProps, methodName) {
- return function initProxySelector(dispatch, _ref) {
- var displayName = _ref.displayName;
-
- var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {
- return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);
- }; // allow detectFactoryAndVerify to get ownProps
-
-
- proxy.dependsOnOwnProps = true;
-
- proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {
- proxy.mapToProps = mapToProps;
- proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);
- var props = proxy(stateOrDispatch, ownProps);
-
- if (typeof props === 'function') {
- proxy.mapToProps = props;
- proxy.dependsOnOwnProps = getDependsOnOwnProps(props);
- props = proxy(stateOrDispatch, ownProps);
- }
-
- if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject.default)(props, displayName, methodName);
- return props;
- };
-
- return proxy;
- };
- }
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(33)))
-
-/***/ }),
-/* 228 */
-/***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
- var _interopRequireDefault = __webpack_require__(14);
-
- exports.__esModule = true;
- exports.default = verifyPlainObject;
-
- var _isPlainObject = _interopRequireDefault(__webpack_require__(229));
-
- var _warning = _interopRequireDefault(__webpack_require__(214));
-
- function verifyPlainObject(value, displayName, methodName) {
- if (!(0, _isPlainObject.default)(value)) {
- (0, _warning.default)(methodName + "() in " + displayName + " must return a plain object. Instead received " + value + ".");
- }
- }
-
-/***/ }),
-/* 229 */
-/***/ (function(module, exports) {
-
- "use strict";
-
- exports.__esModule = true;
- exports.default = isPlainObject;
-
- /**
- * @param {any} obj The object to inspect.
- * @returns {boolean} True if the argument appears to be a plain object.
- */
- function isPlainObject(obj) {
- if (typeof obj !== 'object' || obj === null) return false;
- var proto = Object.getPrototypeOf(obj);
- if (proto === null) return true;
- var baseProto = proto;
-
- while (Object.getPrototypeOf(baseProto) !== null) {
- baseProto = Object.getPrototypeOf(baseProto);
- }
-
- return proto === baseProto;
- }
-
-/***/ }),
-/* 230 */
-/***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
- exports.__esModule = true;
- exports.whenMapStateToPropsIsFunction = whenMapStateToPropsIsFunction;
- exports.whenMapStateToPropsIsMissing = whenMapStateToPropsIsMissing;
- exports.default = void 0;
-
- var _wrapMapToProps = __webpack_require__(227);
-
- function whenMapStateToPropsIsFunction(mapStateToProps) {
- return typeof mapStateToProps === 'function' ? (0, _wrapMapToProps.wrapMapToPropsFunc)(mapStateToProps, 'mapStateToProps') : undefined;
- }
-
- function whenMapStateToPropsIsMissing(mapStateToProps) {
- return !mapStateToProps ? (0, _wrapMapToProps.wrapMapToPropsConstant)(function () {
- return {};
- }) : undefined;
- }
-
- var _default = [whenMapStateToPropsIsFunction, whenMapStateToPropsIsMissing];
- exports.default = _default;
-
-/***/ }),
-/* 231 */
-/***/ (function(module, exports, __webpack_require__) {
-
- /* WEBPACK VAR INJECTION */(function(process) {"use strict";
-
- var _interopRequireDefault = __webpack_require__(14);
-
- exports.__esModule = true;
- exports.defaultMergeProps = defaultMergeProps;
- exports.wrapMergePropsFunc = wrapMergePropsFunc;
- exports.whenMergePropsIsFunction = whenMergePropsIsFunction;
- exports.whenMergePropsIsOmitted = whenMergePropsIsOmitted;
- exports.default = void 0;
-
- var _extends2 = _interopRequireDefault(__webpack_require__(122));
-
- var _verifyPlainObject = _interopRequireDefault(__webpack_require__(228));
-
- function defaultMergeProps(stateProps, dispatchProps, ownProps) {
- return (0, _extends2.default)({}, ownProps, stateProps, dispatchProps);
- }
-
- function wrapMergePropsFunc(mergeProps) {
- return function initMergePropsProxy(dispatch, _ref) {
- var displayName = _ref.displayName,
- pure = _ref.pure,
- areMergedPropsEqual = _ref.areMergedPropsEqual;
- var hasRunOnce = false;
- var mergedProps;
- return function mergePropsProxy(stateProps, dispatchProps, ownProps) {
- var nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps);
-
- if (hasRunOnce) {
- if (!pure || !areMergedPropsEqual(nextMergedProps, mergedProps)) mergedProps = nextMergedProps;
- } else {
- hasRunOnce = true;
- mergedProps = nextMergedProps;
- if (process.env.NODE_ENV !== 'production') (0, _verifyPlainObject.default)(mergedProps, displayName, 'mergeProps');
- }
-
- return mergedProps;
- };
- };
- }
-
- function whenMergePropsIsFunction(mergeProps) {
- return typeof mergeProps === 'function' ? wrapMergePropsFunc(mergeProps) : undefined;
- }
-
- function whenMergePropsIsOmitted(mergeProps) {
- return !mergeProps ? function () {
- return defaultMergeProps;
- } : undefined;
- }
-
- var _default = [whenMergePropsIsFunction, whenMergePropsIsOmitted];
- exports.default = _default;
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(33)))
-
-/***/ }),
-/* 232 */
-/***/ (function(module, exports, __webpack_require__) {
-
- /* WEBPACK VAR INJECTION */(function(process) {"use strict";
-
- var _interopRequireDefault = __webpack_require__(14);
-
- exports.__esModule = true;
- exports.impureFinalPropsSelectorFactory = impureFinalPropsSelectorFactory;
- exports.pureFinalPropsSelectorFactory = pureFinalPropsSelectorFactory;
- exports.default = finalPropsSelectorFactory;
-
- var _objectWithoutPropertiesLoose2 = _interopRequireDefault(__webpack_require__(217));
-
- var _verifySubselectors = _interopRequireDefault(__webpack_require__(233));
-
- function impureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch) {
- return function impureFinalPropsSelector(state, ownProps) {
- return mergeProps(mapStateToProps(state, ownProps), mapDispatchToProps(dispatch, ownProps), ownProps);
- };
- }
-
- function pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, _ref) {
- var areStatesEqual = _ref.areStatesEqual,
- areOwnPropsEqual = _ref.areOwnPropsEqual,
- areStatePropsEqual = _ref.areStatePropsEqual;
- var hasRunAtLeastOnce = false;
- var state;
- var ownProps;
- var stateProps;
- var dispatchProps;
- var mergedProps;
-
- function handleFirstCall(firstState, firstOwnProps) {
- state = firstState;
- ownProps = firstOwnProps;
- stateProps = mapStateToProps(state, ownProps);
- dispatchProps = mapDispatchToProps(dispatch, ownProps);
- mergedProps = mergeProps(stateProps, dispatchProps, ownProps);
- hasRunAtLeastOnce = true;
- return mergedProps;
- }
-
- function handleNewPropsAndNewState() {
- stateProps = mapStateToProps(state, ownProps);
- if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);
- mergedProps = mergeProps(stateProps, dispatchProps, ownProps);
- return mergedProps;
- }
-
- function handleNewProps() {
- if (mapStateToProps.dependsOnOwnProps) stateProps = mapStateToProps(state, ownProps);
- if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);
- mergedProps = mergeProps(stateProps, dispatchProps, ownProps);
- return mergedProps;
- }
-
- function handleNewState() {
- var nextStateProps = mapStateToProps(state, ownProps);
- var statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps);
- stateProps = nextStateProps;
- if (statePropsChanged) mergedProps = mergeProps(stateProps, dispatchProps, ownProps);
- return mergedProps;
- }
-
- function handleSubsequentCalls(nextState, nextOwnProps) {
- var propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps);
- var stateChanged = !areStatesEqual(nextState, state);
- state = nextState;
- ownProps = nextOwnProps;
- if (propsChanged && stateChanged) return handleNewPropsAndNewState();
- if (propsChanged) return handleNewProps();
- if (stateChanged) return handleNewState();
- return mergedProps;
- }
-
- return function pureFinalPropsSelector(nextState, nextOwnProps) {
- return hasRunAtLeastOnce ? handleSubsequentCalls(nextState, nextOwnProps) : handleFirstCall(nextState, nextOwnProps);
- };
- } // TODO: Add more comments
- // If pure is true, the selector returned by selectorFactory will memoize its results,
- // allowing connectAdvanced's shouldComponentUpdate to return false if final
- // props have not changed. If false, the selector will always return a new
- // object and shouldComponentUpdate will always return true.
-
-
- function finalPropsSelectorFactory(dispatch, _ref2) {
- var initMapStateToProps = _ref2.initMapStateToProps,
- initMapDispatchToProps = _ref2.initMapDispatchToProps,
- initMergeProps = _ref2.initMergeProps,
- options = (0, _objectWithoutPropertiesLoose2.default)(_ref2, ["initMapStateToProps", "initMapDispatchToProps", "initMergeProps"]);
- var mapStateToProps = initMapStateToProps(dispatch, options);
- var mapDispatchToProps = initMapDispatchToProps(dispatch, options);
- var mergeProps = initMergeProps(dispatch, options);
-
- if (process.env.NODE_ENV !== 'production') {
- (0, _verifySubselectors.default)(mapStateToProps, mapDispatchToProps, mergeProps, options.displayName);
- }
-
- var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;
- return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);
- }
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(33)))
-
-/***/ }),
-/* 233 */
-/***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
- var _interopRequireDefault = __webpack_require__(14);
-
- exports.__esModule = true;
- exports.default = verifySubselectors;
-
- var _warning = _interopRequireDefault(__webpack_require__(214));
-
- function verify(selector, methodName, displayName) {
- if (!selector) {
- throw new Error("Unexpected value for " + methodName + " in " + displayName + ".");
- } else if (methodName === 'mapStateToProps' || methodName === 'mapDispatchToProps') {
- if (!selector.hasOwnProperty('dependsOnOwnProps')) {
- (0, _warning.default)("The selector for " + methodName + " of " + displayName + " did not specify a value for dependsOnOwnProps.");
- }
- }
- }
-
- function verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, displayName) {
- verify(mapStateToProps, 'mapStateToProps', displayName);
- verify(mapDispatchToProps, 'mapDispatchToProps', displayName);
- verify(mergeProps, 'mergeProps', displayName);
- }
-
-/***/ }),
-/* 234 */
-/***/ (function(module, exports, __webpack_require__) {
-
- 'use strict';
-
- exports.__esModule = true;
-
- function _interopRequire(obj) { return obj && obj.__esModule ? obj['default'] : obj; }
-
- var _Motion = __webpack_require__(235);
-
- exports.Motion = _interopRequire(_Motion);
-
- var _StaggeredMotion = __webpack_require__(242);
-
- exports.StaggeredMotion = _interopRequire(_StaggeredMotion);
-
- var _TransitionMotion = __webpack_require__(243);
-
- exports.TransitionMotion = _interopRequire(_TransitionMotion);
-
- var _spring = __webpack_require__(245);
-
- exports.spring = _interopRequire(_spring);
-
- var _presets = __webpack_require__(246);
-
- exports.presets = _interopRequire(_presets);
-
- var _stripStyle = __webpack_require__(237);
-
- exports.stripStyle = _interopRequire(_stripStyle);
-
- // deprecated, dummy warning function
-
- var _reorderKeys = __webpack_require__(247);
-
- exports.reorderKeys = _interopRequire(_reorderKeys);
-
-/***/ }),
-/* 235 */
-/***/ (function(module, exports, __webpack_require__) {
-
- 'use strict';
-
- exports.__esModule = true;
-
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
- var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
-
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
-
- function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
-
- var _mapToZero = __webpack_require__(236);
-
- var _mapToZero2 = _interopRequireDefault(_mapToZero);
-
- var _stripStyle = __webpack_require__(237);
-
- var _stripStyle2 = _interopRequireDefault(_stripStyle);
-
- var _stepper3 = __webpack_require__(238);
-
- var _stepper4 = _interopRequireDefault(_stepper3);
-
- var _performanceNow = __webpack_require__(239);
-
- var _performanceNow2 = _interopRequireDefault(_performanceNow);
-
- var _raf = __webpack_require__(240);
-
- var _raf2 = _interopRequireDefault(_raf);
-
- var _shouldStopAnimation = __webpack_require__(241);
-
- var _shouldStopAnimation2 = _interopRequireDefault(_shouldStopAnimation);
-
- var _react = __webpack_require__(1);
-
- var _react2 = _interopRequireDefault(_react);
-
- var _propTypes = __webpack_require__(6);
-
- var _propTypes2 = _interopRequireDefault(_propTypes);
-
- var msPerFrame = 1000 / 60;
-
- var Motion = (function (_React$Component) {
- _inherits(Motion, _React$Component);
-
- _createClass(Motion, null, [{
- key: 'propTypes',
- value: {
- // TOOD: warn against putting a config in here
- defaultStyle: _propTypes2['default'].objectOf(_propTypes2['default'].number),
- style: _propTypes2['default'].objectOf(_propTypes2['default'].oneOfType([_propTypes2['default'].number, _propTypes2['default'].object])).isRequired,
- children: _propTypes2['default'].func.isRequired,
- onRest: _propTypes2['default'].func
- },
- enumerable: true
- }]);
-
- function Motion(props) {
- var _this = this;
-
- _classCallCheck(this, Motion);
-
- _React$Component.call(this, props);
- this.wasAnimating = false;
- this.animationID = null;
- this.prevTime = 0;
- this.accumulatedTime = 0;
- this.unreadPropStyle = null;
-
- this.clearUnreadPropStyle = function (destStyle) {
- var dirty = false;
- var _state = _this.state;
- var currentStyle = _state.currentStyle;
- var currentVelocity = _state.currentVelocity;
- var lastIdealStyle = _state.lastIdealStyle;
- var lastIdealVelocity = _state.lastIdealVelocity;
-
- for (var key in destStyle) {
- if (!Object.prototype.hasOwnProperty.call(destStyle, key)) {
- continue;
- }
-
- var styleValue = destStyle[key];
- if (typeof styleValue === 'number') {
- if (!dirty) {
- dirty = true;
- currentStyle = _extends({}, currentStyle);
- currentVelocity = _extends({}, currentVelocity);
- lastIdealStyle = _extends({}, lastIdealStyle);
- lastIdealVelocity = _extends({}, lastIdealVelocity);
- }
-
- currentStyle[key] = styleValue;
- currentVelocity[key] = 0;
- lastIdealStyle[key] = styleValue;
- lastIdealVelocity[key] = 0;
- }
- }
-
- if (dirty) {
- _this.setState({ currentStyle: currentStyle, currentVelocity: currentVelocity, lastIdealStyle: lastIdealStyle, lastIdealVelocity: lastIdealVelocity });
- }
- };
-
- this.startAnimationIfNecessary = function () {
- // TODO: when config is {a: 10} and dest is {a: 10} do we raf once and
- // call cb? No, otherwise accidental parent rerender causes cb trigger
- _this.animationID = _raf2['default'](function (timestamp) {
- // check if we need to animate in the first place
- var propsStyle = _this.props.style;
- if (_shouldStopAnimation2['default'](_this.state.currentStyle, propsStyle, _this.state.currentVelocity)) {
- if (_this.wasAnimating && _this.props.onRest) {
- _this.props.onRest();
- }
-
- // no need to cancel animationID here; shouldn't have any in flight
- _this.animationID = null;
- _this.wasAnimating = false;
- _this.accumulatedTime = 0;
- return;
- }
-
- _this.wasAnimating = true;
-
- var currentTime = timestamp || _performanceNow2['default']();
- var timeDelta = currentTime - _this.prevTime;
- _this.prevTime = currentTime;
- _this.accumulatedTime = _this.accumulatedTime + timeDelta;
- // more than 10 frames? prolly switched browser tab. Restart
- if (_this.accumulatedTime > msPerFrame * 10) {
- _this.accumulatedTime = 0;
- }
-
- if (_this.accumulatedTime === 0) {
- // no need to cancel animationID here; shouldn't have any in flight
- _this.animationID = null;
- _this.startAnimationIfNecessary();
- return;
- }
-
- var currentFrameCompletion = (_this.accumulatedTime - Math.floor(_this.accumulatedTime / msPerFrame) * msPerFrame) / msPerFrame;
- var framesToCatchUp = Math.floor(_this.accumulatedTime / msPerFrame);
-
- var newLastIdealStyle = {};
- var newLastIdealVelocity = {};
- var newCurrentStyle = {};
- var newCurrentVelocity = {};
-
- for (var key in propsStyle) {
- if (!Object.prototype.hasOwnProperty.call(propsStyle, key)) {
- continue;
- }
-
- var styleValue = propsStyle[key];
- if (typeof styleValue === 'number') {
- newCurrentStyle[key] = styleValue;
- newCurrentVelocity[key] = 0;
- newLastIdealStyle[key] = styleValue;
- newLastIdealVelocity[key] = 0;
- } else {
- var newLastIdealStyleValue = _this.state.lastIdealStyle[key];
- var newLastIdealVelocityValue = _this.state.lastIdealVelocity[key];
- for (var i = 0; i < framesToCatchUp; i++) {
- var _stepper = _stepper4['default'](msPerFrame / 1000, newLastIdealStyleValue, newLastIdealVelocityValue, styleValue.val, styleValue.stiffness, styleValue.damping, styleValue.precision);
-
- newLastIdealStyleValue = _stepper[0];
- newLastIdealVelocityValue = _stepper[1];
- }
-
- var _stepper2 = _stepper4['default'](msPerFrame / 1000, newLastIdealStyleValue, newLastIdealVelocityValue, styleValue.val, styleValue.stiffness, styleValue.damping, styleValue.precision);
-
- var nextIdealX = _stepper2[0];
- var nextIdealV = _stepper2[1];
-
- newCurrentStyle[key] = newLastIdealStyleValue + (nextIdealX - newLastIdealStyleValue) * currentFrameCompletion;
- newCurrentVelocity[key] = newLastIdealVelocityValue + (nextIdealV - newLastIdealVelocityValue) * currentFrameCompletion;
- newLastIdealStyle[key] = newLastIdealStyleValue;
- newLastIdealVelocity[key] = newLastIdealVelocityValue;
- }
- }
-
- _this.animationID = null;
- // the amount we're looped over above
- _this.accumulatedTime -= framesToCatchUp * msPerFrame;
-
- _this.setState({
- currentStyle: newCurrentStyle,
- currentVelocity: newCurrentVelocity,
- lastIdealStyle: newLastIdealStyle,
- lastIdealVelocity: newLastIdealVelocity
- });
-
- _this.unreadPropStyle = null;
-
- _this.startAnimationIfNecessary();
- });
- };
-
- this.state = this.defaultState();
- }
-
- Motion.prototype.defaultState = function defaultState() {
- var _props = this.props;
- var defaultStyle = _props.defaultStyle;
- var style = _props.style;
-
- var currentStyle = defaultStyle || _stripStyle2['default'](style);
- var currentVelocity = _mapToZero2['default'](currentStyle);
- return {
- currentStyle: currentStyle,
- currentVelocity: currentVelocity,
- lastIdealStyle: currentStyle,
- lastIdealVelocity: currentVelocity
- };
- };
-
- // it's possible that currentStyle's value is stale: if props is immediately
- // changed from 0 to 400 to spring(0) again, the async currentStyle is still
- // at 0 (didn't have time to tick and interpolate even once). If we naively
- // compare currentStyle with destVal it'll be 0 === 0 (no animation, stop).
- // In reality currentStyle should be 400
-
- Motion.prototype.componentDidMount = function componentDidMount() {
- this.prevTime = _performanceNow2['default']();
- this.startAnimationIfNecessary();
- };
-
- Motion.prototype.componentWillReceiveProps = function componentWillReceiveProps(props) {
- if (this.unreadPropStyle != null) {
- // previous props haven't had the chance to be set yet; set them here
- this.clearUnreadPropStyle(this.unreadPropStyle);
- }
-
- this.unreadPropStyle = props.style;
- if (this.animationID == null) {
- this.prevTime = _performanceNow2['default']();
- this.startAnimationIfNecessary();
- }
- };
-
- Motion.prototype.componentWillUnmount = function componentWillUnmount() {
- if (this.animationID != null) {
- _raf2['default'].cancel(this.animationID);
- this.animationID = null;
- }
- };
-
- Motion.prototype.render = function render() {
- var renderedChildren = this.props.children(this.state.currentStyle);
- return renderedChildren && _react2['default'].Children.only(renderedChildren);
- };
-
- return Motion;
- })(_react2['default'].Component);
-
- exports['default'] = Motion;
- module.exports = exports['default'];
-
- // after checking for unreadPropStyle != null, we manually go set the
- // non-interpolating values (those that are a number, without a spring
- // config)
-
-/***/ }),
-/* 236 */
-/***/ (function(module, exports) {
-
-
-
- // currently used to initiate the velocity style object to 0
- 'use strict';
-
- exports.__esModule = true;
- exports['default'] = mapToZero;
-
- function mapToZero(obj) {
- var ret = {};
- for (var key in obj) {
- if (Object.prototype.hasOwnProperty.call(obj, key)) {
- ret[key] = 0;
- }
- }
- return ret;
- }
-
- module.exports = exports['default'];
-
-/***/ }),
-/* 237 */
-/***/ (function(module, exports) {
-
-
- // turn {x: {val: 1, stiffness: 1, damping: 2}, y: 2} generated by
- // `{x: spring(1, {stiffness: 1, damping: 2}), y: 2}` into {x: 1, y: 2}
-
- 'use strict';
-
- exports.__esModule = true;
- exports['default'] = stripStyle;
-
- function stripStyle(style) {
- var ret = {};
- for (var key in style) {
- if (!Object.prototype.hasOwnProperty.call(style, key)) {
- continue;
- }
- ret[key] = typeof style[key] === 'number' ? style[key] : style[key].val;
- }
- return ret;
- }
-
- module.exports = exports['default'];
-
-/***/ }),
-/* 238 */
-/***/ (function(module, exports) {
-
-
-
- // stepper is used a lot. Saves allocation to return the same array wrapper.
- // This is fine and danger-free against mutations because the callsite
- // immediately destructures it and gets the numbers inside without passing the
- "use strict";
-
- exports.__esModule = true;
- exports["default"] = stepper;
-
- var reusedTuple = [0, 0];
-
- function stepper(secondPerFrame, x, v, destX, k, b, precision) {
- // Spring stiffness, in kg / s^2
-
- // for animations, destX is really spring length (spring at rest). initial
- // position is considered as the stretched/compressed position of a spring
- var Fspring = -k * (x - destX);
-
- // Damping, in kg / s
- var Fdamper = -b * v;
-
- // usually we put mass here, but for animation purposes, specifying mass is a
- // bit redundant. you could simply adjust k and b accordingly
- // let a = (Fspring + Fdamper) / mass;
- var a = Fspring + Fdamper;
-
- var newV = v + a * secondPerFrame;
- var newX = x + newV * secondPerFrame;
-
- if (Math.abs(newV) < precision && Math.abs(newX - destX) < precision) {
- reusedTuple[0] = destX;
- reusedTuple[1] = 0;
- return reusedTuple;
- }
-
- reusedTuple[0] = newX;
- reusedTuple[1] = newV;
- return reusedTuple;
- }
-
- module.exports = exports["default"];
- // array reference around.
-
-/***/ }),
-/* 239 */
-/***/ (function(module, exports, __webpack_require__) {
-
- /* WEBPACK VAR INJECTION */(function(process) {// Generated by CoffeeScript 1.12.2
- (function() {
- var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime;
-
- if ((typeof performance !== "undefined" && performance !== null) && performance.now) {
- module.exports = function() {
- return performance.now();
- };
- } else if ((typeof process !== "undefined" && process !== null) && process.hrtime) {
- module.exports = function() {
- return (getNanoSeconds() - nodeLoadTime) / 1e6;
- };
- hrtime = process.hrtime;
- getNanoSeconds = function() {
- var hr;
- hr = hrtime();
- return hr[0] * 1e9 + hr[1];
- };
- moduleLoadTime = getNanoSeconds();
- upTime = process.uptime() * 1e9;
- nodeLoadTime = moduleLoadTime - upTime;
- } else if (Date.now) {
- module.exports = function() {
- return Date.now() - loadTime;
- };
- loadTime = Date.now();
- } else {
- module.exports = function() {
- return new Date().getTime() - loadTime;
- };
- loadTime = new Date().getTime();
- }
-
- }).call(this);
-
- //# sourceMappingURL=performance-now.js.map
-
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(33)))
-
-/***/ }),
-/* 240 */
-/***/ (function(module, exports, __webpack_require__) {
-
- /* WEBPACK VAR INJECTION */(function(global) {var now = __webpack_require__(239)
- , root = typeof window === 'undefined' ? global : window
- , vendors = ['moz', 'webkit']
- , suffix = 'AnimationFrame'
- , raf = root['request' + suffix]
- , caf = root['cancel' + suffix] || root['cancelRequest' + suffix]
-
- for(var i = 0; !raf && i < vendors.length; i++) {
- raf = root[vendors[i] + 'Request' + suffix]
- caf = root[vendors[i] + 'Cancel' + suffix]
- || root[vendors[i] + 'CancelRequest' + suffix]
- }
-
- // Some versions of FF have rAF but not cAF
- if(!raf || !caf) {
- var last = 0
- , id = 0
- , queue = []
- , frameDuration = 1000 / 60
-
- raf = function(callback) {
- if(queue.length === 0) {
- var _now = now()
- , next = Math.max(0, frameDuration - (_now - last))
- last = next + _now
- setTimeout(function() {
- var cp = queue.slice(0)
- // Clear queue here to prevent
- // callbacks from appending listeners
- // to the current frame's queue
- queue.length = 0
- for(var i = 0; i < cp.length; i++) {
- if(!cp[i].cancelled) {
- try{
- cp[i].callback(last)
- } catch(e) {
- setTimeout(function() { throw e }, 0)
- }
- }
- }
- }, Math.round(next))
- }
- queue.push({
- handle: ++id,
- callback: callback,
- cancelled: false
- })
- return id
- }
-
- caf = function(handle) {
- for(var i = 0; i < queue.length; i++) {
- if(queue[i].handle === handle) {
- queue[i].cancelled = true
- }
- }
- }
- }
-
- module.exports = function(fn) {
- // Wrap in a new function to prevent
- // `cancel` potentially being assigned
- // to the native rAF function
- return raf.call(root, fn)
- }
- module.exports.cancel = function() {
- caf.apply(root, arguments)
- }
- module.exports.polyfill = function(object) {
- if (!object) {
- object = root;
- }
- object.requestAnimationFrame = raf
- object.cancelAnimationFrame = caf
- }
-
- /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
-
-/***/ }),
-/* 241 */
-/***/ (function(module, exports) {
-
-
-
- // usage assumption: currentStyle values have already been rendered but it says
- // nothing of whether currentStyle is stale (see unreadPropStyle)
- 'use strict';
-
- exports.__esModule = true;
- exports['default'] = shouldStopAnimation;
-
- function shouldStopAnimation(currentStyle, style, currentVelocity) {
- for (var key in style) {
- if (!Object.prototype.hasOwnProperty.call(style, key)) {
- continue;
- }
-
- if (currentVelocity[key] !== 0) {
- return false;
- }
-
- var styleValue = typeof style[key] === 'number' ? style[key] : style[key].val;
- // stepper will have already taken care of rounding precision errors, so
- // won't have such thing as 0.9999 !=== 1
- if (currentStyle[key] !== styleValue) {
- return false;
- }
- }
-
- return true;
- }
-
- module.exports = exports['default'];
-
-/***/ }),
-/* 242 */
-/***/ (function(module, exports, __webpack_require__) {
-
- 'use strict';
-
- exports.__esModule = true;
-
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
- var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
-
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
-
- function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
-
- var _mapToZero = __webpack_require__(236);
-
- var _mapToZero2 = _interopRequireDefault(_mapToZero);
-
- var _stripStyle = __webpack_require__(237);
-
- var _stripStyle2 = _interopRequireDefault(_stripStyle);
-
- var _stepper3 = __webpack_require__(238);
-
- var _stepper4 = _interopRequireDefault(_stepper3);
-
- var _performanceNow = __webpack_require__(239);
-
- var _performanceNow2 = _interopRequireDefault(_performanceNow);
-
- var _raf = __webpack_require__(240);
-
- var _raf2 = _interopRequireDefault(_raf);
-
- var _shouldStopAnimation = __webpack_require__(241);
-
- var _shouldStopAnimation2 = _interopRequireDefault(_shouldStopAnimation);
-
- var _react = __webpack_require__(1);
-
- var _react2 = _interopRequireDefault(_react);
-
- var _propTypes = __webpack_require__(6);
-
- var _propTypes2 = _interopRequireDefault(_propTypes);
-
- var msPerFrame = 1000 / 60;
-
- function shouldStopAnimationAll(currentStyles, styles, currentVelocities) {
- for (var i = 0; i < currentStyles.length; i++) {
- if (!_shouldStopAnimation2['default'](currentStyles[i], styles[i], currentVelocities[i])) {
- return false;
- }
- }
- return true;
- }
-
- var StaggeredMotion = (function (_React$Component) {
- _inherits(StaggeredMotion, _React$Component);
-
- _createClass(StaggeredMotion, null, [{
- key: 'propTypes',
- value: {
- // TOOD: warn against putting a config in here
- defaultStyles: _propTypes2['default'].arrayOf(_propTypes2['default'].objectOf(_propTypes2['default'].number)),
- styles: _propTypes2['default'].func.isRequired,
- children: _propTypes2['default'].func.isRequired
- },
- enumerable: true
- }]);
-
- function StaggeredMotion(props) {
- var _this = this;
-
- _classCallCheck(this, StaggeredMotion);
-
- _React$Component.call(this, props);
- this.animationID = null;
- this.prevTime = 0;
- this.accumulatedTime = 0;
- this.unreadPropStyles = null;
-
- this.clearUnreadPropStyle = function (unreadPropStyles) {
- var _state = _this.state;
- var currentStyles = _state.currentStyles;
- var currentVelocities = _state.currentVelocities;
- var lastIdealStyles = _state.lastIdealStyles;
- var lastIdealVelocities = _state.lastIdealVelocities;
-
- var someDirty = false;
- for (var i = 0; i < unreadPropStyles.length; i++) {
- var unreadPropStyle = unreadPropStyles[i];
- var dirty = false;
-
- for (var key in unreadPropStyle) {
- if (!Object.prototype.hasOwnProperty.call(unreadPropStyle, key)) {
- continue;
- }
-
- var styleValue = unreadPropStyle[key];
- if (typeof styleValue === 'number') {
- if (!dirty) {
- dirty = true;
- someDirty = true;
- currentStyles[i] = _extends({}, currentStyles[i]);
- currentVelocities[i] = _extends({}, currentVelocities[i]);
- lastIdealStyles[i] = _extends({}, lastIdealStyles[i]);
- lastIdealVelocities[i] = _extends({}, lastIdealVelocities[i]);
- }
- currentStyles[i][key] = styleValue;
- currentVelocities[i][key] = 0;
- lastIdealStyles[i][key] = styleValue;
- lastIdealVelocities[i][key] = 0;
- }
- }
- }
-
- if (someDirty) {
- _this.setState({ currentStyles: currentStyles, currentVelocities: currentVelocities, lastIdealStyles: lastIdealStyles, lastIdealVelocities: lastIdealVelocities });
- }
- };
-
- this.startAnimationIfNecessary = function () {
- // TODO: when config is {a: 10} and dest is {a: 10} do we raf once and
- // call cb? No, otherwise accidental parent rerender causes cb trigger
- _this.animationID = _raf2['default'](function (timestamp) {
- var destStyles = _this.props.styles(_this.state.lastIdealStyles);
-
- // check if we need to animate in the first place
- if (shouldStopAnimationAll(_this.state.currentStyles, destStyles, _this.state.currentVelocities)) {
- // no need to cancel animationID here; shouldn't have any in flight
- _this.animationID = null;
- _this.accumulatedTime = 0;
- return;
- }
-
- var currentTime = timestamp || _performanceNow2['default']();
- var timeDelta = currentTime - _this.prevTime;
- _this.prevTime = currentTime;
- _this.accumulatedTime = _this.accumulatedTime + timeDelta;
- // more than 10 frames? prolly switched browser tab. Restart
- if (_this.accumulatedTime > msPerFrame * 10) {
- _this.accumulatedTime = 0;
- }
-
- if (_this.accumulatedTime === 0) {
- // no need to cancel animationID here; shouldn't have any in flight
- _this.animationID = null;
- _this.startAnimationIfNecessary();
- return;
- }
-
- var currentFrameCompletion = (_this.accumulatedTime - Math.floor(_this.accumulatedTime / msPerFrame) * msPerFrame) / msPerFrame;
- var framesToCatchUp = Math.floor(_this.accumulatedTime / msPerFrame);
-
- var newLastIdealStyles = [];
- var newLastIdealVelocities = [];
- var newCurrentStyles = [];
- var newCurrentVelocities = [];
-
- for (var i = 0; i < destStyles.length; i++) {
- var destStyle = destStyles[i];
- var newCurrentStyle = {};
- var newCurrentVelocity = {};
- var newLastIdealStyle = {};
- var newLastIdealVelocity = {};
-
- for (var key in destStyle) {
- if (!Object.prototype.hasOwnProperty.call(destStyle, key)) {
- continue;
- }
-
- var styleValue = destStyle[key];
- if (typeof styleValue === 'number') {
- newCurrentStyle[key] = styleValue;
- newCurrentVelocity[key] = 0;
- newLastIdealStyle[key] = styleValue;
- newLastIdealVelocity[key] = 0;
- } else {
- var newLastIdealStyleValue = _this.state.lastIdealStyles[i][key];
- var newLastIdealVelocityValue = _this.state.lastIdealVelocities[i][key];
- for (var j = 0; j < framesToCatchUp; j++) {
- var _stepper = _stepper4['default'](msPerFrame / 1000, newLastIdealStyleValue, newLastIdealVelocityValue, styleValue.val, styleValue.stiffness, styleValue.damping, styleValue.precision);
-
- newLastIdealStyleValue = _stepper[0];
- newLastIdealVelocityValue = _stepper[1];
- }
-
- var _stepper2 = _stepper4['default'](msPerFrame / 1000, newLastIdealStyleValue, newLastIdealVelocityValue, styleValue.val, styleValue.stiffness, styleValue.damping, styleValue.precision);
-
- var nextIdealX = _stepper2[0];
- var nextIdealV = _stepper2[1];
-
- newCurrentStyle[key] = newLastIdealStyleValue + (nextIdealX - newLastIdealStyleValue) * currentFrameCompletion;
- newCurrentVelocity[key] = newLastIdealVelocityValue + (nextIdealV - newLastIdealVelocityValue) * currentFrameCompletion;
- newLastIdealStyle[key] = newLastIdealStyleValue;
- newLastIdealVelocity[key] = newLastIdealVelocityValue;
- }
- }
-
- newCurrentStyles[i] = newCurrentStyle;
- newCurrentVelocities[i] = newCurrentVelocity;
- newLastIdealStyles[i] = newLastIdealStyle;
- newLastIdealVelocities[i] = newLastIdealVelocity;
- }
-
- _this.animationID = null;
- // the amount we're looped over above
- _this.accumulatedTime -= framesToCatchUp * msPerFrame;
-
- _this.setState({
- currentStyles: newCurrentStyles,
- currentVelocities: newCurrentVelocities,
- lastIdealStyles: newLastIdealStyles,
- lastIdealVelocities: newLastIdealVelocities
- });
-
- _this.unreadPropStyles = null;
-
- _this.startAnimationIfNecessary();
- });
- };
-
- this.state = this.defaultState();
- }
-
- StaggeredMotion.prototype.defaultState = function defaultState() {
- var _props = this.props;
- var defaultStyles = _props.defaultStyles;
- var styles = _props.styles;
-
- var currentStyles = defaultStyles || styles().map(_stripStyle2['default']);
- var currentVelocities = currentStyles.map(function (currentStyle) {
- return _mapToZero2['default'](currentStyle);
- });
- return {
- currentStyles: currentStyles,
- currentVelocities: currentVelocities,
- lastIdealStyles: currentStyles,
- lastIdealVelocities: currentVelocities
- };
- };
-
- StaggeredMotion.prototype.componentDidMount = function componentDidMount() {
- this.prevTime = _performanceNow2['default']();
- this.startAnimationIfNecessary();
- };
-
- StaggeredMotion.prototype.componentWillReceiveProps = function componentWillReceiveProps(props) {
- if (this.unreadPropStyles != null) {
- // previous props haven't had the chance to be set yet; set them here
- this.clearUnreadPropStyle(this.unreadPropStyles);
- }
-
- this.unreadPropStyles = props.styles(this.state.lastIdealStyles);
- if (this.animationID == null) {
- this.prevTime = _performanceNow2['default']();
- this.startAnimationIfNecessary();
- }
- };
-
- StaggeredMotion.prototype.componentWillUnmount = function componentWillUnmount() {
- if (this.animationID != null) {
- _raf2['default'].cancel(this.animationID);
- this.animationID = null;
- }
- };
-
- StaggeredMotion.prototype.render = function render() {
- var renderedChildren = this.props.children(this.state.currentStyles);
- return renderedChildren && _react2['default'].Children.only(renderedChildren);
- };
-
- return StaggeredMotion;
- })(_react2['default'].Component);
-
- exports['default'] = StaggeredMotion;
- module.exports = exports['default'];
-
- // it's possible that currentStyle's value is stale: if props is immediately
- // changed from 0 to 400 to spring(0) again, the async currentStyle is still
- // at 0 (didn't have time to tick and interpolate even once). If we naively
- // compare currentStyle with destVal it'll be 0 === 0 (no animation, stop).
- // In reality currentStyle should be 400
-
- // after checking for unreadPropStyles != null, we manually go set the
- // non-interpolating values (those that are a number, without a spring
- // config)
-
-/***/ }),
-/* 243 */
-/***/ (function(module, exports, __webpack_require__) {
-
- 'use strict';
-
- exports.__esModule = true;
-
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
- var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
-
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }
-
- function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
-
- var _mapToZero = __webpack_require__(236);
-
- var _mapToZero2 = _interopRequireDefault(_mapToZero);
-
- var _stripStyle = __webpack_require__(237);
-
- var _stripStyle2 = _interopRequireDefault(_stripStyle);
-
- var _stepper3 = __webpack_require__(238);
-
- var _stepper4 = _interopRequireDefault(_stepper3);
-
- var _mergeDiff = __webpack_require__(244);
-
- var _mergeDiff2 = _interopRequireDefault(_mergeDiff);
-
- var _performanceNow = __webpack_require__(239);
-
- var _performanceNow2 = _interopRequireDefault(_performanceNow);
-
- var _raf = __webpack_require__(240);
-
- var _raf2 = _interopRequireDefault(_raf);
-
- var _shouldStopAnimation = __webpack_require__(241);
-
- var _shouldStopAnimation2 = _interopRequireDefault(_shouldStopAnimation);
-
- var _react = __webpack_require__(1);
-
- var _react2 = _interopRequireDefault(_react);
-
- var _propTypes = __webpack_require__(6);
-
- var _propTypes2 = _interopRequireDefault(_propTypes);
-
- var msPerFrame = 1000 / 60;
-
- // the children function & (potential) styles function asks as param an
- // Array, where each TransitionPlainStyle is of the format
- // {key: string, data?: any, style: PlainStyle}. However, the way we keep
- // internal states doesn't contain such a data structure (check the state and
- // TransitionMotionState). So when children function and others ask for such
- // data we need to generate them on the fly by combining mergedPropsStyles and
- // currentStyles/lastIdealStyles
- function rehydrateStyles(mergedPropsStyles, unreadPropStyles, plainStyles) {
- // Copy the value to a `const` so that Flow understands that the const won't
- // change and will be non-nullable in the callback below.
- var cUnreadPropStyles = unreadPropStyles;
- if (cUnreadPropStyles == null) {
- return mergedPropsStyles.map(function (mergedPropsStyle, i) {
- return {
- key: mergedPropsStyle.key,
- data: mergedPropsStyle.data,
- style: plainStyles[i]
- };
- });
- }
- return mergedPropsStyles.map(function (mergedPropsStyle, i) {
- for (var j = 0; j < cUnreadPropStyles.length; j++) {
- if (cUnreadPropStyles[j].key === mergedPropsStyle.key) {
- return {
- key: cUnreadPropStyles[j].key,
- data: cUnreadPropStyles[j].data,
- style: plainStyles[i]
- };
- }
- }
- return { key: mergedPropsStyle.key, data: mergedPropsStyle.data, style: plainStyles[i] };
- });
- }
-
- function shouldStopAnimationAll(currentStyles, destStyles, currentVelocities, mergedPropsStyles) {
- if (mergedPropsStyles.length !== destStyles.length) {
- return false;
- }
-
- for (var i = 0; i < mergedPropsStyles.length; i++) {
- if (mergedPropsStyles[i].key !== destStyles[i].key) {
- return false;
- }
- }
-
- // we have the invariant that mergedPropsStyles and
- // currentStyles/currentVelocities/last* are synced in terms of cells, see
- // mergeAndSync comment for more info
- for (var i = 0; i < mergedPropsStyles.length; i++) {
- if (!_shouldStopAnimation2['default'](currentStyles[i], destStyles[i].style, currentVelocities[i])) {
- return false;
- }
- }
-
- return true;
- }
-
- // core key merging logic
-
- // things to do: say previously merged style is {a, b}, dest style (prop) is {b,
- // c}, previous current (interpolating) style is {a, b}
- // **invariant**: current[i] corresponds to merged[i] in terms of key
-
- // steps:
- // turn merged style into {a?, b, c}
- // add c, value of c is destStyles.c
- // maybe remove a, aka call willLeave(a), then merged is either {b, c} or {a, b, c}
- // turn current (interpolating) style from {a, b} into {a?, b, c}
- // maybe remove a
- // certainly add c, value of c is willEnter(c)
- // loop over merged and construct new current
- // dest doesn't change, that's owner's
- function mergeAndSync(willEnter, willLeave, didLeave, oldMergedPropsStyles, destStyles, oldCurrentStyles, oldCurrentVelocities, oldLastIdealStyles, oldLastIdealVelocities) {
- var newMergedPropsStyles = _mergeDiff2['default'](oldMergedPropsStyles, destStyles, function (oldIndex, oldMergedPropsStyle) {
- var leavingStyle = willLeave(oldMergedPropsStyle);
- if (leavingStyle == null) {
- didLeave({ key: oldMergedPropsStyle.key, data: oldMergedPropsStyle.data });
- return null;
- }
- if (_shouldStopAnimation2['default'](oldCurrentStyles[oldIndex], leavingStyle, oldCurrentVelocities[oldIndex])) {
- didLeave({ key: oldMergedPropsStyle.key, data: oldMergedPropsStyle.data });
- return null;
- }
- return { key: oldMergedPropsStyle.key, data: oldMergedPropsStyle.data, style: leavingStyle };
- });
-
- var newCurrentStyles = [];
- var newCurrentVelocities = [];
- var newLastIdealStyles = [];
- var newLastIdealVelocities = [];
- for (var i = 0; i < newMergedPropsStyles.length; i++) {
- var newMergedPropsStyleCell = newMergedPropsStyles[i];
- var foundOldIndex = null;
- for (var j = 0; j < oldMergedPropsStyles.length; j++) {
- if (oldMergedPropsStyles[j].key === newMergedPropsStyleCell.key) {
- foundOldIndex = j;
- break;
- }
- }
- // TODO: key search code
- if (foundOldIndex == null) {
- var plainStyle = willEnter(newMergedPropsStyleCell);
- newCurrentStyles[i] = plainStyle;
- newLastIdealStyles[i] = plainStyle;
-
- var velocity = _mapToZero2['default'](newMergedPropsStyleCell.style);
- newCurrentVelocities[i] = velocity;
- newLastIdealVelocities[i] = velocity;
- } else {
- newCurrentStyles[i] = oldCurrentStyles[foundOldIndex];
- newLastIdealStyles[i] = oldLastIdealStyles[foundOldIndex];
- newCurrentVelocities[i] = oldCurrentVelocities[foundOldIndex];
- newLastIdealVelocities[i] = oldLastIdealVelocities[foundOldIndex];
- }
- }
-
- return [newMergedPropsStyles, newCurrentStyles, newCurrentVelocities, newLastIdealStyles, newLastIdealVelocities];
- }
-
- var TransitionMotion = (function (_React$Component) {
- _inherits(TransitionMotion, _React$Component);
-
- _createClass(TransitionMotion, null, [{
- key: 'propTypes',
- value: {
- defaultStyles: _propTypes2['default'].arrayOf(_propTypes2['default'].shape({
- key: _propTypes2['default'].string.isRequired,
- data: _propTypes2['default'].any,
- style: _propTypes2['default'].objectOf(_propTypes2['default'].number).isRequired
- })),
- styles: _propTypes2['default'].oneOfType([_propTypes2['default'].func, _propTypes2['default'].arrayOf(_propTypes2['default'].shape({
- key: _propTypes2['default'].string.isRequired,
- data: _propTypes2['default'].any,
- style: _propTypes2['default'].objectOf(_propTypes2['default'].oneOfType([_propTypes2['default'].number, _propTypes2['default'].object])).isRequired
- }))]).isRequired,
- children: _propTypes2['default'].func.isRequired,
- willEnter: _propTypes2['default'].func,
- willLeave: _propTypes2['default'].func,
- didLeave: _propTypes2['default'].func
- },
- enumerable: true
- }, {
- key: 'defaultProps',
- value: {
- willEnter: function willEnter(styleThatEntered) {
- return _stripStyle2['default'](styleThatEntered.style);
- },
- // recall: returning null makes the current unmounting TransitionStyle
- // disappear immediately
- willLeave: function willLeave() {
- return null;
- },
- didLeave: function didLeave() {}
- },
- enumerable: true
- }]);
-
- function TransitionMotion(props) {
- var _this = this;
-
- _classCallCheck(this, TransitionMotion);
-
- _React$Component.call(this, props);
- this.unmounting = false;
- this.animationID = null;
- this.prevTime = 0;
- this.accumulatedTime = 0;
- this.unreadPropStyles = null;
-
- this.clearUnreadPropStyle = function (unreadPropStyles) {
- var _mergeAndSync = mergeAndSync(_this.props.willEnter, _this.props.willLeave, _this.props.didLeave, _this.state.mergedPropsStyles, unreadPropStyles, _this.state.currentStyles, _this.state.currentVelocities, _this.state.lastIdealStyles, _this.state.lastIdealVelocities);
-
- var mergedPropsStyles = _mergeAndSync[0];
- var currentStyles = _mergeAndSync[1];
- var currentVelocities = _mergeAndSync[2];
- var lastIdealStyles = _mergeAndSync[3];
- var lastIdealVelocities = _mergeAndSync[4];
-
- for (var i = 0; i < unreadPropStyles.length; i++) {
- var unreadPropStyle = unreadPropStyles[i].style;
- var dirty = false;
-
- for (var key in unreadPropStyle) {
- if (!Object.prototype.hasOwnProperty.call(unreadPropStyle, key)) {
- continue;
- }
-
- var styleValue = unreadPropStyle[key];
- if (typeof styleValue === 'number') {
- if (!dirty) {
- dirty = true;
- currentStyles[i] = _extends({}, currentStyles[i]);
- currentVelocities[i] = _extends({}, currentVelocities[i]);
- lastIdealStyles[i] = _extends({}, lastIdealStyles[i]);
- lastIdealVelocities[i] = _extends({}, lastIdealVelocities[i]);
- mergedPropsStyles[i] = {
- key: mergedPropsStyles[i].key,
- data: mergedPropsStyles[i].data,
- style: _extends({}, mergedPropsStyles[i].style)
- };
- }
- currentStyles[i][key] = styleValue;
- currentVelocities[i][key] = 0;
- lastIdealStyles[i][key] = styleValue;
- lastIdealVelocities[i][key] = 0;
- mergedPropsStyles[i].style[key] = styleValue;
- }
- }
- }
-
- // unlike the other 2 components, we can't detect staleness and optionally
- // opt out of setState here. each style object's data might contain new
- // stuff we're not/cannot compare
- _this.setState({
- currentStyles: currentStyles,
- currentVelocities: currentVelocities,
- mergedPropsStyles: mergedPropsStyles,
- lastIdealStyles: lastIdealStyles,
- lastIdealVelocities: lastIdealVelocities
- });
- };
-
- this.startAnimationIfNecessary = function () {
- if (_this.unmounting) {
- return;
- }
-
- // TODO: when config is {a: 10} and dest is {a: 10} do we raf once and
- // call cb? No, otherwise accidental parent rerender causes cb trigger
- _this.animationID = _raf2['default'](function (timestamp) {
- // https://github.com/chenglou/react-motion/pull/420
- // > if execution passes the conditional if (this.unmounting), then
- // executes async defaultRaf and after that component unmounts and after
- // that the callback of defaultRaf is called, then setState will be called
- // on unmounted component.
- if (_this.unmounting) {
- return;
- }
-
- var propStyles = _this.props.styles;
- var destStyles = typeof propStyles === 'function' ? propStyles(rehydrateStyles(_this.state.mergedPropsStyles, _this.unreadPropStyles, _this.state.lastIdealStyles)) : propStyles;
-
- // check if we need to animate in the first place
- if (shouldStopAnimationAll(_this.state.currentStyles, destStyles, _this.state.currentVelocities, _this.state.mergedPropsStyles)) {
- // no need to cancel animationID here; shouldn't have any in flight
- _this.animationID = null;
- _this.accumulatedTime = 0;
- return;
- }
-
- var currentTime = timestamp || _performanceNow2['default']();
- var timeDelta = currentTime - _this.prevTime;
- _this.prevTime = currentTime;
- _this.accumulatedTime = _this.accumulatedTime + timeDelta;
- // more than 10 frames? prolly switched browser tab. Restart
- if (_this.accumulatedTime > msPerFrame * 10) {
- _this.accumulatedTime = 0;
- }
-
- if (_this.accumulatedTime === 0) {
- // no need to cancel animationID here; shouldn't have any in flight
- _this.animationID = null;
- _this.startAnimationIfNecessary();
- return;
- }
-
- var currentFrameCompletion = (_this.accumulatedTime - Math.floor(_this.accumulatedTime / msPerFrame) * msPerFrame) / msPerFrame;
- var framesToCatchUp = Math.floor(_this.accumulatedTime / msPerFrame);
-
- var _mergeAndSync2 = mergeAndSync(_this.props.willEnter, _this.props.willLeave, _this.props.didLeave, _this.state.mergedPropsStyles, destStyles, _this.state.currentStyles, _this.state.currentVelocities, _this.state.lastIdealStyles, _this.state.lastIdealVelocities);
-
- var newMergedPropsStyles = _mergeAndSync2[0];
- var newCurrentStyles = _mergeAndSync2[1];
- var newCurrentVelocities = _mergeAndSync2[2];
- var newLastIdealStyles = _mergeAndSync2[3];
- var newLastIdealVelocities = _mergeAndSync2[4];
-
- for (var i = 0; i < newMergedPropsStyles.length; i++) {
- var newMergedPropsStyle = newMergedPropsStyles[i].style;
- var newCurrentStyle = {};
- var newCurrentVelocity = {};
- var newLastIdealStyle = {};
- var newLastIdealVelocity = {};
-
- for (var key in newMergedPropsStyle) {
- if (!Object.prototype.hasOwnProperty.call(newMergedPropsStyle, key)) {
- continue;
- }
-
- var styleValue = newMergedPropsStyle[key];
- if (typeof styleValue === 'number') {
- newCurrentStyle[key] = styleValue;
- newCurrentVelocity[key] = 0;
- newLastIdealStyle[key] = styleValue;
- newLastIdealVelocity[key] = 0;
- } else {
- var newLastIdealStyleValue = newLastIdealStyles[i][key];
- var newLastIdealVelocityValue = newLastIdealVelocities[i][key];
- for (var j = 0; j < framesToCatchUp; j++) {
- var _stepper = _stepper4['default'](msPerFrame / 1000, newLastIdealStyleValue, newLastIdealVelocityValue, styleValue.val, styleValue.stiffness, styleValue.damping, styleValue.precision);
-
- newLastIdealStyleValue = _stepper[0];
- newLastIdealVelocityValue = _stepper[1];
- }
-
- var _stepper2 = _stepper4['default'](msPerFrame / 1000, newLastIdealStyleValue, newLastIdealVelocityValue, styleValue.val, styleValue.stiffness, styleValue.damping, styleValue.precision);
-
- var nextIdealX = _stepper2[0];
- var nextIdealV = _stepper2[1];
-
- newCurrentStyle[key] = newLastIdealStyleValue + (nextIdealX - newLastIdealStyleValue) * currentFrameCompletion;
- newCurrentVelocity[key] = newLastIdealVelocityValue + (nextIdealV - newLastIdealVelocityValue) * currentFrameCompletion;
- newLastIdealStyle[key] = newLastIdealStyleValue;
- newLastIdealVelocity[key] = newLastIdealVelocityValue;
- }
- }
-
- newLastIdealStyles[i] = newLastIdealStyle;
- newLastIdealVelocities[i] = newLastIdealVelocity;
- newCurrentStyles[i] = newCurrentStyle;
- newCurrentVelocities[i] = newCurrentVelocity;
- }
-
- _this.animationID = null;
- // the amount we're looped over above
- _this.accumulatedTime -= framesToCatchUp * msPerFrame;
-
- _this.setState({
- currentStyles: newCurrentStyles,
- currentVelocities: newCurrentVelocities,
- lastIdealStyles: newLastIdealStyles,
- lastIdealVelocities: newLastIdealVelocities,
- mergedPropsStyles: newMergedPropsStyles
- });
-
- _this.unreadPropStyles = null;
-
- _this.startAnimationIfNecessary();
- });
- };
-
- this.state = this.defaultState();
- }
-
- TransitionMotion.prototype.defaultState = function defaultState() {
- var _props = this.props;
- var defaultStyles = _props.defaultStyles;
- var styles = _props.styles;
- var willEnter = _props.willEnter;
- var willLeave = _props.willLeave;
- var didLeave = _props.didLeave;
-
- var destStyles = typeof styles === 'function' ? styles(defaultStyles) : styles;
-
- // this is special. for the first time around, we don't have a comparison
- // between last (no last) and current merged props. we'll compute last so:
- // say default is {a, b} and styles (dest style) is {b, c}, we'll
- // fabricate last as {a, b}
- var oldMergedPropsStyles = undefined;
- if (defaultStyles == null) {
- oldMergedPropsStyles = destStyles;
- } else {
- oldMergedPropsStyles = defaultStyles.map(function (defaultStyleCell) {
- // TODO: key search code
- for (var i = 0; i < destStyles.length; i++) {
- if (destStyles[i].key === defaultStyleCell.key) {
- return destStyles[i];
- }
- }
- return defaultStyleCell;
- });
- }
- var oldCurrentStyles = defaultStyles == null ? destStyles.map(function (s) {
- return _stripStyle2['default'](s.style);
- }) : defaultStyles.map(function (s) {
- return _stripStyle2['default'](s.style);
- });
- var oldCurrentVelocities = defaultStyles == null ? destStyles.map(function (s) {
- return _mapToZero2['default'](s.style);
- }) : defaultStyles.map(function (s) {
- return _mapToZero2['default'](s.style);
- });
-
- var _mergeAndSync3 = mergeAndSync(
- // Because this is an old-style createReactClass component, Flow doesn't
- // understand that the willEnter and willLeave props have default values
- // and will always be present.
- willEnter, willLeave, didLeave, oldMergedPropsStyles, destStyles, oldCurrentStyles, oldCurrentVelocities, oldCurrentStyles, // oldLastIdealStyles really
- oldCurrentVelocities);
-
- var mergedPropsStyles = _mergeAndSync3[0];
- var currentStyles = _mergeAndSync3[1];
- var currentVelocities = _mergeAndSync3[2];
- var lastIdealStyles = _mergeAndSync3[3];
- var lastIdealVelocities = _mergeAndSync3[4];
- // oldLastIdealVelocities really
-
- return {
- currentStyles: currentStyles,
- currentVelocities: currentVelocities,
- lastIdealStyles: lastIdealStyles,
- lastIdealVelocities: lastIdealVelocities,
- mergedPropsStyles: mergedPropsStyles
- };
- };
-
- // after checking for unreadPropStyles != null, we manually go set the
- // non-interpolating values (those that are a number, without a spring
- // config)
-
- TransitionMotion.prototype.componentDidMount = function componentDidMount() {
- this.prevTime = _performanceNow2['default']();
- this.startAnimationIfNecessary();
- };
-
- TransitionMotion.prototype.componentWillReceiveProps = function componentWillReceiveProps(props) {
- if (this.unreadPropStyles) {
- // previous props haven't had the chance to be set yet; set them here
- this.clearUnreadPropStyle(this.unreadPropStyles);
- }
-
- var styles = props.styles;
- if (typeof styles === 'function') {
- this.unreadPropStyles = styles(rehydrateStyles(this.state.mergedPropsStyles, this.unreadPropStyles, this.state.lastIdealStyles));
- } else {
- this.unreadPropStyles = styles;
- }
-
- if (this.animationID == null) {
- this.prevTime = _performanceNow2['default']();
- this.startAnimationIfNecessary();
- }
- };
-
- TransitionMotion.prototype.componentWillUnmount = function componentWillUnmount() {
- this.unmounting = true;
- if (this.animationID != null) {
- _raf2['default'].cancel(this.animationID);
- this.animationID = null;
- }
- };
-
- TransitionMotion.prototype.render = function render() {
- var hydratedStyles = rehydrateStyles(this.state.mergedPropsStyles, this.unreadPropStyles, this.state.currentStyles);
- var renderedChildren = this.props.children(hydratedStyles);
- return renderedChildren && _react2['default'].Children.only(renderedChildren);
- };
-
- return TransitionMotion;
- })(_react2['default'].Component);
-
- exports['default'] = TransitionMotion;
- module.exports = exports['default'];
-
- // list of styles, each containing interpolating values. Part of what's passed
- // to children function. Notice that this is
- // Array, without the wrapper that is {key: ...,
- // data: ... style: ActualInterpolatingStyleObject}. Only mergedPropsStyles
- // contains the key & data info (so that we only have a single source of truth
- // for these, and to save space). Check the comment for `rehydrateStyles` to
- // see how we regenerate the entirety of what's passed to children function
-
- // the array that keeps track of currently rendered stuff! Including stuff
- // that you've unmounted but that's still animating. This is where it lives
-
- // it's possible that currentStyle's value is stale: if props is immediately
- // changed from 0 to 400 to spring(0) again, the async currentStyle is still
- // at 0 (didn't have time to tick and interpolate even once). If we naively
- // compare currentStyle with destVal it'll be 0 === 0 (no animation, stop).
- // In reality currentStyle should be 400
-
-/***/ }),
-/* 244 */
-/***/ (function(module, exports) {
-
-
-
- // core keys merging algorithm. If previous render's keys are [a, b], and the
- // next render's [c, b, d], what's the final merged keys and ordering?
-
- // - c and a must both be before b
- // - b before d
- // - ordering between a and c ambiguous
-
- // this reduces to merging two partially ordered lists (e.g. lists where not
- // every item has a definite ordering, like comparing a and c above). For the
- // ambiguous ordering we deterministically choose to place the next render's
- // item after the previous'; so c after a
-
- // this is called a topological sorting. Except the existing algorithms don't
- // work well with js bc of the amount of allocation, and isn't optimized for our
- // current use-case bc the runtime is linear in terms of edges (see wiki for
- // meaning), which is huge when two lists have many common elements
- 'use strict';
-
- exports.__esModule = true;
- exports['default'] = mergeDiff;
-
- function mergeDiff(prev, next, onRemove) {
- // bookkeeping for easier access of a key's index below. This is 2 allocations +
- // potentially triggering chrome hash map mode for objs (so it might be faster
-
- var prevKeyIndex = {};
- for (var i = 0; i < prev.length; i++) {
- prevKeyIndex[prev[i].key] = i;
- }
- var nextKeyIndex = {};
- for (var i = 0; i < next.length; i++) {
- nextKeyIndex[next[i].key] = i;
- }
-
- // first, an overly elaborate way of merging prev and next, eliminating
- // duplicates (in terms of keys). If there's dupe, keep the item in next).
- // This way of writing it saves allocations
- var ret = [];
- for (var i = 0; i < next.length; i++) {
- ret[i] = next[i];
- }
- for (var i = 0; i < prev.length; i++) {
- if (!Object.prototype.hasOwnProperty.call(nextKeyIndex, prev[i].key)) {
- // this is called my TM's `mergeAndSync`, which calls willLeave. We don't
- // merge in keys that the user desires to kill
- var fill = onRemove(i, prev[i]);
- if (fill != null) {
- ret.push(fill);
- }
- }
- }
-
- // now all the items all present. Core sorting logic to have the right order
- return ret.sort(function (a, b) {
- var nextOrderA = nextKeyIndex[a.key];
- var nextOrderB = nextKeyIndex[b.key];
- var prevOrderA = prevKeyIndex[a.key];
- var prevOrderB = prevKeyIndex[b.key];
-
- if (nextOrderA != null && nextOrderB != null) {
- // both keys in next
- return nextKeyIndex[a.key] - nextKeyIndex[b.key];
- } else if (prevOrderA != null && prevOrderB != null) {
- // both keys in prev
- return prevKeyIndex[a.key] - prevKeyIndex[b.key];
- } else if (nextOrderA != null) {
- // key a in next, key b in prev
-
- // how to determine the order between a and b? We find a "pivot" (term
- // abuse), a key present in both prev and next, that is sandwiched between
- // a and b. In the context of our above example, if we're comparing a and
- // d, b's (the only) pivot
- for (var i = 0; i < next.length; i++) {
- var pivot = next[i].key;
- if (!Object.prototype.hasOwnProperty.call(prevKeyIndex, pivot)) {
- continue;
- }
-
- if (nextOrderA < nextKeyIndex[pivot] && prevOrderB > prevKeyIndex[pivot]) {
- return -1;
- } else if (nextOrderA > nextKeyIndex[pivot] && prevOrderB < prevKeyIndex[pivot]) {
- return 1;
- }
- }
- // pluggable. default to: next bigger than prev
- return 1;
- }
- // prevOrderA, nextOrderB
- for (var i = 0; i < next.length; i++) {
- var pivot = next[i].key;
- if (!Object.prototype.hasOwnProperty.call(prevKeyIndex, pivot)) {
- continue;
- }
- if (nextOrderB < nextKeyIndex[pivot] && prevOrderA > prevKeyIndex[pivot]) {
- return 1;
- } else if (nextOrderB > nextKeyIndex[pivot] && prevOrderA < prevKeyIndex[pivot]) {
- return -1;
- }
- }
- // pluggable. default to: next bigger than prev
- return -1;
- });
- }
-
- module.exports = exports['default'];
- // to loop through and find a key's index each time), but I no longer care
-
-/***/ }),
-/* 245 */
-/***/ (function(module, exports, __webpack_require__) {
-
- 'use strict';
-
- exports.__esModule = true;
-
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
- exports['default'] = spring;
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
-
- var _presets = __webpack_require__(246);
-
- var _presets2 = _interopRequireDefault(_presets);
-
- var defaultConfig = _extends({}, _presets2['default'].noWobble, {
- precision: 0.01
- });
-
- function spring(val, config) {
- return _extends({}, defaultConfig, config, { val: val });
- }
-
- module.exports = exports['default'];
-
-/***/ }),
-/* 246 */
-/***/ (function(module, exports) {
-
- "use strict";
-
- exports.__esModule = true;
- exports["default"] = {
- noWobble: { stiffness: 170, damping: 26 }, // the default, if nothing provided
- gentle: { stiffness: 120, damping: 14 },
- wobbly: { stiffness: 180, damping: 12 },
- stiff: { stiffness: 210, damping: 20 }
- };
- module.exports = exports["default"];
-
-/***/ }),
-/* 247 */
-/***/ (function(module, exports, __webpack_require__) {
-
- /* WEBPACK VAR INJECTION */(function(process) {'use strict';
-
- exports.__esModule = true;
- exports['default'] = reorderKeys;
-
- var hasWarned = false;
-
- function reorderKeys() {
- if (process.env.NODE_ENV === 'development') {
- if (!hasWarned) {
- hasWarned = true;
- console.error('`reorderKeys` has been removed, since it is no longer needed for TransitionMotion\'s new styles array API.');
- }
- }
- }
-
- module.exports = exports['default'];
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(33)))
-
-/***/ }),
-/* 248 */
-/***/ (function(module, exports, __webpack_require__) {
-
- (function (global, factory) {
- true ? module.exports = factory(__webpack_require__(2), __webpack_require__(1)) :
- typeof define === 'function' && define.amd ? define(['react-dom', 'react'], factory) :
- (global.ReactDraggable = factory(global.ReactDOM,global.React));
- }(this, (function (ReactDOM,React) { 'use strict';
-
- ReactDOM = ReactDOM && ReactDOM.hasOwnProperty('default') ? ReactDOM['default'] : ReactDOM;
- React = React && React.hasOwnProperty('default') ? React['default'] : React;
-
- function createCommonjsModule(fn, module) {
- return module = { exports: {} }, fn(module, module.exports), module.exports;
- }
-
- /**
- * Copyright (c) 2013-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- *
- *
- */
-
- function makeEmptyFunction(arg) {
- return function () {
- return arg;
- };
- }
-
- /**
- * This function accepts and discards inputs; it has no side effects. This is
- * primarily useful idiomatically for overridable function endpoints which
- * always need to be callable, since JS lacks a null-call idiom ala Cocoa.
- */
- var emptyFunction = function emptyFunction() {};
-
- emptyFunction.thatReturns = makeEmptyFunction;
- emptyFunction.thatReturnsFalse = makeEmptyFunction(false);
- emptyFunction.thatReturnsTrue = makeEmptyFunction(true);
- emptyFunction.thatReturnsNull = makeEmptyFunction(null);
- emptyFunction.thatReturnsThis = function () {
- return this;
- };
- emptyFunction.thatReturnsArgument = function (arg) {
- return arg;
- };
-
- var emptyFunction_1 = emptyFunction;
-
- /**
- * Copyright (c) 2013-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- *
- */
-
- /**
- * Use invariant() to assert state which your program assumes to be true.
- *
- * Provide sprintf-style format (only %s is supported) and arguments
- * to provide information about what broke and what you were
- * expecting.
- *
- * The invariant message will be stripped in production, but the invariant
- * will remain to ensure logic does not differ in production.
- */
-
- var validateFormat = function validateFormat(format) {};
-
- {
- validateFormat = function validateFormat(format) {
- if (format === undefined) {
- throw new Error('invariant requires an error message argument');
- }
- };
- }
-
- function invariant(condition, format, a, b, c, d, e, f) {
- validateFormat(format);
-
- if (!condition) {
- var error;
- if (format === undefined) {
- error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
- } else {
- var args = [a, b, c, d, e, f];
- var argIndex = 0;
- error = new Error(format.replace(/%s/g, function () {
- return args[argIndex++];
- }));
- error.name = 'Invariant Violation';
- }
-
- error.framesToPop = 1; // we don't care about invariant's own frame
- throw error;
- }
- }
-
- var invariant_1 = invariant;
-
- /**
- * Similar to invariant but only logs a warning if the condition is not met.
- * This can be used to log issues in development environments in critical
- * paths. Removing the logging code for production environments will keep the
- * same logic and follow the same code paths.
- */
-
- var warning = emptyFunction_1;
-
- {
- var printWarning = function printWarning(format) {
- for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
- args[_key - 1] = arguments[_key];
- }
-
- var argIndex = 0;
- var message = 'Warning: ' + format.replace(/%s/g, function () {
- return args[argIndex++];
- });
- if (typeof console !== 'undefined') {
- console.error(message);
- }
- try {
- // --- Welcome to debugging React ---
- // This error was thrown as a convenience so that you can use this stack
- // to find the callsite that caused this warning to fire.
- throw new Error(message);
- } catch (x) {}
- };
-
- warning = function warning(condition, format) {
- if (format === undefined) {
- throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument');
- }
-
- if (format.indexOf('Failed Composite propType: ') === 0) {
- return; // Ignore CompositeComponent proptype check.
- }
-
- if (!condition) {
- for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
- args[_key2 - 2] = arguments[_key2];
- }
-
- printWarning.apply(undefined, [format].concat(args));
- }
- };
- }
-
- var warning_1 = warning;
-
- /*
- object-assign
- (c) Sindre Sorhus
- @license MIT
- */
- /* eslint-disable no-unused-vars */
- var getOwnPropertySymbols = Object.getOwnPropertySymbols;
- var hasOwnProperty = Object.prototype.hasOwnProperty;
- var propIsEnumerable = Object.prototype.propertyIsEnumerable;
-
- function toObject(val) {
- if (val === null || val === undefined) {
- throw new TypeError('Object.assign cannot be called with null or undefined');
- }
-
- return Object(val);
- }
-
- function shouldUseNative() {
- try {
- if (!Object.assign) {
- return false;
- }
-
- // Detect buggy property enumeration order in older V8 versions.
-
- // https://bugs.chromium.org/p/v8/issues/detail?id=4118
- var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
- test1[5] = 'de';
- if (Object.getOwnPropertyNames(test1)[0] === '5') {
- return false;
- }
-
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
- var test2 = {};
- for (var i = 0; i < 10; i++) {
- test2['_' + String.fromCharCode(i)] = i;
- }
- var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
- return test2[n];
- });
- if (order2.join('') !== '0123456789') {
- return false;
- }
-
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
- var test3 = {};
- 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
- test3[letter] = letter;
- });
- if (Object.keys(Object.assign({}, test3)).join('') !==
- 'abcdefghijklmnopqrst') {
- return false;
- }
-
- return true;
- } catch (err) {
- // We don't expect any of the above to throw, but better to be safe.
- return false;
- }
- }
-
- var objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
- var from;
- var to = toObject(target);
- var symbols;
-
- for (var s = 1; s < arguments.length; s++) {
- from = Object(arguments[s]);
-
- for (var key in from) {
- if (hasOwnProperty.call(from, key)) {
- to[key] = from[key];
- }
- }
-
- if (getOwnPropertySymbols) {
- symbols = getOwnPropertySymbols(from);
- for (var i = 0; i < symbols.length; i++) {
- if (propIsEnumerable.call(from, symbols[i])) {
- to[symbols[i]] = from[symbols[i]];
- }
- }
- }
- }
-
- return to;
- };
-
- /**
- * Copyright (c) 2013-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
- var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
-
- var ReactPropTypesSecret_1 = ReactPropTypesSecret;
-
- {
- var invariant$1 = invariant_1;
- var warning$1 = warning_1;
- var ReactPropTypesSecret$1 = ReactPropTypesSecret_1;
- var loggedTypeFailures = {};
- }
-
- /**
- * Assert that the values match with the type specs.
- * Error messages are memorized and will only be shown once.
- *
- * @param {object} typeSpecs Map of name to a ReactPropType
- * @param {object} values Runtime values that need to be type-checked
- * @param {string} location e.g. "prop", "context", "child context"
- * @param {string} componentName Name of the component for error messages.
- * @param {?Function} getStack Returns the component stack.
- * @private
- */
- function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
- {
- for (var typeSpecName in typeSpecs) {
- if (typeSpecs.hasOwnProperty(typeSpecName)) {
- var error;
- // Prop type validation may throw. In case they do, we don't want to
- // fail the render phase where it didn't fail before. So we log it.
- // After these have been cleaned up, we'll let them throw.
- try {
- // This is intentionally an invariant that gets caught. It's the same
- // behavior as without this statement except with a better message.
- invariant$1(typeof typeSpecs[typeSpecName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'the `prop-types` package, but received `%s`.', componentName || 'React class', location, typeSpecName, typeof typeSpecs[typeSpecName]);
- error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret$1);
- } catch (ex) {
- error = ex;
- }
- warning$1(!error || error instanceof Error, '%s: type specification of %s `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error);
- if (error instanceof Error && !(error.message in loggedTypeFailures)) {
- // Only monitor this failure once because there tends to be a lot of the
- // same error.
- loggedTypeFailures[error.message] = true;
-
- var stack = getStack ? getStack() : '';
-
- warning$1(false, 'Failed %s type: %s%s', location, error.message, stack != null ? stack : '');
- }
- }
- }
- }
- }
-
- var checkPropTypes_1 = checkPropTypes;
-
- var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
- /* global Symbol */
- var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
- var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
-
- /**
- * Returns the iterator method function contained on the iterable object.
- *
- * Be sure to invoke the function with the iterable as context:
- *
- * var iteratorFn = getIteratorFn(myIterable);
- * if (iteratorFn) {
- * var iterator = iteratorFn.call(myIterable);
- * ...
- * }
- *
- * @param {?object} maybeIterable
- * @return {?function}
- */
- function getIteratorFn(maybeIterable) {
- var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
- if (typeof iteratorFn === 'function') {
- return iteratorFn;
- }
- }
-
- /**
- * Collection of methods that allow declaration and validation of props that are
- * supplied to React components. Example usage:
- *
- * var Props = require('ReactPropTypes');
- * var MyArticle = React.createClass({
- * propTypes: {
- * // An optional string prop named "description".
- * description: Props.string,
- *
- * // A required enum prop named "category".
- * category: Props.oneOf(['News','Photos']).isRequired,
- *
- * // A prop named "dialog" that requires an instance of Dialog.
- * dialog: Props.instanceOf(Dialog).isRequired
- * },
- * render: function() { ... }
- * });
- *
- * A more formal specification of how these methods are used:
- *
- * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
- * decl := ReactPropTypes.{type}(.isRequired)?
- *
- * Each and every declaration produces a function with the same signature. This
- * allows the creation of custom validation functions. For example:
- *
- * var MyLink = React.createClass({
- * propTypes: {
- * // An optional string or URI prop named "href".
- * href: function(props, propName, componentName) {
- * var propValue = props[propName];
- * if (propValue != null && typeof propValue !== 'string' &&
- * !(propValue instanceof URI)) {
- * return new Error(
- * 'Expected a string or an URI for ' + propName + ' in ' +
- * componentName
- * );
- * }
- * }
- * },
- * render: function() {...}
- * });
- *
- * @internal
- */
-
- var ANONYMOUS = '<>';
-
- // Important!
- // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
- var ReactPropTypes = {
- array: createPrimitiveTypeChecker('array'),
- bool: createPrimitiveTypeChecker('boolean'),
- func: createPrimitiveTypeChecker('function'),
- number: createPrimitiveTypeChecker('number'),
- object: createPrimitiveTypeChecker('object'),
- string: createPrimitiveTypeChecker('string'),
- symbol: createPrimitiveTypeChecker('symbol'),
-
- any: createAnyTypeChecker(),
- arrayOf: createArrayOfTypeChecker,
- element: createElementTypeChecker(),
- instanceOf: createInstanceTypeChecker,
- node: createNodeChecker(),
- objectOf: createObjectOfTypeChecker,
- oneOf: createEnumTypeChecker,
- oneOfType: createUnionTypeChecker,
- shape: createShapeTypeChecker,
- exact: createStrictShapeTypeChecker,
- };
-
- /**
- * inlined Object.is polyfill to avoid requiring consumers ship their own
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
- */
- /*eslint-disable no-self-compare*/
- function is(x, y) {
- // SameValue algorithm
- if (x === y) {
- // Steps 1-5, 7-10
- // Steps 6.b-6.e: +0 != -0
- return x !== 0 || 1 / x === 1 / y;
- } else {
- // Step 6.a: NaN == NaN
- return x !== x && y !== y;
- }
- }
- /*eslint-enable no-self-compare*/
-
- /**
- * We use an Error-like object for backward compatibility as people may call
- * PropTypes directly and inspect their output. However, we don't use real
- * Errors anymore. We don't inspect their stack anyway, and creating them
- * is prohibitively expensive if they are created too often, such as what
- * happens in oneOfType() for any type before the one that matched.
- */
- function PropTypeError(message) {
- this.message = message;
- this.stack = '';
- }
- // Make `instanceof Error` still work for returned errors.
- PropTypeError.prototype = Error.prototype;
-
- function createChainableTypeChecker(validate) {
- {
- var manualPropTypeCallCache = {};
- var manualPropTypeWarningCount = 0;
- }
- function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
- componentName = componentName || ANONYMOUS;
- propFullName = propFullName || propName;
-
- if (secret !== ReactPropTypesSecret_1) {
- if (throwOnDirectAccess) {
- // New behavior only for users of `prop-types` package
- invariant_1(
- false,
- 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
- 'Use `PropTypes.checkPropTypes()` to call them. ' +
- 'Read more at http://fb.me/use-check-prop-types'
- );
- } else if ("development" !== 'production' && typeof console !== 'undefined') {
- // Old behavior for people using React.PropTypes
- var cacheKey = componentName + ':' + propName;
- if (
- !manualPropTypeCallCache[cacheKey] &&
- // Avoid spamming the console because they are often not actionable except for lib authors
- manualPropTypeWarningCount < 3
- ) {
- warning_1(
- false,
- 'You are manually calling a React.PropTypes validation ' +
- 'function for the `%s` prop on `%s`. This is deprecated ' +
- 'and will throw in the standalone `prop-types` package. ' +
- 'You may be seeing this warning due to a third-party PropTypes ' +
- 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.',
- propFullName,
- componentName
- );
- manualPropTypeCallCache[cacheKey] = true;
- manualPropTypeWarningCount++;
- }
- }
- }
- if (props[propName] == null) {
- if (isRequired) {
- if (props[propName] === null) {
- return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
- }
- return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
- }
- return null;
- } else {
- return validate(props, propName, componentName, location, propFullName);
- }
- }
-
- var chainedCheckType = checkType.bind(null, false);
- chainedCheckType.isRequired = checkType.bind(null, true);
-
- return chainedCheckType;
- }
-
- function createPrimitiveTypeChecker(expectedType) {
- function validate(props, propName, componentName, location, propFullName, secret) {
- var propValue = props[propName];
- var propType = getPropType(propValue);
- if (propType !== expectedType) {
- // `propValue` being instance of, say, date/regexp, pass the 'object'
- // check, but we can offer a more precise error message here rather than
- // 'of type `object`'.
- var preciseType = getPreciseType(propValue);
-
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));
- }
- return null;
- }
- return createChainableTypeChecker(validate);
- }
-
- function createAnyTypeChecker() {
- return createChainableTypeChecker(emptyFunction_1.thatReturnsNull);
- }
-
- function createArrayOfTypeChecker(typeChecker) {
- function validate(props, propName, componentName, location, propFullName) {
- if (typeof typeChecker !== 'function') {
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
- }
- var propValue = props[propName];
- if (!Array.isArray(propValue)) {
- var propType = getPropType(propValue);
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
- }
- for (var i = 0; i < propValue.length; i++) {
- var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret_1);
- if (error instanceof Error) {
- return error;
- }
- }
- return null;
- }
- return createChainableTypeChecker(validate);
- }
-
- function createElementTypeChecker() {
- function validate(props, propName, componentName, location, propFullName) {
- var propValue = props[propName];
- if (!isValidElement(propValue)) {
- var propType = getPropType(propValue);
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
- }
- return null;
- }
- return createChainableTypeChecker(validate);
- }
-
- function createInstanceTypeChecker(expectedClass) {
- function validate(props, propName, componentName, location, propFullName) {
- if (!(props[propName] instanceof expectedClass)) {
- var expectedClassName = expectedClass.name || ANONYMOUS;
- var actualClassName = getClassName(props[propName]);
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
- }
- return null;
- }
- return createChainableTypeChecker(validate);
- }
-
- function createEnumTypeChecker(expectedValues) {
- if (!Array.isArray(expectedValues)) {
- warning_1(false, 'Invalid argument supplied to oneOf, expected an instance of array.');
- return emptyFunction_1.thatReturnsNull;
- }
-
- function validate(props, propName, componentName, location, propFullName) {
- var propValue = props[propName];
- for (var i = 0; i < expectedValues.length; i++) {
- if (is(propValue, expectedValues[i])) {
- return null;
- }
- }
-
- var valuesString = JSON.stringify(expectedValues);
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
- }
- return createChainableTypeChecker(validate);
- }
-
- function createObjectOfTypeChecker(typeChecker) {
- function validate(props, propName, componentName, location, propFullName) {
- if (typeof typeChecker !== 'function') {
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
- }
- var propValue = props[propName];
- var propType = getPropType(propValue);
- if (propType !== 'object') {
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
- }
- for (var key in propValue) {
- if (propValue.hasOwnProperty(key)) {
- var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
- if (error instanceof Error) {
- return error;
- }
- }
- }
- return null;
- }
- return createChainableTypeChecker(validate);
- }
-
- function createUnionTypeChecker(arrayOfTypeCheckers) {
- if (!Array.isArray(arrayOfTypeCheckers)) {
- warning_1(false, 'Invalid argument supplied to oneOfType, expected an instance of array.');
- return emptyFunction_1.thatReturnsNull;
- }
-
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
- var checker = arrayOfTypeCheckers[i];
- if (typeof checker !== 'function') {
- warning_1(
- false,
- 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
- 'received %s at index %s.',
- getPostfixForTypeWarning(checker),
- i
- );
- return emptyFunction_1.thatReturnsNull;
- }
- }
-
- function validate(props, propName, componentName, location, propFullName) {
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
- var checker = arrayOfTypeCheckers[i];
- if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret_1) == null) {
- return null;
- }
- }
-
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));
- }
- return createChainableTypeChecker(validate);
- }
-
- function createNodeChecker() {
- function validate(props, propName, componentName, location, propFullName) {
- if (!isNode(props[propName])) {
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
- }
- return null;
- }
- return createChainableTypeChecker(validate);
- }
-
- function createShapeTypeChecker(shapeTypes) {
- function validate(props, propName, componentName, location, propFullName) {
- var propValue = props[propName];
- var propType = getPropType(propValue);
- if (propType !== 'object') {
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
- }
- for (var key in shapeTypes) {
- var checker = shapeTypes[key];
- if (!checker) {
- continue;
- }
- var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
- if (error) {
- return error;
- }
- }
- return null;
- }
- return createChainableTypeChecker(validate);
- }
-
- function createStrictShapeTypeChecker(shapeTypes) {
- function validate(props, propName, componentName, location, propFullName) {
- var propValue = props[propName];
- var propType = getPropType(propValue);
- if (propType !== 'object') {
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
- }
- // We need to check all keys in case some are required but missing from
- // props.
- var allKeys = objectAssign({}, props[propName], shapeTypes);
- for (var key in allKeys) {
- var checker = shapeTypes[key];
- if (!checker) {
- return new PropTypeError(
- 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
- '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
- '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
- );
- }
- var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
- if (error) {
- return error;
- }
- }
- return null;
- }
-
- return createChainableTypeChecker(validate);
- }
-
- function isNode(propValue) {
- switch (typeof propValue) {
- case 'number':
- case 'string':
- case 'undefined':
- return true;
- case 'boolean':
- return !propValue;
- case 'object':
- if (Array.isArray(propValue)) {
- return propValue.every(isNode);
- }
- if (propValue === null || isValidElement(propValue)) {
- return true;
- }
-
- var iteratorFn = getIteratorFn(propValue);
- if (iteratorFn) {
- var iterator = iteratorFn.call(propValue);
- var step;
- if (iteratorFn !== propValue.entries) {
- while (!(step = iterator.next()).done) {
- if (!isNode(step.value)) {
- return false;
- }
- }
- } else {
- // Iterator will provide entry [k,v] tuples rather than values.
- while (!(step = iterator.next()).done) {
- var entry = step.value;
- if (entry) {
- if (!isNode(entry[1])) {
- return false;
- }
- }
- }
- }
- } else {
- return false;
- }
-
- return true;
- default:
- return false;
- }
- }
-
- function isSymbol(propType, propValue) {
- // Native Symbol.
- if (propType === 'symbol') {
- return true;
- }
-
- // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
- if (propValue['@@toStringTag'] === 'Symbol') {
- return true;
- }
-
- // Fallback for non-spec compliant Symbols which are polyfilled.
- if (typeof Symbol === 'function' && propValue instanceof Symbol) {
- return true;
- }
-
- return false;
- }
-
- // Equivalent of `typeof` but with special handling for array and regexp.
- function getPropType(propValue) {
- var propType = typeof propValue;
- if (Array.isArray(propValue)) {
- return 'array';
- }
- if (propValue instanceof RegExp) {
- // Old webkits (at least until Android 4.0) return 'function' rather than
- // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
- // passes PropTypes.object.
- return 'object';
- }
- if (isSymbol(propType, propValue)) {
- return 'symbol';
- }
- return propType;
- }
-
- // This handles more types than `getPropType`. Only used for error messages.
- // See `createPrimitiveTypeChecker`.
- function getPreciseType(propValue) {
- if (typeof propValue === 'undefined' || propValue === null) {
- return '' + propValue;
- }
- var propType = getPropType(propValue);
- if (propType === 'object') {
- if (propValue instanceof Date) {
- return 'date';
- } else if (propValue instanceof RegExp) {
- return 'regexp';
- }
- }
- return propType;
- }
-
- // Returns a string that is postfixed to a warning about an invalid type.
- // For example, "undefined" or "of type array"
- function getPostfixForTypeWarning(value) {
- var type = getPreciseType(value);
- switch (type) {
- case 'array':
- case 'object':
- return 'an ' + type;
- case 'boolean':
- case 'date':
- case 'regexp':
- return 'a ' + type;
- default:
- return type;
- }
- }
-
- // Returns class name of the object, if any.
- function getClassName(propValue) {
- if (!propValue.constructor || !propValue.constructor.name) {
- return ANONYMOUS;
- }
- return propValue.constructor.name;
- }
-
- ReactPropTypes.checkPropTypes = checkPropTypes_1;
- ReactPropTypes.PropTypes = ReactPropTypes;
-
- return ReactPropTypes;
- };
-
- var propTypes = createCommonjsModule(function (module) {
- /**
- * Copyright (c) 2013-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
- {
- var REACT_ELEMENT_TYPE = (typeof Symbol === 'function' &&
- Symbol.for &&
- Symbol.for('react.element')) ||
- 0xeac7;
-
- var isValidElement = function(object) {
- return typeof object === 'object' &&
- object !== null &&
- object.$$typeof === REACT_ELEMENT_TYPE;
- };
-
- // By explicitly using `prop-types` you are opting into new development behavior.
- // http://fb.me/prop-types-in-prod
- var throwOnDirectAccess = true;
- module.exports = factoryWithTypeCheckers(isValidElement, throwOnDirectAccess);
- }
- });
-
- var classnames = createCommonjsModule(function (module) {
- /*!
- Copyright (c) 2016 Jed Watson.
- Licensed under the MIT License (MIT), see
- http://jedwatson.github.io/classnames
- */
- /* global define */
-
- (function () {
-
- var hasOwn = {}.hasOwnProperty;
-
- function classNames () {
- var classes = [];
-
- for (var i = 0; i < arguments.length; i++) {
- var arg = arguments[i];
- if (!arg) continue;
-
- var argType = typeof arg;
-
- if (argType === 'string' || argType === 'number') {
- classes.push(arg);
- } else if (Array.isArray(arg)) {
- classes.push(classNames.apply(null, arg));
- } else if (argType === 'object') {
- for (var key in arg) {
- if (hasOwn.call(arg, key) && arg[key]) {
- classes.push(key);
- }
- }
- }
- }
-
- return classes.join(' ');
- }
-
- if ('object' !== 'undefined' && module.exports) {
- module.exports = classNames;
- } else if (false) {
- // register as 'classnames', consistent with npm package name
- undefined('classnames', [], function () {
- return classNames;
- });
- } else {
- window.classNames = classNames;
- }
- }());
- });
-
- // @credits https://gist.github.com/rogozhnikoff/a43cfed27c41e4e68cdc
- function findInArray(array /*: Array | TouchList*/, callback /*: Function*/) /*: any*/ {
- for (var i = 0, length = array.length; i < length; i++) {
- if (callback.apply(callback, [array[i], i, array])) return array[i];
- }
- }
-
- function isFunction(func /*: any*/) /*: boolean*/ {
- return typeof func === 'function' || Object.prototype.toString.call(func) === '[object Function]';
- }
-
- function isNum(num /*: any*/) /*: boolean*/ {
- return typeof num === 'number' && !isNaN(num);
- }
-
- function int(a /*: string*/) /*: number*/ {
- return parseInt(a, 10);
- }
-
- function dontSetMe(props /*: Object*/, propName /*: string*/, componentName /*: string*/) {
- if (props[propName]) {
- return new Error('Invalid prop ' + propName + ' passed to ' + componentName + ' - do not set this, set it on the child.');
- }
- }
-
- var prefixes = ['Moz', 'Webkit', 'O', 'ms'];
- function getPrefix() /*: string*/ {
- var prop /*: string*/ = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'transform';
-
- // Checking specifically for 'window.document' is for pseudo-browser server-side
- // environments that define 'window' as the global context.
- // E.g. React-rails (see https://github.com/reactjs/react-rails/pull/84)
- if (typeof window === 'undefined' || typeof window.document === 'undefined') return '';
-
- var style = window.document.documentElement.style;
-
- if (prop in style) return '';
-
- for (var i = 0; i < prefixes.length; i++) {
- if (browserPrefixToKey(prop, prefixes[i]) in style) return prefixes[i];
- }
-
- return '';
- }
-
- function browserPrefixToKey(prop /*: string*/, prefix /*: string*/) /*: string*/ {
- return prefix ? '' + prefix + kebabToTitleCase(prop) : prop;
- }
-
- function kebabToTitleCase(str /*: string*/) /*: string*/ {
- var out = '';
- var shouldCapitalize = true;
- for (var i = 0; i < str.length; i++) {
- if (shouldCapitalize) {
- out += str[i].toUpperCase();
- shouldCapitalize = false;
- } else if (str[i] === '-') {
- shouldCapitalize = true;
- } else {
- out += str[i];
- }
- }
- return out;
- }
-
- // Default export is the prefix itself, like 'Moz', 'Webkit', etc
- // Note that you may have to re-test for certain things; for instance, Chrome 50
- // can handle unprefixed `transform`, but not unprefixed `user-select`
- var browserPrefix = getPrefix();
-
- var classCallCheck = function (instance, Constructor) {
- if (!(instance instanceof Constructor)) {
- throw new TypeError("Cannot call a class as a function");
- }
- };
-
- var createClass = function () {
- function defineProperties(target, props) {
- for (var i = 0; i < props.length; i++) {
- var descriptor = props[i];
- descriptor.enumerable = descriptor.enumerable || false;
- descriptor.configurable = true;
- if ("value" in descriptor) descriptor.writable = true;
- Object.defineProperty(target, descriptor.key, descriptor);
- }
- }
-
- return function (Constructor, protoProps, staticProps) {
- if (protoProps) defineProperties(Constructor.prototype, protoProps);
- if (staticProps) defineProperties(Constructor, staticProps);
- return Constructor;
- };
- }();
-
- var defineProperty = function (obj, key, value) {
- if (key in obj) {
- Object.defineProperty(obj, key, {
- value: value,
- enumerable: true,
- configurable: true,
- writable: true
- });
- } else {
- obj[key] = value;
- }
-
- return obj;
- };
-
- var _extends = Object.assign || function (target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
-
- for (var key in source) {
- if (Object.prototype.hasOwnProperty.call(source, key)) {
- target[key] = source[key];
- }
- }
- }
-
- return target;
- };
-
- var inherits = function (subClass, superClass) {
- if (typeof superClass !== "function" && superClass !== null) {
- throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
- }
-
- subClass.prototype = Object.create(superClass && superClass.prototype, {
- constructor: {
- value: subClass,
- enumerable: false,
- writable: true,
- configurable: true
- }
- });
- if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
- };
-
- var possibleConstructorReturn = function (self, call) {
- if (!self) {
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
- }
-
- return call && (typeof call === "object" || typeof call === "function") ? call : self;
- };
-
- var slicedToArray = function () {
- function sliceIterator(arr, i) {
- var _arr = [];
- var _n = true;
- var _d = false;
- var _e = undefined;
-
- try {
- for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
- _arr.push(_s.value);
-
- if (i && _arr.length === i) break;
- }
- } catch (err) {
- _d = true;
- _e = err;
- } finally {
- try {
- if (!_n && _i["return"]) _i["return"]();
- } finally {
- if (_d) throw _e;
- }
- }
-
- return _arr;
- }
-
- return function (arr, i) {
- if (Array.isArray(arr)) {
- return arr;
- } else if (Symbol.iterator in Object(arr)) {
- return sliceIterator(arr, i);
- } else {
- throw new TypeError("Invalid attempt to destructure non-iterable instance");
- }
- };
- }();
-
- /*:: import type {ControlPosition, PositionOffsetControlPosition, MouseTouchEvent} from './types';*/
-
-
- var matchesSelectorFunc = '';
- function matchesSelector(el /*: Node*/, selector /*: string*/) /*: boolean*/ {
- if (!matchesSelectorFunc) {
- matchesSelectorFunc = findInArray(['matches', 'webkitMatchesSelector', 'mozMatchesSelector', 'msMatchesSelector', 'oMatchesSelector'], function (method) {
- // $FlowIgnore: Doesn't think elements are indexable
- return isFunction(el[method]);
- });
- }
-
- // Might not be found entirely (not an Element?) - in that case, bail
- // $FlowIgnore: Doesn't think elements are indexable
- if (!isFunction(el[matchesSelectorFunc])) return false;
-
- // $FlowIgnore: Doesn't think elements are indexable
- return el[matchesSelectorFunc](selector);
- }
-
- // Works up the tree to the draggable itself attempting to match selector.
- function matchesSelectorAndParentsTo(el /*: Node*/, selector /*: string*/, baseNode /*: Node*/) /*: boolean*/ {
- var node = el;
- do {
- if (matchesSelector(node, selector)) return true;
- if (node === baseNode) return false;
- node = node.parentNode;
- } while (node);
-
- return false;
- }
-
- function addEvent(el /*: ?Node*/, event /*: string*/, handler /*: Function*/) /*: void*/ {
- if (!el) {
- return;
- }
- if (el.attachEvent) {
- el.attachEvent('on' + event, handler);
- } else if (el.addEventListener) {
- el.addEventListener(event, handler, true);
- } else {
- // $FlowIgnore: Doesn't think elements are indexable
- el['on' + event] = handler;
- }
- }
-
- function removeEvent(el /*: ?Node*/, event /*: string*/, handler /*: Function*/) /*: void*/ {
- if (!el) {
- return;
- }
- if (el.detachEvent) {
- el.detachEvent('on' + event, handler);
- } else if (el.removeEventListener) {
- el.removeEventListener(event, handler, true);
- } else {
- // $FlowIgnore: Doesn't think elements are indexable
- el['on' + event] = null;
- }
- }
-
- function outerHeight(node /*: HTMLElement*/) /*: number*/ {
- // This is deliberately excluding margin for our calculations, since we are using
- // offsetTop which is including margin. See getBoundPosition
- var height = node.clientHeight;
- var computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);
- height += int(computedStyle.borderTopWidth);
- height += int(computedStyle.borderBottomWidth);
- return height;
- }
-
- function outerWidth(node /*: HTMLElement*/) /*: number*/ {
- // This is deliberately excluding margin for our calculations, since we are using
- // offsetLeft which is including margin. See getBoundPosition
- var width = node.clientWidth;
- var computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);
- width += int(computedStyle.borderLeftWidth);
- width += int(computedStyle.borderRightWidth);
- return width;
- }
- function innerHeight(node /*: HTMLElement*/) /*: number*/ {
- var height = node.clientHeight;
- var computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);
- height -= int(computedStyle.paddingTop);
- height -= int(computedStyle.paddingBottom);
- return height;
- }
-
- function innerWidth(node /*: HTMLElement*/) /*: number*/ {
- var width = node.clientWidth;
- var computedStyle = node.ownerDocument.defaultView.getComputedStyle(node);
- width -= int(computedStyle.paddingLeft);
- width -= int(computedStyle.paddingRight);
- return width;
- }
-
- // Get from offsetParent
- function offsetXYFromParent(evt /*: {clientX: number, clientY: number}*/, offsetParent /*: HTMLElement*/) /*: ControlPosition*/ {
- var isBody = offsetParent === offsetParent.ownerDocument.body;
- var offsetParentRect = isBody ? { left: 0, top: 0 } : offsetParent.getBoundingClientRect();
-
- var x = evt.clientX + offsetParent.scrollLeft - offsetParentRect.left;
- var y = evt.clientY + offsetParent.scrollTop - offsetParentRect.top;
-
- return { x: x, y: y };
- }
-
- function createCSSTransform(controlPos /*: ControlPosition*/, positionOffset /*: PositionOffsetControlPosition*/) /*: Object*/ {
- var translation = getTranslation(controlPos, positionOffset, 'px');
- return defineProperty({}, browserPrefixToKey('transform', browserPrefix), translation);
- }
-
- function createSVGTransform(controlPos /*: ControlPosition*/, positionOffset /*: PositionOffsetControlPosition*/) /*: string*/ {
- var translation = getTranslation(controlPos, positionOffset, '');
- return translation;
- }
- function getTranslation(_ref2, positionOffset /*: PositionOffsetControlPosition*/, unitSuffix /*: string*/) /*: string*/ {
- var x = _ref2.x,
- y = _ref2.y;
-
- var translation = 'translate(' + x + unitSuffix + ',' + y + unitSuffix + ')';
- if (positionOffset) {
- var defaultX = '' + (typeof positionOffset.x === 'string' ? positionOffset.x : positionOffset.x + unitSuffix);
- var defaultY = '' + (typeof positionOffset.y === 'string' ? positionOffset.y : positionOffset.y + unitSuffix);
- translation = 'translate(' + defaultX + ', ' + defaultY + ')' + translation;
- }
- return translation;
- }
-
- function getTouch(e /*: MouseTouchEvent*/, identifier /*: number*/) /*: ?{clientX: number, clientY: number}*/ {
- return e.targetTouches && findInArray(e.targetTouches, function (t) {
- return identifier === t.identifier;
- }) || e.changedTouches && findInArray(e.changedTouches, function (t) {
- return identifier === t.identifier;
- });
- }
-
- function getTouchIdentifier(e /*: MouseTouchEvent*/) /*: ?number*/ {
- if (e.targetTouches && e.targetTouches[0]) return e.targetTouches[0].identifier;
- if (e.changedTouches && e.changedTouches[0]) return e.changedTouches[0].identifier;
- }
-
- // User-select Hacks:
- //
- // Useful for preventing blue highlights all over everything when dragging.
-
- // Note we're passing `document` b/c we could be iframed
- function addUserSelectStyles(doc /*: ?Document*/) {
- if (!doc) return;
- var styleEl = doc.getElementById('react-draggable-style-el');
- if (!styleEl) {
- styleEl = doc.createElement('style');
- styleEl.type = 'text/css';
- styleEl.id = 'react-draggable-style-el';
- styleEl.innerHTML = '.react-draggable-transparent-selection *::-moz-selection {background: transparent;}\n';
- styleEl.innerHTML += '.react-draggable-transparent-selection *::selection {background: transparent;}\n';
- doc.getElementsByTagName('head')[0].appendChild(styleEl);
- }
- if (doc.body) addClassName(doc.body, 'react-draggable-transparent-selection');
- }
-
- function removeUserSelectStyles(doc /*: ?Document*/) {
- try {
- if (doc && doc.body) removeClassName(doc.body, 'react-draggable-transparent-selection');
- // $FlowIgnore: IE
- if (doc.selection) {
- // $FlowIgnore: IE
- doc.selection.empty();
- } else {
- window.getSelection().removeAllRanges(); // remove selection caused by scroll
- }
- } catch (e) {
- // probably IE
- }
- }
-
- function styleHacks() /*: Object*/ {
- var childStyle /*: Object*/ = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
-
- // Workaround IE pointer events; see #51
- // https://github.com/mzabriskie/react-draggable/issues/51#issuecomment-103488278
- return _extends({
- touchAction: 'none'
- }, childStyle);
- }
-
- function addClassName(el /*: HTMLElement*/, className /*: string*/) {
- if (el.classList) {
- el.classList.add(className);
- } else {
- if (!el.className.match(new RegExp('(?:^|\\s)' + className + '(?!\\S)'))) {
- el.className += ' ' + className;
- }
- }
- }
-
- function removeClassName(el /*: HTMLElement*/, className /*: string*/) {
- if (el.classList) {
- el.classList.remove(className);
- } else {
- el.className = el.className.replace(new RegExp('(?:^|\\s)' + className + '(?!\\S)', 'g'), '');
- }
- }
-
- /*:: import type Draggable from '../Draggable';*/
- /*:: import type {Bounds, ControlPosition, DraggableData, MouseTouchEvent} from './types';*/
- /*:: import type DraggableCore from '../DraggableCore';*/
-
-
- function getBoundPosition(draggable /*: Draggable*/, x /*: number*/, y /*: number*/) /*: [number, number]*/ {
- // If no bounds, short-circuit and move on
- if (!draggable.props.bounds) return [x, y];
-
- // Clone new bounds
- var bounds = draggable.props.bounds;
-
- bounds = typeof bounds === 'string' ? bounds : cloneBounds(bounds);
- var node = findDOMNode(draggable);
-
- if (typeof bounds === 'string') {
- var ownerDocument = node.ownerDocument;
-
- var ownerWindow = ownerDocument.defaultView;
- var boundNode = void 0;
- if (bounds === 'parent') {
- boundNode = node.parentNode;
- } else {
- boundNode = ownerDocument.querySelector(bounds);
- }
- if (!(boundNode instanceof ownerWindow.HTMLElement)) {
- throw new Error('Bounds selector "' + bounds + '" could not find an element.');
- }
- var nodeStyle = ownerWindow.getComputedStyle(node);
- var boundNodeStyle = ownerWindow.getComputedStyle(boundNode);
- // Compute bounds. This is a pain with padding and offsets but this gets it exactly right.
- bounds = {
- left: -node.offsetLeft + int(boundNodeStyle.paddingLeft) + int(nodeStyle.marginLeft),
- top: -node.offsetTop + int(boundNodeStyle.paddingTop) + int(nodeStyle.marginTop),
- right: innerWidth(boundNode) - outerWidth(node) - node.offsetLeft + int(boundNodeStyle.paddingRight) - int(nodeStyle.marginRight),
- bottom: innerHeight(boundNode) - outerHeight(node) - node.offsetTop + int(boundNodeStyle.paddingBottom) - int(nodeStyle.marginBottom)
- };
- }
-
- // Keep x and y below right and bottom limits...
- if (isNum(bounds.right)) x = Math.min(x, bounds.right);
- if (isNum(bounds.bottom)) y = Math.min(y, bounds.bottom);
-
- // But above left and top limits.
- if (isNum(bounds.left)) x = Math.max(x, bounds.left);
- if (isNum(bounds.top)) y = Math.max(y, bounds.top);
-
- return [x, y];
- }
-
- function snapToGrid(grid /*: [number, number]*/, pendingX /*: number*/, pendingY /*: number*/) /*: [number, number]*/ {
- var x = Math.round(pendingX / grid[0]) * grid[0];
- var y = Math.round(pendingY / grid[1]) * grid[1];
- return [x, y];
- }
-
- function canDragX(draggable /*: Draggable*/) /*: boolean*/ {
- return draggable.props.axis === 'both' || draggable.props.axis === 'x';
- }
-
- function canDragY(draggable /*: Draggable*/) /*: boolean*/ {
- return draggable.props.axis === 'both' || draggable.props.axis === 'y';
- }
-
- // Get {x, y} positions from event.
- function getControlPosition(e /*: MouseTouchEvent*/, touchIdentifier /*: ?number*/, draggableCore /*: DraggableCore*/) /*: ?ControlPosition*/ {
- var touchObj = typeof touchIdentifier === 'number' ? getTouch(e, touchIdentifier) : null;
- if (typeof touchIdentifier === 'number' && !touchObj) return null; // not the right touch
- var node = findDOMNode(draggableCore);
- // User can provide an offsetParent if desired.
- var offsetParent = draggableCore.props.offsetParent || node.offsetParent || node.ownerDocument.body;
- return offsetXYFromParent(touchObj || e, offsetParent);
- }
-
- // Create an data object exposed by 's events
- function createCoreData(draggable /*: DraggableCore*/, x /*: number*/, y /*: number*/) /*: DraggableData*/ {
- var state = draggable.state;
- var isStart = !isNum(state.lastX);
- var node = findDOMNode(draggable);
-
- if (isStart) {
- // If this is our first move, use the x and y as last coords.
- return {
- node: node,
- deltaX: 0, deltaY: 0,
- lastX: x, lastY: y,
- x: x, y: y
- };
- } else {
- // Otherwise calculate proper values.
- return {
- node: node,
- deltaX: x - state.lastX, deltaY: y - state.lastY,
- lastX: state.lastX, lastY: state.lastY,
- x: x, y: y
- };
- }
- }
-
- // Create an data exposed by 's events
- function createDraggableData(draggable /*: Draggable*/, coreData /*: DraggableData*/) /*: DraggableData*/ {
- var scale = draggable.props.scale;
- return {
- node: coreData.node,
- x: draggable.state.x + coreData.deltaX / scale,
- y: draggable.state.y + coreData.deltaY / scale,
- deltaX: coreData.deltaX / scale,
- deltaY: coreData.deltaY / scale,
- lastX: draggable.state.x,
- lastY: draggable.state.y
- };
- }
-
- // A lot faster than stringify/parse
- function cloneBounds(bounds /*: Bounds*/) /*: Bounds*/ {
- return {
- left: bounds.left,
- top: bounds.top,
- right: bounds.right,
- bottom: bounds.bottom
- };
- }
-
- function findDOMNode(draggable /*: Draggable | DraggableCore*/) /*: HTMLElement*/ {
- var node = ReactDOM.findDOMNode(draggable);
- if (!node) {
- throw new Error(': Unmounted during event!');
- }
- // $FlowIgnore we can't assert on HTMLElement due to tests... FIXME
- return node;
- }
-
- /*eslint no-console:0*/
- function log() {
- }
-
- /*:: import type {EventHandler, MouseTouchEvent} from './utils/types';*/
-
-
- // Simple abstraction for dragging events names.
- /*:: import type {Element as ReactElement} from 'react';*/
- var eventsFor = {
- touch: {
- start: 'touchstart',
- move: 'touchmove',
- stop: 'touchend'
- },
- mouse: {
- start: 'mousedown',
- move: 'mousemove',
- stop: 'mouseup'
- }
- };
-
- // Default to mouse events.
- var dragEventFor = eventsFor.mouse;
-
- /*:: type DraggableCoreState = {
- dragging: boolean,
- lastX: number,
- lastY: number,
- touchIdentifier: ?number
- };*/
- /*:: export type DraggableBounds = {
- left: number,
- right: number,
- top: number,
- bottom: number,
- };*/
- /*:: export type DraggableData = {
- node: HTMLElement,
- x: number, y: number,
- deltaX: number, deltaY: number,
- lastX: number, lastY: number,
- };*/
- /*:: export type DraggableEventHandler = (e: MouseEvent, data: DraggableData) => void;*/
- /*:: export type ControlPosition = {x: number, y: number};*/
- /*:: export type PositionOffsetControlPosition = {x: number|string, y: number|string};*/
-
-
- //
- // Define .
- //
- // is for advanced usage of . It maintains minimal internal state so it can
- // work well with libraries that require more control over the element.
- //
-
- /*:: export type DraggableCoreProps = {
- allowAnyClick: boolean,
- cancel: string,
- children: ReactElement,
- disabled: boolean,
- enableUserSelectHack: boolean,
- offsetParent: HTMLElement,
- grid: [number, number],
- handle: string,
- onStart: DraggableEventHandler,
- onDrag: DraggableEventHandler,
- onStop: DraggableEventHandler,
- onMouseDown: (e: MouseEvent) => void,
- };*/
-
- var DraggableCore = function (_React$Component) {
- inherits(DraggableCore, _React$Component);
-
- function DraggableCore() {
- var _ref;
-
- var _temp, _this, _ret;
-
- classCallCheck(this, DraggableCore);
-
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
-
- return _ret = (_temp = (_this = possibleConstructorReturn(this, (_ref = DraggableCore.__proto__ || Object.getPrototypeOf(DraggableCore)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
- dragging: false,
- // Used while dragging to determine deltas.
- lastX: NaN, lastY: NaN,
- touchIdentifier: null
- }, _this.handleDragStart = function (e) {
- // Make it possible to attach event handlers on top of this one.
- _this.props.onMouseDown(e);
-
- // Only accept left-clicks.
- if (!_this.props.allowAnyClick && typeof e.button === 'number' && e.button !== 0) return false;
-
- // Get nodes. Be sure to grab relative document (could be iframed)
- var thisNode = ReactDOM.findDOMNode(_this);
- if (!thisNode || !thisNode.ownerDocument || !thisNode.ownerDocument.body) {
- throw new Error(' not mounted on DragStart!');
- }
- var ownerDocument = thisNode.ownerDocument;
-
- // Short circuit if handle or cancel prop was provided and selector doesn't match.
-
- if (_this.props.disabled || !(e.target instanceof ownerDocument.defaultView.Node) || _this.props.handle && !matchesSelectorAndParentsTo(e.target, _this.props.handle, thisNode) || _this.props.cancel && matchesSelectorAndParentsTo(e.target, _this.props.cancel, thisNode)) {
- return;
- }
-
- // Set touch identifier in component state if this is a touch event. This allows us to
- // distinguish between individual touches on multitouch screens by identifying which
- // touchpoint was set to this element.
- var touchIdentifier = getTouchIdentifier(e);
- _this.setState({ touchIdentifier: touchIdentifier });
-
- // Get the current drag point from the event. This is used as the offset.
- var position = getControlPosition(e, touchIdentifier, _this);
- if (position == null) return; // not possible but satisfies flow
- var x = position.x,
- y = position.y;
-
- // Create an event object with all the data parents need to make a decision here.
-
- var coreEvent = createCoreData(_this, x, y);
-
- // Call event handler. If it returns explicit false, cancel.
- log('calling', _this.props.onStart);
- var shouldUpdate = _this.props.onStart(e, coreEvent);
- if (shouldUpdate === false) return;
-
- // Add a style to the body to disable user-select. This prevents text from
- // being selected all over the page.
- if (_this.props.enableUserSelectHack) addUserSelectStyles(ownerDocument);
-
- // Initiate dragging. Set the current x and y as offsets
- // so we know how much we've moved during the drag. This allows us
- // to drag elements around even if they have been moved, without issue.
- _this.setState({
- dragging: true,
-
- lastX: x,
- lastY: y
- });
-
- // Add events to the document directly so we catch when the user's mouse/touch moves outside of
- // this element. We use different events depending on whether or not we have detected that this
- // is a touch-capable device.
- addEvent(ownerDocument, dragEventFor.move, _this.handleDrag);
- addEvent(ownerDocument, dragEventFor.stop, _this.handleDragStop);
- }, _this.handleDrag = function (e) {
-
- // Prevent scrolling on mobile devices, like ipad/iphone.
- if (e.type === 'touchmove') e.preventDefault();
-
- // Get the current drag point from the event. This is used as the offset.
- var position = getControlPosition(e, _this.state.touchIdentifier, _this);
- if (position == null) return;
- var x = position.x,
- y = position.y;
-
- // Snap to grid if prop has been provided
-
- if (Array.isArray(_this.props.grid)) {
- var _deltaX = x - _this.state.lastX,
- _deltaY = y - _this.state.lastY;
-
- var _snapToGrid = snapToGrid(_this.props.grid, _deltaX, _deltaY);
-
- var _snapToGrid2 = slicedToArray(_snapToGrid, 2);
-
- _deltaX = _snapToGrid2[0];
- _deltaY = _snapToGrid2[1];
-
- if (!_deltaX && !_deltaY) return; // skip useless drag
- x = _this.state.lastX + _deltaX, y = _this.state.lastY + _deltaY;
- }
-
- var coreEvent = createCoreData(_this, x, y);
-
- // Call event handler. If it returns explicit false, trigger end.
- var shouldUpdate = _this.props.onDrag(e, coreEvent);
- if (shouldUpdate === false) {
- try {
- // $FlowIgnore
- _this.handleDragStop(new MouseEvent('mouseup'));
- } catch (err) {
- // Old browsers
- var event = ((document.createEvent('MouseEvents') /*: any*/) /*: MouseTouchEvent*/);
- // I see why this insanity was deprecated
- // $FlowIgnore
- event.initMouseEvent('mouseup', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
- _this.handleDragStop(event);
- }
- return;
- }
-
- _this.setState({
- lastX: x,
- lastY: y
- });
- }, _this.handleDragStop = function (e) {
- if (!_this.state.dragging) return;
-
- var position = getControlPosition(e, _this.state.touchIdentifier, _this);
- if (position == null) return;
- var x = position.x,
- y = position.y;
-
- var coreEvent = createCoreData(_this, x, y);
-
- var thisNode = ReactDOM.findDOMNode(_this);
- if (thisNode) {
- // Remove user-select hack
- if (_this.props.enableUserSelectHack) removeUserSelectStyles(thisNode.ownerDocument);
- }
-
- // Reset the el.
- _this.setState({
- dragging: false,
- lastX: NaN,
- lastY: NaN
- });
-
- // Call event handler
- _this.props.onStop(e, coreEvent);
-
- if (thisNode) {
- removeEvent(thisNode.ownerDocument, dragEventFor.move, _this.handleDrag);
- removeEvent(thisNode.ownerDocument, dragEventFor.stop, _this.handleDragStop);
- }
- }, _this.onMouseDown = function (e) {
- dragEventFor = eventsFor.mouse; // on touchscreen laptops we could switch back to mouse
-
- return _this.handleDragStart(e);
- }, _this.onMouseUp = function (e) {
- dragEventFor = eventsFor.mouse;
-
- return _this.handleDragStop(e);
- }, _this.onTouchStart = function (e) {
- // We're on a touch device now, so change the event handlers
- dragEventFor = eventsFor.touch;
-
- return _this.handleDragStart(e);
- }, _this.onTouchEnd = function (e) {
- // We're on a touch device now, so change the event handlers
- dragEventFor = eventsFor.touch;
-
- return _this.handleDragStop(e);
- }, _temp), possibleConstructorReturn(_this, _ret);
- }
-
- createClass(DraggableCore, [{
- key: 'componentWillUnmount',
- value: function componentWillUnmount() {
- // Remove any leftover event handlers. Remove both touch and mouse handlers in case
- // some browser quirk caused a touch event to fire during a mouse move, or vice versa.
- var thisNode = ReactDOM.findDOMNode(this);
- if (thisNode) {
- var ownerDocument = thisNode.ownerDocument;
-
- removeEvent(ownerDocument, eventsFor.mouse.move, this.handleDrag);
- removeEvent(ownerDocument, eventsFor.touch.move, this.handleDrag);
- removeEvent(ownerDocument, eventsFor.mouse.stop, this.handleDragStop);
- removeEvent(ownerDocument, eventsFor.touch.stop, this.handleDragStop);
- if (this.props.enableUserSelectHack) removeUserSelectStyles(ownerDocument);
- }
- }
-
- // Same as onMouseDown (start drag), but now consider this a touch device.
-
- }, {
- key: 'render',
- value: function render() {
- // Reuse the child provided
- // This makes it flexible to use whatever element is wanted (div, ul, etc)
- return React.cloneElement(React.Children.only(this.props.children), {
- style: styleHacks(this.props.children.props.style),
-
- // Note: mouseMove handler is attached to document so it will still function
- // when the user drags quickly and leaves the bounds of the element.
- onMouseDown: this.onMouseDown,
- onTouchStart: this.onTouchStart,
- onMouseUp: this.onMouseUp,
- onTouchEnd: this.onTouchEnd
- });
- }
- }]);
- return DraggableCore;
- }(React.Component);
-
- DraggableCore.displayName = 'DraggableCore';
- DraggableCore.propTypes = {
- /**
- * `allowAnyClick` allows dragging using any mouse button.
- * By default, we only accept the left button.
- *
- * Defaults to `false`.
- */
- allowAnyClick: propTypes.bool,
-
- /**
- * `disabled`, if true, stops the from dragging. All handlers,
- * with the exception of `onMouseDown`, will not fire.
- */
- disabled: propTypes.bool,
-
- /**
- * By default, we add 'user-select:none' attributes to the document body
- * to prevent ugly text selection during drag. If this is causing problems
- * for your app, set this to `false`.
- */
- enableUserSelectHack: propTypes.bool,
-
- /**
- * `offsetParent`, if set, uses the passed DOM node to compute drag offsets
- * instead of using the parent node.
- */
- offsetParent: function offsetParent(props /*: DraggableCoreProps*/, propName /*: $Keys*/) {
- if (props[propName] && props[propName].nodeType !== 1) {
- throw new Error('Draggable\'s offsetParent must be a DOM Node.');
- }
- },
-
- /**
- * `grid` specifies the x and y that dragging should snap to.
- */
- grid: propTypes.arrayOf(propTypes.number),
-
- /**
- * `scale` specifies the scale of the area you are dragging inside of. It allows
- * the drag deltas to scale correctly with how far zoomed in/out you are.
- */
- scale: propTypes.number,
-
- /**
- * `handle` specifies a selector to be used as the handle that initiates drag.
- *
- * Example:
- *
- * ```jsx
- * let App = React.createClass({
- * render: function () {
- * return (
- *
- *
- *
Click me to drag
- *
This is some other content
- *
- *
- * );
- * }
- * });
- * ```
- */
- handle: propTypes.string,
-
- /**
- * `cancel` specifies a selector to be used to prevent drag initialization.
- *
- * Example:
- *
- * ```jsx
- * let App = React.createClass({
- * render: function () {
- * return(
- *
- *
- *
You can't drag from here
- *
Dragging here works fine
- *
- *
- * );
- * }
- * });
- * ```
- */
- cancel: propTypes.string,
-
- /**
- * Called when dragging starts.
- * If this function returns the boolean false, dragging will be canceled.
- */
- onStart: propTypes.func,
-
- /**
- * Called while dragging.
- * If this function returns the boolean false, dragging will be canceled.
- */
- onDrag: propTypes.func,
-
- /**
- * Called when dragging stops.
- * If this function returns the boolean false, the drag will remain active.
- */
- onStop: propTypes.func,
-
- /**
- * A workaround option which can be passed if onMouseDown needs to be accessed,
- * since it'll always be blocked (as there is internal use of onMouseDown)
- */
- onMouseDown: propTypes.func,
-
- /**
- * These properties should be defined on the child, not here.
- */
- className: dontSetMe,
- style: dontSetMe,
- transform: dontSetMe
- };
- DraggableCore.defaultProps = {
- allowAnyClick: false, // by default only accept left click
- cancel: null,
- disabled: false,
- enableUserSelectHack: true,
- offsetParent: null,
- handle: null,
- grid: null,
- transform: null,
- onStart: function onStart() {},
- onDrag: function onDrag() {},
- onStop: function onStop() {},
- onMouseDown: function onMouseDown() {}
- };
-
- /*:: import type {DraggableEventHandler} from './utils/types';*/
- /*:: import type {Element as ReactElement} from 'react';*/
- /*:: type DraggableState = {
- dragging: boolean,
- dragged: boolean,
- x: number, y: number,
- slackX: number, slackY: number,
- isElementSVG: boolean
- };*/
-
-
- //
- // Define
- //
-
- /*:: export type DraggableProps = {
- ...$Exact,
- axis: 'both' | 'x' | 'y' | 'none',
- bounds: DraggableBounds | string | false,
- defaultClassName: string,
- defaultClassNameDragging: string,
- defaultClassNameDragged: string,
- defaultPosition: ControlPosition,
- positionOffset: PositionOffsetControlPosition,
- position: ControlPosition,
- scale: number
- };*/
-
- var Draggable = function (_React$Component) {
- inherits(Draggable, _React$Component);
-
- function Draggable(props /*: DraggableProps*/) {
- classCallCheck(this, Draggable);
-
- var _this = possibleConstructorReturn(this, (Draggable.__proto__ || Object.getPrototypeOf(Draggable)).call(this, props));
-
- _this.onDragStart = function (e, coreData) {
-
- // Short-circuit if user's callback killed it.
- var shouldStart = _this.props.onStart(e, createDraggableData(_this, coreData));
- // Kills start event on core as well, so move handlers are never bound.
- if (shouldStart === false) return false;
-
- _this.setState({ dragging: true, dragged: true });
- };
-
- _this.onDrag = function (e, coreData) {
- if (!_this.state.dragging) return false;
-
- var uiData = createDraggableData(_this, coreData);
-
- var newState /*: $Shape*/ = {
- x: uiData.x,
- y: uiData.y
- };
-
- // Keep within bounds.
- if (_this.props.bounds) {
- // Save original x and y.
- var _x = newState.x,
- _y = newState.y;
-
- // Add slack to the values used to calculate bound position. This will ensure that if
- // we start removing slack, the element won't react to it right away until it's been
- // completely removed.
-
- newState.x += _this.state.slackX;
- newState.y += _this.state.slackY;
-
- // Get bound position. This will ceil/floor the x and y within the boundaries.
-
- var _getBoundPosition = getBoundPosition(_this, newState.x, newState.y),
- _getBoundPosition2 = slicedToArray(_getBoundPosition, 2),
- newStateX = _getBoundPosition2[0],
- newStateY = _getBoundPosition2[1];
-
- newState.x = newStateX;
- newState.y = newStateY;
-
- // Recalculate slack by noting how much was shaved by the boundPosition handler.
- newState.slackX = _this.state.slackX + (_x - newState.x);
- newState.slackY = _this.state.slackY + (_y - newState.y);
-
- // Update the event we fire to reflect what really happened after bounds took effect.
- uiData.x = newState.x;
- uiData.y = newState.y;
- uiData.deltaX = newState.x - _this.state.x;
- uiData.deltaY = newState.y - _this.state.y;
- }
-
- // Short-circuit if user's callback killed it.
- var shouldUpdate = _this.props.onDrag(e, uiData);
- if (shouldUpdate === false) return false;
-
- _this.setState(newState);
- };
-
- _this.onDragStop = function (e, coreData) {
- if (!_this.state.dragging) return false;
-
- // Short-circuit if user's callback killed it.
- var shouldStop = _this.props.onStop(e, createDraggableData(_this, coreData));
- if (shouldStop === false) return false;
-
- var newState /*: $Shape*/ = {
- dragging: false,
- slackX: 0,
- slackY: 0
- };
-
- // If this is a controlled component, the result of this operation will be to
- // revert back to the old position. We expect a handler on `onDragStop`, at the least.
- var controlled = Boolean(_this.props.position);
- if (controlled) {
- var _this$props$position = _this.props.position,
- _x2 = _this$props$position.x,
- _y2 = _this$props$position.y;
-
- newState.x = _x2;
- newState.y = _y2;
- }
-
- _this.setState(newState);
- };
-
- _this.state = {
- // Whether or not we are currently dragging.
- dragging: false,
-
- // Whether or not we have been dragged before.
- dragged: false,
-
- // Current transform x and y.
- x: props.position ? props.position.x : props.defaultPosition.x,
- y: props.position ? props.position.y : props.defaultPosition.y,
-
- // Used for compensating for out-of-bounds drags
- slackX: 0, slackY: 0,
-
- // Can only determine if SVG after mounting
- isElementSVG: false
- };
- return _this;
- }
-
- createClass(Draggable, [{
- key: 'componentWillMount',
- value: function componentWillMount() {
- if (this.props.position && !(this.props.onDrag || this.props.onStop)) {
- // eslint-disable-next-line
- console.warn('A `position` was applied to this , without drag handlers. This will make this ' + 'component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the ' + '`position` of this element.');
- }
- }
- }, {
- key: 'componentDidMount',
- value: function componentDidMount() {
- // Check to see if the element passed is an instanceof SVGElement
- if (typeof window.SVGElement !== 'undefined' && ReactDOM.findDOMNode(this) instanceof window.SVGElement) {
- this.setState({ isElementSVG: true });
- }
- }
- }, {
- key: 'componentWillReceiveProps',
- value: function componentWillReceiveProps(nextProps /*: Object*/) {
- // Set x/y if position has changed
- if (nextProps.position && (!this.props.position || nextProps.position.x !== this.props.position.x || nextProps.position.y !== this.props.position.y)) {
- this.setState({ x: nextProps.position.x, y: nextProps.position.y });
- }
- }
- }, {
- key: 'componentWillUnmount',
- value: function componentWillUnmount() {
- this.setState({ dragging: false }); // prevents invariant if unmounted while dragging
- }
- }, {
- key: 'render',
- value: function render() /*: ReactElement*/ {
- var _classNames;
-
- var style = {},
- svgTransform = null;
-
- // If this is controlled, we don't want to move it - unless it's dragging.
- var controlled = Boolean(this.props.position);
- var draggable = !controlled || this.state.dragging;
-
- var position = this.props.position || this.props.defaultPosition;
- var transformOpts = {
- // Set left if horizontal drag is enabled
- x: canDragX(this) && draggable ? this.state.x : position.x,
-
- // Set top if vertical drag is enabled
- y: canDragY(this) && draggable ? this.state.y : position.y
- };
-
- // If this element was SVG, we use the `transform` attribute.
- if (this.state.isElementSVG) {
- svgTransform = createSVGTransform(transformOpts, this.props.positionOffset);
- } else {
- // Add a CSS transform to move the element around. This allows us to move the element around
- // without worrying about whether or not it is relatively or absolutely positioned.
- // If the item you are dragging already has a transform set, wrap it in a so
- // has a clean slate.
- style = createCSSTransform(transformOpts, this.props.positionOffset);
- }
-
- var _props = this.props,
- defaultClassName = _props.defaultClassName,
- defaultClassNameDragging = _props.defaultClassNameDragging,
- defaultClassNameDragged = _props.defaultClassNameDragged;
-
-
- var children = React.Children.only(this.props.children);
-
- // Mark with class while dragging
- var className = classnames(children.props.className || '', defaultClassName, (_classNames = {}, defineProperty(_classNames, defaultClassNameDragging, this.state.dragging), defineProperty(_classNames, defaultClassNameDragged, this.state.dragged), _classNames));
-
- // Reuse the child provided
- // This makes it flexible to use whatever element is wanted (div, ul, etc)
- return React.createElement(
- DraggableCore,
- _extends({}, this.props, { onStart: this.onDragStart, onDrag: this.onDrag, onStop: this.onDragStop }),
- React.cloneElement(children, {
- className: className,
- style: _extends({}, children.props.style, style),
- transform: svgTransform
- })
- );
- }
- }]);
- return Draggable;
- }(React.Component);
-
- Draggable.displayName = 'Draggable';
- Draggable.propTypes = _extends({}, DraggableCore.propTypes, {
-
- /**
- * `axis` determines which axis the draggable can move.
- *
- * Note that all callbacks will still return data as normal. This only
- * controls flushing to the DOM.
- *
- * 'both' allows movement horizontally and vertically.
- * 'x' limits movement to horizontal axis.
- * 'y' limits movement to vertical axis.
- * 'none' limits all movement.
- *
- * Defaults to 'both'.
- */
- axis: propTypes.oneOf(['both', 'x', 'y', 'none']),
-
- /**
- * `bounds` determines the range of movement available to the element.
- * Available values are:
- *
- * 'parent' restricts movement within the Draggable's parent node.
- *
- * Alternatively, pass an object with the following properties, all of which are optional:
- *
- * {left: LEFT_BOUND, right: RIGHT_BOUND, bottom: BOTTOM_BOUND, top: TOP_BOUND}
- *
- * All values are in px.
- *
- * Example:
- *
- * ```jsx
- * let App = React.createClass({
- * render: function () {
- * return (
- *
- * Content
- *
- * );
- * }
- * });
- * ```
- */
- bounds: propTypes.oneOfType([propTypes.shape({
- left: propTypes.number,
- right: propTypes.number,
- top: propTypes.number,
- bottom: propTypes.number
- }), propTypes.string, propTypes.oneOf([false])]),
-
- defaultClassName: propTypes.string,
- defaultClassNameDragging: propTypes.string,
- defaultClassNameDragged: propTypes.string,
-
- /**
- * `defaultPosition` specifies the x and y that the dragged item should start at
- *
- * Example:
- *
- * ```jsx
- * let App = React.createClass({
- * render: function () {
- * return (
- *
- * I start with transformX: 25px and transformY: 25px;
- *
- * );
- * }
- * });
- * ```
- */
- defaultPosition: propTypes.shape({
- x: propTypes.number,
- y: propTypes.number
- }),
- positionOffset: propTypes.shape({
- x: propTypes.oneOfType([propTypes.number, propTypes.string]),
- y: propTypes.oneOfType([propTypes.number, propTypes.string])
- }),
-
- /**
- * `position`, if present, defines the current position of the element.
- *
- * This is similar to how form elements in React work - if no `position` is supplied, the component
- * is uncontrolled.
- *
- * Example:
- *
- * ```jsx
- * let App = React.createClass({
- * render: function () {
- * return (
- *
- * I start with transformX: 25px and transformY: 25px;
- *
- * );
- * }
- * });
- * ```
- */
- position: propTypes.shape({
- x: propTypes.number,
- y: propTypes.number
- }),
-
- /**
- * These properties should be defined on the child, not here.
- */
- className: dontSetMe,
- style: dontSetMe,
- transform: dontSetMe
- });
- Draggable.defaultProps = _extends({}, DraggableCore.defaultProps, {
- axis: 'both',
- bounds: false,
- defaultClassName: 'react-draggable',
- defaultClassNameDragging: 'react-draggable-dragging',
- defaultClassNameDragged: 'react-draggable-dragged',
- defaultPosition: { x: 0, y: 0 },
- position: null,
- scale: 1
- });
-
- // Previous versions of this lib exported as the root export. As to not break
- // them, or TypeScript, we export *both* as the root and as 'default'.
- // See https://github.com/mzabriskie/react-draggable/pull/254
- // and https://github.com/mzabriskie/react-draggable/issues/266
- Draggable.default = Draggable;
- Draggable.DraggableCore = DraggableCore;
-
- return Draggable;
-
- })));
- //# sourceMappingURL=react-draggable.js.map
-
-
-/***/ }),
-/* 249 */
-/***/ (function(module, exports, __webpack_require__) {
-
- /* WEBPACK VAR INJECTION */(function(global, module) {/**
- * Lodash (Custom Build)
- * Build: `lodash modularize exports="npm" -o ./`
- * Copyright JS Foundation and other contributors
- * Released under MIT license
- * Based on Underscore.js 1.8.3
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- */
-
- /** Used as the size to enable large array optimizations. */
- var LARGE_ARRAY_SIZE = 200;
-
- /** Used to stand-in for `undefined` hash values. */
- var HASH_UNDEFINED = '__lodash_hash_undefined__';
-
- /** Used to compose bitmasks for value comparisons. */
- var COMPARE_PARTIAL_FLAG = 1,
- COMPARE_UNORDERED_FLAG = 2;
-
- /** Used as references for various `Number` constants. */
- var MAX_SAFE_INTEGER = 9007199254740991;
-
- /** `Object#toString` result references. */
- var argsTag = '[object Arguments]',
- arrayTag = '[object Array]',
- asyncTag = '[object AsyncFunction]',
- boolTag = '[object Boolean]',
- dateTag = '[object Date]',
- errorTag = '[object Error]',
- funcTag = '[object Function]',
- genTag = '[object GeneratorFunction]',
- mapTag = '[object Map]',
- numberTag = '[object Number]',
- nullTag = '[object Null]',
- objectTag = '[object Object]',
- promiseTag = '[object Promise]',
- proxyTag = '[object Proxy]',
- regexpTag = '[object RegExp]',
- setTag = '[object Set]',
- stringTag = '[object String]',
- symbolTag = '[object Symbol]',
- undefinedTag = '[object Undefined]',
- weakMapTag = '[object WeakMap]';
-
- var arrayBufferTag = '[object ArrayBuffer]',
- dataViewTag = '[object DataView]',
- float32Tag = '[object Float32Array]',
- float64Tag = '[object Float64Array]',
- int8Tag = '[object Int8Array]',
- int16Tag = '[object Int16Array]',
- int32Tag = '[object Int32Array]',
- uint8Tag = '[object Uint8Array]',
- uint8ClampedTag = '[object Uint8ClampedArray]',
- uint16Tag = '[object Uint16Array]',
- uint32Tag = '[object Uint32Array]';
-
- /**
- * Used to match `RegExp`
- * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
- */
- var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
-
- /** Used to detect host constructors (Safari). */
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
-
- /** Used to detect unsigned integer values. */
- var reIsUint = /^(?:0|[1-9]\d*)$/;
-
- /** Used to identify `toStringTag` values of typed arrays. */
- var typedArrayTags = {};
- typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
- typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
- typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
- typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
- typedArrayTags[uint32Tag] = true;
- typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
- typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
- typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
- typedArrayTags[errorTag] = typedArrayTags[funcTag] =
- typedArrayTags[mapTag] = typedArrayTags[numberTag] =
- typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
- typedArrayTags[setTag] = typedArrayTags[stringTag] =
- typedArrayTags[weakMapTag] = false;
-
- /** Detect free variable `global` from Node.js. */
- var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
-
- /** Detect free variable `self`. */
- var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
-
- /** Used as a reference to the global object. */
- var root = freeGlobal || freeSelf || Function('return this')();
-
- /** Detect free variable `exports`. */
- var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
-
- /** Detect free variable `module`. */
- var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
-
- /** Detect the popular CommonJS extension `module.exports`. */
- var moduleExports = freeModule && freeModule.exports === freeExports;
-
- /** Detect free variable `process` from Node.js. */
- var freeProcess = moduleExports && freeGlobal.process;
-
- /** Used to access faster Node.js helpers. */
- var nodeUtil = (function() {
- try {
- return freeProcess && freeProcess.binding && freeProcess.binding('util');
- } catch (e) {}
- }());
-
- /* Node.js helper references. */
- var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
-
- /**
- * A specialized version of `_.filter` for arrays without support for
- * iteratee shorthands.
- *
- * @private
- * @param {Array} [array] The array to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {Array} Returns the new filtered array.
- */
- function arrayFilter(array, predicate) {
- var index = -1,
- length = array == null ? 0 : array.length,
- resIndex = 0,
- result = [];
-
- while (++index < length) {
- var value = array[index];
- if (predicate(value, index, array)) {
- result[resIndex++] = value;
- }
- }
- return result;
- }
-
- /**
- * Appends the elements of `values` to `array`.
- *
- * @private
- * @param {Array} array The array to modify.
- * @param {Array} values The values to append.
- * @returns {Array} Returns `array`.
- */
- function arrayPush(array, values) {
- var index = -1,
- length = values.length,
- offset = array.length;
-
- while (++index < length) {
- array[offset + index] = values[index];
- }
- return array;
- }
-
- /**
- * A specialized version of `_.some` for arrays without support for iteratee
- * shorthands.
- *
- * @private
- * @param {Array} [array] The array to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {boolean} Returns `true` if any element passes the predicate check,
- * else `false`.
- */
- function arraySome(array, predicate) {
- var index = -1,
- length = array == null ? 0 : array.length;
-
- while (++index < length) {
- if (predicate(array[index], index, array)) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * The base implementation of `_.times` without support for iteratee shorthands
- * or max array length checks.
- *
- * @private
- * @param {number} n The number of times to invoke `iteratee`.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns the array of results.
- */
- function baseTimes(n, iteratee) {
- var index = -1,
- result = Array(n);
-
- while (++index < n) {
- result[index] = iteratee(index);
- }
- return result;
- }
-
- /**
- * The base implementation of `_.unary` without support for storing metadata.
- *
- * @private
- * @param {Function} func The function to cap arguments for.
- * @returns {Function} Returns the new capped function.
- */
- function baseUnary(func) {
- return function(value) {
- return func(value);
- };
- }
-
- /**
- * Checks if a `cache` value for `key` exists.
- *
- * @private
- * @param {Object} cache The cache to query.
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
- function cacheHas(cache, key) {
- return cache.has(key);
- }
-
- /**
- * Gets the value at `key` of `object`.
- *
- * @private
- * @param {Object} [object] The object to query.
- * @param {string} key The key of the property to get.
- * @returns {*} Returns the property value.
- */
- function getValue(object, key) {
- return object == null ? undefined : object[key];
- }
-
- /**
- * Converts `map` to its key-value pairs.
- *
- * @private
- * @param {Object} map The map to convert.
- * @returns {Array} Returns the key-value pairs.
- */
- function mapToArray(map) {
- var index = -1,
- result = Array(map.size);
-
- map.forEach(function(value, key) {
- result[++index] = [key, value];
- });
- return result;
- }
-
- /**
- * Creates a unary function that invokes `func` with its argument transformed.
- *
- * @private
- * @param {Function} func The function to wrap.
- * @param {Function} transform The argument transform.
- * @returns {Function} Returns the new function.
- */
- function overArg(func, transform) {
- return function(arg) {
- return func(transform(arg));
- };
- }
-
- /**
- * Converts `set` to an array of its values.
- *
- * @private
- * @param {Object} set The set to convert.
- * @returns {Array} Returns the values.
- */
- function setToArray(set) {
- var index = -1,
- result = Array(set.size);
-
- set.forEach(function(value) {
- result[++index] = value;
- });
- return result;
- }
-
- /** Used for built-in method references. */
- var arrayProto = Array.prototype,
- funcProto = Function.prototype,
- objectProto = Object.prototype;
-
- /** Used to detect overreaching core-js shims. */
- var coreJsData = root['__core-js_shared__'];
-
- /** Used to resolve the decompiled source of functions. */
- var funcToString = funcProto.toString;
-
- /** Used to check objects for own properties. */
- var hasOwnProperty = objectProto.hasOwnProperty;
-
- /** Used to detect methods masquerading as native. */
- var maskSrcKey = (function() {
- var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
- return uid ? ('Symbol(src)_1.' + uid) : '';
- }());
-
- /**
- * Used to resolve the
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
- * of values.
- */
- var nativeObjectToString = objectProto.toString;
-
- /** Used to detect if a method is native. */
- var reIsNative = RegExp('^' +
- funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
- .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
- );
-
- /** Built-in value references. */
- var Buffer = moduleExports ? root.Buffer : undefined,
- Symbol = root.Symbol,
- Uint8Array = root.Uint8Array,
- propertyIsEnumerable = objectProto.propertyIsEnumerable,
- splice = arrayProto.splice,
- symToStringTag = Symbol ? Symbol.toStringTag : undefined;
-
- /* Built-in method references for those with the same name as other `lodash` methods. */
- var nativeGetSymbols = Object.getOwnPropertySymbols,
- nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
- nativeKeys = overArg(Object.keys, Object);
-
- /* Built-in method references that are verified to be native. */
- var DataView = getNative(root, 'DataView'),
- Map = getNative(root, 'Map'),
- Promise = getNative(root, 'Promise'),
- Set = getNative(root, 'Set'),
- WeakMap = getNative(root, 'WeakMap'),
- nativeCreate = getNative(Object, 'create');
-
- /** Used to detect maps, sets, and weakmaps. */
- var dataViewCtorString = toSource(DataView),
- mapCtorString = toSource(Map),
- promiseCtorString = toSource(Promise),
- setCtorString = toSource(Set),
- weakMapCtorString = toSource(WeakMap);
-
- /** Used to convert symbols to primitives and strings. */
- var symbolProto = Symbol ? Symbol.prototype : undefined,
- symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
-
- /**
- * Creates a hash object.
- *
- * @private
- * @constructor
- * @param {Array} [entries] The key-value pairs to cache.
- */
- function Hash(entries) {
- var index = -1,
- length = entries == null ? 0 : entries.length;
-
- this.clear();
- while (++index < length) {
- var entry = entries[index];
- this.set(entry[0], entry[1]);
- }
- }
-
- /**
- * Removes all key-value entries from the hash.
- *
- * @private
- * @name clear
- * @memberOf Hash
- */
- function hashClear() {
- this.__data__ = nativeCreate ? nativeCreate(null) : {};
- this.size = 0;
- }
-
- /**
- * Removes `key` and its value from the hash.
- *
- * @private
- * @name delete
- * @memberOf Hash
- * @param {Object} hash The hash to modify.
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
- function hashDelete(key) {
- var result = this.has(key) && delete this.__data__[key];
- this.size -= result ? 1 : 0;
- return result;
- }
-
- /**
- * Gets the hash value for `key`.
- *
- * @private
- * @name get
- * @memberOf Hash
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
- function hashGet(key) {
- var data = this.__data__;
- if (nativeCreate) {
- var result = data[key];
- return result === HASH_UNDEFINED ? undefined : result;
- }
- return hasOwnProperty.call(data, key) ? data[key] : undefined;
- }
-
- /**
- * Checks if a hash value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf Hash
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
- function hashHas(key) {
- var data = this.__data__;
- return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
- }
-
- /**
- * Sets the hash `key` to `value`.
- *
- * @private
- * @name set
- * @memberOf Hash
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns the hash instance.
- */
- function hashSet(key, value) {
- var data = this.__data__;
- this.size += this.has(key) ? 0 : 1;
- data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
- return this;
- }
-
- // Add methods to `Hash`.
- Hash.prototype.clear = hashClear;
- Hash.prototype['delete'] = hashDelete;
- Hash.prototype.get = hashGet;
- Hash.prototype.has = hashHas;
- Hash.prototype.set = hashSet;
-
- /**
- * Creates an list cache object.
- *
- * @private
- * @constructor
- * @param {Array} [entries] The key-value pairs to cache.
- */
- function ListCache(entries) {
- var index = -1,
- length = entries == null ? 0 : entries.length;
-
- this.clear();
- while (++index < length) {
- var entry = entries[index];
- this.set(entry[0], entry[1]);
- }
- }
-
- /**
- * Removes all key-value entries from the list cache.
- *
- * @private
- * @name clear
- * @memberOf ListCache
- */
- function listCacheClear() {
- this.__data__ = [];
- this.size = 0;
- }
-
- /**
- * Removes `key` and its value from the list cache.
- *
- * @private
- * @name delete
- * @memberOf ListCache
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
- function listCacheDelete(key) {
- var data = this.__data__,
- index = assocIndexOf(data, key);
-
- if (index < 0) {
- return false;
- }
- var lastIndex = data.length - 1;
- if (index == lastIndex) {
- data.pop();
- } else {
- splice.call(data, index, 1);
- }
- --this.size;
- return true;
- }
-
- /**
- * Gets the list cache value for `key`.
- *
- * @private
- * @name get
- * @memberOf ListCache
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
- function listCacheGet(key) {
- var data = this.__data__,
- index = assocIndexOf(data, key);
-
- return index < 0 ? undefined : data[index][1];
- }
-
- /**
- * Checks if a list cache value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf ListCache
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
- function listCacheHas(key) {
- return assocIndexOf(this.__data__, key) > -1;
- }
-
- /**
- * Sets the list cache `key` to `value`.
- *
- * @private
- * @name set
- * @memberOf ListCache
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns the list cache instance.
- */
- function listCacheSet(key, value) {
- var data = this.__data__,
- index = assocIndexOf(data, key);
-
- if (index < 0) {
- ++this.size;
- data.push([key, value]);
- } else {
- data[index][1] = value;
- }
- return this;
- }
-
- // Add methods to `ListCache`.
- ListCache.prototype.clear = listCacheClear;
- ListCache.prototype['delete'] = listCacheDelete;
- ListCache.prototype.get = listCacheGet;
- ListCache.prototype.has = listCacheHas;
- ListCache.prototype.set = listCacheSet;
-
- /**
- * Creates a map cache object to store key-value pairs.
- *
- * @private
- * @constructor
- * @param {Array} [entries] The key-value pairs to cache.
- */
- function MapCache(entries) {
- var index = -1,
- length = entries == null ? 0 : entries.length;
-
- this.clear();
- while (++index < length) {
- var entry = entries[index];
- this.set(entry[0], entry[1]);
- }
- }
-
- /**
- * Removes all key-value entries from the map.
- *
- * @private
- * @name clear
- * @memberOf MapCache
- */
- function mapCacheClear() {
- this.size = 0;
- this.__data__ = {
- 'hash': new Hash,
- 'map': new (Map || ListCache),
- 'string': new Hash
- };
- }
-
- /**
- * Removes `key` and its value from the map.
- *
- * @private
- * @name delete
- * @memberOf MapCache
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
- function mapCacheDelete(key) {
- var result = getMapData(this, key)['delete'](key);
- this.size -= result ? 1 : 0;
- return result;
- }
-
- /**
- * Gets the map value for `key`.
- *
- * @private
- * @name get
- * @memberOf MapCache
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
- function mapCacheGet(key) {
- return getMapData(this, key).get(key);
- }
-
- /**
- * Checks if a map value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf MapCache
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
- function mapCacheHas(key) {
- return getMapData(this, key).has(key);
- }
-
- /**
- * Sets the map `key` to `value`.
- *
- * @private
- * @name set
- * @memberOf MapCache
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns the map cache instance.
- */
- function mapCacheSet(key, value) {
- var data = getMapData(this, key),
- size = data.size;
-
- data.set(key, value);
- this.size += data.size == size ? 0 : 1;
- return this;
- }
-
- // Add methods to `MapCache`.
- MapCache.prototype.clear = mapCacheClear;
- MapCache.prototype['delete'] = mapCacheDelete;
- MapCache.prototype.get = mapCacheGet;
- MapCache.prototype.has = mapCacheHas;
- MapCache.prototype.set = mapCacheSet;
-
- /**
- *
- * Creates an array cache object to store unique values.
- *
- * @private
- * @constructor
- * @param {Array} [values] The values to cache.
- */
- function SetCache(values) {
- var index = -1,
- length = values == null ? 0 : values.length;
-
- this.__data__ = new MapCache;
- while (++index < length) {
- this.add(values[index]);
- }
- }
-
- /**
- * Adds `value` to the array cache.
- *
- * @private
- * @name add
- * @memberOf SetCache
- * @alias push
- * @param {*} value The value to cache.
- * @returns {Object} Returns the cache instance.
- */
- function setCacheAdd(value) {
- this.__data__.set(value, HASH_UNDEFINED);
- return this;
- }
-
- /**
- * Checks if `value` is in the array cache.
- *
- * @private
- * @name has
- * @memberOf SetCache
- * @param {*} value The value to search for.
- * @returns {number} Returns `true` if `value` is found, else `false`.
- */
- function setCacheHas(value) {
- return this.__data__.has(value);
- }
-
- // Add methods to `SetCache`.
- SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
- SetCache.prototype.has = setCacheHas;
-
- /**
- * Creates a stack cache object to store key-value pairs.
- *
- * @private
- * @constructor
- * @param {Array} [entries] The key-value pairs to cache.
- */
- function Stack(entries) {
- var data = this.__data__ = new ListCache(entries);
- this.size = data.size;
- }
-
- /**
- * Removes all key-value entries from the stack.
- *
- * @private
- * @name clear
- * @memberOf Stack
- */
- function stackClear() {
- this.__data__ = new ListCache;
- this.size = 0;
- }
-
- /**
- * Removes `key` and its value from the stack.
- *
- * @private
- * @name delete
- * @memberOf Stack
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
- function stackDelete(key) {
- var data = this.__data__,
- result = data['delete'](key);
-
- this.size = data.size;
- return result;
- }
-
- /**
- * Gets the stack value for `key`.
- *
- * @private
- * @name get
- * @memberOf Stack
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
- function stackGet(key) {
- return this.__data__.get(key);
- }
-
- /**
- * Checks if a stack value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf Stack
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
- function stackHas(key) {
- return this.__data__.has(key);
- }
-
- /**
- * Sets the stack `key` to `value`.
- *
- * @private
- * @name set
- * @memberOf Stack
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns the stack cache instance.
- */
- function stackSet(key, value) {
- var data = this.__data__;
- if (data instanceof ListCache) {
- var pairs = data.__data__;
- if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
- pairs.push([key, value]);
- this.size = ++data.size;
- return this;
- }
- data = this.__data__ = new MapCache(pairs);
- }
- data.set(key, value);
- this.size = data.size;
- return this;
- }
-
- // Add methods to `Stack`.
- Stack.prototype.clear = stackClear;
- Stack.prototype['delete'] = stackDelete;
- Stack.prototype.get = stackGet;
- Stack.prototype.has = stackHas;
- Stack.prototype.set = stackSet;
-
- /**
- * Creates an array of the enumerable property names of the array-like `value`.
- *
- * @private
- * @param {*} value The value to query.
- * @param {boolean} inherited Specify returning inherited property names.
- * @returns {Array} Returns the array of property names.
- */
- function arrayLikeKeys(value, inherited) {
- var isArr = isArray(value),
- isArg = !isArr && isArguments(value),
- isBuff = !isArr && !isArg && isBuffer(value),
- isType = !isArr && !isArg && !isBuff && isTypedArray(value),
- skipIndexes = isArr || isArg || isBuff || isType,
- result = skipIndexes ? baseTimes(value.length, String) : [],
- length = result.length;
-
- for (var key in value) {
- if ((inherited || hasOwnProperty.call(value, key)) &&
- !(skipIndexes && (
- // Safari 9 has enumerable `arguments.length` in strict mode.
- key == 'length' ||
- // Node.js 0.10 has enumerable non-index properties on buffers.
- (isBuff && (key == 'offset' || key == 'parent')) ||
- // PhantomJS 2 has enumerable non-index properties on typed arrays.
- (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
- // Skip index properties.
- isIndex(key, length)
- ))) {
- result.push(key);
- }
- }
- return result;
- }
-
- /**
- * Gets the index at which the `key` is found in `array` of key-value pairs.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {*} key The key to search for.
- * @returns {number} Returns the index of the matched value, else `-1`.
- */
- function assocIndexOf(array, key) {
- var length = array.length;
- while (length--) {
- if (eq(array[length][0], key)) {
- return length;
- }
- }
- return -1;
- }
-
- /**
- * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
- * `keysFunc` and `symbolsFunc` to get the enumerable property names and
- * symbols of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Function} keysFunc The function to get the keys of `object`.
- * @param {Function} symbolsFunc The function to get the symbols of `object`.
- * @returns {Array} Returns the array of property names and symbols.
- */
- function baseGetAllKeys(object, keysFunc, symbolsFunc) {
- var result = keysFunc(object);
- return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
- }
-
- /**
- * The base implementation of `getTag` without fallbacks for buggy environments.
- *
- * @private
- * @param {*} value The value to query.
- * @returns {string} Returns the `toStringTag`.
- */
- function baseGetTag(value) {
- if (value == null) {
- return value === undefined ? undefinedTag : nullTag;
- }
- return (symToStringTag && symToStringTag in Object(value))
- ? getRawTag(value)
- : objectToString(value);
- }
-
- /**
- * The base implementation of `_.isArguments`.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
- */
- function baseIsArguments(value) {
- return isObjectLike(value) && baseGetTag(value) == argsTag;
- }
-
- /**
- * The base implementation of `_.isEqual` which supports partial comparisons
- * and tracks traversed objects.
- *
- * @private
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @param {boolean} bitmask The bitmask flags.
- * 1 - Unordered comparison
- * 2 - Partial comparison
- * @param {Function} [customizer] The function to customize comparisons.
- * @param {Object} [stack] Tracks traversed `value` and `other` objects.
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
- */
- function baseIsEqual(value, other, bitmask, customizer, stack) {
- if (value === other) {
- return true;
- }
- if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
- return value !== value && other !== other;
- }
- return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
- }
-
- /**
- * A specialized version of `baseIsEqual` for arrays and objects which performs
- * deep comparisons and tracks traversed objects enabling objects with circular
- * references to be compared.
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
- * @param {Function} customizer The function to customize comparisons.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Object} [stack] Tracks traversed `object` and `other` objects.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
- */
- function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
- var objIsArr = isArray(object),
- othIsArr = isArray(other),
- objTag = objIsArr ? arrayTag : getTag(object),
- othTag = othIsArr ? arrayTag : getTag(other);
-
- objTag = objTag == argsTag ? objectTag : objTag;
- othTag = othTag == argsTag ? objectTag : othTag;
-
- var objIsObj = objTag == objectTag,
- othIsObj = othTag == objectTag,
- isSameTag = objTag == othTag;
-
- if (isSameTag && isBuffer(object)) {
- if (!isBuffer(other)) {
- return false;
- }
- objIsArr = true;
- objIsObj = false;
- }
- if (isSameTag && !objIsObj) {
- stack || (stack = new Stack);
- return (objIsArr || isTypedArray(object))
- ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
- : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
- }
- if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
- var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
- othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
-
- if (objIsWrapped || othIsWrapped) {
- var objUnwrapped = objIsWrapped ? object.value() : object,
- othUnwrapped = othIsWrapped ? other.value() : other;
-
- stack || (stack = new Stack);
- return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
- }
- }
- if (!isSameTag) {
- return false;
- }
- stack || (stack = new Stack);
- return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
- }
-
- /**
- * The base implementation of `_.isNative` without bad shim checks.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a native function,
- * else `false`.
- */
- function baseIsNative(value) {
- if (!isObject(value) || isMasked(value)) {
- return false;
- }
- var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
- return pattern.test(toSource(value));
- }
-
- /**
- * The base implementation of `_.isTypedArray` without Node.js optimizations.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
- */
- function baseIsTypedArray(value) {
- return isObjectLike(value) &&
- isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
- }
-
- /**
- * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- */
- function baseKeys(object) {
- if (!isPrototype(object)) {
- return nativeKeys(object);
- }
- var result = [];
- for (var key in Object(object)) {
- if (hasOwnProperty.call(object, key) && key != 'constructor') {
- result.push(key);
- }
- }
- return result;
- }
-
- /**
- * A specialized version of `baseIsEqualDeep` for arrays with support for
- * partial deep comparisons.
- *
- * @private
- * @param {Array} array The array to compare.
- * @param {Array} other The other array to compare.
- * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
- * @param {Function} customizer The function to customize comparisons.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Object} stack Tracks traversed `array` and `other` objects.
- * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
- */
- function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
- arrLength = array.length,
- othLength = other.length;
-
- if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
- return false;
- }
- // Assume cyclic values are equal.
- var stacked = stack.get(array);
- if (stacked && stack.get(other)) {
- return stacked == other;
- }
- var index = -1,
- result = true,
- seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
-
- stack.set(array, other);
- stack.set(other, array);
-
- // Ignore non-index properties.
- while (++index < arrLength) {
- var arrValue = array[index],
- othValue = other[index];
-
- if (customizer) {
- var compared = isPartial
- ? customizer(othValue, arrValue, index, other, array, stack)
- : customizer(arrValue, othValue, index, array, other, stack);
- }
- if (compared !== undefined) {
- if (compared) {
- continue;
- }
- result = false;
- break;
- }
- // Recursively compare arrays (susceptible to call stack limits).
- if (seen) {
- if (!arraySome(other, function(othValue, othIndex) {
- if (!cacheHas(seen, othIndex) &&
- (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
- return seen.push(othIndex);
- }
- })) {
- result = false;
- break;
- }
- } else if (!(
- arrValue === othValue ||
- equalFunc(arrValue, othValue, bitmask, customizer, stack)
- )) {
- result = false;
- break;
- }
- }
- stack['delete'](array);
- stack['delete'](other);
- return result;
- }
-
- /**
- * A specialized version of `baseIsEqualDeep` for comparing objects of
- * the same `toStringTag`.
- *
- * **Note:** This function only supports comparing values with tags of
- * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {string} tag The `toStringTag` of the objects to compare.
- * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
- * @param {Function} customizer The function to customize comparisons.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Object} stack Tracks traversed `object` and `other` objects.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
- */
- function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
- switch (tag) {
- case dataViewTag:
- if ((object.byteLength != other.byteLength) ||
- (object.byteOffset != other.byteOffset)) {
- return false;
- }
- object = object.buffer;
- other = other.buffer;
-
- case arrayBufferTag:
- if ((object.byteLength != other.byteLength) ||
- !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
- return false;
- }
- return true;
-
- case boolTag:
- case dateTag:
- case numberTag:
- // Coerce booleans to `1` or `0` and dates to milliseconds.
- // Invalid dates are coerced to `NaN`.
- return eq(+object, +other);
-
- case errorTag:
- return object.name == other.name && object.message == other.message;
-
- case regexpTag:
- case stringTag:
- // Coerce regexes to strings and treat strings, primitives and objects,
- // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
- // for more details.
- return object == (other + '');
-
- case mapTag:
- var convert = mapToArray;
-
- case setTag:
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
- convert || (convert = setToArray);
-
- if (object.size != other.size && !isPartial) {
- return false;
- }
- // Assume cyclic values are equal.
- var stacked = stack.get(object);
- if (stacked) {
- return stacked == other;
- }
- bitmask |= COMPARE_UNORDERED_FLAG;
-
- // Recursively compare objects (susceptible to call stack limits).
- stack.set(object, other);
- var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
- stack['delete'](object);
- return result;
-
- case symbolTag:
- if (symbolValueOf) {
- return symbolValueOf.call(object) == symbolValueOf.call(other);
- }
- }
- return false;
- }
-
- /**
- * A specialized version of `baseIsEqualDeep` for objects with support for
- * partial deep comparisons.
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
- * @param {Function} customizer The function to customize comparisons.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Object} stack Tracks traversed `object` and `other` objects.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
- */
- function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
- objProps = getAllKeys(object),
- objLength = objProps.length,
- othProps = getAllKeys(other),
- othLength = othProps.length;
-
- if (objLength != othLength && !isPartial) {
- return false;
- }
- var index = objLength;
- while (index--) {
- var key = objProps[index];
- if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
- return false;
- }
- }
- // Assume cyclic values are equal.
- var stacked = stack.get(object);
- if (stacked && stack.get(other)) {
- return stacked == other;
- }
- var result = true;
- stack.set(object, other);
- stack.set(other, object);
-
- var skipCtor = isPartial;
- while (++index < objLength) {
- key = objProps[index];
- var objValue = object[key],
- othValue = other[key];
-
- if (customizer) {
- var compared = isPartial
- ? customizer(othValue, objValue, key, other, object, stack)
- : customizer(objValue, othValue, key, object, other, stack);
- }
- // Recursively compare objects (susceptible to call stack limits).
- if (!(compared === undefined
- ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
- : compared
- )) {
- result = false;
- break;
- }
- skipCtor || (skipCtor = key == 'constructor');
- }
- if (result && !skipCtor) {
- var objCtor = object.constructor,
- othCtor = other.constructor;
-
- // Non `Object` object instances with different constructors are not equal.
- if (objCtor != othCtor &&
- ('constructor' in object && 'constructor' in other) &&
- !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
- typeof othCtor == 'function' && othCtor instanceof othCtor)) {
- result = false;
- }
- }
- stack['delete'](object);
- stack['delete'](other);
- return result;
- }
-
- /**
- * Creates an array of own enumerable property names and symbols of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names and symbols.
- */
- function getAllKeys(object) {
- return baseGetAllKeys(object, keys, getSymbols);
- }
-
- /**
- * Gets the data for `map`.
- *
- * @private
- * @param {Object} map The map to query.
- * @param {string} key The reference key.
- * @returns {*} Returns the map data.
- */
- function getMapData(map, key) {
- var data = map.__data__;
- return isKeyable(key)
- ? data[typeof key == 'string' ? 'string' : 'hash']
- : data.map;
- }
-
- /**
- * Gets the native function at `key` of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {string} key The key of the method to get.
- * @returns {*} Returns the function if it's native, else `undefined`.
- */
- function getNative(object, key) {
- var value = getValue(object, key);
- return baseIsNative(value) ? value : undefined;
- }
-
- /**
- * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
- *
- * @private
- * @param {*} value The value to query.
- * @returns {string} Returns the raw `toStringTag`.
- */
- function getRawTag(value) {
- var isOwn = hasOwnProperty.call(value, symToStringTag),
- tag = value[symToStringTag];
-
- try {
- value[symToStringTag] = undefined;
- var unmasked = true;
- } catch (e) {}
-
- var result = nativeObjectToString.call(value);
- if (unmasked) {
- if (isOwn) {
- value[symToStringTag] = tag;
- } else {
- delete value[symToStringTag];
- }
- }
- return result;
- }
-
- /**
- * Creates an array of the own enumerable symbols of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of symbols.
- */
- var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
- if (object == null) {
- return [];
- }
- object = Object(object);
- return arrayFilter(nativeGetSymbols(object), function(symbol) {
- return propertyIsEnumerable.call(object, symbol);
- });
- };
-
- /**
- * Gets the `toStringTag` of `value`.
- *
- * @private
- * @param {*} value The value to query.
- * @returns {string} Returns the `toStringTag`.
- */
- var getTag = baseGetTag;
-
- // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
- if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
- (Map && getTag(new Map) != mapTag) ||
- (Promise && getTag(Promise.resolve()) != promiseTag) ||
- (Set && getTag(new Set) != setTag) ||
- (WeakMap && getTag(new WeakMap) != weakMapTag)) {
- getTag = function(value) {
- var result = baseGetTag(value),
- Ctor = result == objectTag ? value.constructor : undefined,
- ctorString = Ctor ? toSource(Ctor) : '';
-
- if (ctorString) {
- switch (ctorString) {
- case dataViewCtorString: return dataViewTag;
- case mapCtorString: return mapTag;
- case promiseCtorString: return promiseTag;
- case setCtorString: return setTag;
- case weakMapCtorString: return weakMapTag;
- }
- }
- return result;
- };
- }
-
- /**
- * Checks if `value` is a valid array-like index.
- *
- * @private
- * @param {*} value The value to check.
- * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
- * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
- */
- function isIndex(value, length) {
- length = length == null ? MAX_SAFE_INTEGER : length;
- return !!length &&
- (typeof value == 'number' || reIsUint.test(value)) &&
- (value > -1 && value % 1 == 0 && value < length);
- }
-
- /**
- * Checks if `value` is suitable for use as unique object key.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
- */
- function isKeyable(value) {
- var type = typeof value;
- return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
- ? (value !== '__proto__')
- : (value === null);
- }
-
- /**
- * Checks if `func` has its source masked.
- *
- * @private
- * @param {Function} func The function to check.
- * @returns {boolean} Returns `true` if `func` is masked, else `false`.
- */
- function isMasked(func) {
- return !!maskSrcKey && (maskSrcKey in func);
- }
-
- /**
- * Checks if `value` is likely a prototype object.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
- */
- function isPrototype(value) {
- var Ctor = value && value.constructor,
- proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
-
- return value === proto;
- }
-
- /**
- * Converts `value` to a string using `Object.prototype.toString`.
- *
- * @private
- * @param {*} value The value to convert.
- * @returns {string} Returns the converted string.
- */
- function objectToString(value) {
- return nativeObjectToString.call(value);
- }
-
- /**
- * Converts `func` to its source code.
- *
- * @private
- * @param {Function} func The function to convert.
- * @returns {string} Returns the source code.
- */
- function toSource(func) {
- if (func != null) {
- try {
- return funcToString.call(func);
- } catch (e) {}
- try {
- return (func + '');
- } catch (e) {}
- }
- return '';
- }
-
- /**
- * Performs a
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
- * comparison between two values to determine if they are equivalent.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
- * @example
- *
- * var object = { 'a': 1 };
- * var other = { 'a': 1 };
- *
- * _.eq(object, object);
- * // => true
- *
- * _.eq(object, other);
- * // => false
- *
- * _.eq('a', 'a');
- * // => true
- *
- * _.eq('a', Object('a'));
- * // => false
- *
- * _.eq(NaN, NaN);
- * // => true
- */
- function eq(value, other) {
- return value === other || (value !== value && other !== other);
- }
-
- /**
- * Checks if `value` is likely an `arguments` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an `arguments` object,
- * else `false`.
- * @example
- *
- * _.isArguments(function() { return arguments; }());
- * // => true
- *
- * _.isArguments([1, 2, 3]);
- * // => false
- */
- var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
- return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
- !propertyIsEnumerable.call(value, 'callee');
- };
-
- /**
- * Checks if `value` is classified as an `Array` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an array, else `false`.
- * @example
- *
- * _.isArray([1, 2, 3]);
- * // => true
- *
- * _.isArray(document.body.children);
- * // => false
- *
- * _.isArray('abc');
- * // => false
- *
- * _.isArray(_.noop);
- * // => false
- */
- var isArray = Array.isArray;
-
- /**
- * Checks if `value` is array-like. A value is considered array-like if it's
- * not a function and has a `value.length` that's an integer greater than or
- * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
- * @example
- *
- * _.isArrayLike([1, 2, 3]);
- * // => true
- *
- * _.isArrayLike(document.body.children);
- * // => true
- *
- * _.isArrayLike('abc');
- * // => true
- *
- * _.isArrayLike(_.noop);
- * // => false
- */
- function isArrayLike(value) {
- return value != null && isLength(value.length) && !isFunction(value);
- }
-
- /**
- * Checks if `value` is a buffer.
- *
- * @static
- * @memberOf _
- * @since 4.3.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
- * @example
- *
- * _.isBuffer(new Buffer(2));
- * // => true
- *
- * _.isBuffer(new Uint8Array(2));
- * // => false
- */
- var isBuffer = nativeIsBuffer || stubFalse;
-
- /**
- * Performs a deep comparison between two values to determine if they are
- * equivalent.
- *
- * **Note:** This method supports comparing arrays, array buffers, booleans,
- * date objects, error objects, maps, numbers, `Object` objects, regexes,
- * sets, strings, symbols, and typed arrays. `Object` objects are compared
- * by their own, not inherited, enumerable properties. Functions and DOM
- * nodes are compared by strict equality, i.e. `===`.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
- * @example
- *
- * var object = { 'a': 1 };
- * var other = { 'a': 1 };
- *
- * _.isEqual(object, other);
- * // => true
- *
- * object === other;
- * // => false
- */
- function isEqual(value, other) {
- return baseIsEqual(value, other);
- }
-
- /**
- * Checks if `value` is classified as a `Function` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a function, else `false`.
- * @example
- *
- * _.isFunction(_);
- * // => true
- *
- * _.isFunction(/abc/);
- * // => false
- */
- function isFunction(value) {
- if (!isObject(value)) {
- return false;
- }
- // The use of `Object#toString` avoids issues with the `typeof` operator
- // in Safari 9 which returns 'object' for typed arrays and other constructors.
- var tag = baseGetTag(value);
- return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
- }
-
- /**
- * Checks if `value` is a valid array-like length.
- *
- * **Note:** This method is loosely based on
- * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
- * @example
- *
- * _.isLength(3);
- * // => true
- *
- * _.isLength(Number.MIN_VALUE);
- * // => false
- *
- * _.isLength(Infinity);
- * // => false
- *
- * _.isLength('3');
- * // => false
- */
- function isLength(value) {
- return typeof value == 'number' &&
- value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
- }
-
- /**
- * Checks if `value` is the
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
- * @example
- *
- * _.isObject({});
- * // => true
- *
- * _.isObject([1, 2, 3]);
- * // => true
- *
- * _.isObject(_.noop);
- * // => true
- *
- * _.isObject(null);
- * // => false
- */
- function isObject(value) {
- var type = typeof value;
- return value != null && (type == 'object' || type == 'function');
- }
-
- /**
- * Checks if `value` is object-like. A value is object-like if it's not `null`
- * and has a `typeof` result of "object".
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- * @example
- *
- * _.isObjectLike({});
- * // => true
- *
- * _.isObjectLike([1, 2, 3]);
- * // => true
- *
- * _.isObjectLike(_.noop);
- * // => false
- *
- * _.isObjectLike(null);
- * // => false
- */
- function isObjectLike(value) {
- return value != null && typeof value == 'object';
- }
-
- /**
- * Checks if `value` is classified as a typed array.
- *
- * @static
- * @memberOf _
- * @since 3.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
- * @example
- *
- * _.isTypedArray(new Uint8Array);
- * // => true
- *
- * _.isTypedArray([]);
- * // => false
- */
- var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
-
- /**
- * Creates an array of the own enumerable property names of `object`.
- *
- * **Note:** Non-object values are coerced to objects. See the
- * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
- * for more details.
- *
- * @static
- * @since 0.1.0
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.keys(new Foo);
- * // => ['a', 'b'] (iteration order is not guaranteed)
- *
- * _.keys('hi');
- * // => ['0', '1']
- */
- function keys(object) {
- return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
- }
-
- /**
- * This method returns a new empty array.
- *
- * @static
- * @memberOf _
- * @since 4.13.0
- * @category Util
- * @returns {Array} Returns the new empty array.
- * @example
- *
- * var arrays = _.times(2, _.stubArray);
- *
- * console.log(arrays);
- * // => [[], []]
- *
- * console.log(arrays[0] === arrays[1]);
- * // => false
- */
- function stubArray() {
- return [];
- }
-
- /**
- * This method returns `false`.
- *
- * @static
- * @memberOf _
- * @since 4.13.0
- * @category Util
- * @returns {boolean} Returns `false`.
- * @example
- *
- * _.times(2, _.stubFalse);
- * // => [false, false]
- */
- function stubFalse() {
- return false;
- }
-
- module.exports = isEqual;
-
- /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(199)(module)))
-
-/***/ }),
-/* 250 */
-/***/ (function(module, exports, __webpack_require__) {
-
- 'use strict';
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
- var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
-
- var _react = __webpack_require__(1);
-
- var _react2 = _interopRequireDefault(_react);
-
- var _reactDom = __webpack_require__(2);
-
- var _reactDom2 = _interopRequireDefault(_reactDom);
-
- var _reactBeautifulDnd = __webpack_require__(150);
-
- var _util = __webpack_require__(251);
-
- var _classnames = __webpack_require__(5);
-
- var _classnames2 = _interopRequireDefault(_classnames);
-
- var _lodash = __webpack_require__(249);
-
- var _lodash2 = _interopRequireDefault(_lodash);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
-
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
-
- var reorder = function reorder(list, startIndex, endIndex) {
- var result = Array.from(list);
-
- var _result$splice = result.splice(startIndex, 1),
- _result$splice2 = _slicedToArray(_result$splice, 1),
- removed = _result$splice2[0];
-
- result.splice(endIndex, 0, removed);
-
- return result;
- };
-
- var Vertical = function (_Component) {
- _inherits(Vertical, _Component);
-
- function Vertical(props) {
- _classCallCheck(this, Vertical);
-
- var _this = _possibleConstructorReturn(this, _Component.call(this, props));
-
- _this.onDragEnd = function (result) {
- if (!result.destination) {
- return;
- }
- var items = reorder(_this.state.items, result.source.index, result.destination.index);
-
- _this.setState({
- items: items
- });
- _this.props.onStop(result, items);
- };
-
- _this.onDragStart = function (result) {
- _this.props.onStart(result, _this.state.items);
- };
-
- _this.state = {
- items: _this.props.list || []
- };
- return _this;
- }
-
- Vertical.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
- if (!(0, _lodash2["default"])(this.state.items, nextProps.list)) {
- this.setState({
- items: nextProps.list
- });
- }
- };
-
- Vertical.prototype.render = function render() {
- var _this2 = this;
-
- var _props = this.props,
- onStart = _props.onStart,
- onDrag = _props.onDrag,
- onStop = _props.onStop,
- onDragUpdate = _props.onDragUpdate,
- dropClass = _props.dropClass,
- dropOverClass = _props.dropOverClass,
- dragClass = _props.dragClass,
- dragingClass = _props.dragingClass,
- showKey = _props.showKey,
- type = _props.type;
-
-
- return _react2["default"].createElement(
- _reactBeautifulDnd.DragDropContext,
- { onDragEnd: this.onDragEnd, onDragStart: this.onDragStart, onDragUpdate: onDragUpdate },
- _react2["default"].createElement(
- _reactBeautifulDnd.Droppable,
- { droppableId: 'droppable', direction: type },
- function (provided, snapshot) {
- return _react2["default"].createElement(
- 'div',
- {
- ref: provided.innerRef,
- className: (0, _classnames2["default"])(_extends({}, (0, _util.getClass)(_this2.props, snapshot.isDraggingOver).drop))
- },
- _this2.state.items.map(function (item, index) {
- return _react2["default"].createElement(
- _reactBeautifulDnd.Draggable,
- { key: index, draggableId: index, index: index },
- function (provided, snapshot) {
- return _react2["default"].createElement(
- 'div',
- _extends({
- ref: provided.innerRef
- }, provided.draggableProps, provided.dragHandleProps, {
- className: (0, _classnames2["default"])(_extends({}, (0, _util.getClass)(_this2.props, snapshot.isDragging).drag)),
- style: _extends({}, provided.draggableProps.style)
- }),
- showKey ? item[showKey] : item
- );
- }
- );
- }),
- provided.placeholder
- );
- }
- )
- );
- };
-
- return Vertical;
- }(_react.Component);
-
- exports["default"] = Vertical;
- module.exports = exports['default'];
-
-/***/ }),
-/* 251 */
-/***/ (function(module, exports) {
-
- 'use strict';
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- var getClass = exports.getClass = function getClass(props, doing) {
- var dropClass = props.dropClass,
- dropOverClass = props.dropOverClass,
- dragClass = props.dragClass,
- dragingClass = props.dragingClass,
- type = props.type;
-
-
- var verticalObj = {
- drop: {}, drag: {}
- };
- verticalObj.drop['u-drop ' + dropClass] = true;
- verticalObj.drop['u-droping ' + dropOverClass] = doing;
- verticalObj.drag['u-drag ' + dragClass] = true;
- verticalObj.drag['u-draging ' + dragingClass] = doing;
-
- var horizontalObj = {
- drop: {}, drag: {}
- };
- horizontalObj.drop['u-drop u-drop-horizontal ' + dropClass] = true;
- horizontalObj.drop['u-droping u-droping-horizontal ' + dropOverClass] = doing;
- horizontalObj.drag['u-drag u-drag-horizontal ' + dragClass] = true;
- horizontalObj.drag['u-draging u-draging-horizontal ' + dragingClass] = doing;
-
- switch (type) {
- case 'vertical':
- return verticalObj;
- break;
- case 'horizontal':
- return horizontalObj;
- break;
- case 'betweenVertical':
- return verticalObj;
- break;
- case 'betweenHorizontal':
- return horizontalObj;
- break;
- }
- };
-
-/***/ }),
-/* 252 */
-/***/ (function(module, exports, __webpack_require__) {
-
- 'use strict';
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
- var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
-
- var _react = __webpack_require__(1);
-
- var _react2 = _interopRequireDefault(_react);
-
- var _reactDom = __webpack_require__(2);
-
- var _reactDom2 = _interopRequireDefault(_reactDom);
-
- var _reactBeautifulDnd = __webpack_require__(150);
-
- var _util = __webpack_require__(251);
-
- var _classnames = __webpack_require__(5);
-
- var _classnames2 = _interopRequireDefault(_classnames);
-
- var _lodash = __webpack_require__(249);
-
- var _lodash2 = _interopRequireDefault(_lodash);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
-
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
-
- var reorder = function reorder(list, startIndex, endIndex) {
- var result = Array.from(list);
-
- var _result$splice = result.splice(startIndex, 1),
- _result$splice2 = _slicedToArray(_result$splice, 1),
- removed = _result$splice2[0];
-
- result.splice(endIndex, 0, removed);
-
- return result;
- };
-
- /**
- * Moves an item from one list to another list.
- */
- var move = function move(source, destination, droppableSource, droppableDestination) {
- var sourceClone = Array.from(source);
- var destClone = Array.from(destination);
-
- var _sourceClone$splice = sourceClone.splice(droppableSource.index, 1),
- _sourceClone$splice2 = _slicedToArray(_sourceClone$splice, 1),
- removed = _sourceClone$splice2[0];
-
- destClone.splice(droppableDestination.index, 0, removed);
-
- var result = {};
- result[droppableSource.droppableId] = sourceClone;
- result[droppableDestination.droppableId] = destClone;
-
- return result;
- };
-
- var Between = function (_Component) {
- _inherits(Between, _Component);
-
- function Between(props) {
- _classCallCheck(this, Between);
-
- var _this = _possibleConstructorReturn(this, _Component.call(this, props));
-
- _this.id2List = {
- droppable: 'items',
- droppable2: 'selected'
- };
-
- _this.getList = function (id) {
- return _this.state[_this.id2List[id]];
- };
-
- _this.onDragEnd = function (result) {
- console.log(result);
- var source = result.source,
- destination = result.destination;
-
- // dropped outside the list
-
- if (!destination) {
- return;
- }
- var list = _this.state.items;
- var otherList = _this.state.selected;
-
- if (source.droppableId === destination.droppableId) {
- var items = reorder(_this.getList(source.droppableId), source.index, destination.index);
-
- var state = { items: items };
- list = items;
-
- if (source.droppableId === 'droppable2') {
- state = { selected: items };
- otherList = items;
- list = _this.state.items;
- }
- _this.setState(state);
- } else {
- var _result = move(_this.getList(source.droppableId), _this.getList(destination.droppableId), source, destination);
-
- _this.setState({
- items: _result.droppable,
- selected: _result.droppable2
- });
- list = _result.droppable;
- otherList = _result.droppable2;
- }
- _this.props.onStop(result, {
- list: list,
- otherList: otherList
- });
- };
-
- _this.onDragStart = function (result) {
- _this.props.onStart(result, {
- list: _this.state.list,
- otherList: _this.state.selected
- });
- };
-
- _this.state = {
- items: _this.props.list,
- selected: _this.props.otherList
- };
- return _this;
- }
-
- Between.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
- if (!(0, _lodash2["default"])(this.state.items, nextProps.list)) {
- this.setState({
- items: nextProps.list
- });
- }
- if (!(0, _lodash2["default"])(this.state.selected, nextProps.otherList)) {
- this.setState({
- selected: nextProps.otherList
- });
- }
- };
-
- Between.prototype.render = function render() {
- var _this2 = this;
-
- var _props = this.props,
- onStart = _props.onStart,
- onDrag = _props.onDrag,
- onStop = _props.onStop,
- onDragUpdate = _props.onDragUpdate,
- dropClass = _props.dropClass,
- dropOverClass = _props.dropOverClass,
- dragClass = _props.dragClass,
- dragingClass = _props.dragingClass,
- showKey = _props.showKey,
- type = _props.type;
-
-
- return _react2["default"].createElement(
- 'div',
- { className: (0, _classnames2["default"])({
- 'u-drag-between': type == 'betweenVertical',
- 'u-drag-between u-drag-between-horizontal': type == 'betweenHorizontal'
-
- }) },
- _react2["default"].createElement(
- _reactBeautifulDnd.DragDropContext,
- { onDragEnd: this.onDragEnd, onDragStart: this.onDragStart, onDragUpdate: onDragUpdate },
- _react2["default"].createElement(
- _reactBeautifulDnd.Droppable,
- { droppableId: 'droppable', direction: type == 'betweenVertical' ? 'vertical' : 'horizontal' },
- function (provided, snapshot) {
- return _react2["default"].createElement(
- 'div',
- {
- ref: provided.innerRef,
- className: (0, _classnames2["default"])(_extends({}, (0, _util.getClass)(_this2.props, snapshot.isDraggingOver).drop)) },
- _this2.state.items.map(function (item, index) {
- return _react2["default"].createElement(
- _reactBeautifulDnd.Draggable,
- {
- key: '1' + index,
- draggableId: '1' + index,
- index: index },
- function (provided, snapshot) {
- return _react2["default"].createElement(
- 'div',
- _extends({
- ref: provided.innerRef
- }, provided.draggableProps, provided.dragHandleProps, {
- className: (0, _classnames2["default"])(_extends({}, (0, _util.getClass)(_this2.props, snapshot.isDragging).drag)),
- style: _extends({}, provided.draggableProps.style) }),
- showKey ? item[showKey] : item
- );
- }
- );
- }),
- provided.placeholder
- );
- }
- ),
- _react2["default"].createElement(
- _reactBeautifulDnd.Droppable,
- { droppableId: 'droppable2', direction: type == 'betweenVertical' ? 'vertical' : 'horizontal' },
- function (provided, snapshot) {
- return _react2["default"].createElement(
- 'div',
- {
- ref: provided.innerRef,
- className: (0, _classnames2["default"])(_extends({}, (0, _util.getClass)(_this2.props, snapshot.isDraggingOver).drop)) },
- _this2.state.selected.map(function (item, index) {
- return _react2["default"].createElement(
- _reactBeautifulDnd.Draggable,
- {
- key: '2' + index,
- draggableId: '2' + index,
- index: index },
- function (provided, snapshot) {
- return _react2["default"].createElement(
- 'div',
- _extends({
- ref: provided.innerRef
- }, provided.draggableProps, provided.dragHandleProps, {
- className: (0, _classnames2["default"])(_extends({}, (0, _util.getClass)(_this2.props, snapshot.isDragging).drag)),
- style: _extends({}, provided.draggableProps.style) }),
- showKey ? item[showKey] : item
- );
- }
- );
- }),
- provided.placeholder
- );
- }
- )
- )
- );
- };
-
- return Between;
- }(_react.Component);
-
- exports["default"] = Between;
- module.exports = exports['default'];
-
-/***/ }),
-/* 253 */
-/***/ (function(module, exports, __webpack_require__) {
-
- 'use strict';
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _classnames = __webpack_require__(5);
@@ -31687,7 +15471,7 @@
module.exports = exports['default'];
/***/ }),
-/* 254 */
+/* 149 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -31710,10 +15494,6 @@
var _propTypes2 = _interopRequireDefault(_propTypes);
- var _beeDnd = __webpack_require__(148);
-
- var _beeDnd2 = _interopRequireDefault(_beeDnd);
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
@@ -31729,8 +15509,8 @@
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
var propTypes = {
- /**
- * 传给dialog的classname
+ /**
+ * 传给dialog的classname
*/
dialogClassName: _propTypes2["default"].string,
contentStyle: _propTypes2["default"].object
@@ -31745,19 +15525,9 @@
_inherits(ModalDialog, _React$Component);
function ModalDialog() {
- var _temp, _this, _ret;
-
_classCallCheck(this, ModalDialog);
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
-
- return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.onStart = function () {
- var draggable = _this.props.draggable;
-
- return draggable;
- }, _temp), _possibleConstructorReturn(_this, _ret);
+ return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
}
ModalDialog.prototype.render = function render() {
@@ -31771,8 +15541,7 @@
style = _props.style,
contentStyle = _props.contentStyle,
children = _props.children,
- draggable = _props.draggable,
- props = _objectWithoutProperties(_props, ['dialogClassName', 'className', 'clsPrefix', 'size', 'style', 'contentStyle', 'children', 'draggable']);
+ props = _objectWithoutProperties(_props, ['dialogClassName', 'className', 'clsPrefix', 'size', 'style', 'contentStyle', 'children']);
// const [bsProps, elementProps] = splitBsProps(props);
//
@@ -31785,9 +15554,6 @@
if (size) {
dialogClasses[clsPrefix + '-' + size] = true;
}
- if (draggable) {
- dialogClasses[clsPrefix + '-draggable'] = true;
- }
return _react2["default"].createElement(
'div',
@@ -31801,13 +15567,9 @@
'div',
{ className: (0, _classnames2["default"])(dialogClassName, dialogClasses), style: style },
_react2["default"].createElement(
- _beeDnd2["default"],
- { handle: '.dnd-handle', cancel: '.dnd-cancel', onStart: this.onStart, onStop: this.onStop },
- _react2["default"].createElement(
- 'div',
- { style: contentStyle, className: (0, _classnames2["default"])([clsPrefix + '-content']), role: 'document' },
- children
- )
+ 'div',
+ { style: contentStyle, className: (0, _classnames2["default"])([clsPrefix + '-content']), role: 'document' },
+ children
)
)
);
@@ -31823,7 +15585,7 @@
module.exports = exports['default'];
/***/ }),
-/* 255 */
+/* 150 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -31899,7 +15661,7 @@
module.exports = exports['default'];
/***/ }),
-/* 256 */
+/* 151 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -31938,13 +15700,13 @@
var propTypes = {
- /**
- * 是否显示关闭按钮
+ /**
+ * 是否显示关闭按钮
*/
closeButton: _propTypes2["default"].bool,
- /**
- * 关闭时的钩子函数
+ /**
+ * 关闭时的钩子函数
*/
onHide: _propTypes2["default"].func
};
@@ -31984,7 +15746,7 @@
var classes = {};
classes['' + clsPrefix] = true;
- classes['dnd-handle'] = true;
+
return _react2["default"].createElement(
'div',
_extends({}, props, {
@@ -31994,7 +15756,7 @@
'button',
{
type: 'button',
- className: 'u-close dnd-cancel',
+ className: 'u-close',
'aria-label': label,
onClick: (0, _tinperBeeCore.createChainedFunction)(modal.onHide, onHide)
},
@@ -32019,7 +15781,7 @@
module.exports = exports['default'];
/***/ }),
-/* 257 */
+/* 152 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -32079,7 +15841,6 @@
var classes = {};
classes['' + clsPrefix] = true;
- classes['clearfix'] = true;
return _react2["default"].createElement(Component, _extends({}, props, {
className: (0, _classnames2["default"])(className, classes)
@@ -32096,7 +15857,7 @@
module.exports = exports['default'];
/***/ }),
-/* 258 */
+/* 153 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -32105,222 +15866,300 @@
value: true
});
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+ var _FormControl = __webpack_require__(154);
- exports["default"] = confirm;
+ var _FormControl2 = _interopRequireDefault(_FormControl);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+ exports["default"] = _FormControl2["default"];
+ module.exports = exports['default'];
+
+/***/ }),
+/* 154 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ 'use strict';
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _react = __webpack_require__(1);
var _react2 = _interopRequireDefault(_react);
- var _reactDom = __webpack_require__(2);
-
- var _reactDom2 = _interopRequireDefault(_reactDom);
-
var _classnames = __webpack_require__(5);
var _classnames2 = _interopRequireDefault(_classnames);
- var _Modal = __webpack_require__(135);
-
- var _Modal2 = _interopRequireDefault(_Modal);
-
- var _beeButton = __webpack_require__(259);
-
- var _beeButton2 = _interopRequireDefault(_beeButton);
-
var _beeIcon = __webpack_require__(106);
var _beeIcon2 = _interopRequireDefault(_beeIcon);
+ var _propTypes = __webpack_require__(6);
+
+ var _propTypes2 = _interopRequireDefault(_propTypes);
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
- // class ConfirmDialogProps extends Modal.ModalFuncProps {
- // onHide = () => {};
- // close = (...args) => {};
- // autoFocusButton = null | 'ok' | 'cancel';
- // }
+ function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
- var IS_REACT_16 = !!_reactDom2["default"].createPortal;
+ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
- var ConfirmDialog = function ConfirmDialog(props) {
- var onCancel = props.onCancel,
- onOk = props.onOk,
- close = props.close,
- onHide = props.onHide,
- show = props.show,
- keyboard = props.keyboard,
- centered = props.centered,
- getContainer = props.getContainer,
- maskStyle = props.maskStyle,
- okButtonProps = props.okButtonProps,
- cancelButtonProps = props.cancelButtonProps,
- _props$iconType = props.iconType,
- iconType = _props$iconType === undefined ? 'uf-qm-c' : _props$iconType;
- // warning(
- // !('iconType' in props),
- // 'Modal',
- // `The property 'iconType' is deprecated. Use the property 'icon' instead.`,
- // );
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- // 支持传入{ icon: null }来隐藏`Modal.confirm`默认的Icon
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- var icon = props.icon === undefined ? iconType : props.icon;
- var okType = props.okType || 'primary';
- var prefixCls = props.prefixCls || 'u-modal';
- var contentPrefixCls = prefixCls + '-confirm';
- // 默认为 true,保持向下兼容
- var okCancel = 'okCancel' in props ? props.okCancel : true;
- var width = props.width || 400;
- var style = props.style || {};
- var backdrop = props.backdrop === undefined ? true : props.backdrop;
- // 默认为 false,保持旧版默认行为
- var maskClosable = props.maskClosable === undefined ? false : props.maskClosable;
- // const runtimeLocale = getConfirmLocale();
- var okText = props.okText || (okCancel ? "确定" : "知道了");
- var cancelText = props.cancelText || "取消";
- var autoFocusButton = props.autoFocusButton === null ? false : props.autoFocusButton || 'ok';
- var transitionName = props.transitionName || 'zoom';
- var maskTransitionName = props.maskTransitionName || 'fade';
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
- var classString = (0, _classnames2["default"])(contentPrefixCls, contentPrefixCls + '-' + props.type, props.className);
-
- var cancelButton = okCancel && _react2["default"].createElement(
- _beeButton2["default"],
- {
- onClick: function onClick() {
- close();onCancel ? onCancel() : function () {
- return;
- };
- },
- colors: 'secondary',
- style: { marginRight: 8 }
- },
- cancelText
- );
- var iconNode = typeof icon === 'string' ? _react2["default"].createElement(_beeIcon2["default"], { type: icon }) : icon;
-
- return _react2["default"].createElement(
- _Modal2["default"]
- // size="sm"
- ,
- { width: width,
- prefixCls: prefixCls,
- className: classString,
- show: show,
- onHide: onHide,
- backdrop: backdrop },
- _react2["default"].createElement(
- _Modal2["default"].Header,
- null,
- _react2["default"].createElement(
- _Modal2["default"].Title,
- null,
- iconNode,
- _react2["default"].createElement(
- 'span',
- { className: contentPrefixCls + '-title' },
- props.title
- )
- )
- ),
- _react2["default"].createElement(
- _Modal2["default"].Body,
- null,
- _react2["default"].createElement(
- 'div',
- { className: contentPrefixCls + '-content' },
- props.content
- )
- ),
- _react2["default"].createElement(
- _Modal2["default"].Footer,
- null,
- cancelButton,
- _react2["default"].createElement(
- _beeButton2["default"],
- {
- onClick: function onClick() {
- close();onOk ? onOk() : function () {
- return;
- };
- },
- colors: okType
- },
- okText
- )
- )
- );
+ var propTypes = {
+ componentClass: _propTypes2["default"].oneOfType([_propTypes2["default"].element, _propTypes2["default"].string]),
+ type: _propTypes2["default"].string,
+ size: _propTypes2["default"].oneOf(['sm', 'md', 'lg']),
+ onSearch: _propTypes2["default"].func,
+ onChange: _propTypes2["default"].func,
+ onBlur: _propTypes2["default"].func,
+ showClose: _propTypes2["default"].bool,
+ focusSelect: _propTypes2["default"].bool
};
- function confirm(config) {
- var div = document.createElement('div');
- document.body.appendChild(div);
- var currentConfig = _extends({}, config, { close: close, show: true });
+ var defaultProps = {
+ componentClass: 'input',
+ clsPrefix: 'u-form-control',
+ type: 'text',
+ size: 'md'
+ };
- function close() {
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
+ var FormControl = function (_React$Component) {
+ _inherits(FormControl, _React$Component);
+
+ function FormControl(props) {
+ _classCallCheck(this, FormControl);
+
+ var _this = _possibleConstructorReturn(this, _React$Component.call(this, props));
+
+ _this.handleSearchChange = function (e) {
+ var onChange = _this.props.onChange;
+
+ var value = _this.input.value;
+ _this.setState({
+ value: value,
+ showSearch: value == null || value === ""
+ });
+ if (onChange) {
+ onChange(value, e);
+ }
+ };
+
+ _this.handleChange = function (e) {
+ var onChange = _this.props.onChange;
+
+ var value = _this.input.value;
+ _this.setState({
+ showClose: true
+ });
+ if (onChange) {
+ onChange(value, e);
+ }
+ };
+
+ _this.clearValue = function () {
+ var onChange = _this.props.onChange;
+
+ _this.setState({
+ showSearch: true,
+ value: "",
+ showClose: false
+ });
+ if (onChange) {
+ onChange("");
+ }
+ _this.input.focus();
+ };
+
+ _this.handleKeyDown = function (e) {
+ var _this$props = _this.props,
+ onSearch = _this$props.onSearch,
+ type = _this$props.type;
+
+ if (e.keyCode === 13 && type === "search") {
+ if (onSearch) {
+ onSearch(_this.input.value);
+ }
+ }
+ };
+
+ _this.handleSearch = function (e) {
+ var onSearch = _this.props.onSearch;
+
+ if (onSearch) onSearch(_this.input.value);
+ };
+
+ _this.handleBlur = function (e) {
+ var value = _this.state.value;
+ var onBlur = _this.props.onBlur;
+
+
+ if (onBlur) {
+ onBlur(value, e);
+ }
+ };
+
+ _this.handleFocus = function (e) {
+ var value = _this.state.value;
+ var onFocus = _this.props.onFocus;
+
+ if (_this.props.focusSelect) {
+ _this.input.select();
+ }
+ if (onFocus) {
+ onFocus(value, e);
+ }
+ };
+
+ _this.renderInput = function () {
+ var _this$props2 = _this.props,
+ Component = _this$props2.componentClass,
+ type = _this$props2.type,
+ className = _this$props2.className,
+ size = _this$props2.size,
+ clsPrefix = _this$props2.clsPrefix,
+ value = _this$props2.value,
+ onChange = _this$props2.onChange,
+ onSearch = _this$props2.onSearch,
+ onBlur = _this$props2.onBlur,
+ showClose = _this$props2.showClose,
+ focusSelect = _this$props2.focusSelect,
+ others = _objectWithoutProperties(_this$props2, ['componentClass', 'type', 'className', 'size', 'clsPrefix', 'value', 'onChange', 'onSearch', 'onBlur', 'showClose', 'focusSelect']);
+ // input[type="file"] 不应该有类名 .form-control.
+
+
+ var classes = {};
+ if (size) {
+ classes['' + size] = true;
+ }
+
+ var classNames = void 0;
+ if (type !== 'file') {
+ classNames = (0, _classnames2["default"])(clsPrefix, classes);
+ }
+
+ return showClose ? _react2["default"].createElement(
+ 'div',
+ { className: (0, _classnames2["default"])(clsPrefix + '-close', clsPrefix + '-affix-wrapper', className) },
+ _react2["default"].createElement(Component, _extends({}, others, {
+ type: type,
+ ref: function ref(el) {
+ return _this.input = el;
+ },
+ value: value,
+ onChange: _this.handleChange,
+ onBlur: _this.handleBlur,
+ onFocus: _this.handleFocus,
+ className: (0, _classnames2["default"])(className, classNames)
+ })),
+ _react2["default"].createElement(
+ 'div',
+ { className: clsPrefix + '-suffix' },
+ _this.state.showClose ? _react2["default"].createElement(_beeIcon2["default"], { onClick: _this.clearValue, type: 'uf-close-c' }) : ''
+ )
+ ) : _react2["default"].createElement(Component, _extends({}, others, {
+ type: type,
+ ref: function ref(el) {
+ return _this.input = el;
+ },
+ value: value,
+ onChange: _this.handleChange,
+ onBlur: _this.handleBlur,
+ onFocus: _this.handleFocus,
+ className: (0, _classnames2["default"])(className, classNames)
+ }));
+ };
+
+ _this.renderSearch = function () {
+ var _this$props3 = _this.props,
+ Component = _this$props3.componentClass,
+ type = _this$props3.type,
+ className = _this$props3.className,
+ size = _this$props3.size,
+ clsPrefix = _this$props3.clsPrefix,
+ value = _this$props3.value,
+ onChange = _this$props3.onChange,
+ onSearch = _this$props3.onSearch,
+ onBlur = _this$props3.onBlur,
+ others = _objectWithoutProperties(_this$props3, ['componentClass', 'type', 'className', 'size', 'clsPrefix', 'value', 'onChange', 'onSearch', 'onBlur']);
+ // input[type="file"] 不应该有类名 .form-control.
+
+
+ var classes = {};
+ if (size) {
+ classes['' + size] = true;
+ }
+ classes[clsPrefix + '-search'] = true;
+
+ if (type === "search") {
+ return _react2["default"].createElement(
+ 'div',
+ { className: (0, _classnames2["default"])(clsPrefix + '-search', clsPrefix + '-affix-wrapper', className) },
+ _react2["default"].createElement(Component, _extends({}, others, {
+ type: type,
+ ref: function ref(el) {
+ return _this.input = el;
+ },
+ onChange: _this.handleSearchChange,
+ value: value,
+ onKeyDown: _this.handleKeyDown,
+ onBlur: _this.handleBlur,
+ onFocus: _this.handleFocus,
+ className: (0, _classnames2["default"])(className, clsPrefix, classes)
+ })),
+ _react2["default"].createElement(
+ 'div',
+ { className: clsPrefix + '-suffix' },
+ _react2["default"].createElement(_beeIcon2["default"], { type: 'uf-search', onClick: _this.handleSearch })
+ )
+ );
+ }
+ };
+
+ _this.state = {
+ showSearch: !props.value,
+ value: props.value == null ? "" : props.value,
+ showClose: false
+ };
+ _this.input = {};
+ return _this;
}
- currentConfig = _extends({}, currentConfig, {
- show: false,
- onHide: destroy.bind.apply(destroy, [this].concat(args))
- });
- if (IS_REACT_16) {
- render(currentConfig);
- } else {
- destroy.apply(undefined, args);
- }
- }
+ FormControl.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProp) {
+ if (nextProp.value !== this.state.value) {
+ this.setState({ value: nextProp.value });
+ }
+ };
- function update(newConfig) {
- currentConfig = _extends({}, currentConfig, newConfig);
- render(currentConfig);
- }
+ FormControl.prototype.render = function render() {
- function destroy() {
- var unmountResult = _reactDom2["default"].unmountComponentAtNode(div);
- if (unmountResult && div.parentNode) {
- div.parentNode.removeChild(div);
- }
+ if (this.props.type === "search") {
+ return this.renderSearch();
+ }
- for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
- args[_key2] = arguments[_key2];
- }
+ return this.renderInput();
+ };
- var triggerCancel = args.some(function (param) {
- return param && param.triggerCancel;
- });
- if (config.onCancel && triggerCancel) {
- config.onCancel.apply(config, args);
- }
- for (var i = 0; i < _Modal.destroyFns.length; i++) {
- var fn = _Modal.destroyFns[i];
- if (fn === close) {
- _Modal.destroyFns.splice(i, 1);
- break;
- }
- }
- }
+ return FormControl;
+ }(_react2["default"].Component);
- function render(props) {
- _reactDom2["default"].render(_react2["default"].createElement(ConfirmDialog, props), div);
- }
+ FormControl.propTypes = propTypes;
+ FormControl.defaultProps = defaultProps;
- render(currentConfig);
-
- _Modal.destroyFns.push(close);
-
- return {
- destroy: close,
- update: update
- };
- }
+ exports["default"] = FormControl;
module.exports = exports['default'];
/***/ }),
-/* 259 */
+/* 155 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -32329,7 +16168,7 @@
value: true
});
- var _Button = __webpack_require__(260);
+ var _Button = __webpack_require__(156);
var _Button2 = _interopRequireDefault(_Button);
@@ -32339,7 +16178,7 @@
module.exports = exports['default'];
/***/ }),
-/* 260 */
+/* 156 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -32514,318 +16353,14 @@
module.exports = exports['default'];
/***/ }),
-/* 261 */
+/* 157 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _FormControl = __webpack_require__(262);
-
- var _FormControl2 = _interopRequireDefault(_FormControl);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- exports["default"] = _FormControl2["default"];
- module.exports = exports['default'];
-
-/***/ }),
-/* 262 */
-/***/ (function(module, exports, __webpack_require__) {
-
- 'use strict';
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
- var _react = __webpack_require__(1);
-
- var _react2 = _interopRequireDefault(_react);
-
- var _classnames = __webpack_require__(5);
-
- var _classnames2 = _interopRequireDefault(_classnames);
-
- var _beeIcon = __webpack_require__(106);
-
- var _beeIcon2 = _interopRequireDefault(_beeIcon);
-
- var _propTypes = __webpack_require__(6);
-
- var _propTypes2 = _interopRequireDefault(_propTypes);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
-
- function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
-
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
-
- var propTypes = {
- componentClass: _propTypes2["default"].oneOfType([_propTypes2["default"].element, _propTypes2["default"].string]),
- type: _propTypes2["default"].string,
- size: _propTypes2["default"].oneOf(['sm', 'md', 'lg']),
- onSearch: _propTypes2["default"].func,
- onChange: _propTypes2["default"].func,
- onBlur: _propTypes2["default"].func,
- showClose: _propTypes2["default"].bool,
- focusSelect: _propTypes2["default"].bool
- };
-
- var defaultProps = {
- componentClass: 'input',
- clsPrefix: 'u-form-control',
- type: 'text',
- size: 'md'
- };
-
- var FormControl = function (_React$Component) {
- _inherits(FormControl, _React$Component);
-
- function FormControl(props) {
- _classCallCheck(this, FormControl);
-
- var _this = _possibleConstructorReturn(this, _React$Component.call(this, props));
-
- _this.handleSearchChange = function (e) {
- var onChange = _this.props.onChange;
-
- var value = _this.input.value;
- _this.setState({
- value: value,
- showSearch: value == null || value === ""
- });
- if (onChange) {
- onChange(value, e);
- }
- };
-
- _this.handleChange = function (e) {
- var onChange = _this.props.onChange;
-
- var value = _this.input.value;
- _this.setState({
- showClose: true
- });
- if (onChange) {
- onChange(value, e);
- }
- };
-
- _this.clearValue = function () {
- var onChange = _this.props.onChange;
-
- _this.setState({
- showSearch: true,
- value: "",
- showClose: false
- });
- if (onChange) {
- onChange("");
- }
- _this.input.focus();
- };
-
- _this.handleKeyDown = function (e) {
- var _this$props = _this.props,
- onSearch = _this$props.onSearch,
- type = _this$props.type,
- onKeyDown = _this$props.onKeyDown;
-
- if (e.keyCode === 13 && type === "search") {
- if (onSearch) {
- onSearch(_this.input.value);
- }
- }
- onKeyDown && onKeyDown(e);
- };
-
- _this.handleSearch = function (e) {
- var onSearch = _this.props.onSearch;
-
- if (onSearch) onSearch(_this.input.value);
- };
-
- _this.handleBlur = function (e) {
- var value = _this.state.value;
- var onBlur = _this.props.onBlur;
-
-
- if (onBlur) {
- onBlur(value, e);
- }
- };
-
- _this.handleFocus = function (e) {
- var value = _this.state.value;
- var onFocus = _this.props.onFocus;
-
- if (_this.props.focusSelect) {
- _this.input.select();
- }
- if (onFocus) {
- onFocus(value, e);
- }
- };
-
- _this.renderInput = function () {
- var _this$props2 = _this.props,
- Component = _this$props2.componentClass,
- type = _this$props2.type,
- className = _this$props2.className,
- size = _this$props2.size,
- clsPrefix = _this$props2.clsPrefix,
- value = _this$props2.value,
- onChange = _this$props2.onChange,
- onSearch = _this$props2.onSearch,
- onBlur = _this$props2.onBlur,
- showClose = _this$props2.showClose,
- focusSelect = _this$props2.focusSelect,
- others = _objectWithoutProperties(_this$props2, ['componentClass', 'type', 'className', 'size', 'clsPrefix', 'value', 'onChange', 'onSearch', 'onBlur', 'showClose', 'focusSelect']);
- // input[type="file"] 不应该有类名 .form-control.
-
-
- var classes = {};
- if (size) {
- classes['' + size] = true;
- }
-
- var classNames = void 0;
- if (type !== 'file') {
- classNames = (0, _classnames2["default"])(clsPrefix, classes);
- }
-
- return showClose ? _react2["default"].createElement(
- 'div',
- { className: (0, _classnames2["default"])(clsPrefix + '-close', clsPrefix + '-affix-wrapper', className) },
- _react2["default"].createElement(Component, _extends({}, others, {
- type: type,
- ref: function ref(el) {
- return _this.input = el;
- },
- value: value,
- onChange: _this.handleChange,
- onBlur: _this.handleBlur,
- onFocus: _this.handleFocus,
- className: (0, _classnames2["default"])(className, classNames)
- })),
- _react2["default"].createElement(
- 'div',
- { className: clsPrefix + '-suffix' },
- _this.state.showClose ? _react2["default"].createElement(_beeIcon2["default"], { onClick: _this.clearValue, type: 'uf-close-c' }) : ''
- )
- ) : _react2["default"].createElement(Component, _extends({}, others, {
- type: type,
- ref: function ref(el) {
- return _this.input = el;
- },
- value: value,
- onChange: _this.handleChange,
- onBlur: _this.handleBlur,
- onFocus: _this.handleFocus,
- className: (0, _classnames2["default"])(className, classNames)
- }));
- };
-
- _this.renderSearch = function () {
- var _this$props3 = _this.props,
- Component = _this$props3.componentClass,
- type = _this$props3.type,
- className = _this$props3.className,
- size = _this$props3.size,
- clsPrefix = _this$props3.clsPrefix,
- value = _this$props3.value,
- onChange = _this$props3.onChange,
- onSearch = _this$props3.onSearch,
- onBlur = _this$props3.onBlur,
- others = _objectWithoutProperties(_this$props3, ['componentClass', 'type', 'className', 'size', 'clsPrefix', 'value', 'onChange', 'onSearch', 'onBlur']);
- // input[type="file"] 不应该有类名 .form-control.
-
-
- var classes = {};
- if (size) {
- classes['' + size] = true;
- }
- classes[clsPrefix + '-search'] = true;
-
- if (type === "search") {
- return _react2["default"].createElement(
- 'div',
- { className: (0, _classnames2["default"])(clsPrefix + '-search', clsPrefix + '-affix-wrapper', className) },
- _react2["default"].createElement(Component, _extends({}, others, {
- type: type,
- ref: function ref(el) {
- return _this.input = el;
- },
- onChange: _this.handleSearchChange,
- value: value,
- onKeyDown: _this.handleKeyDown,
- onBlur: _this.handleBlur,
- onFocus: _this.handleFocus,
- className: (0, _classnames2["default"])(className, clsPrefix, classes)
- })),
- _react2["default"].createElement(
- 'div',
- { className: clsPrefix + '-suffix' },
- _react2["default"].createElement(_beeIcon2["default"], { type: 'uf-search', onClick: _this.handleSearch })
- )
- );
- }
- };
-
- _this.state = {
- showSearch: !props.value,
- value: props.value == null ? "" : props.value,
- showClose: false
- };
- _this.input = {};
- return _this;
- }
-
- FormControl.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProp) {
- if (nextProp.value !== this.state.value) {
- this.setState({ value: nextProp.value });
- }
- };
-
- FormControl.prototype.render = function render() {
-
- if (this.props.type === "search") {
- return this.renderSearch();
- }
-
- return this.renderInput();
- };
-
- return FormControl;
- }(_react2["default"].Component);
-
- FormControl.propTypes = propTypes;
- FormControl.defaultProps = defaultProps;
-
- exports["default"] = FormControl;
- module.exports = exports['default'];
-
-/***/ }),
-/* 263 */
-/***/ (function(module, exports, __webpack_require__) {
-
- 'use strict';
-
- var Table = __webpack_require__(264);
- var Column = __webpack_require__(585);
- var ColumnGroup = __webpack_require__(586);
+ var Table = __webpack_require__(158);
+ var Column = __webpack_require__(525);
+ var ColumnGroup = __webpack_require__(526);
Table.Column = Column;
Table.ColumnGroup = ColumnGroup;
@@ -32833,7 +16368,7 @@
module.exports = Table;
/***/ }),
-/* 264 */
+/* 158 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -32856,17 +16391,17 @@
var _componentClasses2 = _interopRequireDefault(_componentClasses);
- var _TableRow = __webpack_require__(265);
+ var _TableRow = __webpack_require__(159);
var _TableRow2 = _interopRequireDefault(_TableRow);
- var _TableHeader = __webpack_require__(270);
+ var _TableHeader = __webpack_require__(164);
var _TableHeader2 = _interopRequireDefault(_TableHeader);
- var _utils = __webpack_require__(272);
+ var _utils = __webpack_require__(166);
- var _shallowequal = __webpack_require__(269);
+ var _shallowequal = __webpack_require__(163);
var _shallowequal2 = _interopRequireDefault(_shallowequal);
@@ -32874,15 +16409,15 @@
var _addEventListener2 = _interopRequireDefault(_addEventListener);
- var _ColumnManager = __webpack_require__(584);
+ var _ColumnManager = __webpack_require__(524);
var _ColumnManager2 = _interopRequireDefault(_ColumnManager);
- var _createStore = __webpack_require__(587);
+ var _createStore = __webpack_require__(527);
var _createStore2 = _interopRequireDefault(_createStore);
- var _beeLoading = __webpack_require__(588);
+ var _beeLoading = __webpack_require__(528);
var _beeLoading2 = _interopRequireDefault(_beeLoading);
@@ -34253,7 +17788,7 @@
module.exports = exports['default'];
/***/ }),
-/* 265 */
+/* 159 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -34270,11 +17805,11 @@
var _propTypes2 = _interopRequireDefault(_propTypes);
- var _TableCell = __webpack_require__(266);
+ var _TableCell = __webpack_require__(160);
var _TableCell2 = _interopRequireDefault(_TableCell);
- var _ExpandIcon = __webpack_require__(268);
+ var _ExpandIcon = __webpack_require__(162);
var _ExpandIcon2 = _interopRequireDefault(_ExpandIcon);
@@ -34583,7 +18118,7 @@
module.exports = exports['default'];
/***/ }),
-/* 266 */
+/* 160 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -34600,7 +18135,7 @@
var _propTypes2 = _interopRequireDefault(_propTypes);
- var _objectPath = __webpack_require__(267);
+ var _objectPath = __webpack_require__(161);
var _objectPath2 = _interopRequireDefault(_objectPath);
@@ -34733,7 +18268,7 @@
module.exports = exports['default'];
/***/ }),
-/* 267 */
+/* 161 */
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (root, factory){
@@ -35031,7 +18566,7 @@
/***/ }),
-/* 268 */
+/* 162 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -35048,7 +18583,7 @@
var _propTypes2 = _interopRequireDefault(_propTypes);
- var _shallowequal = __webpack_require__(269);
+ var _shallowequal = __webpack_require__(163);
var _shallowequal2 = _interopRequireDefault(_shallowequal);
@@ -35119,7 +18654,7 @@
module.exports = exports['default'];
/***/ }),
-/* 269 */
+/* 163 */
/***/ (function(module, exports) {
//
@@ -35171,7 +18706,7 @@
/***/ }),
-/* 270 */
+/* 164 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -35194,11 +18729,11 @@
var _propTypes2 = _interopRequireDefault(_propTypes);
- var _throttleDebounce = __webpack_require__(271);
+ var _throttleDebounce = __webpack_require__(165);
- var _utils = __webpack_require__(272);
+ var _utils = __webpack_require__(166);
- var _FilterType = __webpack_require__(286);
+ var _FilterType = __webpack_require__(180);
var _FilterType2 = _interopRequireDefault(_FilterType);
@@ -35956,7 +19491,7 @@
module.exports = exports["default"];
/***/ }),
-/* 271 */
+/* 165 */
/***/ (function(module, exports) {
'use strict';
@@ -36103,7 +19638,7 @@
/***/ }),
-/* 272 */
+/* 166 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -36132,7 +19667,7 @@
var _warning2 = _interopRequireDefault(_warning);
- var _parseInt = __webpack_require__(273);
+ var _parseInt = __webpack_require__(167);
var _parseInt2 = _interopRequireDefault(_parseInt);
@@ -36152,9 +19687,13 @@
function measureScrollbar() {
var direction = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'vertical';
+
if (typeof document === 'undefined' || typeof window === 'undefined') {
return 0;
}
+ var tableDom = document.querySelector('.u-table');
+ var currentDom = tableDom ? tableDom : document.body;
+
if (scrollbarSize) {
return scrollbarSize;
}
@@ -36162,7 +19701,7 @@
Object.keys(scrollbarMeasure).forEach(function (scrollProp) {
scrollDiv.style[scrollProp] = scrollbarMeasure[scrollProp];
});
- document.body.appendChild(scrollDiv);
+ currentDom.appendChild(scrollDiv);
var size = 0;
if (direction === 'vertical') {
size = scrollDiv.offsetWidth - scrollDiv.clientWidth;
@@ -36170,7 +19709,7 @@
size = scrollDiv.offsetHeight - scrollDiv.clientHeight;
}
- document.body.removeChild(scrollDiv);
+ currentDom.removeChild(scrollDiv);
scrollbarSize = size;
return scrollbarSize;
}
@@ -36421,11 +19960,11 @@
};
/***/ }),
-/* 273 */
+/* 167 */
/***/ (function(module, exports, __webpack_require__) {
- var root = __webpack_require__(274),
- toString = __webpack_require__(276);
+ var root = __webpack_require__(168),
+ toString = __webpack_require__(170);
/** Used to match leading and trailing whitespace. */
var reTrimStart = /^\s+/;
@@ -36470,10 +20009,10 @@
/***/ }),
-/* 274 */
+/* 168 */
/***/ (function(module, exports, __webpack_require__) {
- var freeGlobal = __webpack_require__(275);
+ var freeGlobal = __webpack_require__(169);
/** Detect free variable `self`. */
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
@@ -36485,7 +20024,7 @@
/***/ }),
-/* 275 */
+/* 169 */
/***/ (function(module, exports) {
/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */
@@ -36496,10 +20035,10 @@
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
/***/ }),
-/* 276 */
+/* 170 */
/***/ (function(module, exports, __webpack_require__) {
- var baseToString = __webpack_require__(277);
+ var baseToString = __webpack_require__(171);
/**
* Converts `value` to a string. An empty string is returned for `null`
@@ -36530,13 +20069,13 @@
/***/ }),
-/* 277 */
+/* 171 */
/***/ (function(module, exports, __webpack_require__) {
- var Symbol = __webpack_require__(278),
- arrayMap = __webpack_require__(279),
- isArray = __webpack_require__(280),
- isSymbol = __webpack_require__(281);
+ var Symbol = __webpack_require__(172),
+ arrayMap = __webpack_require__(173),
+ isArray = __webpack_require__(174),
+ isSymbol = __webpack_require__(175);
/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0;
@@ -36573,10 +20112,10 @@
/***/ }),
-/* 278 */
+/* 172 */
/***/ (function(module, exports, __webpack_require__) {
- var root = __webpack_require__(274);
+ var root = __webpack_require__(168);
/** Built-in value references. */
var Symbol = root.Symbol;
@@ -36585,7 +20124,7 @@
/***/ }),
-/* 279 */
+/* 173 */
/***/ (function(module, exports) {
/**
@@ -36612,7 +20151,7 @@
/***/ }),
-/* 280 */
+/* 174 */
/***/ (function(module, exports) {
/**
@@ -36644,11 +20183,11 @@
/***/ }),
-/* 281 */
+/* 175 */
/***/ (function(module, exports, __webpack_require__) {
- var baseGetTag = __webpack_require__(282),
- isObjectLike = __webpack_require__(285);
+ var baseGetTag = __webpack_require__(176),
+ isObjectLike = __webpack_require__(179);
/** `Object#toString` result references. */
var symbolTag = '[object Symbol]';
@@ -36679,12 +20218,12 @@
/***/ }),
-/* 282 */
+/* 176 */
/***/ (function(module, exports, __webpack_require__) {
- var Symbol = __webpack_require__(278),
- getRawTag = __webpack_require__(283),
- objectToString = __webpack_require__(284);
+ var Symbol = __webpack_require__(172),
+ getRawTag = __webpack_require__(177),
+ objectToString = __webpack_require__(178);
/** `Object#toString` result references. */
var nullTag = '[object Null]',
@@ -36713,10 +20252,10 @@
/***/ }),
-/* 283 */
+/* 177 */
/***/ (function(module, exports, __webpack_require__) {
- var Symbol = __webpack_require__(278);
+ var Symbol = __webpack_require__(172);
/** Used for built-in method references. */
var objectProto = Object.prototype;
@@ -36765,7 +20304,7 @@
/***/ }),
-/* 284 */
+/* 178 */
/***/ (function(module, exports) {
/** Used for built-in method references. */
@@ -36793,7 +20332,7 @@
/***/ }),
-/* 285 */
+/* 179 */
/***/ (function(module, exports) {
/**
@@ -36828,7 +20367,7 @@
/***/ }),
-/* 286 */
+/* 180 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -36847,27 +20386,27 @@
var _propTypes2 = _interopRequireDefault(_propTypes);
- var _beeDatepicker = __webpack_require__(287);
+ var _beeDatepicker = __webpack_require__(181);
var _beeDatepicker2 = _interopRequireDefault(_beeDatepicker);
- var _zh_CN = __webpack_require__(517);
+ var _zh_CN = __webpack_require__(454);
var _zh_CN2 = _interopRequireDefault(_zh_CN);
- var _beeFormControl = __webpack_require__(261);
+ var _beeFormControl = __webpack_require__(153);
var _beeFormControl2 = _interopRequireDefault(_beeFormControl);
- var _beeSelect = __webpack_require__(525);
+ var _beeSelect = __webpack_require__(462);
var _beeSelect2 = _interopRequireDefault(_beeSelect);
- var _beeInputNumber = __webpack_require__(561);
+ var _beeInputNumber = __webpack_require__(501);
var _beeInputNumber2 = _interopRequireDefault(_beeInputNumber);
- var _FilterDropDown = __webpack_require__(563);
+ var _FilterDropDown = __webpack_require__(503);
var _FilterDropDown2 = _interopRequireDefault(_FilterDropDown);
@@ -37253,7 +20792,7 @@
module.exports = exports['default'];
/***/ }),
-/* 287 */
+/* 181 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -37266,23 +20805,23 @@
var _react2 = _interopRequireDefault(_react);
- var _DatePicker = __webpack_require__(288);
+ var _DatePicker = __webpack_require__(182);
var _DatePicker2 = _interopRequireDefault(_DatePicker);
- var _MonthPicker = __webpack_require__(518);
+ var _MonthPicker = __webpack_require__(455);
var _MonthPicker2 = _interopRequireDefault(_MonthPicker);
- var _RangePicker = __webpack_require__(520);
+ var _RangePicker = __webpack_require__(457);
var _RangePicker2 = _interopRequireDefault(_RangePicker);
- var _WeekPicker = __webpack_require__(523);
+ var _WeekPicker = __webpack_require__(460);
var _WeekPicker2 = _interopRequireDefault(_WeekPicker);
- var _YearPicker = __webpack_require__(524);
+ var _YearPicker = __webpack_require__(461);
var _YearPicker2 = _interopRequireDefault(_YearPicker);
@@ -37297,7 +20836,7 @@
module.exports = exports['default'];
/***/ }),
-/* 288 */
+/* 182 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -37308,7 +20847,7 @@
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
- var _rcCalendar = __webpack_require__(289);
+ var _rcCalendar = __webpack_require__(183);
var _rcCalendar2 = _interopRequireDefault(_rcCalendar);
@@ -37322,19 +20861,19 @@
var _tinperBeeCore = __webpack_require__(27);
- var _Picker = __webpack_require__(441);
+ var _Picker = __webpack_require__(336);
var _Picker2 = _interopRequireDefault(_Picker);
- var _beeFormControl = __webpack_require__(261);
+ var _beeFormControl = __webpack_require__(153);
var _beeFormControl2 = _interopRequireDefault(_beeFormControl);
- var _Panel = __webpack_require__(508);
+ var _Panel = __webpack_require__(445);
var _Panel2 = _interopRequireDefault(_Panel);
- var _moment = __webpack_require__(295);
+ var _moment = __webpack_require__(189);
var _moment2 = _interopRequireDefault(_moment);
@@ -37342,11 +20881,11 @@
var _beeIcon2 = _interopRequireDefault(_beeIcon);
- var _beeInputGroup = __webpack_require__(512);
+ var _beeInputGroup = __webpack_require__(449);
var _beeInputGroup2 = _interopRequireDefault(_beeInputGroup);
- var _zh_CN = __webpack_require__(517);
+ var _zh_CN = __webpack_require__(454);
var _zh_CN2 = _interopRequireDefault(_zh_CN);
@@ -37665,7 +21204,7 @@
module.exports = exports["default"];
/***/ }),
-/* 289 */
+/* 183 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -37674,7 +21213,7 @@
value: true
});
- var _Calendar = __webpack_require__(290);
+ var _Calendar = __webpack_require__(184);
var _Calendar2 = _interopRequireDefault(_Calendar);
@@ -37684,7 +21223,7 @@
module.exports = exports['default'];
/***/ }),
-/* 290 */
+/* 184 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -37707,37 +21246,37 @@
var _propTypes2 = _interopRequireDefault(_propTypes);
- var _KeyCode = __webpack_require__(291);
+ var _KeyCode = __webpack_require__(185);
var _KeyCode2 = _interopRequireDefault(_KeyCode);
var _reactLifecyclesCompat = __webpack_require__(91);
- var _DateTable = __webpack_require__(292);
+ var _DateTable = __webpack_require__(186);
var _DateTable2 = _interopRequireDefault(_DateTable);
- var _CalendarHeader = __webpack_require__(426);
+ var _CalendarHeader = __webpack_require__(321);
var _CalendarHeader2 = _interopRequireDefault(_CalendarHeader);
- var _CalendarFooter = __webpack_require__(433);
+ var _CalendarFooter = __webpack_require__(328);
var _CalendarFooter2 = _interopRequireDefault(_CalendarFooter);
- var _CalendarMixin = __webpack_require__(437);
+ var _CalendarMixin = __webpack_require__(332);
- var _CommonMixin = __webpack_require__(438);
+ var _CommonMixin = __webpack_require__(333);
- var _DateInput = __webpack_require__(430);
+ var _DateInput = __webpack_require__(325);
var _DateInput2 = _interopRequireDefault(_DateInput);
- var _util = __webpack_require__(425);
+ var _util = __webpack_require__(320);
- var _toTime = __webpack_require__(440);
+ var _toTime = __webpack_require__(335);
- var _moment = __webpack_require__(295);
+ var _moment = __webpack_require__(189);
var _moment2 = _interopRequireDefault(_moment);
@@ -38120,7 +21659,7 @@
module.exports = exports['default'];
/***/ }),
-/* 291 */
+/* 185 */
/***/ (function(module, exports) {
'use strict';
@@ -38649,7 +22188,7 @@
module.exports = exports['default'];
/***/ }),
-/* 292 */
+/* 186 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -38662,11 +22201,11 @@
var _react2 = _interopRequireDefault(_react);
- var _DateTHead = __webpack_require__(293);
+ var _DateTHead = __webpack_require__(187);
var _DateTHead2 = _interopRequireDefault(_DateTHead);
- var _DateTBody = __webpack_require__(424);
+ var _DateTBody = __webpack_require__(319);
var _DateTBody2 = _interopRequireDefault(_DateTBody);
@@ -38707,7 +22246,7 @@
module.exports = exports['default'];
/***/ }),
-/* 293 */
+/* 187 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -38720,11 +22259,11 @@
var _react2 = _interopRequireDefault(_react);
- var _DateConstants = __webpack_require__(294);
+ var _DateConstants = __webpack_require__(188);
var _DateConstants2 = _interopRequireDefault(_DateConstants);
- var _moment = __webpack_require__(295);
+ var _moment = __webpack_require__(189);
var _moment2 = _interopRequireDefault(_moment);
@@ -38813,7 +22352,7 @@
module.exports = exports['default'];
/***/ }),
-/* 294 */
+/* 188 */
/***/ (function(module, exports) {
"use strict";
@@ -38828,7 +22367,7 @@
module.exports = exports["default"];
/***/ }),
-/* 295 */
+/* 189 */
/***/ (function(module, exports, __webpack_require__) {
var require;/* WEBPACK VAR INJECTION */(function(module) {//! moment.js
@@ -40683,7 +24222,7 @@
try {
oldLocale = globalLocale._abbr;
var aliasedRequire = require;
- __webpack_require__(296)("./" + name);
+ __webpack_require__(191)("./" + name);
getSetGlobalLocale(oldLocale);
} catch (e) {}
}
@@ -43434,267 +26973,283 @@
})));
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(199)(module)))
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(190)(module)))
/***/ }),
-/* 296 */
+/* 190 */
+/***/ (function(module, exports) {
+
+ module.exports = function(module) {
+ if(!module.webpackPolyfill) {
+ module.deprecate = function() {};
+ module.paths = [];
+ // module.parent = undefined by default
+ module.children = [];
+ module.webpackPolyfill = 1;
+ }
+ return module;
+ }
+
+
+/***/ }),
+/* 191 */
/***/ (function(module, exports, __webpack_require__) {
var map = {
- "./af": 297,
- "./af.js": 297,
- "./ar": 298,
- "./ar-dz": 299,
- "./ar-dz.js": 299,
- "./ar-kw": 300,
- "./ar-kw.js": 300,
- "./ar-ly": 301,
- "./ar-ly.js": 301,
- "./ar-ma": 302,
- "./ar-ma.js": 302,
- "./ar-sa": 303,
- "./ar-sa.js": 303,
- "./ar-tn": 304,
- "./ar-tn.js": 304,
- "./ar.js": 298,
- "./az": 305,
- "./az.js": 305,
- "./be": 306,
- "./be.js": 306,
- "./bg": 307,
- "./bg.js": 307,
- "./bm": 308,
- "./bm.js": 308,
- "./bn": 309,
- "./bn.js": 309,
- "./bo": 310,
- "./bo.js": 310,
- "./br": 311,
- "./br.js": 311,
- "./bs": 312,
- "./bs.js": 312,
- "./ca": 313,
- "./ca.js": 313,
- "./cs": 314,
- "./cs.js": 314,
- "./cv": 315,
- "./cv.js": 315,
- "./cy": 316,
- "./cy.js": 316,
- "./da": 317,
- "./da.js": 317,
- "./de": 318,
- "./de-at": 319,
- "./de-at.js": 319,
- "./de-ch": 320,
- "./de-ch.js": 320,
- "./de.js": 318,
- "./dv": 321,
- "./dv.js": 321,
- "./el": 322,
- "./el.js": 322,
- "./en-SG": 323,
- "./en-SG.js": 323,
- "./en-au": 324,
- "./en-au.js": 324,
- "./en-ca": 325,
- "./en-ca.js": 325,
- "./en-gb": 326,
- "./en-gb.js": 326,
- "./en-ie": 327,
- "./en-ie.js": 327,
- "./en-il": 328,
- "./en-il.js": 328,
- "./en-nz": 329,
- "./en-nz.js": 329,
- "./eo": 330,
- "./eo.js": 330,
- "./es": 331,
- "./es-do": 332,
- "./es-do.js": 332,
- "./es-us": 333,
- "./es-us.js": 333,
- "./es.js": 331,
- "./et": 334,
- "./et.js": 334,
- "./eu": 335,
- "./eu.js": 335,
- "./fa": 336,
- "./fa.js": 336,
- "./fi": 337,
- "./fi.js": 337,
- "./fo": 338,
- "./fo.js": 338,
- "./fr": 339,
- "./fr-ca": 340,
- "./fr-ca.js": 340,
- "./fr-ch": 341,
- "./fr-ch.js": 341,
- "./fr.js": 339,
- "./fy": 342,
- "./fy.js": 342,
- "./ga": 343,
- "./ga.js": 343,
- "./gd": 344,
- "./gd.js": 344,
- "./gl": 345,
- "./gl.js": 345,
- "./gom-latn": 346,
- "./gom-latn.js": 346,
- "./gu": 347,
- "./gu.js": 347,
- "./he": 348,
- "./he.js": 348,
- "./hi": 349,
- "./hi.js": 349,
- "./hr": 350,
- "./hr.js": 350,
- "./hu": 351,
- "./hu.js": 351,
- "./hy-am": 352,
- "./hy-am.js": 352,
- "./id": 353,
- "./id.js": 353,
- "./is": 354,
- "./is.js": 354,
- "./it": 355,
- "./it-ch": 356,
- "./it-ch.js": 356,
- "./it.js": 355,
- "./ja": 357,
- "./ja.js": 357,
- "./jv": 358,
- "./jv.js": 358,
- "./ka": 359,
- "./ka.js": 359,
- "./kk": 360,
- "./kk.js": 360,
- "./km": 361,
- "./km.js": 361,
- "./kn": 362,
- "./kn.js": 362,
- "./ko": 363,
- "./ko.js": 363,
- "./ku": 364,
- "./ku.js": 364,
- "./ky": 365,
- "./ky.js": 365,
- "./lb": 366,
- "./lb.js": 366,
- "./lo": 367,
- "./lo.js": 367,
- "./lt": 368,
- "./lt.js": 368,
- "./lv": 369,
- "./lv.js": 369,
- "./me": 370,
- "./me.js": 370,
- "./mi": 371,
- "./mi.js": 371,
- "./mk": 372,
- "./mk.js": 372,
- "./ml": 373,
- "./ml.js": 373,
- "./mn": 374,
- "./mn.js": 374,
- "./mr": 375,
- "./mr.js": 375,
- "./ms": 376,
- "./ms-my": 377,
- "./ms-my.js": 377,
- "./ms.js": 376,
- "./mt": 378,
- "./mt.js": 378,
- "./my": 379,
- "./my.js": 379,
- "./nb": 380,
- "./nb.js": 380,
- "./ne": 381,
- "./ne.js": 381,
- "./nl": 382,
- "./nl-be": 383,
- "./nl-be.js": 383,
- "./nl.js": 382,
- "./nn": 384,
- "./nn.js": 384,
- "./pa-in": 385,
- "./pa-in.js": 385,
- "./pl": 386,
- "./pl.js": 386,
- "./pt": 387,
- "./pt-br": 388,
- "./pt-br.js": 388,
- "./pt.js": 387,
- "./ro": 389,
- "./ro.js": 389,
- "./ru": 390,
- "./ru.js": 390,
- "./sd": 391,
- "./sd.js": 391,
- "./se": 392,
- "./se.js": 392,
- "./si": 393,
- "./si.js": 393,
- "./sk": 394,
- "./sk.js": 394,
- "./sl": 395,
- "./sl.js": 395,
- "./sq": 396,
- "./sq.js": 396,
- "./sr": 397,
- "./sr-cyrl": 398,
- "./sr-cyrl.js": 398,
- "./sr.js": 397,
- "./ss": 399,
- "./ss.js": 399,
- "./sv": 400,
- "./sv.js": 400,
- "./sw": 401,
- "./sw.js": 401,
- "./ta": 402,
- "./ta.js": 402,
- "./te": 403,
- "./te.js": 403,
- "./tet": 404,
- "./tet.js": 404,
- "./tg": 405,
- "./tg.js": 405,
- "./th": 406,
- "./th.js": 406,
- "./tl-ph": 407,
- "./tl-ph.js": 407,
- "./tlh": 408,
- "./tlh.js": 408,
- "./tr": 409,
- "./tr.js": 409,
- "./tzl": 410,
- "./tzl.js": 410,
- "./tzm": 411,
- "./tzm-latn": 412,
- "./tzm-latn.js": 412,
- "./tzm.js": 411,
- "./ug-cn": 413,
- "./ug-cn.js": 413,
- "./uk": 414,
- "./uk.js": 414,
- "./ur": 415,
- "./ur.js": 415,
- "./uz": 416,
- "./uz-latn": 417,
- "./uz-latn.js": 417,
- "./uz.js": 416,
- "./vi": 418,
- "./vi.js": 418,
- "./x-pseudo": 419,
- "./x-pseudo.js": 419,
- "./yo": 420,
- "./yo.js": 420,
- "./zh-cn": 421,
- "./zh-cn.js": 421,
- "./zh-hk": 422,
- "./zh-hk.js": 422,
- "./zh-tw": 423,
- "./zh-tw.js": 423
+ "./af": 192,
+ "./af.js": 192,
+ "./ar": 193,
+ "./ar-dz": 194,
+ "./ar-dz.js": 194,
+ "./ar-kw": 195,
+ "./ar-kw.js": 195,
+ "./ar-ly": 196,
+ "./ar-ly.js": 196,
+ "./ar-ma": 197,
+ "./ar-ma.js": 197,
+ "./ar-sa": 198,
+ "./ar-sa.js": 198,
+ "./ar-tn": 199,
+ "./ar-tn.js": 199,
+ "./ar.js": 193,
+ "./az": 200,
+ "./az.js": 200,
+ "./be": 201,
+ "./be.js": 201,
+ "./bg": 202,
+ "./bg.js": 202,
+ "./bm": 203,
+ "./bm.js": 203,
+ "./bn": 204,
+ "./bn.js": 204,
+ "./bo": 205,
+ "./bo.js": 205,
+ "./br": 206,
+ "./br.js": 206,
+ "./bs": 207,
+ "./bs.js": 207,
+ "./ca": 208,
+ "./ca.js": 208,
+ "./cs": 209,
+ "./cs.js": 209,
+ "./cv": 210,
+ "./cv.js": 210,
+ "./cy": 211,
+ "./cy.js": 211,
+ "./da": 212,
+ "./da.js": 212,
+ "./de": 213,
+ "./de-at": 214,
+ "./de-at.js": 214,
+ "./de-ch": 215,
+ "./de-ch.js": 215,
+ "./de.js": 213,
+ "./dv": 216,
+ "./dv.js": 216,
+ "./el": 217,
+ "./el.js": 217,
+ "./en-SG": 218,
+ "./en-SG.js": 218,
+ "./en-au": 219,
+ "./en-au.js": 219,
+ "./en-ca": 220,
+ "./en-ca.js": 220,
+ "./en-gb": 221,
+ "./en-gb.js": 221,
+ "./en-ie": 222,
+ "./en-ie.js": 222,
+ "./en-il": 223,
+ "./en-il.js": 223,
+ "./en-nz": 224,
+ "./en-nz.js": 224,
+ "./eo": 225,
+ "./eo.js": 225,
+ "./es": 226,
+ "./es-do": 227,
+ "./es-do.js": 227,
+ "./es-us": 228,
+ "./es-us.js": 228,
+ "./es.js": 226,
+ "./et": 229,
+ "./et.js": 229,
+ "./eu": 230,
+ "./eu.js": 230,
+ "./fa": 231,
+ "./fa.js": 231,
+ "./fi": 232,
+ "./fi.js": 232,
+ "./fo": 233,
+ "./fo.js": 233,
+ "./fr": 234,
+ "./fr-ca": 235,
+ "./fr-ca.js": 235,
+ "./fr-ch": 236,
+ "./fr-ch.js": 236,
+ "./fr.js": 234,
+ "./fy": 237,
+ "./fy.js": 237,
+ "./ga": 238,
+ "./ga.js": 238,
+ "./gd": 239,
+ "./gd.js": 239,
+ "./gl": 240,
+ "./gl.js": 240,
+ "./gom-latn": 241,
+ "./gom-latn.js": 241,
+ "./gu": 242,
+ "./gu.js": 242,
+ "./he": 243,
+ "./he.js": 243,
+ "./hi": 244,
+ "./hi.js": 244,
+ "./hr": 245,
+ "./hr.js": 245,
+ "./hu": 246,
+ "./hu.js": 246,
+ "./hy-am": 247,
+ "./hy-am.js": 247,
+ "./id": 248,
+ "./id.js": 248,
+ "./is": 249,
+ "./is.js": 249,
+ "./it": 250,
+ "./it-ch": 251,
+ "./it-ch.js": 251,
+ "./it.js": 250,
+ "./ja": 252,
+ "./ja.js": 252,
+ "./jv": 253,
+ "./jv.js": 253,
+ "./ka": 254,
+ "./ka.js": 254,
+ "./kk": 255,
+ "./kk.js": 255,
+ "./km": 256,
+ "./km.js": 256,
+ "./kn": 257,
+ "./kn.js": 257,
+ "./ko": 258,
+ "./ko.js": 258,
+ "./ku": 259,
+ "./ku.js": 259,
+ "./ky": 260,
+ "./ky.js": 260,
+ "./lb": 261,
+ "./lb.js": 261,
+ "./lo": 262,
+ "./lo.js": 262,
+ "./lt": 263,
+ "./lt.js": 263,
+ "./lv": 264,
+ "./lv.js": 264,
+ "./me": 265,
+ "./me.js": 265,
+ "./mi": 266,
+ "./mi.js": 266,
+ "./mk": 267,
+ "./mk.js": 267,
+ "./ml": 268,
+ "./ml.js": 268,
+ "./mn": 269,
+ "./mn.js": 269,
+ "./mr": 270,
+ "./mr.js": 270,
+ "./ms": 271,
+ "./ms-my": 272,
+ "./ms-my.js": 272,
+ "./ms.js": 271,
+ "./mt": 273,
+ "./mt.js": 273,
+ "./my": 274,
+ "./my.js": 274,
+ "./nb": 275,
+ "./nb.js": 275,
+ "./ne": 276,
+ "./ne.js": 276,
+ "./nl": 277,
+ "./nl-be": 278,
+ "./nl-be.js": 278,
+ "./nl.js": 277,
+ "./nn": 279,
+ "./nn.js": 279,
+ "./pa-in": 280,
+ "./pa-in.js": 280,
+ "./pl": 281,
+ "./pl.js": 281,
+ "./pt": 282,
+ "./pt-br": 283,
+ "./pt-br.js": 283,
+ "./pt.js": 282,
+ "./ro": 284,
+ "./ro.js": 284,
+ "./ru": 285,
+ "./ru.js": 285,
+ "./sd": 286,
+ "./sd.js": 286,
+ "./se": 287,
+ "./se.js": 287,
+ "./si": 288,
+ "./si.js": 288,
+ "./sk": 289,
+ "./sk.js": 289,
+ "./sl": 290,
+ "./sl.js": 290,
+ "./sq": 291,
+ "./sq.js": 291,
+ "./sr": 292,
+ "./sr-cyrl": 293,
+ "./sr-cyrl.js": 293,
+ "./sr.js": 292,
+ "./ss": 294,
+ "./ss.js": 294,
+ "./sv": 295,
+ "./sv.js": 295,
+ "./sw": 296,
+ "./sw.js": 296,
+ "./ta": 297,
+ "./ta.js": 297,
+ "./te": 298,
+ "./te.js": 298,
+ "./tet": 299,
+ "./tet.js": 299,
+ "./tg": 300,
+ "./tg.js": 300,
+ "./th": 301,
+ "./th.js": 301,
+ "./tl-ph": 302,
+ "./tl-ph.js": 302,
+ "./tlh": 303,
+ "./tlh.js": 303,
+ "./tr": 304,
+ "./tr.js": 304,
+ "./tzl": 305,
+ "./tzl.js": 305,
+ "./tzm": 306,
+ "./tzm-latn": 307,
+ "./tzm-latn.js": 307,
+ "./tzm.js": 306,
+ "./ug-cn": 308,
+ "./ug-cn.js": 308,
+ "./uk": 309,
+ "./uk.js": 309,
+ "./ur": 310,
+ "./ur.js": 310,
+ "./uz": 311,
+ "./uz-latn": 312,
+ "./uz-latn.js": 312,
+ "./uz.js": 311,
+ "./vi": 313,
+ "./vi.js": 313,
+ "./x-pseudo": 314,
+ "./x-pseudo.js": 314,
+ "./yo": 315,
+ "./yo.js": 315,
+ "./zh-cn": 316,
+ "./zh-cn.js": 316,
+ "./zh-hk": 317,
+ "./zh-hk.js": 317,
+ "./zh-tw": 318,
+ "./zh-tw.js": 318
};
function webpackContext(req) {
return __webpack_require__(webpackContextResolve(req));
@@ -43707,17 +27262,17 @@
};
webpackContext.resolve = webpackContextResolve;
module.exports = webpackContext;
- webpackContext.id = 296;
+ webpackContext.id = 191;
/***/ }),
-/* 297 */
+/* 192 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -43788,13 +27343,13 @@
/***/ }),
-/* 298 */
+/* 193 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -43927,13 +27482,13 @@
/***/ }),
-/* 299 */
+/* 194 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -43990,13 +27545,13 @@
/***/ }),
-/* 300 */
+/* 195 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -44053,13 +27608,13 @@
/***/ }),
-/* 301 */
+/* 196 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -44179,13 +27734,13 @@
/***/ }),
-/* 302 */
+/* 197 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -44242,13 +27797,13 @@
/***/ }),
-/* 303 */
+/* 198 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -44350,13 +27905,13 @@
/***/ }),
-/* 304 */
+/* 199 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -44413,13 +27968,13 @@
/***/ }),
-/* 305 */
+/* 200 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -44522,13 +28077,13 @@
/***/ }),
-/* 306 */
+/* 201 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -44658,13 +28213,13 @@
/***/ }),
-/* 307 */
+/* 202 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -44752,13 +28307,13 @@
/***/ }),
-/* 308 */
+/* 203 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -44814,13 +28369,13 @@
/***/ }),
-/* 309 */
+/* 204 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -44937,13 +28492,13 @@
/***/ }),
-/* 310 */
+/* 205 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -45060,13 +28615,13 @@
/***/ }),
-/* 311 */
+/* 206 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -45172,13 +28727,13 @@
/***/ }),
-/* 312 */
+/* 207 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -45327,13 +28882,13 @@
/***/ }),
-/* 313 */
+/* 208 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -45419,13 +28974,13 @@
/***/ }),
-/* 314 */
+/* 209 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -45595,13 +29150,13 @@
/***/ }),
-/* 315 */
+/* 210 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -45662,13 +29217,13 @@
/***/ }),
-/* 316 */
+/* 211 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -45746,13 +29301,13 @@
/***/ }),
-/* 317 */
+/* 212 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -45810,13 +29365,13 @@
/***/ }),
-/* 318 */
+/* 213 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -45890,13 +29445,13 @@
/***/ }),
-/* 319 */
+/* 214 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -45970,13 +29525,13 @@
/***/ }),
-/* 320 */
+/* 215 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -46050,13 +29605,13 @@
/***/ }),
-/* 321 */
+/* 216 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -46153,13 +29708,13 @@
/***/ }),
-/* 322 */
+/* 217 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -46257,13 +29812,13 @@
/***/ }),
-/* 323 */
+/* 218 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -46328,13 +29883,13 @@
/***/ }),
-/* 324 */
+/* 219 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -46399,13 +29954,13 @@
/***/ }),
-/* 325 */
+/* 220 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -46466,13 +30021,13 @@
/***/ }),
-/* 326 */
+/* 221 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -46537,13 +30092,13 @@
/***/ }),
-/* 327 */
+/* 222 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -46608,13 +30163,13 @@
/***/ }),
-/* 328 */
+/* 223 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -46674,13 +30229,13 @@
/***/ }),
-/* 329 */
+/* 224 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -46745,13 +30300,13 @@
/***/ }),
-/* 330 */
+/* 225 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -46820,13 +30375,13 @@
/***/ }),
-/* 331 */
+/* 226 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -46916,13 +30471,13 @@
/***/ }),
-/* 332 */
+/* 227 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -47012,13 +30567,13 @@
/***/ }),
-/* 333 */
+/* 228 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -47108,13 +30663,13 @@
/***/ }),
-/* 334 */
+/* 229 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -47192,13 +30747,13 @@
/***/ }),
-/* 335 */
+/* 230 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -47262,13 +30817,13 @@
/***/ }),
-/* 336 */
+/* 231 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -47372,13 +30927,13 @@
/***/ }),
-/* 337 */
+/* 232 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -47485,13 +31040,13 @@
/***/ }),
-/* 338 */
+/* 233 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -47549,13 +31104,13 @@
/***/ }),
-/* 339 */
+/* 234 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -47636,13 +31191,13 @@
/***/ }),
-/* 340 */
+/* 235 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -47714,13 +31269,13 @@
/***/ }),
-/* 341 */
+/* 236 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -47796,13 +31351,13 @@
/***/ }),
-/* 342 */
+/* 237 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -47875,13 +31430,13 @@
/***/ }),
-/* 343 */
+/* 238 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -47956,13 +31511,13 @@
/***/ }),
-/* 344 */
+/* 239 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -48036,13 +31591,13 @@
/***/ }),
-/* 345 */
+/* 240 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -48117,13 +31672,13 @@
/***/ }),
-/* 346 */
+/* 241 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -48244,13 +31799,13 @@
/***/ }),
-/* 347 */
+/* 242 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -48372,13 +31927,13 @@
/***/ }),
-/* 348 */
+/* 243 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -48473,13 +32028,13 @@
/***/ }),
-/* 349 */
+/* 244 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -48601,13 +32156,13 @@
/***/ }),
-/* 350 */
+/* 245 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -48759,13 +32314,13 @@
/***/ }),
-/* 351 */
+/* 246 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -48873,13 +32428,13 @@
/***/ }),
-/* 352 */
+/* 247 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -48972,13 +32527,13 @@
/***/ }),
-/* 353 */
+/* 248 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -49058,13 +32613,13 @@
/***/ }),
-/* 354 */
+/* 249 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -49194,13 +32749,13 @@
/***/ }),
-/* 355 */
+/* 250 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -49267,13 +32822,13 @@
/***/ }),
-/* 356 */
+/* 251 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -49340,13 +32895,13 @@
/***/ }),
-/* 357 */
+/* 252 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -49436,13 +32991,13 @@
/***/ }),
-/* 358 */
+/* 253 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -49522,13 +33077,13 @@
/***/ }),
-/* 359 */
+/* 254 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -49615,13 +33170,13 @@
/***/ }),
-/* 360 */
+/* 255 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -49706,13 +33261,13 @@
/***/ }),
-/* 361 */
+/* 256 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -49820,13 +33375,13 @@
/***/ }),
-/* 362 */
+/* 257 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -49950,13 +33505,13 @@
/***/ }),
-/* 363 */
+/* 258 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -50035,13 +33590,13 @@
/***/ }),
-/* 364 */
+/* 259 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -50158,13 +33713,13 @@
/***/ }),
-/* 365 */
+/* 260 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -50249,13 +33804,13 @@
/***/ }),
-/* 366 */
+/* 261 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -50389,13 +33944,13 @@
/***/ }),
-/* 367 */
+/* 262 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -50463,13 +34018,13 @@
/***/ }),
-/* 368 */
+/* 263 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -50585,13 +34140,13 @@
/***/ }),
-/* 369 */
+/* 264 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -50686,13 +34241,13 @@
/***/ }),
-/* 370 */
+/* 265 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -50802,13 +34357,13 @@
/***/ }),
-/* 371 */
+/* 266 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -50870,13 +34425,13 @@
/***/ }),
-/* 372 */
+/* 267 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -50964,13 +34519,13 @@
/***/ }),
-/* 373 */
+/* 268 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -51049,13 +34604,13 @@
/***/ }),
-/* 374 */
+/* 269 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -51157,13 +34712,13 @@
/***/ }),
-/* 375 */
+/* 270 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -51321,13 +34876,13 @@
/***/ }),
-/* 376 */
+/* 271 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -51407,13 +34962,13 @@
/***/ }),
-/* 377 */
+/* 272 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -51493,13 +35048,13 @@
/***/ }),
-/* 378 */
+/* 273 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -51557,13 +35112,13 @@
/***/ }),
-/* 379 */
+/* 274 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -51654,13 +35209,13 @@
/***/ }),
-/* 380 */
+/* 275 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -51720,13 +35275,13 @@
/***/ }),
-/* 381 */
+/* 276 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -51847,13 +35402,13 @@
/***/ }),
-/* 382 */
+/* 277 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -51938,13 +35493,13 @@
/***/ }),
-/* 383 */
+/* 278 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -52029,13 +35584,13 @@
/***/ }),
-/* 384 */
+/* 279 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -52093,13 +35648,13 @@
/***/ }),
-/* 385 */
+/* 280 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -52221,13 +35776,13 @@
/***/ }),
-/* 386 */
+/* 281 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -52351,13 +35906,13 @@
/***/ }),
-/* 387 */
+/* 282 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -52420,13 +35975,13 @@
/***/ }),
-/* 388 */
+/* 283 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -52485,13 +36040,13 @@
/***/ }),
-/* 389 */
+/* 284 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -52564,13 +36119,13 @@
/***/ }),
-/* 390 */
+/* 285 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -52750,13 +36305,13 @@
/***/ }),
-/* 391 */
+/* 286 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -52852,13 +36407,13 @@
/***/ }),
-/* 392 */
+/* 287 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -52916,13 +36471,13 @@
/***/ }),
-/* 393 */
+/* 288 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -52991,13 +36546,13 @@
/***/ }),
-/* 394 */
+/* 289 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -53151,13 +36706,13 @@
/***/ }),
-/* 395 */
+/* 290 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -53328,13 +36883,13 @@
/***/ }),
-/* 396 */
+/* 291 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -53400,13 +36955,13 @@
/***/ }),
-/* 397 */
+/* 292 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -53515,13 +37070,13 @@
/***/ }),
-/* 398 */
+/* 293 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -53630,13 +37185,13 @@
/***/ }),
-/* 399 */
+/* 294 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -53722,13 +37277,13 @@
/***/ }),
-/* 400 */
+/* 295 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -53795,13 +37350,13 @@
/***/ }),
-/* 401 */
+/* 296 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -53858,13 +37413,13 @@
/***/ }),
-/* 402 */
+/* 297 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -53991,13 +37546,13 @@
/***/ }),
-/* 403 */
+/* 298 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -54084,13 +37639,13 @@
/***/ }),
-/* 404 */
+/* 299 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -54155,13 +37710,13 @@
/***/ }),
-/* 405 */
+/* 300 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -54275,13 +37830,13 @@
/***/ }),
-/* 406 */
+/* 301 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -54346,13 +37901,13 @@
/***/ }),
-/* 407 */
+/* 302 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -54412,13 +37967,13 @@
/***/ }),
-/* 408 */
+/* 303 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -54538,12 +38093,12 @@
/***/ }),
-/* 409 */
+/* 304 */
/***/ (function(module, exports, __webpack_require__) {
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -54636,13 +38191,13 @@
/***/ }),
-/* 410 */
+/* 305 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -54731,13 +38286,13 @@
/***/ }),
-/* 411 */
+/* 306 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -54793,13 +38348,13 @@
/***/ }),
-/* 412 */
+/* 307 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -54855,13 +38410,13 @@
/***/ }),
-/* 413 */
+/* 308 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js language configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -54978,13 +38533,13 @@
/***/ }),
-/* 414 */
+/* 309 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -55136,13 +38691,13 @@
/***/ }),
-/* 415 */
+/* 310 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -55238,13 +38793,13 @@
/***/ }),
-/* 416 */
+/* 311 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -55300,13 +38855,13 @@
/***/ }),
-/* 417 */
+/* 312 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -55362,13 +38917,13 @@
/***/ }),
-/* 418 */
+/* 313 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -55445,13 +39000,13 @@
/***/ }),
-/* 419 */
+/* 314 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -55517,13 +39072,13 @@
/***/ }),
-/* 420 */
+/* 315 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -55581,13 +39136,13 @@
/***/ }),
-/* 421 */
+/* 316 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -55695,13 +39250,13 @@
/***/ }),
-/* 422 */
+/* 317 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -55802,13 +39357,13 @@
/***/ }),
-/* 423 */
+/* 318 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(295)) :
+ true ? factory(__webpack_require__(189)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -55909,7 +39464,7 @@
/***/ }),
-/* 424 */
+/* 319 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -55930,11 +39485,11 @@
var _classnames2 = _interopRequireDefault(_classnames);
- var _DateConstants = __webpack_require__(294);
+ var _DateConstants = __webpack_require__(188);
var _DateConstants2 = _interopRequireDefault(_DateConstants);
- var _util = __webpack_require__(425);
+ var _util = __webpack_require__(320);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -56210,7 +39765,7 @@
module.exports = exports['default'];
/***/ }),
-/* 425 */
+/* 320 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -56232,7 +39787,7 @@
exports.isAllowedDate = isAllowedDate;
exports.formatDate = formatDate;
- var _moment = __webpack_require__(295);
+ var _moment = __webpack_require__(189);
var _moment2 = _interopRequireDefault(_moment);
@@ -56338,7 +39893,7 @@
}
/***/ }),
-/* 426 */
+/* 321 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -56355,19 +39910,19 @@
var _propTypes2 = _interopRequireDefault(_propTypes);
- var _mapSelf = __webpack_require__(427);
+ var _mapSelf = __webpack_require__(322);
var _mapSelf2 = _interopRequireDefault(_mapSelf);
- var _MonthPanel = __webpack_require__(428);
+ var _MonthPanel = __webpack_require__(323);
var _MonthPanel2 = _interopRequireDefault(_MonthPanel);
- var _YearPanel = __webpack_require__(431);
+ var _YearPanel = __webpack_require__(326);
var _YearPanel2 = _interopRequireDefault(_YearPanel);
- var _DecadePanel = __webpack_require__(432);
+ var _DecadePanel = __webpack_require__(327);
var _DecadePanel2 = _interopRequireDefault(_DecadePanel);
@@ -56630,7 +40185,7 @@
module.exports = exports['default'];
/***/ }),
-/* 427 */
+/* 322 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -56657,7 +40212,7 @@
module.exports = exports['default'];
/***/ }),
-/* 428 */
+/* 323 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -56676,15 +40231,15 @@
var _reactLifecyclesCompat = __webpack_require__(91);
- var _MonthTable = __webpack_require__(429);
+ var _MonthTable = __webpack_require__(324);
var _MonthTable2 = _interopRequireDefault(_MonthTable);
- var _DateInput = __webpack_require__(430);
+ var _DateInput = __webpack_require__(325);
var _DateInput2 = _interopRequireDefault(_DateInput);
- var _moment = __webpack_require__(295);
+ var _moment = __webpack_require__(189);
var _moment2 = _interopRequireDefault(_moment);
@@ -56855,7 +40410,7 @@
module.exports = exports['default'];
/***/ }),
-/* 429 */
+/* 324 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -56876,7 +40431,7 @@
var _classnames2 = _interopRequireDefault(_classnames);
- var _index = __webpack_require__(425);
+ var _index = __webpack_require__(320);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -57041,7 +40596,7 @@
module.exports = exports['default'];
/***/ }),
-/* 430 */
+/* 325 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -57062,17 +40617,17 @@
var _propTypes2 = _interopRequireDefault(_propTypes);
- var _KeyCode = __webpack_require__(291);
+ var _KeyCode = __webpack_require__(185);
var _KeyCode2 = _interopRequireDefault(_KeyCode);
var _reactLifecyclesCompat = __webpack_require__(91);
- var _moment = __webpack_require__(295);
+ var _moment = __webpack_require__(189);
var _moment2 = _interopRequireDefault(_moment);
- var _util = __webpack_require__(425);
+ var _util = __webpack_require__(320);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -57301,7 +40856,7 @@
module.exports = exports['default'];
/***/ }),
-/* 431 */
+/* 326 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -57322,15 +40877,15 @@
var _classnames2 = _interopRequireDefault(_classnames);
- var _DecadePanel = __webpack_require__(432);
+ var _DecadePanel = __webpack_require__(327);
var _DecadePanel2 = _interopRequireDefault(_DecadePanel);
- var _DateInput = __webpack_require__(430);
+ var _DateInput = __webpack_require__(325);
var _DateInput2 = _interopRequireDefault(_DateInput);
- var _moment = __webpack_require__(295);
+ var _moment = __webpack_require__(189);
var _moment2 = _interopRequireDefault(_moment);
@@ -57599,7 +41154,7 @@
module.exports = exports['default'];
/***/ }),
-/* 432 */
+/* 327 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -57811,7 +41366,7 @@
module.exports = exports['default'];
/***/ }),
-/* 433 */
+/* 328 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -57834,7 +41389,7 @@
var _propTypes2 = _interopRequireDefault(_propTypes);
- var _mapSelf = __webpack_require__(427);
+ var _mapSelf = __webpack_require__(322);
var _mapSelf2 = _interopRequireDefault(_mapSelf);
@@ -57842,15 +41397,15 @@
var _classnames2 = _interopRequireDefault(_classnames);
- var _TodayButton = __webpack_require__(434);
+ var _TodayButton = __webpack_require__(329);
var _TodayButton2 = _interopRequireDefault(_TodayButton);
- var _OkButton = __webpack_require__(435);
+ var _OkButton = __webpack_require__(330);
var _OkButton2 = _interopRequireDefault(_OkButton);
- var _TimePickerButton = __webpack_require__(436);
+ var _TimePickerButton = __webpack_require__(331);
var _TimePickerButton2 = _interopRequireDefault(_TimePickerButton);
@@ -57947,7 +41502,7 @@
module.exports = exports['default'];
/***/ }),
-/* 434 */
+/* 329 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -57961,7 +41516,7 @@
var _react2 = _interopRequireDefault(_react);
- var _util = __webpack_require__(425);
+ var _util = __webpack_require__(320);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -57993,7 +41548,7 @@
module.exports = exports['default'];
/***/ }),
-/* 435 */
+/* 330 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -58007,7 +41562,7 @@
var _react2 = _interopRequireDefault(_react);
- var _beeButton = __webpack_require__(259);
+ var _beeButton = __webpack_require__(155);
var _beeButton2 = _interopRequireDefault(_beeButton);
@@ -58037,7 +41592,7 @@
module.exports = exports['default'];
/***/ }),
-/* 436 */
+/* 331 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -58087,7 +41642,7 @@
module.exports = exports['default'];
/***/ }),
-/* 437 */
+/* 332 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -58110,11 +41665,11 @@
var _classnames2 = _interopRequireDefault(_classnames);
- var _moment = __webpack_require__(295);
+ var _moment = __webpack_require__(189);
var _moment2 = _interopRequireDefault(_moment);
- var _index = __webpack_require__(425);
+ var _index = __webpack_require__(320);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -58243,7 +41798,7 @@
};
/***/ }),
-/* 438 */
+/* 333 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -58257,7 +41812,7 @@
var _propTypes2 = _interopRequireDefault(_propTypes);
- var _en_US = __webpack_require__(439);
+ var _en_US = __webpack_require__(334);
var _en_US2 = _interopRequireDefault(_en_US);
@@ -58352,7 +41907,7 @@
};
/***/ }),
-/* 439 */
+/* 334 */
/***/ (function(module, exports) {
'use strict';
@@ -58394,7 +41949,7 @@
module.exports = exports['default'];
/***/ }),
-/* 440 */
+/* 335 */
/***/ (function(module, exports) {
'use strict';
@@ -58429,7 +41984,7 @@
}
/***/ }),
-/* 441 */
+/* 336 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -58452,19 +42007,19 @@
var _reactLifecyclesCompat = __webpack_require__(91);
- var _createChainedFunction = __webpack_require__(442);
+ var _createChainedFunction = __webpack_require__(337);
var _createChainedFunction2 = _interopRequireDefault(_createChainedFunction);
- var _KeyCode = __webpack_require__(291);
+ var _KeyCode = __webpack_require__(185);
var _KeyCode2 = _interopRequireDefault(_KeyCode);
- var _placements = __webpack_require__(443);
+ var _placements = __webpack_require__(338);
var _placements2 = _interopRequireDefault(_placements);
- var _rcTrigger = __webpack_require__(444);
+ var _rcTrigger = __webpack_require__(339);
var _rcTrigger2 = _interopRequireDefault(_rcTrigger);
@@ -58706,7 +42261,7 @@
module.exports = exports['default'];
/***/ }),
-/* 442 */
+/* 337 */
/***/ (function(module, exports) {
"use strict";
@@ -58740,7 +42295,7 @@
module.exports = exports['default'];
/***/ }),
-/* 443 */
+/* 338 */
/***/ (function(module, exports) {
'use strict';
@@ -58786,26 +42341,26 @@
module.exports = exports['default'];
/***/ }),
-/* 444 */
+/* 339 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
- var _extends2 = __webpack_require__(445);
+ var _extends2 = __webpack_require__(340);
var _extends3 = _interopRequireDefault(_extends2);
- var _classCallCheck2 = __webpack_require__(447);
+ var _classCallCheck2 = __webpack_require__(379);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
- var _possibleConstructorReturn2 = __webpack_require__(448);
+ var _possibleConstructorReturn2 = __webpack_require__(380);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
- var _inherits2 = __webpack_require__(479);
+ var _inherits2 = __webpack_require__(414);
var _inherits3 = _interopRequireDefault(_inherits2);
@@ -58819,19 +42374,19 @@
var _reactDom = __webpack_require__(2);
- var _contains = __webpack_require__(485);
+ var _contains = __webpack_require__(422);
var _contains2 = _interopRequireDefault(_contains);
- var _addEventListener = __webpack_require__(486);
+ var _addEventListener = __webpack_require__(423);
var _addEventListener2 = _interopRequireDefault(_addEventListener);
- var _ContainerRender = __webpack_require__(487);
+ var _ContainerRender = __webpack_require__(424);
var _ContainerRender2 = _interopRequireDefault(_ContainerRender);
- var _Portal = __webpack_require__(492);
+ var _Portal = __webpack_require__(429);
var _Portal2 = _interopRequireDefault(_Portal);
@@ -58839,9 +42394,9 @@
var _classnames2 = _interopRequireDefault(_classnames);
- var _utils = __webpack_require__(493);
+ var _utils = __webpack_require__(430);
- var _Popup = __webpack_require__(494);
+ var _Popup = __webpack_require__(431);
var _Popup2 = _interopRequireDefault(_Popup);
@@ -59564,14 +43119,14 @@
module.exports = exports['default'];
/***/ }),
-/* 445 */
+/* 340 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
- var _assign = __webpack_require__(446);
+ var _assign = __webpack_require__(341);
var _assign2 = _interopRequireDefault(_assign);
@@ -59592,13 +43147,568 @@
};
/***/ }),
-/* 446 */
+/* 341 */
/***/ (function(module, exports, __webpack_require__) {
- module.exports = { "default": __webpack_require__(153), __esModule: true };
+ module.exports = { "default": __webpack_require__(342), __esModule: true };
/***/ }),
-/* 447 */
+/* 342 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ __webpack_require__(343);
+ module.exports = __webpack_require__(346).Object.assign;
+
+
+/***/ }),
+/* 343 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ // 19.1.3.1 Object.assign(target, source)
+ var $export = __webpack_require__(344);
+
+ $export($export.S + $export.F, 'Object', { assign: __webpack_require__(360) });
+
+
+/***/ }),
+/* 344 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ var global = __webpack_require__(345);
+ var core = __webpack_require__(346);
+ var ctx = __webpack_require__(347);
+ var hide = __webpack_require__(349);
+ var has = __webpack_require__(359);
+ var PROTOTYPE = 'prototype';
+
+ var $export = function (type, name, source) {
+ var IS_FORCED = type & $export.F;
+ var IS_GLOBAL = type & $export.G;
+ var IS_STATIC = type & $export.S;
+ var IS_PROTO = type & $export.P;
+ var IS_BIND = type & $export.B;
+ var IS_WRAP = type & $export.W;
+ var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
+ var expProto = exports[PROTOTYPE];
+ var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];
+ var key, own, out;
+ if (IS_GLOBAL) source = name;
+ for (key in source) {
+ // contains in native
+ own = !IS_FORCED && target && target[key] !== undefined;
+ if (own && has(exports, key)) continue;
+ // export native or passed
+ out = own ? target[key] : source[key];
+ // prevent global pollution for namespaces
+ exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
+ // bind timers to global for call from export context
+ : IS_BIND && own ? ctx(out, global)
+ // wrap global constructors for prevent change them in library
+ : IS_WRAP && target[key] == out ? (function (C) {
+ var F = function (a, b, c) {
+ if (this instanceof C) {
+ switch (arguments.length) {
+ case 0: return new C();
+ case 1: return new C(a);
+ case 2: return new C(a, b);
+ } return new C(a, b, c);
+ } return C.apply(this, arguments);
+ };
+ F[PROTOTYPE] = C[PROTOTYPE];
+ return F;
+ // make static versions for prototype methods
+ })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
+ // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
+ if (IS_PROTO) {
+ (exports.virtual || (exports.virtual = {}))[key] = out;
+ // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
+ if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);
+ }
+ }
+ };
+ // type bitmap
+ $export.F = 1; // forced
+ $export.G = 2; // global
+ $export.S = 4; // static
+ $export.P = 8; // proto
+ $export.B = 16; // bind
+ $export.W = 32; // wrap
+ $export.U = 64; // safe
+ $export.R = 128; // real proto method for `library`
+ module.exports = $export;
+
+
+/***/ }),
+/* 345 */
+/***/ (function(module, exports) {
+
+ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
+ var global = module.exports = typeof window != 'undefined' && window.Math == Math
+ ? window : typeof self != 'undefined' && self.Math == Math ? self
+ // eslint-disable-next-line no-new-func
+ : Function('return this')();
+ if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
+
+
+/***/ }),
+/* 346 */
+/***/ (function(module, exports) {
+
+ var core = module.exports = { version: '2.6.5' };
+ if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
+
+
+/***/ }),
+/* 347 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ // optional / simple context binding
+ var aFunction = __webpack_require__(348);
+ module.exports = function (fn, that, length) {
+ aFunction(fn);
+ if (that === undefined) return fn;
+ switch (length) {
+ case 1: return function (a) {
+ return fn.call(that, a);
+ };
+ case 2: return function (a, b) {
+ return fn.call(that, a, b);
+ };
+ case 3: return function (a, b, c) {
+ return fn.call(that, a, b, c);
+ };
+ }
+ return function (/* ...args */) {
+ return fn.apply(that, arguments);
+ };
+ };
+
+
+/***/ }),
+/* 348 */
+/***/ (function(module, exports) {
+
+ module.exports = function (it) {
+ if (typeof it != 'function') throw TypeError(it + ' is not a function!');
+ return it;
+ };
+
+
+/***/ }),
+/* 349 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ var dP = __webpack_require__(350);
+ var createDesc = __webpack_require__(358);
+ module.exports = __webpack_require__(354) ? function (object, key, value) {
+ return dP.f(object, key, createDesc(1, value));
+ } : function (object, key, value) {
+ object[key] = value;
+ return object;
+ };
+
+
+/***/ }),
+/* 350 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ var anObject = __webpack_require__(351);
+ var IE8_DOM_DEFINE = __webpack_require__(353);
+ var toPrimitive = __webpack_require__(357);
+ var dP = Object.defineProperty;
+
+ exports.f = __webpack_require__(354) ? Object.defineProperty : function defineProperty(O, P, Attributes) {
+ anObject(O);
+ P = toPrimitive(P, true);
+ anObject(Attributes);
+ if (IE8_DOM_DEFINE) try {
+ return dP(O, P, Attributes);
+ } catch (e) { /* empty */ }
+ if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
+ if ('value' in Attributes) O[P] = Attributes.value;
+ return O;
+ };
+
+
+/***/ }),
+/* 351 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ var isObject = __webpack_require__(352);
+ module.exports = function (it) {
+ if (!isObject(it)) throw TypeError(it + ' is not an object!');
+ return it;
+ };
+
+
+/***/ }),
+/* 352 */
+/***/ (function(module, exports) {
+
+ module.exports = function (it) {
+ return typeof it === 'object' ? it !== null : typeof it === 'function';
+ };
+
+
+/***/ }),
+/* 353 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ module.exports = !__webpack_require__(354) && !__webpack_require__(355)(function () {
+ return Object.defineProperty(__webpack_require__(356)('div'), 'a', { get: function () { return 7; } }).a != 7;
+ });
+
+
+/***/ }),
+/* 354 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ // Thank's IE8 for his funny defineProperty
+ module.exports = !__webpack_require__(355)(function () {
+ return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
+ });
+
+
+/***/ }),
+/* 355 */
+/***/ (function(module, exports) {
+
+ module.exports = function (exec) {
+ try {
+ return !!exec();
+ } catch (e) {
+ return true;
+ }
+ };
+
+
+/***/ }),
+/* 356 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ var isObject = __webpack_require__(352);
+ var document = __webpack_require__(345).document;
+ // typeof document.createElement is 'object' in old IE
+ var is = isObject(document) && isObject(document.createElement);
+ module.exports = function (it) {
+ return is ? document.createElement(it) : {};
+ };
+
+
+/***/ }),
+/* 357 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ // 7.1.1 ToPrimitive(input [, PreferredType])
+ var isObject = __webpack_require__(352);
+ // instead of the ES6 spec version, we didn't implement @@toPrimitive case
+ // and the second argument - flag - preferred type is a string
+ module.exports = function (it, S) {
+ if (!isObject(it)) return it;
+ var fn, val;
+ if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
+ if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
+ if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
+ throw TypeError("Can't convert object to primitive value");
+ };
+
+
+/***/ }),
+/* 358 */
+/***/ (function(module, exports) {
+
+ module.exports = function (bitmap, value) {
+ return {
+ enumerable: !(bitmap & 1),
+ configurable: !(bitmap & 2),
+ writable: !(bitmap & 4),
+ value: value
+ };
+ };
+
+
+/***/ }),
+/* 359 */
+/***/ (function(module, exports) {
+
+ var hasOwnProperty = {}.hasOwnProperty;
+ module.exports = function (it, key) {
+ return hasOwnProperty.call(it, key);
+ };
+
+
+/***/ }),
+/* 360 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ 'use strict';
+ // 19.1.2.1 Object.assign(target, source, ...)
+ var getKeys = __webpack_require__(361);
+ var gOPS = __webpack_require__(376);
+ var pIE = __webpack_require__(377);
+ var toObject = __webpack_require__(378);
+ var IObject = __webpack_require__(364);
+ var $assign = Object.assign;
+
+ // should work with symbols and should have deterministic property order (V8 bug)
+ module.exports = !$assign || __webpack_require__(355)(function () {
+ var A = {};
+ var B = {};
+ // eslint-disable-next-line no-undef
+ var S = Symbol();
+ var K = 'abcdefghijklmnopqrst';
+ A[S] = 7;
+ K.split('').forEach(function (k) { B[k] = k; });
+ return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
+ }) ? function assign(target, source) { // eslint-disable-line no-unused-vars
+ var T = toObject(target);
+ var aLen = arguments.length;
+ var index = 1;
+ var getSymbols = gOPS.f;
+ var isEnum = pIE.f;
+ while (aLen > index) {
+ var S = IObject(arguments[index++]);
+ var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);
+ var length = keys.length;
+ var j = 0;
+ var key;
+ while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key];
+ } return T;
+ } : $assign;
+
+
+/***/ }),
+/* 361 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ // 19.1.2.14 / 15.2.3.14 Object.keys(O)
+ var $keys = __webpack_require__(362);
+ var enumBugKeys = __webpack_require__(375);
+
+ module.exports = Object.keys || function keys(O) {
+ return $keys(O, enumBugKeys);
+ };
+
+
+/***/ }),
+/* 362 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ var has = __webpack_require__(359);
+ var toIObject = __webpack_require__(363);
+ var arrayIndexOf = __webpack_require__(367)(false);
+ var IE_PROTO = __webpack_require__(371)('IE_PROTO');
+
+ module.exports = function (object, names) {
+ var O = toIObject(object);
+ var i = 0;
+ var result = [];
+ var key;
+ for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
+ // Don't enum bug & hidden keys
+ while (names.length > i) if (has(O, key = names[i++])) {
+ ~arrayIndexOf(result, key) || result.push(key);
+ }
+ return result;
+ };
+
+
+/***/ }),
+/* 363 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ // to indexed object, toObject with fallback for non-array-like ES3 strings
+ var IObject = __webpack_require__(364);
+ var defined = __webpack_require__(366);
+ module.exports = function (it) {
+ return IObject(defined(it));
+ };
+
+
+/***/ }),
+/* 364 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ // fallback for non-array-like ES3 and non-enumerable old V8 strings
+ var cof = __webpack_require__(365);
+ // eslint-disable-next-line no-prototype-builtins
+ module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
+ return cof(it) == 'String' ? it.split('') : Object(it);
+ };
+
+
+/***/ }),
+/* 365 */
+/***/ (function(module, exports) {
+
+ var toString = {}.toString;
+
+ module.exports = function (it) {
+ return toString.call(it).slice(8, -1);
+ };
+
+
+/***/ }),
+/* 366 */
+/***/ (function(module, exports) {
+
+ // 7.2.1 RequireObjectCoercible(argument)
+ module.exports = function (it) {
+ if (it == undefined) throw TypeError("Can't call method on " + it);
+ return it;
+ };
+
+
+/***/ }),
+/* 367 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ // false -> Array#indexOf
+ // true -> Array#includes
+ var toIObject = __webpack_require__(363);
+ var toLength = __webpack_require__(368);
+ var toAbsoluteIndex = __webpack_require__(370);
+ module.exports = function (IS_INCLUDES) {
+ return function ($this, el, fromIndex) {
+ var O = toIObject($this);
+ var length = toLength(O.length);
+ var index = toAbsoluteIndex(fromIndex, length);
+ var value;
+ // Array#includes uses SameValueZero equality algorithm
+ // eslint-disable-next-line no-self-compare
+ if (IS_INCLUDES && el != el) while (length > index) {
+ value = O[index++];
+ // eslint-disable-next-line no-self-compare
+ if (value != value) return true;
+ // Array#indexOf ignores holes, Array#includes - not
+ } else for (;length > index; index++) if (IS_INCLUDES || index in O) {
+ if (O[index] === el) return IS_INCLUDES || index || 0;
+ } return !IS_INCLUDES && -1;
+ };
+ };
+
+
+/***/ }),
+/* 368 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ // 7.1.15 ToLength
+ var toInteger = __webpack_require__(369);
+ var min = Math.min;
+ module.exports = function (it) {
+ return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
+ };
+
+
+/***/ }),
+/* 369 */
+/***/ (function(module, exports) {
+
+ // 7.1.4 ToInteger
+ var ceil = Math.ceil;
+ var floor = Math.floor;
+ module.exports = function (it) {
+ return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
+ };
+
+
+/***/ }),
+/* 370 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ var toInteger = __webpack_require__(369);
+ var max = Math.max;
+ var min = Math.min;
+ module.exports = function (index, length) {
+ index = toInteger(index);
+ return index < 0 ? max(index + length, 0) : min(index, length);
+ };
+
+
+/***/ }),
+/* 371 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ var shared = __webpack_require__(372)('keys');
+ var uid = __webpack_require__(374);
+ module.exports = function (key) {
+ return shared[key] || (shared[key] = uid(key));
+ };
+
+
+/***/ }),
+/* 372 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ var core = __webpack_require__(346);
+ var global = __webpack_require__(345);
+ var SHARED = '__core-js_shared__';
+ var store = global[SHARED] || (global[SHARED] = {});
+
+ (module.exports = function (key, value) {
+ return store[key] || (store[key] = value !== undefined ? value : {});
+ })('versions', []).push({
+ version: core.version,
+ mode: __webpack_require__(373) ? 'pure' : 'global',
+ copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
+ });
+
+
+/***/ }),
+/* 373 */
+/***/ (function(module, exports) {
+
+ module.exports = true;
+
+
+/***/ }),
+/* 374 */
+/***/ (function(module, exports) {
+
+ var id = 0;
+ var px = Math.random();
+ module.exports = function (key) {
+ return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
+ };
+
+
+/***/ }),
+/* 375 */
+/***/ (function(module, exports) {
+
+ // IE 8- don't enum bug keys
+ module.exports = (
+ 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
+ ).split(',');
+
+
+/***/ }),
+/* 376 */
+/***/ (function(module, exports) {
+
+ exports.f = Object.getOwnPropertySymbols;
+
+
+/***/ }),
+/* 377 */
+/***/ (function(module, exports) {
+
+ exports.f = {}.propertyIsEnumerable;
+
+
+/***/ }),
+/* 378 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ // 7.1.13 ToObject(argument)
+ var defined = __webpack_require__(366);
+ module.exports = function (it) {
+ return Object(defined(it));
+ };
+
+
+/***/ }),
+/* 379 */
/***/ (function(module, exports) {
"use strict";
@@ -59612,14 +43722,14 @@
};
/***/ }),
-/* 448 */
+/* 380 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
- var _typeof2 = __webpack_require__(449);
+ var _typeof2 = __webpack_require__(381);
var _typeof3 = _interopRequireDefault(_typeof2);
@@ -59634,18 +43744,18 @@
};
/***/ }),
-/* 449 */
+/* 381 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
- var _iterator = __webpack_require__(450);
+ var _iterator = __webpack_require__(382);
var _iterator2 = _interopRequireDefault(_iterator);
- var _symbol = __webpack_require__(466);
+ var _symbol = __webpack_require__(401);
var _symbol2 = _interopRequireDefault(_symbol);
@@ -59660,29 +43770,29 @@
};
/***/ }),
-/* 450 */
+/* 382 */
/***/ (function(module, exports, __webpack_require__) {
- module.exports = { "default": __webpack_require__(451), __esModule: true };
+ module.exports = { "default": __webpack_require__(383), __esModule: true };
/***/ }),
-/* 451 */
+/* 383 */
/***/ (function(module, exports, __webpack_require__) {
- __webpack_require__(452);
- __webpack_require__(461);
- module.exports = __webpack_require__(465).f('iterator');
+ __webpack_require__(384);
+ __webpack_require__(396);
+ module.exports = __webpack_require__(400).f('iterator');
/***/ }),
-/* 452 */
+/* 384 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
- var $at = __webpack_require__(453)(true);
+ var $at = __webpack_require__(385)(true);
// 21.1.3.27 String.prototype[@@iterator]()
- __webpack_require__(454)(String, 'String', function (iterated) {
+ __webpack_require__(386)(String, 'String', function (iterated) {
this._t = String(iterated); // target
this._i = 0; // next index
// 21.1.5.2.1 %StringIteratorPrototype%.next()
@@ -59698,11 +43808,11 @@
/***/ }),
-/* 453 */
+/* 385 */
/***/ (function(module, exports, __webpack_require__) {
- var toInteger = __webpack_require__(180);
- var defined = __webpack_require__(177);
+ var toInteger = __webpack_require__(369);
+ var defined = __webpack_require__(366);
// true -> String#at
// false -> String#codePointAt
module.exports = function (TO_STRING) {
@@ -59721,19 +43831,19 @@
/***/ }),
-/* 454 */
+/* 386 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
- var LIBRARY = __webpack_require__(184);
- var $export = __webpack_require__(155);
- var redefine = __webpack_require__(455);
- var hide = __webpack_require__(160);
- var Iterators = __webpack_require__(456);
- var $iterCreate = __webpack_require__(457);
- var setToStringTag = __webpack_require__(458);
- var getPrototypeOf = __webpack_require__(460);
- var ITERATOR = __webpack_require__(459)('iterator');
+ var LIBRARY = __webpack_require__(373);
+ var $export = __webpack_require__(344);
+ var redefine = __webpack_require__(387);
+ var hide = __webpack_require__(349);
+ var Iterators = __webpack_require__(388);
+ var $iterCreate = __webpack_require__(389);
+ var setToStringTag = __webpack_require__(393);
+ var getPrototypeOf = __webpack_require__(395);
+ var ITERATOR = __webpack_require__(394)('iterator');
var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
var FF_ITERATOR = '@@iterator';
var KEYS = 'keys';
@@ -59796,31 +43906,31 @@
/***/ }),
-/* 455 */
+/* 387 */
/***/ (function(module, exports, __webpack_require__) {
- module.exports = __webpack_require__(160);
+ module.exports = __webpack_require__(349);
/***/ }),
-/* 456 */
+/* 388 */
/***/ (function(module, exports) {
module.exports = {};
/***/ }),
-/* 457 */
+/* 389 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
- var create = __webpack_require__(206);
- var descriptor = __webpack_require__(169);
- var setToStringTag = __webpack_require__(458);
+ var create = __webpack_require__(390);
+ var descriptor = __webpack_require__(358);
+ var setToStringTag = __webpack_require__(393);
var IteratorPrototype = {};
// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
- __webpack_require__(160)(IteratorPrototype, __webpack_require__(459)('iterator'), function () { return this; });
+ __webpack_require__(349)(IteratorPrototype, __webpack_require__(394)('iterator'), function () { return this; });
module.exports = function (Constructor, NAME, next) {
Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
@@ -59829,12 +43939,86 @@
/***/ }),
-/* 458 */
+/* 390 */
/***/ (function(module, exports, __webpack_require__) {
- var def = __webpack_require__(161).f;
- var has = __webpack_require__(170);
- var TAG = __webpack_require__(459)('toStringTag');
+ // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
+ var anObject = __webpack_require__(351);
+ var dPs = __webpack_require__(391);
+ var enumBugKeys = __webpack_require__(375);
+ var IE_PROTO = __webpack_require__(371)('IE_PROTO');
+ var Empty = function () { /* empty */ };
+ var PROTOTYPE = 'prototype';
+
+ // Create object with fake `null` prototype: use iframe Object with cleared prototype
+ var createDict = function () {
+ // Thrash, waste and sodomy: IE GC bug
+ var iframe = __webpack_require__(356)('iframe');
+ var i = enumBugKeys.length;
+ var lt = '<';
+ var gt = '>';
+ var iframeDocument;
+ iframe.style.display = 'none';
+ __webpack_require__(392).appendChild(iframe);
+ iframe.src = 'javascript:'; // eslint-disable-line no-script-url
+ // createDict = iframe.contentWindow.Object;
+ // html.removeChild(iframe);
+ iframeDocument = iframe.contentWindow.document;
+ iframeDocument.open();
+ iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
+ iframeDocument.close();
+ createDict = iframeDocument.F;
+ while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
+ return createDict();
+ };
+
+ module.exports = Object.create || function create(O, Properties) {
+ var result;
+ if (O !== null) {
+ Empty[PROTOTYPE] = anObject(O);
+ result = new Empty();
+ Empty[PROTOTYPE] = null;
+ // add "__proto__" for Object.getPrototypeOf polyfill
+ result[IE_PROTO] = O;
+ } else result = createDict();
+ return Properties === undefined ? result : dPs(result, Properties);
+ };
+
+
+/***/ }),
+/* 391 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ var dP = __webpack_require__(350);
+ var anObject = __webpack_require__(351);
+ var getKeys = __webpack_require__(361);
+
+ module.exports = __webpack_require__(354) ? Object.defineProperties : function defineProperties(O, Properties) {
+ anObject(O);
+ var keys = getKeys(Properties);
+ var length = keys.length;
+ var i = 0;
+ var P;
+ while (length > i) dP.f(O, P = keys[i++], Properties[P]);
+ return O;
+ };
+
+
+/***/ }),
+/* 392 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ var document = __webpack_require__(345).document;
+ module.exports = document && document.documentElement;
+
+
+/***/ }),
+/* 393 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ var def = __webpack_require__(350).f;
+ var has = __webpack_require__(359);
+ var TAG = __webpack_require__(394)('toStringTag');
module.exports = function (it, tag, stat) {
if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
@@ -59842,12 +44026,12 @@
/***/ }),
-/* 459 */
+/* 394 */
/***/ (function(module, exports, __webpack_require__) {
- var store = __webpack_require__(183)('wks');
- var uid = __webpack_require__(185);
- var Symbol = __webpack_require__(156).Symbol;
+ var store = __webpack_require__(372)('wks');
+ var uid = __webpack_require__(374);
+ var Symbol = __webpack_require__(345).Symbol;
var USE_SYMBOL = typeof Symbol == 'function';
var $exports = module.exports = function (name) {
@@ -59859,13 +44043,13 @@
/***/ }),
-/* 460 */
+/* 395 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
- var has = __webpack_require__(170);
- var toObject = __webpack_require__(189);
- var IE_PROTO = __webpack_require__(182)('IE_PROTO');
+ var has = __webpack_require__(359);
+ var toObject = __webpack_require__(378);
+ var IE_PROTO = __webpack_require__(371)('IE_PROTO');
var ObjectProto = Object.prototype;
module.exports = Object.getPrototypeOf || function (O) {
@@ -59878,14 +44062,14 @@
/***/ }),
-/* 461 */
+/* 396 */
/***/ (function(module, exports, __webpack_require__) {
- __webpack_require__(462);
- var global = __webpack_require__(156);
- var hide = __webpack_require__(160);
- var Iterators = __webpack_require__(456);
- var TO_STRING_TAG = __webpack_require__(459)('toStringTag');
+ __webpack_require__(397);
+ var global = __webpack_require__(345);
+ var hide = __webpack_require__(349);
+ var Iterators = __webpack_require__(388);
+ var TO_STRING_TAG = __webpack_require__(394)('toStringTag');
var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' +
'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' +
@@ -59903,20 +44087,20 @@
/***/ }),
-/* 462 */
+/* 397 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
- var addToUnscopables = __webpack_require__(463);
- var step = __webpack_require__(464);
- var Iterators = __webpack_require__(456);
- var toIObject = __webpack_require__(174);
+ var addToUnscopables = __webpack_require__(398);
+ var step = __webpack_require__(399);
+ var Iterators = __webpack_require__(388);
+ var toIObject = __webpack_require__(363);
// 22.1.3.4 Array.prototype.entries()
// 22.1.3.13 Array.prototype.keys()
// 22.1.3.29 Array.prototype.values()
// 22.1.3.30 Array.prototype[@@iterator]()
- module.exports = __webpack_require__(454)(Array, 'Array', function (iterated, kind) {
+ module.exports = __webpack_require__(386)(Array, 'Array', function (iterated, kind) {
this._t = toIObject(iterated); // target
this._i = 0; // next index
this._k = kind; // kind
@@ -59943,14 +44127,14 @@
/***/ }),
-/* 463 */
+/* 398 */
/***/ (function(module, exports) {
module.exports = function () { /* empty */ };
/***/ }),
-/* 464 */
+/* 399 */
/***/ (function(module, exports) {
module.exports = function (done, value) {
@@ -59959,60 +44143,60 @@
/***/ }),
-/* 465 */
+/* 400 */
/***/ (function(module, exports, __webpack_require__) {
- exports.f = __webpack_require__(459);
+ exports.f = __webpack_require__(394);
/***/ }),
-/* 466 */
+/* 401 */
/***/ (function(module, exports, __webpack_require__) {
- module.exports = { "default": __webpack_require__(467), __esModule: true };
+ module.exports = { "default": __webpack_require__(402), __esModule: true };
/***/ }),
-/* 467 */
+/* 402 */
/***/ (function(module, exports, __webpack_require__) {
- __webpack_require__(468);
- __webpack_require__(476);
- __webpack_require__(477);
- __webpack_require__(478);
- module.exports = __webpack_require__(157).Symbol;
+ __webpack_require__(403);
+ __webpack_require__(411);
+ __webpack_require__(412);
+ __webpack_require__(413);
+ module.exports = __webpack_require__(346).Symbol;
/***/ }),
-/* 468 */
+/* 403 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
// ECMAScript 6 symbols shim
- var global = __webpack_require__(156);
- var has = __webpack_require__(170);
- var DESCRIPTORS = __webpack_require__(165);
- var $export = __webpack_require__(155);
- var redefine = __webpack_require__(455);
- var META = __webpack_require__(469).KEY;
- var $fails = __webpack_require__(166);
- var shared = __webpack_require__(183);
- var setToStringTag = __webpack_require__(458);
- var uid = __webpack_require__(185);
- var wks = __webpack_require__(459);
- var wksExt = __webpack_require__(465);
- var wksDefine = __webpack_require__(470);
- var enumKeys = __webpack_require__(471);
- var isArray = __webpack_require__(472);
- var anObject = __webpack_require__(162);
- var isObject = __webpack_require__(163);
- var toIObject = __webpack_require__(174);
- var toPrimitive = __webpack_require__(168);
- var createDesc = __webpack_require__(169);
- var _create = __webpack_require__(206);
- var gOPNExt = __webpack_require__(473);
- var $GOPD = __webpack_require__(475);
- var $DP = __webpack_require__(161);
- var $keys = __webpack_require__(172);
+ var global = __webpack_require__(345);
+ var has = __webpack_require__(359);
+ var DESCRIPTORS = __webpack_require__(354);
+ var $export = __webpack_require__(344);
+ var redefine = __webpack_require__(387);
+ var META = __webpack_require__(404).KEY;
+ var $fails = __webpack_require__(355);
+ var shared = __webpack_require__(372);
+ var setToStringTag = __webpack_require__(393);
+ var uid = __webpack_require__(374);
+ var wks = __webpack_require__(394);
+ var wksExt = __webpack_require__(400);
+ var wksDefine = __webpack_require__(405);
+ var enumKeys = __webpack_require__(406);
+ var isArray = __webpack_require__(407);
+ var anObject = __webpack_require__(351);
+ var isObject = __webpack_require__(352);
+ var toIObject = __webpack_require__(363);
+ var toPrimitive = __webpack_require__(357);
+ var createDesc = __webpack_require__(358);
+ var _create = __webpack_require__(390);
+ var gOPNExt = __webpack_require__(408);
+ var $GOPD = __webpack_require__(410);
+ var $DP = __webpack_require__(350);
+ var $keys = __webpack_require__(361);
var gOPD = $GOPD.f;
var dP = $DP.f;
var gOPN = gOPNExt.f;
@@ -60135,11 +44319,11 @@
$GOPD.f = $getOwnPropertyDescriptor;
$DP.f = $defineProperty;
- __webpack_require__(474).f = gOPNExt.f = $getOwnPropertyNames;
- __webpack_require__(188).f = $propertyIsEnumerable;
- __webpack_require__(187).f = $getOwnPropertySymbols;
+ __webpack_require__(409).f = gOPNExt.f = $getOwnPropertyNames;
+ __webpack_require__(377).f = $propertyIsEnumerable;
+ __webpack_require__(376).f = $getOwnPropertySymbols;
- if (DESCRIPTORS && !__webpack_require__(184)) {
+ if (DESCRIPTORS && !__webpack_require__(373)) {
redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
}
@@ -60213,7 +44397,7 @@
});
// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
- $Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(160)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
+ $Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(349)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
// 19.4.3.5 Symbol.prototype[@@toStringTag]
setToStringTag($Symbol, 'Symbol');
// 20.2.1.9 Math[@@toStringTag]
@@ -60223,18 +44407,18 @@
/***/ }),
-/* 469 */
+/* 404 */
/***/ (function(module, exports, __webpack_require__) {
- var META = __webpack_require__(185)('meta');
- var isObject = __webpack_require__(163);
- var has = __webpack_require__(170);
- var setDesc = __webpack_require__(161).f;
+ var META = __webpack_require__(374)('meta');
+ var isObject = __webpack_require__(352);
+ var has = __webpack_require__(359);
+ var setDesc = __webpack_require__(350).f;
var id = 0;
var isExtensible = Object.isExtensible || function () {
return true;
};
- var FREEZE = !__webpack_require__(166)(function () {
+ var FREEZE = !__webpack_require__(355)(function () {
return isExtensible(Object.preventExtensions({}));
});
var setMeta = function (it) {
@@ -60282,14 +44466,14 @@
/***/ }),
-/* 470 */
+/* 405 */
/***/ (function(module, exports, __webpack_require__) {
- var global = __webpack_require__(156);
- var core = __webpack_require__(157);
- var LIBRARY = __webpack_require__(184);
- var wksExt = __webpack_require__(465);
- var defineProperty = __webpack_require__(161).f;
+ var global = __webpack_require__(345);
+ var core = __webpack_require__(346);
+ var LIBRARY = __webpack_require__(373);
+ var wksExt = __webpack_require__(400);
+ var defineProperty = __webpack_require__(350).f;
module.exports = function (name) {
var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });
@@ -60297,13 +44481,13 @@
/***/ }),
-/* 471 */
+/* 406 */
/***/ (function(module, exports, __webpack_require__) {
// all enumerable object keys, includes symbols
- var getKeys = __webpack_require__(172);
- var gOPS = __webpack_require__(187);
- var pIE = __webpack_require__(188);
+ var getKeys = __webpack_require__(361);
+ var gOPS = __webpack_require__(376);
+ var pIE = __webpack_require__(377);
module.exports = function (it) {
var result = getKeys(it);
var getSymbols = gOPS.f;
@@ -60318,23 +44502,23 @@
/***/ }),
-/* 472 */
+/* 407 */
/***/ (function(module, exports, __webpack_require__) {
// 7.2.2 IsArray(argument)
- var cof = __webpack_require__(176);
+ var cof = __webpack_require__(365);
module.exports = Array.isArray || function isArray(arg) {
return cof(arg) == 'Array';
};
/***/ }),
-/* 473 */
+/* 408 */
/***/ (function(module, exports, __webpack_require__) {
// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
- var toIObject = __webpack_require__(174);
- var gOPN = __webpack_require__(474).f;
+ var toIObject = __webpack_require__(363);
+ var gOPN = __webpack_require__(409).f;
var toString = {}.toString;
var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
@@ -60354,12 +44538,12 @@
/***/ }),
-/* 474 */
+/* 409 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
- var $keys = __webpack_require__(173);
- var hiddenKeys = __webpack_require__(186).concat('length', 'prototype');
+ var $keys = __webpack_require__(362);
+ var hiddenKeys = __webpack_require__(375).concat('length', 'prototype');
exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
return $keys(O, hiddenKeys);
@@ -60367,18 +44551,18 @@
/***/ }),
-/* 475 */
+/* 410 */
/***/ (function(module, exports, __webpack_require__) {
- var pIE = __webpack_require__(188);
- var createDesc = __webpack_require__(169);
- var toIObject = __webpack_require__(174);
- var toPrimitive = __webpack_require__(168);
- var has = __webpack_require__(170);
- var IE8_DOM_DEFINE = __webpack_require__(164);
+ var pIE = __webpack_require__(377);
+ var createDesc = __webpack_require__(358);
+ var toIObject = __webpack_require__(363);
+ var toPrimitive = __webpack_require__(357);
+ var has = __webpack_require__(359);
+ var IE8_DOM_DEFINE = __webpack_require__(353);
var gOPD = Object.getOwnPropertyDescriptor;
- exports.f = __webpack_require__(165) ? gOPD : function getOwnPropertyDescriptor(O, P) {
+ exports.f = __webpack_require__(354) ? gOPD : function getOwnPropertyDescriptor(O, P) {
O = toIObject(O);
P = toPrimitive(P, true);
if (IE8_DOM_DEFINE) try {
@@ -60389,42 +44573,42 @@
/***/ }),
-/* 476 */
+/* 411 */
/***/ (function(module, exports) {
/***/ }),
-/* 477 */
+/* 412 */
/***/ (function(module, exports, __webpack_require__) {
- __webpack_require__(470)('asyncIterator');
+ __webpack_require__(405)('asyncIterator');
/***/ }),
-/* 478 */
+/* 413 */
/***/ (function(module, exports, __webpack_require__) {
- __webpack_require__(470)('observable');
+ __webpack_require__(405)('observable');
/***/ }),
-/* 479 */
+/* 414 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
- var _setPrototypeOf = __webpack_require__(480);
+ var _setPrototypeOf = __webpack_require__(415);
var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf);
- var _create = __webpack_require__(484);
+ var _create = __webpack_require__(419);
var _create2 = _interopRequireDefault(_create);
- var _typeof2 = __webpack_require__(449);
+ var _typeof2 = __webpack_require__(381);
var _typeof3 = _interopRequireDefault(_typeof2);
@@ -60447,36 +44631,36 @@
};
/***/ }),
-/* 480 */
+/* 415 */
/***/ (function(module, exports, __webpack_require__) {
- module.exports = { "default": __webpack_require__(481), __esModule: true };
+ module.exports = { "default": __webpack_require__(416), __esModule: true };
/***/ }),
-/* 481 */
+/* 416 */
/***/ (function(module, exports, __webpack_require__) {
- __webpack_require__(482);
- module.exports = __webpack_require__(157).Object.setPrototypeOf;
+ __webpack_require__(417);
+ module.exports = __webpack_require__(346).Object.setPrototypeOf;
/***/ }),
-/* 482 */
+/* 417 */
/***/ (function(module, exports, __webpack_require__) {
// 19.1.3.19 Object.setPrototypeOf(O, proto)
- var $export = __webpack_require__(155);
- $export($export.S, 'Object', { setPrototypeOf: __webpack_require__(483).set });
+ var $export = __webpack_require__(344);
+ $export($export.S, 'Object', { setPrototypeOf: __webpack_require__(418).set });
/***/ }),
-/* 483 */
+/* 418 */
/***/ (function(module, exports, __webpack_require__) {
// Works with __proto__ only. Old v8 can't work with null proto objects.
/* eslint-disable no-proto */
- var isObject = __webpack_require__(163);
- var anObject = __webpack_require__(162);
+ var isObject = __webpack_require__(352);
+ var anObject = __webpack_require__(351);
var check = function (O, proto) {
anObject(O);
if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!");
@@ -60485,7 +44669,7 @@
set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
function (test, buggy, set) {
try {
- set = __webpack_require__(158)(Function.call, __webpack_require__(475).f(Object.prototype, '__proto__').set, 2);
+ set = __webpack_require__(347)(Function.call, __webpack_require__(410).f(Object.prototype, '__proto__').set, 2);
set(test, []);
buggy = !(test instanceof Array);
} catch (e) { buggy = true; }
@@ -60501,13 +44685,33 @@
/***/ }),
-/* 484 */
+/* 419 */
/***/ (function(module, exports, __webpack_require__) {
- module.exports = { "default": __webpack_require__(204), __esModule: true };
+ module.exports = { "default": __webpack_require__(420), __esModule: true };
/***/ }),
-/* 485 */
+/* 420 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ __webpack_require__(421);
+ var $Object = __webpack_require__(346).Object;
+ module.exports = function create(P, D) {
+ return $Object.create(P, D);
+ };
+
+
+/***/ }),
+/* 421 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ var $export = __webpack_require__(344);
+ // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
+ $export($export.S, 'Object', { create: __webpack_require__(390) });
+
+
+/***/ }),
+/* 422 */
/***/ (function(module, exports) {
"use strict";
@@ -60530,7 +44734,7 @@
module.exports = exports['default'];
/***/ }),
-/* 486 */
+/* 423 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -60560,7 +44764,7 @@
module.exports = exports['default'];
/***/ }),
-/* 487 */
+/* 424 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -60569,19 +44773,19 @@
value: true
});
- var _classCallCheck2 = __webpack_require__(447);
+ var _classCallCheck2 = __webpack_require__(379);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
- var _createClass2 = __webpack_require__(488);
+ var _createClass2 = __webpack_require__(425);
var _createClass3 = _interopRequireDefault(_createClass2);
- var _possibleConstructorReturn2 = __webpack_require__(448);
+ var _possibleConstructorReturn2 = __webpack_require__(380);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
- var _inherits2 = __webpack_require__(479);
+ var _inherits2 = __webpack_require__(414);
var _inherits3 = _interopRequireDefault(_inherits2);
@@ -60692,14 +44896,14 @@
module.exports = exports['default'];
/***/ }),
-/* 488 */
+/* 425 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
- var _defineProperty = __webpack_require__(489);
+ var _defineProperty = __webpack_require__(426);
var _defineProperty2 = _interopRequireDefault(_defineProperty);
@@ -60724,33 +44928,33 @@
}();
/***/ }),
-/* 489 */
+/* 426 */
/***/ (function(module, exports, __webpack_require__) {
- module.exports = { "default": __webpack_require__(490), __esModule: true };
+ module.exports = { "default": __webpack_require__(427), __esModule: true };
/***/ }),
-/* 490 */
+/* 427 */
/***/ (function(module, exports, __webpack_require__) {
- __webpack_require__(491);
- var $Object = __webpack_require__(157).Object;
+ __webpack_require__(428);
+ var $Object = __webpack_require__(346).Object;
module.exports = function defineProperty(it, key, desc) {
return $Object.defineProperty(it, key, desc);
};
/***/ }),
-/* 491 */
+/* 428 */
/***/ (function(module, exports, __webpack_require__) {
- var $export = __webpack_require__(155);
+ var $export = __webpack_require__(344);
// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
- $export($export.S + $export.F * !__webpack_require__(165), 'Object', { defineProperty: __webpack_require__(161).f });
+ $export($export.S + $export.F * !__webpack_require__(354), 'Object', { defineProperty: __webpack_require__(350).f });
/***/ }),
-/* 492 */
+/* 429 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -60759,19 +44963,19 @@
value: true
});
- var _classCallCheck2 = __webpack_require__(447);
+ var _classCallCheck2 = __webpack_require__(379);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
- var _createClass2 = __webpack_require__(488);
+ var _createClass2 = __webpack_require__(425);
var _createClass3 = _interopRequireDefault(_createClass2);
- var _possibleConstructorReturn2 = __webpack_require__(448);
+ var _possibleConstructorReturn2 = __webpack_require__(380);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
- var _inherits2 = __webpack_require__(479);
+ var _inherits2 = __webpack_require__(414);
var _inherits3 = _interopRequireDefault(_inherits2);
@@ -60850,14 +45054,14 @@
module.exports = exports['default'];
/***/ }),
-/* 493 */
+/* 430 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
- var _extends2 = __webpack_require__(445);
+ var _extends2 = __webpack_require__(340);
var _extends3 = _interopRequireDefault(_extends2);
@@ -60896,26 +45100,26 @@
}
/***/ }),
-/* 494 */
+/* 431 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
- var _extends2 = __webpack_require__(445);
+ var _extends2 = __webpack_require__(340);
var _extends3 = _interopRequireDefault(_extends2);
- var _classCallCheck2 = __webpack_require__(447);
+ var _classCallCheck2 = __webpack_require__(379);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
- var _possibleConstructorReturn2 = __webpack_require__(448);
+ var _possibleConstructorReturn2 = __webpack_require__(380);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
- var _inherits2 = __webpack_require__(479);
+ var _inherits2 = __webpack_require__(414);
var _inherits3 = _interopRequireDefault(_inherits2);
@@ -60931,23 +45135,23 @@
var _reactDom2 = _interopRequireDefault(_reactDom);
- var _rcAlign = __webpack_require__(495);
+ var _rcAlign = __webpack_require__(432);
var _rcAlign2 = _interopRequireDefault(_rcAlign);
- var _rcAnimate = __webpack_require__(498);
+ var _rcAnimate = __webpack_require__(435);
var _rcAnimate2 = _interopRequireDefault(_rcAnimate);
- var _PopupInner = __webpack_require__(505);
+ var _PopupInner = __webpack_require__(442);
var _PopupInner2 = _interopRequireDefault(_PopupInner);
- var _LazyRenderBox = __webpack_require__(506);
+ var _LazyRenderBox = __webpack_require__(443);
var _LazyRenderBox2 = _interopRequireDefault(_LazyRenderBox);
- var _utils = __webpack_require__(493);
+ var _utils = __webpack_require__(430);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
@@ -61283,7 +45487,7 @@
module.exports = exports['default'];
/***/ }),
-/* 495 */
+/* 432 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -61292,7 +45496,7 @@
value: true
});
- var _Align = __webpack_require__(496);
+ var _Align = __webpack_require__(433);
var _Align2 = _interopRequireDefault(_Align);
@@ -61303,7 +45507,7 @@
module.exports = exports['default'];
/***/ }),
-/* 496 */
+/* 433 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -61312,19 +45516,19 @@
value: true
});
- var _classCallCheck2 = __webpack_require__(447);
+ var _classCallCheck2 = __webpack_require__(379);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
- var _createClass2 = __webpack_require__(488);
+ var _createClass2 = __webpack_require__(425);
var _createClass3 = _interopRequireDefault(_createClass2);
- var _possibleConstructorReturn2 = __webpack_require__(448);
+ var _possibleConstructorReturn2 = __webpack_require__(380);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
- var _inherits2 = __webpack_require__(479);
+ var _inherits2 = __webpack_require__(414);
var _inherits3 = _interopRequireDefault(_inherits2);
@@ -61342,11 +45546,11 @@
var _domAlign = __webpack_require__(51);
- var _addEventListener = __webpack_require__(486);
+ var _addEventListener = __webpack_require__(423);
var _addEventListener2 = _interopRequireDefault(_addEventListener);
- var _util = __webpack_require__(497);
+ var _util = __webpack_require__(434);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
@@ -61539,7 +45743,7 @@
module.exports = exports['default'];
/***/ }),
-/* 497 */
+/* 434 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -61553,7 +45757,7 @@
exports.isSimilarValue = isSimilarValue;
exports.restoreFocus = restoreFocus;
- var _contains = __webpack_require__(485);
+ var _contains = __webpack_require__(422);
var _contains2 = _interopRequireDefault(_contains);
@@ -61612,7 +45816,7 @@
}
/***/ }),
-/* 498 */
+/* 435 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -61621,27 +45825,27 @@
value: true
});
- var _extends2 = __webpack_require__(445);
+ var _extends2 = __webpack_require__(340);
var _extends3 = _interopRequireDefault(_extends2);
- var _defineProperty2 = __webpack_require__(499);
+ var _defineProperty2 = __webpack_require__(436);
var _defineProperty3 = _interopRequireDefault(_defineProperty2);
- var _classCallCheck2 = __webpack_require__(447);
+ var _classCallCheck2 = __webpack_require__(379);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
- var _createClass2 = __webpack_require__(488);
+ var _createClass2 = __webpack_require__(425);
var _createClass3 = _interopRequireDefault(_createClass2);
- var _possibleConstructorReturn2 = __webpack_require__(448);
+ var _possibleConstructorReturn2 = __webpack_require__(380);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
- var _inherits2 = __webpack_require__(479);
+ var _inherits2 = __webpack_require__(414);
var _inherits3 = _interopRequireDefault(_inherits2);
@@ -61653,13 +45857,13 @@
var _propTypes2 = _interopRequireDefault(_propTypes);
- var _ChildrenUtils = __webpack_require__(500);
+ var _ChildrenUtils = __webpack_require__(437);
- var _AnimateChild = __webpack_require__(501);
+ var _AnimateChild = __webpack_require__(438);
var _AnimateChild2 = _interopRequireDefault(_AnimateChild);
- var _animate = __webpack_require__(504);
+ var _animate = __webpack_require__(441);
var _animate2 = _interopRequireDefault(_animate);
@@ -62006,14 +46210,14 @@
module.exports = exports['default'];
/***/ }),
-/* 499 */
+/* 436 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
- var _defineProperty = __webpack_require__(489);
+ var _defineProperty = __webpack_require__(426);
var _defineProperty2 = _interopRequireDefault(_defineProperty);
@@ -62035,7 +46239,7 @@
};
/***/ }),
-/* 500 */
+/* 437 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -62157,7 +46361,7 @@
}
/***/ }),
-/* 501 */
+/* 438 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -62166,19 +46370,19 @@
value: true
});
- var _classCallCheck2 = __webpack_require__(447);
+ var _classCallCheck2 = __webpack_require__(379);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
- var _createClass2 = __webpack_require__(488);
+ var _createClass2 = __webpack_require__(425);
var _createClass3 = _interopRequireDefault(_createClass2);
- var _possibleConstructorReturn2 = __webpack_require__(448);
+ var _possibleConstructorReturn2 = __webpack_require__(380);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
- var _inherits2 = __webpack_require__(479);
+ var _inherits2 = __webpack_require__(414);
var _inherits3 = _interopRequireDefault(_inherits2);
@@ -62194,11 +46398,11 @@
var _propTypes2 = _interopRequireDefault(_propTypes);
- var _cssAnimation = __webpack_require__(502);
+ var _cssAnimation = __webpack_require__(439);
var _cssAnimation2 = _interopRequireDefault(_cssAnimation);
- var _animate = __webpack_require__(504);
+ var _animate = __webpack_require__(441);
var _animate2 = _interopRequireDefault(_animate);
@@ -62306,7 +46510,7 @@
module.exports = exports['default'];
/***/ }),
-/* 502 */
+/* 439 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -62316,11 +46520,11 @@
});
exports.isCssAnimationSupported = undefined;
- var _typeof2 = __webpack_require__(449);
+ var _typeof2 = __webpack_require__(381);
var _typeof3 = _interopRequireDefault(_typeof2);
- var _Event = __webpack_require__(503);
+ var _Event = __webpack_require__(440);
var _Event2 = _interopRequireDefault(_Event);
@@ -62502,7 +46706,7 @@
exports['default'] = cssAnimation;
/***/ }),
-/* 503 */
+/* 440 */
/***/ (function(module, exports) {
'use strict';
@@ -62642,7 +46846,7 @@
module.exports = exports['default'];
/***/ }),
-/* 504 */
+/* 441 */
/***/ (function(module, exports) {
"use strict";
@@ -62674,22 +46878,22 @@
module.exports = exports['default'];
/***/ }),
-/* 505 */
+/* 442 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
- var _classCallCheck2 = __webpack_require__(447);
+ var _classCallCheck2 = __webpack_require__(379);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
- var _possibleConstructorReturn2 = __webpack_require__(448);
+ var _possibleConstructorReturn2 = __webpack_require__(380);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
- var _inherits2 = __webpack_require__(479);
+ var _inherits2 = __webpack_require__(414);
var _inherits3 = _interopRequireDefault(_inherits2);
@@ -62701,7 +46905,7 @@
var _propTypes2 = _interopRequireDefault(_propTypes);
- var _LazyRenderBox = __webpack_require__(506);
+ var _LazyRenderBox = __webpack_require__(443);
var _LazyRenderBox2 = _interopRequireDefault(_LazyRenderBox);
@@ -62756,26 +46960,26 @@
module.exports = exports['default'];
/***/ }),
-/* 506 */
+/* 443 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
- var _objectWithoutProperties2 = __webpack_require__(507);
+ var _objectWithoutProperties2 = __webpack_require__(444);
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
- var _classCallCheck2 = __webpack_require__(447);
+ var _classCallCheck2 = __webpack_require__(379);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
- var _possibleConstructorReturn2 = __webpack_require__(448);
+ var _possibleConstructorReturn2 = __webpack_require__(380);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
- var _inherits2 = __webpack_require__(479);
+ var _inherits2 = __webpack_require__(414);
var _inherits3 = _interopRequireDefault(_inherits2);
@@ -62831,7 +47035,7 @@
module.exports = exports['default'];
/***/ }),
-/* 507 */
+/* 444 */
/***/ (function(module, exports) {
"use strict";
@@ -62851,7 +47055,7 @@
};
/***/ }),
-/* 508 */
+/* 445 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -62865,13 +47069,13 @@
var _propTypes = _interopRequireDefault(__webpack_require__(6));
- var _moment = _interopRequireDefault(__webpack_require__(295));
+ var _moment = _interopRequireDefault(__webpack_require__(189));
var _classnames = _interopRequireDefault(__webpack_require__(5));
- var _Header = _interopRequireDefault(__webpack_require__(509));
+ var _Header = _interopRequireDefault(__webpack_require__(446));
- var _Combobox = _interopRequireDefault(__webpack_require__(510));
+ var _Combobox = _interopRequireDefault(__webpack_require__(447));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -63147,7 +47351,7 @@
exports["default"] = _default;
/***/ }),
-/* 509 */
+/* 446 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -63161,7 +47365,7 @@
var _propTypes = _interopRequireDefault(__webpack_require__(6));
- var _moment = _interopRequireDefault(__webpack_require__(295));
+ var _moment = _interopRequireDefault(__webpack_require__(189));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -63406,7 +47610,7 @@
exports["default"] = _default;
/***/ }),
-/* 510 */
+/* 447 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -63420,7 +47624,7 @@
var _propTypes = _interopRequireDefault(__webpack_require__(6));
- var _Select = _interopRequireDefault(__webpack_require__(511));
+ var _Select = _interopRequireDefault(__webpack_require__(448));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -63718,7 +47922,7 @@
exports["default"] = _default;
/***/ }),
-/* 511 */
+/* 448 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -63933,15 +48137,15 @@
exports["default"] = _default;
/***/ }),
-/* 512 */
+/* 449 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
- module.exports = __webpack_require__(513);
+ module.exports = __webpack_require__(450);
/***/ }),
-/* 513 */
+/* 450 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -63960,11 +48164,11 @@
var _react2 = _interopRequireDefault(_react);
- var _beeInputGroupAddon = __webpack_require__(514);
+ var _beeInputGroupAddon = __webpack_require__(451);
var _beeInputGroupAddon2 = _interopRequireDefault(_beeInputGroupAddon);
- var _InputGroupButton = __webpack_require__(516);
+ var _InputGroupButton = __webpack_require__(453);
var _InputGroupButton2 = _interopRequireDefault(_InputGroupButton);
@@ -64021,7 +48225,7 @@
module.exports = exports['default'];
/***/ }),
-/* 514 */
+/* 451 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -64030,7 +48234,7 @@
value: true
});
- var _InputGroupAddon = __webpack_require__(515);
+ var _InputGroupAddon = __webpack_require__(452);
var _InputGroupAddon2 = _interopRequireDefault(_InputGroupAddon);
@@ -64040,7 +48244,7 @@
module.exports = exports['default'];
/***/ }),
-/* 515 */
+/* 452 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -64085,11 +48289,10 @@
}
InputGroupAddon.prototype.render = function render() {
- var _props = this.props;
- var className = _props.className;
- var clsPrefix = _props.clsPrefix;
-
- var others = _objectWithoutProperties(_props, ['className', 'clsPrefix']);
+ var _props = this.props,
+ className = _props.className,
+ clsPrefix = _props.clsPrefix,
+ others = _objectWithoutProperties(_props, ['className', 'clsPrefix']);
return _react2["default"].createElement('span', _extends({}, others, {
className: (0, _classnames2["default"])(className, clsPrefix)
@@ -64104,7 +48307,7 @@
module.exports = exports['default'];
/***/ }),
-/* 516 */
+/* 453 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -64167,7 +48370,7 @@
module.exports = exports['default'];
/***/ }),
-/* 517 */
+/* 454 */
/***/ (function(module, exports) {
'use strict';
@@ -64208,7 +48411,7 @@
module.exports = exports['default'];
/***/ }),
-/* 518 */
+/* 455 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -64219,7 +48422,7 @@
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
- var _MonthCalendar = __webpack_require__(519);
+ var _MonthCalendar = __webpack_require__(456);
var _MonthCalendar2 = _interopRequireDefault(_MonthCalendar);
@@ -64227,11 +48430,11 @@
var _react2 = _interopRequireDefault(_react);
- var _Picker = __webpack_require__(441);
+ var _Picker = __webpack_require__(336);
var _Picker2 = _interopRequireDefault(_Picker);
- var _beeFormControl = __webpack_require__(261);
+ var _beeFormControl = __webpack_require__(153);
var _beeFormControl2 = _interopRequireDefault(_beeFormControl);
@@ -64239,11 +48442,11 @@
var _beeIcon2 = _interopRequireDefault(_beeIcon);
- var _beeInputGroup = __webpack_require__(512);
+ var _beeInputGroup = __webpack_require__(449);
var _beeInputGroup2 = _interopRequireDefault(_beeInputGroup);
- var _zh_CN = __webpack_require__(517);
+ var _zh_CN = __webpack_require__(454);
var _zh_CN2 = _interopRequireDefault(_zh_CN);
@@ -64392,7 +48595,7 @@
module.exports = exports["default"];
/***/ }),
-/* 519 */
+/* 456 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -64411,27 +48614,27 @@
var _propTypes2 = _interopRequireDefault(_propTypes);
- var _KeyCode = __webpack_require__(291);
+ var _KeyCode = __webpack_require__(185);
var _KeyCode2 = _interopRequireDefault(_KeyCode);
- var _CalendarHeader = __webpack_require__(426);
+ var _CalendarHeader = __webpack_require__(321);
var _CalendarHeader2 = _interopRequireDefault(_CalendarHeader);
- var _CalendarFooter = __webpack_require__(433);
+ var _CalendarFooter = __webpack_require__(328);
var _CalendarFooter2 = _interopRequireDefault(_CalendarFooter);
- var _CalendarMixin = __webpack_require__(437);
+ var _CalendarMixin = __webpack_require__(332);
- var _CommonMixin = __webpack_require__(438);
+ var _CommonMixin = __webpack_require__(333);
- var _DateInput = __webpack_require__(430);
+ var _DateInput = __webpack_require__(325);
var _DateInput2 = _interopRequireDefault(_DateInput);
- var _moment = __webpack_require__(295);
+ var _moment = __webpack_require__(189);
var _moment2 = _interopRequireDefault(_moment);
@@ -64618,7 +48821,7 @@
module.exports = exports['default'];
/***/ }),
-/* 520 */
+/* 457 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -64631,19 +48834,19 @@
var _react2 = _interopRequireDefault(_react);
- var _RangeCalendar = __webpack_require__(521);
+ var _RangeCalendar = __webpack_require__(458);
var _RangeCalendar2 = _interopRequireDefault(_RangeCalendar);
- var _beeFormControl = __webpack_require__(261);
+ var _beeFormControl = __webpack_require__(153);
var _beeFormControl2 = _interopRequireDefault(_beeFormControl);
- var _Picker = __webpack_require__(441);
+ var _Picker = __webpack_require__(336);
var _Picker2 = _interopRequireDefault(_Picker);
- var _beeInputGroup = __webpack_require__(512);
+ var _beeInputGroup = __webpack_require__(449);
var _beeInputGroup2 = _interopRequireDefault(_beeInputGroup);
@@ -64655,15 +48858,15 @@
var _classnames2 = _interopRequireDefault(_classnames);
- var _zh_CN = __webpack_require__(517);
+ var _zh_CN = __webpack_require__(454);
var _zh_CN2 = _interopRequireDefault(_zh_CN);
- var _moment = __webpack_require__(295);
+ var _moment = __webpack_require__(189);
var _moment2 = _interopRequireDefault(_moment);
- __webpack_require__(421);
+ __webpack_require__(316);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -64853,7 +49056,7 @@
module.exports = exports["default"];
/***/ }),
-/* 521 */
+/* 458 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -64874,7 +49077,7 @@
var _propTypes2 = _interopRequireDefault(_propTypes);
- var _moment = __webpack_require__(295);
+ var _moment = __webpack_require__(189);
var _moment2 = _interopRequireDefault(_moment);
@@ -64884,31 +49087,31 @@
var _reactLifecyclesCompat = __webpack_require__(91);
- var _KeyCode = __webpack_require__(291);
+ var _KeyCode = __webpack_require__(185);
var _KeyCode2 = _interopRequireDefault(_KeyCode);
- var _CalendarPart = __webpack_require__(522);
+ var _CalendarPart = __webpack_require__(459);
var _CalendarPart2 = _interopRequireDefault(_CalendarPart);
- var _TodayButton = __webpack_require__(434);
+ var _TodayButton = __webpack_require__(329);
var _TodayButton2 = _interopRequireDefault(_TodayButton);
- var _OkButton = __webpack_require__(435);
+ var _OkButton = __webpack_require__(330);
var _OkButton2 = _interopRequireDefault(_OkButton);
- var _TimePickerButton = __webpack_require__(436);
+ var _TimePickerButton = __webpack_require__(331);
var _TimePickerButton2 = _interopRequireDefault(_TimePickerButton);
- var _CommonMixin = __webpack_require__(438);
+ var _CommonMixin = __webpack_require__(333);
- var _util = __webpack_require__(425);
+ var _util = __webpack_require__(320);
- var _toTime = __webpack_require__(440);
+ var _toTime = __webpack_require__(335);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -65761,7 +49964,7 @@
module.exports = exports['default'];
/***/ }),
-/* 522 */
+/* 459 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -65780,19 +49983,19 @@
var _propTypes2 = _interopRequireDefault(_propTypes);
- var _CalendarHeader = __webpack_require__(426);
+ var _CalendarHeader = __webpack_require__(321);
var _CalendarHeader2 = _interopRequireDefault(_CalendarHeader);
- var _DateTable = __webpack_require__(292);
+ var _DateTable = __webpack_require__(186);
var _DateTable2 = _interopRequireDefault(_DateTable);
- var _DateInput = __webpack_require__(430);
+ var _DateInput = __webpack_require__(325);
var _DateInput2 = _interopRequireDefault(_DateInput);
- var _index = __webpack_require__(425);
+ var _index = __webpack_require__(320);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -65942,7 +50145,7 @@
module.exports = exports['default'];
/***/ }),
-/* 523 */
+/* 460 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -65953,7 +50156,7 @@
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
- var _rcCalendar = __webpack_require__(289);
+ var _rcCalendar = __webpack_require__(183);
var _rcCalendar2 = _interopRequireDefault(_rcCalendar);
@@ -65961,19 +50164,19 @@
var _react2 = _interopRequireDefault(_react);
- var _Picker = __webpack_require__(441);
+ var _Picker = __webpack_require__(336);
var _Picker2 = _interopRequireDefault(_Picker);
- var _beeFormControl = __webpack_require__(261);
+ var _beeFormControl = __webpack_require__(153);
var _beeFormControl2 = _interopRequireDefault(_beeFormControl);
- var _zh_CN = __webpack_require__(517);
+ var _zh_CN = __webpack_require__(454);
var _zh_CN2 = _interopRequireDefault(_zh_CN);
- var _en_US = __webpack_require__(439);
+ var _en_US = __webpack_require__(334);
var _en_US2 = _interopRequireDefault(_en_US);
@@ -65981,17 +50184,17 @@
var _beeIcon2 = _interopRequireDefault(_beeIcon);
- var _beeInputGroup = __webpack_require__(512);
+ var _beeInputGroup = __webpack_require__(449);
var _beeInputGroup2 = _interopRequireDefault(_beeInputGroup);
- var _moment = __webpack_require__(295);
+ var _moment = __webpack_require__(189);
var _moment2 = _interopRequireDefault(_moment);
- __webpack_require__(421);
+ __webpack_require__(316);
- __webpack_require__(326);
+ __webpack_require__(221);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -66238,7 +50441,7 @@
module.exports = exports["default"];
/***/ }),
-/* 524 */
+/* 461 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -66249,7 +50452,7 @@
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
- var _YearPanel = __webpack_require__(431);
+ var _YearPanel = __webpack_require__(326);
var _YearPanel2 = _interopRequireDefault(_YearPanel);
@@ -66257,15 +50460,15 @@
var _react2 = _interopRequireDefault(_react);
- var _Picker = __webpack_require__(441);
+ var _Picker = __webpack_require__(336);
var _Picker2 = _interopRequireDefault(_Picker);
- var _beeFormControl = __webpack_require__(261);
+ var _beeFormControl = __webpack_require__(153);
var _beeFormControl2 = _interopRequireDefault(_beeFormControl);
- var _beeInputGroup = __webpack_require__(512);
+ var _beeInputGroup = __webpack_require__(449);
var _beeInputGroup2 = _interopRequireDefault(_beeInputGroup);
@@ -66273,7 +50476,7 @@
var _beeIcon2 = _interopRequireDefault(_beeIcon);
- var _moment = __webpack_require__(295);
+ var _moment = __webpack_require__(189);
var _moment2 = _interopRequireDefault(_moment);
@@ -66442,7 +50645,7 @@
module.exports = exports["default"];
/***/ }),
-/* 525 */
+/* 462 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -66451,17 +50654,17 @@
value: true
});
- var _Select = __webpack_require__(526);
+ var _Select = __webpack_require__(463);
var _Select2 = _interopRequireDefault(_Select);
- var _Option = __webpack_require__(549);
+ var _Option = __webpack_require__(487);
var _Option2 = _interopRequireDefault(_Option);
- var _PropTypes = __webpack_require__(559);
+ var _PropTypes = __webpack_require__(499);
- var _OptGroup = __webpack_require__(560);
+ var _OptGroup = __webpack_require__(500);
var _OptGroup2 = _interopRequireDefault(_OptGroup);
@@ -66473,7 +50676,7 @@
module.exports = exports['default'];
/***/ }),
-/* 526 */
+/* 463 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -66492,15 +50695,15 @@
var _propTypes2 = _interopRequireDefault(_propTypes);
- var _RcSelect = __webpack_require__(527);
+ var _RcSelect = __webpack_require__(464);
var _RcSelect2 = _interopRequireDefault(_RcSelect);
- var _Option = __webpack_require__(549);
+ var _Option = __webpack_require__(487);
var _Option2 = _interopRequireDefault(_Option);
- var _OptGroup = __webpack_require__(560);
+ var _OptGroup = __webpack_require__(500);
var _OptGroup2 = _interopRequireDefault(_OptGroup);
@@ -66534,7 +50737,8 @@
clsPrefix: "u-select",
showSearch: false,
transitionName: "slide-up",
- choiceTransitionName: "zoom"
+ choiceTransitionName: "zoom",
+ enterKeyDown: true
};
var propTypes = {
@@ -66568,7 +50772,9 @@
dropdownStyle: _propTypes2["default"].object,
dropdownMenuStyle: _propTypes2["default"].object,
onChange: _propTypes2["default"].func,
- scrollToEnd: _propTypes2["default"].func
+ scrollToEnd: _propTypes2["default"].func,
+ onKeyDown: _propTypes2["default"].func,
+ enterKeyDown: _propTypes2["default"].bool //是否启用 enter 和 space 键
};
var Select = function (_Component) {
@@ -66653,7 +50859,7 @@
module.exports = exports["default"];
/***/ }),
-/* 527 */
+/* 464 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -66688,23 +50894,23 @@
var _componentClasses2 = _interopRequireDefault(_componentClasses);
- var _rcMenu = __webpack_require__(528);
+ var _rcMenu = __webpack_require__(465);
var _warning = __webpack_require__(32);
var _warning2 = _interopRequireDefault(_warning);
- var _Option = __webpack_require__(549);
+ var _Option = __webpack_require__(487);
var _Option2 = _interopRequireDefault(_Option);
- var _util = __webpack_require__(550);
+ var _util = __webpack_require__(488);
- var _SelectTrigger = __webpack_require__(551);
+ var _SelectTrigger = __webpack_require__(489);
var _SelectTrigger2 = _interopRequireDefault(_SelectTrigger);
- var _PropTypes = __webpack_require__(559);
+ var _PropTypes = __webpack_require__(499);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -67157,7 +51363,8 @@
var open = _this2.state.open;
var _props2 = _this2.props,
disabled = _props2.disabled,
- onKeyDown = _props2.onKeyDown;
+ onKeyDown = _props2.onKeyDown,
+ enterKeyDown = _props2.enterKeyDown;
if (disabled) {
return;
@@ -67165,9 +51372,12 @@
var keyCode = event.keyCode;
if (open && !_this2.getInputDOMNode()) {
_this2.onInputKeyDown(event);
- } else if (keyCode === _tinperBeeCore.KeyCode.ENTER || keyCode === _tinperBeeCore.KeyCode.DOWN || keyCode === _tinperBeeCore.KeyCode.SPACE) {
+ } else if (keyCode === _tinperBeeCore.KeyCode.DOWN) {
if (!open) _this2.setOpenState(true);
event.preventDefault();
+ } else if (keyCode === _tinperBeeCore.KeyCode.ENTER || keyCode === _tinperBeeCore.KeyCode.SPACE) {
+ if (!open && enterKeyDown) _this2.setOpenState(true);
+ event.preventDefault();
}
onKeyDown(event); //sp
};
@@ -68053,7 +52263,8 @@
);
}
if ((0, _util.isMultipleOrTags)(props)) {
- selectedValueNodes = limitedCountValue.map(function (singleValue) {
+ selectedValueNodes = limitedCountValue.map(function (singleValue, index) {
+ var key = singleValue || index;
var info = _this2.getOptionInfoBySingleValue(singleValue);
var content = info.label;
var title = info.title || content;
@@ -68069,7 +52280,7 @@
}, _util.UNSELECTABLE_ATTRIBUTE, {
onMouseDown: _util.preventDefaultEvent,
className: choiceClassName,
- key: singleValue,
+ key: key,
title: (0, _util.toTitle)(title)
}),
_react2["default"].createElement(
@@ -68148,7 +52359,7 @@
module.exports = exports['default'];
/***/ }),
-/* 528 */
+/* 465 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -68156,23 +52367,23 @@
exports.__esModule = true;
exports.Divider = exports.ItemGroup = exports.MenuItemGroup = exports.MenuItem = exports.Item = exports.SubMenu = undefined;
- var _Menu = __webpack_require__(529);
+ var _Menu = __webpack_require__(466);
var _Menu2 = _interopRequireDefault(_Menu);
- var _SubMenu = __webpack_require__(540);
+ var _SubMenu = __webpack_require__(478);
var _SubMenu2 = _interopRequireDefault(_SubMenu);
- var _MenuItem = __webpack_require__(543);
+ var _MenuItem = __webpack_require__(481);
var _MenuItem2 = _interopRequireDefault(_MenuItem);
- var _MenuItemGroup = __webpack_require__(547);
+ var _MenuItemGroup = __webpack_require__(485);
var _MenuItemGroup2 = _interopRequireDefault(_MenuItemGroup);
- var _Divider = __webpack_require__(548);
+ var _Divider = __webpack_require__(486);
var _Divider2 = _interopRequireDefault(_Divider);
@@ -68187,30 +52398,30 @@
exports['default'] = _Menu2['default'];
/***/ }),
-/* 529 */
+/* 466 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
- var _extends2 = __webpack_require__(445);
+ var _extends2 = __webpack_require__(340);
var _extends3 = _interopRequireDefault(_extends2);
- var _objectWithoutProperties2 = __webpack_require__(507);
+ var _objectWithoutProperties2 = __webpack_require__(444);
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
- var _classCallCheck2 = __webpack_require__(447);
+ var _classCallCheck2 = __webpack_require__(379);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
- var _possibleConstructorReturn2 = __webpack_require__(448);
+ var _possibleConstructorReturn2 = __webpack_require__(380);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
- var _inherits2 = __webpack_require__(479);
+ var _inherits2 = __webpack_require__(414);
var _inherits3 = _interopRequireDefault(_inherits2);
@@ -68222,13 +52433,13 @@
var _propTypes2 = _interopRequireDefault(_propTypes);
- var _miniStore = __webpack_require__(530);
+ var _miniStore = __webpack_require__(467);
- var _SubPopupMenu = __webpack_require__(535);
+ var _SubPopupMenu = __webpack_require__(473);
var _SubPopupMenu2 = _interopRequireDefault(_SubPopupMenu);
- var _util = __webpack_require__(536);
+ var _util = __webpack_require__(474);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
@@ -68473,7 +52684,7 @@
module.exports = exports['default'];
/***/ }),
-/* 530 */
+/* 467 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -68483,15 +52694,15 @@
});
exports.create = exports.connect = exports.Provider = undefined;
- var _Provider2 = __webpack_require__(531);
+ var _Provider2 = __webpack_require__(468);
var _Provider3 = _interopRequireDefault(_Provider2);
- var _connect2 = __webpack_require__(533);
+ var _connect2 = __webpack_require__(470);
var _connect3 = _interopRequireDefault(_connect2);
- var _create2 = __webpack_require__(534);
+ var _create2 = __webpack_require__(472);
var _create3 = _interopRequireDefault(_create2);
@@ -68502,7 +52713,7 @@
exports.create = _create3.default;
/***/ }),
-/* 531 */
+/* 468 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -68517,7 +52728,7 @@
var _react2 = _interopRequireDefault(_react);
- var _PropTypes = __webpack_require__(532);
+ var _PropTypes = __webpack_require__(469);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -68562,7 +52773,7 @@
exports.default = Provider;
/***/ }),
-/* 532 */
+/* 469 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -68585,7 +52796,7 @@
});
/***/ }),
-/* 533 */
+/* 470 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -68604,17 +52815,17 @@
var _react2 = _interopRequireDefault(_react);
- var _shallowequal = __webpack_require__(269);
+ var _shallowequal = __webpack_require__(163);
var _shallowequal2 = _interopRequireDefault(_shallowequal);
- var _hoistNonReactStatics = __webpack_require__(218);
+ var _hoistNonReactStatics = __webpack_require__(471);
var _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics);
var _reactLifecyclesCompat = __webpack_require__(91);
- var _PropTypes = __webpack_require__(532);
+ var _PropTypes = __webpack_require__(469);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -68753,7 +52964,81 @@
}
/***/ }),
-/* 534 */
+/* 471 */
+/***/ (function(module, exports) {
+
+ 'use strict';
+
+ /**
+ * Copyright 2015, Yahoo! Inc.
+ * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
+ */
+ var REACT_STATICS = {
+ childContextTypes: true,
+ contextTypes: true,
+ defaultProps: true,
+ displayName: true,
+ getDefaultProps: true,
+ getDerivedStateFromProps: true,
+ mixins: true,
+ propTypes: true,
+ type: true
+ };
+
+ var KNOWN_STATICS = {
+ name: true,
+ length: true,
+ prototype: true,
+ caller: true,
+ callee: true,
+ arguments: true,
+ arity: true
+ };
+
+ var defineProperty = Object.defineProperty;
+ var getOwnPropertyNames = Object.getOwnPropertyNames;
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
+ var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
+ var getPrototypeOf = Object.getPrototypeOf;
+ var objectPrototype = getPrototypeOf && getPrototypeOf(Object);
+
+ function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
+ if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components
+
+ if (objectPrototype) {
+ var inheritedComponent = getPrototypeOf(sourceComponent);
+ if (inheritedComponent && inheritedComponent !== objectPrototype) {
+ hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
+ }
+ }
+
+ var keys = getOwnPropertyNames(sourceComponent);
+
+ if (getOwnPropertySymbols) {
+ keys = keys.concat(getOwnPropertySymbols(sourceComponent));
+ }
+
+ for (var i = 0; i < keys.length; ++i) {
+ var key = keys[i];
+ if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) {
+ var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
+ try { // Avoid failures from read-only properties
+ defineProperty(targetComponent, key, descriptor);
+ } catch (e) {}
+ }
+ }
+
+ return targetComponent;
+ }
+
+ return targetComponent;
+ }
+
+ module.exports = hoistNonReactStatics;
+
+
+/***/ }),
+/* 472 */
/***/ (function(module, exports) {
"use strict";
@@ -68797,7 +53082,7 @@
}
/***/ }),
-/* 535 */
+/* 473 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -68805,23 +53090,23 @@
exports.__esModule = true;
exports.SubPopupMenu = undefined;
- var _objectWithoutProperties2 = __webpack_require__(507);
+ var _objectWithoutProperties2 = __webpack_require__(444);
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
- var _classCallCheck2 = __webpack_require__(447);
+ var _classCallCheck2 = __webpack_require__(379);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
- var _possibleConstructorReturn2 = __webpack_require__(448);
+ var _possibleConstructorReturn2 = __webpack_require__(380);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
- var _inherits2 = __webpack_require__(479);
+ var _inherits2 = __webpack_require__(414);
var _inherits3 = _interopRequireDefault(_inherits2);
- var _extends4 = __webpack_require__(445);
+ var _extends4 = __webpack_require__(340);
var _extends5 = _interopRequireDefault(_extends4);
@@ -68836,13 +53121,13 @@
var _propTypes2 = _interopRequireDefault(_propTypes);
- var _miniStore = __webpack_require__(530);
+ var _miniStore = __webpack_require__(467);
- var _KeyCode = __webpack_require__(291);
+ var _KeyCode = __webpack_require__(185);
var _KeyCode2 = _interopRequireDefault(_KeyCode);
- var _createChainedFunction = __webpack_require__(442);
+ var _createChainedFunction = __webpack_require__(337);
var _createChainedFunction2 = _interopRequireDefault(_createChainedFunction);
@@ -68850,9 +53135,9 @@
var _classnames2 = _interopRequireDefault(_classnames);
- var _util = __webpack_require__(536);
+ var _util = __webpack_require__(474);
- var _DOMWrap = __webpack_require__(538);
+ var _DOMWrap = __webpack_require__(476);
var _DOMWrap2 = _interopRequireDefault(_DOMWrap);
@@ -68889,7 +53174,7 @@
if (activeKey) {
var found = void 0;
(0, _util.loopMenuItem)(children, function (c, i) {
- if (c && !c.props.disabled && activeKey === (0, _util.getKeyFromChildrenIndex)(c, eventKey, i)) {
+ if (c && c.props && !c.props.disabled && activeKey === (0, _util.getKeyFromChildrenIndex)(c, eventKey, i)) {
found = true;
}
});
@@ -69006,27 +53291,21 @@
// Otherwise, the propagated click event will trigger another onClick
delete props.onClick;
- return (
- // ESLint is not smart enough to know that the type of `children` was checked.
- /* eslint-disable */
- _react2['default'].createElement(
- _DOMWrap2['default'],
- (0, _extends5['default'])({}, props, {
- prefixCls: prefixCls,
- mode: mode,
- tag: 'ul',
- level: level,
- theme: theme,
- hiddenClassName: prefixCls + '-hidden',
- visible: visible,
- overflowedIndicator: overflowedIndicator
- }, domProps),
- _react2['default'].Children.map(props.children, function (c, i) {
- return _this2.renderMenuItem(c, i, eventKey || '0-menu-');
- })
- )
- /*eslint-enable */
-
+ return _react2['default'].createElement(
+ _DOMWrap2['default'],
+ (0, _extends5['default'])({}, props, {
+ prefixCls: prefixCls,
+ mode: mode,
+ tag: 'ul',
+ level: level,
+ theme: theme,
+ hiddenClassName: prefixCls + '-hidden',
+ visible: visible,
+ overflowedIndicator: overflowedIndicator
+ }, domProps),
+ _react2['default'].Children.map(props.children, function (c, i) {
+ return _this2.renderMenuItem(c, i, eventKey || '0-menu-');
+ })
);
};
@@ -69188,6 +53467,10 @@
var props = _this3.props;
var key = (0, _util.getKeyFromChildrenIndex)(child, props.eventKey, i);
var childProps = child.props;
+ // https://github.com/ant-design/ant-design/issues/11517#issuecomment-477403055
+ if (!childProps || typeof child.type === 'string') {
+ return child;
+ }
var isActive = key === state.activeKey;
var newChildProps = (0, _extends5['default'])({
mode: childProps.mode || props.mode,
@@ -69247,7 +53530,7 @@
exports['default'] = connected;
/***/ }),
-/* 536 */
+/* 474 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -69266,7 +53549,7 @@
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
- var isMobile = __webpack_require__(537);
+ var isMobile = __webpack_require__(475);
function noop() {}
@@ -69343,36 +53626,36 @@
};
/***/ }),
-/* 537 */
+/* 475 */
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!function(e){var n=/iPhone/i,t=/iPod/i,r=/iPad/i,a=/\bAndroid(?:.+)Mobile\b/i,p=/Android/i,l=/\bAndroid(?:.+)SD4930UR\b/i,b=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,f=/Windows Phone/i,u=/\bWindows(?:.+)ARM\b/i,c=/BlackBerry/i,s=/BB10/i,v=/Opera Mini/i,h=/\b(CriOS|Chrome)(?:.+)Mobile/i,w=/\Mobile(?:.+)Firefox\b/i;function m(e,i){return e.test(i)}function i(e){var i=e||("undefined"!=typeof navigator?navigator.userAgent:""),o=i.split("[FBAN");void 0!==o[1]&&(i=o[0]),void 0!==(o=i.split("Twitter"))[1]&&(i=o[0]);var d={apple:{phone:m(n,i)&&!m(f,i),ipod:m(t,i),tablet:!m(n,i)&&m(r,i)&&!m(f,i),device:(m(n,i)||m(t,i)||m(r,i))&&!m(f,i)},amazon:{phone:m(l,i),tablet:!m(l,i)&&m(b,i),device:m(l,i)||m(b,i)},android:{phone:!m(f,i)&&m(l,i)||!m(f,i)&&m(a,i),tablet:!m(f,i)&&!m(l,i)&&!m(a,i)&&(m(b,i)||m(p,i)),device:!m(f,i)&&(m(l,i)||m(b,i)||m(a,i)||m(p,i))},windows:{phone:m(f,i),tablet:m(u,i),device:m(f,i)||m(u,i)},other:{blackberry:m(c,i),blackberry10:m(s,i),opera:m(v,i),firefox:m(w,i),chrome:m(h,i),device:m(c,i)||m(s,i)||m(v,i)||m(w,i)||m(h,i)}};return d.any=d.apple.device||d.android.device||d.windows.device||d.other.device,d.phone=d.apple.phone||d.android.phone||d.windows.phone,d.tablet=d.apple.tablet||d.android.tablet||d.windows.tablet,d}"undefined"!=typeof module&&module.exports&&"undefined"==typeof window?module.exports=i:"undefined"!=typeof module&&module.exports&&"undefined"!=typeof window?module.exports=i(): true?!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (e.isMobile=i()), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)):e.isMobile=i()}(this);
/***/ }),
-/* 538 */
+/* 476 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
- var _extends2 = __webpack_require__(445);
+ var _extends2 = __webpack_require__(340);
var _extends3 = _interopRequireDefault(_extends2);
- var _objectWithoutProperties2 = __webpack_require__(507);
+ var _objectWithoutProperties2 = __webpack_require__(444);
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
- var _classCallCheck2 = __webpack_require__(447);
+ var _classCallCheck2 = __webpack_require__(379);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
- var _possibleConstructorReturn2 = __webpack_require__(448);
+ var _possibleConstructorReturn2 = __webpack_require__(380);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
- var _inherits2 = __webpack_require__(479);
+ var _inherits2 = __webpack_require__(414);
var _inherits3 = _interopRequireDefault(_inherits2);
@@ -69388,15 +53671,15 @@
var _propTypes2 = _interopRequireDefault(_propTypes);
- var _resizeObserverPolyfill = __webpack_require__(539);
+ var _resizeObserverPolyfill = __webpack_require__(477);
var _resizeObserverPolyfill2 = _interopRequireDefault(_resizeObserverPolyfill);
- var _SubMenu = __webpack_require__(540);
+ var _SubMenu = __webpack_require__(478);
var _SubMenu2 = _interopRequireDefault(_SubMenu);
- var _util = __webpack_require__(536);
+ var _util = __webpack_require__(474);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
@@ -69407,7 +53690,7 @@
// Fix ssr
if (canUseDOM) {
- __webpack_require__(542);
+ __webpack_require__(480);
}
var DOMWrap = function (_React$Component) {
@@ -69454,12 +53737,12 @@
var _copy$props = copy.props,
throwAway = _copy$props.children,
title = _copy$props.title,
- eventKey = _copy$props.eventKey,
- rest = (0, _objectWithoutProperties3['default'])(_copy$props, ['children', 'title', 'eventKey']);
+ rest = (0, _objectWithoutProperties3['default'])(_copy$props, ['children', 'title']);
var style = (0, _extends3['default'])({}, propStyle);
var key = keyPrefix + '-overflowed-indicator';
+ var eventKey = keyPrefix + '-overflowed-indicator';
if (overflowedItems.length === 0 && renderPlaceholder !== true) {
style = (0, _extends3['default'])({}, style, {
@@ -69472,6 +53755,7 @@
position: 'absolute'
});
key = key + '-placeholder';
+ eventKey = eventKey + '-placeholder';
}
var popupClassName = theme ? prefixCls + '-' + theme : '';
@@ -69490,7 +53774,7 @@
popupClassName: popupClassName
}, props, {
key: key,
- eventKey: keyPrefix + '-overflowed-indicator',
+ eventKey: eventKey,
disabled: false,
style: style
}),
@@ -69728,7 +54012,7 @@
module.exports = exports['default'];
/***/ }),
-/* 539 */
+/* 477 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {(function (global, factory) {
@@ -70671,7 +54955,7 @@
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
/***/ }),
-/* 540 */
+/* 478 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -70679,19 +54963,19 @@
exports.__esModule = true;
exports.SubMenu = undefined;
- var _classCallCheck2 = __webpack_require__(447);
+ var _classCallCheck2 = __webpack_require__(379);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
- var _possibleConstructorReturn2 = __webpack_require__(448);
+ var _possibleConstructorReturn2 = __webpack_require__(380);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
- var _inherits2 = __webpack_require__(479);
+ var _inherits2 = __webpack_require__(414);
var _inherits3 = _interopRequireDefault(_inherits2);
- var _extends3 = __webpack_require__(445);
+ var _extends3 = __webpack_require__(340);
var _extends4 = _interopRequireDefault(_extends3);
@@ -70707,11 +54991,11 @@
var _propTypes2 = _interopRequireDefault(_propTypes);
- var _rcTrigger = __webpack_require__(444);
+ var _rcTrigger = __webpack_require__(339);
var _rcTrigger2 = _interopRequireDefault(_rcTrigger);
- var _KeyCode = __webpack_require__(291);
+ var _KeyCode = __webpack_require__(185);
var _KeyCode2 = _interopRequireDefault(_KeyCode);
@@ -70719,21 +55003,21 @@
var _classnames2 = _interopRequireDefault(_classnames);
- var _miniStore = __webpack_require__(530);
+ var _miniStore = __webpack_require__(467);
- var _SubPopupMenu = __webpack_require__(535);
+ var _SubPopupMenu = __webpack_require__(473);
var _SubPopupMenu2 = _interopRequireDefault(_SubPopupMenu);
- var _placements = __webpack_require__(541);
+ var _placements = __webpack_require__(479);
var _placements2 = _interopRequireDefault(_placements);
- var _rcAnimate = __webpack_require__(498);
+ var _rcAnimate = __webpack_require__(435);
var _rcAnimate2 = _interopRequireDefault(_rcAnimate);
- var _util = __webpack_require__(536);
+ var _util = __webpack_require__(474);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
@@ -70874,7 +55158,7 @@
// don't show transition on first rendering (no animation for opened menu)
// show appear transition if it's not visible (not sure why)
// show appear transition if it's not inline mode
- var transitionAppear = haveRendered || !baseProps.visible || !baseProps.mode === 'inline';
+ var transitionAppear = haveRendered || !baseProps.visible || baseProps.mode !== 'inline';
baseProps.className = ' ' + baseProps.prefixCls + '-sub';
var animProps = {};
@@ -71319,7 +55603,7 @@
exports['default'] = connected;
/***/ }),
-/* 541 */
+/* 479 */
/***/ (function(module, exports) {
'use strict';
@@ -71356,7 +55640,7 @@
exports['default'] = placements;
/***/ }),
-/* 542 */
+/* 480 */
/***/ (function(module, exports) {
// mutationobserver-shim v0.3.2 (github.com/megawac/MutationObserver.js)
@@ -71371,7 +55655,7 @@
/***/ }),
-/* 543 */
+/* 481 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -71379,19 +55663,19 @@
exports.__esModule = true;
exports.MenuItem = undefined;
- var _extends2 = __webpack_require__(445);
+ var _extends2 = __webpack_require__(340);
var _extends3 = _interopRequireDefault(_extends2);
- var _classCallCheck2 = __webpack_require__(447);
+ var _classCallCheck2 = __webpack_require__(379);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
- var _possibleConstructorReturn2 = __webpack_require__(448);
+ var _possibleConstructorReturn2 = __webpack_require__(380);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
- var _inherits2 = __webpack_require__(479);
+ var _inherits2 = __webpack_require__(414);
var _inherits3 = _interopRequireDefault(_inherits2);
@@ -71407,7 +55691,7 @@
var _propTypes2 = _interopRequireDefault(_propTypes);
- var _KeyCode = __webpack_require__(291);
+ var _KeyCode = __webpack_require__(185);
var _KeyCode2 = _interopRequireDefault(_KeyCode);
@@ -71415,13 +55699,13 @@
var _classnames2 = _interopRequireDefault(_classnames);
- var _domScrollIntoView = __webpack_require__(544);
+ var _domScrollIntoView = __webpack_require__(482);
var _domScrollIntoView2 = _interopRequireDefault(_domScrollIntoView);
- var _miniStore = __webpack_require__(530);
+ var _miniStore = __webpack_require__(467);
- var _util = __webpack_require__(536);
+ var _util = __webpack_require__(474);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
@@ -71651,20 +55935,20 @@
exports['default'] = connected;
/***/ }),
-/* 544 */
+/* 482 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
- module.exports = __webpack_require__(545);
+ module.exports = __webpack_require__(483);
/***/ }),
-/* 545 */
+/* 483 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
- var util = __webpack_require__(546);
+ var util = __webpack_require__(484);
function scrollIntoView(elem, container, config) {
config = config || {};
@@ -71793,7 +56077,7 @@
module.exports = scrollIntoView;
/***/ }),
-/* 546 */
+/* 484 */
/***/ (function(module, exports) {
'use strict';
@@ -72237,30 +56521,30 @@
}, domUtils);
/***/ }),
-/* 547 */
+/* 485 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
- var _extends2 = __webpack_require__(445);
+ var _extends2 = __webpack_require__(340);
var _extends3 = _interopRequireDefault(_extends2);
- var _objectWithoutProperties2 = __webpack_require__(507);
+ var _objectWithoutProperties2 = __webpack_require__(444);
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
- var _classCallCheck2 = __webpack_require__(447);
+ var _classCallCheck2 = __webpack_require__(379);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
- var _possibleConstructorReturn2 = __webpack_require__(448);
+ var _possibleConstructorReturn2 = __webpack_require__(380);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
- var _inherits2 = __webpack_require__(479);
+ var _inherits2 = __webpack_require__(414);
var _inherits3 = _interopRequireDefault(_inherits2);
@@ -72272,7 +56556,7 @@
var _propTypes2 = _interopRequireDefault(_propTypes);
- var _util = __webpack_require__(536);
+ var _util = __webpack_require__(474);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
@@ -72355,22 +56639,22 @@
module.exports = exports['default'];
/***/ }),
-/* 548 */
+/* 486 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
exports.__esModule = true;
- var _classCallCheck2 = __webpack_require__(447);
+ var _classCallCheck2 = __webpack_require__(379);
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
- var _possibleConstructorReturn2 = __webpack_require__(448);
+ var _possibleConstructorReturn2 = __webpack_require__(380);
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
- var _inherits2 = __webpack_require__(479);
+ var _inherits2 = __webpack_require__(414);
var _inherits3 = _interopRequireDefault(_inherits2);
@@ -72422,7 +56706,7 @@
module.exports = exports['default'];
/***/ }),
-/* 549 */
+/* 487 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -72473,7 +56757,7 @@
module.exports = exports['default'];
/***/ }),
-/* 550 */
+/* 488 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -72688,7 +56972,7 @@
}
/***/ }),
-/* 551 */
+/* 489 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -72699,7 +56983,7 @@
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
- var _trigger = __webpack_require__(552);
+ var _trigger = __webpack_require__(490);
var _trigger2 = _interopRequireDefault(_trigger);
@@ -72719,9 +57003,9 @@
var _reactDom2 = _interopRequireDefault(_reactDom);
- var _util = __webpack_require__(550);
+ var _util = __webpack_require__(488);
- var _DropdownMenu = __webpack_require__(558);
+ var _DropdownMenu = __webpack_require__(496);
var _DropdownMenu2 = _interopRequireDefault(_DropdownMenu);
@@ -72942,15 +57226,15 @@
module.exports = exports['default'];
/***/ }),
-/* 552 */
+/* 490 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
- module.exports = __webpack_require__(553);
+ module.exports = __webpack_require__(491);
/***/ }),
-/* 553 */
+/* 491 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -72979,11 +57263,11 @@
var _tinperBeeCore = __webpack_require__(27);
- var _Popup = __webpack_require__(554);
+ var _Popup = __webpack_require__(492);
var _Popup2 = _interopRequireDefault(_Popup);
- var _utils = __webpack_require__(557);
+ var _utils = __webpack_require__(495);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -73543,7 +57827,7 @@
module.exports = exports['default'];
/***/ }),
-/* 554 */
+/* 492 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -73574,11 +57858,11 @@
var _beeAnimate2 = _interopRequireDefault(_beeAnimate);
- var _PopupInner = __webpack_require__(555);
+ var _PopupInner = __webpack_require__(493);
var _PopupInner2 = _interopRequireDefault(_PopupInner);
- var _LazyRenderBox = __webpack_require__(556);
+ var _LazyRenderBox = __webpack_require__(494);
var _LazyRenderBox2 = _interopRequireDefault(_LazyRenderBox);
@@ -73818,7 +58102,7 @@
module.exports = exports['default'];
/***/ }),
-/* 555 */
+/* 493 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -73835,7 +58119,7 @@
var _propTypes2 = _interopRequireDefault(_propTypes);
- var _LazyRenderBox = __webpack_require__(556);
+ var _LazyRenderBox = __webpack_require__(494);
var _LazyRenderBox2 = _interopRequireDefault(_LazyRenderBox);
@@ -73899,7 +58183,7 @@
module.exports = exports['default'];
/***/ }),
-/* 556 */
+/* 494 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -73974,7 +58258,7 @@
module.exports = exports['default'];
/***/ }),
-/* 557 */
+/* 495 */
/***/ (function(module, exports) {
'use strict';
@@ -74009,7 +58293,7 @@
}
/***/ }),
-/* 558 */
+/* 496 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -74032,19 +58316,19 @@
var _tinperBeeCore = __webpack_require__(27);
- var _rcMenu = __webpack_require__(528);
+ var _rcMenu = __webpack_require__(465);
var _rcMenu2 = _interopRequireDefault(_rcMenu);
- var _domScrollIntoView = __webpack_require__(544);
+ var _domScrollIntoView = __webpack_require__(482);
var _domScrollIntoView2 = _interopRequireDefault(_domScrollIntoView);
- var _raf = __webpack_require__(240);
+ var _raf = __webpack_require__(497);
var _raf2 = _interopRequireDefault(_raf);
- var _util = __webpack_require__(550);
+ var _util = __webpack_require__(488);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -74255,7 +58539,132 @@
module.exports = exports['default'];
/***/ }),
-/* 559 */
+/* 497 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(global) {var now = __webpack_require__(498)
+ , root = typeof window === 'undefined' ? global : window
+ , vendors = ['moz', 'webkit']
+ , suffix = 'AnimationFrame'
+ , raf = root['request' + suffix]
+ , caf = root['cancel' + suffix] || root['cancelRequest' + suffix]
+
+ for(var i = 0; !raf && i < vendors.length; i++) {
+ raf = root[vendors[i] + 'Request' + suffix]
+ caf = root[vendors[i] + 'Cancel' + suffix]
+ || root[vendors[i] + 'CancelRequest' + suffix]
+ }
+
+ // Some versions of FF have rAF but not cAF
+ if(!raf || !caf) {
+ var last = 0
+ , id = 0
+ , queue = []
+ , frameDuration = 1000 / 60
+
+ raf = function(callback) {
+ if(queue.length === 0) {
+ var _now = now()
+ , next = Math.max(0, frameDuration - (_now - last))
+ last = next + _now
+ setTimeout(function() {
+ var cp = queue.slice(0)
+ // Clear queue here to prevent
+ // callbacks from appending listeners
+ // to the current frame's queue
+ queue.length = 0
+ for(var i = 0; i < cp.length; i++) {
+ if(!cp[i].cancelled) {
+ try{
+ cp[i].callback(last)
+ } catch(e) {
+ setTimeout(function() { throw e }, 0)
+ }
+ }
+ }
+ }, Math.round(next))
+ }
+ queue.push({
+ handle: ++id,
+ callback: callback,
+ cancelled: false
+ })
+ return id
+ }
+
+ caf = function(handle) {
+ for(var i = 0; i < queue.length; i++) {
+ if(queue[i].handle === handle) {
+ queue[i].cancelled = true
+ }
+ }
+ }
+ }
+
+ module.exports = function(fn) {
+ // Wrap in a new function to prevent
+ // `cancel` potentially being assigned
+ // to the native rAF function
+ return raf.call(root, fn)
+ }
+ module.exports.cancel = function() {
+ caf.apply(root, arguments)
+ }
+ module.exports.polyfill = function(object) {
+ if (!object) {
+ object = root;
+ }
+ object.requestAnimationFrame = raf
+ object.cancelAnimationFrame = caf
+ }
+
+ /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
+
+/***/ }),
+/* 498 */
+/***/ (function(module, exports, __webpack_require__) {
+
+ /* WEBPACK VAR INJECTION */(function(process) {// Generated by CoffeeScript 1.12.2
+ (function() {
+ var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime;
+
+ if ((typeof performance !== "undefined" && performance !== null) && performance.now) {
+ module.exports = function() {
+ return performance.now();
+ };
+ } else if ((typeof process !== "undefined" && process !== null) && process.hrtime) {
+ module.exports = function() {
+ return (getNanoSeconds() - nodeLoadTime) / 1e6;
+ };
+ hrtime = process.hrtime;
+ getNanoSeconds = function() {
+ var hr;
+ hr = hrtime();
+ return hr[0] * 1e9 + hr[1];
+ };
+ moduleLoadTime = getNanoSeconds();
+ upTime = process.uptime() * 1e9;
+ nodeLoadTime = moduleLoadTime - upTime;
+ } else if (Date.now) {
+ module.exports = function() {
+ return Date.now() - loadTime;
+ };
+ loadTime = Date.now();
+ } else {
+ module.exports = function() {
+ return new Date().getTime() - loadTime;
+ };
+ loadTime = new Date().getTime();
+ }
+
+ }).call(this);
+
+ //# sourceMappingURL=performance-now.js.map
+
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(33)))
+
+/***/ }),
+/* 499 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -74342,7 +58751,7 @@
};
/***/ }),
-/* 560 */
+/* 500 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -74382,7 +58791,7 @@
module.exports = exports['default'];
/***/ }),
-/* 561 */
+/* 501 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -74391,7 +58800,7 @@
value: true
});
- var _InputNumber = __webpack_require__(562);
+ var _InputNumber = __webpack_require__(502);
var _InputNumber2 = _interopRequireDefault(_InputNumber);
@@ -74401,7 +58810,7 @@
module.exports = exports['default'];
/***/ }),
-/* 562 */
+/* 502 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -74420,11 +58829,11 @@
var _classnames2 = _interopRequireDefault(_classnames);
- var _beeInputGroup = __webpack_require__(512);
+ var _beeInputGroup = __webpack_require__(449);
var _beeInputGroup2 = _interopRequireDefault(_beeInputGroup);
- var _beeFormControl = __webpack_require__(261);
+ var _beeFormControl = __webpack_require__(153);
var _beeFormControl2 = _interopRequireDefault(_beeFormControl);
@@ -74949,7 +59358,7 @@
module.exports = exports['default'];
/***/ }),
-/* 563 */
+/* 503 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -74966,15 +59375,15 @@
var _propTypes2 = _interopRequireDefault(_propTypes);
- var _beeDropdown = __webpack_require__(564);
+ var _beeDropdown = __webpack_require__(504);
var _beeDropdown2 = _interopRequireDefault(_beeDropdown);
- var _beeMenus = __webpack_require__(567);
+ var _beeMenus = __webpack_require__(507);
var _beeMenus2 = _interopRequireDefault(_beeMenus);
- var _beeButton = __webpack_require__(259);
+ var _beeButton = __webpack_require__(155);
var _beeButton2 = _interopRequireDefault(_beeButton);
@@ -74982,7 +59391,7 @@
var _beeIcon2 = _interopRequireDefault(_beeIcon);
- var _i18n = __webpack_require__(583);
+ var _i18n = __webpack_require__(523);
var _i18n2 = _interopRequireDefault(_i18n);
@@ -75271,7 +59680,7 @@
module.exports = exports['default'];
/***/ }),
-/* 564 */
+/* 504 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -75280,7 +59689,7 @@
value: true
});
- var _Dropdown = __webpack_require__(565);
+ var _Dropdown = __webpack_require__(505);
var _Dropdown2 = _interopRequireDefault(_Dropdown);
@@ -75290,7 +59699,7 @@
module.exports = exports['default'];
/***/ }),
-/* 565 */
+/* 505 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -75309,11 +59718,11 @@
var _reactDom2 = _interopRequireDefault(_reactDom);
- var _trigger = __webpack_require__(552);
+ var _trigger = __webpack_require__(490);
var _trigger2 = _interopRequireDefault(_trigger);
- var _placement = __webpack_require__(566);
+ var _placement = __webpack_require__(506);
var _placement2 = _interopRequireDefault(_placement);
@@ -75512,7 +59921,7 @@
module.exports = exports['default'];
/***/ }),
-/* 566 */
+/* 506 */
/***/ (function(module, exports) {
'use strict';
@@ -75569,7 +59978,7 @@
exports["default"] = placements;
/***/ }),
-/* 567 */
+/* 507 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -75578,7 +59987,7 @@
value: true
});
- var _VerticalMenu = __webpack_require__(568);
+ var _VerticalMenu = __webpack_require__(508);
var _VerticalMenu2 = _interopRequireDefault(_VerticalMenu);
@@ -75588,7 +59997,7 @@
module.exports = exports['default'];
/***/ }),
-/* 568 */
+/* 508 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -75603,15 +60012,15 @@
var _react2 = _interopRequireDefault(_react);
- var _ExportMenu = __webpack_require__(569);
+ var _ExportMenu = __webpack_require__(509);
var _ExportMenu2 = _interopRequireDefault(_ExportMenu);
- var _openAnimation = __webpack_require__(581);
+ var _openAnimation = __webpack_require__(521);
var _openAnimation2 = _interopRequireDefault(_openAnimation);
- var _warning = __webpack_require__(582);
+ var _warning = __webpack_require__(522);
var _warning2 = _interopRequireDefault(_warning);
@@ -75744,7 +60153,7 @@
module.exports = exports['default'];
/***/ }),
-/* 569 */
+/* 509 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -75754,31 +60163,31 @@
});
exports.MenuToggle = exports.SideContainer = exports.Divider = exports.ItemGroup = exports.MenuItemGroup = exports.MenuItem = exports.Item = exports.SubMenu = undefined;
- var _Menu = __webpack_require__(570);
+ var _Menu = __webpack_require__(510);
var _Menu2 = _interopRequireDefault(_Menu);
- var _SubMenu = __webpack_require__(574);
+ var _SubMenu = __webpack_require__(514);
var _SubMenu2 = _interopRequireDefault(_SubMenu);
- var _MenuItem = __webpack_require__(576);
+ var _MenuItem = __webpack_require__(516);
var _MenuItem2 = _interopRequireDefault(_MenuItem);
- var _MenuItemGroup = __webpack_require__(577);
+ var _MenuItemGroup = __webpack_require__(517);
var _MenuItemGroup2 = _interopRequireDefault(_MenuItemGroup);
- var _Divider = __webpack_require__(578);
+ var _Divider = __webpack_require__(518);
var _Divider2 = _interopRequireDefault(_Divider);
- var _SideContainer = __webpack_require__(579);
+ var _SideContainer = __webpack_require__(519);
var _SideContainer2 = _interopRequireDefault(_SideContainer);
- var _MenuToggle = __webpack_require__(580);
+ var _MenuToggle = __webpack_require__(520);
var _MenuToggle2 = _interopRequireDefault(_MenuToggle);
@@ -75799,7 +60208,7 @@
exports["default"] = _Menu2["default"];
/***/ }),
-/* 570 */
+/* 510 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -75822,13 +60231,13 @@
var _propTypes2 = _interopRequireDefault(_propTypes);
- var _miniStore = __webpack_require__(530);
+ var _miniStore = __webpack_require__(467);
- var _SubPopupMenu = __webpack_require__(571);
+ var _SubPopupMenu = __webpack_require__(511);
var _SubPopupMenu2 = _interopRequireDefault(_SubPopupMenu);
- var _util = __webpack_require__(572);
+ var _util = __webpack_require__(512);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -75840,9 +60249,9 @@
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); } /**
- * This source code is quoted from rc-menu.
- * homepage: https://github.com/react-component/menu
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); } /**
+ * This source code is quoted from rc-menu.
+ * homepage: https://github.com/react-component/menu
*/
@@ -76097,7 +60506,7 @@
module.exports = exports['default'];
/***/ }),
-/* 571 */
+/* 511 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -76107,9 +60516,9 @@
});
exports.SubPopupMenu = undefined;
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; /**
- * This source code is quoted from rc-menu.
- * homepage: https://github.com/react-component/menu
+ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; /**
+ * This source code is quoted from rc-menu.
+ * homepage: https://github.com/react-component/menu
*/
@@ -76124,11 +60533,11 @@
var _propTypes2 = _interopRequireDefault(_propTypes);
- var _miniStore = __webpack_require__(530);
+ var _miniStore = __webpack_require__(467);
var _tinperBeeCore = __webpack_require__(27);
- var _createChainedFunction = __webpack_require__(442);
+ var _createChainedFunction = __webpack_require__(337);
var _createChainedFunction2 = _interopRequireDefault(_createChainedFunction);
@@ -76136,9 +60545,9 @@
var _classnames2 = _interopRequireDefault(_classnames);
- var _util = __webpack_require__(572);
+ var _util = __webpack_require__(512);
- var _DOMWrap = __webpack_require__(573);
+ var _DOMWrap = __webpack_require__(513);
var _DOMWrap2 = _interopRequireDefault(_DOMWrap);
@@ -76546,7 +60955,7 @@
exports["default"] = connected;
/***/ }),
-/* 572 */
+/* 512 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -76556,9 +60965,9 @@
});
exports.setStyle = exports.getWidth = exports.menuAllProps = undefined;
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; /**
- * This source code is quoted from rc-menu.
- * homepage: https://github.com/react-component/menu
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; /**
+ * This source code is quoted from rc-menu.
+ * homepage: https://github.com/react-component/menu
*/
@@ -76673,7 +61082,7 @@
}
/***/ }),
-/* 573 */
+/* 513 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -76696,15 +61105,15 @@
var _propTypes2 = _interopRequireDefault(_propTypes);
- var _resizeObserverPolyfill = __webpack_require__(539);
+ var _resizeObserverPolyfill = __webpack_require__(477);
var _resizeObserverPolyfill2 = _interopRequireDefault(_resizeObserverPolyfill);
- var _SubMenu = __webpack_require__(574);
+ var _SubMenu = __webpack_require__(514);
var _SubMenu2 = _interopRequireDefault(_SubMenu);
- var _util = __webpack_require__(572);
+ var _util = __webpack_require__(512);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -76718,9 +61127,9 @@
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); } /**
- * This source code is quoted from rc-menu.
- * homepage: https://github.com/react-component/menu
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); } /**
+ * This source code is quoted from rc-menu.
+ * homepage: https://github.com/react-component/menu
*/
@@ -76730,7 +61139,7 @@
// Fix ssr
if (canUseDOM) {
- __webpack_require__(542);
+ __webpack_require__(480);
}
var DOMWrap = function (_React$Component) {
@@ -77048,7 +61457,7 @@
module.exports = exports['default'];
/***/ }),
-/* 574 */
+/* 514 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -77060,9 +61469,9 @@
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; /**
- * This source code is quoted from rc-menu.
- * homepage: https://github.com/react-component/menu
+ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; /**
+ * This source code is quoted from rc-menu.
+ * homepage: https://github.com/react-component/menu
*/
@@ -77078,7 +61487,7 @@
var _propTypes2 = _interopRequireDefault(_propTypes);
- var _rcTrigger = __webpack_require__(444);
+ var _rcTrigger = __webpack_require__(339);
var _rcTrigger2 = _interopRequireDefault(_rcTrigger);
@@ -77088,21 +61497,21 @@
var _classnames2 = _interopRequireDefault(_classnames);
- var _miniStore = __webpack_require__(530);
+ var _miniStore = __webpack_require__(467);
- var _SubPopupMenu = __webpack_require__(571);
+ var _SubPopupMenu = __webpack_require__(511);
var _SubPopupMenu2 = _interopRequireDefault(_SubPopupMenu);
- var _placements = __webpack_require__(575);
+ var _placements = __webpack_require__(515);
var _placements2 = _interopRequireDefault(_placements);
- var _rcAnimate = __webpack_require__(498);
+ var _rcAnimate = __webpack_require__(435);
var _rcAnimate2 = _interopRequireDefault(_rcAnimate);
- var _util = __webpack_require__(572);
+ var _util = __webpack_require__(512);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -77697,7 +62106,7 @@
exports["default"] = connected;
/***/ }),
-/* 575 */
+/* 515 */
/***/ (function(module, exports) {
'use strict';
@@ -77705,9 +62114,9 @@
Object.defineProperty(exports, "__esModule", {
value: true
});
- /**
- * This source code is quoted from rc-menu.
- * homepage: https://github.com/react-component/menu
+ /**
+ * This source code is quoted from rc-menu.
+ * homepage: https://github.com/react-component/menu
*/
var autoAdjustOverflow = {
adjustX: 1,
@@ -77740,7 +62149,7 @@
exports["default"] = placements;
/***/ }),
-/* 576 */
+/* 516 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -77770,13 +62179,13 @@
var _classnames2 = _interopRequireDefault(_classnames);
- var _domScrollIntoView = __webpack_require__(544);
+ var _domScrollIntoView = __webpack_require__(482);
var _domScrollIntoView2 = _interopRequireDefault(_domScrollIntoView);
- var _miniStore = __webpack_require__(530);
+ var _miniStore = __webpack_require__(467);
- var _util = __webpack_require__(572);
+ var _util = __webpack_require__(512);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -77788,9 +62197,9 @@
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); } /**
- * This source code is quoted from rc-menu.
- * homepage: https://github.com/react-component/menu
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); } /**
+ * This source code is quoted from rc-menu.
+ * homepage: https://github.com/react-component/menu
*/
@@ -78020,7 +62429,7 @@
exports["default"] = connected;
/***/ }),
-/* 577 */
+/* 517 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -78039,7 +62448,7 @@
var _propTypes2 = _interopRequireDefault(_propTypes);
- var _util = __webpack_require__(572);
+ var _util = __webpack_require__(512);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -78051,9 +62460,9 @@
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); } /**
- * This source code is quoted from rc-menu.
- * homepage: https://github.com/react-component/menu
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); } /**
+ * This source code is quoted from rc-menu.
+ * homepage: https://github.com/react-component/menu
*/
@@ -78137,7 +62546,7 @@
module.exports = exports['default'];
/***/ }),
-/* 578 */
+/* 518 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -78162,9 +62571,9 @@
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); } /**
- * This source code is quoted from rc-menu.
- * homepage: https://github.com/react-component/menu
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); } /**
+ * This source code is quoted from rc-menu.
+ * homepage: https://github.com/react-component/menu
*/
@@ -78207,7 +62616,7 @@
module.exports = exports['default'];
/***/ }),
-/* 579 */
+/* 519 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -78281,7 +62690,7 @@
module.exports = exports['default'];
/***/ }),
-/* 580 */
+/* 520 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -78322,8 +62731,8 @@
var propTypes = {
onClick: _propTypes2["default"].func,
- /**
- * The toggle content, if left empty it will render the default toggle (seen above).
+ /**
+ * The toggle content, if left empty it will render the default toggle (seen above).
*/
show: _propTypes2["default"].bool,
children: _propTypes2["default"].node
@@ -78439,7 +62848,7 @@
module.exports = exports['default'];
/***/ }),
-/* 581 */
+/* 521 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -78487,7 +62896,7 @@
module.exports = exports['default'];
/***/ }),
-/* 582 */
+/* 522 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -78514,7 +62923,7 @@
module.exports = exports['default'];
/***/ }),
-/* 583 */
+/* 523 */
/***/ (function(module, exports) {
'use strict';
@@ -78567,7 +62976,7 @@
};
/***/ }),
-/* 584 */
+/* 524 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -78582,11 +62991,11 @@
var _react2 = _interopRequireDefault(_react);
- var _Column = __webpack_require__(585);
+ var _Column = __webpack_require__(525);
var _Column2 = _interopRequireDefault(_Column);
- var _ColumnGroup = __webpack_require__(586);
+ var _ColumnGroup = __webpack_require__(526);
var _ColumnGroup2 = _interopRequireDefault(_ColumnGroup);
@@ -78885,7 +63294,7 @@
module.exports = exports['default'];
/***/ }),
-/* 585 */
+/* 525 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -78945,7 +63354,7 @@
module.exports = exports['default'];
/***/ }),
-/* 586 */
+/* 526 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -78989,7 +63398,7 @@
module.exports = exports['default'];
/***/ }),
-/* 587 */
+/* 527 */
/***/ (function(module, exports) {
"use strict";
@@ -79034,7 +63443,7 @@
module.exports = exports["default"];
/***/ }),
-/* 588 */
+/* 528 */
/***/ (function(module, exports, __webpack_require__) {
'use strict';
@@ -79043,7 +63452,7 @@
value: true
});
- var _Loading = __webpack_require__(589);
+ var _Loading = __webpack_require__(529);
var _Loading2 = _interopRequireDefault(_Loading);
@@ -79053,7 +63462,7 @@
module.exports = exports['default'];
/***/ }),
-/* 589 */
+/* 529 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -79199,7 +63608,7 @@
_react2["default"].createElement(
"div",
null,
- _react2["default"].createElement("img", { src: "http://design.yonyoucloud.com/static/bee.tinper.org-demo/loading.svg" })
+ _react2["default"].createElement(_beeIcon2["default"], { type: "uf-loadingstate" })
)
),
children && _react2["default"].createElement(
@@ -79257,7 +63666,7 @@
module.exports = exports["default"];
/***/ }),
-/* 590 */
+/* 530 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -79270,9 +63679,9 @@
var _react2 = _interopRequireDefault(_react);
- var _tinperBee = __webpack_require__(591);
+ var _tinperBee = __webpack_require__(531);
- var _src = __webpack_require__(263);
+ var _src = __webpack_require__(157);
var _src2 = _interopRequireDefault(_src);
@@ -79350,21 +63759,7 @@
module.exports = exports["default"];
/***/ }),
-/* 591 */
-/***/ (function(module, exports, __webpack_require__) {
-
- /* WEBPACK VAR INJECTION */(function(process) {'use strict';
-
- if (process.env.NODE_ENV === 'production') {
- module.exports = __webpack_require__(592);
- } else {
- module.exports = __webpack_require__(592);
- }
-
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(33)))
-
-/***/ }),
-/* 592 */
+/* 531 */
/***/ (function(module, exports, __webpack_require__) {
(function webpackUniversalModuleDefinition(root, factory) {
@@ -79439,7 +63834,7 @@
/******/ __webpack_require__.p = "";
/******/
/******/ // Load entry module and return exports
- /******/ return __webpack_require__(__webpack_require__.s = 423);
+ /******/ return __webpack_require__(__webpack_require__.s = 366);
/******/ })
/************************************************************************/
/******/ ([
@@ -79458,65 +63853,6 @@
/* 2 */
/***/ (function(module, exports, __webpack_require__) {
- var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
- Copyright (c) 2017 Jed Watson.
- Licensed under the MIT License (MIT), see
- http://jedwatson.github.io/classnames
- */
- /* global define */
-
- (function () {
- 'use strict';
-
- var hasOwn = {}.hasOwnProperty;
-
- function classNames () {
- var classes = [];
-
- for (var i = 0; i < arguments.length; i++) {
- var arg = arguments[i];
- if (!arg) continue;
-
- var argType = typeof arg;
-
- if (argType === 'string' || argType === 'number') {
- classes.push(arg);
- } else if (Array.isArray(arg) && arg.length) {
- var inner = classNames.apply(null, arg);
- if (inner) {
- classes.push(inner);
- }
- } else if (argType === 'object') {
- for (var key in arg) {
- if (hasOwn.call(arg, key) && arg[key]) {
- classes.push(key);
- }
- }
- }
- }
-
- return classes.join(' ');
- }
-
- if (typeof module !== 'undefined' && module.exports) {
- classNames.default = classNames;
- module.exports = classNames;
- } else if (true) {
- // register as 'classnames', consistent with npm package name
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
- return classNames;
- }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
- } else {
- window.classNames = classNames;
- }
- }());
-
-
- /***/ }),
- /* 3 */
- /***/ (function(module, exports, __webpack_require__) {
-
/* WEBPACK VAR INJECTION */(function(module) {var require;//! moment.js
;(function (global, factory) {
@@ -81369,7 +65705,7 @@
try {
oldLocale = globalLocale._abbr;
var aliasedRequire = require;
- __webpack_require__(931)("./" + name);
+ __webpack_require__(829)("./" + name);
getSetGlobalLocale(oldLocale);
} catch (e) {}
}
@@ -84120,7 +68456,66 @@
})));
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(182)(module)))
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(153)(module)))
+
+ /***/ }),
+ /* 3 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
+ Copyright (c) 2017 Jed Watson.
+ Licensed under the MIT License (MIT), see
+ http://jedwatson.github.io/classnames
+ */
+ /* global define */
+
+ (function () {
+ 'use strict';
+
+ var hasOwn = {}.hasOwnProperty;
+
+ function classNames () {
+ var classes = [];
+
+ for (var i = 0; i < arguments.length; i++) {
+ var arg = arguments[i];
+ if (!arg) continue;
+
+ var argType = typeof arg;
+
+ if (argType === 'string' || argType === 'number') {
+ classes.push(arg);
+ } else if (Array.isArray(arg) && arg.length) {
+ var inner = classNames.apply(null, arg);
+ if (inner) {
+ classes.push(inner);
+ }
+ } else if (argType === 'object') {
+ for (var key in arg) {
+ if (hasOwn.call(arg, key) && arg[key]) {
+ classes.push(key);
+ }
+ }
+ }
+ }
+
+ return classes.join(' ');
+ }
+
+ if (typeof module !== 'undefined' && module.exports) {
+ classNames.default = classNames;
+ module.exports = classNames;
+ } else if (true) {
+ // register as 'classnames', consistent with npm package name
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
+ return classNames;
+ }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
+ __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
+ } else {
+ window.classNames = classNames;
+ }
+ }());
+
/***/ }),
/* 4 */
@@ -84138,55 +68533,55 @@
exports.__esModule = true;
exports.Align = exports.toArray = exports.cssAnimation = exports.addEventListener = exports.contains = exports.KeyCode = exports.createChainedFunction = exports.splitComponent = exports.isRequiredForA11y = exports.elementType = exports.deprecated = exports.componentOrElement = exports.all = undefined;
- var _all2 = __webpack_require__(183);
+ var _all2 = __webpack_require__(154);
var _all3 = _interopRequireDefault(_all2);
- var _componentOrElement2 = __webpack_require__(606);
+ var _componentOrElement2 = __webpack_require__(543);
var _componentOrElement3 = _interopRequireDefault(_componentOrElement2);
- var _deprecated2 = __webpack_require__(607);
+ var _deprecated2 = __webpack_require__(544);
var _deprecated3 = _interopRequireDefault(_deprecated2);
- var _elementType2 = __webpack_require__(184);
+ var _elementType2 = __webpack_require__(155);
var _elementType3 = _interopRequireDefault(_elementType2);
- var _isRequiredForA11y2 = __webpack_require__(185);
+ var _isRequiredForA11y2 = __webpack_require__(156);
var _isRequiredForA11y3 = _interopRequireDefault(_isRequiredForA11y2);
- var _splitComponent2 = __webpack_require__(117);
+ var _splitComponent2 = __webpack_require__(104);
var _splitComponent3 = _interopRequireDefault(_splitComponent2);
- var _createChainedFunction2 = __webpack_require__(46);
+ var _createChainedFunction2 = __webpack_require__(44);
var _createChainedFunction3 = _interopRequireDefault(_createChainedFunction2);
- var _keyCode = __webpack_require__(186);
+ var _keyCode = __webpack_require__(157);
var _keyCode2 = _interopRequireDefault(_keyCode);
- var _contains2 = __webpack_require__(608);
+ var _contains2 = __webpack_require__(545);
var _contains3 = _interopRequireDefault(_contains2);
- var _addEventListener2 = __webpack_require__(118);
+ var _addEventListener2 = __webpack_require__(105);
var _addEventListener3 = _interopRequireDefault(_addEventListener2);
- var _cssAnimation2 = __webpack_require__(611);
+ var _cssAnimation2 = __webpack_require__(548);
var _cssAnimation3 = _interopRequireDefault(_cssAnimation2);
- var _toArray2 = __webpack_require__(613);
+ var _toArray2 = __webpack_require__(550);
var _toArray3 = _interopRequireDefault(_toArray2);
- var _Align2 = __webpack_require__(188);
+ var _Align2 = __webpack_require__(159);
var _Align3 = _interopRequireDefault(_Align2);
@@ -84232,7 +68627,7 @@
exports.__esModule = true;
- var _typeof2 = __webpack_require__(29);
+ var _typeof2 = __webpack_require__(32);
var _typeof3 = _interopRequireDefault(_typeof2);
@@ -84255,15 +68650,15 @@
exports.__esModule = true;
- var _setPrototypeOf = __webpack_require__(625);
+ var _setPrototypeOf = __webpack_require__(562);
var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf);
- var _create = __webpack_require__(629);
+ var _create = __webpack_require__(566);
var _create2 = _interopRequireDefault(_create);
- var _typeof2 = __webpack_require__(29);
+ var _typeof2 = __webpack_require__(32);
var _typeof3 = _interopRequireDefault(_typeof2);
@@ -84294,7 +68689,7 @@
exports.__esModule = true;
- var _assign = __webpack_require__(463);
+ var _assign = __webpack_require__(404);
var _assign2 = _interopRequireDefault(_assign);
@@ -84316,196 +68711,6 @@
/***/ }),
/* 10 */
- /***/ (function(module, exports) {
-
- // shim for using process in browser
- var process = module.exports = {};
-
- // cached from whatever global is present so that test runners that stub it
- // don't break things. But we need to wrap it in a try catch in case it is
- // wrapped in strict mode code which doesn't define any globals. It's inside a
- // function because try/catches deoptimize in certain engines.
-
- var cachedSetTimeout;
- var cachedClearTimeout;
-
- function defaultSetTimout() {
- throw new Error('setTimeout has not been defined');
- }
- function defaultClearTimeout () {
- throw new Error('clearTimeout has not been defined');
- }
- (function () {
- try {
- if (typeof setTimeout === 'function') {
- cachedSetTimeout = setTimeout;
- } else {
- cachedSetTimeout = defaultSetTimout;
- }
- } catch (e) {
- cachedSetTimeout = defaultSetTimout;
- }
- try {
- if (typeof clearTimeout === 'function') {
- cachedClearTimeout = clearTimeout;
- } else {
- cachedClearTimeout = defaultClearTimeout;
- }
- } catch (e) {
- cachedClearTimeout = defaultClearTimeout;
- }
- } ())
- function runTimeout(fun) {
- if (cachedSetTimeout === setTimeout) {
- //normal enviroments in sane situations
- return setTimeout(fun, 0);
- }
- // if setTimeout wasn't available but was latter defined
- if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
- cachedSetTimeout = setTimeout;
- return setTimeout(fun, 0);
- }
- try {
- // when when somebody has screwed with setTimeout but no I.E. maddness
- return cachedSetTimeout(fun, 0);
- } catch(e){
- try {
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
- return cachedSetTimeout.call(null, fun, 0);
- } catch(e){
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
- return cachedSetTimeout.call(this, fun, 0);
- }
- }
-
-
- }
- function runClearTimeout(marker) {
- if (cachedClearTimeout === clearTimeout) {
- //normal enviroments in sane situations
- return clearTimeout(marker);
- }
- // if clearTimeout wasn't available but was latter defined
- if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
- cachedClearTimeout = clearTimeout;
- return clearTimeout(marker);
- }
- try {
- // when when somebody has screwed with setTimeout but no I.E. maddness
- return cachedClearTimeout(marker);
- } catch (e){
- try {
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
- return cachedClearTimeout.call(null, marker);
- } catch (e){
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
- // Some versions of I.E. have different rules for clearTimeout vs setTimeout
- return cachedClearTimeout.call(this, marker);
- }
- }
-
-
-
- }
- var queue = [];
- var draining = false;
- var currentQueue;
- var queueIndex = -1;
-
- function cleanUpNextTick() {
- if (!draining || !currentQueue) {
- return;
- }
- draining = false;
- if (currentQueue.length) {
- queue = currentQueue.concat(queue);
- } else {
- queueIndex = -1;
- }
- if (queue.length) {
- drainQueue();
- }
- }
-
- function drainQueue() {
- if (draining) {
- return;
- }
- var timeout = runTimeout(cleanUpNextTick);
- draining = true;
-
- var len = queue.length;
- while(len) {
- currentQueue = queue;
- queue = [];
- while (++queueIndex < len) {
- if (currentQueue) {
- currentQueue[queueIndex].run();
- }
- }
- queueIndex = -1;
- len = queue.length;
- }
- currentQueue = null;
- draining = false;
- runClearTimeout(timeout);
- }
-
- process.nextTick = function (fun) {
- var args = new Array(arguments.length - 1);
- if (arguments.length > 1) {
- for (var i = 1; i < arguments.length; i++) {
- args[i - 1] = arguments[i];
- }
- }
- queue.push(new Item(fun, args));
- if (queue.length === 1 && !draining) {
- runTimeout(drainQueue);
- }
- };
-
- // v8 likes predictible objects
- function Item(fun, array) {
- this.fun = fun;
- this.array = array;
- }
- Item.prototype.run = function () {
- this.fun.apply(null, this.array);
- };
- process.title = 'browser';
- process.browser = true;
- process.env = {};
- process.argv = [];
- process.version = ''; // empty string to avoid regexp issues
- process.versions = {};
-
- function noop() {}
-
- process.on = noop;
- process.addListener = noop;
- process.once = noop;
- process.off = noop;
- process.removeListener = noop;
- process.removeAllListeners = noop;
- process.emit = noop;
- process.prependListener = noop;
- process.prependOnceListener = noop;
-
- process.listeners = function (name) { return [] }
-
- process.binding = function (name) {
- throw new Error('process.binding is not supported');
- };
-
- process.cwd = function () { return '/' };
- process.chdir = function (dir) {
- throw new Error('process.chdir is not supported');
- };
- process.umask = function() { return 0; };
-
-
- /***/ }),
- /* 11 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -84518,7 +68723,7 @@
/* harmony export (immutable) */ __webpack_exports__["c"] = deepMerge;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(9);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_typeof__ = __webpack_require__(29);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_typeof__ = __webpack_require__(32);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_typeof___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_typeof__);
@@ -84708,10 +68913,10 @@
}
return target;
}
- /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(10)))
+ /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(12)))
/***/ }),
- /* 12 */
+ /* 11 */
/***/ (function(module, exports) {
function _interopRequireDefault(obj) {
@@ -84723,57 +68928,206 @@
module.exports = _interopRequireDefault;
/***/ }),
- /* 13 */
- /***/ (function(module, exports, __webpack_require__) {
+ /* 12 */
+ /***/ (function(module, exports) {
- "use strict";
+ // shim for using process in browser
+ var process = module.exports = {};
+
+ // cached from whatever global is present so that test runners that stub it
+ // don't break things. But we need to wrap it in a try catch in case it is
+ // wrapped in strict mode code which doesn't define any globals. It's inside a
+ // function because try/catches deoptimize in certain engines.
+
+ var cachedSetTimeout;
+ var cachedClearTimeout;
+
+ function defaultSetTimout() {
+ throw new Error('setTimeout has not been defined');
+ }
+ function defaultClearTimeout () {
+ throw new Error('clearTimeout has not been defined');
+ }
+ (function () {
+ try {
+ if (typeof setTimeout === 'function') {
+ cachedSetTimeout = setTimeout;
+ } else {
+ cachedSetTimeout = defaultSetTimout;
+ }
+ } catch (e) {
+ cachedSetTimeout = defaultSetTimout;
+ }
+ try {
+ if (typeof clearTimeout === 'function') {
+ cachedClearTimeout = clearTimeout;
+ } else {
+ cachedClearTimeout = defaultClearTimeout;
+ }
+ } catch (e) {
+ cachedClearTimeout = defaultClearTimeout;
+ }
+ } ())
+ function runTimeout(fun) {
+ if (cachedSetTimeout === setTimeout) {
+ //normal enviroments in sane situations
+ return setTimeout(fun, 0);
+ }
+ // if setTimeout wasn't available but was latter defined
+ if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
+ cachedSetTimeout = setTimeout;
+ return setTimeout(fun, 0);
+ }
+ try {
+ // when when somebody has screwed with setTimeout but no I.E. maddness
+ return cachedSetTimeout(fun, 0);
+ } catch(e){
+ try {
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
+ return cachedSetTimeout.call(null, fun, 0);
+ } catch(e){
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
+ return cachedSetTimeout.call(this, fun, 0);
+ }
+ }
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _Icon = __webpack_require__(435);
-
- var _Icon2 = _interopRequireDefault(_Icon);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- exports["default"] = _Icon2["default"];
- module.exports = exports['default'];
-
- /***/ }),
- /* 14 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
+ }
+ function runClearTimeout(marker) {
+ if (cachedClearTimeout === clearTimeout) {
+ //normal enviroments in sane situations
+ return clearTimeout(marker);
+ }
+ // if clearTimeout wasn't available but was latter defined
+ if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
+ cachedClearTimeout = clearTimeout;
+ return clearTimeout(marker);
+ }
+ try {
+ // when when somebody has screwed with setTimeout but no I.E. maddness
+ return cachedClearTimeout(marker);
+ } catch (e){
+ try {
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
+ return cachedClearTimeout.call(null, marker);
+ } catch (e){
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
+ // Some versions of I.E. have different rules for clearTimeout vs setTimeout
+ return cachedClearTimeout.call(this, marker);
+ }
+ }
- exports.__esModule = true;
- exports.default = function (obj, keys) {
- var target = {};
+ }
+ var queue = [];
+ var draining = false;
+ var currentQueue;
+ var queueIndex = -1;
- for (var i in obj) {
- if (keys.indexOf(i) >= 0) continue;
- if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
- target[i] = obj[i];
- }
+ function cleanUpNextTick() {
+ if (!draining || !currentQueue) {
+ return;
+ }
+ draining = false;
+ if (currentQueue.length) {
+ queue = currentQueue.concat(queue);
+ } else {
+ queueIndex = -1;
+ }
+ if (queue.length) {
+ drainQueue();
+ }
+ }
- return target;
+ function drainQueue() {
+ if (draining) {
+ return;
+ }
+ var timeout = runTimeout(cleanUpNextTick);
+ draining = true;
+
+ var len = queue.length;
+ while(len) {
+ currentQueue = queue;
+ queue = [];
+ while (++queueIndex < len) {
+ if (currentQueue) {
+ currentQueue[queueIndex].run();
+ }
+ }
+ queueIndex = -1;
+ len = queue.length;
+ }
+ currentQueue = null;
+ draining = false;
+ runClearTimeout(timeout);
+ }
+
+ process.nextTick = function (fun) {
+ var args = new Array(arguments.length - 1);
+ if (arguments.length > 1) {
+ for (var i = 1; i < arguments.length; i++) {
+ args[i - 1] = arguments[i];
+ }
+ }
+ queue.push(new Item(fun, args));
+ if (queue.length === 1 && !draining) {
+ runTimeout(drainQueue);
+ }
};
+ // v8 likes predictible objects
+ function Item(fun, array) {
+ this.fun = fun;
+ this.array = array;
+ }
+ Item.prototype.run = function () {
+ this.fun.apply(null, this.array);
+ };
+ process.title = 'browser';
+ process.browser = true;
+ process.env = {};
+ process.argv = [];
+ process.version = ''; // empty string to avoid regexp issues
+ process.versions = {};
+
+ function noop() {}
+
+ process.on = noop;
+ process.addListener = noop;
+ process.once = noop;
+ process.off = noop;
+ process.removeListener = noop;
+ process.removeAllListeners = noop;
+ process.emit = noop;
+ process.prependListener = noop;
+ process.prependOnceListener = noop;
+
+ process.listeners = function (name) { return [] }
+
+ process.binding = function (name) {
+ throw new Error('process.binding is not supported');
+ };
+
+ process.cwd = function () { return '/' };
+ process.chdir = function (dir) {
+ throw new Error('process.chdir is not supported');
+ };
+ process.umask = function() { return 0; };
+
+
/***/ }),
- /* 15 */
+ /* 13 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__required__ = __webpack_require__(169);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__whitespace__ = __webpack_require__(507);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__type__ = __webpack_require__(508);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__range__ = __webpack_require__(509);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__enum__ = __webpack_require__(510);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__pattern__ = __webpack_require__(511);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__required__ = __webpack_require__(140);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__whitespace__ = __webpack_require__(449);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__type__ = __webpack_require__(450);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__range__ = __webpack_require__(451);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__enum__ = __webpack_require__(452);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__pattern__ = __webpack_require__(453);
@@ -84790,6 +69144,46 @@
pattern: __WEBPACK_IMPORTED_MODULE_5__pattern__["a" /* default */]
});
+ /***/ }),
+ /* 14 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _Icon = __webpack_require__(378);
+
+ var _Icon2 = _interopRequireDefault(_Icon);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+ exports["default"] = _Icon2["default"];
+ module.exports = exports['default'];
+
+ /***/ }),
+ /* 15 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _FormControl = __webpack_require__(389);
+
+ var _FormControl2 = _interopRequireDefault(_FormControl);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+ exports["default"] = _FormControl2["default"];
+ module.exports = exports['default'];
+
/***/ }),
/* 16 */
/***/ (function(module, exports) {
@@ -84802,31 +69196,18 @@
/* 17 */
/***/ (function(module, exports, __webpack_require__) {
- "use strict";
+ var store = __webpack_require__(88)('wks');
+ var uid = __webpack_require__(66);
+ var Symbol = __webpack_require__(23).Symbol;
+ var USE_SYMBOL = typeof Symbol == 'function';
+ var $exports = module.exports = function (name) {
+ return store[name] || (store[name] =
+ USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
+ };
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.create = exports.connect = exports.Provider = undefined;
+ $exports.store = store;
- var _Provider2 = __webpack_require__(631);
-
- var _Provider3 = _interopRequireDefault(_Provider2);
-
- var _connect2 = __webpack_require__(632);
-
- var _connect3 = _interopRequireDefault(_connect2);
-
- var _create2 = __webpack_require__(635);
-
- var _create3 = _interopRequireDefault(_create2);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
- exports.Provider = _Provider3.default;
- exports.connect = _connect3.default;
- exports.create = _create3.default;
/***/ }),
/* 18 */
@@ -84894,27 +69275,84 @@
module.exports = warning;
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(10)))
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(12)))
/***/ }),
/* 19 */
/***/ (function(module, exports, __webpack_require__) {
- var store = __webpack_require__(101)('wks');
- var uid = __webpack_require__(78);
- var Symbol = __webpack_require__(22).Symbol;
- var USE_SYMBOL = typeof Symbol == 'function';
+ "use strict";
- var $exports = module.exports = function (name) {
- return store[name] || (store[name] =
- USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
- };
- $exports.store = store;
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ var _Button = __webpack_require__(369);
+
+ var _Button2 = _interopRequireDefault(_Button);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+ exports["default"] = _Button2["default"];
+ module.exports = exports['default'];
/***/ }),
/* 20 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ exports.__esModule = true;
+
+ exports.default = function (obj, keys) {
+ var target = {};
+
+ for (var i in obj) {
+ if (keys.indexOf(i) >= 0) continue;
+ if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
+ target[i] = obj[i];
+ }
+
+ return target;
+ };
+
+ /***/ }),
+ /* 21 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ exports.__esModule = true;
+
+ var _defineProperty = __webpack_require__(129);
+
+ var _defineProperty2 = _interopRequireDefault(_defineProperty);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ exports.default = function () {
+ function defineProperties(target, props) {
+ for (var i = 0; i < props.length; i++) {
+ var descriptor = props[i];
+ descriptor.enumerable = descriptor.enumerable || false;
+ descriptor.configurable = true;
+ if ("value" in descriptor) descriptor.writable = true;
+ (0, _defineProperty2.default)(target, descriptor.key, descriptor);
+ }
+ }
+
+ return function (Constructor, protoProps, staticProps) {
+ if (protoProps) defineProperties(Constructor.prototype, protoProps);
+ if (staticProps) defineProperties(Constructor, staticProps);
+ return Constructor;
+ };
+ }();
+
+ /***/ }),
+ /* 22 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -85081,75 +69519,7 @@
/***/ }),
- /* 21 */
- /***/ (function(module, exports, __webpack_require__) {
-
- var global = __webpack_require__(22);
- var core = __webpack_require__(16);
- var ctx = __webpack_require__(95);
- var hide = __webpack_require__(38);
- var has = __webpack_require__(28);
- var PROTOTYPE = 'prototype';
-
- var $export = function (type, name, source) {
- var IS_FORCED = type & $export.F;
- var IS_GLOBAL = type & $export.G;
- var IS_STATIC = type & $export.S;
- var IS_PROTO = type & $export.P;
- var IS_BIND = type & $export.B;
- var IS_WRAP = type & $export.W;
- var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
- var expProto = exports[PROTOTYPE];
- var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];
- var key, own, out;
- if (IS_GLOBAL) source = name;
- for (key in source) {
- // contains in native
- own = !IS_FORCED && target && target[key] !== undefined;
- if (own && has(exports, key)) continue;
- // export native or passed
- out = own ? target[key] : source[key];
- // prevent global pollution for namespaces
- exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
- // bind timers to global for call from export context
- : IS_BIND && own ? ctx(out, global)
- // wrap global constructors for prevent change them in library
- : IS_WRAP && target[key] == out ? (function (C) {
- var F = function (a, b, c) {
- if (this instanceof C) {
- switch (arguments.length) {
- case 0: return new C();
- case 1: return new C(a);
- case 2: return new C(a, b);
- } return new C(a, b, c);
- } return C.apply(this, arguments);
- };
- F[PROTOTYPE] = C[PROTOTYPE];
- return F;
- // make static versions for prototype methods
- })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
- // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
- if (IS_PROTO) {
- (exports.virtual || (exports.virtual = {}))[key] = out;
- // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
- if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);
- }
- }
- };
- // type bitmap
- $export.F = 1; // forced
- $export.G = 2; // global
- $export.S = 4; // static
- $export.P = 8; // proto
- $export.B = 16; // bind
- $export.W = 32; // wrap
- $export.U = 64; // safe
- $export.R = 128; // real proto method for `library`
- module.exports = $export;
-
-
- /***/ }),
- /* 22 */
+ /* 23 */
/***/ (function(module, exports) {
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
@@ -85161,15 +69531,15 @@
/***/ }),
- /* 23 */
+ /* 24 */
/***/ (function(module, exports, __webpack_require__) {
var anObject = __webpack_require__(39);
- var IE8_DOM_DEFINE = __webpack_require__(158);
- var toPrimitive = __webpack_require__(96);
+ var IE8_DOM_DEFINE = __webpack_require__(130);
+ var toPrimitive = __webpack_require__(83);
var dP = Object.defineProperty;
- exports.f = __webpack_require__(27) ? Object.defineProperty : function defineProperty(O, P, Attributes) {
+ exports.f = __webpack_require__(29) ? Object.defineProperty : function defineProperty(O, P, Attributes) {
anObject(O);
P = toPrimitive(P, true);
anObject(Attributes);
@@ -85182,409 +69552,14 @@
};
- /***/ }),
- /* 24 */
- /***/ (function(module, exports) {
-
- var g;
-
- // This works in non-strict mode
- g = (function() {
- return this;
- })();
-
- try {
- // This works if eval is allowed (see CSP)
- g = g || Function("return this")() || (1,eval)("this");
- } catch(e) {
- // This works if the window reference is available
- if(typeof window === "object")
- g = window;
- }
-
- // g can still be undefined, but nothing to do about it...
- // We return undefined, instead of nothing here, so it's
- // easier to handle this case. if(!global) { ...}
-
- module.exports = g;
-
-
/***/ }),
/* 25 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
+ /***/ (function(module, exports, __webpack_require__) {
"use strict";
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(9);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__ = __webpack_require__(94);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(6);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass__ = __webpack_require__(45);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(7);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__ = __webpack_require__(8);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(1);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__ = __webpack_require__(641);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__AnimateChild__ = __webpack_require__(642);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__util_animate__ = __webpack_require__(203);
-
-
-
-
-
-
-
-
-
-
- var defaultKey = 'rc_animate_' + Date.now();
-
- function getChildrenFromProps(props) {
- var children = props.children;
- if (__WEBPACK_IMPORTED_MODULE_6_react___default.a.isValidElement(children)) {
- if (!children.key) {
- return __WEBPACK_IMPORTED_MODULE_6_react___default.a.cloneElement(children, {
- key: defaultKey
- });
- }
- }
- return children;
- }
-
- function noop() {}
-
- var Animate = function (_React$Component) {
- __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default()(Animate, _React$Component);
-
- // eslint-disable-line
-
- function Animate(props) {
- __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, Animate);
-
- var _this = __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default()(this, (Animate.__proto__ || Object.getPrototypeOf(Animate)).call(this, props));
-
- _initialiseProps.call(_this);
-
- _this.currentlyAnimatingKeys = {};
- _this.keysToEnter = [];
- _this.keysToLeave = [];
-
- _this.state = {
- children: Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["e" /* toArrayChildren */])(getChildrenFromProps(props))
- };
-
- _this.childrenRefs = {};
- return _this;
- }
-
- __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass___default()(Animate, [{
- key: 'componentDidMount',
- value: function componentDidMount() {
- var _this2 = this;
-
- var showProp = this.props.showProp;
- var children = this.state.children;
- if (showProp) {
- children = children.filter(function (child) {
- return !!child.props[showProp];
- });
- }
- children.forEach(function (child) {
- if (child) {
- _this2.performAppear(child.key);
- }
- });
- }
- }, {
- key: 'componentWillReceiveProps',
- value: function componentWillReceiveProps(nextProps) {
- var _this3 = this;
-
- this.nextProps = nextProps;
- var nextChildren = Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["e" /* toArrayChildren */])(getChildrenFromProps(nextProps));
- var props = this.props;
- // exclusive needs immediate response
- if (props.exclusive) {
- Object.keys(this.currentlyAnimatingKeys).forEach(function (key) {
- _this3.stop(key);
- });
- }
- var showProp = props.showProp;
- var currentlyAnimatingKeys = this.currentlyAnimatingKeys;
- // last props children if exclusive
- var currentChildren = props.exclusive ? Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["e" /* toArrayChildren */])(getChildrenFromProps(props)) : this.state.children;
- // in case destroy in showProp mode
- var newChildren = [];
- if (showProp) {
- currentChildren.forEach(function (currentChild) {
- var nextChild = currentChild && Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["a" /* findChildInChildrenByKey */])(nextChildren, currentChild.key);
- var newChild = void 0;
- if ((!nextChild || !nextChild.props[showProp]) && currentChild.props[showProp]) {
- newChild = __WEBPACK_IMPORTED_MODULE_6_react___default.a.cloneElement(nextChild || currentChild, __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()({}, showProp, true));
- } else {
- newChild = nextChild;
- }
- if (newChild) {
- newChildren.push(newChild);
- }
- });
- nextChildren.forEach(function (nextChild) {
- if (!nextChild || !Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["a" /* findChildInChildrenByKey */])(currentChildren, nextChild.key)) {
- newChildren.push(nextChild);
- }
- });
- } else {
- newChildren = Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["d" /* mergeChildren */])(currentChildren, nextChildren);
- }
-
- // need render to avoid update
- this.setState({
- children: newChildren
- });
-
- nextChildren.forEach(function (child) {
- var key = child && child.key;
- if (child && currentlyAnimatingKeys[key]) {
- return;
- }
- var hasPrev = child && Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["a" /* findChildInChildrenByKey */])(currentChildren, key);
- if (showProp) {
- var showInNext = child.props[showProp];
- if (hasPrev) {
- var showInNow = Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["b" /* findShownChildInChildrenByKey */])(currentChildren, key, showProp);
- if (!showInNow && showInNext) {
- _this3.keysToEnter.push(key);
- }
- } else if (showInNext) {
- _this3.keysToEnter.push(key);
- }
- } else if (!hasPrev) {
- _this3.keysToEnter.push(key);
- }
- });
-
- currentChildren.forEach(function (child) {
- var key = child && child.key;
- if (child && currentlyAnimatingKeys[key]) {
- return;
- }
- var hasNext = child && Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["a" /* findChildInChildrenByKey */])(nextChildren, key);
- if (showProp) {
- var showInNow = child.props[showProp];
- if (hasNext) {
- var showInNext = Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["b" /* findShownChildInChildrenByKey */])(nextChildren, key, showProp);
- if (!showInNext && showInNow) {
- _this3.keysToLeave.push(key);
- }
- } else if (showInNow) {
- _this3.keysToLeave.push(key);
- }
- } else if (!hasNext) {
- _this3.keysToLeave.push(key);
- }
- });
- }
- }, {
- key: 'componentDidUpdate',
- value: function componentDidUpdate() {
- var keysToEnter = this.keysToEnter;
- this.keysToEnter = [];
- keysToEnter.forEach(this.performEnter);
- var keysToLeave = this.keysToLeave;
- this.keysToLeave = [];
- keysToLeave.forEach(this.performLeave);
- }
- }, {
- key: 'isValidChildByKey',
- value: function isValidChildByKey(currentChildren, key) {
- var showProp = this.props.showProp;
- if (showProp) {
- return Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["b" /* findShownChildInChildrenByKey */])(currentChildren, key, showProp);
- }
- return Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["a" /* findChildInChildrenByKey */])(currentChildren, key);
- }
- }, {
- key: 'stop',
- value: function stop(key) {
- delete this.currentlyAnimatingKeys[key];
- var component = this.childrenRefs[key];
- if (component) {
- component.stop();
- }
- }
- }, {
- key: 'render',
- value: function render() {
- var _this4 = this;
-
- var props = this.props;
- this.nextProps = props;
- var stateChildren = this.state.children;
- var children = null;
- if (stateChildren) {
- children = stateChildren.map(function (child) {
- if (child === null || child === undefined) {
- return child;
- }
- if (!child.key) {
- throw new Error('must set key for children');
- }
- return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
- __WEBPACK_IMPORTED_MODULE_9__AnimateChild__["a" /* default */],
- {
- key: child.key,
- ref: function ref(node) {
- _this4.childrenRefs[child.key] = node;
- },
- animation: props.animation,
- transitionName: props.transitionName,
- transitionEnter: props.transitionEnter,
- transitionAppear: props.transitionAppear,
- transitionLeave: props.transitionLeave
- },
- child
- );
- });
- }
- var Component = props.component;
- if (Component) {
- var passedProps = props;
- if (typeof Component === 'string') {
- passedProps = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({
- className: props.className,
- style: props.style
- }, props.componentProps);
- }
- return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
- Component,
- passedProps,
- children
- );
- }
- return children[0] || null;
- }
- }]);
-
- return Animate;
- }(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);
-
- Animate.isAnimate = true;
- Animate.propTypes = {
- component: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.any,
- componentProps: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.object,
- animation: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.object,
- transitionName: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.object]),
- transitionEnter: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,
- transitionAppear: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,
- exclusive: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,
- transitionLeave: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,
- onEnd: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,
- onEnter: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,
- onLeave: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,
- onAppear: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,
- showProp: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,
- children: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.node
- };
- Animate.defaultProps = {
- animation: {},
- component: 'span',
- componentProps: {},
- transitionEnter: true,
- transitionLeave: true,
- transitionAppear: false,
- onEnd: noop,
- onEnter: noop,
- onLeave: noop,
- onAppear: noop
- };
-
- var _initialiseProps = function _initialiseProps() {
- var _this5 = this;
-
- this.performEnter = function (key) {
- // may already remove by exclusive
- if (_this5.childrenRefs[key]) {
- _this5.currentlyAnimatingKeys[key] = true;
- _this5.childrenRefs[key].componentWillEnter(_this5.handleDoneAdding.bind(_this5, key, 'enter'));
- }
- };
-
- this.performAppear = function (key) {
- if (_this5.childrenRefs[key]) {
- _this5.currentlyAnimatingKeys[key] = true;
- _this5.childrenRefs[key].componentWillAppear(_this5.handleDoneAdding.bind(_this5, key, 'appear'));
- }
- };
-
- this.handleDoneAdding = function (key, type) {
- var props = _this5.props;
- delete _this5.currentlyAnimatingKeys[key];
- // if update on exclusive mode, skip check
- if (props.exclusive && props !== _this5.nextProps) {
- return;
- }
- var currentChildren = Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["e" /* toArrayChildren */])(getChildrenFromProps(props));
- if (!_this5.isValidChildByKey(currentChildren, key)) {
- // exclusive will not need this
- _this5.performLeave(key);
- } else if (type === 'appear') {
- if (__WEBPACK_IMPORTED_MODULE_10__util_animate__["a" /* default */].allowAppearCallback(props)) {
- props.onAppear(key);
- props.onEnd(key, true);
- }
- } else if (__WEBPACK_IMPORTED_MODULE_10__util_animate__["a" /* default */].allowEnterCallback(props)) {
- props.onEnter(key);
- props.onEnd(key, true);
- }
- };
-
- this.performLeave = function (key) {
- // may already remove by exclusive
- if (_this5.childrenRefs[key]) {
- _this5.currentlyAnimatingKeys[key] = true;
- _this5.childrenRefs[key].componentWillLeave(_this5.handleDoneLeaving.bind(_this5, key));
- }
- };
-
- this.handleDoneLeaving = function (key) {
- var props = _this5.props;
- delete _this5.currentlyAnimatingKeys[key];
- // if update on exclusive mode, skip check
- if (props.exclusive && props !== _this5.nextProps) {
- return;
- }
- var currentChildren = Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["e" /* toArrayChildren */])(getChildrenFromProps(props));
- // in case state change is too fast
- if (_this5.isValidChildByKey(currentChildren, key)) {
- _this5.performEnter(key);
- } else {
- var end = function end() {
- if (__WEBPACK_IMPORTED_MODULE_10__util_animate__["a" /* default */].allowLeaveCallback(props)) {
- props.onLeave(key);
- props.onEnd(key, false);
- }
- };
- if (!Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["c" /* isSameChildren */])(_this5.state.children, currentChildren, props.showProp)) {
- _this5.setState({
- children: currentChildren
- }, end);
- } else {
- end();
- }
- }
- };
- };
-
- /* harmony default export */ __webpack_exports__["default"] = (Animate);
+ module.exports = __webpack_require__(525);
/***/ }),
/* 26 */
@@ -85593,6 +69568,36 @@
"use strict";
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ exports.create = exports.connect = exports.Provider = undefined;
+
+ var _Provider2 = __webpack_require__(569);
+
+ var _Provider3 = _interopRequireDefault(_Provider2);
+
+ var _connect2 = __webpack_require__(570);
+
+ var _connect3 = _interopRequireDefault(_connect2);
+
+ var _create2 = __webpack_require__(573);
+
+ var _create3 = _interopRequireDefault(_create2);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ exports.Provider = _Provider3.default;
+ exports.connect = _connect3.default;
+ exports.create = _create3.default;
+
+ /***/ }),
+ /* 27 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
Object.defineProperty(exports, "__esModule", {
value: true
});
@@ -85610,7 +69615,7 @@
exports.isAllowedDate = isAllowedDate;
exports.formatDate = formatDate;
- var _moment = __webpack_require__(3);
+ var _moment = __webpack_require__(2);
var _moment2 = _interopRequireDefault(_moment);
@@ -85716,17 +69721,85 @@
}
/***/ }),
- /* 27 */
+ /* 28 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ var global = __webpack_require__(23);
+ var core = __webpack_require__(16);
+ var ctx = __webpack_require__(82);
+ var hide = __webpack_require__(38);
+ var has = __webpack_require__(30);
+ var PROTOTYPE = 'prototype';
+
+ var $export = function (type, name, source) {
+ var IS_FORCED = type & $export.F;
+ var IS_GLOBAL = type & $export.G;
+ var IS_STATIC = type & $export.S;
+ var IS_PROTO = type & $export.P;
+ var IS_BIND = type & $export.B;
+ var IS_WRAP = type & $export.W;
+ var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
+ var expProto = exports[PROTOTYPE];
+ var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];
+ var key, own, out;
+ if (IS_GLOBAL) source = name;
+ for (key in source) {
+ // contains in native
+ own = !IS_FORCED && target && target[key] !== undefined;
+ if (own && has(exports, key)) continue;
+ // export native or passed
+ out = own ? target[key] : source[key];
+ // prevent global pollution for namespaces
+ exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
+ // bind timers to global for call from export context
+ : IS_BIND && own ? ctx(out, global)
+ // wrap global constructors for prevent change them in library
+ : IS_WRAP && target[key] == out ? (function (C) {
+ var F = function (a, b, c) {
+ if (this instanceof C) {
+ switch (arguments.length) {
+ case 0: return new C();
+ case 1: return new C(a);
+ case 2: return new C(a, b);
+ } return new C(a, b, c);
+ } return C.apply(this, arguments);
+ };
+ F[PROTOTYPE] = C[PROTOTYPE];
+ return F;
+ // make static versions for prototype methods
+ })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
+ // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
+ if (IS_PROTO) {
+ (exports.virtual || (exports.virtual = {}))[key] = out;
+ // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
+ if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);
+ }
+ }
+ };
+ // type bitmap
+ $export.F = 1; // forced
+ $export.G = 2; // global
+ $export.S = 4; // static
+ $export.P = 8; // proto
+ $export.B = 16; // bind
+ $export.W = 32; // wrap
+ $export.U = 64; // safe
+ $export.R = 128; // real proto method for `library`
+ module.exports = $export;
+
+
+ /***/ }),
+ /* 29 */
/***/ (function(module, exports, __webpack_require__) {
// Thank's IE8 for his funny defineProperty
- module.exports = !__webpack_require__(41)(function () {
+ module.exports = !__webpack_require__(53)(function () {
return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
});
/***/ }),
- /* 28 */
+ /* 30 */
/***/ (function(module, exports) {
var hasOwnProperty = {}.hasOwnProperty;
@@ -85736,7 +69809,42 @@
/***/ }),
- /* 29 */
+ /* 31 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+ /**
+ * Copyright (c) 2013-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ *
+ */
+
+
+
+ var React = __webpack_require__(0);
+ var factory = __webpack_require__(425);
+
+ if (typeof React === 'undefined') {
+ throw Error(
+ 'create-react-class could not find the React object. If you are using script tags, ' +
+ 'make sure that React is being loaded before create-react-class.'
+ );
+ }
+
+ // Hack to grab NoopUpdateQueue from isomorphic React
+ var ReactNoopUpdateQueue = new React.Component().updater;
+
+ module.exports = factory(
+ React.Component,
+ React.isValidElement,
+ ReactNoopUpdateQueue
+ );
+
+
+ /***/ }),
+ /* 32 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -85744,11 +69852,11 @@
exports.__esModule = true;
- var _iterator = __webpack_require__(489);
+ var _iterator = __webpack_require__(431);
var _iterator2 = _interopRequireDefault(_iterator);
- var _symbol = __webpack_require__(495);
+ var _symbol = __webpack_require__(437);
var _symbol2 = _interopRequireDefault(_symbol);
@@ -85763,11 +69871,11 @@
};
/***/ }),
- /* 30 */
+ /* 33 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__propertyUtils__ = __webpack_require__(615);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__propertyUtils__ = __webpack_require__(552);
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
@@ -86353,7 +70461,2950 @@
/* harmony default export */ __webpack_exports__["a"] = (utils);
/***/ }),
- /* 31 */
+ /* 34 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ exports.__esModule = true;
+ exports.default = void 0;
+
+ var _default = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
+
+ exports.default = _default;
+ module.exports = exports["default"];
+
+ /***/ }),
+ /* 35 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ var _interopRequireDefault = __webpack_require__(11);
+
+ exports.__esModule = true;
+ exports.default = style;
+
+ var _camelizeStyle = _interopRequireDefault(__webpack_require__(183));
+
+ var _hyphenateStyle = _interopRequireDefault(__webpack_require__(633));
+
+ var _getComputedStyle2 = _interopRequireDefault(__webpack_require__(635));
+
+ var _removeStyle = _interopRequireDefault(__webpack_require__(636));
+
+ var _properties = __webpack_require__(58);
+
+ var _isTransform = _interopRequireDefault(__webpack_require__(637));
+
+ function style(node, property, value) {
+ var css = '';
+ var transforms = '';
+ var props = property;
+
+ if (typeof property === 'string') {
+ if (value === undefined) {
+ return node.style[(0, _camelizeStyle.default)(property)] || (0, _getComputedStyle2.default)(node).getPropertyValue((0, _hyphenateStyle.default)(property));
+ } else {
+ (props = {})[property] = value;
+ }
+ }
+
+ Object.keys(props).forEach(function (key) {
+ var value = props[key];
+
+ if (!value && value !== 0) {
+ (0, _removeStyle.default)(node, (0, _hyphenateStyle.default)(key));
+ } else if ((0, _isTransform.default)(key)) {
+ transforms += key + "(" + value + ") ";
+ } else {
+ css += (0, _hyphenateStyle.default)(key) + ": " + value + ";";
+ }
+ });
+
+ if (transforms) {
+ css += _properties.transform + ": " + transforms + ";";
+ }
+
+ node.style.cssText += ';' + css;
+ }
+
+ module.exports = exports["default"];
+
+ /***/ }),
+ /* 36 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ exports.default = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
+ module.exports = exports['default'];
+
+ /***/ }),
+ /* 37 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ exports.default = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
+ module.exports = exports['default'];
+
+ /***/ }),
+ /* 38 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ var dP = __webpack_require__(24);
+ var createDesc = __webpack_require__(54);
+ module.exports = __webpack_require__(29) ? function (object, key, value) {
+ return dP.f(object, key, createDesc(1, value));
+ } : function (object, key, value) {
+ object[key] = value;
+ return object;
+ };
+
+
+ /***/ }),
+ /* 39 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ var isObject = __webpack_require__(40);
+ module.exports = function (it) {
+ if (!isObject(it)) throw TypeError(it + ' is not an object!');
+ return it;
+ };
+
+
+ /***/ }),
+ /* 40 */
+ /***/ (function(module, exports) {
+
+ module.exports = function (it) {
+ return typeof it === 'object' ? it !== null : typeof it === 'function';
+ };
+
+
+ /***/ }),
+ /* 41 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ // to indexed object, toObject with fallback for non-array-like ES3 strings
+ var IObject = __webpack_require__(133);
+ var defined = __webpack_require__(85);
+ module.exports = function (it) {
+ return IObject(defined(it));
+ };
+
+
+ /***/ }),
+ /* 42 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+ /*
+ object-assign
+ (c) Sindre Sorhus
+ @license MIT
+ */
+
+
+ /* eslint-disable no-unused-vars */
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
+ var propIsEnumerable = Object.prototype.propertyIsEnumerable;
+
+ function toObject(val) {
+ if (val === null || val === undefined) {
+ throw new TypeError('Object.assign cannot be called with null or undefined');
+ }
+
+ return Object(val);
+ }
+
+ function shouldUseNative() {
+ try {
+ if (!Object.assign) {
+ return false;
+ }
+
+ // Detect buggy property enumeration order in older V8 versions.
+
+ // https://bugs.chromium.org/p/v8/issues/detail?id=4118
+ var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
+ test1[5] = 'de';
+ if (Object.getOwnPropertyNames(test1)[0] === '5') {
+ return false;
+ }
+
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
+ var test2 = {};
+ for (var i = 0; i < 10; i++) {
+ test2['_' + String.fromCharCode(i)] = i;
+ }
+ var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
+ return test2[n];
+ });
+ if (order2.join('') !== '0123456789') {
+ return false;
+ }
+
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
+ var test3 = {};
+ 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
+ test3[letter] = letter;
+ });
+ if (Object.keys(Object.assign({}, test3)).join('') !==
+ 'abcdefghijklmnopqrst') {
+ return false;
+ }
+
+ return true;
+ } catch (err) {
+ // We don't expect any of the above to throw, but better to be safe.
+ return false;
+ }
+ }
+
+ module.exports = shouldUseNative() ? Object.assign : function (target, source) {
+ var from;
+ var to = toObject(target);
+ var symbols;
+
+ for (var s = 1; s < arguments.length; s++) {
+ from = Object(arguments[s]);
+
+ for (var key in from) {
+ if (hasOwnProperty.call(from, key)) {
+ to[key] = from[key];
+ }
+ }
+
+ if (getOwnPropertySymbols) {
+ symbols = getOwnPropertySymbols(from);
+ for (var i = 0; i < symbols.length; i++) {
+ if (propIsEnumerable.call(from, symbols[i])) {
+ to[symbols[i]] = from[symbols[i]];
+ }
+ }
+ }
+ }
+
+ return to;
+ };
+
+
+ /***/ }),
+ /* 43 */
+ /***/ (function(module, exports) {
+
+ var g;
+
+ // This works in non-strict mode
+ g = (function() {
+ return this;
+ })();
+
+ try {
+ // This works if eval is allowed (see CSP)
+ g = g || Function("return this")() || (1,eval)("this");
+ } catch(e) {
+ // This works if the window reference is available
+ if(typeof window === "object")
+ g = window;
+ }
+
+ // g can still be undefined, but nothing to do about it...
+ // We return undefined, instead of nothing here, so it's
+ // easier to handle this case. if(!global) { ...}
+
+ module.exports = g;
+
+
+ /***/ }),
+ /* 44 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ exports.__esModule = true;
+ /**
+ * This source code is quoted from rc-util.
+ * homepage: https://github.com/react-component/util
+ */
+ function createChainedFunction() {
+ for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {
+ funcs[_key] = arguments[_key];
+ }
+
+ return funcs.filter(function (f) {
+ return f != null;
+ }).reduce(function (acc, f) {
+ if (typeof f !== 'function') {
+ throw new Error('Invalid Argument Type, must only provide functions, undefined, or null.');
+ }
+
+ if (acc === null) {
+ return f;
+ }
+
+ return function chainedFunction() {
+ for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
+ args[_key2] = arguments[_key2];
+ }
+
+ acc.apply(this, args);
+ f.apply(this, args);
+ };
+ }, null);
+ }
+ exports.default = createChainedFunction;
+
+ /***/ }),
+ /* 45 */
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+ "use strict";
+ /* harmony export (immutable) */ __webpack_exports__["h"] = noop;
+ /* harmony export (immutable) */ __webpack_exports__["a"] = getKeyFromChildrenIndex;
+ /* harmony export (immutable) */ __webpack_exports__["b"] = getMenuIdFromSubMenuEventKey;
+ /* harmony export (immutable) */ __webpack_exports__["e"] = loopMenuItem;
+ /* harmony export (immutable) */ __webpack_exports__["f"] = loopMenuItemRecursively;
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return menuAllProps; });
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getWidth; });
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return setStyle; });
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return isMobileDevice; });
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
+
+ var isMobile = __webpack_require__(575);
+
+ function noop() {}
+
+ function getKeyFromChildrenIndex(child, menuEventKey, index) {
+ var prefix = menuEventKey || '';
+ return child.key || prefix + 'item_' + index;
+ }
+
+ function getMenuIdFromSubMenuEventKey(eventKey) {
+ return eventKey + '-menu-';
+ }
+
+ function loopMenuItem(children, cb) {
+ var index = -1;
+ __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (c) {
+ index++;
+ if (c && c.type && c.type.isMenuItemGroup) {
+ __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(c.props.children, function (c2) {
+ index++;
+ cb(c2, index);
+ });
+ } else {
+ cb(c, index);
+ }
+ });
+ }
+
+ function loopMenuItemRecursively(children, keys, ret) {
+ /* istanbul ignore if */
+ if (!children || ret.find) {
+ return;
+ }
+ __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (c) {
+ if (c) {
+ var construct = c.type;
+ if (!construct || !(construct.isSubMenu || construct.isMenuItem || construct.isMenuItemGroup)) {
+ return;
+ }
+ if (keys.indexOf(c.key) !== -1) {
+ ret.find = true;
+ } else if (c.props.children) {
+ loopMenuItemRecursively(c.props.children, keys, ret);
+ }
+ }
+ });
+ }
+
+ var menuAllProps = ['defaultSelectedKeys', 'selectedKeys', 'defaultOpenKeys', 'openKeys', 'mode', 'getPopupContainer', 'onSelect', 'onDeselect', 'onDestroy', 'openTransitionName', 'openAnimation', 'subMenuOpenDelay', 'subMenuCloseDelay', 'forceSubMenuRender', 'triggerSubMenuAction', 'level', 'selectable', 'multiple', 'onOpenChange', 'visible', 'focusable', 'defaultActiveFirst', 'prefixCls', 'inlineIndent', 'parentMenu', 'title', 'rootPrefixCls', 'eventKey', 'active', 'onItemHover', 'onTitleMouseEnter', 'onTitleMouseLeave', 'onTitleClick', 'popupAlign', 'popupOffset', 'isOpen', 'renderMenuItem', 'manualRef', 'subMenuKey', 'disabled', 'index', 'isSelected', 'store', 'activeKey', 'builtinPlacements', 'overflowedIndicator',
+
+ // the following keys found need to be removed from test regression
+ 'attribute', 'value', 'popupClassName', 'inlineCollapsed', 'menu', 'theme', 'itemIcon', 'expandIcon'];
+
+ // ref: https://github.com/ant-design/ant-design/issues/14007
+ // ref: https://bugs.chromium.org/p/chromium/issues/detail?id=360889
+ // getBoundingClientRect return the full precision value, which is
+ // not the same behavior as on chrome. Set the precision to 6 to
+ // unify their behavior
+ var getWidth = function getWidth(elem) {
+ var width = elem && typeof elem.getBoundingClientRect === 'function' && elem.getBoundingClientRect().width;
+ if (width) {
+ width = +width.toFixed(6);
+ }
+ return width || 0;
+ };
+
+ var setStyle = function setStyle(elem, styleProperty, value) {
+ if (elem && typeof elem.style === 'object') {
+ elem.style[styleProperty] = value;
+ }
+ };
+
+ var isMobileDevice = function isMobileDevice() {
+ return isMobile.any;
+ };
+
+ /***/ }),
+ /* 46 */
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+ "use strict";
+ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(9);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__ = __webpack_require__(81);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty__);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__ = __webpack_require__(6);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck__);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass__ = __webpack_require__(21);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass__);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(7);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn__);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__ = __webpack_require__(8);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits__);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(0);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types__ = __webpack_require__(1);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_prop_types__);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__ = __webpack_require__(581);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__AnimateChild__ = __webpack_require__(582);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10__util_animate__ = __webpack_require__(172);
+
+
+
+
+
+
+
+
+
+
+
+
+ var defaultKey = 'rc_animate_' + Date.now();
+
+ function getChildrenFromProps(props) {
+ var children = props.children;
+ if (__WEBPACK_IMPORTED_MODULE_6_react___default.a.isValidElement(children)) {
+ if (!children.key) {
+ return __WEBPACK_IMPORTED_MODULE_6_react___default.a.cloneElement(children, {
+ key: defaultKey
+ });
+ }
+ }
+ return children;
+ }
+
+ function noop() {}
+
+ var Animate = function (_React$Component) {
+ __WEBPACK_IMPORTED_MODULE_5_babel_runtime_helpers_inherits___default()(Animate, _React$Component);
+
+ // eslint-disable-line
+
+ function Animate(props) {
+ __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_classCallCheck___default()(this, Animate);
+
+ var _this = __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_possibleConstructorReturn___default()(this, (Animate.__proto__ || Object.getPrototypeOf(Animate)).call(this, props));
+
+ _initialiseProps.call(_this);
+
+ _this.currentlyAnimatingKeys = {};
+ _this.keysToEnter = [];
+ _this.keysToLeave = [];
+
+ _this.state = {
+ children: Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["e" /* toArrayChildren */])(getChildrenFromProps(props))
+ };
+
+ _this.childrenRefs = {};
+ return _this;
+ }
+
+ __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_createClass___default()(Animate, [{
+ key: 'componentDidMount',
+ value: function componentDidMount() {
+ var _this2 = this;
+
+ var showProp = this.props.showProp;
+ var children = this.state.children;
+ if (showProp) {
+ children = children.filter(function (child) {
+ return !!child.props[showProp];
+ });
+ }
+ children.forEach(function (child) {
+ if (child) {
+ _this2.performAppear(child.key);
+ }
+ });
+ }
+ }, {
+ key: 'componentWillReceiveProps',
+ value: function componentWillReceiveProps(nextProps) {
+ var _this3 = this;
+
+ this.nextProps = nextProps;
+ var nextChildren = Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["e" /* toArrayChildren */])(getChildrenFromProps(nextProps));
+ var props = this.props;
+ // exclusive needs immediate response
+ if (props.exclusive) {
+ Object.keys(this.currentlyAnimatingKeys).forEach(function (key) {
+ _this3.stop(key);
+ });
+ }
+ var showProp = props.showProp;
+ var currentlyAnimatingKeys = this.currentlyAnimatingKeys;
+ // last props children if exclusive
+ var currentChildren = props.exclusive ? Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["e" /* toArrayChildren */])(getChildrenFromProps(props)) : this.state.children;
+ // in case destroy in showProp mode
+ var newChildren = [];
+ if (showProp) {
+ currentChildren.forEach(function (currentChild) {
+ var nextChild = currentChild && Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["a" /* findChildInChildrenByKey */])(nextChildren, currentChild.key);
+ var newChild = void 0;
+ if ((!nextChild || !nextChild.props[showProp]) && currentChild.props[showProp]) {
+ newChild = __WEBPACK_IMPORTED_MODULE_6_react___default.a.cloneElement(nextChild || currentChild, __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_defineProperty___default()({}, showProp, true));
+ } else {
+ newChild = nextChild;
+ }
+ if (newChild) {
+ newChildren.push(newChild);
+ }
+ });
+ nextChildren.forEach(function (nextChild) {
+ if (!nextChild || !Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["a" /* findChildInChildrenByKey */])(currentChildren, nextChild.key)) {
+ newChildren.push(nextChild);
+ }
+ });
+ } else {
+ newChildren = Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["d" /* mergeChildren */])(currentChildren, nextChildren);
+ }
+
+ // need render to avoid update
+ this.setState({
+ children: newChildren
+ });
+
+ nextChildren.forEach(function (child) {
+ var key = child && child.key;
+ if (child && currentlyAnimatingKeys[key]) {
+ return;
+ }
+ var hasPrev = child && Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["a" /* findChildInChildrenByKey */])(currentChildren, key);
+ if (showProp) {
+ var showInNext = child.props[showProp];
+ if (hasPrev) {
+ var showInNow = Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["b" /* findShownChildInChildrenByKey */])(currentChildren, key, showProp);
+ if (!showInNow && showInNext) {
+ _this3.keysToEnter.push(key);
+ }
+ } else if (showInNext) {
+ _this3.keysToEnter.push(key);
+ }
+ } else if (!hasPrev) {
+ _this3.keysToEnter.push(key);
+ }
+ });
+
+ currentChildren.forEach(function (child) {
+ var key = child && child.key;
+ if (child && currentlyAnimatingKeys[key]) {
+ return;
+ }
+ var hasNext = child && Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["a" /* findChildInChildrenByKey */])(nextChildren, key);
+ if (showProp) {
+ var showInNow = child.props[showProp];
+ if (hasNext) {
+ var showInNext = Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["b" /* findShownChildInChildrenByKey */])(nextChildren, key, showProp);
+ if (!showInNext && showInNow) {
+ _this3.keysToLeave.push(key);
+ }
+ } else if (showInNow) {
+ _this3.keysToLeave.push(key);
+ }
+ } else if (!hasNext) {
+ _this3.keysToLeave.push(key);
+ }
+ });
+ }
+ }, {
+ key: 'componentDidUpdate',
+ value: function componentDidUpdate() {
+ var keysToEnter = this.keysToEnter;
+ this.keysToEnter = [];
+ keysToEnter.forEach(this.performEnter);
+ var keysToLeave = this.keysToLeave;
+ this.keysToLeave = [];
+ keysToLeave.forEach(this.performLeave);
+ }
+ }, {
+ key: 'isValidChildByKey',
+ value: function isValidChildByKey(currentChildren, key) {
+ var showProp = this.props.showProp;
+ if (showProp) {
+ return Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["b" /* findShownChildInChildrenByKey */])(currentChildren, key, showProp);
+ }
+ return Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["a" /* findChildInChildrenByKey */])(currentChildren, key);
+ }
+ }, {
+ key: 'stop',
+ value: function stop(key) {
+ delete this.currentlyAnimatingKeys[key];
+ var component = this.childrenRefs[key];
+ if (component) {
+ component.stop();
+ }
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var _this4 = this;
+
+ var props = this.props;
+ this.nextProps = props;
+ var stateChildren = this.state.children;
+ var children = null;
+ if (stateChildren) {
+ children = stateChildren.map(function (child) {
+ if (child === null || child === undefined) {
+ return child;
+ }
+ if (!child.key) {
+ throw new Error('must set key for children');
+ }
+ return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
+ __WEBPACK_IMPORTED_MODULE_9__AnimateChild__["a" /* default */],
+ {
+ key: child.key,
+ ref: function ref(node) {
+ _this4.childrenRefs[child.key] = node;
+ },
+ animation: props.animation,
+ transitionName: props.transitionName,
+ transitionEnter: props.transitionEnter,
+ transitionAppear: props.transitionAppear,
+ transitionLeave: props.transitionLeave
+ },
+ child
+ );
+ });
+ }
+ var Component = props.component;
+ if (Component) {
+ var passedProps = props;
+ if (typeof Component === 'string') {
+ passedProps = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({
+ className: props.className,
+ style: props.style
+ }, props.componentProps);
+ }
+ return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(
+ Component,
+ passedProps,
+ children
+ );
+ }
+ return children[0] || null;
+ }
+ }]);
+
+ return Animate;
+ }(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Component);
+
+ Animate.isAnimate = true;
+ Animate.propTypes = {
+ component: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.any,
+ componentProps: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.object,
+ animation: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.object,
+ transitionName: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.object]),
+ transitionEnter: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,
+ transitionAppear: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,
+ exclusive: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,
+ transitionLeave: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.bool,
+ onEnd: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,
+ onEnter: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,
+ onLeave: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,
+ onAppear: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.func,
+ showProp: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.string,
+ children: __WEBPACK_IMPORTED_MODULE_7_prop_types___default.a.node
+ };
+ Animate.defaultProps = {
+ animation: {},
+ component: 'span',
+ componentProps: {},
+ transitionEnter: true,
+ transitionLeave: true,
+ transitionAppear: false,
+ onEnd: noop,
+ onEnter: noop,
+ onLeave: noop,
+ onAppear: noop
+ };
+
+ var _initialiseProps = function _initialiseProps() {
+ var _this5 = this;
+
+ this.performEnter = function (key) {
+ // may already remove by exclusive
+ if (_this5.childrenRefs[key]) {
+ _this5.currentlyAnimatingKeys[key] = true;
+ _this5.childrenRefs[key].componentWillEnter(_this5.handleDoneAdding.bind(_this5, key, 'enter'));
+ }
+ };
+
+ this.performAppear = function (key) {
+ if (_this5.childrenRefs[key]) {
+ _this5.currentlyAnimatingKeys[key] = true;
+ _this5.childrenRefs[key].componentWillAppear(_this5.handleDoneAdding.bind(_this5, key, 'appear'));
+ }
+ };
+
+ this.handleDoneAdding = function (key, type) {
+ var props = _this5.props;
+ delete _this5.currentlyAnimatingKeys[key];
+ // if update on exclusive mode, skip check
+ if (props.exclusive && props !== _this5.nextProps) {
+ return;
+ }
+ var currentChildren = Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["e" /* toArrayChildren */])(getChildrenFromProps(props));
+ if (!_this5.isValidChildByKey(currentChildren, key)) {
+ // exclusive will not need this
+ _this5.performLeave(key);
+ } else if (type === 'appear') {
+ if (__WEBPACK_IMPORTED_MODULE_10__util_animate__["a" /* default */].allowAppearCallback(props)) {
+ props.onAppear(key);
+ props.onEnd(key, true);
+ }
+ } else if (__WEBPACK_IMPORTED_MODULE_10__util_animate__["a" /* default */].allowEnterCallback(props)) {
+ props.onEnter(key);
+ props.onEnd(key, true);
+ }
+ };
+
+ this.performLeave = function (key) {
+ // may already remove by exclusive
+ if (_this5.childrenRefs[key]) {
+ _this5.currentlyAnimatingKeys[key] = true;
+ _this5.childrenRefs[key].componentWillLeave(_this5.handleDoneLeaving.bind(_this5, key));
+ }
+ };
+
+ this.handleDoneLeaving = function (key) {
+ var props = _this5.props;
+ delete _this5.currentlyAnimatingKeys[key];
+ // if update on exclusive mode, skip check
+ if (props.exclusive && props !== _this5.nextProps) {
+ return;
+ }
+ var currentChildren = Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["e" /* toArrayChildren */])(getChildrenFromProps(props));
+ // in case state change is too fast
+ if (_this5.isValidChildByKey(currentChildren, key)) {
+ _this5.performEnter(key);
+ } else {
+ var end = function end() {
+ if (__WEBPACK_IMPORTED_MODULE_10__util_animate__["a" /* default */].allowLeaveCallback(props)) {
+ props.onLeave(key);
+ props.onEnd(key, false);
+ }
+ };
+ if (!Object(__WEBPACK_IMPORTED_MODULE_8__ChildrenUtils__["c" /* isSameChildren */])(_this5.state.children, currentChildren, props.showProp)) {
+ _this5.setState({
+ children: currentChildren
+ }, end);
+ } else {
+ end();
+ }
+ }
+ };
+ };
+
+ /* harmony default export */ __webpack_exports__["default"] = (Animate);
+
+ /***/ }),
+ /* 47 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ var _interopRequireDefault = __webpack_require__(11);
+
+ exports.__esModule = true;
+ exports.default = void 0;
+
+ var _inDOM = _interopRequireDefault(__webpack_require__(34));
+
+ var _default = function () {
+ // HTML DOM and SVG DOM may have different support levels,
+ // so we need to check on context instead of a document root element.
+ return _inDOM.default ? function (context, node) {
+ if (context.contains) {
+ return context.contains(node);
+ } else if (context.compareDocumentPosition) {
+ return context === node || !!(context.compareDocumentPosition(node) & 16);
+ } else {
+ return fallback(context, node);
+ }
+ } : fallback;
+ }();
+
+ exports.default = _default;
+
+ function fallback(context, node) {
+ if (node) do {
+ if (node === context) return true;
+ } while (node = node.parentNode);
+ return false;
+ }
+
+ module.exports = exports["default"];
+
+ /***/ }),
+ /* 48 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _react = __webpack_require__(0);
+
+ var _react2 = _interopRequireDefault(_react);
+
+ var _reactDom = __webpack_require__(4);
+
+ var _reactDom2 = _interopRequireDefault(_reactDom);
+
+ var _propTypes = __webpack_require__(1);
+
+ var _propTypes2 = _interopRequireDefault(_propTypes);
+
+ var _ownerDocument = __webpack_require__(49);
+
+ var _ownerDocument2 = _interopRequireDefault(_ownerDocument);
+
+ var _getContainer = __webpack_require__(112);
+
+ var _getContainer2 = _interopRequireDefault(_getContainer);
+
+ var _tinperBeeCore = __webpack_require__(5);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+ function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
+
+ var isReact16 = _reactDom2["default"].createPortal !== undefined;
+ var createPortal = isReact16 ? _reactDom2["default"].createPortal : _reactDom2["default"].unstable_renderSubtreeIntoContainer;
+
+ var propTypes = {
+ /**
+ * 存放子组件的容器
+ */
+ container: _propTypes2["default"].oneOfType([_tinperBeeCore.componentOrElement, _propTypes2["default"].func])
+ };
+
+ var defaultProps = {};
+
+ /**
+ * Portal组件是将子组件渲染
+ */
+
+ var Portal = function (_Component) {
+ _inherits(Portal, _Component);
+
+ function Portal(props) {
+ _classCallCheck(this, Portal);
+
+ var _this = _possibleConstructorReturn(this, _Component.call(this, props));
+
+ _this.getMountNode = _this.getMountNode.bind(_this);
+ _this.getOverlayDOMNode = _this.getOverlayDOMNode.bind(_this);
+ _this.mountOverlayTarget = _this.mountOverlayTarget.bind(_this);
+ _this.unmountOverlayTarget = _this.unmountOverlayTarget.bind(_this);
+ _this.renderOverlay = _this.renderOverlay.bind(_this);
+ _this.unrenderOverlay = _this.unrenderOverlay.bind(_this);
+
+ _this.overlayTarget = isReact16 ? document.createElement('div') : null;
+ return _this;
+ }
+
+ Portal.prototype.componentDidMount = function componentDidMount() {
+ if (isReact16) {
+ this.portalContainerNode = (0, _getContainer2["default"])(this.props.container, (0, _ownerDocument2["default"])(this).body);
+ this.portalContainerNode.appendChild(this.overlayTarget);
+ } else {
+ this.renderOverlay();
+ }
+
+ this.mounted = true;
+ };
+
+ Portal.prototype.componentDidUpdate = function componentDidUpdate() {
+ if (isReact16) {
+ var overlay = !this.props.children ? null : _react2["default"].Children.only(this.props.children);
+ if (overlay === null) {
+ this.unrenderOverlay();
+ this.unmountOverlayTarget();
+ } else {}
+ } else {
+ this.renderOverlay();
+ }
+ };
+ //this._overlayTarget为当前的要添加的子组件, this._portalContainerNode要添加组件的容器元素
+
+
+ Portal.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
+ if (this.overlayTarget && nextProps.container !== this.props.container) {
+ this.portalContainerNode.removeChild(this.overlayTarget);
+ this.portalContainerNode = (0, _getContainer2["default"])(nextProps.container, (0, _ownerDocument2["default"])(this).body);
+ this.portalContainerNode.appendChild(this.overlayTarget);
+ }
+ };
+
+ Portal.prototype.componentWillUnmount = function componentWillUnmount() {
+ this.unrenderOverlay();
+ this.unmountOverlayTarget();
+
+ this.mounted = false;
+ };
+
+ Portal.prototype.getMountNode = function getMountNode() {
+ return this.overlayTarget;
+ };
+
+ Portal.prototype.getOverlayDOMNode = function getOverlayDOMNode() {
+ if (!this.mounted) {
+ throw new Error('getOverlayDOMNode(): A component must be mounted to have a DOM node.');
+ }
+
+ if (this.overlayInstance) {
+ return _reactDom2["default"].findDOMNode(this.overlayInstance);
+ }
+
+ return null;
+ };
+
+ /**
+ * 如果要添加的子组件不存在,就将div添加到要添加容器的DOM中;
+ */
+
+ Portal.prototype.mountOverlayTarget = function mountOverlayTarget() {
+ if (!this.overlayTarget) {
+ this.overlayTarget = document.createElement('div');
+ this.portalContainerNode = (0, _getContainer2["default"])(this.props.container, (0, _ownerDocument2["default"])(this).body);
+ this.portalContainerNode.appendChild(this.overlayTarget);
+ }
+ };
+ /**
+ * 将要添加的子元素从容器中移除,并把变量置为null
+ */
+
+
+ Portal.prototype.unmountOverlayTarget = function unmountOverlayTarget() {
+ if (this.overlayTarget) {
+ this.portalContainerNode.removeChild(this.overlayTarget);
+ this.overlayTarget = null;
+ }
+ this.portalContainerNode = null;
+ };
+ /**
+ * 手动渲染_overlayTarget
+ */
+
+
+ Portal.prototype.renderOverlay = function renderOverlay() {
+
+ var overlay = !this.props.children ? null : _react2["default"].Children.only(this.props.children);
+
+ // Save reference for future access.
+ if (overlay !== null) {
+ this.mountOverlayTarget();
+ this.overlayInstance = _reactDom2["default"].unstable_renderSubtreeIntoContainer(this, overlay, this.overlayTarget);
+ } else {
+ // Unrender if the component is null for transitions to null
+ this.unrenderOverlay();
+ this.unmountOverlayTarget();
+ }
+ };
+ /**
+ * 销毁_overlayTarget组件。并把_overlayInstance置为null
+ */
+
+
+ Portal.prototype.unrenderOverlay = function unrenderOverlay() {
+ if (this.overlayTarget) {
+ !isReact16 && _reactDom2["default"].unmountComponentAtNode(this.overlayTarget);
+ this.overlayInstance = null;
+ }
+ };
+
+ Portal.prototype.render = function render() {
+ if (!isReact16) {
+ return null;
+ }
+
+ var overlay = !this.props.children ? null : _react2["default"].Children.only(this.props.children);
+
+ return _reactDom2["default"].createPortal(overlay, this.overlayTarget);
+ };
+
+ return Portal;
+ }(_react.Component);
+
+ ;
+
+ Portal.propTypes = propTypes;
+ Portal.defaultProps = defaultProps;
+
+ exports["default"] = Portal;
+ module.exports = exports['default'];
+
+ /***/ }),
+ /* 49 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ exports["default"] = function (componentOrElement) {
+ return (0, _ownerDocument2["default"])(_reactDom2["default"].findDOMNode(componentOrElement));
+ };
+
+ var _reactDom = __webpack_require__(4);
+
+ var _reactDom2 = _interopRequireDefault(_reactDom);
+
+ var _ownerDocument = __webpack_require__(50);
+
+ var _ownerDocument2 = _interopRequireDefault(_ownerDocument);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+ module.exports = exports['default'];
+
+ /***/ }),
+ /* 50 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ exports.__esModule = true;
+ exports.default = ownerDocument;
+
+ function ownerDocument(node) {
+ return node && node.ownerDocument || document;
+ }
+
+ module.exports = exports["default"];
+
+ /***/ }),
+ /* 51 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
+ Copyright (c) 2017 Jed Watson.
+ Licensed under the MIT License (MIT), see
+ http://jedwatson.github.io/classnames
+ */
+ /* global define */
+
+ (function () {
+ 'use strict';
+
+ var hasOwn = {}.hasOwnProperty;
+
+ function classNames () {
+ var classes = [];
+
+ for (var i = 0; i < arguments.length; i++) {
+ var arg = arguments[i];
+ if (!arg) continue;
+
+ var argType = typeof arg;
+
+ if (argType === 'string' || argType === 'number') {
+ classes.push(arg);
+ } else if (Array.isArray(arg) && arg.length) {
+ var inner = classNames.apply(null, arg);
+ if (inner) {
+ classes.push(inner);
+ }
+ } else if (argType === 'object') {
+ for (var key in arg) {
+ if (hasOwn.call(arg, key) && arg[key]) {
+ classes.push(key);
+ }
+ }
+ }
+ }
+
+ return classes.join(' ');
+ }
+
+ if (typeof module !== 'undefined' && module.exports) {
+ classNames.default = classNames;
+ module.exports = classNames;
+ } else if (true) {
+ // register as 'classnames', consistent with npm package name
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
+ return classNames;
+ }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
+ __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
+ } else {
+ window.classNames = classNames;
+ }
+ }());
+
+
+ /***/ }),
+ /* 52 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ exports.setStyle = exports.getWidth = exports.menuAllProps = undefined;
+
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; /**
+ * This source code is quoted from rc-menu.
+ * homepage: https://github.com/react-component/menu
+ */
+
+
+ exports.noop = noop;
+ exports.getKeyFromChildrenIndex = getKeyFromChildrenIndex;
+ exports.getMenuIdFromSubMenuEventKey = getMenuIdFromSubMenuEventKey;
+ exports.loopMenuItem = loopMenuItem;
+ exports.loopMenuItemRecursively = loopMenuItemRecursively;
+ exports.fireKeyEvent = fireKeyEvent;
+
+ var _react = __webpack_require__(0);
+
+ var _react2 = _interopRequireDefault(_react);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+ function noop() {}
+
+ function getKeyFromChildrenIndex(child, menuEventKey, index) {
+ var prefix = menuEventKey || '';
+ return child.key || prefix + 'item_' + index;
+ }
+
+ function getMenuIdFromSubMenuEventKey(eventKey) {
+ return eventKey + '-menu-';
+ }
+
+ function loopMenuItem(children, cb) {
+ var index = -1;
+ _react2["default"].Children.forEach(children, function (c) {
+ index++;
+ if (c && c.type && c.type.isMenuItemGroup) {
+ _react2["default"].Children.forEach(c.props.children, function (c2) {
+ index++;
+ cb(c2, index);
+ });
+ } else {
+ cb(c, index);
+ }
+ });
+ }
+
+ function loopMenuItemRecursively(children, keys, ret) {
+ /* istanbul ignore if */
+ if (!children || ret.find) {
+ return;
+ }
+ _react2["default"].Children.forEach(children, function (c) {
+ if (c) {
+ var construct = c.type;
+ if (!construct || !(construct.isSubMenu || construct.isMenuItem || construct.isMenuItemGroup)) {
+ return;
+ }
+ if (keys.indexOf(c.key) !== -1) {
+ ret.find = true;
+ } else if (c.props.children) {
+ loopMenuItemRecursively(c.props.children, keys, ret);
+ }
+ }
+ });
+ }
+
+ var menuAllProps = exports.menuAllProps = ['defaultSelectedKeys', 'selectedKeys', 'defaultOpenKeys', 'openKeys', 'mode', 'getPopupContainer', 'onSelect', 'onDeselect', 'onDestroy', 'openTransitionName', 'openAnimation', 'subMenuOpenDelay', 'subMenuCloseDelay', 'forceSubMenuRender', 'triggerSubMenuAction', 'level', 'selectable', 'multiple', 'onOpenChange', 'visible', 'focusable', 'defaultActiveFirst', 'prefixCls', 'inlineIndent', 'parentMenu', 'title', 'rootPrefixCls', 'eventKey', 'active', 'onItemHover', 'onTitleMouseEnter', 'onTitleMouseLeave', 'onTitleClick', 'popupAlign', 'popupOffset', 'isOpen', 'renderMenuItem', 'manualRef', 'subMenuKey', 'disabled', 'index', 'isSelected', 'store', 'activeKey', 'builtinPlacements', 'overflowedIndicator',
+
+ // the following keys found need to be removed from test regression
+ 'attribute', 'value', 'popupClassName', 'inlineCollapsed', 'menu', 'theme', 'itemIcon', 'expandIcon'];
+
+ var getWidth = exports.getWidth = function getWidth(elem) {
+ return elem && typeof elem.getBoundingClientRect === 'function' && elem.getBoundingClientRect().width || 0;
+ };
+
+ var setStyle = exports.setStyle = function setStyle(elem, styleProperty, value) {
+ if (elem && _typeof(elem.style) === 'object') {
+ elem.style[styleProperty] = value;
+ }
+ };
+
+ function fireKeyEvent(el, evtType, keyCode) {
+ var evtObj;
+ if (document.createEvent) {
+ if (window.KeyEvent) {
+ //firefox 浏览器下模拟事件
+ evtObj = document.createEvent('KeyEvents');
+ evtObj.initKeyEvent(evtType, true, true, window, true, false, false, false, keyCode, 0);
+ } else {
+ //chrome 浏览器下模拟事件
+ evtObj = document.createEvent('UIEvents');
+ evtObj.initUIEvent(evtType, true, true, window, 1);
+
+ delete evtObj.keyCode;
+ if (typeof evtObj.keyCode === "undefined") {
+ //为了模拟keycode
+ Object.defineProperty(evtObj, "keyCode", { value: keyCode });
+ } else {
+ evtObj.key = String.fromCharCode(keyCode);
+ }
+
+ if (typeof evtObj.ctrlKey === 'undefined') {
+ //为了模拟ctrl键
+ Object.defineProperty(evtObj, "ctrlKey", { value: true });
+ } else {
+ evtObj.ctrlKey = true;
+ }
+ }
+ el.dispatchEvent(evtObj);
+ } else if (document.createEventObject) {
+ //IE 浏览器下模拟事件
+ evtObj = document.createEventObject();
+ evtObj.keyCode = keyCode;
+ el.fireEvent('on' + evtType, evtObj);
+ }
+ }
+
+ /***/ }),
+ /* 53 */
+ /***/ (function(module, exports) {
+
+ module.exports = function (exec) {
+ try {
+ return !!exec();
+ } catch (e) {
+ return true;
+ }
+ };
+
+
+ /***/ }),
+ /* 54 */
+ /***/ (function(module, exports) {
+
+ module.exports = function (bitmap, value) {
+ return {
+ enumerable: !(bitmap & 1),
+ configurable: !(bitmap & 2),
+ writable: !(bitmap & 4),
+ value: value
+ };
+ };
+
+
+ /***/ }),
+ /* 55 */
+ /***/ (function(module, exports) {
+
+ module.exports = {};
+
+
+ /***/ }),
+ /* 56 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _Animate = __webpack_require__(558);
+
+ var _Animate2 = _interopRequireDefault(_Animate);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+ exports["default"] = _Animate2["default"];
+ module.exports = exports['default'];
+
+ /***/ }),
+ /* 57 */
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+ "use strict";
+ /* harmony export (immutable) */ __webpack_exports__["a"] = contains;
+ function contains(root, n) {
+ var node = n;
+ while (node) {
+ if (node === root) {
+ return true;
+ }
+ node = node.parentNode;
+ }
+
+ return false;
+ }
+
+ /***/ }),
+ /* 58 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ var _interopRequireDefault = __webpack_require__(11);
+
+ exports.__esModule = true;
+ exports.default = exports.animationEnd = exports.animationDelay = exports.animationTiming = exports.animationDuration = exports.animationName = exports.transitionEnd = exports.transitionDuration = exports.transitionDelay = exports.transitionTiming = exports.transitionProperty = exports.transform = void 0;
+
+ var _inDOM = _interopRequireDefault(__webpack_require__(34));
+
+ var transform = 'transform';
+ exports.transform = transform;
+ var prefix, transitionEnd, animationEnd;
+ exports.animationEnd = animationEnd;
+ exports.transitionEnd = transitionEnd;
+ var transitionProperty, transitionDuration, transitionTiming, transitionDelay;
+ exports.transitionDelay = transitionDelay;
+ exports.transitionTiming = transitionTiming;
+ exports.transitionDuration = transitionDuration;
+ exports.transitionProperty = transitionProperty;
+ var animationName, animationDuration, animationTiming, animationDelay;
+ exports.animationDelay = animationDelay;
+ exports.animationTiming = animationTiming;
+ exports.animationDuration = animationDuration;
+ exports.animationName = animationName;
+
+ if (_inDOM.default) {
+ var _getTransitionPropert = getTransitionProperties();
+
+ prefix = _getTransitionPropert.prefix;
+ exports.transitionEnd = transitionEnd = _getTransitionPropert.transitionEnd;
+ exports.animationEnd = animationEnd = _getTransitionPropert.animationEnd;
+ exports.transform = transform = prefix + "-" + transform;
+ exports.transitionProperty = transitionProperty = prefix + "-transition-property";
+ exports.transitionDuration = transitionDuration = prefix + "-transition-duration";
+ exports.transitionDelay = transitionDelay = prefix + "-transition-delay";
+ exports.transitionTiming = transitionTiming = prefix + "-transition-timing-function";
+ exports.animationName = animationName = prefix + "-animation-name";
+ exports.animationDuration = animationDuration = prefix + "-animation-duration";
+ exports.animationTiming = animationTiming = prefix + "-animation-delay";
+ exports.animationDelay = animationDelay = prefix + "-animation-timing-function";
+ }
+
+ var _default = {
+ transform: transform,
+ end: transitionEnd,
+ property: transitionProperty,
+ timing: transitionTiming,
+ delay: transitionDelay,
+ duration: transitionDuration
+ };
+ exports.default = _default;
+
+ function getTransitionProperties() {
+ var style = document.createElement('div').style;
+ var vendorMap = {
+ O: function O(e) {
+ return "o" + e.toLowerCase();
+ },
+ Moz: function Moz(e) {
+ return e.toLowerCase();
+ },
+ Webkit: function Webkit(e) {
+ return "webkit" + e;
+ },
+ ms: function ms(e) {
+ return "MS" + e;
+ }
+ };
+ var vendors = Object.keys(vendorMap);
+ var transitionEnd, animationEnd;
+ var prefix = '';
+
+ for (var i = 0; i < vendors.length; i++) {
+ var vendor = vendors[i];
+
+ if (vendor + "TransitionProperty" in style) {
+ prefix = "-" + vendor.toLowerCase();
+ transitionEnd = vendorMap[vendor]('TransitionEnd');
+ animationEnd = vendorMap[vendor]('AnimationEnd');
+ break;
+ }
+ }
+
+ if (!transitionEnd && 'transitionProperty' in style) transitionEnd = 'transitionend';
+ if (!animationEnd && 'animationName' in style) animationEnd = 'animationend';
+ style = null;
+ return {
+ animationEnd: animationEnd,
+ transitionEnd: transitionEnd,
+ prefix: prefix
+ };
+ }
+
+ /***/ }),
+ /* 59 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ var _interopRequireDefault = __webpack_require__(11);
+
+ exports.__esModule = true;
+ exports.default = void 0;
+
+ var _inDOM = _interopRequireDefault(__webpack_require__(34));
+
+ var on = function on() {};
+
+ if (_inDOM.default) {
+ on = function () {
+ if (document.addEventListener) return function (node, eventName, handler, capture) {
+ return node.addEventListener(eventName, handler, capture || false);
+ };else if (document.attachEvent) return function (node, eventName, handler) {
+ return node.attachEvent('on' + eventName, function (e) {
+ e = e || window.event;
+ e.target = e.target || e.srcElement;
+ e.currentTarget = node;
+ handler.call(node, e);
+ });
+ };
+ }();
+ }
+
+ var _default = on;
+ exports.default = _default;
+ module.exports = exports["default"];
+
+ /***/ }),
+ /* 60 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ /**
+ * @ignore
+ * some key-codes definition and utils from closure-library
+ * @author yiminghe@gmail.com
+ */
+
+ var KeyCode = {
+ /**
+ * MAC_ENTER
+ */
+ MAC_ENTER: 3,
+ /**
+ * BACKSPACE
+ */
+ BACKSPACE: 8,
+ /**
+ * TAB
+ */
+ TAB: 9,
+ /**
+ * NUMLOCK on FF/Safari Mac
+ */
+ NUM_CENTER: 12, // NUMLOCK on FF/Safari Mac
+ /**
+ * ENTER
+ */
+ ENTER: 13,
+ /**
+ * SHIFT
+ */
+ SHIFT: 16,
+ /**
+ * CTRL
+ */
+ CTRL: 17,
+ /**
+ * ALT
+ */
+ ALT: 18,
+ /**
+ * PAUSE
+ */
+ PAUSE: 19,
+ /**
+ * CAPS_LOCK
+ */
+ CAPS_LOCK: 20,
+ /**
+ * ESC
+ */
+ ESC: 27,
+ /**
+ * SPACE
+ */
+ SPACE: 32,
+ /**
+ * PAGE_UP
+ */
+ PAGE_UP: 33, // also NUM_NORTH_EAST
+ /**
+ * PAGE_DOWN
+ */
+ PAGE_DOWN: 34, // also NUM_SOUTH_EAST
+ /**
+ * END
+ */
+ END: 35, // also NUM_SOUTH_WEST
+ /**
+ * HOME
+ */
+ HOME: 36, // also NUM_NORTH_WEST
+ /**
+ * LEFT
+ */
+ LEFT: 37, // also NUM_WEST
+ /**
+ * UP
+ */
+ UP: 38, // also NUM_NORTH
+ /**
+ * RIGHT
+ */
+ RIGHT: 39, // also NUM_EAST
+ /**
+ * DOWN
+ */
+ DOWN: 40, // also NUM_SOUTH
+ /**
+ * PRINT_SCREEN
+ */
+ PRINT_SCREEN: 44,
+ /**
+ * INSERT
+ */
+ INSERT: 45, // also NUM_INSERT
+ /**
+ * DELETE
+ */
+ DELETE: 46, // also NUM_DELETE
+ /**
+ * ZERO
+ */
+ ZERO: 48,
+ /**
+ * ONE
+ */
+ ONE: 49,
+ /**
+ * TWO
+ */
+ TWO: 50,
+ /**
+ * THREE
+ */
+ THREE: 51,
+ /**
+ * FOUR
+ */
+ FOUR: 52,
+ /**
+ * FIVE
+ */
+ FIVE: 53,
+ /**
+ * SIX
+ */
+ SIX: 54,
+ /**
+ * SEVEN
+ */
+ SEVEN: 55,
+ /**
+ * EIGHT
+ */
+ EIGHT: 56,
+ /**
+ * NINE
+ */
+ NINE: 57,
+ /**
+ * QUESTION_MARK
+ */
+ QUESTION_MARK: 63, // needs localization
+ /**
+ * A
+ */
+ A: 65,
+ /**
+ * B
+ */
+ B: 66,
+ /**
+ * C
+ */
+ C: 67,
+ /**
+ * D
+ */
+ D: 68,
+ /**
+ * E
+ */
+ E: 69,
+ /**
+ * F
+ */
+ F: 70,
+ /**
+ * G
+ */
+ G: 71,
+ /**
+ * H
+ */
+ H: 72,
+ /**
+ * I
+ */
+ I: 73,
+ /**
+ * J
+ */
+ J: 74,
+ /**
+ * K
+ */
+ K: 75,
+ /**
+ * L
+ */
+ L: 76,
+ /**
+ * M
+ */
+ M: 77,
+ /**
+ * N
+ */
+ N: 78,
+ /**
+ * O
+ */
+ O: 79,
+ /**
+ * P
+ */
+ P: 80,
+ /**
+ * Q
+ */
+ Q: 81,
+ /**
+ * R
+ */
+ R: 82,
+ /**
+ * S
+ */
+ S: 83,
+ /**
+ * T
+ */
+ T: 84,
+ /**
+ * U
+ */
+ U: 85,
+ /**
+ * V
+ */
+ V: 86,
+ /**
+ * W
+ */
+ W: 87,
+ /**
+ * X
+ */
+ X: 88,
+ /**
+ * Y
+ */
+ Y: 89,
+ /**
+ * Z
+ */
+ Z: 90,
+ /**
+ * META
+ */
+ META: 91, // WIN_KEY_LEFT
+ /**
+ * WIN_KEY_RIGHT
+ */
+ WIN_KEY_RIGHT: 92,
+ /**
+ * CONTEXT_MENU
+ */
+ CONTEXT_MENU: 93,
+ /**
+ * NUM_ZERO
+ */
+ NUM_ZERO: 96,
+ /**
+ * NUM_ONE
+ */
+ NUM_ONE: 97,
+ /**
+ * NUM_TWO
+ */
+ NUM_TWO: 98,
+ /**
+ * NUM_THREE
+ */
+ NUM_THREE: 99,
+ /**
+ * NUM_FOUR
+ */
+ NUM_FOUR: 100,
+ /**
+ * NUM_FIVE
+ */
+ NUM_FIVE: 101,
+ /**
+ * NUM_SIX
+ */
+ NUM_SIX: 102,
+ /**
+ * NUM_SEVEN
+ */
+ NUM_SEVEN: 103,
+ /**
+ * NUM_EIGHT
+ */
+ NUM_EIGHT: 104,
+ /**
+ * NUM_NINE
+ */
+ NUM_NINE: 105,
+ /**
+ * NUM_MULTIPLY
+ */
+ NUM_MULTIPLY: 106,
+ /**
+ * NUM_PLUS
+ */
+ NUM_PLUS: 107,
+ /**
+ * NUM_MINUS
+ */
+ NUM_MINUS: 109,
+ /**
+ * NUM_PERIOD
+ */
+ NUM_PERIOD: 110,
+ /**
+ * NUM_DIVISION
+ */
+ NUM_DIVISION: 111,
+ /**
+ * F1
+ */
+ F1: 112,
+ /**
+ * F2
+ */
+ F2: 113,
+ /**
+ * F3
+ */
+ F3: 114,
+ /**
+ * F4
+ */
+ F4: 115,
+ /**
+ * F5
+ */
+ F5: 116,
+ /**
+ * F6
+ */
+ F6: 117,
+ /**
+ * F7
+ */
+ F7: 118,
+ /**
+ * F8
+ */
+ F8: 119,
+ /**
+ * F9
+ */
+ F9: 120,
+ /**
+ * F10
+ */
+ F10: 121,
+ /**
+ * F11
+ */
+ F11: 122,
+ /**
+ * F12
+ */
+ F12: 123,
+ /**
+ * NUMLOCK
+ */
+ NUMLOCK: 144,
+ /**
+ * SEMICOLON
+ */
+ SEMICOLON: 186, // needs localization
+ /**
+ * DASH
+ */
+ DASH: 189, // needs localization
+ /**
+ * EQUALS
+ */
+ EQUALS: 187, // needs localization
+ /**
+ * COMMA
+ */
+ COMMA: 188, // needs localization
+ /**
+ * PERIOD
+ */
+ PERIOD: 190, // needs localization
+ /**
+ * SLASH
+ */
+ SLASH: 191, // needs localization
+ /**
+ * APOSTROPHE
+ */
+ APOSTROPHE: 192, // needs localization
+ /**
+ * SINGLE_QUOTE
+ */
+ SINGLE_QUOTE: 222, // needs localization
+ /**
+ * OPEN_SQUARE_BRACKET
+ */
+ OPEN_SQUARE_BRACKET: 219, // needs localization
+ /**
+ * BACKSLASH
+ */
+ BACKSLASH: 220, // needs localization
+ /**
+ * CLOSE_SQUARE_BRACKET
+ */
+ CLOSE_SQUARE_BRACKET: 221, // needs localization
+ /**
+ * WIN_KEY
+ */
+ WIN_KEY: 224,
+ /**
+ * MAC_FF_META
+ */
+ MAC_FF_META: 224, // Firefox (Gecko) fires this for the meta key instead of 91
+ /**
+ * WIN_IME
+ */
+ WIN_IME: 229
+ };
+
+ /*
+ whether text and modified key is entered at the same time.
+ */
+ KeyCode.isTextModifyingKeyEvent = function isTextModifyingKeyEvent(e) {
+ var keyCode = e.keyCode;
+ if (e.altKey && !e.ctrlKey || e.metaKey ||
+ // Function keys don't generate text
+ keyCode >= KeyCode.F1 && keyCode <= KeyCode.F12) {
+ return false;
+ }
+
+ // The following keys are quite harmless, even in combination with
+ // CTRL, ALT or SHIFT.
+ switch (keyCode) {
+ case KeyCode.ALT:
+ case KeyCode.CAPS_LOCK:
+ case KeyCode.CONTEXT_MENU:
+ case KeyCode.CTRL:
+ case KeyCode.DOWN:
+ case KeyCode.END:
+ case KeyCode.ESC:
+ case KeyCode.HOME:
+ case KeyCode.INSERT:
+ case KeyCode.LEFT:
+ case KeyCode.MAC_FF_META:
+ case KeyCode.META:
+ case KeyCode.NUMLOCK:
+ case KeyCode.NUM_CENTER:
+ case KeyCode.PAGE_DOWN:
+ case KeyCode.PAGE_UP:
+ case KeyCode.PAUSE:
+ case KeyCode.PRINT_SCREEN:
+ case KeyCode.RIGHT:
+ case KeyCode.SHIFT:
+ case KeyCode.UP:
+ case KeyCode.WIN_KEY:
+ case KeyCode.WIN_KEY_RIGHT:
+ return false;
+ default:
+ return true;
+ }
+ };
+
+ /*
+ whether character is entered.
+ */
+ KeyCode.isCharacterKey = function isCharacterKey(keyCode) {
+ if (keyCode >= KeyCode.ZERO && keyCode <= KeyCode.NINE) {
+ return true;
+ }
+
+ if (keyCode >= KeyCode.NUM_ZERO && keyCode <= KeyCode.NUM_MULTIPLY) {
+ return true;
+ }
+
+ if (keyCode >= KeyCode.A && keyCode <= KeyCode.Z) {
+ return true;
+ }
+
+ // Safari sends zero key code for non-latin characters.
+ if (window.navigation.userAgent.indexOf('WebKit') !== -1 && keyCode === 0) {
+ return true;
+ }
+
+ switch (keyCode) {
+ case KeyCode.SPACE:
+ case KeyCode.QUESTION_MARK:
+ case KeyCode.NUM_PLUS:
+ case KeyCode.NUM_MINUS:
+ case KeyCode.NUM_PERIOD:
+ case KeyCode.NUM_DIVISION:
+ case KeyCode.SEMICOLON:
+ case KeyCode.DASH:
+ case KeyCode.EQUALS:
+ case KeyCode.COMMA:
+ case KeyCode.PERIOD:
+ case KeyCode.SLASH:
+ case KeyCode.APOSTROPHE:
+ case KeyCode.SINGLE_QUOTE:
+ case KeyCode.OPEN_SQUARE_BRACKET:
+ case KeyCode.BACKSLASH:
+ case KeyCode.CLOSE_SQUARE_BRACKET:
+ return true;
+ default:
+ return false;
+ }
+ };
+
+ exports['default'] = KeyCode;
+ module.exports = exports['default'];
+
+ /***/ }),
+ /* 61 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _react = __webpack_require__(0);
+
+ var _react2 = _interopRequireDefault(_react);
+
+ var _reactDom = __webpack_require__(4);
+
+ var _reactDom2 = _interopRequireDefault(_reactDom);
+
+ var _propTypes = __webpack_require__(1);
+
+ var _propTypes2 = _interopRequireDefault(_propTypes);
+
+ var _KeyCode = __webpack_require__(60);
+
+ var _KeyCode2 = _interopRequireDefault(_KeyCode);
+
+ var _reactLifecyclesCompat = __webpack_require__(22);
+
+ var _moment = __webpack_require__(2);
+
+ var _moment2 = _interopRequireDefault(_moment);
+
+ var _util = __webpack_require__(27);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+ function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
+
+ var cachedSelectionStart = void 0;
+ var cachedSelectionEnd = void 0;
+ var dateInputInstance = void 0;
+
+ var DateInput = function (_React$Component) {
+ _inherits(DateInput, _React$Component);
+
+ function DateInput(props) {
+ _classCallCheck(this, DateInput);
+
+ var _this = _possibleConstructorReturn(this, _React$Component.call(this, props));
+
+ _initialiseProps.call(_this);
+
+ var selectedValue = props.selectedValue;
+
+ _this.state = {
+ str: (0, _util.formatDate)(selectedValue, _this.props.format),
+ invalid: false,
+ hasFocus: false
+ };
+ return _this;
+ }
+
+ DateInput.prototype.componentDidUpdate = function componentDidUpdate() {
+ if (dateInputInstance && this.state.hasFocus && !this.state.invalid && !(cachedSelectionStart === 0 && cachedSelectionEnd === 0)) {
+ dateInputInstance.setSelectionRange(cachedSelectionStart, cachedSelectionEnd);
+ }
+ };
+
+ DateInput.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, state) {
+ var newState = {};
+
+ if (dateInputInstance) {
+ cachedSelectionStart = dateInputInstance.selectionStart;
+ cachedSelectionEnd = dateInputInstance.selectionEnd;
+ }
+ // when popup show, click body will call this, bug!
+ var selectedValue = nextProps.selectedValue;
+ if (!state.hasFocus) {
+ newState = {
+ str: (0, _util.formatDate)(selectedValue, nextProps.format),
+ invalid: false
+ };
+ }
+
+ return newState;
+ };
+
+ DateInput.getInstance = function getInstance() {
+ return dateInputInstance;
+ };
+
+ DateInput.prototype.render = function render() {
+ var props = this.props;
+ var _state = this.state,
+ invalid = _state.invalid,
+ str = _state.str;
+ var locale = props.locale,
+ prefixCls = props.prefixCls,
+ placeholder = props.placeholder,
+ clearIcon = props.clearIcon;
+
+ var invalidClass = invalid ? prefixCls + '-input-invalid' : '';
+ return _react2["default"].createElement(
+ 'div',
+ { className: prefixCls + '-input-wrap' },
+ _react2["default"].createElement(
+ 'div',
+ { className: prefixCls + '-date-input-wrap' },
+ _react2["default"].createElement('input', {
+ ref: this.saveDateInput,
+ className: prefixCls + '-input ' + invalidClass,
+ value: str,
+ disabled: props.disabled,
+ placeholder: placeholder,
+ onChange: this.onInputChange,
+ onKeyDown: this.onKeyDown,
+ onFocus: this.onFocus,
+ onBlur: this.onBlur
+ })
+ ),
+ props.showClear ? _react2["default"].createElement(
+ 'a',
+ {
+ role: 'button',
+ title: locale.clear,
+ onClick: this.onClear
+ },
+ clearIcon || _react2["default"].createElement('span', { className: prefixCls + '-clear-btn uf uf-close-c' })
+ ) : null
+ );
+ };
+
+ return DateInput;
+ }(_react2["default"].Component);
+
+ DateInput.propTypes = {
+ prefixCls: _propTypes2["default"].string,
+ timePicker: _propTypes2["default"].object,
+ value: _propTypes2["default"].object,
+ disabledTime: _propTypes2["default"].any,
+ format: _propTypes2["default"].oneOfType([_propTypes2["default"].string, _propTypes2["default"].arrayOf(_propTypes2["default"].string)]),
+ locale: _propTypes2["default"].object,
+ disabledDate: _propTypes2["default"].func,
+ onChange: _propTypes2["default"].func,
+ onClear: _propTypes2["default"].func,
+ placeholder: _propTypes2["default"].string,
+ onSelect: _propTypes2["default"].func,
+ selectedValue: _propTypes2["default"].object,
+ clearIcon: _propTypes2["default"].node
+ };
+
+ var _initialiseProps = function _initialiseProps() {
+ var _this2 = this;
+
+ this.onClear = function () {
+ _this2.setState({
+ str: ''
+ });
+ _this2.props.onClear(null);
+ };
+
+ this.onInputChange = function (event) {
+ var str = event.target.value;
+ var _props = _this2.props,
+ disabledDate = _props.disabledDate,
+ format = _props.format,
+ onChange = _props.onChange,
+ selectedValue = _props.selectedValue;
+
+ // 没有内容,合法并直接退出
+
+ if (!str) {
+ onChange(null);
+ _this2.setState({
+ invalid: false,
+ str: str
+ });
+ return;
+ }
+
+ // 不合法直接退出
+ var parsed = (0, _moment2["default"])(str, format, true);
+ if (!parsed.isValid()) {
+ _this2.setState({
+ invalid: true,
+ str: str
+ });
+ return;
+ }
+
+ var value = _this2.props.value.clone();
+ value.year(parsed.year()).month(parsed.month()).date(parsed.date()).hour(parsed.hour()).minute(parsed.minute()).second(parsed.second());
+
+ if (!value || disabledDate && disabledDate(value)) {
+ _this2.setState({
+ invalid: true,
+ str: str
+ });
+ return;
+ }
+
+ if (selectedValue !== value || selectedValue && value && !selectedValue.isSame(value)) {
+ _this2.setState({
+ invalid: false,
+ str: str
+ });
+ onChange(value);
+ }
+ };
+
+ this.onFocus = function () {
+ _this2.setState({ hasFocus: true });
+ };
+
+ this.onBlur = function () {
+ _this2.setState(function (prevState, prevProps) {
+ return {
+ hasFocus: false,
+ str: (0, _util.formatDate)(prevProps.value, prevProps.format)
+ };
+ });
+ };
+
+ this.onKeyDown = function (_ref) {
+ var keyCode = _ref.keyCode;
+ var _props2 = _this2.props,
+ onSelect = _props2.onSelect,
+ value = _props2.value;
+
+ if (keyCode === _KeyCode2["default"].ENTER && onSelect) {
+ onSelect(value.clone());
+ }
+ };
+
+ this.getRootDOMNode = function () {
+ return _reactDom2["default"].findDOMNode(_this2);
+ };
+
+ this.focus = function () {
+ if (dateInputInstance) {
+ dateInputInstance.focus();
+ }
+ };
+
+ this.saveDateInput = function (dateInput) {
+ dateInputInstance = dateInput;
+ };
+ };
+
+ (0, _reactLifecyclesCompat.polyfill)(DateInput);
+
+ exports["default"] = DateInput;
+ module.exports = exports['default'];
+
+ /***/ }),
+ /* 62 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _react = __webpack_require__(0);
+
+ var _react2 = _interopRequireDefault(_react);
+
+ var _reactDom = __webpack_require__(4);
+
+ var _reactDom2 = _interopRequireDefault(_reactDom);
+
+ var _propTypes = __webpack_require__(1);
+
+ var _propTypes2 = _interopRequireDefault(_propTypes);
+
+ var _reactLifecyclesCompat = __webpack_require__(22);
+
+ var _createChainedFunction = __webpack_require__(195);
+
+ var _createChainedFunction2 = _interopRequireDefault(_createChainedFunction);
+
+ var _KeyCode = __webpack_require__(60);
+
+ var _KeyCode2 = _interopRequireDefault(_KeyCode);
+
+ var _placements = __webpack_require__(833);
+
+ var _placements2 = _interopRequireDefault(_placements);
+
+ var _rcTrigger = __webpack_require__(834);
+
+ var _rcTrigger2 = _interopRequireDefault(_rcTrigger);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+ function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
+
+ function noop() {}
+
+ function refFn(field, component) {
+ this[field] = component;
+ }
+
+ var Picker = function (_React$Component) {
+ _inherits(Picker, _React$Component);
+
+ function Picker(props) {
+ _classCallCheck(this, Picker);
+
+ var _this = _possibleConstructorReturn(this, _React$Component.call(this, props));
+
+ _initialiseProps.call(_this);
+
+ var open = void 0;
+ if ('open' in props) {
+ open = props.open;
+ } else {
+ open = props.defaultOpen;
+ }
+ var value = props.value || props.defaultValue;
+ _this.saveCalendarRef = refFn.bind(_this, 'calendarInstance');
+
+ _this.state = {
+ open: open,
+ value: value
+ };
+ return _this;
+ }
+
+ Picker.prototype.componentDidUpdate = function componentDidUpdate(_, prevState) {
+ if (!prevState.open && this.state.open) {
+ // setTimeout is for making sure saveCalendarRef happen before focusCalendar
+ this.focusTimeout = setTimeout(this.focusCalendar, 0, this);
+ }
+ };
+
+ Picker.prototype.componentWillUnmount = function componentWillUnmount() {
+ clearTimeout(this.focusTimeout);
+ };
+
+ Picker.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps) {
+ var newState = {};
+ var value = nextProps.value,
+ open = nextProps.open;
+
+ if ('value' in nextProps) {
+ newState.value = value;
+ }
+ if (open !== undefined) {
+ newState.open = open;
+ }
+ return newState;
+ };
+
+ Picker.prototype.render = function render() {
+ var props = this.props;
+ var prefixCls = props.prefixCls,
+ placement = props.placement,
+ style = props.style,
+ getCalendarContainer = props.getCalendarContainer,
+ align = props.align,
+ animation = props.animation,
+ disabled = props.disabled,
+ dropdownClassName = props.dropdownClassName,
+ transitionName = props.transitionName,
+ children = props.children;
+
+ var state = this.state;
+ return _react2["default"].createElement(
+ _rcTrigger2["default"],
+ {
+ popup: this.getCalendarElement(),
+ popupAlign: align,
+ builtinPlacements: _placements2["default"],
+ popupPlacement: placement,
+ action: disabled && !state.open ? [] : ['click'],
+ destroyPopupOnHide: true,
+ getPopupContainer: getCalendarContainer,
+ popupStyle: style,
+ popupAnimation: animation,
+ popupTransitionName: transitionName,
+ popupVisible: state.open,
+ onPopupVisibleChange: this.onVisibleChange,
+ prefixCls: prefixCls,
+ popupClassName: dropdownClassName
+ },
+ _react2["default"].cloneElement(children(state, props), { onKeyDown: this.onKeyDown })
+ );
+ };
+
+ return Picker;
+ }(_react2["default"].Component);
+
+ Picker.propTypes = {
+ animation: _propTypes2["default"].oneOfType([_propTypes2["default"].func, _propTypes2["default"].string]),
+ disabled: _propTypes2["default"].bool,
+ transitionName: _propTypes2["default"].string,
+ onChange: _propTypes2["default"].func,
+ onOpenChange: _propTypes2["default"].func,
+ children: _propTypes2["default"].func,
+ getCalendarContainer: _propTypes2["default"].func,
+ calendar: _propTypes2["default"].element,
+ style: _propTypes2["default"].object,
+ open: _propTypes2["default"].bool,
+ defaultOpen: _propTypes2["default"].bool,
+ prefixCls: _propTypes2["default"].string,
+ placement: _propTypes2["default"].any,
+ value: _propTypes2["default"].oneOfType([_propTypes2["default"].object, _propTypes2["default"].array]),
+ defaultValue: _propTypes2["default"].oneOfType([_propTypes2["default"].object, _propTypes2["default"].array]),
+ align: _propTypes2["default"].object
+ };
+ Picker.defaultProps = {
+ prefixCls: 'rc-calendar-picker',
+ style: {},
+ align: {},
+ placement: 'bottomLeft',
+ defaultOpen: false,
+ onChange: noop,
+ onOpenChange: noop
+ };
+
+ var _initialiseProps = function _initialiseProps() {
+ var _this2 = this;
+
+ this.onCalendarKeyDown = function (event) {
+ if (event.keyCode === _KeyCode2["default"].ESC) {
+ event.stopPropagation();
+ _this2.close(_this2.focus);
+ }
+ };
+
+ this.onCalendarSelect = function (value) {
+ var cause = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+
+ var props = _this2.props;
+ if (!('value' in props)) {
+ _this2.setState({
+ value: value
+ });
+ }
+ if (cause.source === 'keyboard' || cause.source === 'dateInputSelect' || !props.calendar.props.timePicker && cause.source !== 'dateInput' || cause.source === 'todayButton') {
+ _this2.close(_this2.focus);
+ }
+ props.onChange(value);
+ };
+
+ this.onKeyDown = function (event) {
+ if (!_this2.state.open && (event.keyCode === _KeyCode2["default"].DOWN || event.keyCode === _KeyCode2["default"].ENTER)) {
+ _this2.open();
+ event.preventDefault();
+ }
+ };
+
+ this.onCalendarOk = function () {
+ _this2.close(_this2.focus);
+ };
+
+ this.onCalendarClear = function () {
+ _this2.close(_this2.focus);
+ };
+
+ this.onVisibleChange = function (open) {
+ _this2.setOpen(open);
+ };
+
+ this.getCalendarElement = function () {
+ var props = _this2.props;
+ var state = _this2.state;
+ var calendarProps = props.calendar.props;
+ var value = state.value;
+
+ var defaultValue = value;
+ var extraProps = {
+ ref: _this2.saveCalendarRef,
+ defaultValue: defaultValue || calendarProps.defaultValue,
+ selectedValue: value,
+ onKeyDown: _this2.onCalendarKeyDown,
+ onOk: (0, _createChainedFunction2["default"])(calendarProps.onOk, _this2.onCalendarOk),
+ onSelect: (0, _createChainedFunction2["default"])(calendarProps.onSelect, _this2.onCalendarSelect),
+ onClear: (0, _createChainedFunction2["default"])(calendarProps.onClear, _this2.onCalendarClear)
+ };
+
+ return _react2["default"].cloneElement(props.calendar, extraProps);
+ };
+
+ this.setOpen = function (open, callback) {
+ var onOpenChange = _this2.props.onOpenChange;
+
+ if (_this2.state.open !== open) {
+ if (!('open' in _this2.props)) {
+ _this2.setState({
+ open: open
+ }, callback);
+ }
+ onOpenChange(open);
+ }
+ };
+
+ this.open = function (callback) {
+ _this2.setOpen(true, callback);
+ };
+
+ this.close = function (callback) {
+ _this2.setOpen(false, callback);
+ };
+
+ this.focus = function () {
+ if (!_this2.state.open) {
+ _reactDom2["default"].findDOMNode(_this2).focus();
+ }
+ };
+
+ this.focusCalendar = function () {
+ if (_this2.state.open && !!_this2.calendarInstance) {
+ _this2.calendarInstance.focus();
+ }
+ };
+ };
+
+ (0, _reactLifecyclesCompat.polyfill)(Picker);
+
+ exports["default"] = Picker;
+ module.exports = exports['default'];
+
+ /***/ }),
+ /* 63 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ exports["default"] = {
+ today: '今天',
+ now: '此刻',
+ backToToday: '返回今天',
+ ok: '确定',
+ timeSelect: '选择时间',
+ dateSelect: '选择日期',
+ weekSelect: '选择周',
+ clear: '清除',
+ month: '月',
+ year: '年',
+ previousMonth: '上个月 (翻页上键)',
+ nextMonth: '下个月 (翻页下键)',
+ monthSelect: '选择月份',
+ yearSelect: '选择年份',
+ decadeSelect: '选择年代',
+ yearFormat: 'YYYY年',
+ dayFormat: 'D日',
+ dateFormat: 'YYYY年M月D日',
+ dateTimeFormat: 'YYYY年M月D日 HH时mm分ss秒',
+ previousYear: '上一年 (Control键加左方向键)',
+ nextYear: '下一年 (Control键加右方向键)',
+ previousDecade: '上一年代',
+ nextDecade: '下一年代',
+ previousCentury: '上一世纪',
+ nextCentury: '下一世纪',
+ lastWeek: '上一周',
+ nowWeek: '本周',
+ nextWeek: '下一周'
+ };
+ module.exports = exports['default'];
+
+ /***/ }),
+ /* 64 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ // 19.1.2.14 / 15.2.3.14 Object.keys(O)
+ var $keys = __webpack_require__(132);
+ var enumBugKeys = __webpack_require__(89);
+
+ module.exports = Object.keys || function keys(O) {
+ return $keys(O, enumBugKeys);
+ };
+
+
+ /***/ }),
+ /* 65 */
+ /***/ (function(module, exports) {
+
+ module.exports = true;
+
+
+ /***/ }),
+ /* 66 */
+ /***/ (function(module, exports) {
+
+ var id = 0;
+ var px = Math.random();
+ module.exports = function (key) {
+ return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
+ };
+
+
+ /***/ }),
+ /* 67 */
+ /***/ (function(module, exports) {
+
+ exports.f = {}.propertyIsEnumerable;
+
+
+ /***/ }),
+ /* 68 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ var freeGlobal = __webpack_require__(471);
+
+ /** Detect free variable `self`. */
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
+
+ /** Used as a reference to the global object. */
+ var root = freeGlobal || freeSelf || Function('return this')();
+
+ module.exports = root;
+
+
+ /***/ }),
+ /* 69 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ var getNative = __webpack_require__(99);
+
+ /* Built-in method references that are verified to be native. */
+ var nativeCreate = getNative(Object, 'create');
+
+ module.exports = nativeCreate;
+
+
+ /***/ }),
+ /* 70 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ var eq = __webpack_require__(101);
+
+ /**
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
+ *
+ * @private
+ * @param {Array} array The array to inspect.
+ * @param {*} key The key to search for.
+ * @returns {number} Returns the index of the matched value, else `-1`.
+ */
+ function assocIndexOf(array, key) {
+ var length = array.length;
+ while (length--) {
+ if (eq(array[length][0], key)) {
+ return length;
+ }
+ }
+ return -1;
+ }
+
+ module.exports = assocIndexOf;
+
+
+ /***/ }),
+ /* 71 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ var isKeyable = __webpack_require__(500);
+
+ /**
+ * Gets the data for `map`.
+ *
+ * @private
+ * @param {Object} map The map to query.
+ * @param {string} key The reference key.
+ * @returns {*} Returns the map data.
+ */
+ function getMapData(map, key) {
+ var data = map.__data__;
+ return isKeyable(key)
+ ? data[typeof key == 'string' ? 'string' : 'hash']
+ : data.map;
+ }
+
+ module.exports = getMapData;
+
+
+ /***/ }),
+ /* 72 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ Object.defineProperty(exports, '__esModule', {
+ value: true
+ });
+ exports['default'] = addEventListener;
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
+
+ var _EventObject = __webpack_require__(546);
+
+ var _EventObject2 = _interopRequireDefault(_EventObject);
+
+ function addEventListener(target, eventType, callback, option) {
+ function wrapCallback(e) {
+ var ne = new _EventObject2['default'](e);
+ callback.call(target, ne);
+ }
+
+ if (target.addEventListener) {
+ var _ret = (function () {
+ var useCapture = false;
+ if (typeof option === 'object') {
+ useCapture = option.capture || false;
+ } else if (typeof option === 'boolean') {
+ useCapture = option;
+ }
+
+ target.addEventListener(eventType, wrapCallback, option || false);
+
+ return {
+ v: {
+ remove: function remove() {
+ target.removeEventListener(eventType, wrapCallback, useCapture);
+ }
+ }
+ };
+ })();
+
+ if (typeof _ret === 'object') return _ret.v;
+ } else if (target.attachEvent) {
+ target.attachEvent('on' + eventType, wrapCallback);
+ return {
+ remove: function remove() {
+ target.detachEvent('on' + eventType, wrapCallback);
+ }
+ };
+ }
+ }
+
+ module.exports = exports['default'];
+
+ /***/ }),
+ /* 73 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ /**
+ * Module dependencies.
+ */
+
+ try {
+ var index = __webpack_require__(158);
+ } catch (err) {
+ var index = __webpack_require__(158);
+ }
+
+ /**
+ * Whitespace regexp.
+ */
+
+ var re = /\s+/;
+
+ /**
+ * toString reference.
+ */
+
+ var toString = Object.prototype.toString;
+
+ /**
+ * Wrap `el` in a `ClassList`.
+ *
+ * @param {Element} el
+ * @return {ClassList}
+ * @api public
+ */
+
+ module.exports = function(el){
+ return new ClassList(el);
+ };
+
+ /**
+ * Initialize a new ClassList for `el`.
+ *
+ * @param {Element} el
+ * @api private
+ */
+
+ function ClassList(el) {
+ if (!el || !el.nodeType) {
+ throw new Error('A DOM element reference is required');
+ }
+ this.el = el;
+ this.list = el.classList;
+ }
+
+ /**
+ * Add class `name` if not already present.
+ *
+ * @param {String} name
+ * @return {ClassList}
+ * @api public
+ */
+
+ ClassList.prototype.add = function(name){
+ // classList
+ if (this.list) {
+ this.list.add(name);
+ return this;
+ }
+
+ // fallback
+ var arr = this.array();
+ var i = index(arr, name);
+ if (!~i) arr.push(name);
+ this.el.className = arr.join(' ');
+ return this;
+ };
+
+ /**
+ * Remove class `name` when present, or
+ * pass a regular expression to remove
+ * any which match.
+ *
+ * @param {String|RegExp} name
+ * @return {ClassList}
+ * @api public
+ */
+
+ ClassList.prototype.remove = function(name){
+ if ('[object RegExp]' == toString.call(name)) {
+ return this.removeMatching(name);
+ }
+
+ // classList
+ if (this.list) {
+ this.list.remove(name);
+ return this;
+ }
+
+ // fallback
+ var arr = this.array();
+ var i = index(arr, name);
+ if (~i) arr.splice(i, 1);
+ this.el.className = arr.join(' ');
+ return this;
+ };
+
+ /**
+ * Remove all classes matching `re`.
+ *
+ * @param {RegExp} re
+ * @return {ClassList}
+ * @api private
+ */
+
+ ClassList.prototype.removeMatching = function(re){
+ var arr = this.array();
+ for (var i = 0; i < arr.length; i++) {
+ if (re.test(arr[i])) {
+ this.remove(arr[i]);
+ }
+ }
+ return this;
+ };
+
+ /**
+ * Toggle class `name`, can force state via `force`.
+ *
+ * For browsers that support classList, but do not support `force` yet,
+ * the mistake will be detected and corrected.
+ *
+ * @param {String} name
+ * @param {Boolean} force
+ * @return {ClassList}
+ * @api public
+ */
+
+ ClassList.prototype.toggle = function(name, force){
+ // classList
+ if (this.list) {
+ if ("undefined" !== typeof force) {
+ if (force !== this.list.toggle(name, force)) {
+ this.list.toggle(name); // toggle again to correct
+ }
+ } else {
+ this.list.toggle(name);
+ }
+ return this;
+ }
+
+ // fallback
+ if ("undefined" !== typeof force) {
+ if (!force) {
+ this.remove(name);
+ } else {
+ this.add(name);
+ }
+ } else {
+ if (this.has(name)) {
+ this.remove(name);
+ } else {
+ this.add(name);
+ }
+ }
+
+ return this;
+ };
+
+ /**
+ * Return an array of classes.
+ *
+ * @return {Array}
+ * @api public
+ */
+
+ ClassList.prototype.array = function(){
+ var className = this.el.getAttribute('class') || '';
+ var str = className.replace(/^\s+|\s+$/g, '');
+ var arr = str.split(re);
+ if ('' === arr[0]) arr.shift();
+ return arr;
+ };
+
+ /**
+ * Check if class `name` is present.
+ *
+ * @param {String} name
+ * @return {ClassList}
+ * @api public
+ */
+
+ ClassList.prototype.has =
+ ClassList.prototype.contains = function(name){
+ return this.list
+ ? this.list.contains(name)
+ : !! ~index(this.array(), name);
+ };
+
+
+ /***/ }),
+ /* 74 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -86877,539 +73928,12 @@
/* harmony default export */ __webpack_exports__["a"] = (KeyCode);
/***/ }),
- /* 32 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- exports.__esModule = true;
- exports.default = void 0;
-
- var _default = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
-
- exports.default = _default;
- module.exports = exports["default"];
-
- /***/ }),
- /* 33 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- var _interopRequireDefault = __webpack_require__(12);
-
- exports.__esModule = true;
- exports.default = style;
-
- var _camelizeStyle = _interopRequireDefault(__webpack_require__(212));
-
- var _hyphenateStyle = _interopRequireDefault(__webpack_require__(692));
-
- var _getComputedStyle2 = _interopRequireDefault(__webpack_require__(694));
-
- var _removeStyle = _interopRequireDefault(__webpack_require__(695));
-
- var _properties = __webpack_require__(69);
-
- var _isTransform = _interopRequireDefault(__webpack_require__(696));
-
- function style(node, property, value) {
- var css = '';
- var transforms = '';
- var props = property;
-
- if (typeof property === 'string') {
- if (value === undefined) {
- return node.style[(0, _camelizeStyle.default)(property)] || (0, _getComputedStyle2.default)(node).getPropertyValue((0, _hyphenateStyle.default)(property));
- } else {
- (props = {})[property] = value;
- }
- }
-
- Object.keys(props).forEach(function (key) {
- var value = props[key];
-
- if (!value && value !== 0) {
- (0, _removeStyle.default)(node, (0, _hyphenateStyle.default)(key));
- } else if ((0, _isTransform.default)(key)) {
- transforms += key + "(" + value + ") ";
- } else {
- css += (0, _hyphenateStyle.default)(key) + ": " + value + ";";
- }
- });
-
- if (transforms) {
- css += _properties.transform + ": " + transforms + ";";
- }
-
- node.style.cssText += ';' + css;
- }
-
- module.exports = exports["default"];
-
- /***/ }),
- /* 34 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
- module.exports = exports['default'];
-
- /***/ }),
- /* 35 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
- module.exports = exports['default'];
-
- /***/ }),
- /* 36 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
- module.exports = exports['default'];
-
- /***/ }),
- /* 37 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _Button = __webpack_require__(426);
-
- var _Button2 = _interopRequireDefault(_Button);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- exports["default"] = _Button2["default"];
- module.exports = exports['default'];
-
- /***/ }),
- /* 38 */
- /***/ (function(module, exports, __webpack_require__) {
-
- var dP = __webpack_require__(23);
- var createDesc = __webpack_require__(59);
- module.exports = __webpack_require__(27) ? function (object, key, value) {
- return dP.f(object, key, createDesc(1, value));
- } : function (object, key, value) {
- object[key] = value;
- return object;
- };
-
-
- /***/ }),
- /* 39 */
- /***/ (function(module, exports, __webpack_require__) {
-
- var isObject = __webpack_require__(40);
- module.exports = function (it) {
- if (!isObject(it)) throw TypeError(it + ' is not an object!');
- return it;
- };
-
-
- /***/ }),
- /* 40 */
- /***/ (function(module, exports) {
-
- module.exports = function (it) {
- return typeof it === 'object' ? it !== null : typeof it === 'function';
- };
-
-
- /***/ }),
- /* 41 */
- /***/ (function(module, exports) {
-
- module.exports = function (exec) {
- try {
- return !!exec();
- } catch (e) {
- return true;
- }
- };
-
-
- /***/ }),
- /* 42 */
- /***/ (function(module, exports, __webpack_require__) {
-
- // to indexed object, toObject with fallback for non-array-like ES3 strings
- var IObject = __webpack_require__(162);
- var defined = __webpack_require__(98);
- module.exports = function (it) {
- return IObject(defined(it));
- };
-
-
- /***/ }),
- /* 43 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
- /**
- * Copyright (c) 2013-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- *
- */
-
-
-
- var React = __webpack_require__(0);
- var factory = __webpack_require__(483);
-
- if (typeof React === 'undefined') {
- throw Error(
- 'create-react-class could not find the React object. If you are using script tags, ' +
- 'make sure that React is being loaded before create-react-class.'
- );
- }
-
- // Hack to grab NoopUpdateQueue from isomorphic React
- var ReactNoopUpdateQueue = new React.Component().updater;
-
- module.exports = factory(
- React.Component,
- React.isValidElement,
- ReactNoopUpdateQueue
- );
-
-
- /***/ }),
- /* 44 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
- /*
- object-assign
- (c) Sindre Sorhus
- @license MIT
- */
-
-
- /* eslint-disable no-unused-vars */
- var getOwnPropertySymbols = Object.getOwnPropertySymbols;
- var hasOwnProperty = Object.prototype.hasOwnProperty;
- var propIsEnumerable = Object.prototype.propertyIsEnumerable;
-
- function toObject(val) {
- if (val === null || val === undefined) {
- throw new TypeError('Object.assign cannot be called with null or undefined');
- }
-
- return Object(val);
- }
-
- function shouldUseNative() {
- try {
- if (!Object.assign) {
- return false;
- }
-
- // Detect buggy property enumeration order in older V8 versions.
-
- // https://bugs.chromium.org/p/v8/issues/detail?id=4118
- var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
- test1[5] = 'de';
- if (Object.getOwnPropertyNames(test1)[0] === '5') {
- return false;
- }
-
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
- var test2 = {};
- for (var i = 0; i < 10; i++) {
- test2['_' + String.fromCharCode(i)] = i;
- }
- var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
- return test2[n];
- });
- if (order2.join('') !== '0123456789') {
- return false;
- }
-
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
- var test3 = {};
- 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
- test3[letter] = letter;
- });
- if (Object.keys(Object.assign({}, test3)).join('') !==
- 'abcdefghijklmnopqrst') {
- return false;
- }
-
- return true;
- } catch (err) {
- // We don't expect any of the above to throw, but better to be safe.
- return false;
- }
- }
-
- module.exports = shouldUseNative() ? Object.assign : function (target, source) {
- var from;
- var to = toObject(target);
- var symbols;
-
- for (var s = 1; s < arguments.length; s++) {
- from = Object(arguments[s]);
-
- for (var key in from) {
- if (hasOwnProperty.call(from, key)) {
- to[key] = from[key];
- }
- }
-
- if (getOwnPropertySymbols) {
- symbols = getOwnPropertySymbols(from);
- for (var i = 0; i < symbols.length; i++) {
- if (propIsEnumerable.call(from, symbols[i])) {
- to[symbols[i]] = from[symbols[i]];
- }
- }
- }
- }
-
- return to;
- };
-
-
- /***/ }),
- /* 45 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- exports.__esModule = true;
-
- var _defineProperty = __webpack_require__(157);
-
- var _defineProperty2 = _interopRequireDefault(_defineProperty);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
- exports.default = function () {
- function defineProperties(target, props) {
- for (var i = 0; i < props.length; i++) {
- var descriptor = props[i];
- descriptor.enumerable = descriptor.enumerable || false;
- descriptor.configurable = true;
- if ("value" in descriptor) descriptor.writable = true;
- (0, _defineProperty2.default)(target, descriptor.key, descriptor);
- }
- }
-
- return function (Constructor, protoProps, staticProps) {
- if (protoProps) defineProperties(Constructor.prototype, protoProps);
- if (staticProps) defineProperties(Constructor, staticProps);
- return Constructor;
- };
- }();
-
- /***/ }),
- /* 46 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- exports.__esModule = true;
- /**
- * This source code is quoted from rc-util.
- * homepage: https://github.com/react-component/util
- */
- function createChainedFunction() {
- for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {
- funcs[_key] = arguments[_key];
- }
-
- return funcs.filter(function (f) {
- return f != null;
- }).reduce(function (acc, f) {
- if (typeof f !== 'function') {
- throw new Error('Invalid Argument Type, must only provide functions, undefined, or null.');
- }
-
- if (acc === null) {
- return f;
- }
-
- return function chainedFunction() {
- for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
- args[_key2] = arguments[_key2];
- }
-
- acc.apply(this, args);
- f.apply(this, args);
- };
- }, null);
- }
- exports.default = createChainedFunction;
-
- /***/ }),
- /* 47 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _Animate = __webpack_require__(621);
-
- var _Animate2 = _interopRequireDefault(_Animate);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- exports["default"] = _Animate2["default"];
- module.exports = exports['default'];
-
- /***/ }),
- /* 48 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
-
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["h"] = noop;
- /* harmony export (immutable) */ __webpack_exports__["a"] = getKeyFromChildrenIndex;
- /* harmony export (immutable) */ __webpack_exports__["b"] = getMenuIdFromSubMenuEventKey;
- /* harmony export (immutable) */ __webpack_exports__["e"] = loopMenuItem;
- /* harmony export (immutable) */ __webpack_exports__["f"] = loopMenuItemRecursively;
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return menuAllProps; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getWidth; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return setStyle; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return isMobileDevice; });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
-
- var isMobile = __webpack_require__(200);
-
- function noop() {}
-
- function getKeyFromChildrenIndex(child, menuEventKey, index) {
- var prefix = menuEventKey || '';
- return child.key || prefix + 'item_' + index;
- }
-
- function getMenuIdFromSubMenuEventKey(eventKey) {
- return eventKey + '-menu-';
- }
-
- function loopMenuItem(children, cb) {
- var index = -1;
- __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (c) {
- index++;
- if (c && c.type && c.type.isMenuItemGroup) {
- __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(c.props.children, function (c2) {
- index++;
- cb(c2, index);
- });
- } else {
- cb(c, index);
- }
- });
- }
-
- function loopMenuItemRecursively(children, keys, ret) {
- /* istanbul ignore if */
- if (!children || ret.find) {
- return;
- }
- __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (c) {
- if (c) {
- var construct = c.type;
- if (!construct || !(construct.isSubMenu || construct.isMenuItem || construct.isMenuItemGroup)) {
- return;
- }
- if (keys.indexOf(c.key) !== -1) {
- ret.find = true;
- } else if (c.props.children) {
- loopMenuItemRecursively(c.props.children, keys, ret);
- }
- }
- });
- }
-
- var menuAllProps = ['defaultSelectedKeys', 'selectedKeys', 'defaultOpenKeys', 'openKeys', 'mode', 'getPopupContainer', 'onSelect', 'onDeselect', 'onDestroy', 'openTransitionName', 'openAnimation', 'subMenuOpenDelay', 'subMenuCloseDelay', 'forceSubMenuRender', 'triggerSubMenuAction', 'level', 'selectable', 'multiple', 'onOpenChange', 'visible', 'focusable', 'defaultActiveFirst', 'prefixCls', 'inlineIndent', 'parentMenu', 'title', 'rootPrefixCls', 'eventKey', 'active', 'onItemHover', 'onTitleMouseEnter', 'onTitleMouseLeave', 'onTitleClick', 'popupAlign', 'popupOffset', 'isOpen', 'renderMenuItem', 'manualRef', 'subMenuKey', 'disabled', 'index', 'isSelected', 'store', 'activeKey', 'builtinPlacements', 'overflowedIndicator',
-
- // the following keys found need to be removed from test regression
- 'attribute', 'value', 'popupClassName', 'inlineCollapsed', 'menu', 'theme', 'itemIcon', 'expandIcon'];
-
- // ref: https://github.com/ant-design/ant-design/issues/14007
- // ref: https://bugs.chromium.org/p/chromium/issues/detail?id=360889
- // getBoundingClientRect return the full precision value, which is
- // not the same behavior as on chrome. Set the precision to 6 to
- // unify their behavior
- var getWidth = function getWidth(elem) {
- var width = elem && typeof elem.getBoundingClientRect === 'function' && elem.getBoundingClientRect().width;
- if (width) {
- width = +width.toFixed(6);
- }
- return width || 0;
- };
-
- var setStyle = function setStyle(elem, styleProperty, value) {
- if (elem && typeof elem.style === 'object') {
- elem.style[styleProperty] = value;
- }
- };
-
- var isMobileDevice = function isMobileDevice() {
- return isMobile.any;
- };
-
- /***/ }),
- /* 49 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
-
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["a"] = contains;
- function contains(root, n) {
- var node = n;
- while (node) {
- if (node === root) {
- return true;
- }
- node = node.parentNode;
- }
-
- return false;
- }
-
- /***/ }),
- /* 50 */
+ /* 75 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = addEventListenerWrap;
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_add_dom_event_listener__ = __webpack_require__(119);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_add_dom_event_listener__ = __webpack_require__(72);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_add_dom_event_listener___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_add_dom_event_listener__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom__ = __webpack_require__(4);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react_dom__);
@@ -87425,46 +73949,1008 @@
}
/***/ }),
- /* 51 */
+ /* 76 */
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+ "use strict";
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Align__ = __webpack_require__(579);
+ // export this package's api
+
+
+ /* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_0__Align__["a" /* default */]);
+
+ /***/ }),
+ /* 77 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
- var _interopRequireDefault = __webpack_require__(12);
-
exports.__esModule = true;
- exports.default = void 0;
+ exports.default = getWindow;
- var _inDOM = _interopRequireDefault(__webpack_require__(32));
-
- var _default = function () {
- // HTML DOM and SVG DOM may have different support levels,
- // so we need to check on context instead of a document root element.
- return _inDOM.default ? function (context, node) {
- if (context.contains) {
- return context.contains(node);
- } else if (context.compareDocumentPosition) {
- return context === node || !!(context.compareDocumentPosition(node) & 16);
- } else {
- return fallback(context, node);
- }
- } : fallback;
- }();
-
- exports.default = _default;
-
- function fallback(context, node) {
- if (node) do {
- if (node === context) return true;
- } while (node = node.parentNode);
- return false;
+ function getWindow(node) {
+ return node === node.window ? node : node.nodeType === 9 ? node.defaultView || node.parentWindow : false;
}
module.exports = exports["default"];
/***/ }),
- /* 52 */
+ /* 78 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ exports["default"] = function (node, event, handler, capture) {
+ (0, _on2["default"])(node, event, handler, capture);
+
+ return {
+ remove: function remove() {
+ (0, _off2["default"])(node, event, handler, capture);
+ }
+ };
+ };
+
+ var _on = __webpack_require__(59);
+
+ var _on2 = _interopRequireDefault(_on);
+
+ var _off = __webpack_require__(641);
+
+ var _off2 = _interopRequireDefault(_off);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+ module.exports = exports['default'];
+
+ /***/ }),
+ /* 79 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _Notification = __webpack_require__(658);
+
+ var _Notification2 = _interopRequireDefault(_Notification);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+ exports["default"] = _Notification2["default"];
+ module.exports = exports['default'];
+
+ /***/ }),
+ /* 80 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ //! moment.js locale configuration
+
+ ;(function (global, factory) {
+ true ? factory(__webpack_require__(2)) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+ }(this, (function (moment) { 'use strict';
+
+
+ var zhCn = moment.defineLocale('zh-cn', {
+ months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),
+ monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
+ weekdays : '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
+ weekdaysShort : '周日_周一_周二_周三_周四_周五_周六'.split('_'),
+ weekdaysMin : '日_一_二_三_四_五_六'.split('_'),
+ longDateFormat : {
+ LT : 'HH:mm',
+ LTS : 'HH:mm:ss',
+ L : 'YYYY/MM/DD',
+ LL : 'YYYY年M月D日',
+ LLL : 'YYYY年M月D日Ah点mm分',
+ LLLL : 'YYYY年M月D日ddddAh点mm分',
+ l : 'YYYY/M/D',
+ ll : 'YYYY年M月D日',
+ lll : 'YYYY年M月D日 HH:mm',
+ llll : 'YYYY年M月D日dddd HH:mm'
+ },
+ meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
+ meridiemHour: function (hour, meridiem) {
+ if (hour === 12) {
+ hour = 0;
+ }
+ if (meridiem === '凌晨' || meridiem === '早上' ||
+ meridiem === '上午') {
+ return hour;
+ } else if (meridiem === '下午' || meridiem === '晚上') {
+ return hour + 12;
+ } else {
+ // '中午'
+ return hour >= 11 ? hour : hour + 12;
+ }
+ },
+ meridiem : function (hour, minute, isLower) {
+ var hm = hour * 100 + minute;
+ if (hm < 600) {
+ return '凌晨';
+ } else if (hm < 900) {
+ return '早上';
+ } else if (hm < 1130) {
+ return '上午';
+ } else if (hm < 1230) {
+ return '中午';
+ } else if (hm < 1800) {
+ return '下午';
+ } else {
+ return '晚上';
+ }
+ },
+ calendar : {
+ sameDay : '[今天]LT',
+ nextDay : '[明天]LT',
+ nextWeek : '[下]ddddLT',
+ lastDay : '[昨天]LT',
+ lastWeek : '[上]ddddLT',
+ sameElse : 'L'
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(日|月|周)/,
+ ordinal : function (number, period) {
+ switch (period) {
+ case 'd':
+ case 'D':
+ case 'DDD':
+ return number + '日';
+ case 'M':
+ return number + '月';
+ case 'w':
+ case 'W':
+ return number + '周';
+ default:
+ return number;
+ }
+ },
+ relativeTime : {
+ future : '%s内',
+ past : '%s前',
+ s : '几秒',
+ ss : '%d 秒',
+ m : '1 分钟',
+ mm : '%d 分钟',
+ h : '1 小时',
+ hh : '%d 小时',
+ d : '1 天',
+ dd : '%d 天',
+ M : '1 个月',
+ MM : '%d 个月',
+ y : '1 年',
+ yy : '%d 年'
+ },
+ week : {
+ // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
+ dow : 1, // Monday is the first day of the week.
+ doy : 4 // The week that contains Jan 4th is the first week of the year.
+ }
+ });
+
+ return zhCn;
+
+ })));
+
+
+ /***/ }),
+ /* 81 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ exports.__esModule = true;
+
+ var _defineProperty = __webpack_require__(129);
+
+ var _defineProperty2 = _interopRequireDefault(_defineProperty);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ exports.default = function (obj, key, value) {
+ if (key in obj) {
+ (0, _defineProperty2.default)(obj, key, {
+ value: value,
+ enumerable: true,
+ configurable: true,
+ writable: true
+ });
+ } else {
+ obj[key] = value;
+ }
+
+ return obj;
+ };
+
+ /***/ }),
+ /* 82 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ // optional / simple context binding
+ var aFunction = __webpack_require__(403);
+ module.exports = function (fn, that, length) {
+ aFunction(fn);
+ if (that === undefined) return fn;
+ switch (length) {
+ case 1: return function (a) {
+ return fn.call(that, a);
+ };
+ case 2: return function (a, b) {
+ return fn.call(that, a, b);
+ };
+ case 3: return function (a, b, c) {
+ return fn.call(that, a, b, c);
+ };
+ }
+ return function (/* ...args */) {
+ return fn.apply(that, arguments);
+ };
+ };
+
+
+ /***/ }),
+ /* 83 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ // 7.1.1 ToPrimitive(input [, PreferredType])
+ var isObject = __webpack_require__(40);
+ // instead of the ES6 spec version, we didn't implement @@toPrimitive case
+ // and the second argument - flag - preferred type is a string
+ module.exports = function (it, S) {
+ if (!isObject(it)) return it;
+ var fn, val;
+ if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
+ if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
+ if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
+ throw TypeError("Can't convert object to primitive value");
+ };
+
+
+ /***/ }),
+ /* 84 */
+ /***/ (function(module, exports) {
+
+ var toString = {}.toString;
+
+ module.exports = function (it) {
+ return toString.call(it).slice(8, -1);
+ };
+
+
+ /***/ }),
+ /* 85 */
+ /***/ (function(module, exports) {
+
+ // 7.2.1 RequireObjectCoercible(argument)
+ module.exports = function (it) {
+ if (it == undefined) throw TypeError("Can't call method on " + it);
+ return it;
+ };
+
+
+ /***/ }),
+ /* 86 */
+ /***/ (function(module, exports) {
+
+ // 7.1.4 ToInteger
+ var ceil = Math.ceil;
+ var floor = Math.floor;
+ module.exports = function (it) {
+ return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
+ };
+
+
+ /***/ }),
+ /* 87 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ var shared = __webpack_require__(88)('keys');
+ var uid = __webpack_require__(66);
+ module.exports = function (key) {
+ return shared[key] || (shared[key] = uid(key));
+ };
+
+
+ /***/ }),
+ /* 88 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ var core = __webpack_require__(16);
+ var global = __webpack_require__(23);
+ var SHARED = '__core-js_shared__';
+ var store = global[SHARED] || (global[SHARED] = {});
+
+ (module.exports = function (key, value) {
+ return store[key] || (store[key] = value !== undefined ? value : {});
+ })('versions', []).push({
+ version: core.version,
+ mode: __webpack_require__(65) ? 'pure' : 'global',
+ copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
+ });
+
+
+ /***/ }),
+ /* 89 */
+ /***/ (function(module, exports) {
+
+ // IE 8- don't enum bug keys
+ module.exports = (
+ 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
+ ).split(',');
+
+
+ /***/ }),
+ /* 90 */
+ /***/ (function(module, exports) {
+
+ exports.f = Object.getOwnPropertySymbols;
+
+
+ /***/ }),
+ /* 91 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ // 7.1.13 ToObject(argument)
+ var defined = __webpack_require__(85);
+ module.exports = function (it) {
+ return Object(defined(it));
+ };
+
+
+ /***/ }),
+ /* 92 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
+ var anObject = __webpack_require__(39);
+ var dPs = __webpack_require__(415);
+ var enumBugKeys = __webpack_require__(89);
+ var IE_PROTO = __webpack_require__(87)('IE_PROTO');
+ var Empty = function () { /* empty */ };
+ var PROTOTYPE = 'prototype';
+
+ // Create object with fake `null` prototype: use iframe Object with cleared prototype
+ var createDict = function () {
+ // Thrash, waste and sodomy: IE GC bug
+ var iframe = __webpack_require__(131)('iframe');
+ var i = enumBugKeys.length;
+ var lt = '<';
+ var gt = '>';
+ var iframeDocument;
+ iframe.style.display = 'none';
+ __webpack_require__(416).appendChild(iframe);
+ iframe.src = 'javascript:'; // eslint-disable-line no-script-url
+ // createDict = iframe.contentWindow.Object;
+ // html.removeChild(iframe);
+ iframeDocument = iframe.contentWindow.document;
+ iframeDocument.open();
+ iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
+ iframeDocument.close();
+ createDict = iframeDocument.F;
+ while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
+ return createDict();
+ };
+
+ module.exports = Object.create || function create(O, Properties) {
+ var result;
+ if (O !== null) {
+ Empty[PROTOTYPE] = anObject(O);
+ result = new Empty();
+ Empty[PROTOTYPE] = null;
+ // add "__proto__" for Object.getPrototypeOf polyfill
+ result[IE_PROTO] = O;
+ } else result = createDict();
+ return Properties === undefined ? result : dPs(result, Properties);
+ };
+
+
+ /***/ }),
+ /* 93 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ var def = __webpack_require__(24).f;
+ var has = __webpack_require__(30);
+ var TAG = __webpack_require__(17)('toStringTag');
+
+ module.exports = function (it, tag, stat) {
+ if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
+ };
+
+
+ /***/ }),
+ /* 94 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ exports.f = __webpack_require__(17);
+
+
+ /***/ }),
+ /* 95 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ var global = __webpack_require__(23);
+ var core = __webpack_require__(16);
+ var LIBRARY = __webpack_require__(65);
+ var wksExt = __webpack_require__(94);
+ var defineProperty = __webpack_require__(24).f;
+ module.exports = function (name) {
+ var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
+ if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });
+ };
+
+
+ /***/ }),
+ /* 96 */
+ /***/ (function(module, exports) {
+
+ /**
+ * Checks if `value` is classified as an `Array` object.
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
+ * @example
+ *
+ * _.isArray([1, 2, 3]);
+ * // => true
+ *
+ * _.isArray(document.body.children);
+ * // => false
+ *
+ * _.isArray('abc');
+ * // => false
+ *
+ * _.isArray(_.noop);
+ * // => false
+ */
+ var isArray = Array.isArray;
+
+ module.exports = isArray;
+
+
+ /***/ }),
+ /* 97 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ var baseGetTag = __webpack_require__(143),
+ isObjectLike = __webpack_require__(474);
+
+ /** `Object#toString` result references. */
+ var symbolTag = '[object Symbol]';
+
+ /**
+ * Checks if `value` is classified as a `Symbol` primitive or object.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
+ * @example
+ *
+ * _.isSymbol(Symbol.iterator);
+ * // => true
+ *
+ * _.isSymbol('abc');
+ * // => false
+ */
+ function isSymbol(value) {
+ return typeof value == 'symbol' ||
+ (isObjectLike(value) && baseGetTag(value) == symbolTag);
+ }
+
+ module.exports = isSymbol;
+
+
+ /***/ }),
+ /* 98 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ var root = __webpack_require__(68);
+
+ /** Built-in value references. */
+ var Symbol = root.Symbol;
+
+ module.exports = Symbol;
+
+
+ /***/ }),
+ /* 99 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ var baseIsNative = __webpack_require__(482),
+ getValue = __webpack_require__(487);
+
+ /**
+ * Gets the native function at `key` of `object`.
+ *
+ * @private
+ * @param {Object} object The object to query.
+ * @param {string} key The key of the method to get.
+ * @returns {*} Returns the function if it's native, else `undefined`.
+ */
+ function getNative(object, key) {
+ var value = getValue(object, key);
+ return baseIsNative(value) ? value : undefined;
+ }
+
+ module.exports = getNative;
+
+
+ /***/ }),
+ /* 100 */
+ /***/ (function(module, exports) {
+
+ /**
+ * Checks if `value` is the
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
+ *
+ * @static
+ * @memberOf _
+ * @since 0.1.0
+ * @category Lang
+ * @param {*} value The value to check.
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
+ * @example
+ *
+ * _.isObject({});
+ * // => true
+ *
+ * _.isObject([1, 2, 3]);
+ * // => true
+ *
+ * _.isObject(_.noop);
+ * // => true
+ *
+ * _.isObject(null);
+ * // => false
+ */
+ function isObject(value) {
+ var type = typeof value;
+ return value != null && (type == 'object' || type == 'function');
+ }
+
+ module.exports = isObject;
+
+
+ /***/ }),
+ /* 101 */
+ /***/ (function(module, exports) {
+
+ /**
+ * Performs a
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
+ * comparison between two values to determine if they are equivalent.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to compare.
+ * @param {*} other The other value to compare.
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
+ * @example
+ *
+ * var object = { 'a': 1 };
+ * var other = { 'a': 1 };
+ *
+ * _.eq(object, object);
+ * // => true
+ *
+ * _.eq(object, other);
+ * // => false
+ *
+ * _.eq('a', 'a');
+ * // => true
+ *
+ * _.eq('a', Object('a'));
+ * // => false
+ *
+ * _.eq(NaN, NaN);
+ * // => true
+ */
+ function eq(value, other) {
+ return value === other || (value !== value && other !== other);
+ }
+
+ module.exports = eq;
+
+
+ /***/ }),
+ /* 102 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _Select = __webpack_require__(541);
+
+ var _Select2 = _interopRequireDefault(_Select);
+
+ var _Option = __webpack_require__(109);
+
+ var _Option2 = _interopRequireDefault(_Option);
+
+ var _PropTypes = __webpack_require__(178);
+
+ var _OptGroup = __webpack_require__(179);
+
+ var _OptGroup2 = _interopRequireDefault(_OptGroup);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+ _Select2["default"].Option = _Option2["default"];
+ _Select2["default"].OptGroup = _OptGroup2["default"];
+ exports["default"] = _Select2["default"];
+ module.exports = exports['default'];
+
+ /***/ }),
+ /* 103 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ exports.__esModule = true;
+ exports.default = createChainableTypeChecker;
+ /**
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ */
+
+ // Mostly taken from ReactPropTypes.
+
+ /* This source code is quoted from rc-util.
+ * homepage: https://github.com/react-component/util
+ */
+
+ function createChainableTypeChecker(validate) {
+ function checkType(isRequired, props, propName, componentName, location, propFullName) {
+ var componentNameSafe = componentName || '<>';
+ var propFullNameSafe = propFullName || propName;
+
+ if (props[propName] == null) {
+ if (isRequired) {
+ return new Error('Required ' + location + ' `' + propFullNameSafe + '` was not specified ' + ('in `' + componentNameSafe + '`.'));
+ }
+
+ return null;
+ }
+
+ for (var _len = arguments.length, args = Array(_len > 6 ? _len - 6 : 0), _key = 6; _key < _len; _key++) {
+ args[_key - 6] = arguments[_key];
+ }
+
+ return validate.apply(undefined, [props, propName, componentNameSafe, location, propFullNameSafe].concat(args));
+ }
+
+ var chainedCheckType = checkType.bind(null, false);
+ chainedCheckType.isRequired = checkType.bind(null, true);
+
+ return chainedCheckType;
+ }
+
+ /***/ }),
+ /* 104 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ exports.__esModule = true;
+ exports.default = splitComponentProps;
+ /**
+ * This source code is quoted from rc-util.
+ * homepage: https://github.com/react-component/util
+ */
+ function _objectEntries(obj) {
+ var entries = [];
+ var keys = Object.keys(obj);
+
+ for (var k = 0; k < keys.length; ++k) {
+ entries.push([keys[k], obj[keys[k]]]);
+ }return entries;
+ }
+
+ /**
+ * 分割要传入父元素和子元素的props
+ * @param {[object]} props 传入的属性
+ * @param {[reactElement]} Component 组件
+ * @return {[array]} 返回数组,第一个元素为父元素props对象,第二个子元素props对象
+ */
+ function splitComponentProps(props, Component) {
+ var componentPropTypes = Component.propTypes;
+
+ var parentProps = {};
+ var childProps = {};
+
+ _objectEntries(props).forEach(function (_ref) {
+ var propName = _ref[0],
+ propValue = _ref[1];
+
+ if (componentPropTypes[propName]) {
+ parentProps[propName] = propValue;
+ } else {
+ childProps[propName] = propValue;
+ }
+ });
+
+ return [parentProps, childProps];
+ }
+
+ /***/ }),
+ /* 105 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ exports.__esModule = true;
+ exports.default = addEventListenerWrap;
+
+ var _addDomEventListener = __webpack_require__(72);
+
+ var _addDomEventListener2 = _interopRequireDefault(_addDomEventListener);
+
+ var _reactDom = __webpack_require__(4);
+
+ var _reactDom2 = _interopRequireDefault(_reactDom);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ /**
+ * This source code is quoted from rc-util.
+ * homepage: https://github.com/react-component/util
+ */
+ function addEventListenerWrap(target, eventType, cb) {
+ /* eslint camelcase: 2 */
+ var callback = _reactDom2.default.unstable_batchedUpdates ? function run(e) {
+ _reactDom2.default.unstable_batchedUpdates(cb, e);
+ } : cb;
+ return (0, _addDomEventListener2.default)(target, eventType, callback);
+ }
+
+ /***/ }),
+ /* 106 */
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+ "use strict";
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__ = __webpack_require__(6);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass__ = __webpack_require__(21);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass__);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(7);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__ = __webpack_require__(8);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react_dom__ = __webpack_require__(4);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react_dom__);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(1);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__);
+
+
+
+
+
+
+
+
+ var ContainerRender = function (_React$Component) {
+ __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default()(ContainerRender, _React$Component);
+
+ function ContainerRender() {
+ var _ref;
+
+ var _temp, _this, _ret;
+
+ __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default()(this, ContainerRender);
+
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ return _ret = (_temp = (_this = __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default()(this, (_ref = ContainerRender.__proto__ || Object.getPrototypeOf(ContainerRender)).call.apply(_ref, [this].concat(args))), _this), _this.removeContainer = function () {
+ if (_this.container) {
+ __WEBPACK_IMPORTED_MODULE_5_react_dom___default.a.unmountComponentAtNode(_this.container);
+ _this.container.parentNode.removeChild(_this.container);
+ _this.container = null;
+ }
+ }, _this.renderComponent = function (props, ready) {
+ var _this$props = _this.props,
+ visible = _this$props.visible,
+ getComponent = _this$props.getComponent,
+ forceRender = _this$props.forceRender,
+ getContainer = _this$props.getContainer,
+ parent = _this$props.parent;
+
+ if (visible || parent._component || forceRender) {
+ if (!_this.container) {
+ _this.container = getContainer();
+ }
+ __WEBPACK_IMPORTED_MODULE_5_react_dom___default.a.unstable_renderSubtreeIntoContainer(parent, getComponent(props), _this.container, function callback() {
+ if (ready) {
+ ready.call(this);
+ }
+ });
+ }
+ }, _temp), __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default()(_this, _ret);
+ }
+
+ __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass___default()(ContainerRender, [{
+ key: 'componentDidMount',
+ value: function componentDidMount() {
+ if (this.props.autoMount) {
+ this.renderComponent();
+ }
+ }
+ }, {
+ key: 'componentDidUpdate',
+ value: function componentDidUpdate() {
+ if (this.props.autoMount) {
+ this.renderComponent();
+ }
+ }
+ }, {
+ key: 'componentWillUnmount',
+ value: function componentWillUnmount() {
+ if (this.props.autoDestroy) {
+ this.removeContainer();
+ }
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ return this.props.children({
+ renderComponent: this.renderComponent,
+ removeContainer: this.removeContainer
+ });
+ }
+ }]);
+
+ return ContainerRender;
+ }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component);
+
+ ContainerRender.propTypes = {
+ autoMount: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
+ autoDestroy: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
+ visible: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
+ forceRender: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
+ parent: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
+ getComponent: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func.isRequired,
+ getContainer: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func.isRequired,
+ children: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func.isRequired
+ };
+ ContainerRender.defaultProps = {
+ autoMount: true,
+ autoDestroy: true,
+ forceRender: false
+ };
+ /* harmony default export */ __webpack_exports__["a"] = (ContainerRender);
+
+ /***/ }),
+ /* 107 */
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+ "use strict";
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__ = __webpack_require__(6);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass__ = __webpack_require__(21);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass__);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(7);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__ = __webpack_require__(8);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react_dom__ = __webpack_require__(4);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react_dom__);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(1);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__);
+
+
+
+
+
+
+
+
+ var Portal = function (_React$Component) {
+ __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default()(Portal, _React$Component);
+
+ function Portal() {
+ __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default()(this, Portal);
+
+ return __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default()(this, (Portal.__proto__ || Object.getPrototypeOf(Portal)).apply(this, arguments));
+ }
+
+ __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass___default()(Portal, [{
+ key: 'componentDidMount',
+ value: function componentDidMount() {
+ this.createContainer();
+ }
+ }, {
+ key: 'componentDidUpdate',
+ value: function componentDidUpdate(prevProps) {
+ var didUpdate = this.props.didUpdate;
+
+ if (didUpdate) {
+ didUpdate(prevProps);
+ }
+ }
+ }, {
+ key: 'componentWillUnmount',
+ value: function componentWillUnmount() {
+ this.removeContainer();
+ }
+ }, {
+ key: 'createContainer',
+ value: function createContainer() {
+ this._container = this.props.getContainer();
+ this.forceUpdate();
+ }
+ }, {
+ key: 'removeContainer',
+ value: function removeContainer() {
+ if (this._container) {
+ this._container.parentNode.removeChild(this._container);
+ }
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ if (this._container) {
+ return __WEBPACK_IMPORTED_MODULE_5_react_dom___default.a.createPortal(this.props.children, this._container);
+ }
+ return null;
+ }
+ }]);
+
+ return Portal;
+ }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component);
+
+ Portal.propTypes = {
+ getContainer: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func.isRequired,
+ children: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.node.isRequired,
+ didUpdate: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func
+ };
+ /* harmony default export */ __webpack_exports__["a"] = (Portal);
+
+ /***/ }),
+ /* 108 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ module.exports = __webpack_require__(588);
+
+ /***/ }),
+ /* 109 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -87478,23 +74964,2529 @@
var _react2 = _interopRequireDefault(_react);
- var _reactDom = __webpack_require__(4);
+ var _propTypes = __webpack_require__(1);
- var _reactDom2 = _interopRequireDefault(_reactDom);
+ var _propTypes2 = _interopRequireDefault(_propTypes);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+ function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); } /**
+ * This source code is quoted from rc-select.
+ * homepage: https://github.com/react-component/select
+ */
+
+
+ var Option = function (_React$Component) {
+ _inherits(Option, _React$Component);
+
+ function Option() {
+ _classCallCheck(this, Option);
+
+ return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
+ }
+
+ return Option;
+ }(_react2["default"].Component);
+
+ Option.propTypes = {
+ value: _propTypes2["default"].oneOfType([_propTypes2["default"].string, _propTypes2["default"].number])
+ };
+ Option.isSelectOption = true;
+ exports["default"] = Option;
+ module.exports = exports['default'];
+
+ /***/ }),
+ /* 110 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ exports.UNSELECTABLE_ATTRIBUTE = exports.UNSELECTABLE_STYLE = undefined;
+
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
+
+ exports.toTitle = toTitle;
+ exports.getValuePropValue = getValuePropValue;
+ exports.getPropValue = getPropValue;
+ exports.isMultiple = isMultiple;
+ exports.isCombobox = isCombobox;
+ exports.isMultipleOrTags = isMultipleOrTags;
+ exports.isMultipleOrTagsOrCombobox = isMultipleOrTagsOrCombobox;
+ exports.isSingleMode = isSingleMode;
+ exports.toArray = toArray;
+ exports.getMapKey = getMapKey;
+ exports.preventDefaultEvent = preventDefaultEvent;
+ exports.findIndexInValueBySingleValue = findIndexInValueBySingleValue;
+ exports.getLabelFromPropsValue = getLabelFromPropsValue;
+ exports.getSelectKeys = getSelectKeys;
+ exports.findFirstMenuItem = findFirstMenuItem;
+ exports.includesSeparators = includesSeparators;
+ exports.splitBySeparators = splitBySeparators;
+ exports.defaultFilterFn = defaultFilterFn;
+ exports.validateOptionValue = validateOptionValue;
+ exports.saveRef = saveRef;
+
+ var _react = __webpack_require__(0);
+
+ var _react2 = _interopRequireDefault(_react);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+ function toTitle(title) {
+ if (typeof title === 'string') {
+ return title;
+ }
+ return null;
+ }
+
+ function getValuePropValue(child) {
+ if (!child) {
+ return null;
+ }
+
+ var props = child.props;
+ if ('value' in props) {
+ return props.value;
+ }
+ if (child.key) {
+ return child.key;
+ }
+ if (child.type && child.type.isSelectOptGroup && props.label) {
+ return props.label;
+ }
+ throw new Error('Need at least a key or a value or a label (only for OptGroup) for ' + child);
+ }
+
+ function getPropValue(child, prop) {
+ if (prop === 'value') {
+ return getValuePropValue(child);
+ }
+ return child.props[prop];
+ }
+
+ function isMultiple(props) {
+ return props.multiple;
+ }
+
+ function isCombobox(props) {
+ return props.combobox;
+ }
+
+ function isMultipleOrTags(props) {
+ return props.multiple || props.tags;
+ }
+
+ function isMultipleOrTagsOrCombobox(props) {
+ return isMultipleOrTags(props) || isCombobox(props);
+ }
+
+ function isSingleMode(props) {
+ return !isMultipleOrTagsOrCombobox(props);
+ }
+
+ function toArray(value) {
+ var ret = value;
+ if (value === undefined) {
+ ret = [];
+ } else if (!Array.isArray(value)) {
+ ret = [value];
+ }
+ return ret;
+ }
+
+ function getMapKey(value) {
+ return (typeof value === 'undefined' ? 'undefined' : _typeof(value)) + '-' + value;
+ }
+
+ function preventDefaultEvent(e) {
+ e.preventDefault();
+ }
+
+ function findIndexInValueBySingleValue(value, singleValue) {
+ var index = -1;
+ for (var i = 0; i < value.length; i++) {
+ if (value[i] === singleValue) {
+ index = i;
+ break;
+ }
+ }
+ return index;
+ }
+
+ function getLabelFromPropsValue(value, key) {
+ var label = void 0;
+ value = toArray(value);
+ for (var i = 0; i < value.length; i++) {
+ if (value[i].key === key) {
+ label = value[i].label;
+ break;
+ }
+ }
+ return label;
+ }
+
+ function getSelectKeys(menuItems, value) {
+ if (value === null || value === undefined) {
+ return [];
+ }
+ var selectedKeys = [];
+ _react2["default"].Children.forEach(menuItems, function (item) {
+ if (item.type.isMenuItemGroup) {
+ selectedKeys = selectedKeys.concat(getSelectKeys(item.props.children, value));
+ } else {
+ var itemValue = getValuePropValue(item);
+ var itemKey = item.key;
+ if (findIndexInValueBySingleValue(value, itemValue) !== -1 && itemKey) {
+ selectedKeys.push(itemKey);
+ }
+ }
+ });
+ return selectedKeys;
+ }
+
+ var UNSELECTABLE_STYLE = exports.UNSELECTABLE_STYLE = {
+ userSelect: 'none',
+ WebkitUserSelect: 'none'
+ };
+
+ var UNSELECTABLE_ATTRIBUTE = exports.UNSELECTABLE_ATTRIBUTE = {
+ unselectable: 'on'
+ };
+
+ function findFirstMenuItem(children) {
+ for (var i = 0; i < children.length; i++) {
+ var child = children[i];
+ if (child.type.isMenuItemGroup) {
+ var found = findFirstMenuItem(child.props.children);
+ if (found) {
+ return found;
+ }
+ } else if (!child.props.disabled) {
+ return child;
+ }
+ }
+ return null;
+ }
+
+ function includesSeparators(string, separators) {
+ for (var i = 0; i < separators.length; ++i) {
+ if (string.lastIndexOf(separators[i]) > 0) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ function splitBySeparators(string, separators) {
+ var reg = new RegExp('[' + separators.join() + ']');
+ return string.split(reg).filter(function (token) {
+ return token;
+ });
+ }
+
+ function defaultFilterFn(input, child) {
+ if (child.props.disabled) {
+ return false;
+ }
+ var value = toArray(getPropValue(child, this.props.optionFilterProp)).join('');
+ return value.toLowerCase().indexOf(input.toLowerCase()) > -1;
+ }
+
+ function validateOptionValue(value, props) {
+ if (isSingleMode(props) || isMultiple(props)) {
+ return;
+ }
+ if (typeof value !== 'string') {
+ throw new Error('Invalid `value` of type `' + (typeof value === 'undefined' ? 'undefined' : _typeof(value)) + '` supplied to Option, ' + 'expected `string` when `tags/combobox` is `true`.');
+ }
+ }
+
+ function saveRef(instance, name) {
+ return function (node) {
+ instance[name] = node;
+ };
+ }
+
+ /***/ }),
+ /* 111 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+ var _contains = __webpack_require__(47);
+
+ var _contains2 = _interopRequireDefault(_contains);
+
+ var _react = __webpack_require__(0);
+
+ var _react2 = _interopRequireDefault(_react);
var _propTypes = __webpack_require__(1);
var _propTypes2 = _interopRequireDefault(_propTypes);
- var _ownerDocument = __webpack_require__(53);
+ var _reactDom = __webpack_require__(4);
+
+ var _reactDom2 = _interopRequireDefault(_reactDom);
+
+ var _warning = __webpack_require__(18);
+
+ var _warning2 = _interopRequireDefault(_warning);
+
+ var _Portal = __webpack_require__(48);
+
+ var _Portal2 = _interopRequireDefault(_Portal);
+
+ var _Overlay = __webpack_require__(113);
+
+ var _Overlay2 = _interopRequireDefault(_Overlay);
+
+ var _createChainedFunction = __webpack_require__(645);
+
+ var _createChainedFunction2 = _interopRequireDefault(_createChainedFunction);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+ function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
+
+ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
+
+ var isReact16 = _reactDom2["default"].createPortal !== undefined;
+ var createPortal = isReact16 ? _reactDom2["default"].createPortal : _reactDom2["default"].unstable_renderSubtreeIntoContainer;
+
+ /**
+ * 检查值是属于这个值,还是等于这个值
+ *
+ * @param {string} one
+ * @param {string|array} of
+ * @returns {boolean}
+ */
+ function isOneOf(one, of) {
+ if (Array.isArray(of)) {
+ return of.indexOf(one) >= 0;
+ }
+ return one === of;
+ }
+
+ var triggerType = _propTypes2["default"].oneOf(['click', 'hover', 'focus']);
+
+ var propTypes = _extends({}, _Portal2["default"].propTypes, _Overlay2["default"].propTypes, {
+
+ /**
+ * 指定哪些操作或操作触发叠加层可见性
+ */
+ trigger: _propTypes2["default"].oneOfType([triggerType, _propTypes2["default"].arrayOf(triggerType)]),
+
+ /**
+ * 显示和隐藏覆盖一旦触发的毫秒延迟量
+ */
+ delay: _propTypes2["default"].number,
+ /**
+ * 触发后显示叠加层之前的延迟毫秒
+ */
+ delayShow: _propTypes2["default"].number,
+ /**
+ * 触发后隐藏叠加层的延迟毫秒
+ */
+ delayHide: _propTypes2["default"].number,
+
+ // FIXME: This should be `defaultShow`.
+ /**
+ * 覆盖的初始可见性状态。对于更细微的可见性控制,请考虑直接使用覆盖组件。
+ */
+ defaultOverlayShown: _propTypes2["default"].bool,
+ visible: _propTypes2["default"].bool,
+
+ /**
+ * 要覆盖在目标旁边的元素或文本。
+ */
+ overlay: _propTypes2["default"].node.isRequired,
+
+ /**
+ * @private
+ */
+ onBlur: _propTypes2["default"].func,
+ /**
+ * @private
+ */
+ onClick: _propTypes2["default"].func,
+ /**
+ * @private
+ */
+ onFocus: _propTypes2["default"].func,
+ /**
+ * @private
+ */
+ onMouseOut: _propTypes2["default"].func,
+ /**
+ * @private
+ */
+ onMouseOver: _propTypes2["default"].func,
+
+ // Overridden props from ``.
+ /**
+ * @private
+ */
+ target: _propTypes2["default"].oneOf([null]),
+ /**
+ * @private
+ */
+ onHide: _propTypes2["default"].oneOf([null]),
+ /**
+ * @private
+ */
+ show: _propTypes2["default"].oneOf([null])
+ });
+
+ var defaultProps = {
+ defaultOverlayShown: false,
+ trigger: ['hover', 'focus']
+ };
+
+ var OverlayTrigger = function (_Component) {
+ _inherits(OverlayTrigger, _Component);
+
+ function OverlayTrigger(props, context) {
+ _classCallCheck(this, OverlayTrigger);
+
+ var _this = _possibleConstructorReturn(this, _Component.call(this, props, context));
+
+ _this.handleToggle = _this.handleToggle.bind(_this);
+ _this.handleDelayedShow = _this.handleDelayedShow.bind(_this);
+ _this.handleDelayedHide = _this.handleDelayedHide.bind(_this);
+ _this.handleHide = _this.handleHide.bind(_this);
+ _this.makeOverlay = _this.makeOverlay.bind(_this);
+
+ _this.handleMouseOver = function (e) {
+ return _this.handleMouseOverOut(_this.handleDelayedShow, e);
+ };
+ _this.handleMouseOut = function (e) {
+ return _this.handleMouseOverOut(_this.handleDelayedHide, e);
+ };
+
+ _this._mountNode = null;
+
+ var visible = void 0;
+ if ('visible' in props) {
+ visible = !!props.visible;
+ } else {
+ visible = !!props.defaultOverlayShown;
+ }
+
+ _this.state = {
+ show: visible
+ };
+ return _this;
+ }
+
+ OverlayTrigger.prototype.componentDidMount = function componentDidMount() {
+ this._mountNode = document.createElement('div');
+ !isReact16 && this.renderOverlay();
+ };
+
+ OverlayTrigger.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
+ !isReact16 && this.renderOverlay();
+ if ('visible' in this.props && prevProps.visible !== this.props.visible) {
+ this.setState({
+ show: this.props.visible
+ });
+ }
+ if ('isHoverShow' in this.props && prevProps.isHoverShow !== this.props.isHoverShow) {
+ this.setState({
+ show: this.props.isHoverShow
+ });
+ }
+ };
+
+ OverlayTrigger.prototype.componentWillUnmount = function componentWillUnmount() {
+ !isReact16 && _reactDom2["default"].unmountComponentAtNode(this._mountNode);
+ this._mountNode = null;
+ // 加判断去掉 clearTimeout
+ this._hoverShowDelay && clearTimeout(this._hoverShowDelay);
+ this._hoverShowDelay && clearTimeout(this._hoverHideDelay);
+ };
+
+ OverlayTrigger.prototype.handleToggle = function handleToggle() {
+ if (this.state.show) {
+ this.hide();
+ } else {
+ this.show();
+ }
+ };
+
+ OverlayTrigger.prototype.handleDelayedShow = function handleDelayedShow() {
+ var _this2 = this;
+
+ if (this._hoverHideDelay != null) {
+ clearTimeout(this._hoverHideDelay);
+ this._hoverHideDelay = null;
+ return;
+ }
+
+ if (this.state.show || this._hoverShowDelay != null) {
+ return;
+ }
+
+ var delay = this.props.delayShow != null ? this.props.delayShow : this.props.delay;
+
+ if (!delay) {
+ this.show();
+ return;
+ }
+
+ this._hoverShowDelay = setTimeout(function () {
+ _this2._hoverShowDelay = null;
+ _this2.show();
+ }, delay);
+ };
+
+ OverlayTrigger.prototype.handleDelayedHide = function handleDelayedHide() {
+ var _this3 = this;
+
+ if (this._hoverShowDelay != null) {
+ clearTimeout(this._hoverShowDelay);
+ this._hoverShowDelay = null;
+ return;
+ }
+
+ if (!this.state.show || this._hoverHideDelay != null) {
+ return;
+ }
+
+ var delay = this.props.delayHide != null ? this.props.delayHide : this.props.delay;
+
+ if (!delay) {
+ this.hide();
+ return;
+ }
+
+ this._hoverHideDelay = setTimeout(function () {
+ _this3._hoverHideDelay = null;
+ _this3.hide();
+ }, delay);
+ };
+
+ // 简单实现mouseEnter和mouseLeave。
+ // React的内置版本是有问题的:https://github.com/facebook/react/issues/4251
+ //在触发器被禁用的情况下,mouseOut / Over可能导致闪烁
+ //从一个子元素移动到另一个子元素。
+
+
+ OverlayTrigger.prototype.handleMouseOverOut = function handleMouseOverOut(handler, e) {
+ var target = e.currentTarget;
+ var related = e.relatedTarget || e.nativeEvent.toElement;
+
+ if (!related || related !== target && !(0, _contains2["default"])(target, related)) {
+ handler(e);
+ }
+ };
+
+ OverlayTrigger.prototype.handleHide = function handleHide() {
+ this.hide();
+ };
+
+ OverlayTrigger.prototype.show = function show() {
+ this.setState({ show: true });
+ };
+
+ OverlayTrigger.prototype.hide = function hide() {
+ this.setState({ show: false });
+ };
+
+ OverlayTrigger.prototype.makeOverlay = function makeOverlay(overlay, props) {
+ return _react2["default"].createElement(
+ _Overlay2["default"],
+ _extends({}, props, {
+ show: this.state.show,
+ onHide: this.handleHide,
+ target: this
+ }),
+ overlay
+ );
+ };
+
+ OverlayTrigger.prototype.renderOverlay = function renderOverlay() {
+ _reactDom2["default"].unstable_renderSubtreeIntoContainer(this, this._overlay, this._mountNode);
+ };
+
+ OverlayTrigger.prototype.render = function render() {
+ var _props = this.props,
+ trigger = _props.trigger,
+ overlay = _props.overlay,
+ children = _props.children,
+ onBlur = _props.onBlur,
+ onClick = _props.onClick,
+ onFocus = _props.onFocus,
+ onMouseOut = _props.onMouseOut,
+ onMouseOver = _props.onMouseOver,
+ props = _objectWithoutProperties(_props, ['trigger', 'overlay', 'children', 'onBlur', 'onClick', 'onFocus', 'onMouseOut', 'onMouseOver']);
+
+ delete props.delay;
+ delete props.delayShow;
+ delete props.delayHide;
+ delete props.defaultOverlayShown;
+
+ var child = _react2["default"].Children.only(children);
+ var childProps = child.props;
+
+ var triggerProps = {
+ 'aria-describedby': overlay.props.id
+ };
+
+ // FIXME: 这里用于传递这个组件上的处理程序的逻辑是不一致的。我们不应该通过任何这些道具。
+
+ triggerProps.onClick = (0, _createChainedFunction2["default"])(childProps.onClick, onClick);
+
+ if (isOneOf('click', trigger) && !('visible' in this.props)) {
+ triggerProps.onClick = (0, _createChainedFunction2["default"])(triggerProps.onClick, this.handleToggle);
+ }
+
+ if (isOneOf('hover', trigger) && !('visible' in this.props)) {
+ (0, _warning2["default"])(!(trigger === 'hover'), '[react-bootstrap] Specifying only the `"hover"` trigger limits the ' + 'visibility of the overlay to just mouse users. Consider also ' + 'including the `"focus"` trigger so that touch and keyboard only ' + 'users can see the overlay as well.');
+
+ triggerProps.onMouseOver = (0, _createChainedFunction2["default"])(childProps.onMouseOver, onMouseOver, this.handleMouseOver);
+ triggerProps.onMouseOut = (0, _createChainedFunction2["default"])(childProps.onMouseOut, onMouseOut, this.handleMouseOut);
+ }
+
+ if (isOneOf('focus', trigger) && !('visible' in this.props)) {
+ triggerProps.onFocus = (0, _createChainedFunction2["default"])(childProps.onFocus, onFocus, this.handleDelayedShow);
+ triggerProps.onBlur = (0, _createChainedFunction2["default"])(childProps.onBlur, onBlur, this.handleDelayedHide);
+ }
+
+ this._overlay = this.makeOverlay(overlay, props);
+
+ if (!isReact16) {
+ return (0, _react.cloneElement)(child, triggerProps);
+ }
+ triggerProps.key = 'overlay';
+
+ var portal = _react2["default"].createElement(
+ _Portal2["default"],
+ {
+ key: 'portal',
+ container: props.container },
+ this._overlay
+ );
+
+ return [(0, _react.cloneElement)(child, triggerProps), portal];
+ };
+
+ return OverlayTrigger;
+ }(_react.Component);
+
+ OverlayTrigger.propTypes = propTypes;
+ OverlayTrigger.defaultProps = defaultProps;
+
+ exports["default"] = OverlayTrigger;
+ module.exports = exports['default'];
+
+ /***/ }),
+ /* 112 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ exports["default"] = getContainer;
+
+ var _reactDom = __webpack_require__(4);
+
+ var _reactDom2 = _interopRequireDefault(_reactDom);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+ /**
+ * 获取容器组件
+ * @param {[type]} container [description]
+ * @param {[type]} defaultContainer [description]
+ * @return {[type]} [description]
+ */
+ function getContainer(container, defaultContainer) {
+ container = typeof container === 'function' ? container() : container;
+ return _reactDom2["default"].findDOMNode(container) || defaultContainer;
+ }
+ module.exports = exports['default'];
+
+ /***/ }),
+ /* 113 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+ var _classnames = __webpack_require__(3);
+
+ var _classnames2 = _interopRequireDefault(_classnames);
+
+ var _react = __webpack_require__(0);
+
+ var _react2 = _interopRequireDefault(_react);
+
+ var _propTypes = __webpack_require__(1);
+
+ var _propTypes2 = _interopRequireDefault(_propTypes);
+
+ var _BaseOverlay = __webpack_require__(625);
+
+ var _BaseOverlay2 = _interopRequireDefault(_BaseOverlay);
+
+ var _tinperBeeCore = __webpack_require__(5);
+
+ var _Fade = __webpack_require__(643);
+
+ var _Fade2 = _interopRequireDefault(_Fade);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+ function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
+
+ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
+
+ var propTypes = _extends({}, _BaseOverlay2["default"].propTypes, {
+
+ /**
+ * 是否显示
+ */
+ show: _propTypes2["default"].bool,
+ /**
+ * 是
+ */
+ rootClose: _propTypes2["default"].bool,
+ /**
+ * 当点击rootClose触发close时的回调函数
+ */
+ onHide: _propTypes2["default"].func,
+
+ /**
+ * 使用动画
+ */
+ animation: _propTypes2["default"].oneOfType([_tinperBeeCore.elementType, _propTypes2["default"].func]),
+
+ /**
+ * Callback fired before the Overlay transitions in
+ */
+ onEnter: _propTypes2["default"].func,
+
+ /**
+ * Callback fired as the Overlay begins to transition in
+ */
+ onEntering: _propTypes2["default"].func,
+
+ /**
+ * Callback fired after the Overlay finishes transitioning in
+ */
+ onEntered: _propTypes2["default"].func,
+
+ /**
+ * Callback fired right before the Overlay transitions out
+ */
+ onExit: _propTypes2["default"].func,
+
+ /**
+ * Callback fired as the Overlay begins to transition out
+ */
+ onExiting: _propTypes2["default"].func,
+
+ /**
+ * Callback fired after the Overlay finishes transitioning out
+ */
+ onExited: _propTypes2["default"].func,
+
+ /**
+ * Sets the direction of the Overlay.
+ */
+ placement: _propTypes2["default"].oneOf(['top', 'right', 'bottom', 'left']),
+
+ /**
+ * 当Overlay在placement方向放不下时的第二优先级方向
+ */
+ secondPlacement: _propTypes2["default"].oneOf(['top', 'right', 'bottom', 'left'])
+ });
+
+ var defaultProps = {
+ animation: _Fade2["default"],
+ rootClose: false,
+ show: false,
+ placement: 'right'
+ };
+
+ var Overlay = function (_Component) {
+ _inherits(Overlay, _Component);
+
+ function Overlay() {
+ _classCallCheck(this, Overlay);
+
+ return _possibleConstructorReturn(this, _Component.apply(this, arguments));
+ }
+
+ Overlay.prototype.render = function render() {
+ var _props = this.props,
+ animation = _props.animation,
+ children = _props.children,
+ props = _objectWithoutProperties(_props, ['animation', 'children']);
+
+ var transition = animation === true ? _Fade2["default"] : animation || null;
+
+ var child = void 0;
+
+ if (!transition) {
+ child = (0, _react.cloneElement)(children, {
+ className: (0, _classnames2["default"])(children.props.className, 'in')
+ });
+ } else {
+ child = children;
+ }
+
+ return _react2["default"].createElement(
+ _BaseOverlay2["default"],
+ _extends({}, props, {
+ transition: transition
+ }),
+ child
+ );
+ };
+
+ return Overlay;
+ }(_react.Component);
+
+ Overlay.propTypes = propTypes;
+ Overlay.defaultProps = defaultProps;
+
+ exports["default"] = Overlay;
+ module.exports = exports['default'];
+
+ /***/ }),
+ /* 114 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ exports.EXITING = exports.ENTERED = exports.ENTERING = exports.EXITED = exports.UNMOUNTED = undefined;
+
+ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+ var _react = __webpack_require__(0);
+
+ var _react2 = _interopRequireDefault(_react);
+
+ var _reactDom = __webpack_require__(4);
+
+ var _reactDom2 = _interopRequireDefault(_reactDom);
+
+ var _properties = __webpack_require__(58);
+
+ var _properties2 = _interopRequireDefault(_properties);
+
+ var _on = __webpack_require__(59);
+
+ var _on2 = _interopRequireDefault(_on);
+
+ var _classnames = __webpack_require__(51);
+
+ var _classnames2 = _interopRequireDefault(_classnames);
+
+ var _propTypes = __webpack_require__(1);
+
+ var _propTypes2 = _interopRequireDefault(_propTypes);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+ function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
+
+ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
+
+ var transitionEndEvent = _properties2["default"].end;
+
+ //设置状态码
+ var UNMOUNTED = exports.UNMOUNTED = 0;
+ var EXITED = exports.EXITED = 1;
+ var ENTERING = exports.ENTERING = 2;
+ var ENTERED = exports.ENTERED = 3;
+ var EXITING = exports.EXITING = 4;
+
+ var propTypes = {
+ /**
+ * 是否触发动画
+ */
+ "in": _propTypes2["default"].bool,
+
+ /**
+ * 不显示的时候是否移除组件
+ */
+ unmountOnExit: _propTypes2["default"].bool,
+
+ /**
+ * 如果设置为默认显示,挂载时显示动画
+ */
+ transitionAppear: _propTypes2["default"].bool,
+
+ /**
+ * 设置超时时间,防止出现问题,可设置为>=动画时间
+ */
+ timeout: _propTypes2["default"].number,
+
+ /**
+ * 退出组件时添加的class
+ */
+ exitedClassName: _propTypes2["default"].string,
+ /**
+ * 退出组件中添加的class
+ */
+ exitingClassName: _propTypes2["default"].string,
+ /**
+ * 进入动画后添加的class
+ */
+ enteredClassName: _propTypes2["default"].string,
+ /**
+ * 进入动画时添加的class
+ */
+ enteringClassName: _propTypes2["default"].string,
+
+ /**
+ * 进入动画开始时的钩子函数
+ */
+ onEnter: _propTypes2["default"].func,
+ /**
+ * 进入动画中的钩子函数
+ */
+ onEntering: _propTypes2["default"].func,
+ /**
+ * 进入动画后的钩子函数
+ */
+ onEntered: _propTypes2["default"].func,
+ /**
+ * 退出动画开始时的钩子函数
+ */
+ onExit: _propTypes2["default"].func,
+ /**
+ * 退出动画中的钩子函数
+ */
+ onExiting: _propTypes2["default"].func,
+ /**
+ * 退出动画后的钩子函数
+ */
+ onExited: _propTypes2["default"].func
+ };
+
+ function noop() {}
+
+ var defaultProps = {
+ "in": false,
+ unmountOnExit: false,
+ transitionAppear: false,
+ timeout: 5000,
+ onEnter: noop,
+ onEntering: noop,
+ onEntered: noop,
+ onExit: noop,
+ onExiting: noop,
+ onExited: noop
+ };
+
+ /**
+ * 动画组件
+ */
+
+ var Transition = function (_Component) {
+ _inherits(Transition, _Component);
+
+ function Transition(props, context) {
+ _classCallCheck(this, Transition);
+
+ var _this = _possibleConstructorReturn(this, _Component.call(this, props, context));
+
+ var initialStatus = void 0;
+ if (props["in"]) {
+ // 在componentdidmount时开始执行动画
+ initialStatus = props.transitionAppear ? EXITED : ENTERED;
+ } else {
+ initialStatus = props.unmountOnExit ? UNMOUNTED : EXITED;
+ }
+ _this.state = { status: initialStatus };
+
+ _this.nextCallback = null;
+ return _this;
+ }
+
+ Transition.prototype.componentDidMount = function componentDidMount() {
+ if (this.props.transitionAppear && this.props["in"]) {
+ this.performEnter(this.props);
+ }
+ };
+
+ Transition.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
+ if (nextProps["in"] && this.props.unmountOnExit) {
+ if (this.state.status === UNMOUNTED) {
+ // 在componentDidUpdate执行动画.
+ this.setState({ status: EXITED });
+ }
+ } else {
+ this._needsUpdate = true;
+ }
+ };
+
+ Transition.prototype.componentDidUpdate = function componentDidUpdate() {
+ var status = this.state.status;
+
+ if (this.props.unmountOnExit && status === EXITED) {
+ // 当使用unmountOnExit时,exited为exiting和unmont的过渡状态
+ if (this.props["in"]) {
+ this.performEnter(this.props);
+ } else {
+ this.setState({ status: UNMOUNTED });
+ }
+
+ return;
+ }
+
+ // 确保只响应prop变化
+ if (this._needsUpdate) {
+ this._needsUpdate = false;
+
+ if (this.props["in"]) {
+ if (status === EXITING) {
+ this.performEnter(this.props);
+ } else if (status === EXITED) {
+ this.performEnter(this.props);
+ }
+ // 其他,当我们已经输入或输出
+ } else {
+ if (status === ENTERING || status === ENTERED) {
+ this.performExit(this.props);
+ }
+ // 我们已经输入或输出完成
+ }
+ }
+ };
+
+ Transition.prototype.componentWillUnmount = function componentWillUnmount() {
+ this.cancelNextCallback();
+ };
+
+ Transition.prototype.performEnter = function performEnter(props) {
+ var _this2 = this;
+
+ this.cancelNextCallback();
+ var node = _reactDom2["default"].findDOMNode(this);
+
+ // 这里接收新props
+ props.onEnter(node);
+
+ this.safeSetState({ status: ENTERING }, function () {
+ _this2.props.onEntering(node);
+
+ _this2.onTransitionEnd(node, function () {
+ _this2.safeSetState({ status: ENTERED }, function () {
+ _this2.props.onEntered(node);
+ });
+ });
+ });
+ };
+
+ Transition.prototype.performExit = function performExit(props) {
+ var _this3 = this;
+
+ this.cancelNextCallback();
+ var node = _reactDom2["default"].findDOMNode(this);
+
+ props.onExit(node);
+
+ this.safeSetState({ status: EXITING }, function () {
+ _this3.props.onExiting(node);
+
+ _this3.onTransitionEnd(node, function () {
+ _this3.safeSetState({ status: EXITED }, function () {
+ _this3.props.onExited(node);
+ });
+ });
+ });
+ };
+
+ Transition.prototype.cancelNextCallback = function cancelNextCallback() {
+ if (this.nextCallback !== null) {
+ this.nextCallback.cancel();
+ this.nextCallback = null;
+ }
+ };
+
+ Transition.prototype.safeSetState = function safeSetState(nextState, callback) {
+ // 确保在组件销毁后挂起的setState被消除
+ this.setState(nextState, this.setNextCallback(callback));
+ };
+
+ Transition.prototype.setNextCallback = function setNextCallback(callback) {
+ var _this4 = this;
+
+ var active = true;
+
+ this.nextCallback = function (event) {
+ if (active) {
+ active = false;
+ _this4.nextCallback = null;
+
+ callback(event);
+ }
+ };
+
+ this.nextCallback.cancel = function () {
+ active = false;
+ };
+
+ return this.nextCallback;
+ };
+
+ Transition.prototype.onTransitionEnd = function onTransitionEnd(node, handler) {
+ this.setNextCallback(handler);
+
+ if (node) {
+ if (transitionEndEvent == undefined) {
+ this.nextCallback();
+ } else {
+ (0, _on2["default"])(node, transitionEndEvent, this.nextCallback);
+ }
+ setTimeout(this.nextCallback, this.props.timeout);
+ } else {
+ setTimeout(this.nextCallback, 0);
+ }
+ };
+
+ Transition.prototype.render = function render() {
+ var status = this.state.status;
+ if (status === UNMOUNTED) {
+ return null;
+ }
+
+ var _props = this.props,
+ children = _props.children,
+ className = _props.className,
+ childProps = _objectWithoutProperties(_props, ['children', 'className']);
+
+ Object.keys(Transition.propTypes).forEach(function (key) {
+ return delete childProps[key];
+ });
+
+ var transitionClassName = void 0;
+ if (status === EXITED) {
+ transitionClassName = this.props.exitedClassName;
+ } else if (status === ENTERING) {
+ transitionClassName = this.props.enteringClassName;
+ } else if (status === ENTERED) {
+ transitionClassName = this.props.enteredClassName;
+ } else if (status === EXITING) {
+ transitionClassName = this.props.exitingClassName;
+ }
+
+ var child = _react2["default"].Children.only(children);
+ return _react2["default"].cloneElement(child, _extends({}, childProps, {
+ className: (0, _classnames2["default"])(child.props.className, className, transitionClassName)
+ }));
+ };
+
+ return Transition;
+ }(_react.Component);
+
+ Transition.propTypes = propTypes;
+
+ Transition.defaultProps = defaultProps;
+
+ exports["default"] = Transition;
+
+ /***/ }),
+ /* 115 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ exports.EXITING = exports.ENTERED = exports.ENTERING = exports.EXITED = exports.UNMOUNTED = undefined;
+
+ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+ var _react = __webpack_require__(0);
+
+ var _react2 = _interopRequireDefault(_react);
+
+ var _reactDom = __webpack_require__(4);
+
+ var _reactDom2 = _interopRequireDefault(_reactDom);
+
+ var _properties = __webpack_require__(58);
+
+ var _properties2 = _interopRequireDefault(_properties);
+
+ var _on = __webpack_require__(59);
+
+ var _on2 = _interopRequireDefault(_on);
+
+ var _classnames = __webpack_require__(3);
+
+ var _classnames2 = _interopRequireDefault(_classnames);
+
+ var _propTypes = __webpack_require__(1);
+
+ var _propTypes2 = _interopRequireDefault(_propTypes);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+ function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
+
+ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
+
+ var transitionEndEvent = _properties2["default"].end;
+
+ //设置状态码
+ var UNMOUNTED = exports.UNMOUNTED = 0;
+ var EXITED = exports.EXITED = 1;
+ var ENTERING = exports.ENTERING = 2;
+ var ENTERED = exports.ENTERED = 3;
+ var EXITING = exports.EXITING = 4;
+
+ var propTypes = {
+ /**
+ * 是否触发动画
+ */
+ "in": _propTypes2["default"].bool,
+
+ /**
+ * 不显示的时候是否移除组件
+ */
+ unmountOnExit: _propTypes2["default"].bool,
+
+ /**
+ * 如果设置为默认显示,挂载时显示动画
+ */
+ transitionAppear: _propTypes2["default"].bool,
+
+ /**
+ * 设置超时时间,防止出现问题,可设置为>=动画时间
+ */
+ timeout: _propTypes2["default"].number,
+
+ /**
+ * 退出组件时添加的class
+ */
+ exitedClassName: _propTypes2["default"].string,
+ /**
+ * 退出组件中添加的class
+ */
+ exitingClassName: _propTypes2["default"].string,
+ /**
+ * 进入动画后添加的class
+ */
+ enteredClassName: _propTypes2["default"].string,
+ /**
+ * 进入动画时添加的class
+ */
+ enteringClassName: _propTypes2["default"].string,
+
+ /**
+ * 进入动画开始时的钩子函数
+ */
+ onEnter: _propTypes2["default"].func,
+ /**
+ * 进入动画中的钩子函数
+ */
+ onEntering: _propTypes2["default"].func,
+ /**
+ * 进入动画后的钩子函数
+ */
+ onEntered: _propTypes2["default"].func,
+ /**
+ * 退出动画开始时的钩子函数
+ */
+ onExit: _propTypes2["default"].func,
+ /**
+ * 退出动画中的钩子函数
+ */
+ onExiting: _propTypes2["default"].func,
+ /**
+ * 退出动画后的钩子函数
+ */
+ onExited: _propTypes2["default"].func
+ };
+
+ function noop() {}
+
+ var defaultProps = {
+ "in": false,
+ unmountOnExit: false,
+ transitionAppear: false,
+ timeout: 5000,
+ onEnter: noop,
+ onEntering: noop,
+ onEntered: noop,
+ onExit: noop,
+ onExiting: noop,
+ onExited: noop
+ };
+
+ /**
+ * 动画组件
+ */
+
+ var Transition = function (_Component) {
+ _inherits(Transition, _Component);
+
+ function Transition(props, context) {
+ _classCallCheck(this, Transition);
+
+ var _this = _possibleConstructorReturn(this, _Component.call(this, props, context));
+
+ var initialStatus = void 0;
+ if (props["in"]) {
+ // 在componentdidmount时开始执行动画
+ initialStatus = props.transitionAppear ? EXITED : ENTERED;
+ } else {
+ initialStatus = props.unmountOnExit ? UNMOUNTED : EXITED;
+ }
+ _this.state = { status: initialStatus };
+
+ _this.nextCallback = null;
+ return _this;
+ }
+
+ Transition.prototype.componentDidMount = function componentDidMount() {
+ if (this.props.transitionAppear && this.props["in"]) {
+ this.performEnter(this.props);
+ }
+ };
+
+ Transition.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
+ if (nextProps["in"] && this.props.unmountOnExit) {
+ if (this.state.status === UNMOUNTED) {
+ // 在componentDidUpdate执行动画.
+ this.setState({ status: EXITED });
+ }
+ } else {
+ this._needsUpdate = true;
+ }
+ };
+
+ Transition.prototype.componentDidUpdate = function componentDidUpdate() {
+ var status = this.state.status;
+
+ if (this.props.unmountOnExit && status === EXITED) {
+ // 当使用unmountOnExit时,exited为exiting和unmont的过渡状态
+ if (this.props["in"]) {
+ this.performEnter(this.props);
+ } else {
+ this.setState({ status: UNMOUNTED });
+ }
+
+ return;
+ }
+
+ // 确保只响应prop变化
+ if (this._needsUpdate) {
+ this._needsUpdate = false;
+
+ if (this.props["in"]) {
+ if (status === EXITING) {
+ this.performEnter(this.props);
+ } else if (status === EXITED) {
+ this.performEnter(this.props);
+ }
+ // 其他,当我们已经输入或输出
+ } else {
+ if (status === ENTERING || status === ENTERED) {
+ this.performExit(this.props);
+ }
+ // 我们已经输入或输出完成
+ }
+ }
+ };
+
+ Transition.prototype.componentWillUnmount = function componentWillUnmount() {
+ this.cancelNextCallback();
+ };
+
+ Transition.prototype.performEnter = function performEnter(props) {
+ var _this2 = this;
+
+ this.cancelNextCallback();
+ var node = _reactDom2["default"].findDOMNode(this);
+
+ // 这里接收新props
+ props.onEnter(node);
+
+ this.safeSetState({ status: ENTERING }, function () {
+ _this2.props.onEntering(node);
+
+ _this2.onTransitionEnd(node, function () {
+ _this2.safeSetState({ status: ENTERED }, function () {
+ _this2.props.onEntered(node);
+ });
+ });
+ });
+ };
+
+ Transition.prototype.performExit = function performExit(props) {
+ var _this3 = this;
+
+ this.cancelNextCallback();
+ var node = _reactDom2["default"].findDOMNode(this);
+
+ props.onExit(node);
+
+ this.safeSetState({ status: EXITING }, function () {
+ _this3.props.onExiting(node);
+
+ _this3.onTransitionEnd(node, function () {
+ _this3.safeSetState({ status: EXITED }, function () {
+ _this3.props.onExited(node);
+ });
+ });
+ });
+ };
+
+ Transition.prototype.cancelNextCallback = function cancelNextCallback() {
+ if (this.nextCallback !== null) {
+ this.nextCallback.cancel();
+ this.nextCallback = null;
+ }
+ };
+
+ Transition.prototype.safeSetState = function safeSetState(nextState, callback) {
+ // 确保在组件销毁后挂起的setState被消除
+ this.setState(nextState, this.setNextCallback(callback));
+ };
+
+ Transition.prototype.setNextCallback = function setNextCallback(callback) {
+ var _this4 = this;
+
+ var active = true;
+
+ this.nextCallback = function (event) {
+ if (active) {
+ active = false;
+ _this4.nextCallback = null;
+
+ callback(event);
+ }
+ };
+
+ this.nextCallback.cancel = function () {
+ active = false;
+ };
+
+ return this.nextCallback;
+ };
+
+ Transition.prototype.onTransitionEnd = function onTransitionEnd(node, handler) {
+ this.setNextCallback(handler);
+
+ if (node) {
+ if (transitionEndEvent == undefined) {
+ this.nextCallback();
+ } else {
+ (0, _on2["default"])(node, transitionEndEvent, this.nextCallback);
+ }
+ setTimeout(this.nextCallback, this.props.timeout);
+ } else {
+ setTimeout(this.nextCallback, 0);
+ }
+ };
+
+ Transition.prototype.render = function render() {
+ var status = this.state.status;
+ if (status === UNMOUNTED) {
+ return null;
+ }
+
+ var _props = this.props,
+ children = _props.children,
+ className = _props.className,
+ childProps = _objectWithoutProperties(_props, ['children', 'className']);
+
+ Object.keys(Transition.propTypes).forEach(function (key) {
+ return delete childProps[key];
+ });
+
+ var transitionClassName = void 0;
+ if (status === EXITED) {
+ transitionClassName = this.props.exitedClassName;
+ } else if (status === ENTERING) {
+ transitionClassName = this.props.enteringClassName;
+ } else if (status === ENTERED) {
+ transitionClassName = this.props.enteredClassName;
+ } else if (status === EXITING) {
+ transitionClassName = this.props.exitingClassName;
+ }
+
+ var child = _react2["default"].Children.only(children);
+ return _react2["default"].cloneElement(child, _extends({}, childProps, {
+ className: (0, _classnames2["default"])(child.props.className, className, transitionClassName)
+ }));
+ };
+
+ return Transition;
+ }(_react.Component);
+
+ Transition.propTypes = propTypes;
+
+ Transition.defaultProps = defaultProps;
+
+ exports["default"] = Transition;
+
+ /***/ }),
+ /* 116 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ exports.EXITING = exports.ENTERED = exports.ENTERING = exports.EXITED = exports.UNMOUNTED = undefined;
+
+ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+ var _react = __webpack_require__(0);
+
+ var _react2 = _interopRequireDefault(_react);
+
+ var _reactDom = __webpack_require__(4);
+
+ var _reactDom2 = _interopRequireDefault(_reactDom);
+
+ var _properties = __webpack_require__(58);
+
+ var _properties2 = _interopRequireDefault(_properties);
+
+ var _on = __webpack_require__(59);
+
+ var _on2 = _interopRequireDefault(_on);
+
+ var _classnames = __webpack_require__(3);
+
+ var _classnames2 = _interopRequireDefault(_classnames);
+
+ var _propTypes = __webpack_require__(1);
+
+ var _propTypes2 = _interopRequireDefault(_propTypes);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+ function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
+
+ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
+
+ var transitionEndEvent = _properties2["default"].end;
+
+ //设置状态码
+ var UNMOUNTED = exports.UNMOUNTED = 0;
+ var EXITED = exports.EXITED = 1;
+ var ENTERING = exports.ENTERING = 2;
+ var ENTERED = exports.ENTERED = 3;
+ var EXITING = exports.EXITING = 4;
+
+ var propTypes = {
+ /**
+ * 是否触发动画
+ */
+ "in": _propTypes2["default"].bool,
+
+ /**
+ * 不显示的时候是否移除组件
+ */
+ unmountOnExit: _propTypes2["default"].bool,
+
+ /**
+ * 如果设置为默认显示,挂载时显示动画
+ */
+ transitionAppear: _propTypes2["default"].bool,
+
+ /**
+ * 设置超时时间,防止出现问题,可设置为>=动画时间
+ */
+ timeout: _propTypes2["default"].number,
+
+ /**
+ * 退出组件时添加的class
+ */
+ exitedClassName: _propTypes2["default"].string,
+ /**
+ * 退出组件中添加的class
+ */
+ exitingClassName: _propTypes2["default"].string,
+ /**
+ * 进入动画后添加的class
+ */
+ enteredClassName: _propTypes2["default"].string,
+ /**
+ * 进入动画时添加的class
+ */
+ enteringClassName: _propTypes2["default"].string,
+
+ /**
+ * 进入动画开始时的钩子函数
+ */
+ onEnter: _propTypes2["default"].func,
+ /**
+ * 进入动画中的钩子函数
+ */
+ onEntering: _propTypes2["default"].func,
+ /**
+ * 进入动画后的钩子函数
+ */
+ onEntered: _propTypes2["default"].func,
+ /**
+ * 退出动画开始时的钩子函数
+ */
+ onExit: _propTypes2["default"].func,
+ /**
+ * 退出动画中的钩子函数
+ */
+ onExiting: _propTypes2["default"].func,
+ /**
+ * 退出动画后的钩子函数
+ */
+ onExited: _propTypes2["default"].func
+ };
+
+ function noop() {}
+
+ var defaultProps = {
+ "in": false,
+ unmountOnExit: false,
+ transitionAppear: false,
+ timeout: 5000,
+ onEnter: noop,
+ onEntering: noop,
+ onEntered: noop,
+ onExit: noop,
+ onExiting: noop,
+ onExited: noop
+ };
+
+ /**
+ * 动画组件
+ */
+
+ var Transition = function (_Component) {
+ _inherits(Transition, _Component);
+
+ function Transition(props, context) {
+ _classCallCheck(this, Transition);
+
+ var _this = _possibleConstructorReturn(this, _Component.call(this, props, context));
+
+ var initialStatus = void 0;
+ if (props["in"]) {
+ // 在componentdidmount时开始执行动画
+ initialStatus = props.transitionAppear ? EXITED : ENTERED;
+ } else {
+ initialStatus = props.unmountOnExit ? UNMOUNTED : EXITED;
+ }
+ _this.state = { status: initialStatus };
+
+ _this.nextCallback = null;
+ return _this;
+ }
+
+ Transition.prototype.componentDidMount = function componentDidMount() {
+ if (this.props.transitionAppear && this.props["in"]) {
+ this.performEnter(this.props);
+ }
+ };
+
+ Transition.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
+ if (nextProps["in"] && this.props.unmountOnExit) {
+ if (this.state.status === UNMOUNTED) {
+ // 在componentDidUpdate执行动画.
+ this.setState({ status: EXITED });
+ }
+ } else {
+ this._needsUpdate = true;
+ }
+ };
+
+ Transition.prototype.componentDidUpdate = function componentDidUpdate() {
+ var status = this.state.status;
+
+ if (this.props.unmountOnExit && status === EXITED) {
+ // 当使用unmountOnExit时,exited为exiting和unmont的过渡状态
+ if (this.props["in"]) {
+ this.performEnter(this.props);
+ } else {
+ this.setState({ status: UNMOUNTED });
+ }
+
+ return;
+ }
+
+ // 确保只响应prop变化
+ if (this._needsUpdate) {
+ this._needsUpdate = false;
+
+ if (this.props["in"]) {
+ if (status === EXITING) {
+ this.performEnter(this.props);
+ } else if (status === EXITED) {
+ this.performEnter(this.props);
+ }
+ // 其他,当我们已经输入或输出
+ } else {
+ if (status === ENTERING || status === ENTERED) {
+ this.performExit(this.props);
+ }
+ // 我们已经输入或输出完成
+ }
+ }
+ };
+
+ Transition.prototype.componentWillUnmount = function componentWillUnmount() {
+ this.cancelNextCallback();
+ };
+
+ Transition.prototype.performEnter = function performEnter(props) {
+ var _this2 = this;
+
+ this.cancelNextCallback();
+ var node = _reactDom2["default"].findDOMNode(this);
+
+ // 这里接收新props
+ props.onEnter(node);
+
+ this.safeSetState({ status: ENTERING }, function () {
+ _this2.props.onEntering(node);
+
+ _this2.onTransitionEnd(node, function () {
+ _this2.safeSetState({ status: ENTERED }, function () {
+ _this2.props.onEntered(node);
+ });
+ });
+ });
+ };
+
+ Transition.prototype.performExit = function performExit(props) {
+ var _this3 = this;
+
+ this.cancelNextCallback();
+ var node = _reactDom2["default"].findDOMNode(this);
+
+ props.onExit(node);
+
+ this.safeSetState({ status: EXITING }, function () {
+ _this3.props.onExiting(node);
+
+ _this3.onTransitionEnd(node, function () {
+ _this3.safeSetState({ status: EXITED }, function () {
+ _this3.props.onExited(node);
+ });
+ });
+ });
+ };
+
+ Transition.prototype.cancelNextCallback = function cancelNextCallback() {
+ if (this.nextCallback !== null) {
+ this.nextCallback.cancel();
+ this.nextCallback = null;
+ }
+ };
+
+ Transition.prototype.safeSetState = function safeSetState(nextState, callback) {
+ // 确保在组件销毁后挂起的setState被消除
+ this.setState(nextState, this.setNextCallback(callback));
+ };
+
+ Transition.prototype.setNextCallback = function setNextCallback(callback) {
+ var _this4 = this;
+
+ var active = true;
+
+ this.nextCallback = function (event) {
+ if (active) {
+ active = false;
+ _this4.nextCallback = null;
+
+ callback(event);
+ }
+ };
+
+ this.nextCallback.cancel = function () {
+ active = false;
+ };
+
+ return this.nextCallback;
+ };
+
+ Transition.prototype.onTransitionEnd = function onTransitionEnd(node, handler) {
+ this.setNextCallback(handler);
+
+ if (node) {
+ if (transitionEndEvent == undefined) {
+ this.nextCallback();
+ } else {
+ (0, _on2["default"])(node, transitionEndEvent, this.nextCallback);
+ }
+ setTimeout(this.nextCallback, this.props.timeout);
+ } else {
+ setTimeout(this.nextCallback, 0);
+ }
+ };
+
+ Transition.prototype.render = function render() {
+ var status = this.state.status;
+ if (status === UNMOUNTED) {
+ return null;
+ }
+
+ var _props = this.props,
+ children = _props.children,
+ className = _props.className,
+ childProps = _objectWithoutProperties(_props, ['children', 'className']);
+
+ Object.keys(Transition.propTypes).forEach(function (key) {
+ return delete childProps[key];
+ });
+
+ var transitionClassName = void 0;
+ if (status === EXITED) {
+ transitionClassName = this.props.exitedClassName;
+ } else if (status === ENTERING) {
+ transitionClassName = this.props.enteringClassName;
+ } else if (status === ENTERED) {
+ transitionClassName = this.props.enteredClassName;
+ } else if (status === EXITING) {
+ transitionClassName = this.props.exitingClassName;
+ }
+
+ var child = _react2["default"].Children.only(children);
+ return _react2["default"].cloneElement(child, _extends({}, childProps, {
+ className: (0, _classnames2["default"])(child.props.className, className, transitionClassName)
+ }));
+ };
+
+ return Transition;
+ }(_react.Component);
+
+ Transition.propTypes = propTypes;
+
+ Transition.defaultProps = defaultProps;
+
+ exports["default"] = Transition;
+
+ /***/ }),
+ /* 117 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _inDOM = __webpack_require__(36);
+
+ var _inDOM2 = _interopRequireDefault(_inDOM);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ var on = function on() {};
+ if (_inDOM2.default) {
+ on = function () {
+
+ if (document.addEventListener) return function (node, eventName, handler, capture) {
+ return node.addEventListener(eventName, handler, capture || false);
+ };else if (document.attachEvent) return function (node, eventName, handler) {
+ return node.attachEvent('on' + eventName, handler);
+ };
+ }();
+ }
+
+ exports.default = on;
+ module.exports = exports['default'];
+
+ /***/ }),
+ /* 118 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ exports["default"] = isOverflowing;
+
+ var _isWindow = __webpack_require__(77);
+
+ var _isWindow2 = _interopRequireDefault(_isWindow);
+
+ var _ownerDocument = __webpack_require__(50);
var _ownerDocument2 = _interopRequireDefault(_ownerDocument);
- var _getContainer = __webpack_require__(126);
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
- var _getContainer2 = _interopRequireDefault(_getContainer);
+ function isBody(node) {
+ return node && node.tagName.toLowerCase() === 'body';
+ }
- var _tinperBeeCore = __webpack_require__(5);
+ function bodyIsOverflowing(node) {
+ var doc = (0, _ownerDocument2["default"])(node);
+ var win = (0, _isWindow2["default"])(doc);
+ var fullWidth = win.innerWidth;
+
+ // Support: ie8, no innerWidth
+ if (!fullWidth) {
+ var documentElementRect = doc.documentElement.getBoundingClientRect();
+ fullWidth = documentElementRect.right - Math.abs(documentElementRect.left);
+ }
+
+ return doc.body.clientWidth < fullWidth;
+ }
+
+ function isOverflowing(container) {
+ var win = (0, _isWindow2["default"])(container);
+
+ return win || isBody(container) ? bodyIsOverflowing(container) : container.scrollHeight > container.clientHeight;
+ }
+ module.exports = exports['default'];
+
+ /***/ }),
+ /* 119 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ exports.EXITING = exports.ENTERED = exports.ENTERING = exports.EXITED = exports.UNMOUNTED = undefined;
+
+ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+ var _react = __webpack_require__(0);
+
+ var _react2 = _interopRequireDefault(_react);
+
+ var _reactDom = __webpack_require__(4);
+
+ var _reactDom2 = _interopRequireDefault(_reactDom);
+
+ var _properties = __webpack_require__(203);
+
+ var _properties2 = _interopRequireDefault(_properties);
+
+ var _on = __webpack_require__(117);
+
+ var _on2 = _interopRequireDefault(_on);
+
+ var _classnames = __webpack_require__(3);
+
+ var _classnames2 = _interopRequireDefault(_classnames);
+
+ var _propTypes = __webpack_require__(1);
+
+ var _propTypes2 = _interopRequireDefault(_propTypes);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+ function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
+
+ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
+
+ var transitionEndEvent = _properties2["default"].end;
+
+ //设置状态码
+ var UNMOUNTED = exports.UNMOUNTED = 0;
+ var EXITED = exports.EXITED = 1;
+ var ENTERING = exports.ENTERING = 2;
+ var ENTERED = exports.ENTERED = 3;
+ var EXITING = exports.EXITING = 4;
+
+ var propTypes = {
+ /**
+ * 是否触发动画
+ */
+ "in": _propTypes2["default"].bool,
+
+ /**
+ * 不显示的时候是否移除组件
+ */
+ unmountOnExit: _propTypes2["default"].bool,
+
+ /**
+ * 如果设置为默认显示,挂载时显示动画
+ */
+ transitionAppear: _propTypes2["default"].bool,
+
+ /**
+ * 设置超时时间,防止出现问题,可设置为>=动画时间
+ */
+ timeout: _propTypes2["default"].number,
+
+ /**
+ * 退出组件时添加的class
+ */
+ exitedClassName: _propTypes2["default"].string,
+ /**
+ * 退出组件中添加的class
+ */
+ exitingClassName: _propTypes2["default"].string,
+ /**
+ * 进入动画后添加的class
+ */
+ enteredClassName: _propTypes2["default"].string,
+ /**
+ * 进入动画时添加的class
+ */
+ enteringClassName: _propTypes2["default"].string,
+
+ /**
+ * 进入动画开始时的钩子函数
+ */
+ onEnter: _propTypes2["default"].func,
+ /**
+ * 进入动画中的钩子函数
+ */
+ onEntering: _propTypes2["default"].func,
+ /**
+ * 进入动画后的钩子函数
+ */
+ onEntered: _propTypes2["default"].func,
+ /**
+ * 退出动画开始时的钩子函数
+ */
+ onExit: _propTypes2["default"].func,
+ /**
+ * 退出动画中的钩子函数
+ */
+ onExiting: _propTypes2["default"].func,
+ /**
+ * 退出动画后的钩子函数
+ */
+ onExited: _propTypes2["default"].func
+ };
+
+ function noop() {}
+
+ var defaultProps = {
+ "in": false,
+ unmountOnExit: false,
+ transitionAppear: false,
+ timeout: 5000,
+ onEnter: noop,
+ onEntering: noop,
+ onEntered: noop,
+ onExit: noop,
+ onExiting: noop,
+ onExited: noop
+ };
+
+ /**
+ * 动画组件
+ */
+
+ var Transition = function (_Component) {
+ _inherits(Transition, _Component);
+
+ function Transition(props, context) {
+ _classCallCheck(this, Transition);
+
+ var _this = _possibleConstructorReturn(this, _Component.call(this, props, context));
+
+ var initialStatus = void 0;
+ if (props["in"]) {
+ // 在componentdidmount时开始执行动画
+ initialStatus = props.transitionAppear ? EXITED : ENTERED;
+ } else {
+ initialStatus = props.unmountOnExit ? UNMOUNTED : EXITED;
+ }
+ _this.state = { status: initialStatus };
+
+ _this.nextCallback = null;
+ return _this;
+ }
+
+ Transition.prototype.componentDidMount = function componentDidMount() {
+ if (this.props.transitionAppear && this.props["in"]) {
+ this.performEnter(this.props);
+ }
+ };
+
+ Transition.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
+ if (nextProps["in"] && this.props.unmountOnExit) {
+ if (this.state.status === UNMOUNTED) {
+ // 在componentDidUpdate执行动画.
+ this.setState({ status: EXITED });
+ }
+ } else {
+ this._needsUpdate = true;
+ }
+ };
+
+ Transition.prototype.componentDidUpdate = function componentDidUpdate() {
+ var status = this.state.status;
+
+ if (this.props.unmountOnExit && status === EXITED) {
+ // 当使用unmountOnExit时,exited为exiting和unmont的过渡状态
+ if (this.props["in"]) {
+ this.performEnter(this.props);
+ } else {
+ this.setState({ status: UNMOUNTED });
+ }
+
+ return;
+ }
+
+ // 确保只响应prop变化
+ if (this._needsUpdate) {
+ this._needsUpdate = false;
+
+ if (this.props["in"]) {
+ if (status === EXITING) {
+ this.performEnter(this.props);
+ } else if (status === EXITED) {
+ this.performEnter(this.props);
+ }
+ // 其他,当我们已经输入或输出
+ } else {
+ if (status === ENTERING || status === ENTERED) {
+ this.performExit(this.props);
+ }
+ // 我们已经输入或输出完成
+ }
+ }
+ };
+
+ Transition.prototype.componentWillUnmount = function componentWillUnmount() {
+ this.cancelNextCallback();
+ };
+
+ Transition.prototype.performEnter = function performEnter(props) {
+ var _this2 = this;
+
+ this.cancelNextCallback();
+ var node = _reactDom2["default"].findDOMNode(this);
+
+ // 这里接收新props
+ props.onEnter(node);
+
+ this.safeSetState({ status: ENTERING }, function () {
+ _this2.props.onEntering(node);
+
+ _this2.onTransitionEnd(node, function () {
+ _this2.safeSetState({ status: ENTERED }, function () {
+ _this2.props.onEntered(node);
+ });
+ });
+ });
+ };
+
+ Transition.prototype.performExit = function performExit(props) {
+ var _this3 = this;
+
+ this.cancelNextCallback();
+ var node = _reactDom2["default"].findDOMNode(this);
+
+ props.onExit(node);
+
+ this.safeSetState({ status: EXITING }, function () {
+ _this3.props.onExiting(node);
+
+ _this3.onTransitionEnd(node, function () {
+ _this3.safeSetState({ status: EXITED }, function () {
+ _this3.props.onExited(node);
+ });
+ });
+ });
+ };
+
+ Transition.prototype.cancelNextCallback = function cancelNextCallback() {
+ if (this.nextCallback !== null) {
+ this.nextCallback.cancel();
+ this.nextCallback = null;
+ }
+ };
+
+ Transition.prototype.safeSetState = function safeSetState(nextState, callback) {
+ // 确保在组件销毁后挂起的setState被消除
+ this.setState(nextState, this.setNextCallback(callback));
+ };
+
+ Transition.prototype.setNextCallback = function setNextCallback(callback) {
+ var _this4 = this;
+
+ var active = true;
+
+ this.nextCallback = function (event) {
+ if (active) {
+ active = false;
+ _this4.nextCallback = null;
+
+ callback(event);
+ }
+ };
+
+ this.nextCallback.cancel = function () {
+ active = false;
+ };
+
+ return this.nextCallback;
+ };
+
+ Transition.prototype.onTransitionEnd = function onTransitionEnd(node, handler) {
+ this.setNextCallback(handler);
+
+ if (node) {
+ if (transitionEndEvent == undefined) {
+ this.nextCallback();
+ } else {
+ (0, _on2["default"])(node, transitionEndEvent, this.nextCallback);
+ }
+ setTimeout(this.nextCallback, this.props.timeout);
+ } else {
+ setTimeout(this.nextCallback, 0);
+ }
+ };
+
+ Transition.prototype.render = function render() {
+ var status = this.state.status;
+ if (status === UNMOUNTED) {
+ return null;
+ }
+
+ var _props = this.props,
+ children = _props.children,
+ className = _props.className,
+ childProps = _objectWithoutProperties(_props, ['children', 'className']);
+
+ Object.keys(Transition.propTypes).forEach(function (key) {
+ return delete childProps[key];
+ });
+
+ var transitionClassName = void 0;
+ if (status === EXITED) {
+ transitionClassName = this.props.exitedClassName;
+ } else if (status === ENTERING) {
+ transitionClassName = this.props.enteringClassName;
+ } else if (status === ENTERED) {
+ transitionClassName = this.props.enteredClassName;
+ } else if (status === EXITING) {
+ transitionClassName = this.props.exitingClassName;
+ }
+
+ var child = _react2["default"].Children.only(children);
+ return _react2["default"].cloneElement(child, _extends({}, childProps, {
+ className: (0, _classnames2["default"])(child.props.className, className, transitionClassName)
+ }));
+ };
+
+ return Transition;
+ }(_react.Component);
+
+ Transition.propTypes = propTypes;
+
+ Transition.defaultProps = defaultProps;
+
+ exports["default"] = Transition;
+
+ /***/ }),
+ /* 120 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ exports.toArray = toArray;
+ exports.getActiveIndex = getActiveIndex;
+ exports.getActiveKey = getActiveKey;
+ exports.setTransform = setTransform;
+ exports.isTransformSupported = isTransformSupported;
+ exports.setTransition = setTransition;
+ exports.getTransformPropValue = getTransformPropValue;
+ exports.isVertical = isVertical;
+ exports.getTransformByIndex = getTransformByIndex;
+ exports.getMarginStyle = getMarginStyle;
+ exports.getStyle = getStyle;
+ exports.setPxStyle = setPxStyle;
+
+ var _react = __webpack_require__(0);
+
+ var _react2 = _interopRequireDefault(_react);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /**
+ * This source code is quoted from rc-tabs.
+ * homepage: https://github.com/react-component/tabs
+ */
+
+
+ function toArray(children) {
+ // allow [c,[a,b]]
+ var c = [];
+ _react2["default"].Children.forEach(children, function (child) {
+ if (child) {
+ c.push(child);
+ }
+ });
+ return c;
+ }
+
+ function getActiveIndex(children, activeKey) {
+ var c = toArray(children);
+ for (var i = 0; i < c.length; i++) {
+ if (c[i].key === activeKey) {
+ return i;
+ }
+ }
+ return -1;
+ }
+
+ function getActiveKey(children, index) {
+ var c = toArray(children);
+ return c[index].key;
+ }
+
+ function setTransform(style, v) {
+ style.transform = v;
+ style.webkitTransform = v;
+ style.mozTransform = v;
+ }
+
+ function isTransformSupported(style) {
+ return 'transform' in style || 'webkitTransform' in style || 'MozTransform' in style;
+ }
+
+ function setTransition(style, v) {
+ style.transition = v;
+ style.webkitTransition = v;
+ style.MozTransition = v;
+ }
+ function getTransformPropValue(v) {
+ return {
+ transform: v,
+ WebkitTransform: v,
+ MozTransform: v
+ };
+ }
+
+ function isVertical(tabBarPosition) {
+ return tabBarPosition === 'left' || tabBarPosition === 'right';
+ }
+
+ function getTransformByIndex(index, tabBarPosition) {
+ var translate = isVertical(tabBarPosition) ? 'translateY' : 'translateX';
+ return translate + '(' + -index * 100 + '%) translateZ(0)';
+ }
+
+ function getMarginStyle(index, tabBarPosition) {
+ var marginDirection = isVertical(tabBarPosition) ? 'marginTop' : 'marginLeft';
+ return _defineProperty({}, marginDirection, -index * 100 + '%');
+ }
+
+ function getStyle(el, property) {
+ return +getComputedStyle(el).getPropertyValue(property).replace('px', '');
+ }
+
+ function setPxStyle(el, property, value) {
+ el.style[property] = value + 'px';
+ }
+
+ /***/ }),
+ /* 121 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _Loading = __webpack_require__(812);
+
+ var _Loading2 = _interopRequireDefault(_Loading);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+ exports["default"] = _Loading2["default"];
+ module.exports = exports['default'];
+
+ /***/ }),
+ /* 122 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ //! moment.js locale configuration
+
+ ;(function (global, factory) {
+ true ? factory(__webpack_require__(2)) :
+ typeof define === 'function' && define.amd ? define(['../moment'], factory) :
+ factory(global.moment)
+ }(this, (function (moment) { 'use strict';
+
+
+ var enGb = moment.defineLocale('en-gb', {
+ months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
+ monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
+ weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
+ weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ longDateFormat : {
+ LT : 'HH:mm',
+ LTS : 'HH:mm:ss',
+ L : 'DD/MM/YYYY',
+ LL : 'D MMMM YYYY',
+ LLL : 'D MMMM YYYY HH:mm',
+ LLLL : 'dddd, D MMMM YYYY HH:mm'
+ },
+ calendar : {
+ sameDay : '[Today at] LT',
+ nextDay : '[Tomorrow at] LT',
+ nextWeek : 'dddd [at] LT',
+ lastDay : '[Yesterday at] LT',
+ lastWeek : '[Last] dddd [at] LT',
+ sameElse : 'L'
+ },
+ relativeTime : {
+ future : 'in %s',
+ past : '%s ago',
+ s : 'a few seconds',
+ ss : '%d seconds',
+ m : 'a minute',
+ mm : '%d minutes',
+ h : 'an hour',
+ hh : '%d hours',
+ d : 'a day',
+ dd : '%d days',
+ M : 'a month',
+ MM : '%d months',
+ y : 'a year',
+ yy : '%d years'
+ },
+ dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
+ ordinal : function (number) {
+ var b = number % 10,
+ output = (~~(number % 100 / 10) === 1) ? 'th' :
+ (b === 1) ? 'st' :
+ (b === 2) ? 'nd' :
+ (b === 3) ? 'rd' : 'th';
+ return number + output;
+ },
+ week : {
+ dow : 1, // Monday is the first day of the week.
+ doy : 4 // The week that contains Jan 4th is the first week of the year.
+ }
+ });
+
+ return enGb;
+
+ })));
+
+
+ /***/ }),
+ /* 123 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _react = __webpack_require__(0);
+
+ var _react2 = _interopRequireDefault(_react);
+
+ var _propTypes = __webpack_require__(1);
+
+ var _propTypes2 = _interopRequireDefault(_propTypes);
+
+ var _mapSelf = __webpack_require__(338);
+
+ var _mapSelf2 = _interopRequireDefault(_mapSelf);
+
+ var _MonthPanel = __webpack_require__(831);
+
+ var _MonthPanel2 = _interopRequireDefault(_MonthPanel);
+
+ var _YearPanel = __webpack_require__(339);
+
+ var _YearPanel2 = _interopRequireDefault(_YearPanel);
+
+ var _DecadePanel = __webpack_require__(340);
+
+ var _DecadePanel2 = _interopRequireDefault(_DecadePanel);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -87506,174 +77498,256 @@
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
- var isReact16 = _reactDom2["default"].createPortal !== undefined;
- var createPortal = isReact16 ? _reactDom2["default"].createPortal : _reactDom2["default"].unstable_renderSubtreeIntoContainer;
+ function goMonth(direction) {
+ var next = this.props.value.clone();
+ next.add(direction, 'months');
+ this.props.onValueChange(next);
+ }
- var propTypes = {
- /**
- * 存放子组件的容器
- */
- container: _propTypes2["default"].oneOfType([_tinperBeeCore.componentOrElement, _propTypes2["default"].func])
- };
+ function goYear(direction) {
+ var next = this.props.value.clone();
+ next.add(direction, 'years');
+ this.props.onValueChange(next);
+ }
- var defaultProps = {};
+ function showIf(condition, el) {
+ return condition ? el : null;
+ }
- /**
- * Portal组件是将子组件渲染
- */
+ var CalendarHeader = function (_React$Component) {
+ _inherits(CalendarHeader, _React$Component);
- var Portal = function (_Component) {
- _inherits(Portal, _Component);
+ function CalendarHeader(props) {
+ _classCallCheck(this, CalendarHeader);
- function Portal(props) {
- _classCallCheck(this, Portal);
+ var _this = _possibleConstructorReturn(this, _React$Component.call(this, props));
- var _this = _possibleConstructorReturn(this, _Component.call(this, props));
+ _initialiseProps.call(_this);
- _this.getMountNode = _this.getMountNode.bind(_this);
- _this.getOverlayDOMNode = _this.getOverlayDOMNode.bind(_this);
- _this.mountOverlayTarget = _this.mountOverlayTarget.bind(_this);
- _this.unmountOverlayTarget = _this.unmountOverlayTarget.bind(_this);
- _this.renderOverlay = _this.renderOverlay.bind(_this);
- _this.unrenderOverlay = _this.unrenderOverlay.bind(_this);
+ _this.nextMonth = goMonth.bind(_this, 1);
+ _this.previousMonth = goMonth.bind(_this, -1);
+ _this.nextYear = goYear.bind(_this, 1);
+ _this.previousYear = goYear.bind(_this, -1);
- _this.overlayTarget = isReact16 ? document.createElement('div') : null;
+ _this.state = { yearPanelReferer: null };
return _this;
}
- Portal.prototype.componentDidMount = function componentDidMount() {
- if (isReact16) {
- this.portalContainerNode = (0, _getContainer2["default"])(this.props.container, (0, _ownerDocument2["default"])(this).body);
- this.portalContainerNode.appendChild(this.overlayTarget);
+ CalendarHeader.prototype.render = function render() {
+ var _this2 = this;
+
+ var props = this.props;
+ var prefixCls = props.prefixCls,
+ locale = props.locale,
+ mode = props.mode,
+ value = props.value,
+ showTimePicker = props.showTimePicker,
+ enableNext = props.enableNext,
+ enablePrev = props.enablePrev,
+ disabledMonth = props.disabledMonth,
+ renderFooter = props.renderFooter,
+ onChange = props.onChange,
+ onClear = props.onClear,
+ showMonthInput = props.showMonthInput;
+
+
+ var panel = null;
+ if (mode === 'month') {
+ panel = _react2["default"].createElement(_MonthPanel2["default"], {
+ showDateInput: true,
+ locale: locale,
+ showMonthInput: showMonthInput,
+ defaultValue: value,
+ rootPrefixCls: prefixCls,
+ onSelect: this.onMonthSelect,
+ onYearPanelShow: function onYearPanelShow() {
+ return _this2.showYearPanel('month');
+ },
+ disabledDate: disabledMonth,
+ cellRender: props.monthCellRender,
+ contentRender: props.monthCellContentRender,
+ renderFooter: renderFooter,
+ onChange: onChange,
+ onClear: onClear,
+ value: value
+ });
+ }
+ if (mode === 'year') {
+ panel = _react2["default"].createElement(_YearPanel2["default"], {
+ locale: locale,
+ defaultValue: value,
+ rootPrefixCls: prefixCls,
+ onSelect: this.onYearSelect,
+ onDecadePanelShow: this.showDecadePanel,
+ renderFooter: renderFooter
+ });
+ }
+ if (mode === 'decade') {
+ panel = _react2["default"].createElement(_DecadePanel2["default"], {
+ locale: locale,
+ defaultValue: value,
+ rootPrefixCls: prefixCls,
+ onSelect: this.onDecadeSelect,
+ renderFooter: renderFooter
+ });
+ }
+
+ return _react2["default"].createElement(
+ 'div',
+ { className: prefixCls + '-header' },
+ _react2["default"].createElement(
+ 'div',
+ { style: { position: 'relative' }, className: prefixCls + '-header-btns' },
+ showIf(enablePrev && !showTimePicker, _react2["default"].createElement('a', {
+ className: prefixCls + '-prev-year-btn',
+ role: 'button',
+ onClick: this.previousYear,
+ title: locale.previousYear
+ })),
+ showIf(enablePrev && !showTimePicker, _react2["default"].createElement('a', {
+ className: prefixCls + '-prev-month-btn',
+ role: 'button',
+ onClick: this.previousMonth,
+ title: locale.previousMonth
+ })),
+ this.monthYearElement(showTimePicker),
+ showIf(enableNext && !showTimePicker, _react2["default"].createElement('a', {
+ className: prefixCls + '-next-month-btn',
+ onClick: this.nextMonth,
+ title: locale.nextMonth
+ })),
+ showIf(enableNext && !showTimePicker, _react2["default"].createElement('a', {
+ className: prefixCls + '-next-year-btn',
+ onClick: this.nextYear,
+ title: locale.nextYear
+ }))
+ ),
+ panel
+ );
+ };
+
+ return CalendarHeader;
+ }(_react2["default"].Component);
+
+ CalendarHeader.propTypes = {
+ prefixCls: _propTypes2["default"].string,
+ value: _propTypes2["default"].object,
+ onValueChange: _propTypes2["default"].func,
+ showTimePicker: _propTypes2["default"].bool,
+ onPanelChange: _propTypes2["default"].func,
+ locale: _propTypes2["default"].object,
+ enablePrev: _propTypes2["default"].any,
+ enableNext: _propTypes2["default"].any,
+ disabledMonth: _propTypes2["default"].func,
+ renderFooter: _propTypes2["default"].func,
+ onMonthSelect: _propTypes2["default"].func
+ };
+ CalendarHeader.defaultProps = {
+ enableNext: 1,
+ enablePrev: 1,
+ onPanelChange: function onPanelChange() {},
+ onValueChange: function onValueChange() {}
+ };
+
+ var _initialiseProps = function _initialiseProps() {
+ var _this3 = this;
+
+ this.onMonthSelect = function (value) {
+ _this3.props.onPanelChange(value, 'date');
+ if (_this3.props.onMonthSelect) {
+ _this3.props.onMonthSelect(value);
} else {
- this.renderOverlay();
+ _this3.props.onValueChange(value);
}
-
- this.mounted = true;
};
- Portal.prototype.componentDidUpdate = function componentDidUpdate() {
- if (isReact16) {
- var overlay = !this.props.children ? null : _react2["default"].Children.only(this.props.children);
- if (overlay === null) {
- this.unrenderOverlay();
- this.unmountOverlayTarget();
- } else {}
+ this.onYearSelect = function (value) {
+ var referer = _this3.state.yearPanelReferer;
+ _this3.setState({ yearPanelReferer: null });
+ _this3.props.onPanelChange(value, referer);
+ _this3.props.onValueChange(value);
+ };
+
+ this.onDecadeSelect = function (value) {
+ _this3.props.onPanelChange(value, 'year');
+ _this3.props.onValueChange(value);
+ };
+
+ this.monthYearElement = function (showTimePicker) {
+ var props = _this3.props;
+ var prefixCls = props.prefixCls;
+ var locale = props.locale;
+ var value = props.value;
+ var localeData = value.localeData();
+ var monthBeforeYear = locale.monthBeforeYear;
+ var selectClassName = prefixCls + '-' + (monthBeforeYear ? 'my-select' : 'ym-select');
+ var timeClassName = showTimePicker ? ' ' + prefixCls + '-time-status' : '';
+ var year = _react2["default"].createElement(
+ 'a',
+ {
+ className: prefixCls + '-year-select' + timeClassName,
+ role: 'button',
+ onClick: showTimePicker ? null : function () {
+ return _this3.showYearPanel('date');
+ },
+ title: showTimePicker ? null : locale.yearSelect
+ },
+ value.format(locale.yearFormat)
+ );
+ var month = _react2["default"].createElement(
+ 'a',
+ {
+ className: prefixCls + '-month-select' + timeClassName,
+ role: 'button',
+ onClick: showTimePicker ? null : _this3.showMonthPanel,
+ title: showTimePicker ? null : locale.monthSelect
+ },
+ locale.monthFormat ? value.format(locale.monthFormat) : localeData.monthsShort(value)
+ );
+ var day = void 0;
+ if (showTimePicker) {
+ day = _react2["default"].createElement(
+ 'a',
+ {
+ className: prefixCls + '-day-select' + timeClassName,
+ role: 'button'
+ },
+ value.format(locale.dayFormat)
+ );
+ }
+ var my = [];
+ if (monthBeforeYear) {
+ my = [month, day, year];
} else {
- this.renderOverlay();
- }
- };
- //this._overlayTarget为当前的要添加的子组件, this._portalContainerNode要添加组件的容器元素
-
-
- Portal.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
- if (this.overlayTarget && nextProps.container !== this.props.container) {
- this.portalContainerNode.removeChild(this.overlayTarget);
- this.portalContainerNode = (0, _getContainer2["default"])(nextProps.container, (0, _ownerDocument2["default"])(this).body);
- this.portalContainerNode.appendChild(this.overlayTarget);
+ my = [year, month, day];
}
+ return _react2["default"].createElement(
+ 'span',
+ { className: selectClassName },
+ (0, _mapSelf2["default"])(my)
+ );
};
- Portal.prototype.componentWillUnmount = function componentWillUnmount() {
- this.unrenderOverlay();
- this.unmountOverlayTarget();
-
- this.mounted = false;
+ this.showMonthPanel = function () {
+ // null means that users' interaction doesn't change value
+ _this3.props.onPanelChange(null, 'month');
};
- Portal.prototype.getMountNode = function getMountNode() {
- return this.overlayTarget;
+ this.showYearPanel = function (referer) {
+ _this3.setState({ yearPanelReferer: referer });
+ _this3.props.onPanelChange(null, 'year');
};
- Portal.prototype.getOverlayDOMNode = function getOverlayDOMNode() {
- if (!this.mounted) {
- throw new Error('getOverlayDOMNode(): A component must be mounted to have a DOM node.');
- }
-
- if (this.overlayInstance) {
- return _reactDom2["default"].findDOMNode(this.overlayInstance);
- }
-
- return null;
+ this.showDecadePanel = function () {
+ _this3.props.onPanelChange(null, 'decade');
};
+ };
- /**
- * 如果要添加的子组件不存在,就将div添加到要添加容器的DOM中;
- */
-
- Portal.prototype.mountOverlayTarget = function mountOverlayTarget() {
- if (!this.overlayTarget) {
- this.overlayTarget = document.createElement('div');
- this.portalContainerNode = (0, _getContainer2["default"])(this.props.container, (0, _ownerDocument2["default"])(this).body);
- this.portalContainerNode.appendChild(this.overlayTarget);
- }
- };
- /**
- * 将要添加的子元素从容器中移除,并把变量置为null
- */
-
-
- Portal.prototype.unmountOverlayTarget = function unmountOverlayTarget() {
- if (this.overlayTarget) {
- this.portalContainerNode.removeChild(this.overlayTarget);
- this.overlayTarget = null;
- }
- this.portalContainerNode = null;
- };
- /**
- * 手动渲染_overlayTarget
- */
-
-
- Portal.prototype.renderOverlay = function renderOverlay() {
-
- var overlay = !this.props.children ? null : _react2["default"].Children.only(this.props.children);
-
- // Save reference for future access.
- if (overlay !== null) {
- this.mountOverlayTarget();
- this.overlayInstance = _reactDom2["default"].unstable_renderSubtreeIntoContainer(this, overlay, this.overlayTarget);
- } else {
- // Unrender if the component is null for transitions to null
- this.unrenderOverlay();
- this.unmountOverlayTarget();
- }
- };
- /**
- * 销毁_overlayTarget组件。并把_overlayInstance置为null
- */
-
-
- Portal.prototype.unrenderOverlay = function unrenderOverlay() {
- if (this.overlayTarget) {
- !isReact16 && _reactDom2["default"].unmountComponentAtNode(this.overlayTarget);
- this.overlayInstance = null;
- }
- };
-
- Portal.prototype.render = function render() {
- if (!isReact16) {
- return null;
- }
-
- var overlay = !this.props.children ? null : _react2["default"].Children.only(this.props.children);
-
- return _reactDom2["default"].createPortal(overlay, this.overlayTarget);
- };
-
- return Portal;
- }(_react.Component);
-
- ;
-
- Portal.propTypes = propTypes;
- Portal.defaultProps = defaultProps;
-
- exports["default"] = Portal;
+ exports["default"] = CalendarHeader;
module.exports = exports['default'];
/***/ }),
- /* 53 */
+ /* 124 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -87682,100 +77756,108 @@
Object.defineProperty(exports, "__esModule", {
value: true
});
+ exports.commonMixinWrapper = exports.defaultProp = exports.propType = undefined;
- exports["default"] = function (componentOrElement) {
- return (0, _ownerDocument2["default"])(_reactDom2["default"].findDOMNode(componentOrElement));
- };
+ var _propTypes = __webpack_require__(1);
- var _reactDom = __webpack_require__(4);
+ var _propTypes2 = _interopRequireDefault(_propTypes);
- var _reactDom2 = _interopRequireDefault(_reactDom);
+ var _en_US = __webpack_require__(346);
- var _ownerDocument = __webpack_require__(54);
-
- var _ownerDocument2 = _interopRequireDefault(_ownerDocument);
+ var _en_US2 = _interopRequireDefault(_en_US);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
- module.exports = exports['default'];
+ function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
+
+ function noop() {}
+
+ var propType = exports.propType = {
+ className: _propTypes2["default"].string,
+ locale: _propTypes2["default"].object,
+ style: _propTypes2["default"].object,
+ visible: _propTypes2["default"].bool,
+ onSelect: _propTypes2["default"].func,
+ prefixCls: _propTypes2["default"].string,
+ onChange: _propTypes2["default"].func,
+ onOk: _propTypes2["default"].func
+ };
+
+ var defaultProp = exports.defaultProp = {
+ locale: _en_US2["default"],
+ style: {},
+ visible: true,
+ prefixCls: 'rc-calendar',
+ className: '',
+ onSelect: noop,
+ onChange: noop,
+ onClear: noop,
+ renderFooter: function renderFooter() {
+ return null;
+ },
+ renderSidebar: function renderSidebar() {
+ return null;
+ }
+ };
+
+ var commonMixinWrapper = exports.commonMixinWrapper = function commonMixinWrapper(ComposeComponent) {
+ var _class, _temp2;
+
+ return _temp2 = _class = function (_ComposeComponent) {
+ _inherits(_class, _ComposeComponent);
+
+ function _class() {
+ var _temp, _this, _ret;
+
+ _classCallCheck(this, _class);
+
+ for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+ args[_key] = arguments[_key];
+ }
+
+ return _ret = (_temp = (_this = _possibleConstructorReturn(this, _ComposeComponent.call.apply(_ComposeComponent, [this].concat(args))), _this), _this.getFormat = function () {
+ var format = _this.props.format;
+ var _this$props = _this.props,
+ locale = _this$props.locale,
+ timePicker = _this$props.timePicker;
+
+ if (!format) {
+ if (timePicker) {
+ format = locale.dateTimeFormat;
+ } else {
+ format = locale.dateFormat;
+ }
+ }
+ return format;
+ }, _this.focus = function () {
+ if (_this.focusElement) {
+ _this.focusElement.focus();
+ } else if (_this.rootInstance) {
+ _this.rootInstance.focus();
+ }
+ }, _this.saveFocusElement = function (focusElement) {
+ _this.focusElement = focusElement;
+ }, _this.saveRoot = function (root) {
+ _this.rootInstance = root;
+ }, _temp), _possibleConstructorReturn(_this, _ret);
+ }
+
+ _class.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {
+ return this.props.visible || nextProps.visible;
+ };
+
+ return _class;
+ }(ComposeComponent), _class.displayName = 'CommonMixinWrapper', _class.defaultProps = ComposeComponent.defaultProps, _class.getDerivedStateFromProps = ComposeComponent.getDerivedStateFromProps, _temp2;
+ };
/***/ }),
- /* 54 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- exports.__esModule = true;
- exports.default = ownerDocument;
-
- function ownerDocument(node) {
- return node && node.ownerDocument || document;
- }
-
- module.exports = exports["default"];
-
- /***/ }),
- /* 55 */
- /***/ (function(module, exports, __webpack_require__) {
-
- var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
- Copyright (c) 2017 Jed Watson.
- Licensed under the MIT License (MIT), see
- http://jedwatson.github.io/classnames
- */
- /* global define */
-
- (function () {
- 'use strict';
-
- var hasOwn = {}.hasOwnProperty;
-
- function classNames () {
- var classes = [];
-
- for (var i = 0; i < arguments.length; i++) {
- var arg = arguments[i];
- if (!arg) continue;
-
- var argType = typeof arg;
-
- if (argType === 'string' || argType === 'number') {
- classes.push(arg);
- } else if (Array.isArray(arg) && arg.length) {
- var inner = classNames.apply(null, arg);
- if (inner) {
- classes.push(inner);
- }
- } else if (argType === 'object') {
- for (var key in arg) {
- if (hasOwn.call(arg, key) && arg[key]) {
- classes.push(key);
- }
- }
- }
- }
-
- return classes.join(' ');
- }
-
- if (typeof module !== 'undefined' && module.exports) {
- classNames.default = classNames;
- module.exports = classNames;
- } else if (true) {
- // register as 'classnames', consistent with npm package name
- !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
- return classNames;
- }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
- } else {
- window.classNames = classNames;
- }
- }());
-
-
- /***/ }),
- /* 56 */
+ /* 125 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -87784,126 +77866,376 @@
Object.defineProperty(exports, "__esModule", {
value: true
});
- exports.setStyle = exports.getWidth = exports.menuAllProps = undefined;
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; /**
- * This source code is quoted from rc-menu.
- * homepage: https://github.com/react-component/menu
- */
+ var _inDOM = __webpack_require__(37);
+
+ var _inDOM2 = _interopRequireDefault(_inDOM);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ var on = function on() {};
+ if (_inDOM2.default) {
+ on = function () {
+
+ if (document.addEventListener) return function (node, eventName, handler, capture) {
+ return node.addEventListener(eventName, handler, capture || false);
+ };else if (document.attachEvent) return function (node, eventName, handler) {
+ return node.attachEvent('on' + eventName, handler);
+ };
+ }();
+ }
+
+ exports.default = on;
+ module.exports = exports['default'];
+
+ /***/ }),
+ /* 126 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
- exports.noop = noop;
- exports.getKeyFromChildrenIndex = getKeyFromChildrenIndex;
- exports.getMenuIdFromSubMenuEventKey = getMenuIdFromSubMenuEventKey;
- exports.loopMenuItem = loopMenuItem;
- exports.loopMenuItemRecursively = loopMenuItemRecursively;
- exports.fireKeyEvent = fireKeyEvent;
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ exports.EXITING = exports.ENTERED = exports.ENTERING = exports.EXITED = exports.UNMOUNTED = undefined;
+
+ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _react = __webpack_require__(0);
var _react2 = _interopRequireDefault(_react);
+ var _reactDom = __webpack_require__(4);
+
+ var _reactDom2 = _interopRequireDefault(_reactDom);
+
+ var _properties = __webpack_require__(354);
+
+ var _properties2 = _interopRequireDefault(_properties);
+
+ var _on = __webpack_require__(125);
+
+ var _on2 = _interopRequireDefault(_on);
+
+ var _classnames = __webpack_require__(3);
+
+ var _classnames2 = _interopRequireDefault(_classnames);
+
+ var _propTypes = __webpack_require__(1);
+
+ var _propTypes2 = _interopRequireDefault(_propTypes);
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+ function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
+
+ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
+
+ var transitionEndEvent = _properties2["default"].end;
+
+ //设置状态码
+ var UNMOUNTED = exports.UNMOUNTED = 0;
+ var EXITED = exports.EXITED = 1;
+ var ENTERING = exports.ENTERING = 2;
+ var ENTERED = exports.ENTERED = 3;
+ var EXITING = exports.EXITING = 4;
+
+ var propTypes = {
+ /**
+ * 是否触发动画
+ */
+ "in": _propTypes2["default"].bool,
+
+ /**
+ * 不显示的时候是否移除组件
+ */
+ unmountOnExit: _propTypes2["default"].bool,
+
+ /**
+ * 如果设置为默认显示,挂载时显示动画
+ */
+ transitionAppear: _propTypes2["default"].bool,
+
+ /**
+ * 设置超时时间,防止出现问题,可设置为>=动画时间
+ */
+ timeout: _propTypes2["default"].number,
+
+ /**
+ * 退出组件时添加的class
+ */
+ exitedClassName: _propTypes2["default"].string,
+ /**
+ * 退出组件中添加的class
+ */
+ exitingClassName: _propTypes2["default"].string,
+ /**
+ * 进入动画后添加的class
+ */
+ enteredClassName: _propTypes2["default"].string,
+ /**
+ * 进入动画时添加的class
+ */
+ enteringClassName: _propTypes2["default"].string,
+
+ /**
+ * 进入动画开始时的钩子函数
+ */
+ onEnter: _propTypes2["default"].func,
+ /**
+ * 进入动画中的钩子函数
+ */
+ onEntering: _propTypes2["default"].func,
+ /**
+ * 进入动画后的钩子函数
+ */
+ onEntered: _propTypes2["default"].func,
+ /**
+ * 退出动画开始时的钩子函数
+ */
+ onExit: _propTypes2["default"].func,
+ /**
+ * 退出动画中的钩子函数
+ */
+ onExiting: _propTypes2["default"].func,
+ /**
+ * 退出动画后的钩子函数
+ */
+ onExited: _propTypes2["default"].func
+ };
+
function noop() {}
- function getKeyFromChildrenIndex(child, menuEventKey, index) {
- var prefix = menuEventKey || '';
- return child.key || prefix + 'item_' + index;
- }
+ var defaultProps = {
+ "in": false,
+ unmountOnExit: false,
+ transitionAppear: false,
+ timeout: 5000,
+ onEnter: noop,
+ onEntering: noop,
+ onEntered: noop,
+ onExit: noop,
+ onExiting: noop,
+ onExited: noop
+ };
- function getMenuIdFromSubMenuEventKey(eventKey) {
- return eventKey + '-menu-';
- }
+ /**
+ * 动画组件
+ */
- function loopMenuItem(children, cb) {
- var index = -1;
- _react2["default"].Children.forEach(children, function (c) {
- index++;
- if (c && c.type && c.type.isMenuItemGroup) {
- _react2["default"].Children.forEach(c.props.children, function (c2) {
- index++;
- cb(c2, index);
+ var Transition = function (_Component) {
+ _inherits(Transition, _Component);
+
+ function Transition(props, context) {
+ _classCallCheck(this, Transition);
+
+ var _this = _possibleConstructorReturn(this, _Component.call(this, props, context));
+
+ var initialStatus = void 0;
+ if (props["in"]) {
+ // 在componentdidmount时开始执行动画
+ initialStatus = props.transitionAppear ? EXITED : ENTERED;
+ } else {
+ initialStatus = props.unmountOnExit ? UNMOUNTED : EXITED;
+ }
+ _this.state = { status: initialStatus };
+
+ _this.nextCallback = null;
+ return _this;
+ }
+
+ Transition.prototype.componentDidMount = function componentDidMount() {
+ if (this.props.transitionAppear && this.props["in"]) {
+ this.performEnter(this.props);
+ }
+ };
+
+ Transition.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
+ if (nextProps["in"] && this.props.unmountOnExit) {
+ if (this.state.status === UNMOUNTED) {
+ // 在componentDidUpdate执行动画.
+ this.setState({ status: EXITED });
+ }
+ } else {
+ this._needsUpdate = true;
+ }
+ };
+
+ Transition.prototype.componentDidUpdate = function componentDidUpdate() {
+ var status = this.state.status;
+
+ if (this.props.unmountOnExit && status === EXITED) {
+ // 当使用unmountOnExit时,exited为exiting和unmont的过渡状态
+ if (this.props["in"]) {
+ this.performEnter(this.props);
+ } else {
+ this.setState({ status: UNMOUNTED });
+ }
+
+ return;
+ }
+
+ // 确保只响应prop变化
+ if (this._needsUpdate) {
+ this._needsUpdate = false;
+
+ if (this.props["in"]) {
+ if (status === EXITING) {
+ this.performEnter(this.props);
+ } else if (status === EXITED) {
+ this.performEnter(this.props);
+ }
+ // 其他,当我们已经输入或输出
+ } else {
+ if (status === ENTERING || status === ENTERED) {
+ this.performExit(this.props);
+ }
+ // 我们已经输入或输出完成
+ }
+ }
+ };
+
+ Transition.prototype.componentWillUnmount = function componentWillUnmount() {
+ this.cancelNextCallback();
+ };
+
+ Transition.prototype.performEnter = function performEnter(props) {
+ var _this2 = this;
+
+ this.cancelNextCallback();
+ var node = _reactDom2["default"].findDOMNode(this);
+
+ // 这里接收新props
+ props.onEnter(node);
+
+ this.safeSetState({ status: ENTERING }, function () {
+ _this2.props.onEntering(node);
+
+ _this2.onTransitionEnd(node, function () {
+ _this2.safeSetState({ status: ENTERED }, function () {
+ _this2.props.onEntered(node);
+ });
});
- } else {
- cb(c, index);
+ });
+ };
+
+ Transition.prototype.performExit = function performExit(props) {
+ var _this3 = this;
+
+ this.cancelNextCallback();
+ var node = _reactDom2["default"].findDOMNode(this);
+
+ props.onExit(node);
+
+ this.safeSetState({ status: EXITING }, function () {
+ _this3.props.onExiting(node);
+
+ _this3.onTransitionEnd(node, function () {
+ _this3.safeSetState({ status: EXITED }, function () {
+ _this3.props.onExited(node);
+ });
+ });
+ });
+ };
+
+ Transition.prototype.cancelNextCallback = function cancelNextCallback() {
+ if (this.nextCallback !== null) {
+ this.nextCallback.cancel();
+ this.nextCallback = null;
}
- });
- }
+ };
- function loopMenuItemRecursively(children, keys, ret) {
- /* istanbul ignore if */
- if (!children || ret.find) {
- return;
- }
- _react2["default"].Children.forEach(children, function (c) {
- if (c) {
- var construct = c.type;
- if (!construct || !(construct.isSubMenu || construct.isMenuItem || construct.isMenuItemGroup)) {
- return;
+ Transition.prototype.safeSetState = function safeSetState(nextState, callback) {
+ // 确保在组件销毁后挂起的setState被消除
+ this.setState(nextState, this.setNextCallback(callback));
+ };
+
+ Transition.prototype.setNextCallback = function setNextCallback(callback) {
+ var _this4 = this;
+
+ var active = true;
+
+ this.nextCallback = function (event) {
+ if (active) {
+ active = false;
+ _this4.nextCallback = null;
+
+ callback(event);
}
- if (keys.indexOf(c.key) !== -1) {
- ret.find = true;
- } else if (c.props.children) {
- loopMenuItemRecursively(c.props.children, keys, ret);
- }
- }
- });
- }
+ };
- var menuAllProps = exports.menuAllProps = ['defaultSelectedKeys', 'selectedKeys', 'defaultOpenKeys', 'openKeys', 'mode', 'getPopupContainer', 'onSelect', 'onDeselect', 'onDestroy', 'openTransitionName', 'openAnimation', 'subMenuOpenDelay', 'subMenuCloseDelay', 'forceSubMenuRender', 'triggerSubMenuAction', 'level', 'selectable', 'multiple', 'onOpenChange', 'visible', 'focusable', 'defaultActiveFirst', 'prefixCls', 'inlineIndent', 'parentMenu', 'title', 'rootPrefixCls', 'eventKey', 'active', 'onItemHover', 'onTitleMouseEnter', 'onTitleMouseLeave', 'onTitleClick', 'popupAlign', 'popupOffset', 'isOpen', 'renderMenuItem', 'manualRef', 'subMenuKey', 'disabled', 'index', 'isSelected', 'store', 'activeKey', 'builtinPlacements', 'overflowedIndicator',
+ this.nextCallback.cancel = function () {
+ active = false;
+ };
- // the following keys found need to be removed from test regression
- 'attribute', 'value', 'popupClassName', 'inlineCollapsed', 'menu', 'theme', 'itemIcon', 'expandIcon'];
+ return this.nextCallback;
+ };
- var getWidth = exports.getWidth = function getWidth(elem) {
- return elem && typeof elem.getBoundingClientRect === 'function' && elem.getBoundingClientRect().width || 0;
- };
+ Transition.prototype.onTransitionEnd = function onTransitionEnd(node, handler) {
+ this.setNextCallback(handler);
- var setStyle = exports.setStyle = function setStyle(elem, styleProperty, value) {
- if (elem && _typeof(elem.style) === 'object') {
- elem.style[styleProperty] = value;
- }
- };
-
- function fireKeyEvent(el, evtType, keyCode) {
- var evtObj;
- if (document.createEvent) {
- if (window.KeyEvent) {
- //firefox 浏览器下模拟事件
- evtObj = document.createEvent('KeyEvents');
- evtObj.initKeyEvent(evtType, true, true, window, true, false, false, false, keyCode, 0);
- } else {
- //chrome 浏览器下模拟事件
- evtObj = document.createEvent('UIEvents');
- evtObj.initUIEvent(evtType, true, true, window, 1);
-
- delete evtObj.keyCode;
- if (typeof evtObj.keyCode === "undefined") {
- //为了模拟keycode
- Object.defineProperty(evtObj, "keyCode", { value: keyCode });
+ if (node) {
+ if (transitionEndEvent == undefined) {
+ this.nextCallback();
} else {
- evtObj.key = String.fromCharCode(keyCode);
- }
-
- if (typeof evtObj.ctrlKey === 'undefined') {
- //为了模拟ctrl键
- Object.defineProperty(evtObj, "ctrlKey", { value: true });
- } else {
- evtObj.ctrlKey = true;
+ (0, _on2["default"])(node, transitionEndEvent, this.nextCallback);
}
+ setTimeout(this.nextCallback, this.props.timeout);
+ } else {
+ setTimeout(this.nextCallback, 0);
}
- el.dispatchEvent(evtObj);
- } else if (document.createEventObject) {
- //IE 浏览器下模拟事件
- evtObj = document.createEventObject();
- evtObj.keyCode = keyCode;
- el.fireEvent('on' + evtType, evtObj);
- }
- }
+ };
+
+ Transition.prototype.render = function render() {
+ var status = this.state.status;
+ if (status === UNMOUNTED) {
+ return null;
+ }
+
+ var _props = this.props,
+ children = _props.children,
+ className = _props.className,
+ childProps = _objectWithoutProperties(_props, ['children', 'className']);
+
+ Object.keys(Transition.propTypes).forEach(function (key) {
+ return delete childProps[key];
+ });
+
+ var transitionClassName = void 0;
+ if (status === EXITED) {
+ transitionClassName = this.props.exitedClassName;
+ } else if (status === ENTERING) {
+ transitionClassName = this.props.enteringClassName;
+ } else if (status === ENTERED) {
+ transitionClassName = this.props.enteredClassName;
+ } else if (status === EXITING) {
+ transitionClassName = this.props.exitingClassName;
+ }
+
+ var child = _react2["default"].Children.only(children);
+ return _react2["default"].cloneElement(child, _extends({}, childProps, {
+ className: (0, _classnames2["default"])(child.props.className, className, transitionClassName)
+ }));
+ };
+
+ return Transition;
+ }(_react.Component);
+
+ Transition.propTypes = propTypes;
+
+ Transition.defaultProps = defaultProps;
+
+ exports["default"] = Transition;
/***/ }),
- /* 57 */
+ /* 127 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -87913,144 +78245,1248 @@
value: true
});
- var _Dnd = __webpack_require__(829);
+ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
- var _Dnd2 = _interopRequireDefault(_Dnd);
+ var _react = __webpack_require__(0);
+
+ var _react2 = _interopRequireDefault(_react);
+
+ var _propTypes = __webpack_require__(1);
+
+ var _propTypes2 = _interopRequireDefault(_propTypes);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
- exports["default"] = _Dnd2["default"];
+ function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
+
+ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); } /**
+ * This source code is quoted from rc-slider.
+ * homepage: https://github.com/react-component/slider
+ */
+
+
+ var Handle = function (_React$Component) {
+ _inherits(Handle, _React$Component);
+
+ function Handle() {
+ _classCallCheck(this, Handle);
+
+ return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
+ }
+
+ Handle.prototype.render = function render() {
+ var _props = this.props,
+ className = _props.className,
+ vertical = _props.vertical,
+ offset = _props.offset,
+ style = _props.style,
+ disabled = _props.disabled,
+ min = _props.min,
+ max = _props.max,
+ value = _props.value,
+ restProps = _objectWithoutProperties(_props, ['className', 'vertical', 'offset', 'style', 'disabled', 'min', 'max', 'value']);
+
+ var postionStyle = vertical ? { bottom: offset + '%' } : { left: offset + '%' };
+ var elStyle = _extends({}, style, postionStyle);
+ var ariaProps = {};
+ if (value !== undefined) {
+ ariaProps = _extends({}, ariaProps, {
+ 'aria-valuemin': min,
+ 'aria-valuemax': max,
+ 'aria-valuenow': value,
+ 'aria-disabled': !!disabled
+ });
+ }
+
+ return _react2["default"].createElement('div', _extends({
+ role: 'slider',
+ tabIndex: '0'
+ }, ariaProps, restProps, {
+ className: className,
+ style: elStyle
+ }));
+ };
+
+ return Handle;
+ }(_react2["default"].Component);
+
+ exports["default"] = Handle;
+
+
+ Handle.propTypes = {
+ className: _propTypes2["default"].string,
+ vertical: _propTypes2["default"].bool,
+ offset: _propTypes2["default"].number,
+ style: _propTypes2["default"].object,
+ disabled: _propTypes2["default"].bool,
+ min: _propTypes2["default"].number,
+ max: _propTypes2["default"].number,
+ value: _propTypes2["default"].number
+ };
module.exports = exports['default'];
/***/ }),
- /* 58 */
+ /* 128 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ exports.isEventFromHandle = isEventFromHandle;
+ exports.isValueOutOfRange = isValueOutOfRange;
+ exports.isNotTouchEvent = isNotTouchEvent;
+ exports.getClosestPoint = getClosestPoint;
+ exports.getPrecision = getPrecision;
+ exports.getMousePosition = getMousePosition;
+ exports.getTouchPosition = getTouchPosition;
+ exports.getHandleCenterPosition = getHandleCenterPosition;
+ exports.ensureValueInRange = ensureValueInRange;
+ exports.ensureValuePrecision = ensureValuePrecision;
+ exports.pauseEvent = pauseEvent;
+ exports.getKeyboardValueMutator = getKeyboardValueMutator;
+
+ var _reactDom = __webpack_require__(4);
+
+ var _keyCode = __webpack_require__(157);
+
+ var _keyCode2 = _interopRequireDefault(_keyCode);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } /**
+ * This source code is quoted from rc-slider.
+ * homepage: https://github.com/react-component/slider
+ */
+
+
+ function isEventFromHandle(e, handles) {
+ return Object.keys(handles).some(function (key) {
+ return e.target === (0, _reactDom.findDOMNode)(handles[key]);
+ });
+ }
+
+ function isValueOutOfRange(value, _ref) {
+ var min = _ref.min,
+ max = _ref.max;
+
+ return value < min || value > max;
+ }
+
+ function isNotTouchEvent(e) {
+ //event.touches,多点触碰时的位置数组,比如缩放手势必须要用两指的触摸点,就是一个数组
+ return e.touches.length > 1 || e.type.toLowerCase() === 'touchend' && e.touches.length > 0;
+ }
+
+ function getClosestPoint(val, _ref2) {
+ var marks = _ref2.marks,
+ step = _ref2.step,
+ min = _ref2.min;
+
+ var points = Object.keys(marks).map(parseFloat);
+ if (step !== null) {
+ var closestStep = Math.round((val - min) / step) * step + min; //Math.round(((val - min) / step) * step) + min;
+ points.push(closestStep);
+ }
+ var diffs = points.map(function (point) {
+ return Math.abs(val - point);
+ });
+ return points[diffs.indexOf(Math.min.apply(Math, _toConsumableArray(diffs)))];
+ }
+
+ function getPrecision(step) {
+ var stepString = step.toString();
+ var precision = 0;
+ if (stepString.indexOf('.') >= 0) {
+ precision = stepString.length - stepString.indexOf('.') - 1;
+ }
+ return precision;
+ }
+
+ function getMousePosition(vertical, e) {
+ return vertical ? e.clientY : e.pageX;
+ }
+
+ function getTouchPosition(vertical, e) {
+ return vertical ? e.touches[0].clientY : e.touches[0].pageX;
+ }
+
+ function getHandleCenterPosition(vertical, handle) {
+ var coords = handle.getBoundingClientRect();
+ return vertical ? coords.top + coords.height * 0.5 : coords.left + coords.width * 0.5;
+ }
+
+ function ensureValueInRange(val, _ref3) {
+ var max = _ref3.max,
+ min = _ref3.min;
+
+ if (val <= min) {
+ return min;
+ }
+ if (val >= max) {
+ return max;
+ }
+ return val;
+ }
+
+ function ensureValuePrecision(val, props) {
+ var step = props.step;
+
+ var closestPoint = getClosestPoint(val, props);
+ return step === null ? closestPoint : parseFloat(closestPoint.toFixed(getPrecision(step)));
+ }
+
+ function pauseEvent(e) {
+ e.stopPropagation();
+ e.preventDefault();
+ }
+
+ function getKeyboardValueMutator(e) {
+ switch (e.keyCode) {
+ case _keyCode2["default"].UP:
+ case _keyCode2["default"].RIGHT:
+ return function (value, props) {
+ return value + props.step;
+ };
+
+ case _keyCode2["default"].DOWN:
+ case _keyCode2["default"].LEFT:
+ return function (value, props) {
+ return value - props.step;
+ };
+
+ case _keyCode2["default"].END:
+ return function (value, props) {
+ return props.max;
+ };
+ case _keyCode2["default"].HOME:
+ return function (value, props) {
+ return props.min;
+ };
+ case _keyCode2["default"].PAGE_UP:
+ return function (value, props) {
+ return value + props.step * 2;
+ };
+ case _keyCode2["default"].PAGE_DOWN:
+ return function (value, props) {
+ return value - props.step * 2;
+ };
+
+ default:
+ return undefined;
+ }
+ }
+
+ /***/ }),
+ /* 129 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ module.exports = { "default": __webpack_require__(401), __esModule: true };
+
+ /***/ }),
+ /* 130 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ module.exports = !__webpack_require__(29) && !__webpack_require__(53)(function () {
+ return Object.defineProperty(__webpack_require__(131)('div'), 'a', { get: function () { return 7; } }).a != 7;
+ });
+
+
+ /***/ }),
+ /* 131 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ var isObject = __webpack_require__(40);
+ var document = __webpack_require__(23).document;
+ // typeof document.createElement is 'object' in old IE
+ var is = isObject(document) && isObject(document.createElement);
+ module.exports = function (it) {
+ return is ? document.createElement(it) : {};
+ };
+
+
+ /***/ }),
+ /* 132 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ var has = __webpack_require__(30);
+ var toIObject = __webpack_require__(41);
+ var arrayIndexOf = __webpack_require__(408)(false);
+ var IE_PROTO = __webpack_require__(87)('IE_PROTO');
+
+ module.exports = function (object, names) {
+ var O = toIObject(object);
+ var i = 0;
+ var result = [];
+ var key;
+ for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
+ // Don't enum bug & hidden keys
+ while (names.length > i) if (has(O, key = names[i++])) {
+ ~arrayIndexOf(result, key) || result.push(key);
+ }
+ return result;
+ };
+
+
+ /***/ }),
+ /* 133 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ // fallback for non-array-like ES3 and non-enumerable old V8 strings
+ var cof = __webpack_require__(84);
+ // eslint-disable-next-line no-prototype-builtins
+ module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
+ return cof(it) == 'String' ? it.split('') : Object(it);
+ };
+
+
+ /***/ }),
+ /* 134 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ // 7.1.15 ToLength
+ var toInteger = __webpack_require__(86);
+ var min = Math.min;
+ module.exports = function (it) {
+ return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
+ };
+
+
+ /***/ }),
+ /* 135 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+ var $at = __webpack_require__(413)(true);
+
+ // 21.1.3.27 String.prototype[@@iterator]()
+ __webpack_require__(136)(String, 'String', function (iterated) {
+ this._t = String(iterated); // target
+ this._i = 0; // next index
+ // 21.1.5.2.1 %StringIteratorPrototype%.next()
+ }, function () {
+ var O = this._t;
+ var index = this._i;
+ var point;
+ if (index >= O.length) return { value: undefined, done: true };
+ point = $at(O, index);
+ this._i += point.length;
+ return { value: point, done: false };
+ });
+
+
+ /***/ }),
+ /* 136 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+ var LIBRARY = __webpack_require__(65);
+ var $export = __webpack_require__(28);
+ var redefine = __webpack_require__(137);
+ var hide = __webpack_require__(38);
+ var Iterators = __webpack_require__(55);
+ var $iterCreate = __webpack_require__(414);
+ var setToStringTag = __webpack_require__(93);
+ var getPrototypeOf = __webpack_require__(417);
+ var ITERATOR = __webpack_require__(17)('iterator');
+ var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
+ var FF_ITERATOR = '@@iterator';
+ var KEYS = 'keys';
+ var VALUES = 'values';
+
+ var returnThis = function () { return this; };
+
+ module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
+ $iterCreate(Constructor, NAME, next);
+ var getMethod = function (kind) {
+ if (!BUGGY && kind in proto) return proto[kind];
+ switch (kind) {
+ case KEYS: return function keys() { return new Constructor(this, kind); };
+ case VALUES: return function values() { return new Constructor(this, kind); };
+ } return function entries() { return new Constructor(this, kind); };
+ };
+ var TAG = NAME + ' Iterator';
+ var DEF_VALUES = DEFAULT == VALUES;
+ var VALUES_BUG = false;
+ var proto = Base.prototype;
+ var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
+ var $default = $native || getMethod(DEFAULT);
+ var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
+ var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
+ var methods, key, IteratorPrototype;
+ // Fix native
+ if ($anyNative) {
+ IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
+ if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
+ // Set @@toStringTag to native iterators
+ setToStringTag(IteratorPrototype, TAG, true);
+ // fix for some old engines
+ if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);
+ }
+ }
+ // fix Array#{values, @@iterator}.name in V8 / FF
+ if (DEF_VALUES && $native && $native.name !== VALUES) {
+ VALUES_BUG = true;
+ $default = function values() { return $native.call(this); };
+ }
+ // Define iterator
+ if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
+ hide(proto, ITERATOR, $default);
+ }
+ // Plug for library
+ Iterators[NAME] = $default;
+ Iterators[TAG] = returnThis;
+ if (DEFAULT) {
+ methods = {
+ values: DEF_VALUES ? $default : getMethod(VALUES),
+ keys: IS_SET ? $default : getMethod(KEYS),
+ entries: $entries
+ };
+ if (FORCED) for (key in methods) {
+ if (!(key in proto)) redefine(proto, key, methods[key]);
+ } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
+ }
+ return methods;
+ };
+
+
+ /***/ }),
+ /* 137 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ module.exports = __webpack_require__(38);
+
+
+ /***/ }),
+ /* 138 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
+ var $keys = __webpack_require__(132);
+ var hiddenKeys = __webpack_require__(89).concat('length', 'prototype');
+
+ exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
+ return $keys(O, hiddenKeys);
+ };
+
+
+ /***/ }),
+ /* 139 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ var pIE = __webpack_require__(67);
+ var createDesc = __webpack_require__(54);
+ var toIObject = __webpack_require__(41);
+ var toPrimitive = __webpack_require__(83);
+ var has = __webpack_require__(30);
+ var IE8_DOM_DEFINE = __webpack_require__(130);
+ var gOPD = Object.getOwnPropertyDescriptor;
+
+ exports.f = __webpack_require__(29) ? gOPD : function getOwnPropertyDescriptor(O, P) {
+ O = toIObject(O);
+ P = toPrimitive(P, true);
+ if (IE8_DOM_DEFINE) try {
+ return gOPD(O, P);
+ } catch (e) { /* empty */ }
+ if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
+ };
+
+
+ /***/ }),
+ /* 140 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
- /* harmony export (immutable) */ __webpack_exports__["h"] = noop;
- /* harmony export (immutable) */ __webpack_exports__["a"] = getKeyFromChildrenIndex;
- /* harmony export (immutable) */ __webpack_exports__["b"] = getMenuIdFromSubMenuEventKey;
- /* harmony export (immutable) */ __webpack_exports__["e"] = loopMenuItem;
- /* harmony export (immutable) */ __webpack_exports__["f"] = loopMenuItemRecursively;
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return menuAllProps; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getWidth; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return setStyle; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return isMobileDevice; });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_react__);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util__ = __webpack_require__(10);
- var isMobile = __webpack_require__(200);
- function noop() {}
-
- function getKeyFromChildrenIndex(child, menuEventKey, index) {
- var prefix = menuEventKey || '';
- return child.key || prefix + 'item_' + index;
- }
-
- function getMenuIdFromSubMenuEventKey(eventKey) {
- return eventKey + '-menu-';
- }
-
- function loopMenuItem(children, cb) {
- var index = -1;
- __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (c) {
- index++;
- if (c && c.type && c.type.isMenuItemGroup) {
- __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(c.props.children, function (c2) {
- index++;
- cb(c2, index);
- });
- } else {
- cb(c, index);
- }
- });
- }
-
- function loopMenuItemRecursively(children, keys, ret) {
- /* istanbul ignore if */
- if (!children || ret.find) {
- return;
+ /**
+ * Rule for validating required fields.
+ *
+ * @param rule The validation rule.
+ * @param value The value of the field on the source object.
+ * @param source The source object being validated.
+ * @param errors An array of errors that this rule may add
+ * validation errors to.
+ * @param options The validation options.
+ * @param options.messages The validation messages.
+ */
+ function required(rule, value, source, errors, options, type) {
+ if (rule.required && (!source.hasOwnProperty(rule.field) || __WEBPACK_IMPORTED_MODULE_0__util__["e" /* isEmptyValue */](value, type || rule.type))) {
+ errors.push(__WEBPACK_IMPORTED_MODULE_0__util__["d" /* format */](options.messages.required, rule.fullField));
}
- __WEBPACK_IMPORTED_MODULE_0_react___default.a.Children.forEach(children, function (c) {
- if (c) {
- var construct = c.type;
- if (!construct || !(construct.isSubMenu || construct.isMenuItem || construct.isMenuItemGroup)) {
- return;
- }
- if (keys.indexOf(c.key) !== -1) {
- ret.find = true;
- } else if (c.props.children) {
- loopMenuItemRecursively(c.props.children, keys, ret);
- }
- }
- });
}
- var menuAllProps = ['defaultSelectedKeys', 'selectedKeys', 'defaultOpenKeys', 'openKeys', 'mode', 'getPopupContainer', 'onSelect', 'onDeselect', 'onDestroy', 'openTransitionName', 'openAnimation', 'subMenuOpenDelay', 'subMenuCloseDelay', 'forceSubMenuRender', 'triggerSubMenuAction', 'level', 'selectable', 'multiple', 'onOpenChange', 'visible', 'focusable', 'defaultActiveFirst', 'prefixCls', 'inlineIndent', 'parentMenu', 'title', 'rootPrefixCls', 'eventKey', 'active', 'onItemHover', 'onTitleMouseEnter', 'onTitleMouseLeave', 'onTitleClick', 'popupAlign', 'popupOffset', 'isOpen', 'renderMenuItem', 'manualRef', 'subMenuKey', 'disabled', 'index', 'isSelected', 'store', 'activeKey', 'builtinPlacements', 'overflowedIndicator',
-
- // the following keys found need to be removed from test regression
- 'attribute', 'value', 'popupClassName', 'inlineCollapsed', 'menu', 'theme', 'itemIcon', 'expandIcon'];
-
- // ref: https://github.com/ant-design/ant-design/issues/14007
- // ref: https://bugs.chromium.org/p/chromium/issues/detail?id=360889
- // getBoundingClientRect return the full precision value, which is
- // not the same behavior as on chrome. Set the precision to 6 to
- // unify their behavior
- var getWidth = function getWidth(elem) {
- var width = elem && typeof elem.getBoundingClientRect === 'function' && elem.getBoundingClientRect().width;
- if (width) {
- width = +width.toFixed(6);
- }
- return width || 0;
- };
-
- var setStyle = function setStyle(elem, styleProperty, value) {
- if (elem && typeof elem.style === 'object') {
- elem.style[styleProperty] = value;
- }
- };
-
- var isMobileDevice = function isMobileDevice() {
- return isMobile.any;
- };
+ /* harmony default export */ __webpack_exports__["a"] = (required);
/***/ }),
- /* 59 */
- /***/ (function(module, exports) {
-
- module.exports = function (bitmap, value) {
- return {
- enumerable: !(bitmap & 1),
- configurable: !(bitmap & 2),
- writable: !(bitmap & 4),
- value: value
- };
- };
-
-
- /***/ }),
- /* 60 */
+ /* 141 */
/***/ (function(module, exports, __webpack_require__) {
- // 19.1.2.14 / 15.2.3.14 Object.keys(O)
- var $keys = __webpack_require__(161);
- var enumBugKeys = __webpack_require__(102);
+ "use strict";
+ /* WEBPACK VAR INJECTION */(function(process) {/**
+ * Copyright (c) 2014-present, Facebook, Inc.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
- module.exports = Object.keys || function keys(O) {
- return $keys(O, enumBugKeys);
+
+
+ /**
+ * Similar to invariant but only logs a warning if the condition is not met.
+ * This can be used to log issues in development environments in critical
+ * paths. Removing the logging code for production environments will keep the
+ * same logic and follow the same code paths.
+ */
+
+ var __DEV__ = process.env.NODE_ENV !== 'production';
+
+ var warning = function() {};
+
+ if (__DEV__) {
+ var printWarning = function printWarning(format, args) {
+ var len = arguments.length;
+ args = new Array(len > 1 ? len - 1 : 0);
+ for (var key = 1; key < len; key++) {
+ args[key - 1] = arguments[key];
+ }
+ var argIndex = 0;
+ var message = 'Warning: ' +
+ format.replace(/%s/g, function() {
+ return args[argIndex++];
+ });
+ if (typeof console !== 'undefined') {
+ console.error(message);
+ }
+ try {
+ // --- Welcome to debugging React ---
+ // This error was thrown as a convenience so that you can use this stack
+ // to find the callsite that caused this warning to fire.
+ throw new Error(message);
+ } catch (x) {}
+ }
+
+ warning = function(condition, format, args) {
+ var len = arguments.length;
+ args = new Array(len > 2 ? len - 2 : 0);
+ for (var key = 2; key < len; key++) {
+ args[key - 2] = arguments[key];
+ }
+ if (format === undefined) {
+ throw new Error(
+ '`warning(condition, format, ...args)` requires a warning ' +
+ 'message argument'
+ );
+ }
+ if (!condition) {
+ printWarning.apply(null, [format].concat(args));
+ }
+ };
+ }
+
+ module.exports = warning;
+
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(12)))
+
+ /***/ }),
+ /* 142 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ var isArray = __webpack_require__(96),
+ isKey = __webpack_require__(470),
+ stringToPath = __webpack_require__(475),
+ toString = __webpack_require__(144);
+
+ /**
+ * Casts `value` to a path array if it's not one.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @param {Object} [object] The object to query keys on.
+ * @returns {Array} Returns the cast property path array.
+ */
+ function castPath(value, object) {
+ if (isArray(value)) {
+ return value;
+ }
+ return isKey(value, object) ? [value] : stringToPath(toString(value));
+ }
+
+ module.exports = castPath;
+
+
+ /***/ }),
+ /* 143 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ var Symbol = __webpack_require__(98),
+ getRawTag = __webpack_require__(472),
+ objectToString = __webpack_require__(473);
+
+ /** `Object#toString` result references. */
+ var nullTag = '[object Null]',
+ undefinedTag = '[object Undefined]';
+
+ /** Built-in value references. */
+ var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
+
+ /**
+ * The base implementation of `getTag` without fallbacks for buggy environments.
+ *
+ * @private
+ * @param {*} value The value to query.
+ * @returns {string} Returns the `toStringTag`.
+ */
+ function baseGetTag(value) {
+ if (value == null) {
+ return value === undefined ? undefinedTag : nullTag;
+ }
+ return (symToStringTag && symToStringTag in Object(value))
+ ? getRawTag(value)
+ : objectToString(value);
+ }
+
+ module.exports = baseGetTag;
+
+
+ /***/ }),
+ /* 144 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ var baseToString = __webpack_require__(504);
+
+ /**
+ * Converts `value` to a string. An empty string is returned for `null`
+ * and `undefined` values. The sign of `-0` is preserved.
+ *
+ * @static
+ * @memberOf _
+ * @since 4.0.0
+ * @category Lang
+ * @param {*} value The value to convert.
+ * @returns {string} Returns the converted string.
+ * @example
+ *
+ * _.toString(null);
+ * // => ''
+ *
+ * _.toString(-0);
+ * // => '-0'
+ *
+ * _.toString([1, 2, 3]);
+ * // => '1,2,3'
+ */
+ function toString(value) {
+ return value == null ? '' : baseToString(value);
+ }
+
+ module.exports = toString;
+
+
+ /***/ }),
+ /* 145 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ var isSymbol = __webpack_require__(97);
+
+ /** Used as references for various `Number` constants. */
+ var INFINITY = 1 / 0;
+
+ /**
+ * Converts `value` to a string key if it's not a string or symbol.
+ *
+ * @private
+ * @param {*} value The value to inspect.
+ * @returns {string|symbol} Returns the key.
+ */
+ function toKey(value) {
+ if (typeof value == 'string' || isSymbol(value)) {
+ return value;
+ }
+ var result = (value + '');
+ return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
+ }
+
+ module.exports = toKey;
+
+
+ /***/ }),
+ /* 146 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ var baseSet = __webpack_require__(506);
+
+ /**
+ * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
+ * it's created. Arrays are created for missing index properties while objects
+ * are created for all other missing properties. Use `_.setWith` to customize
+ * `path` creation.
+ *
+ * **Note:** This method mutates `object`.
+ *
+ * @static
+ * @memberOf _
+ * @since 3.7.0
+ * @category Object
+ * @param {Object} object The object to modify.
+ * @param {Array|string} path The path of the property to set.
+ * @param {*} value The value to set.
+ * @returns {Object} Returns `object`.
+ * @example
+ *
+ * var object = { 'a': [{ 'b': { 'c': 3 } }] };
+ *
+ * _.set(object, 'a[0].b.c', 4);
+ * console.log(object.a[0].b.c);
+ * // => 4
+ *
+ * _.set(object, ['x', '0', 'y', 'z'], 5);
+ * console.log(object.x[0].y.z);
+ * // => 5
+ */
+ function set(object, path, value) {
+ return object == null ? object : baseSet(object, path, value);
+ }
+
+ module.exports = set;
+
+
+ /***/ }),
+ /* 147 */
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+ "use strict";
+ /* harmony export (immutable) */ __webpack_exports__["b"] = isFormField;
+ /* harmony export (immutable) */ __webpack_exports__["a"] = createFormField;
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(9);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__ = __webpack_require__(6);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__);
+
+
+
+ var Field = function Field(fields) {
+ __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default()(this, Field);
+
+ __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()(this, fields);
};
+ function isFormField(obj) {
+ return obj instanceof Field;
+ }
+
+ function createFormField(field) {
+ if (isFormField(field)) {
+ return field;
+ }
+ return new Field(field);
+ }
/***/ }),
- /* 61 */
- /***/ (function(module, exports) {
+ /* 148 */
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
- module.exports = {};
+ "use strict";
+ /* harmony export (immutable) */ __webpack_exports__["a"] = argumentContainer;
+ /* harmony export (immutable) */ __webpack_exports__["i"] = identity;
+ /* harmony export (immutable) */ __webpack_exports__["b"] = flattenArray;
+ /* unused harmony export treeTraverse */
+ /* harmony export (immutable) */ __webpack_exports__["c"] = flattenFields;
+ /* harmony export (immutable) */ __webpack_exports__["k"] = normalizeValidateRules;
+ /* harmony export (immutable) */ __webpack_exports__["f"] = getValidateTriggers;
+ /* harmony export (immutable) */ __webpack_exports__["g"] = getValueFromEvent;
+ /* harmony export (immutable) */ __webpack_exports__["d"] = getErrorStrs;
+ /* harmony export (immutable) */ __webpack_exports__["e"] = getParams;
+ /* harmony export (immutable) */ __webpack_exports__["j"] = isEmptyObject;
+ /* harmony export (immutable) */ __webpack_exports__["h"] = hasRules;
+ /* harmony export (immutable) */ __webpack_exports__["l"] = startsWith;
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(9);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_hoist_non_react_statics__ = __webpack_require__(512);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_hoist_non_react_statics___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_hoist_non_react_statics__);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning__ = __webpack_require__(141);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_warning__);
+
+
+ function getDisplayName(WrappedComponent) {
+ return WrappedComponent.displayName || WrappedComponent.name || 'WrappedComponent';
+ }
+
+ function argumentContainer(Container, WrappedComponent) {
+ /* eslint no-param-reassign:0 */
+ Container.displayName = 'Form(' + getDisplayName(WrappedComponent) + ')';
+ Container.WrappedComponent = WrappedComponent;
+ return __WEBPACK_IMPORTED_MODULE_1_hoist_non_react_statics___default()(Container, WrappedComponent);
+ }
+
+ function identity(obj) {
+ return obj;
+ }
+
+ function flattenArray(arr) {
+ return Array.prototype.concat.apply([], arr);
+ }
+
+ function treeTraverse() {
+ var path = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
+ var tree = arguments[1];
+ var isLeafNode = arguments[2];
+ var errorMessage = arguments[3];
+ var callback = arguments[4];
+
+ if (isLeafNode(path, tree)) {
+ callback(path, tree);
+ } else if (tree === undefined || tree === null) {
+ // Do nothing
+ } else if (Array.isArray(tree)) {
+ tree.forEach(function (subTree, index) {
+ return treeTraverse(path + '[' + index + ']', subTree, isLeafNode, errorMessage, callback);
+ });
+ } else {
+ // It's object and not a leaf node
+ if (typeof tree !== 'object') {
+ __WEBPACK_IMPORTED_MODULE_2_warning___default()(false, errorMessage);
+ return;
+ }
+ Object.keys(tree).forEach(function (subTreeKey) {
+ var subTree = tree[subTreeKey];
+ treeTraverse('' + path + (path ? '.' : '') + subTreeKey, subTree, isLeafNode, errorMessage, callback);
+ });
+ }
+ }
+
+ function flattenFields(maybeNestedFields, isLeafNode, errorMessage) {
+ var fields = {};
+ treeTraverse(undefined, maybeNestedFields, isLeafNode, errorMessage, function (path, node) {
+ fields[path] = node;
+ });
+ return fields;
+ }
+
+ function normalizeValidateRules(validate, rules, validateTrigger) {
+ var validateRules = validate.map(function (item) {
+ var newItem = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, item, {
+ trigger: item.trigger || []
+ });
+ if (typeof newItem.trigger === 'string') {
+ newItem.trigger = [newItem.trigger];
+ }
+ return newItem;
+ });
+ if (rules) {
+ validateRules.push({
+ trigger: validateTrigger ? [].concat(validateTrigger) : [],
+ rules: rules
+ });
+ }
+ return validateRules;
+ }
+
+ function getValidateTriggers(validateRules) {
+ return validateRules.filter(function (item) {
+ return !!item.rules && item.rules.length;
+ }).map(function (item) {
+ return item.trigger;
+ }).reduce(function (pre, curr) {
+ return pre.concat(curr);
+ }, []);
+ }
+
+ function getValueFromEvent(e) {
+ // To support custom element
+ if (!e || !e.target) {
+ return e;
+ }
+ var target = e.target;
+
+ return target.type === 'checkbox' ? target.checked : target.value;
+ }
+
+ function getErrorStrs(errors) {
+ if (errors) {
+ return errors.map(function (e) {
+ if (e && e.message) {
+ return e.message;
+ }
+ return e;
+ });
+ }
+ return errors;
+ }
+
+ function getParams(ns, opt, cb) {
+ var names = ns;
+ var options = opt;
+ var callback = cb;
+ if (cb === undefined) {
+ if (typeof names === 'function') {
+ callback = names;
+ options = {};
+ names = undefined;
+ } else if (Array.isArray(names)) {
+ if (typeof options === 'function') {
+ callback = options;
+ options = {};
+ } else {
+ options = options || {};
+ }
+ } else {
+ callback = options;
+ options = names || {};
+ names = undefined;
+ }
+ }
+ return {
+ names: names,
+ options: options,
+ callback: callback
+ };
+ }
+
+ function isEmptyObject(obj) {
+ return Object.keys(obj).length === 0;
+ }
+
+ function hasRules(validate) {
+ if (validate) {
+ return validate.some(function (item) {
+ return item.rules && item.rules.length;
+ });
+ }
+ return false;
+ }
+
+ function startsWith(str, prefix) {
+ return str.lastIndexOf(prefix, 0) === 0;
+ }
+
/***/ }),
- /* 62 */
+ /* 149 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+ var _classnames = __webpack_require__(3);
+
+ var _classnames2 = _interopRequireDefault(_classnames);
+
+ var _react = __webpack_require__(0);
+
+ var _react2 = _interopRequireDefault(_react);
+
+ var _propTypes = __webpack_require__(1);
+
+ var _propTypes2 = _interopRequireDefault(_propTypes);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+ function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
+
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
+
+ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
+
+ var propTypes = {
+ /**
+ * Adds `container-fluid` class.
+ */
+ fluid: _propTypes2["default"].bool,
+ /**
+ * You can use a custom element for this component
+ */
+ componentClass: _propTypes2["default"].oneOfType([_propTypes2["default"].element, _propTypes2["default"].string])
+ };
+
+ var defaultProps = {
+ componentClass: 'div',
+ fluid: false,
+ clsPrefix: 'u-container'
+ };
+
+ var Con = function (_React$Component) {
+ _inherits(Con, _React$Component);
+
+ function Con() {
+ _classCallCheck(this, Con);
+
+ return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
+ }
+
+ Con.prototype.render = function render() {
+ var _tbclass;
+
+ var _props = this.props,
+ fluid = _props.fluid,
+ Component = _props.componentClass,
+ clsPrefix = _props.clsPrefix,
+ className = _props.className,
+ others = _objectWithoutProperties(_props, ['fluid', 'componentClass', 'clsPrefix', 'className']);
+
+ var tbclass = (_tbclass = {}, _defineProperty(_tbclass, '' + clsPrefix, !fluid), _defineProperty(_tbclass, clsPrefix + '-fluid', fluid), _tbclass);
+
+ return _react2["default"].createElement(
+ Component,
+ _extends({}, others, {
+ className: (0, _classnames2["default"])(tbclass, className)
+ }),
+ this.props.children
+ );
+ };
+
+ return Con;
+ }(_react2["default"].Component);
+
+ Con.propTypes = propTypes;
+ Con.defaultProps = defaultProps;
+
+ exports["default"] = Con;
+ module.exports = exports['default'];
+
+ /***/ }),
+ /* 150 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _InputNumber = __webpack_require__(531);
+
+ var _InputNumber2 = _interopRequireDefault(_InputNumber);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+ exports["default"] = _InputNumber2["default"];
+ module.exports = exports['default'];
+
+ /***/ }),
+ /* 151 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
+
+ var _classnames = __webpack_require__(3);
+
+ var _classnames2 = _interopRequireDefault(_classnames);
+
+ var _react = __webpack_require__(0);
+
+ var _react2 = _interopRequireDefault(_react);
+
+ var _propTypes = __webpack_require__(1);
+
+ var _propTypes2 = _interopRequireDefault(_propTypes);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+ function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
+
+ function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
+
+ var propTypes = {
+
+ colors: _propTypes2["default"].oneOf(['', 'dark', 'success', 'info', 'warning', 'danger', 'primary']),
+
+ disabled: _propTypes2["default"].bool,
+
+ inverse: _propTypes2["default"].bool
+
+ };
+
+ var defaultProps = {
+ disabled: false,
+ inverse: false,
+ colors: 'primary',
+ clsPrefix: 'u-checkbox',
+ defaultChecked: false,
+ onClick: function onClick() {}
+ };
+ var clsPrefix = 'u-checkbox';
+
+ var Checkbox = function (_React$Component) {
+ _inherits(Checkbox, _React$Component);
+
+ function Checkbox(props) {
+ _classCallCheck(this, Checkbox);
+
+ var _this = _possibleConstructorReturn(this, _React$Component.call(this, props));
+
+ _initialiseProps.call(_this);
+
+ _this.state = {
+ checked: 'checked' in props ? props.checked : props.defaultChecked
+ };
+ _this.doubleClickFlag = null;
+ return _this;
+ }
+
+ Checkbox.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
+ if ('checked' in nextProps) {
+ this.setState({
+ checked: nextProps.checked
+ });
+ }
+ };
+
+ Checkbox.prototype.render = function render() {
+ var _props = this.props,
+ disabled = _props.disabled,
+ inverse = _props.inverse,
+ colors = _props.colors,
+ size = _props.size,
+ className = _props.className,
+ indeterminate = _props.indeterminate,
+ onClick = _props.onClick,
+ children = _props.children,
+ checked = _props.checked,
+ clsPrefix = _props.clsPrefix,
+ onDoubleClick = _props.onDoubleClick,
+ onChange = _props.onChange,
+ others = _objectWithoutProperties(_props, ['disabled', 'inverse', 'colors', 'size', 'className', 'indeterminate', 'onClick', 'children', 'checked', 'clsPrefix', 'onDoubleClick', 'onChange']);
+
+ var input = _react2["default"].createElement('input', _extends({}, others, {
+ type: 'checkbox',
+ disabled: this.props.disabled
+ }));
+
+ var classes = {
+ 'is-checked': this.state.checked,
+ disabled: disabled
+ };
+
+ if (inverse) {
+ classes[clsPrefix + '-inverse'] = true;
+ }
+
+ if (colors) {
+ classes[clsPrefix + '-' + colors] = true;
+ }
+
+ if (size) {
+ classes[clsPrefix + '-' + size] = true;
+ }
+
+ if (!checked && indeterminate) {
+ classes[clsPrefix + '-indeterminate'] = true;
+ }
+
+ var classNames = (0, _classnames2["default"])(clsPrefix, classes);
+
+ return _react2["default"].createElement(
+ 'label',
+ {
+ className: (0, _classnames2["default"])(classNames, className),
+ onDoubleClick: this.handledbClick,
+ onClick: this.changeState },
+ input,
+ _react2["default"].createElement(
+ 'label',
+ { className: clsPrefix + '-label' },
+ children
+ )
+ );
+ };
+
+ return Checkbox;
+ }(_react2["default"].Component);
+
+ var _initialiseProps = function _initialiseProps() {
+ var _this2 = this;
+
+ this.changeState = function (e) {
+ var props = _this2.props;
+ var checked = _this2.state.checked;
+
+ clearTimeout(_this2.doubleClickFlag);
+ if (props.onClick instanceof Function) {
+ props.onClick(e);
+ }
+ if (props.onDoubleClick instanceof Function) {
+ _this2.doubleClickFlag = setTimeout(function () {
+ //do function在此处写单击事件要执行的代码
+ _this2.change(props, checked);
+ }, 300);
+ } else {
+ _this2.change(props, checked);
+ }
+ e.stopPropagation();
+ e.preventDefault();
+ //执行延时
+ };
+
+ this.change = function (props, checked) {
+ if (props.disabled) {
+ return;
+ }
+ if (!('checked' in props)) {
+ _this2.setState({
+ checked: !checked
+ });
+ }
+
+ if (props.onChange instanceof Function) {
+ props.onChange(!checked);
+ }
+ };
+
+ this.handledbClick = function (e) {
+ var onDoubleClick = _this2.props.onDoubleClick;
+
+ clearTimeout(_this2.doubleClickFlag);
+ onDoubleClick && onDoubleClick(_this2.state.checked, e);
+ };
+ };
+
+ Checkbox.propTypes = propTypes;
+ Checkbox.defaultProps = defaultProps;
+
+ exports["default"] = Checkbox;
+ module.exports = exports['default'];
+
+ /***/ }),
+ /* 152 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global, module) {/**
@@ -89902,2873 +81338,1831 @@
module.exports = isEqual;
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(24), __webpack_require__(182)(module)))
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(43), __webpack_require__(153)(module)))
/***/ }),
- /* 63 */
- /***/ (function(module, exports, __webpack_require__) {
-
- /**
- * Module dependencies.
- */
-
- try {
- var index = __webpack_require__(187);
- } catch (err) {
- var index = __webpack_require__(187);
- }
-
- /**
- * Whitespace regexp.
- */
-
- var re = /\s+/;
-
- /**
- * toString reference.
- */
-
- var toString = Object.prototype.toString;
-
- /**
- * Wrap `el` in a `ClassList`.
- *
- * @param {Element} el
- * @return {ClassList}
- * @api public
- */
-
- module.exports = function(el){
- return new ClassList(el);
- };
-
- /**
- * Initialize a new ClassList for `el`.
- *
- * @param {Element} el
- * @api private
- */
-
- function ClassList(el) {
- if (!el || !el.nodeType) {
- throw new Error('A DOM element reference is required');
- }
- this.el = el;
- this.list = el.classList;
- }
-
- /**
- * Add class `name` if not already present.
- *
- * @param {String} name
- * @return {ClassList}
- * @api public
- */
-
- ClassList.prototype.add = function(name){
- // classList
- if (this.list) {
- this.list.add(name);
- return this;
- }
-
- // fallback
- var arr = this.array();
- var i = index(arr, name);
- if (!~i) arr.push(name);
- this.el.className = arr.join(' ');
- return this;
- };
-
- /**
- * Remove class `name` when present, or
- * pass a regular expression to remove
- * any which match.
- *
- * @param {String|RegExp} name
- * @return {ClassList}
- * @api public
- */
-
- ClassList.prototype.remove = function(name){
- if ('[object RegExp]' == toString.call(name)) {
- return this.removeMatching(name);
- }
-
- // classList
- if (this.list) {
- this.list.remove(name);
- return this;
- }
-
- // fallback
- var arr = this.array();
- var i = index(arr, name);
- if (~i) arr.splice(i, 1);
- this.el.className = arr.join(' ');
- return this;
- };
-
- /**
- * Remove all classes matching `re`.
- *
- * @param {RegExp} re
- * @return {ClassList}
- * @api private
- */
-
- ClassList.prototype.removeMatching = function(re){
- var arr = this.array();
- for (var i = 0; i < arr.length; i++) {
- if (re.test(arr[i])) {
- this.remove(arr[i]);
- }
- }
- return this;
- };
-
- /**
- * Toggle class `name`, can force state via `force`.
- *
- * For browsers that support classList, but do not support `force` yet,
- * the mistake will be detected and corrected.
- *
- * @param {String} name
- * @param {Boolean} force
- * @return {ClassList}
- * @api public
- */
-
- ClassList.prototype.toggle = function(name, force){
- // classList
- if (this.list) {
- if ("undefined" !== typeof force) {
- if (force !== this.list.toggle(name, force)) {
- this.list.toggle(name); // toggle again to correct
- }
- } else {
- this.list.toggle(name);
- }
- return this;
- }
-
- // fallback
- if ("undefined" !== typeof force) {
- if (!force) {
- this.remove(name);
- } else {
- this.add(name);
- }
- } else {
- if (this.has(name)) {
- this.remove(name);
- } else {
- this.add(name);
- }
- }
-
- return this;
- };
-
- /**
- * Return an array of classes.
- *
- * @return {Array}
- * @api public
- */
-
- ClassList.prototype.array = function(){
- var className = this.el.getAttribute('class') || '';
- var str = className.replace(/^\s+|\s+$/g, '');
- var arr = str.split(re);
- if ('' === arr[0]) arr.shift();
- return arr;
- };
-
- /**
- * Check if class `name` is present.
- *
- * @param {String} name
- * @return {ClassList}
- * @api public
- */
-
- ClassList.prototype.has =
- ClassList.prototype.contains = function(name){
- return this.list
- ? this.list.contains(name)
- : !! ~index(this.array(), name);
- };
-
-
- /***/ }),
- /* 64 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
-
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__ = __webpack_require__(6);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass__ = __webpack_require__(45);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(7);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__ = __webpack_require__(8);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react_dom__ = __webpack_require__(4);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react_dom__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(1);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__);
-
-
-
-
-
-
-
-
- var ContainerRender = function (_React$Component) {
- __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default()(ContainerRender, _React$Component);
-
- function ContainerRender() {
- var _ref;
-
- var _temp, _this, _ret;
-
- __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default()(this, ContainerRender);
-
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
-
- return _ret = (_temp = (_this = __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default()(this, (_ref = ContainerRender.__proto__ || Object.getPrototypeOf(ContainerRender)).call.apply(_ref, [this].concat(args))), _this), _this.removeContainer = function () {
- if (_this.container) {
- __WEBPACK_IMPORTED_MODULE_5_react_dom___default.a.unmountComponentAtNode(_this.container);
- _this.container.parentNode.removeChild(_this.container);
- _this.container = null;
- }
- }, _this.renderComponent = function (props, ready) {
- var _this$props = _this.props,
- visible = _this$props.visible,
- getComponent = _this$props.getComponent,
- forceRender = _this$props.forceRender,
- getContainer = _this$props.getContainer,
- parent = _this$props.parent;
-
- if (visible || parent._component || forceRender) {
- if (!_this.container) {
- _this.container = getContainer();
- }
- __WEBPACK_IMPORTED_MODULE_5_react_dom___default.a.unstable_renderSubtreeIntoContainer(parent, getComponent(props), _this.container, function callback() {
- if (ready) {
- ready.call(this);
- }
- });
- }
- }, _temp), __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default()(_this, _ret);
- }
-
- __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass___default()(ContainerRender, [{
- key: 'componentDidMount',
- value: function componentDidMount() {
- if (this.props.autoMount) {
- this.renderComponent();
- }
- }
- }, {
- key: 'componentDidUpdate',
- value: function componentDidUpdate() {
- if (this.props.autoMount) {
- this.renderComponent();
- }
- }
- }, {
- key: 'componentWillUnmount',
- value: function componentWillUnmount() {
- if (this.props.autoDestroy) {
- this.removeContainer();
- }
- }
- }, {
- key: 'render',
- value: function render() {
- return this.props.children({
- renderComponent: this.renderComponent,
- removeContainer: this.removeContainer
- });
- }
- }]);
-
- return ContainerRender;
- }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component);
-
- ContainerRender.propTypes = {
- autoMount: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
- autoDestroy: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
- visible: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
- forceRender: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
- parent: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
- getComponent: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func.isRequired,
- getContainer: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func.isRequired,
- children: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func.isRequired
- };
- ContainerRender.defaultProps = {
- autoMount: true,
- autoDestroy: true,
- forceRender: false
- };
- /* harmony default export */ __webpack_exports__["a"] = (ContainerRender);
-
- /***/ }),
- /* 65 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
-
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__ = __webpack_require__(6);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass__ = __webpack_require__(45);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(7);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__ = __webpack_require__(8);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react_dom__ = __webpack_require__(4);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react_dom__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(1);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__);
-
-
-
-
-
-
-
-
- var Portal = function (_React$Component) {
- __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default()(Portal, _React$Component);
-
- function Portal() {
- __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default()(this, Portal);
-
- return __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default()(this, (Portal.__proto__ || Object.getPrototypeOf(Portal)).apply(this, arguments));
- }
-
- __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_createClass___default()(Portal, [{
- key: 'componentDidMount',
- value: function componentDidMount() {
- this.createContainer();
- }
- }, {
- key: 'componentDidUpdate',
- value: function componentDidUpdate(prevProps) {
- var didUpdate = this.props.didUpdate;
-
- if (didUpdate) {
- didUpdate(prevProps);
- }
- }
- }, {
- key: 'componentWillUnmount',
- value: function componentWillUnmount() {
- this.removeContainer();
- }
- }, {
- key: 'createContainer',
- value: function createContainer() {
- this._container = this.props.getContainer();
- this.forceUpdate();
- }
- }, {
- key: 'removeContainer',
- value: function removeContainer() {
- if (this._container) {
- this._container.parentNode.removeChild(this._container);
- }
- }
- }, {
- key: 'render',
- value: function render() {
- if (this._container) {
- return __WEBPACK_IMPORTED_MODULE_5_react_dom___default.a.createPortal(this.props.children, this._container);
- }
- return null;
- }
- }]);
-
- return Portal;
- }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component);
-
- Portal.propTypes = {
- getContainer: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func.isRequired,
- children: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.node.isRequired,
- didUpdate: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func
- };
- /* harmony default export */ __webpack_exports__["a"] = (Portal);
-
- /***/ }),
- /* 66 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
-
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Align__ = __webpack_require__(639);
- // export this package's api
-
-
- /* harmony default export */ __webpack_exports__["a"] = (__WEBPACK_IMPORTED_MODULE_0__Align__["a" /* default */]);
-
- /***/ }),
- /* 67 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- module.exports = __webpack_require__(648);
-
- /***/ }),
- /* 68 */
- /***/ (function(module, exports, __webpack_require__) {
-
- /* WEBPACK VAR INJECTION */(function(global) {var now = __webpack_require__(662)
- , root = typeof window === 'undefined' ? global : window
- , vendors = ['moz', 'webkit']
- , suffix = 'AnimationFrame'
- , raf = root['request' + suffix]
- , caf = root['cancel' + suffix] || root['cancelRequest' + suffix]
-
- for(var i = 0; !raf && i < vendors.length; i++) {
- raf = root[vendors[i] + 'Request' + suffix]
- caf = root[vendors[i] + 'Cancel' + suffix]
- || root[vendors[i] + 'CancelRequest' + suffix]
- }
-
- // Some versions of FF have rAF but not cAF
- if(!raf || !caf) {
- var last = 0
- , id = 0
- , queue = []
- , frameDuration = 1000 / 60
-
- raf = function(callback) {
- if(queue.length === 0) {
- var _now = now()
- , next = Math.max(0, frameDuration - (_now - last))
- last = next + _now
- setTimeout(function() {
- var cp = queue.slice(0)
- // Clear queue here to prevent
- // callbacks from appending listeners
- // to the current frame's queue
- queue.length = 0
- for(var i = 0; i < cp.length; i++) {
- if(!cp[i].cancelled) {
- try{
- cp[i].callback(last)
- } catch(e) {
- setTimeout(function() { throw e }, 0)
- }
- }
- }
- }, Math.round(next))
- }
- queue.push({
- handle: ++id,
- callback: callback,
- cancelled: false
- })
- return id
- }
-
- caf = function(handle) {
- for(var i = 0; i < queue.length; i++) {
- if(queue[i].handle === handle) {
- queue[i].cancelled = true
- }
- }
- }
- }
-
- module.exports = function(fn) {
- // Wrap in a new function to prevent
- // `cancel` potentially being assigned
- // to the native rAF function
- return raf.call(root, fn)
- }
- module.exports.cancel = function() {
- caf.apply(root, arguments)
- }
- module.exports.polyfill = function(object) {
- if (!object) {
- object = root;
- }
- object.requestAnimationFrame = raf
- object.cancelAnimationFrame = caf
- }
-
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(24)))
-
- /***/ }),
- /* 69 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- var _interopRequireDefault = __webpack_require__(12);
-
- exports.__esModule = true;
- exports.default = exports.animationEnd = exports.animationDelay = exports.animationTiming = exports.animationDuration = exports.animationName = exports.transitionEnd = exports.transitionDuration = exports.transitionDelay = exports.transitionTiming = exports.transitionProperty = exports.transform = void 0;
-
- var _inDOM = _interopRequireDefault(__webpack_require__(32));
-
- var transform = 'transform';
- exports.transform = transform;
- var prefix, transitionEnd, animationEnd;
- exports.animationEnd = animationEnd;
- exports.transitionEnd = transitionEnd;
- var transitionProperty, transitionDuration, transitionTiming, transitionDelay;
- exports.transitionDelay = transitionDelay;
- exports.transitionTiming = transitionTiming;
- exports.transitionDuration = transitionDuration;
- exports.transitionProperty = transitionProperty;
- var animationName, animationDuration, animationTiming, animationDelay;
- exports.animationDelay = animationDelay;
- exports.animationTiming = animationTiming;
- exports.animationDuration = animationDuration;
- exports.animationName = animationName;
-
- if (_inDOM.default) {
- var _getTransitionPropert = getTransitionProperties();
-
- prefix = _getTransitionPropert.prefix;
- exports.transitionEnd = transitionEnd = _getTransitionPropert.transitionEnd;
- exports.animationEnd = animationEnd = _getTransitionPropert.animationEnd;
- exports.transform = transform = prefix + "-" + transform;
- exports.transitionProperty = transitionProperty = prefix + "-transition-property";
- exports.transitionDuration = transitionDuration = prefix + "-transition-duration";
- exports.transitionDelay = transitionDelay = prefix + "-transition-delay";
- exports.transitionTiming = transitionTiming = prefix + "-transition-timing-function";
- exports.animationName = animationName = prefix + "-animation-name";
- exports.animationDuration = animationDuration = prefix + "-animation-duration";
- exports.animationTiming = animationTiming = prefix + "-animation-delay";
- exports.animationDelay = animationDelay = prefix + "-animation-timing-function";
- }
-
- var _default = {
- transform: transform,
- end: transitionEnd,
- property: transitionProperty,
- timing: transitionTiming,
- delay: transitionDelay,
- duration: transitionDuration
- };
- exports.default = _default;
-
- function getTransitionProperties() {
- var style = document.createElement('div').style;
- var vendorMap = {
- O: function O(e) {
- return "o" + e.toLowerCase();
- },
- Moz: function Moz(e) {
- return e.toLowerCase();
- },
- Webkit: function Webkit(e) {
- return "webkit" + e;
- },
- ms: function ms(e) {
- return "MS" + e;
- }
- };
- var vendors = Object.keys(vendorMap);
- var transitionEnd, animationEnd;
- var prefix = '';
-
- for (var i = 0; i < vendors.length; i++) {
- var vendor = vendors[i];
-
- if (vendor + "TransitionProperty" in style) {
- prefix = "-" + vendor.toLowerCase();
- transitionEnd = vendorMap[vendor]('TransitionEnd');
- animationEnd = vendorMap[vendor]('AnimationEnd');
- break;
- }
- }
-
- if (!transitionEnd && 'transitionProperty' in style) transitionEnd = 'transitionend';
- if (!animationEnd && 'animationName' in style) animationEnd = 'animationend';
- style = null;
- return {
- animationEnd: animationEnd,
- transitionEnd: transitionEnd,
- prefix: prefix
- };
- }
-
- /***/ }),
- /* 70 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- var _interopRequireDefault = __webpack_require__(12);
-
- exports.__esModule = true;
- exports.default = void 0;
-
- var _inDOM = _interopRequireDefault(__webpack_require__(32));
-
- var on = function on() {};
-
- if (_inDOM.default) {
- on = function () {
- if (document.addEventListener) return function (node, eventName, handler, capture) {
- return node.addEventListener(eventName, handler, capture || false);
- };else if (document.attachEvent) return function (node, eventName, handler) {
- return node.attachEvent('on' + eventName, function (e) {
- e = e || window.event;
- e.target = e.target || e.srcElement;
- e.currentTarget = node;
- handler.call(node, e);
- });
- };
- }();
- }
-
- var _default = on;
- exports.default = _default;
- module.exports = exports["default"];
-
- /***/ }),
- /* 71 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- /**
- * @ignore
- * some key-codes definition and utils from closure-library
- * @author yiminghe@gmail.com
- */
-
- var KeyCode = {
- /**
- * MAC_ENTER
- */
- MAC_ENTER: 3,
- /**
- * BACKSPACE
- */
- BACKSPACE: 8,
- /**
- * TAB
- */
- TAB: 9,
- /**
- * NUMLOCK on FF/Safari Mac
- */
- NUM_CENTER: 12, // NUMLOCK on FF/Safari Mac
- /**
- * ENTER
- */
- ENTER: 13,
- /**
- * SHIFT
- */
- SHIFT: 16,
- /**
- * CTRL
- */
- CTRL: 17,
- /**
- * ALT
- */
- ALT: 18,
- /**
- * PAUSE
- */
- PAUSE: 19,
- /**
- * CAPS_LOCK
- */
- CAPS_LOCK: 20,
- /**
- * ESC
- */
- ESC: 27,
- /**
- * SPACE
- */
- SPACE: 32,
- /**
- * PAGE_UP
- */
- PAGE_UP: 33, // also NUM_NORTH_EAST
- /**
- * PAGE_DOWN
- */
- PAGE_DOWN: 34, // also NUM_SOUTH_EAST
- /**
- * END
- */
- END: 35, // also NUM_SOUTH_WEST
- /**
- * HOME
- */
- HOME: 36, // also NUM_NORTH_WEST
- /**
- * LEFT
- */
- LEFT: 37, // also NUM_WEST
- /**
- * UP
- */
- UP: 38, // also NUM_NORTH
- /**
- * RIGHT
- */
- RIGHT: 39, // also NUM_EAST
- /**
- * DOWN
- */
- DOWN: 40, // also NUM_SOUTH
- /**
- * PRINT_SCREEN
- */
- PRINT_SCREEN: 44,
- /**
- * INSERT
- */
- INSERT: 45, // also NUM_INSERT
- /**
- * DELETE
- */
- DELETE: 46, // also NUM_DELETE
- /**
- * ZERO
- */
- ZERO: 48,
- /**
- * ONE
- */
- ONE: 49,
- /**
- * TWO
- */
- TWO: 50,
- /**
- * THREE
- */
- THREE: 51,
- /**
- * FOUR
- */
- FOUR: 52,
- /**
- * FIVE
- */
- FIVE: 53,
- /**
- * SIX
- */
- SIX: 54,
- /**
- * SEVEN
- */
- SEVEN: 55,
- /**
- * EIGHT
- */
- EIGHT: 56,
- /**
- * NINE
- */
- NINE: 57,
- /**
- * QUESTION_MARK
- */
- QUESTION_MARK: 63, // needs localization
- /**
- * A
- */
- A: 65,
- /**
- * B
- */
- B: 66,
- /**
- * C
- */
- C: 67,
- /**
- * D
- */
- D: 68,
- /**
- * E
- */
- E: 69,
- /**
- * F
- */
- F: 70,
- /**
- * G
- */
- G: 71,
- /**
- * H
- */
- H: 72,
- /**
- * I
- */
- I: 73,
- /**
- * J
- */
- J: 74,
- /**
- * K
- */
- K: 75,
- /**
- * L
- */
- L: 76,
- /**
- * M
- */
- M: 77,
- /**
- * N
- */
- N: 78,
- /**
- * O
- */
- O: 79,
- /**
- * P
- */
- P: 80,
- /**
- * Q
- */
- Q: 81,
- /**
- * R
- */
- R: 82,
- /**
- * S
- */
- S: 83,
- /**
- * T
- */
- T: 84,
- /**
- * U
- */
- U: 85,
- /**
- * V
- */
- V: 86,
- /**
- * W
- */
- W: 87,
- /**
- * X
- */
- X: 88,
- /**
- * Y
- */
- Y: 89,
- /**
- * Z
- */
- Z: 90,
- /**
- * META
- */
- META: 91, // WIN_KEY_LEFT
- /**
- * WIN_KEY_RIGHT
- */
- WIN_KEY_RIGHT: 92,
- /**
- * CONTEXT_MENU
- */
- CONTEXT_MENU: 93,
- /**
- * NUM_ZERO
- */
- NUM_ZERO: 96,
- /**
- * NUM_ONE
- */
- NUM_ONE: 97,
- /**
- * NUM_TWO
- */
- NUM_TWO: 98,
- /**
- * NUM_THREE
- */
- NUM_THREE: 99,
- /**
- * NUM_FOUR
- */
- NUM_FOUR: 100,
- /**
- * NUM_FIVE
- */
- NUM_FIVE: 101,
- /**
- * NUM_SIX
- */
- NUM_SIX: 102,
- /**
- * NUM_SEVEN
- */
- NUM_SEVEN: 103,
- /**
- * NUM_EIGHT
- */
- NUM_EIGHT: 104,
- /**
- * NUM_NINE
- */
- NUM_NINE: 105,
- /**
- * NUM_MULTIPLY
- */
- NUM_MULTIPLY: 106,
- /**
- * NUM_PLUS
- */
- NUM_PLUS: 107,
- /**
- * NUM_MINUS
- */
- NUM_MINUS: 109,
- /**
- * NUM_PERIOD
- */
- NUM_PERIOD: 110,
- /**
- * NUM_DIVISION
- */
- NUM_DIVISION: 111,
- /**
- * F1
- */
- F1: 112,
- /**
- * F2
- */
- F2: 113,
- /**
- * F3
- */
- F3: 114,
- /**
- * F4
- */
- F4: 115,
- /**
- * F5
- */
- F5: 116,
- /**
- * F6
- */
- F6: 117,
- /**
- * F7
- */
- F7: 118,
- /**
- * F8
- */
- F8: 119,
- /**
- * F9
- */
- F9: 120,
- /**
- * F10
- */
- F10: 121,
- /**
- * F11
- */
- F11: 122,
- /**
- * F12
- */
- F12: 123,
- /**
- * NUMLOCK
- */
- NUMLOCK: 144,
- /**
- * SEMICOLON
- */
- SEMICOLON: 186, // needs localization
- /**
- * DASH
- */
- DASH: 189, // needs localization
- /**
- * EQUALS
- */
- EQUALS: 187, // needs localization
- /**
- * COMMA
- */
- COMMA: 188, // needs localization
- /**
- * PERIOD
- */
- PERIOD: 190, // needs localization
- /**
- * SLASH
- */
- SLASH: 191, // needs localization
- /**
- * APOSTROPHE
- */
- APOSTROPHE: 192, // needs localization
- /**
- * SINGLE_QUOTE
- */
- SINGLE_QUOTE: 222, // needs localization
- /**
- * OPEN_SQUARE_BRACKET
- */
- OPEN_SQUARE_BRACKET: 219, // needs localization
- /**
- * BACKSLASH
- */
- BACKSLASH: 220, // needs localization
- /**
- * CLOSE_SQUARE_BRACKET
- */
- CLOSE_SQUARE_BRACKET: 221, // needs localization
- /**
- * WIN_KEY
- */
- WIN_KEY: 224,
- /**
- * MAC_FF_META
- */
- MAC_FF_META: 224, // Firefox (Gecko) fires this for the meta key instead of 91
- /**
- * WIN_IME
- */
- WIN_IME: 229
- };
-
- /*
- whether text and modified key is entered at the same time.
- */
- KeyCode.isTextModifyingKeyEvent = function isTextModifyingKeyEvent(e) {
- var keyCode = e.keyCode;
- if (e.altKey && !e.ctrlKey || e.metaKey ||
- // Function keys don't generate text
- keyCode >= KeyCode.F1 && keyCode <= KeyCode.F12) {
- return false;
- }
-
- // The following keys are quite harmless, even in combination with
- // CTRL, ALT or SHIFT.
- switch (keyCode) {
- case KeyCode.ALT:
- case KeyCode.CAPS_LOCK:
- case KeyCode.CONTEXT_MENU:
- case KeyCode.CTRL:
- case KeyCode.DOWN:
- case KeyCode.END:
- case KeyCode.ESC:
- case KeyCode.HOME:
- case KeyCode.INSERT:
- case KeyCode.LEFT:
- case KeyCode.MAC_FF_META:
- case KeyCode.META:
- case KeyCode.NUMLOCK:
- case KeyCode.NUM_CENTER:
- case KeyCode.PAGE_DOWN:
- case KeyCode.PAGE_UP:
- case KeyCode.PAUSE:
- case KeyCode.PRINT_SCREEN:
- case KeyCode.RIGHT:
- case KeyCode.SHIFT:
- case KeyCode.UP:
- case KeyCode.WIN_KEY:
- case KeyCode.WIN_KEY_RIGHT:
- return false;
- default:
- return true;
- }
- };
-
- /*
- whether character is entered.
- */
- KeyCode.isCharacterKey = function isCharacterKey(keyCode) {
- if (keyCode >= KeyCode.ZERO && keyCode <= KeyCode.NINE) {
- return true;
- }
-
- if (keyCode >= KeyCode.NUM_ZERO && keyCode <= KeyCode.NUM_MULTIPLY) {
- return true;
- }
-
- if (keyCode >= KeyCode.A && keyCode <= KeyCode.Z) {
- return true;
- }
-
- // Safari sends zero key code for non-latin characters.
- if (window.navigation.userAgent.indexOf('WebKit') !== -1 && keyCode === 0) {
- return true;
- }
-
- switch (keyCode) {
- case KeyCode.SPACE:
- case KeyCode.QUESTION_MARK:
- case KeyCode.NUM_PLUS:
- case KeyCode.NUM_MINUS:
- case KeyCode.NUM_PERIOD:
- case KeyCode.NUM_DIVISION:
- case KeyCode.SEMICOLON:
- case KeyCode.DASH:
- case KeyCode.EQUALS:
- case KeyCode.COMMA:
- case KeyCode.PERIOD:
- case KeyCode.SLASH:
- case KeyCode.APOSTROPHE:
- case KeyCode.SINGLE_QUOTE:
- case KeyCode.OPEN_SQUARE_BRACKET:
- case KeyCode.BACKSLASH:
- case KeyCode.CLOSE_SQUARE_BRACKET:
- return true;
- default:
- return false;
- }
- };
-
- exports['default'] = KeyCode;
- module.exports = exports['default'];
-
- /***/ }),
- /* 72 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _react = __webpack_require__(0);
-
- var _react2 = _interopRequireDefault(_react);
-
- var _reactDom = __webpack_require__(4);
-
- var _reactDom2 = _interopRequireDefault(_reactDom);
-
- var _propTypes = __webpack_require__(1);
-
- var _propTypes2 = _interopRequireDefault(_propTypes);
-
- var _KeyCode = __webpack_require__(71);
-
- var _KeyCode2 = _interopRequireDefault(_KeyCode);
-
- var _reactLifecyclesCompat = __webpack_require__(20);
-
- var _moment = __webpack_require__(3);
-
- var _moment2 = _interopRequireDefault(_moment);
-
- var _util = __webpack_require__(26);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
-
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
-
- var cachedSelectionStart = void 0;
- var cachedSelectionEnd = void 0;
- var dateInputInstance = void 0;
-
- var DateInput = function (_React$Component) {
- _inherits(DateInput, _React$Component);
-
- function DateInput(props) {
- _classCallCheck(this, DateInput);
-
- var _this = _possibleConstructorReturn(this, _React$Component.call(this, props));
-
- _initialiseProps.call(_this);
-
- var selectedValue = props.selectedValue;
-
- _this.state = {
- str: (0, _util.formatDate)(selectedValue, _this.props.format),
- invalid: false,
- hasFocus: false
- };
- return _this;
- }
-
- DateInput.prototype.componentDidUpdate = function componentDidUpdate() {
- if (dateInputInstance && this.state.hasFocus && !this.state.invalid && !(cachedSelectionStart === 0 && cachedSelectionEnd === 0)) {
- dateInputInstance.setSelectionRange(cachedSelectionStart, cachedSelectionEnd);
- }
- };
-
- DateInput.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, state) {
- var newState = {};
-
- if (dateInputInstance) {
- cachedSelectionStart = dateInputInstance.selectionStart;
- cachedSelectionEnd = dateInputInstance.selectionEnd;
- }
- // when popup show, click body will call this, bug!
- var selectedValue = nextProps.selectedValue;
- if (!state.hasFocus) {
- newState = {
- str: (0, _util.formatDate)(selectedValue, nextProps.format),
- invalid: false
- };
- }
-
- return newState;
- };
-
- DateInput.getInstance = function getInstance() {
- return dateInputInstance;
- };
-
- DateInput.prototype.render = function render() {
- var props = this.props;
- var _state = this.state,
- invalid = _state.invalid,
- str = _state.str;
- var locale = props.locale,
- prefixCls = props.prefixCls,
- placeholder = props.placeholder,
- clearIcon = props.clearIcon;
-
- var invalidClass = invalid ? prefixCls + '-input-invalid' : '';
- return _react2["default"].createElement(
- 'div',
- { className: prefixCls + '-input-wrap' },
- _react2["default"].createElement(
- 'div',
- { className: prefixCls + '-date-input-wrap' },
- _react2["default"].createElement('input', {
- ref: this.saveDateInput,
- className: prefixCls + '-input ' + invalidClass,
- value: str,
- disabled: props.disabled,
- placeholder: placeholder,
- onChange: this.onInputChange,
- onKeyDown: this.onKeyDown,
- onFocus: this.onFocus,
- onBlur: this.onBlur
- })
- ),
- props.showClear ? _react2["default"].createElement(
- 'a',
- {
- role: 'button',
- title: locale.clear,
- onClick: this.onClear
- },
- clearIcon || _react2["default"].createElement('span', { className: prefixCls + '-clear-btn uf uf-close-c' })
- ) : null
- );
- };
-
- return DateInput;
- }(_react2["default"].Component);
-
- DateInput.propTypes = {
- prefixCls: _propTypes2["default"].string,
- timePicker: _propTypes2["default"].object,
- value: _propTypes2["default"].object,
- disabledTime: _propTypes2["default"].any,
- format: _propTypes2["default"].oneOfType([_propTypes2["default"].string, _propTypes2["default"].arrayOf(_propTypes2["default"].string)]),
- locale: _propTypes2["default"].object,
- disabledDate: _propTypes2["default"].func,
- onChange: _propTypes2["default"].func,
- onClear: _propTypes2["default"].func,
- placeholder: _propTypes2["default"].string,
- onSelect: _propTypes2["default"].func,
- selectedValue: _propTypes2["default"].object,
- clearIcon: _propTypes2["default"].node
- };
-
- var _initialiseProps = function _initialiseProps() {
- var _this2 = this;
-
- this.onClear = function () {
- _this2.setState({
- str: ''
- });
- _this2.props.onClear(null);
- };
-
- this.onInputChange = function (event) {
- var str = event.target.value;
- var _props = _this2.props,
- disabledDate = _props.disabledDate,
- format = _props.format,
- onChange = _props.onChange,
- selectedValue = _props.selectedValue;
-
- // 没有内容,合法并直接退出
-
- if (!str) {
- onChange(null);
- _this2.setState({
- invalid: false,
- str: str
- });
- return;
- }
-
- // 不合法直接退出
- var parsed = (0, _moment2["default"])(str, format, true);
- if (!parsed.isValid()) {
- _this2.setState({
- invalid: true,
- str: str
- });
- return;
- }
-
- var value = _this2.props.value.clone();
- value.year(parsed.year()).month(parsed.month()).date(parsed.date()).hour(parsed.hour()).minute(parsed.minute()).second(parsed.second());
-
- if (!value || disabledDate && disabledDate(value)) {
- _this2.setState({
- invalid: true,
- str: str
- });
- return;
- }
-
- if (selectedValue !== value || selectedValue && value && !selectedValue.isSame(value)) {
- _this2.setState({
- invalid: false,
- str: str
- });
- onChange(value);
- }
- };
-
- this.onFocus = function () {
- _this2.setState({ hasFocus: true });
- };
-
- this.onBlur = function () {
- _this2.setState(function (prevState, prevProps) {
- return {
- hasFocus: false,
- str: (0, _util.formatDate)(prevProps.value, prevProps.format)
- };
- });
- };
-
- this.onKeyDown = function (e) {
- var _props2 = _this2.props,
- onSelect = _props2.onSelect,
- value = _props2.value,
- onKeyDown = _props2.onKeyDown;
-
- if (e.keyCode === _KeyCode2["default"].ENTER && onSelect) {
- onSelect(value.clone());
- }
- onKeyDown && onKeyDown(e);
- };
-
- this.getRootDOMNode = function () {
- return _reactDom2["default"].findDOMNode(_this2);
- };
-
- this.focus = function () {
- if (dateInputInstance) {
- dateInputInstance.focus();
- }
- };
-
- this.saveDateInput = function (dateInput) {
- dateInputInstance = dateInput;
- };
- };
-
- (0, _reactLifecyclesCompat.polyfill)(DateInput);
-
- exports["default"] = DateInput;
- module.exports = exports['default'];
-
- /***/ }),
- /* 73 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _react = __webpack_require__(0);
-
- var _react2 = _interopRequireDefault(_react);
-
- var _reactDom = __webpack_require__(4);
-
- var _reactDom2 = _interopRequireDefault(_reactDom);
-
- var _propTypes = __webpack_require__(1);
-
- var _propTypes2 = _interopRequireDefault(_propTypes);
-
- var _reactLifecyclesCompat = __webpack_require__(20);
-
- var _createChainedFunction = __webpack_require__(227);
-
- var _createChainedFunction2 = _interopRequireDefault(_createChainedFunction);
-
- var _KeyCode = __webpack_require__(71);
-
- var _KeyCode2 = _interopRequireDefault(_KeyCode);
-
- var _placements = __webpack_require__(937);
-
- var _placements2 = _interopRequireDefault(_placements);
-
- var _rcTrigger = __webpack_require__(938);
-
- var _rcTrigger2 = _interopRequireDefault(_rcTrigger);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
-
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
-
- function noop() {}
-
- function refFn(field, component) {
- this[field] = component;
- }
-
- var Picker = function (_React$Component) {
- _inherits(Picker, _React$Component);
-
- function Picker(props) {
- _classCallCheck(this, Picker);
-
- var _this = _possibleConstructorReturn(this, _React$Component.call(this, props));
-
- _initialiseProps.call(_this);
-
- var open = void 0;
- if ('open' in props) {
- open = props.open;
- } else {
- open = props.defaultOpen;
- }
- var value = props.value || props.defaultValue;
- _this.saveCalendarRef = refFn.bind(_this, 'calendarInstance');
-
- _this.state = {
- open: open,
- value: value
- };
- return _this;
- }
-
- Picker.prototype.componentDidUpdate = function componentDidUpdate(_, prevState) {
- if (!prevState.open && this.state.open) {
- // setTimeout is for making sure saveCalendarRef happen before focusCalendar
- this.focusTimeout = setTimeout(this.focusCalendar, 0, this);
- }
- };
-
- Picker.prototype.componentWillUnmount = function componentWillUnmount() {
- clearTimeout(this.focusTimeout);
- };
-
- Picker.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps) {
- var newState = {};
- var value = nextProps.value,
- open = nextProps.open;
-
- if ('value' in nextProps) {
- newState.value = value;
- }
- if (open !== undefined) {
- newState.open = open;
- }
- return newState;
- };
-
- Picker.prototype.render = function render() {
- var props = this.props;
- var prefixCls = props.prefixCls,
- placement = props.placement,
- style = props.style,
- getCalendarContainer = props.getCalendarContainer,
- align = props.align,
- animation = props.animation,
- disabled = props.disabled,
- dropdownClassName = props.dropdownClassName,
- transitionName = props.transitionName,
- children = props.children;
-
- var state = this.state;
- return _react2["default"].createElement(
- _rcTrigger2["default"],
- {
- popup: this.getCalendarElement(),
- popupAlign: align,
- builtinPlacements: _placements2["default"],
- popupPlacement: placement,
- action: disabled && !state.open ? [] : ['click'],
- destroyPopupOnHide: true,
- getPopupContainer: getCalendarContainer,
- popupStyle: style,
- popupAnimation: animation,
- popupTransitionName: transitionName,
- popupVisible: state.open,
- onPopupVisibleChange: this.onVisibleChange,
- prefixCls: prefixCls,
- popupClassName: dropdownClassName
- },
- _react2["default"].cloneElement(children(state, props), { onKeyDown: this.onKeyDown })
- );
- };
-
- return Picker;
- }(_react2["default"].Component);
-
- Picker.propTypes = {
- animation: _propTypes2["default"].oneOfType([_propTypes2["default"].func, _propTypes2["default"].string]),
- disabled: _propTypes2["default"].bool,
- transitionName: _propTypes2["default"].string,
- onChange: _propTypes2["default"].func,
- onOpenChange: _propTypes2["default"].func,
- children: _propTypes2["default"].func,
- getCalendarContainer: _propTypes2["default"].func,
- calendar: _propTypes2["default"].element,
- style: _propTypes2["default"].object,
- open: _propTypes2["default"].bool,
- defaultOpen: _propTypes2["default"].bool,
- prefixCls: _propTypes2["default"].string,
- placement: _propTypes2["default"].any,
- value: _propTypes2["default"].oneOfType([_propTypes2["default"].object, _propTypes2["default"].array]),
- defaultValue: _propTypes2["default"].oneOfType([_propTypes2["default"].object, _propTypes2["default"].array]),
- align: _propTypes2["default"].object
- };
- Picker.defaultProps = {
- prefixCls: 'rc-calendar-picker',
- style: {},
- align: {},
- placement: 'bottomLeft',
- defaultOpen: false,
- onChange: noop,
- onOpenChange: noop
- };
-
- var _initialiseProps = function _initialiseProps() {
- var _this2 = this;
-
- this.onCalendarKeyDown = function (event) {
- if (event.keyCode === _KeyCode2["default"].ESC) {
- event.stopPropagation();
- _this2.close(_this2.focus);
- }
- };
-
- this.onCalendarSelect = function (value) {
- var cause = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-
- var props = _this2.props;
- if (!('value' in props)) {
- _this2.setState({
- value: value
- });
- }
- if (cause.source === 'keyboard' || cause.source === 'dateInputSelect' || !props.calendar.props.timePicker && cause.source !== 'dateInput' || cause.source === 'todayButton') {
- _this2.close(_this2.focus);
- }
- props.onChange(value);
- };
-
- this.onKeyDown = function (event) {
- if (!_this2.state.open && (event.keyCode === _KeyCode2["default"].DOWN || event.keyCode === _KeyCode2["default"].ENTER)) {
- _this2.open();
- event.preventDefault();
- }
- };
-
- this.onCalendarOk = function () {
- _this2.close(_this2.focus);
- };
-
- this.onCalendarClear = function () {
- _this2.close(_this2.focus);
- };
-
- this.onVisibleChange = function (open) {
- _this2.setOpen(open);
- };
-
- this.getCalendarElement = function () {
- var props = _this2.props;
- var state = _this2.state;
- var calendarProps = props.calendar.props;
- var value = state.value;
-
- var defaultValue = value;
- var extraProps = {
- ref: _this2.saveCalendarRef,
- defaultValue: defaultValue || calendarProps.defaultValue,
- selectedValue: value,
- onKeyDown: _this2.onCalendarKeyDown,
- onOk: (0, _createChainedFunction2["default"])(calendarProps.onOk, _this2.onCalendarOk),
- onSelect: (0, _createChainedFunction2["default"])(calendarProps.onSelect, _this2.onCalendarSelect),
- onClear: (0, _createChainedFunction2["default"])(calendarProps.onClear, _this2.onCalendarClear)
- };
-
- return _react2["default"].cloneElement(props.calendar, extraProps);
- };
-
- this.setOpen = function (open, callback) {
- var onOpenChange = _this2.props.onOpenChange;
-
- if (_this2.state.open !== open) {
- if (!('open' in _this2.props)) {
- _this2.setState({
- open: open
- }, callback);
- }
- onOpenChange(open);
- }
- };
-
- this.open = function (callback) {
- _this2.setOpen(true, callback);
- };
-
- this.close = function (callback) {
- _this2.setOpen(false, callback);
- };
-
- this.focus = function () {
- if (!_this2.state.open) {
- _reactDom2["default"].findDOMNode(_this2).focus();
- }
- };
-
- this.focusCalendar = function () {
- if (_this2.state.open && !!_this2.calendarInstance) {
- _this2.calendarInstance.focus();
- }
- };
- };
-
- (0, _reactLifecyclesCompat.polyfill)(Picker);
-
- exports["default"] = Picker;
- module.exports = exports['default'];
-
- /***/ }),
- /* 74 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _FormControl = __webpack_require__(941);
-
- var _FormControl2 = _interopRequireDefault(_FormControl);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- exports["default"] = _FormControl2["default"];
- module.exports = exports['default'];
-
- /***/ }),
- /* 75 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- module.exports = __webpack_require__(946);
-
- /***/ }),
- /* 76 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports["default"] = {
- today: '今天',
- now: '此刻',
- backToToday: '返回今天',
- ok: '确定',
- timeSelect: '选择时间',
- dateSelect: '选择日期',
- weekSelect: '选择周',
- clear: '清除',
- month: '月',
- year: '年',
- previousMonth: '上个月 (翻页上键)',
- nextMonth: '下个月 (翻页下键)',
- monthSelect: '选择月份',
- yearSelect: '选择年份',
- decadeSelect: '选择年代',
- yearFormat: 'YYYY年',
- dayFormat: 'D日',
- dateFormat: 'YYYY年M月D日',
- dateTimeFormat: 'YYYY年M月D日 HH时mm分ss秒',
- previousYear: '上一年 (Control键加左方向键)',
- nextYear: '下一年 (Control键加右方向键)',
- previousDecade: '上一年代',
- nextDecade: '下一年代',
- previousCentury: '上一世纪',
- nextCentury: '下一世纪',
- lastWeek: '上一周',
- nowWeek: '本周',
- nextWeek: '下一周'
- };
- module.exports = exports['default'];
-
- /***/ }),
- /* 77 */
+ /* 153 */
/***/ (function(module, exports) {
- module.exports = true;
+ module.exports = function(module) {
+ if(!module.webpackPolyfill) {
+ module.deprecate = function() {};
+ module.paths = [];
+ // module.parent = undefined by default
+ if(!module.children) module.children = [];
+ Object.defineProperty(module, "loaded", {
+ enumerable: true,
+ get: function() {
+ return module.l;
+ }
+ });
+ Object.defineProperty(module, "id", {
+ enumerable: true,
+ get: function() {
+ return module.i;
+ }
+ });
+ module.webpackPolyfill = 1;
+ }
+ return module;
+ };
/***/ }),
- /* 78 */
- /***/ (function(module, exports) {
-
- var id = 0;
- var px = Math.random();
- module.exports = function (key) {
- return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
- };
-
-
- /***/ }),
- /* 79 */
- /***/ (function(module, exports) {
-
- exports.f = {}.propertyIsEnumerable;
-
-
- /***/ }),
- /* 80 */
- /***/ (function(module, exports, __webpack_require__) {
-
- // 7.1.13 ToObject(argument)
- var defined = __webpack_require__(98);
- module.exports = function (it) {
- return Object(defined(it));
- };
-
-
- /***/ }),
- /* 81 */
- /***/ (function(module, exports, __webpack_require__) {
-
- var freeGlobal = __webpack_require__(529);
-
- /** Detect free variable `self`. */
- var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
-
- /** Used as a reference to the global object. */
- var root = freeGlobal || freeSelf || Function('return this')();
-
- module.exports = root;
-
-
- /***/ }),
- /* 82 */
- /***/ (function(module, exports, __webpack_require__) {
-
- var getNative = __webpack_require__(111);
-
- /* Built-in method references that are verified to be native. */
- var nativeCreate = getNative(Object, 'create');
-
- module.exports = nativeCreate;
-
-
- /***/ }),
- /* 83 */
- /***/ (function(module, exports, __webpack_require__) {
-
- var eq = __webpack_require__(113);
-
- /**
- * Gets the index at which the `key` is found in `array` of key-value pairs.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {*} key The key to search for.
- * @returns {number} Returns the index of the matched value, else `-1`.
- */
- function assocIndexOf(array, key) {
- var length = array.length;
- while (length--) {
- if (eq(array[length][0], key)) {
- return length;
- }
- }
- return -1;
- }
-
- module.exports = assocIndexOf;
-
-
- /***/ }),
- /* 84 */
- /***/ (function(module, exports, __webpack_require__) {
-
- var isKeyable = __webpack_require__(558);
-
- /**
- * Gets the data for `map`.
- *
- * @private
- * @param {Object} map The map to query.
- * @param {string} key The reference key.
- * @returns {*} Returns the map data.
- */
- function getMapData(map, key) {
- var data = map.__data__;
- return isKeyable(key)
- ? data[typeof key == 'string' ? 'string' : 'hash']
- : data.map;
- }
-
- module.exports = getMapData;
-
-
- /***/ }),
- /* 85 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _InputGroupAddon = __webpack_require__(583);
-
- var _InputGroupAddon2 = _interopRequireDefault(_InputGroupAddon);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- exports["default"] = _InputGroupAddon2["default"];
- module.exports = exports['default'];
-
- /***/ }),
- /* 86 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- exports.__esModule = true;
- exports.default = getWindow;
-
- function getWindow(node) {
- return node === node.window ? node : node.nodeType === 9 ? node.defaultView || node.parentWindow : false;
- }
-
- module.exports = exports["default"];
-
- /***/ }),
- /* 87 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- exports["default"] = function (node, event, handler, capture) {
- (0, _on2["default"])(node, event, handler, capture);
-
- return {
- remove: function remove() {
- (0, _off2["default"])(node, event, handler, capture);
- }
- };
- };
-
- var _on = __webpack_require__(70);
-
- var _on2 = _interopRequireDefault(_on);
-
- var _off = __webpack_require__(700);
-
- var _off2 = _interopRequireDefault(_off);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- module.exports = exports['default'];
-
- /***/ }),
- /* 88 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _Notification = __webpack_require__(717);
-
- var _Notification2 = _interopRequireDefault(_Notification);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- exports["default"] = _Notification2["default"];
- module.exports = exports['default'];
-
- /***/ }),
- /* 89 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports["default"] = isOverflowing;
-
- var _isWindow = __webpack_require__(86);
-
- var _isWindow2 = _interopRequireDefault(_isWindow);
-
- var _ownerDocument = __webpack_require__(54);
-
- var _ownerDocument2 = _interopRequireDefault(_ownerDocument);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- function isBody(node) {
- return node && node.tagName.toLowerCase() === 'body';
- }
-
- function bodyIsOverflowing(node) {
- var doc = (0, _ownerDocument2["default"])(node);
- var win = (0, _isWindow2["default"])(doc);
- var fullWidth = win.innerWidth;
-
- // Support: ie8, no innerWidth
- if (!fullWidth) {
- var documentElementRect = doc.documentElement.getBoundingClientRect();
- fullWidth = documentElementRect.right - Math.abs(documentElementRect.left);
- }
-
- return doc.body.clientWidth < fullWidth;
- }
-
- function isOverflowing(container) {
- var win = (0, _isWindow2["default"])(container);
-
- return win || isBody(container) ? bodyIsOverflowing(container) : container.scrollHeight > container.clientHeight;
- }
- module.exports = exports['default'];
-
- /***/ }),
- /* 90 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
- // turn {x: {val: 1, stiffness: 1, damping: 2}, y: 2} generated by
- // `{x: spring(1, {stiffness: 1, damping: 2}), y: 2}` into {x: 1, y: 2}
-
-
-
- exports.__esModule = true;
- exports['default'] = stripStyle;
-
- function stripStyle(style) {
- var ret = {};
- for (var key in style) {
- if (!Object.prototype.hasOwnProperty.call(style, key)) {
- continue;
- }
- ret[key] = typeof style[key] === 'number' ? style[key] : style[key].val;
- }
- return ret;
- }
-
- module.exports = exports['default'];
-
- /***/ }),
- /* 91 */
- /***/ (function(module, exports, __webpack_require__) {
-
- //! moment.js locale configuration
-
- ;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
- typeof define === 'function' && define.amd ? define(['../moment'], factory) :
- factory(global.moment)
- }(this, (function (moment) { 'use strict';
-
-
- var zhCn = moment.defineLocale('zh-cn', {
- months : '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split('_'),
- monthsShort : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),
- weekdays : '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
- weekdaysShort : '周日_周一_周二_周三_周四_周五_周六'.split('_'),
- weekdaysMin : '日_一_二_三_四_五_六'.split('_'),
- longDateFormat : {
- LT : 'HH:mm',
- LTS : 'HH:mm:ss',
- L : 'YYYY/MM/DD',
- LL : 'YYYY年M月D日',
- LLL : 'YYYY年M月D日Ah点mm分',
- LLLL : 'YYYY年M月D日ddddAh点mm分',
- l : 'YYYY/M/D',
- ll : 'YYYY年M月D日',
- lll : 'YYYY年M月D日 HH:mm',
- llll : 'YYYY年M月D日dddd HH:mm'
- },
- meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
- meridiemHour: function (hour, meridiem) {
- if (hour === 12) {
- hour = 0;
- }
- if (meridiem === '凌晨' || meridiem === '早上' ||
- meridiem === '上午') {
- return hour;
- } else if (meridiem === '下午' || meridiem === '晚上') {
- return hour + 12;
- } else {
- // '中午'
- return hour >= 11 ? hour : hour + 12;
- }
- },
- meridiem : function (hour, minute, isLower) {
- var hm = hour * 100 + minute;
- if (hm < 600) {
- return '凌晨';
- } else if (hm < 900) {
- return '早上';
- } else if (hm < 1130) {
- return '上午';
- } else if (hm < 1230) {
- return '中午';
- } else if (hm < 1800) {
- return '下午';
- } else {
- return '晚上';
- }
- },
- calendar : {
- sameDay : '[今天]LT',
- nextDay : '[明天]LT',
- nextWeek : '[下]ddddLT',
- lastDay : '[昨天]LT',
- lastWeek : '[上]ddddLT',
- sameElse : 'L'
- },
- dayOfMonthOrdinalParse: /\d{1,2}(日|月|周)/,
- ordinal : function (number, period) {
- switch (period) {
- case 'd':
- case 'D':
- case 'DDD':
- return number + '日';
- case 'M':
- return number + '月';
- case 'w':
- case 'W':
- return number + '周';
- default:
- return number;
- }
- },
- relativeTime : {
- future : '%s内',
- past : '%s前',
- s : '几秒',
- ss : '%d 秒',
- m : '1 分钟',
- mm : '%d 分钟',
- h : '1 小时',
- hh : '%d 小时',
- d : '1 天',
- dd : '%d 天',
- M : '1 个月',
- MM : '%d 个月',
- y : '1 年',
- yy : '%d 年'
- },
- week : {
- // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
- dow : 1, // Monday is the first day of the week.
- doy : 4 // The week that contains Jan 4th is the first week of the year.
- }
- });
-
- return zhCn;
-
- })));
-
-
- /***/ }),
- /* 92 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _Icon = __webpack_require__(983);
-
- var _Icon2 = _interopRequireDefault(_Icon);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- exports["default"] = _Icon2["default"];
- module.exports = exports['default'];
-
- /***/ }),
- /* 93 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _Icon = __webpack_require__(1109);
-
- var _Icon2 = _interopRequireDefault(_Icon);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- exports["default"] = _Icon2["default"];
- module.exports = exports['default'];
-
- /***/ }),
- /* 94 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- exports.__esModule = true;
-
- var _defineProperty = __webpack_require__(157);
-
- var _defineProperty2 = _interopRequireDefault(_defineProperty);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
- exports.default = function (obj, key, value) {
- if (key in obj) {
- (0, _defineProperty2.default)(obj, key, {
- value: value,
- enumerable: true,
- configurable: true,
- writable: true
- });
- } else {
- obj[key] = value;
- }
-
- return obj;
- };
-
- /***/ }),
- /* 95 */
- /***/ (function(module, exports, __webpack_require__) {
-
- // optional / simple context binding
- var aFunction = __webpack_require__(462);
- module.exports = function (fn, that, length) {
- aFunction(fn);
- if (that === undefined) return fn;
- switch (length) {
- case 1: return function (a) {
- return fn.call(that, a);
- };
- case 2: return function (a, b) {
- return fn.call(that, a, b);
- };
- case 3: return function (a, b, c) {
- return fn.call(that, a, b, c);
- };
- }
- return function (/* ...args */) {
- return fn.apply(that, arguments);
- };
- };
-
-
- /***/ }),
- /* 96 */
- /***/ (function(module, exports, __webpack_require__) {
-
- // 7.1.1 ToPrimitive(input [, PreferredType])
- var isObject = __webpack_require__(40);
- // instead of the ES6 spec version, we didn't implement @@toPrimitive case
- // and the second argument - flag - preferred type is a string
- module.exports = function (it, S) {
- if (!isObject(it)) return it;
- var fn, val;
- if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
- if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
- if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
- throw TypeError("Can't convert object to primitive value");
- };
-
-
- /***/ }),
- /* 97 */
- /***/ (function(module, exports) {
-
- var toString = {}.toString;
-
- module.exports = function (it) {
- return toString.call(it).slice(8, -1);
- };
-
-
- /***/ }),
- /* 98 */
- /***/ (function(module, exports) {
-
- // 7.2.1 RequireObjectCoercible(argument)
- module.exports = function (it) {
- if (it == undefined) throw TypeError("Can't call method on " + it);
- return it;
- };
-
-
- /***/ }),
- /* 99 */
- /***/ (function(module, exports) {
-
- // 7.1.4 ToInteger
- var ceil = Math.ceil;
- var floor = Math.floor;
- module.exports = function (it) {
- return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
- };
-
-
- /***/ }),
- /* 100 */
- /***/ (function(module, exports, __webpack_require__) {
-
- var shared = __webpack_require__(101)('keys');
- var uid = __webpack_require__(78);
- module.exports = function (key) {
- return shared[key] || (shared[key] = uid(key));
- };
-
-
- /***/ }),
- /* 101 */
- /***/ (function(module, exports, __webpack_require__) {
-
- var core = __webpack_require__(16);
- var global = __webpack_require__(22);
- var SHARED = '__core-js_shared__';
- var store = global[SHARED] || (global[SHARED] = {});
-
- (module.exports = function (key, value) {
- return store[key] || (store[key] = value !== undefined ? value : {});
- })('versions', []).push({
- version: core.version,
- mode: __webpack_require__(77) ? 'pure' : 'global',
- copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
- });
-
-
- /***/ }),
- /* 102 */
- /***/ (function(module, exports) {
-
- // IE 8- don't enum bug keys
- module.exports = (
- 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
- ).split(',');
-
-
- /***/ }),
- /* 103 */
- /***/ (function(module, exports) {
-
- exports.f = Object.getOwnPropertySymbols;
-
-
- /***/ }),
- /* 104 */
- /***/ (function(module, exports, __webpack_require__) {
-
- // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
- var anObject = __webpack_require__(39);
- var dPs = __webpack_require__(473);
- var enumBugKeys = __webpack_require__(102);
- var IE_PROTO = __webpack_require__(100)('IE_PROTO');
- var Empty = function () { /* empty */ };
- var PROTOTYPE = 'prototype';
-
- // Create object with fake `null` prototype: use iframe Object with cleared prototype
- var createDict = function () {
- // Thrash, waste and sodomy: IE GC bug
- var iframe = __webpack_require__(159)('iframe');
- var i = enumBugKeys.length;
- var lt = '<';
- var gt = '>';
- var iframeDocument;
- iframe.style.display = 'none';
- __webpack_require__(474).appendChild(iframe);
- iframe.src = 'javascript:'; // eslint-disable-line no-script-url
- // createDict = iframe.contentWindow.Object;
- // html.removeChild(iframe);
- iframeDocument = iframe.contentWindow.document;
- iframeDocument.open();
- iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
- iframeDocument.close();
- createDict = iframeDocument.F;
- while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
- return createDict();
- };
-
- module.exports = Object.create || function create(O, Properties) {
- var result;
- if (O !== null) {
- Empty[PROTOTYPE] = anObject(O);
- result = new Empty();
- Empty[PROTOTYPE] = null;
- // add "__proto__" for Object.getPrototypeOf polyfill
- result[IE_PROTO] = O;
- } else result = createDict();
- return Properties === undefined ? result : dPs(result, Properties);
- };
-
-
- /***/ }),
- /* 105 */
- /***/ (function(module, exports, __webpack_require__) {
-
- var def = __webpack_require__(23).f;
- var has = __webpack_require__(28);
- var TAG = __webpack_require__(19)('toStringTag');
-
- module.exports = function (it, tag, stat) {
- if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
- };
-
-
- /***/ }),
- /* 106 */
- /***/ (function(module, exports, __webpack_require__) {
-
- exports.f = __webpack_require__(19);
-
-
- /***/ }),
- /* 107 */
- /***/ (function(module, exports, __webpack_require__) {
-
- var global = __webpack_require__(22);
- var core = __webpack_require__(16);
- var LIBRARY = __webpack_require__(77);
- var wksExt = __webpack_require__(106);
- var defineProperty = __webpack_require__(23).f;
- module.exports = function (name) {
- var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
- if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });
- };
-
-
- /***/ }),
- /* 108 */
- /***/ (function(module, exports) {
-
- /**
- * Checks if `value` is classified as an `Array` object.
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an array, else `false`.
- * @example
- *
- * _.isArray([1, 2, 3]);
- * // => true
- *
- * _.isArray(document.body.children);
- * // => false
- *
- * _.isArray('abc');
- * // => false
- *
- * _.isArray(_.noop);
- * // => false
- */
- var isArray = Array.isArray;
-
- module.exports = isArray;
-
-
- /***/ }),
- /* 109 */
- /***/ (function(module, exports, __webpack_require__) {
-
- var baseGetTag = __webpack_require__(172),
- isObjectLike = __webpack_require__(532);
-
- /** `Object#toString` result references. */
- var symbolTag = '[object Symbol]';
-
- /**
- * Checks if `value` is classified as a `Symbol` primitive or object.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
- * @example
- *
- * _.isSymbol(Symbol.iterator);
- * // => true
- *
- * _.isSymbol('abc');
- * // => false
- */
- function isSymbol(value) {
- return typeof value == 'symbol' ||
- (isObjectLike(value) && baseGetTag(value) == symbolTag);
- }
-
- module.exports = isSymbol;
-
-
- /***/ }),
- /* 110 */
- /***/ (function(module, exports, __webpack_require__) {
-
- var root = __webpack_require__(81);
-
- /** Built-in value references. */
- var Symbol = root.Symbol;
-
- module.exports = Symbol;
-
-
- /***/ }),
- /* 111 */
- /***/ (function(module, exports, __webpack_require__) {
-
- var baseIsNative = __webpack_require__(540),
- getValue = __webpack_require__(545);
-
- /**
- * Gets the native function at `key` of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {string} key The key of the method to get.
- * @returns {*} Returns the function if it's native, else `undefined`.
- */
- function getNative(object, key) {
- var value = getValue(object, key);
- return baseIsNative(value) ? value : undefined;
- }
-
- module.exports = getNative;
-
-
- /***/ }),
- /* 112 */
- /***/ (function(module, exports) {
-
- /**
- * Checks if `value` is the
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
- *
- * @static
- * @memberOf _
- * @since 0.1.0
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
- * @example
- *
- * _.isObject({});
- * // => true
- *
- * _.isObject([1, 2, 3]);
- * // => true
- *
- * _.isObject(_.noop);
- * // => true
- *
- * _.isObject(null);
- * // => false
- */
- function isObject(value) {
- var type = typeof value;
- return value != null && (type == 'object' || type == 'function');
- }
-
- module.exports = isObject;
-
-
- /***/ }),
- /* 113 */
- /***/ (function(module, exports) {
-
- /**
- * Performs a
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
- * comparison between two values to determine if they are equivalent.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
- * @example
- *
- * var object = { 'a': 1 };
- * var other = { 'a': 1 };
- *
- * _.eq(object, object);
- * // => true
- *
- * _.eq(object, other);
- * // => false
- *
- * _.eq('a', 'a');
- * // => true
- *
- * _.eq('a', Object('a'));
- * // => false
- *
- * _.eq(NaN, NaN);
- * // => true
- */
- function eq(value, other) {
- return value === other || (value !== value && other !== other);
- }
-
- module.exports = eq;
-
-
- /***/ }),
- /* 114 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
- /* WEBPACK VAR INJECTION */(function(process) {
-
- if (process.env.NODE_ENV === 'production') {
- module.exports = __webpack_require__(571);
- } else {
- module.exports = __webpack_require__(572);
- }
-
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(10)))
-
- /***/ }),
- /* 115 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _Select = __webpack_require__(604);
-
- var _Select2 = _interopRequireDefault(_Select);
-
- var _Option = __webpack_require__(122);
-
- var _Option2 = _interopRequireDefault(_Option);
-
- var _PropTypes = __webpack_require__(207);
-
- var _OptGroup = __webpack_require__(208);
-
- var _OptGroup2 = _interopRequireDefault(_OptGroup);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- _Select2["default"].Option = _Option2["default"];
- _Select2["default"].OptGroup = _OptGroup2["default"];
- exports["default"] = _Select2["default"];
- module.exports = exports['default'];
-
- /***/ }),
- /* 116 */
+ /* 154 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
- exports.default = createChainableTypeChecker;
- /**
- * Copyright 2013-present, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
- */
+ exports.default = all;
- // Mostly taken from ReactPropTypes.
+ var _createChainableTypeChecker = __webpack_require__(103);
- /* This source code is quoted from rc-util.
- * homepage: https://github.com/react-component/util
- */
+ var _createChainableTypeChecker2 = _interopRequireDefault(_createChainableTypeChecker);
- function createChainableTypeChecker(validate) {
- function checkType(isRequired, props, propName, componentName, location, propFullName) {
- var componentNameSafe = componentName || '<>';
- var propFullNameSafe = propFullName || propName;
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- if (props[propName] == null) {
- if (isRequired) {
- return new Error('Required ' + location + ' `' + propFullNameSafe + '` was not specified ' + ('in `' + componentNameSafe + '`.'));
- }
-
- return null;
- }
-
- for (var _len = arguments.length, args = Array(_len > 6 ? _len - 6 : 0), _key = 6; _key < _len; _key++) {
- args[_key - 6] = arguments[_key];
- }
-
- return validate.apply(undefined, [props, propName, componentNameSafe, location, propFullNameSafe].concat(args));
+ function all() {
+ for (var _len = arguments.length, validators = Array(_len), _key = 0; _key < _len; _key++) {
+ validators[_key] = arguments[_key];
}
- var chainedCheckType = checkType.bind(null, false);
- chainedCheckType.isRequired = checkType.bind(null, true);
+ function allPropTypes() {
+ for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
+ args[_key2] = arguments[_key2];
+ }
- return chainedCheckType;
- }
+ var error = null;
+
+ validators.forEach(function (validator) {
+ if (error != null) {
+ return;
+ }
+
+ var result = validator.apply(undefined, args);
+ if (result != null) {
+ error = result;
+ }
+ });
+
+ return error;
+ }
+
+ return (0, _createChainableTypeChecker2.default)(allPropTypes);
+ } /**
+ * This source code is quoted from rc-util.
+ * homepage: https://github.com/react-component/util
+ */
/***/ }),
- /* 117 */
+ /* 155 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
- exports.default = splitComponentProps;
+
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; /**
+ * This source code is quoted from rc-util.
+ * homepage: https://github.com/react-component/util
+ */
+
+
+ var _react = __webpack_require__(0);
+
+ var _react2 = _interopRequireDefault(_react);
+
+ var _createChainableTypeChecker = __webpack_require__(103);
+
+ var _createChainableTypeChecker2 = _interopRequireDefault(_createChainableTypeChecker);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ function elementType(props, propName, componentName, location, propFullName) {
+ var propValue = props[propName];
+ var propType = typeof propValue === 'undefined' ? 'undefined' : _typeof(propValue);
+
+ if (_react2.default.isValidElement(propValue)) {
+ return new Error('Invalid ' + location + ' `' + propFullName + '` of type ReactElement ' + ('supplied to `' + componentName + '`, expected an element type (a string ') + 'or a ReactClass).');
+ }
+
+ if (propType !== 'function' && propType !== 'string') {
+ return new Error('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected an element type (a string ') + 'or a ReactClass).');
+ }
+
+ return null;
+ }
+
+ exports.default = (0, _createChainableTypeChecker2.default)(elementType);
+
+ /***/ }),
+ /* 156 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ exports.__esModule = true;
+ exports.default = isRequiredForA11y;
/**
* This source code is quoted from rc-util.
* homepage: https://github.com/react-component/util
*/
- function _objectEntries(obj) {
- var entries = [];
- var keys = Object.keys(obj);
+ function isRequiredForA11y(validator) {
+ return function validate(props, propName, componentName, location, propFullName) {
+ var componentNameSafe = componentName || '<>';
+ var propFullNameSafe = propFullName || propName;
- for (var k = 0; k < keys.length; ++k) {
- entries.push([keys[k], obj[keys[k]]]);
- }return entries;
- }
-
- /**
- * 分割要传入父元素和子元素的props
- * @param {[object]} props 传入的属性
- * @param {[reactElement]} Component 组件
- * @return {[array]} 返回数组,第一个元素为父元素props对象,第二个子元素props对象
- */
- function splitComponentProps(props, Component) {
- var componentPropTypes = Component.propTypes;
-
- var parentProps = {};
- var childProps = {};
-
- _objectEntries(props).forEach(function (_ref) {
- var propName = _ref[0],
- propValue = _ref[1];
-
- if (componentPropTypes[propName]) {
- parentProps[propName] = propValue;
- } else {
- childProps[propName] = propValue;
+ if (props[propName] == null) {
+ return new Error('The ' + location + ' `' + propFullNameSafe + '` is required to make ' + ('`' + componentNameSafe + '` accessible for users of assistive ') + 'technologies such as screen readers.');
}
- });
- return [parentProps, childProps];
+ for (var _len = arguments.length, args = Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) {
+ args[_key - 5] = arguments[_key];
+ }
+
+ return validator.apply(undefined, [props, propName, componentName, location, propFullName].concat(args));
+ };
}
/***/ }),
- /* 118 */
+ /* 157 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+ /**
+ * This source code is quoted from rc-util.
+ * homepage: https://github.com/react-component/util
+ */
+
+
+ /**
+ * @ignore
+ * some key-codes definition and utils from closure-library
+ * @author yiminghe@gmail.com
+ */
+
+ var KeyCode = {
+ /**
+ * MAC_ENTER
+ */
+ MAC_ENTER: 3,
+ /**
+ * BACKSPACE
+ */
+ BACKSPACE: 8,
+ /**
+ * TAB
+ */
+ TAB: 9,
+ /**
+ * NUMLOCK on FF/Safari Mac
+ */
+ NUM_CENTER: 12, // NUMLOCK on FF/Safari Mac
+ /**
+ * ENTER
+ */
+ ENTER: 13,
+ /**
+ * SHIFT
+ */
+ SHIFT: 16,
+ /**
+ * CTRL
+ */
+ CTRL: 17,
+ /**
+ * ALT
+ */
+ ALT: 18,
+ /**
+ * PAUSE
+ */
+ PAUSE: 19,
+ /**
+ * CAPS_LOCK
+ */
+ CAPS_LOCK: 20,
+ /**
+ * ESC
+ */
+ ESC: 27,
+ /**
+ * SPACE
+ */
+ SPACE: 32,
+ /**
+ * PAGE_UP
+ */
+ PAGE_UP: 33, // also NUM_NORTH_EAST
+ /**
+ * PAGE_DOWN
+ */
+ PAGE_DOWN: 34, // also NUM_SOUTH_EAST
+ /**
+ * END
+ */
+ END: 35, // also NUM_SOUTH_WEST
+ /**
+ * HOME
+ */
+ HOME: 36, // also NUM_NORTH_WEST
+ /**
+ * LEFT
+ */
+ LEFT: 37, // also NUM_WEST
+ /**
+ * UP
+ */
+ UP: 38, // also NUM_NORTH
+ /**
+ * RIGHT
+ */
+ RIGHT: 39, // also NUM_EAST
+ /**
+ * DOWN
+ */
+ DOWN: 40, // also NUM_SOUTH
+ /**
+ * PRINT_SCREEN
+ */
+ PRINT_SCREEN: 44,
+ /**
+ * INSERT
+ */
+ INSERT: 45, // also NUM_INSERT
+ /**
+ * DELETE
+ */
+ DELETE: 46, // also NUM_DELETE
+ /**
+ * ZERO
+ */
+ ZERO: 48,
+ /**
+ * ONE
+ */
+ ONE: 49,
+ /**
+ * TWO
+ */
+ TWO: 50,
+ /**
+ * THREE
+ */
+ THREE: 51,
+ /**
+ * FOUR
+ */
+ FOUR: 52,
+ /**
+ * FIVE
+ */
+ FIVE: 53,
+ /**
+ * SIX
+ */
+ SIX: 54,
+ /**
+ * SEVEN
+ */
+ SEVEN: 55,
+ /**
+ * EIGHT
+ */
+ EIGHT: 56,
+ /**
+ * NINE
+ */
+ NINE: 57,
+ /**
+ * QUESTION_MARK
+ */
+ QUESTION_MARK: 63, // needs localization
+ /**
+ * A
+ */
+ A: 65,
+ /**
+ * B
+ */
+ B: 66,
+ /**
+ * C
+ */
+ C: 67,
+ /**
+ * D
+ */
+ D: 68,
+ /**
+ * E
+ */
+ E: 69,
+ /**
+ * F
+ */
+ F: 70,
+ /**
+ * G
+ */
+ G: 71,
+ /**
+ * H
+ */
+ H: 72,
+ /**
+ * I
+ */
+ I: 73,
+ /**
+ * J
+ */
+ J: 74,
+ /**
+ * K
+ */
+ K: 75,
+ /**
+ * L
+ */
+ L: 76,
+ /**
+ * M
+ */
+ M: 77,
+ /**
+ * N
+ */
+ N: 78,
+ /**
+ * O
+ */
+ O: 79,
+ /**
+ * P
+ */
+ P: 80,
+ /**
+ * Q
+ */
+ Q: 81,
+ /**
+ * R
+ */
+ R: 82,
+ /**
+ * S
+ */
+ S: 83,
+ /**
+ * T
+ */
+ T: 84,
+ /**
+ * U
+ */
+ U: 85,
+ /**
+ * V
+ */
+ V: 86,
+ /**
+ * W
+ */
+ W: 87,
+ /**
+ * X
+ */
+ X: 88,
+ /**
+ * Y
+ */
+ Y: 89,
+ /**
+ * Z
+ */
+ Z: 90,
+ /**
+ * META
+ */
+ META: 91, // WIN_KEY_LEFT
+ /**
+ * WIN_KEY_RIGHT
+ */
+ WIN_KEY_RIGHT: 92,
+ /**
+ * CONTEXT_MENU
+ */
+ CONTEXT_MENU: 93,
+ /**
+ * NUM_ZERO
+ */
+ NUM_ZERO: 96,
+ /**
+ * NUM_ONE
+ */
+ NUM_ONE: 97,
+ /**
+ * NUM_TWO
+ */
+ NUM_TWO: 98,
+ /**
+ * NUM_THREE
+ */
+ NUM_THREE: 99,
+ /**
+ * NUM_FOUR
+ */
+ NUM_FOUR: 100,
+ /**
+ * NUM_FIVE
+ */
+ NUM_FIVE: 101,
+ /**
+ * NUM_SIX
+ */
+ NUM_SIX: 102,
+ /**
+ * NUM_SEVEN
+ */
+ NUM_SEVEN: 103,
+ /**
+ * NUM_EIGHT
+ */
+ NUM_EIGHT: 104,
+ /**
+ * NUM_NINE
+ */
+ NUM_NINE: 105,
+ /**
+ * NUM_MULTIPLY
+ */
+ NUM_MULTIPLY: 106,
+ /**
+ * NUM_PLUS
+ */
+ NUM_PLUS: 107,
+ /**
+ * NUM_MINUS
+ */
+ NUM_MINUS: 109,
+ /**
+ * NUM_PERIOD
+ */
+ NUM_PERIOD: 110,
+ /**
+ * NUM_DIVISION
+ */
+ NUM_DIVISION: 111,
+ /**
+ * F1
+ */
+ F1: 112,
+ /**
+ * F2
+ */
+ F2: 113,
+ /**
+ * F3
+ */
+ F3: 114,
+ /**
+ * F4
+ */
+ F4: 115,
+ /**
+ * F5
+ */
+ F5: 116,
+ /**
+ * F6
+ */
+ F6: 117,
+ /**
+ * F7
+ */
+ F7: 118,
+ /**
+ * F8
+ */
+ F8: 119,
+ /**
+ * F9
+ */
+ F9: 120,
+ /**
+ * F10
+ */
+ F10: 121,
+ /**
+ * F11
+ */
+ F11: 122,
+ /**
+ * F12
+ */
+ F12: 123,
+ /**
+ * NUMLOCK
+ */
+ NUMLOCK: 144,
+ /**
+ * SEMICOLON
+ */
+ SEMICOLON: 186, // needs localization
+ /**
+ * DASH
+ */
+ DASH: 189, // needs localization
+ /**
+ * EQUALS
+ */
+ EQUALS: 187, // needs localization
+ /**
+ * COMMA
+ */
+ COMMA: 188, // needs localization
+ /**
+ * PERIOD
+ */
+ PERIOD: 190, // needs localization
+ /**
+ * SLASH
+ */
+ SLASH: 191, // needs localization
+ /**
+ * APOSTROPHE
+ */
+ APOSTROPHE: 192, // needs localization
+ /**
+ * SINGLE_QUOTE
+ */
+ SINGLE_QUOTE: 222, // needs localization
+ /**
+ * OPEN_SQUARE_BRACKET
+ */
+ OPEN_SQUARE_BRACKET: 219, // needs localization
+ /**
+ * BACKSLASH
+ */
+ BACKSLASH: 220, // needs localization
+ /**
+ * CLOSE_SQUARE_BRACKET
+ */
+ CLOSE_SQUARE_BRACKET: 221, // needs localization
+ /**
+ * WIN_KEY
+ */
+ WIN_KEY: 224,
+ /**
+ * MAC_FF_META
+ */
+ MAC_FF_META: 224, // Firefox (Gecko) fires this for the meta key instead of 91
+ /**
+ * WIN_IME
+ */
+ WIN_IME: 229
+ };
+
+ /*
+ whether text and modified key is entered at the same time.
+ */
+ KeyCode.isTextModifyingKeyEvent = function isTextModifyingKeyEvent(e) {
+ var keyCode = e.keyCode;
+ if (e.altKey && !e.ctrlKey || e.metaKey ||
+ // Function keys don't generate text
+ keyCode >= KeyCode.F1 && keyCode <= KeyCode.F12) {
+ return false;
+ }
+
+ // The following keys are quite harmless, even in combination with
+ // CTRL, ALT or SHIFT.
+ switch (keyCode) {
+ case KeyCode.ALT:
+ case KeyCode.CAPS_LOCK:
+ case KeyCode.CONTEXT_MENU:
+ case KeyCode.CTRL:
+ case KeyCode.DOWN:
+ case KeyCode.END:
+ case KeyCode.ESC:
+ case KeyCode.HOME:
+ case KeyCode.INSERT:
+ case KeyCode.LEFT:
+ case KeyCode.MAC_FF_META:
+ case KeyCode.META:
+ case KeyCode.NUMLOCK:
+ case KeyCode.NUM_CENTER:
+ case KeyCode.PAGE_DOWN:
+ case KeyCode.PAGE_UP:
+ case KeyCode.PAUSE:
+ case KeyCode.PRINT_SCREEN:
+ case KeyCode.RIGHT:
+ case KeyCode.SHIFT:
+ case KeyCode.UP:
+ case KeyCode.WIN_KEY:
+ case KeyCode.WIN_KEY_RIGHT:
+ return false;
+ default:
+ return true;
+ }
+ };
+
+ /*
+ whether character is entered.
+ */
+ KeyCode.isCharacterKey = function isCharacterKey(keyCode) {
+ if (keyCode >= KeyCode.ZERO && keyCode <= KeyCode.NINE) {
+ return true;
+ }
+
+ if (keyCode >= KeyCode.NUM_ZERO && keyCode <= KeyCode.NUM_MULTIPLY) {
+ return true;
+ }
+
+ if (keyCode >= KeyCode.A && keyCode <= KeyCode.Z) {
+ return true;
+ }
+
+ // Safari sends zero key code for non-latin characters.
+ if (window.navigation.userAgent.indexOf('WebKit') !== -1 && keyCode === 0) {
+ return true;
+ }
+
+ switch (keyCode) {
+ case KeyCode.SPACE:
+ case KeyCode.QUESTION_MARK:
+ case KeyCode.NUM_PLUS:
+ case KeyCode.NUM_MINUS:
+ case KeyCode.NUM_PERIOD:
+ case KeyCode.NUM_DIVISION:
+ case KeyCode.SEMICOLON:
+ case KeyCode.DASH:
+ case KeyCode.EQUALS:
+ case KeyCode.COMMA:
+ case KeyCode.PERIOD:
+ case KeyCode.SLASH:
+ case KeyCode.APOSTROPHE:
+ case KeyCode.SINGLE_QUOTE:
+ case KeyCode.OPEN_SQUARE_BRACKET:
+ case KeyCode.BACKSLASH:
+ case KeyCode.CLOSE_SQUARE_BRACKET:
+ return true;
+ default:
+ return false;
+ }
+ };
+
+ module.exports = KeyCode;
+
+ /***/ }),
+ /* 158 */
+ /***/ (function(module, exports) {
+
+ module.exports = function(arr, obj){
+ if (arr.indexOf) return arr.indexOf(obj);
+ for (var i = 0; i < arr.length; ++i) {
+ if (arr[i] === obj) return i;
+ }
+ return -1;
+ };
+
+ /***/ }),
+ /* 159 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
- exports.default = addEventListenerWrap;
- var _addDomEventListener = __webpack_require__(119);
+ var _react = __webpack_require__(0);
- var _addDomEventListener2 = _interopRequireDefault(_addDomEventListener);
+ var _react2 = _interopRequireDefault(_react);
+
+ var _propTypes = __webpack_require__(1);
+
+ var _propTypes2 = _interopRequireDefault(_propTypes);
var _reactDom = __webpack_require__(4);
var _reactDom2 = _interopRequireDefault(_reactDom);
+ var _domAlign = __webpack_require__(160);
+
+ var _domAlign2 = _interopRequireDefault(_domAlign);
+
+ var _addEventListener = __webpack_require__(105);
+
+ var _addEventListener2 = _interopRequireDefault(_addEventListener);
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- /**
- * This source code is quoted from rc-util.
- * homepage: https://github.com/react-component/util
- */
- function addEventListenerWrap(target, eventType, cb) {
- /* eslint camelcase: 2 */
- var callback = _reactDom2.default.unstable_batchedUpdates ? function run(e) {
- _reactDom2.default.unstable_batchedUpdates(cb, e);
- } : cb;
- return (0, _addDomEventListener2.default)(target, eventType, callback);
- }
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
+ * This source code is quoted from rc-util.
+ * homepage: https://github.com/react-component/util
+ */
+
+
+ //import isWindow from './isWindow';
+
+ function isWindow(obj) {
+ /* eslint no-eq-null: 0 */
+ /* eslint eqeqeq: 0 */
+ return obj != null && obj == obj.window;
+ }
+
+ function buffer(fn, ms) {
+ var timer = void 0;
+
+ function clear() {
+ if (timer) {
+ clearTimeout(timer);
+ timer = null;
+ }
+ }
+
+ function bufferFn() {
+ clear();
+ timer = setTimeout(fn, ms);
+ }
+
+ bufferFn.clear = clear;
+
+ return bufferFn;
+ }
+
+ var propTypes = {
+ childrenProps: _propTypes2.default.object,
+ align: _propTypes2.default.object.isRequired,
+ target: _propTypes2.default.func,
+ onAlign: _propTypes2.default.func,
+ monitorBufferTime: _propTypes2.default.number,
+ monitorWindowResize: _propTypes2.default.bool,
+ disabled: _propTypes2.default.bool,
+ children: _propTypes2.default.any
+ };
+
+ var defaultProps = {
+ target: function target() {
+ return window;
+ },
+ onAlign: function onAlign() {},
+
+ monitorBufferTime: 50,
+ monitorWindowResize: false,
+ disabled: false
+ };
+
+ var Align = function (_React$Component) {
+ _inherits(Align, _React$Component);
+
+ function Align(props) {
+ _classCallCheck(this, Align);
+
+ var _this = _possibleConstructorReturn(this, _React$Component.call(this, props));
+
+ _initialiseProps.call(_this);
+
+ return _this;
+ }
+
+ Align.prototype.componentDidMount = function componentDidMount() {
+ var props = this.props;
+ // if parent ref not attached .... use document.getElementById
+ this.forceAlign();
+ if (!props.disabled && props.monitorWindowResize) {
+ this.startMonitorWindowResize();
+ }
+ };
+
+ Align.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
+ var reAlign = false;
+ var props = this.props;
+
+ if (!props.disabled) {
+ if (prevProps.disabled || prevProps.align !== props.align) {
+ reAlign = true;
+ } else {
+ var lastTarget = prevProps.target();
+ var currentTarget = props.target();
+ if (isWindow(lastTarget) && isWindow(currentTarget)) {
+ reAlign = false;
+ } else if (lastTarget !== currentTarget) {
+ reAlign = true;
+ }
+ }
+ }
+
+ if (reAlign) {
+ this.forceAlign();
+ }
+
+ if (props.monitorWindowResize && !props.disabled) {
+ this.startMonitorWindowResize();
+ } else {
+ this.stopMonitorWindowResize();
+ }
+ };
+
+ Align.prototype.componentWillUnmount = function componentWillUnmount() {
+ this.stopMonitorWindowResize();
+ };
+
+ Align.prototype.render = function render() {
+ var _props = this.props,
+ childrenProps = _props.childrenProps,
+ children = _props.children;
+
+ var child = _react2.default.Children.only(children);
+ if (childrenProps) {
+ var newProps = {};
+ for (var prop in childrenProps) {
+ if (childrenProps.hasOwnProperty(prop)) {
+ newProps[prop] = this.props[childrenProps[prop]];
+ }
+ }
+ return _react2.default.cloneElement(child, newProps);
+ }
+ return child;
+ };
+
+ return Align;
+ }(_react2.default.Component);
+
+ var _initialiseProps = function _initialiseProps() {
+ var _this2 = this;
+
+ this.startMonitorWindowResize = function () {
+ if (!_this2.resizeHandler) {
+ _this2.bufferMonitor = buffer(_this2.forceAlign, _this2.props.monitorBufferTime);
+ _this2.resizeHandler = (0, _addEventListener2.default)(window, 'resize', _this2.bufferMonitor);
+ }
+ };
+
+ this.stopMonitorWindowResize = function () {
+ if (_this2.resizeHandler) {
+ _this2.bufferMonitor.clear();
+ _this2.resizeHandler.remove();
+ _this2.resizeHandler = null;
+ }
+ };
+
+ this.forceAlign = function () {
+ var props = _this2.props;
+ if (!props.disabled) {
+ var source = _reactDom2.default.findDOMNode(_this2);
+ props.onAlign(source, (0, _domAlign2.default)(source, props.target(), props.align));
+ }
+ };
+ };
+
+ ;
+
+ Align.defaultProps = defaultProps;
+ Align.propTypes = propTypes;
+
+ exports.default = Align;
/***/ }),
- /* 119 */
+ /* 160 */
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+ "use strict";
+ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__align_alignElement__ = __webpack_require__(551);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__align_alignPoint__ = __webpack_require__(557);
+ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "alignElement", function() { return __WEBPACK_IMPORTED_MODULE_0__align_alignElement__["a"]; });
+ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "alignPoint", function() { return __WEBPACK_IMPORTED_MODULE_1__align_alignPoint__["a"]; });
+
+
+
+
+
+ /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__align_alignElement__["a" /* default */]);
+
+ /***/ }),
+ /* 161 */
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+ "use strict";
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(33);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getVisibleRectForElement__ = __webpack_require__(162);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__adjustForViewport__ = __webpack_require__(554);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__getRegion__ = __webpack_require__(164);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__getElFuturePos__ = __webpack_require__(555);
+ /**
+ * align dom node flexibly
+ * @author yiminghe@gmail.com
+ */
+
+
+
+
+
+
+
+ // http://yiminghe.iteye.com/blog/1124720
+
+ function isFailX(elFuturePos, elRegion, visibleRect) {
+ return elFuturePos.left < visibleRect.left || elFuturePos.left + elRegion.width > visibleRect.right;
+ }
+
+ function isFailY(elFuturePos, elRegion, visibleRect) {
+ return elFuturePos.top < visibleRect.top || elFuturePos.top + elRegion.height > visibleRect.bottom;
+ }
+
+ function isCompleteFailX(elFuturePos, elRegion, visibleRect) {
+ return elFuturePos.left > visibleRect.right || elFuturePos.left + elRegion.width < visibleRect.left;
+ }
+
+ function isCompleteFailY(elFuturePos, elRegion, visibleRect) {
+ return elFuturePos.top > visibleRect.bottom || elFuturePos.top + elRegion.height < visibleRect.top;
+ }
+
+ function flip(points, reg, map) {
+ var ret = [];
+ __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].each(points, function (p) {
+ ret.push(p.replace(reg, function (m) {
+ return map[m];
+ }));
+ });
+ return ret;
+ }
+
+ function flipOffset(offset, index) {
+ offset[index] = -offset[index];
+ return offset;
+ }
+
+ function convertOffset(str, offsetLen) {
+ var n = void 0;
+ if (/%$/.test(str)) {
+ n = parseInt(str.substring(0, str.length - 1), 10) / 100 * offsetLen;
+ } else {
+ n = parseInt(str, 10);
+ }
+ return n || 0;
+ }
+
+ function normalizeOffset(offset, el) {
+ offset[0] = convertOffset(offset[0], el.width);
+ offset[1] = convertOffset(offset[1], el.height);
+ }
+
+ /**
+ * @param el
+ * @param tgtRegion 参照节点所占的区域: { left, top, width, height }
+ * @param align
+ */
+ function doAlign(el, tgtRegion, align, isTgtRegionVisible) {
+ var points = align.points;
+ var offset = align.offset || [0, 0];
+ var targetOffset = align.targetOffset || [0, 0];
+ var overflow = align.overflow;
+ var source = align.source || el;
+ offset = [].concat(offset);
+ targetOffset = [].concat(targetOffset);
+ overflow = overflow || {};
+ var newOverflowCfg = {};
+ var fail = 0;
+ // 当前节点可以被放置的显示区域
+ var visibleRect = Object(__WEBPACK_IMPORTED_MODULE_1__getVisibleRectForElement__["a" /* default */])(source);
+ // 当前节点所占的区域, left/top/width/height
+ var elRegion = Object(__WEBPACK_IMPORTED_MODULE_3__getRegion__["a" /* default */])(source);
+ // 将 offset 转换成数值,支持百分比
+ normalizeOffset(offset, elRegion);
+ normalizeOffset(targetOffset, tgtRegion);
+ // 当前节点将要被放置的位置
+ var elFuturePos = Object(__WEBPACK_IMPORTED_MODULE_4__getElFuturePos__["a" /* default */])(elRegion, tgtRegion, points, offset, targetOffset);
+ // 当前节点将要所处的区域
+ var newElRegion = __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].merge(elRegion, elFuturePos);
+
+ // 如果可视区域不能完全放置当前节点时允许调整
+ if (visibleRect && (overflow.adjustX || overflow.adjustY) && isTgtRegionVisible) {
+ if (overflow.adjustX) {
+ // 如果横向不能放下
+ if (isFailX(elFuturePos, elRegion, visibleRect)) {
+ // 对齐位置反下
+ var newPoints = flip(points, /[lr]/ig, {
+ l: 'r',
+ r: 'l'
+ });
+ // 偏移量也反下
+ var newOffset = flipOffset(offset, 0);
+ var newTargetOffset = flipOffset(targetOffset, 0);
+ var newElFuturePos = Object(__WEBPACK_IMPORTED_MODULE_4__getElFuturePos__["a" /* default */])(elRegion, tgtRegion, newPoints, newOffset, newTargetOffset);
+
+ if (!isCompleteFailX(newElFuturePos, elRegion, visibleRect)) {
+ fail = 1;
+ points = newPoints;
+ offset = newOffset;
+ targetOffset = newTargetOffset;
+ }
+ }
+ }
+
+ if (overflow.adjustY) {
+ // 如果纵向不能放下
+ if (isFailY(elFuturePos, elRegion, visibleRect)) {
+ // 对齐位置反下
+ var _newPoints = flip(points, /[tb]/ig, {
+ t: 'b',
+ b: 't'
+ });
+ // 偏移量也反下
+ var _newOffset = flipOffset(offset, 1);
+ var _newTargetOffset = flipOffset(targetOffset, 1);
+ var _newElFuturePos = Object(__WEBPACK_IMPORTED_MODULE_4__getElFuturePos__["a" /* default */])(elRegion, tgtRegion, _newPoints, _newOffset, _newTargetOffset);
+
+ if (!isCompleteFailY(_newElFuturePos, elRegion, visibleRect)) {
+ fail = 1;
+ points = _newPoints;
+ offset = _newOffset;
+ targetOffset = _newTargetOffset;
+ }
+ }
+ }
+
+ // 如果失败,重新计算当前节点将要被放置的位置
+ if (fail) {
+ elFuturePos = Object(__WEBPACK_IMPORTED_MODULE_4__getElFuturePos__["a" /* default */])(elRegion, tgtRegion, points, offset, targetOffset);
+ __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].mix(newElRegion, elFuturePos);
+ }
+ var isStillFailX = isFailX(elFuturePos, elRegion, visibleRect);
+ var isStillFailY = isFailY(elFuturePos, elRegion, visibleRect);
+ // 检查反下后的位置是否可以放下了,如果仍然放不下:
+ // 1. 复原修改过的定位参数
+ if (isStillFailX || isStillFailY) {
+ points = align.points;
+ offset = align.offset || [0, 0];
+ targetOffset = align.targetOffset || [0, 0];
+ }
+ // 2. 只有指定了可以调整当前方向才调整
+ newOverflowCfg.adjustX = overflow.adjustX && isStillFailX;
+ newOverflowCfg.adjustY = overflow.adjustY && isStillFailY;
+
+ // 确实要调整,甚至可能会调整高度宽度
+ if (newOverflowCfg.adjustX || newOverflowCfg.adjustY) {
+ newElRegion = Object(__WEBPACK_IMPORTED_MODULE_2__adjustForViewport__["a" /* default */])(elFuturePos, elRegion, visibleRect, newOverflowCfg);
+ }
+ }
+
+ // need judge to in case set fixed with in css on height auto element
+ if (newElRegion.width !== elRegion.width) {
+ __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].css(source, 'width', __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].width(source) + newElRegion.width - elRegion.width);
+ }
+
+ if (newElRegion.height !== elRegion.height) {
+ __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].css(source, 'height', __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].height(source) + newElRegion.height - elRegion.height);
+ }
+
+ // https://github.com/kissyteam/kissy/issues/190
+ // 相对于屏幕位置没变,而 left/top 变了
+ // 例如
+ __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].offset(source, {
+ left: newElRegion.left,
+ top: newElRegion.top
+ }, {
+ useCssRight: align.useCssRight,
+ useCssBottom: align.useCssBottom,
+ useCssTransform: align.useCssTransform,
+ ignoreShake: align.ignoreShake
+ });
+
+ return {
+ points: points,
+ offset: offset,
+ targetOffset: targetOffset,
+ overflow: newOverflowCfg
+ };
+ }
+
+ /* harmony default export */ __webpack_exports__["a"] = (doAlign);
+ /**
+ * 2012-04-26 yiminghe@gmail.com
+ * - 优化智能对齐算法
+ * - 慎用 resizeXX
+ *
+ * 2011-07-13 yiminghe@gmail.com note:
+ * - 增加智能对齐,以及大小调整选项
+ **/
+
+ /***/ }),
+ /* 162 */
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+ "use strict";
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(33);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getOffsetParent__ = __webpack_require__(163);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isAncestorFixed__ = __webpack_require__(553);
+
+
+
+
+ /**
+ * 获得元素的显示部分的区域
+ */
+ function getVisibleRectForElement(element) {
+ var visibleRect = {
+ left: 0,
+ right: Infinity,
+ top: 0,
+ bottom: Infinity
+ };
+ var el = Object(__WEBPACK_IMPORTED_MODULE_1__getOffsetParent__["a" /* default */])(element);
+ var doc = __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].getDocument(element);
+ var win = doc.defaultView || doc.parentWindow;
+ var body = doc.body;
+ var documentElement = doc.documentElement;
+
+ // Determine the size of the visible rect by climbing the dom accounting for
+ // all scrollable containers.
+ while (el) {
+ // clientWidth is zero for inline block elements in ie.
+ if ((navigator.userAgent.indexOf('MSIE') === -1 || el.clientWidth !== 0) &&
+ // body may have overflow set on it, yet we still get the entire
+ // viewport. In some browsers, el.offsetParent may be
+ // document.documentElement, so check for that too.
+ el !== body && el !== documentElement && __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].css(el, 'overflow') !== 'visible') {
+ var pos = __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].offset(el);
+ // add border
+ pos.left += el.clientLeft;
+ pos.top += el.clientTop;
+ visibleRect.top = Math.max(visibleRect.top, pos.top);
+ visibleRect.right = Math.min(visibleRect.right,
+ // consider area without scrollBar
+ pos.left + el.clientWidth);
+ visibleRect.bottom = Math.min(visibleRect.bottom, pos.top + el.clientHeight);
+ visibleRect.left = Math.max(visibleRect.left, pos.left);
+ } else if (el === body || el === documentElement) {
+ break;
+ }
+ el = Object(__WEBPACK_IMPORTED_MODULE_1__getOffsetParent__["a" /* default */])(el);
+ }
+
+ // Set element position to fixed
+ // make sure absolute element itself don't affect it's visible area
+ // https://github.com/ant-design/ant-design/issues/7601
+ var originalPosition = null;
+ if (!__WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].isWindow(element) && element.nodeType !== 9) {
+ originalPosition = element.style.position;
+ var position = __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].css(element, 'position');
+ if (position === 'absolute') {
+ element.style.position = 'fixed';
+ }
+ }
+
+ var scrollX = __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].getWindowScrollLeft(win);
+ var scrollY = __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].getWindowScrollTop(win);
+ var viewportWidth = __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].viewportWidth(win);
+ var viewportHeight = __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].viewportHeight(win);
+ var documentWidth = documentElement.scrollWidth;
+ var documentHeight = documentElement.scrollHeight;
+
+ // scrollXXX on html is sync with body which means overflow: hidden on body gets wrong scrollXXX.
+ // We should cut this ourself.
+ var bodyStyle = window.getComputedStyle(body);
+ if (bodyStyle.overflowX === 'hidden') {
+ documentWidth = win.innerWidth;
+ }
+ if (bodyStyle.overflowY === 'hidden') {
+ documentHeight = win.innerHeight;
+ }
+
+ // Reset element position after calculate the visible area
+ if (element.style) {
+ element.style.position = originalPosition;
+ }
+
+ if (Object(__WEBPACK_IMPORTED_MODULE_2__isAncestorFixed__["a" /* default */])(element)) {
+ // Clip by viewport's size.
+ visibleRect.left = Math.max(visibleRect.left, scrollX);
+ visibleRect.top = Math.max(visibleRect.top, scrollY);
+ visibleRect.right = Math.min(visibleRect.right, scrollX + viewportWidth);
+ visibleRect.bottom = Math.min(visibleRect.bottom, scrollY + viewportHeight);
+ } else {
+ // Clip by document's size.
+ var maxVisibleWidth = Math.max(documentWidth, scrollX + viewportWidth);
+ visibleRect.right = Math.min(visibleRect.right, maxVisibleWidth);
+
+ var maxVisibleHeight = Math.max(documentHeight, scrollY + viewportHeight);
+ visibleRect.bottom = Math.min(visibleRect.bottom, maxVisibleHeight);
+ }
+
+ return visibleRect.top >= 0 && visibleRect.left >= 0 && visibleRect.bottom > visibleRect.top && visibleRect.right > visibleRect.left ? visibleRect : null;
+ }
+
+ /* harmony default export */ __webpack_exports__["a"] = (getVisibleRectForElement);
+
+ /***/ }),
+ /* 163 */
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+ "use strict";
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(33);
+
+
+ /**
+ * 得到会导致元素显示不全的祖先元素
+ */
+
+ function getOffsetParent(element) {
+ if (__WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].isWindow(element) || element.nodeType === 9) {
+ return null;
+ }
+ // ie 这个也不是完全可行
+ /*
+
+
+ 元素 6 高 100px 宽 50px
+
+
+ */
+ // element.offsetParent does the right thing in ie7 and below. Return parent with layout!
+ // In other browsers it only includes elements with position absolute, relative or
+ // fixed, not elements with overflow set to auto or scroll.
+ // if (UA.ie && ieMode < 8) {
+ // return element.offsetParent;
+ // }
+ // 统一的 offsetParent 方法
+ var doc = __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].getDocument(element);
+ var body = doc.body;
+ var parent = void 0;
+ var positionStyle = __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].css(element, 'position');
+ var skipStatic = positionStyle === 'fixed' || positionStyle === 'absolute';
+
+ if (!skipStatic) {
+ return element.nodeName.toLowerCase() === 'html' ? null : element.parentNode;
+ }
+
+ for (parent = element.parentNode; parent && parent !== body; parent = parent.parentNode) {
+ positionStyle = __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].css(parent, 'position');
+ if (positionStyle !== 'static') {
+ return parent;
+ }
+ }
+ return null;
+ }
+
+ /* harmony default export */ __webpack_exports__["a"] = (getOffsetParent);
+
+ /***/ }),
+ /* 164 */
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+ "use strict";
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(33);
+
+
+ function getRegion(node) {
+ var offset = void 0;
+ var w = void 0;
+ var h = void 0;
+ if (!__WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].isWindow(node) && node.nodeType !== 9) {
+ offset = __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].offset(node);
+ w = __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].outerWidth(node);
+ h = __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].outerHeight(node);
+ } else {
+ var win = __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].getWindow(node);
+ offset = {
+ left: __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].getWindowScrollLeft(win),
+ top: __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].getWindowScrollTop(win)
+ };
+ w = __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].viewportWidth(win);
+ h = __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].viewportHeight(win);
+ }
+ offset.width = w;
+ offset.height = h;
+ return offset;
+ }
+
+ /* harmony default export */ __webpack_exports__["a"] = (getRegion);
+
+ /***/ }),
+ /* 165 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
- Object.defineProperty(exports, '__esModule', {
+ Object.defineProperty(exports, "__esModule", {
value: true
});
- exports['default'] = addEventListener;
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
-
- var _EventObject = __webpack_require__(609);
-
- var _EventObject2 = _interopRequireDefault(_EventObject);
-
- function addEventListener(target, eventType, callback, option) {
- function wrapCallback(e) {
- var ne = new _EventObject2['default'](e);
- callback.call(target, ne);
+ var util = {
+ isAppearSupported: function isAppearSupported(props) {
+ return props.transitionName && props.transitionAppear || props.animation.appear;
+ },
+ isEnterSupported: function isEnterSupported(props) {
+ return props.transitionName && props.transitionEnter || props.animation.enter;
+ },
+ isLeaveSupported: function isLeaveSupported(props) {
+ return props.transitionName && props.transitionLeave || props.animation.leave;
+ },
+ allowAppearCallback: function allowAppearCallback(props) {
+ return props.transitionAppear || props.animation.appear;
+ },
+ allowEnterCallback: function allowEnterCallback(props) {
+ return props.transitionEnter || props.animation.enter;
+ },
+ allowLeaveCallback: function allowLeaveCallback(props) {
+ return props.transitionLeave || props.animation.leave;
}
+ };
+ exports["default"] = util;
+ module.exports = exports["default"];
- if (target.addEventListener) {
- var _ret = (function () {
- var useCapture = false;
- if (typeof option === 'object') {
- useCapture = option.capture || false;
- } else if (typeof option === 'boolean') {
- useCapture = option;
+ /***/ }),
+ /* 166 */
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+ "use strict";
+ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Menu__ = __webpack_require__(561);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__SubMenu__ = __webpack_require__(170);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__MenuItem__ = __webpack_require__(587);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__MenuItemGroup__ = __webpack_require__(590);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Divider__ = __webpack_require__(591);
+ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "SubMenu", function() { return __WEBPACK_IMPORTED_MODULE_1__SubMenu__["a"]; });
+ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Item", function() { return __WEBPACK_IMPORTED_MODULE_2__MenuItem__["a"]; });
+ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "MenuItem", function() { return __WEBPACK_IMPORTED_MODULE_2__MenuItem__["a"]; });
+ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "MenuItemGroup", function() { return __WEBPACK_IMPORTED_MODULE_3__MenuItemGroup__["a"]; });
+ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ItemGroup", function() { return __WEBPACK_IMPORTED_MODULE_3__MenuItemGroup__["a"]; });
+ /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Divider", function() { return __WEBPACK_IMPORTED_MODULE_4__Divider__["a"]; });
+
+
+
+
+
+
+
+
+ /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__Menu__["a" /* default */]);
+
+ /***/ }),
+ /* 167 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+ exports.storeShape = undefined;
+
+ var _propTypes = __webpack_require__(1);
+
+ var _propTypes2 = _interopRequireDefault(_propTypes);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
+
+ var storeShape = exports.storeShape = _propTypes2.default.shape({
+ subscribe: _propTypes2.default.func.isRequired,
+ setState: _propTypes2.default.func.isRequired,
+ getState: _propTypes2.default.func.isRequired
+ });
+
+ /***/ }),
+ /* 168 */
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+ "use strict";
+ /* harmony export (immutable) */ __webpack_exports__["b"] = getActiveKey;
+ /* unused harmony export saveRef */
+ /* unused harmony export SubPopupMenu */
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(20);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__ = __webpack_require__(6);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(7);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__ = __webpack_require__(8);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends__ = __webpack_require__(9);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends__);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(0);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(1);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_mini_store__ = __webpack_require__(26);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_mini_store___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_mini_store__);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_rc_util_es_KeyCode__ = __webpack_require__(74);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_rc_util_es_createChainedFunction__ = __webpack_require__(574);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_classnames__ = __webpack_require__(3);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_classnames__);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__util__ = __webpack_require__(45);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__DOMWrap__ = __webpack_require__(576);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ function allDisabled(arr) {
+ if (!arr.length) {
+ return true;
+ }
+ return arr.every(function (c) {
+ return !!c.props.disabled;
+ });
+ }
+
+ function updateActiveKey(store, menuId, activeKey) {
+ var _extends2;
+
+ var state = store.getState();
+ store.setState({
+ activeKey: __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default()({}, state.activeKey, (_extends2 = {}, _extends2[menuId] = activeKey, _extends2))
+ });
+ }
+
+ function getEventKey(props) {
+ // when eventKey not available ,it's menu and return menu id '0-menu-'
+ return props.eventKey || '0-menu-';
+ }
+
+ function getActiveKey(props, originalActiveKey) {
+ var activeKey = originalActiveKey;
+ var children = props.children,
+ eventKey = props.eventKey;
+
+ if (activeKey) {
+ var found = void 0;
+ Object(__WEBPACK_IMPORTED_MODULE_11__util__["e" /* loopMenuItem */])(children, function (c, i) {
+ if (c && !c.props.disabled && activeKey === Object(__WEBPACK_IMPORTED_MODULE_11__util__["a" /* getKeyFromChildrenIndex */])(c, eventKey, i)) {
+ found = true;
}
-
- target.addEventListener(eventType, wrapCallback, option || false);
-
- return {
- v: {
- remove: function remove() {
- target.removeEventListener(eventType, wrapCallback, useCapture);
- }
- }
- };
- })();
-
- if (typeof _ret === 'object') return _ret.v;
- } else if (target.attachEvent) {
- target.attachEvent('on' + eventType, wrapCallback);
- return {
- remove: function remove() {
- target.detachEvent('on' + eventType, wrapCallback);
+ });
+ if (found) {
+ return activeKey;
+ }
+ }
+ activeKey = null;
+ if (props.defaultActiveFirst) {
+ Object(__WEBPACK_IMPORTED_MODULE_11__util__["e" /* loopMenuItem */])(children, function (c, i) {
+ if (!activeKey && c && !c.props.disabled) {
+ activeKey = Object(__WEBPACK_IMPORTED_MODULE_11__util__["a" /* getKeyFromChildrenIndex */])(c, eventKey, i);
}
- };
+ });
+ return activeKey;
+ }
+ return activeKey;
+ }
+
+ function saveRef(c) {
+ if (c) {
+ var index = this.instanceArray.indexOf(c);
+ if (index !== -1) {
+ // update component if it's already inside instanceArray
+ this.instanceArray[index] = c;
+ } else {
+ // add component if it's not in instanceArray yet;
+ this.instanceArray.push(c);
+ }
}
}
- module.exports = exports['default'];
+ var SubPopupMenu = function (_React$Component) {
+ __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default()(SubPopupMenu, _React$Component);
+
+ function SubPopupMenu(props) {
+ var _extends3;
+
+ __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default()(this, SubPopupMenu);
+
+ var _this = __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.call(this, props));
+
+ _initialiseProps.call(_this);
+
+ props.store.setState({
+ activeKey: __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default()({}, props.store.getState().activeKey, (_extends3 = {}, _extends3[props.eventKey] = getActiveKey(props, props.activeKey), _extends3))
+ });
+
+ _this.instanceArray = [];
+ return _this;
+ }
+
+ SubPopupMenu.prototype.componentDidMount = function componentDidMount() {
+ // invoke customized ref to expose component to mixin
+ if (this.props.manualRef) {
+ this.props.manualRef(this);
+ }
+ };
+
+ SubPopupMenu.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {
+ return this.props.visible || nextProps.visible;
+ };
+
+ SubPopupMenu.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
+ var props = this.props;
+ var originalActiveKey = 'activeKey' in props ? props.activeKey : props.store.getState().activeKey[getEventKey(props)];
+ var activeKey = getActiveKey(props, originalActiveKey);
+ if (activeKey !== originalActiveKey) {
+ updateActiveKey(props.store, getEventKey(props), activeKey);
+ } else if ('activeKey' in prevProps) {
+ // If prev activeKey is not same as current activeKey,
+ // we should set it.
+ var prevActiveKey = getActiveKey(prevProps, prevProps.activeKey);
+ if (activeKey !== prevActiveKey) {
+ updateActiveKey(props.store, getEventKey(props), activeKey);
+ }
+ }
+ };
+
+ // all keyboard events callbacks run from here at first
+
+
+ SubPopupMenu.prototype.render = function render() {
+ var _this2 = this;
+
+ var props = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties___default()(this.props, []);
+
+ this.instanceArray = [];
+ var className = __WEBPACK_IMPORTED_MODULE_10_classnames___default()(props.prefixCls, props.className, props.prefixCls + '-' + props.mode);
+ var domProps = {
+ className: className,
+ // role could be 'select' and by default set to menu
+ role: props.role || 'menu'
+ };
+ if (props.id) {
+ domProps.id = props.id;
+ }
+ if (props.focusable) {
+ domProps.tabIndex = '0';
+ domProps.onKeyDown = this.onKeyDown;
+ }
+ var prefixCls = props.prefixCls,
+ eventKey = props.eventKey,
+ visible = props.visible,
+ level = props.level,
+ mode = props.mode,
+ overflowedIndicator = props.overflowedIndicator,
+ theme = props.theme;
+
+ __WEBPACK_IMPORTED_MODULE_11__util__["g" /* menuAllProps */].forEach(function (key) {
+ return delete props[key];
+ });
+
+ // Otherwise, the propagated click event will trigger another onClick
+ delete props.onClick;
+
+ return (
+ // ESLint is not smart enough to know that the type of `children` was checked.
+ /* eslint-disable */
+ __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(
+ __WEBPACK_IMPORTED_MODULE_12__DOMWrap__["a" /* default */],
+ __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default()({}, props, {
+ prefixCls: prefixCls,
+ mode: mode,
+ tag: 'ul',
+ level: level,
+ theme: theme,
+ hiddenClassName: prefixCls + '-hidden',
+ visible: visible,
+ overflowedIndicator: overflowedIndicator
+ }, domProps),
+ __WEBPACK_IMPORTED_MODULE_5_react___default.a.Children.map(props.children, function (c, i) {
+ return _this2.renderMenuItem(c, i, eventKey || '0-menu-');
+ })
+ )
+ /*eslint-enable */
+
+ );
+ };
+
+ return SubPopupMenu;
+ }(__WEBPACK_IMPORTED_MODULE_5_react___default.a.Component);
+ SubPopupMenu.propTypes = {
+ onSelect: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
+ onClick: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
+ onDeselect: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
+ onOpenChange: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
+ onDestroy: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
+ openTransitionName: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
+ openAnimation: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.object]),
+ openKeys: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string),
+ visible: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
+ children: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
+ parentMenu: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.object,
+ eventKey: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
+ store: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.shape({
+ getState: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
+ setState: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func
+ }),
+
+ // adding in refactor
+ focusable: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
+ multiple: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
+ style: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.object,
+ defaultActiveFirst: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
+ activeKey: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
+ selectedKeys: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string),
+ defaultSelectedKeys: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string),
+ defaultOpenKeys: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string),
+ level: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number,
+ mode: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf(['horizontal', 'vertical', 'vertical-left', 'vertical-right', 'inline']),
+ triggerSubMenuAction: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf(['click', 'hover']),
+ inlineIndent: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string]),
+ manualRef: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
+ itemIcon: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.node]),
+ expandIcon: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.node])
+ };
+ SubPopupMenu.defaultProps = {
+ prefixCls: 'rc-menu',
+ className: '',
+ mode: 'vertical',
+ level: 1,
+ inlineIndent: 24,
+ visible: true,
+ focusable: true,
+ style: {},
+ manualRef: __WEBPACK_IMPORTED_MODULE_11__util__["h" /* noop */]
+ };
+
+ var _initialiseProps = function _initialiseProps() {
+ var _this3 = this;
+
+ this.onKeyDown = function (e, callback) {
+ var keyCode = e.keyCode;
+ var handled = void 0;
+ _this3.getFlatInstanceArray().forEach(function (obj) {
+ if (obj && obj.props.active && obj.onKeyDown) {
+ handled = obj.onKeyDown(e);
+ }
+ });
+ if (handled) {
+ return 1;
+ }
+ var activeItem = null;
+ if (keyCode === __WEBPACK_IMPORTED_MODULE_8_rc_util_es_KeyCode__["a" /* default */].UP || keyCode === __WEBPACK_IMPORTED_MODULE_8_rc_util_es_KeyCode__["a" /* default */].DOWN) {
+ activeItem = _this3.step(keyCode === __WEBPACK_IMPORTED_MODULE_8_rc_util_es_KeyCode__["a" /* default */].UP ? -1 : 1);
+ }
+ if (activeItem) {
+ e.preventDefault();
+ updateActiveKey(_this3.props.store, getEventKey(_this3.props), activeItem.props.eventKey);
+
+ if (typeof callback === 'function') {
+ callback(activeItem);
+ }
+
+ return 1;
+ }
+ };
+
+ this.onItemHover = function (e) {
+ var key = e.key,
+ hover = e.hover;
+
+ updateActiveKey(_this3.props.store, getEventKey(_this3.props), hover ? key : null);
+ };
+
+ this.onDeselect = function (selectInfo) {
+ _this3.props.onDeselect(selectInfo);
+ };
+
+ this.onSelect = function (selectInfo) {
+ _this3.props.onSelect(selectInfo);
+ };
+
+ this.onClick = function (e) {
+ _this3.props.onClick(e);
+ };
+
+ this.onOpenChange = function (e) {
+ _this3.props.onOpenChange(e);
+ };
+
+ this.onDestroy = function (key) {
+ /* istanbul ignore next */
+ _this3.props.onDestroy(key);
+ };
+
+ this.getFlatInstanceArray = function () {
+ return _this3.instanceArray;
+ };
+
+ this.getOpenTransitionName = function () {
+ return _this3.props.openTransitionName;
+ };
+
+ this.step = function (direction) {
+ var children = _this3.getFlatInstanceArray();
+ var activeKey = _this3.props.store.getState().activeKey[getEventKey(_this3.props)];
+ var len = children.length;
+ if (!len) {
+ return null;
+ }
+ if (direction < 0) {
+ children = children.concat().reverse();
+ }
+ // find current activeIndex
+ var activeIndex = -1;
+ children.every(function (c, ci) {
+ if (c && c.props.eventKey === activeKey) {
+ activeIndex = ci;
+ return false;
+ }
+ return true;
+ });
+ if (!_this3.props.defaultActiveFirst && activeIndex !== -1 && allDisabled(children.slice(activeIndex, len - 1))) {
+ return undefined;
+ }
+ var start = (activeIndex + 1) % len;
+ var i = start;
+
+ do {
+ var child = children[i];
+ if (!child || child.props.disabled) {
+ i = (i + 1) % len;
+ } else {
+ return child;
+ }
+ } while (i !== start);
+
+ return null;
+ };
+
+ this.renderCommonMenuItem = function (child, i, extraProps) {
+ var state = _this3.props.store.getState();
+ var props = _this3.props;
+ var key = Object(__WEBPACK_IMPORTED_MODULE_11__util__["a" /* getKeyFromChildrenIndex */])(child, props.eventKey, i);
+ var childProps = child.props;
+ var isActive = key === state.activeKey;
+ var newChildProps = __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default()({
+ mode: childProps.mode || props.mode,
+ level: props.level,
+ inlineIndent: props.inlineIndent,
+ renderMenuItem: _this3.renderMenuItem,
+ rootPrefixCls: props.prefixCls,
+ index: i,
+ parentMenu: props.parentMenu,
+ // customized ref function, need to be invoked manually in child's componentDidMount
+ manualRef: childProps.disabled ? undefined : Object(__WEBPACK_IMPORTED_MODULE_9_rc_util_es_createChainedFunction__["a" /* default */])(child.ref, saveRef.bind(_this3)),
+ eventKey: key,
+ active: !childProps.disabled && isActive,
+ multiple: props.multiple,
+ onClick: function onClick(e) {
+ (childProps.onClick || __WEBPACK_IMPORTED_MODULE_11__util__["h" /* noop */])(e);
+ _this3.onClick(e);
+ },
+ onItemHover: _this3.onItemHover,
+ openTransitionName: _this3.getOpenTransitionName(),
+ openAnimation: props.openAnimation,
+ subMenuOpenDelay: props.subMenuOpenDelay,
+ subMenuCloseDelay: props.subMenuCloseDelay,
+ forceSubMenuRender: props.forceSubMenuRender,
+ onOpenChange: _this3.onOpenChange,
+ onDeselect: _this3.onDeselect,
+ onSelect: _this3.onSelect,
+ builtinPlacements: props.builtinPlacements,
+ itemIcon: childProps.itemIcon || _this3.props.itemIcon,
+ expandIcon: childProps.expandIcon || _this3.props.expandIcon
+ }, extraProps);
+ // ref: https://github.com/ant-design/ant-design/issues/13943
+ if (props.mode === 'inline' || Object(__WEBPACK_IMPORTED_MODULE_11__util__["d" /* isMobileDevice */])()) {
+ newChildProps.triggerSubMenuAction = 'click';
+ }
+ return __WEBPACK_IMPORTED_MODULE_5_react___default.a.cloneElement(child, newChildProps);
+ };
+
+ this.renderMenuItem = function (c, i, subMenuKey) {
+ /* istanbul ignore if */
+ if (!c) {
+ return null;
+ }
+ var state = _this3.props.store.getState();
+ var extraProps = {
+ openKeys: state.openKeys,
+ selectedKeys: state.selectedKeys,
+ triggerSubMenuAction: _this3.props.triggerSubMenuAction,
+ subMenuKey: subMenuKey
+ };
+ return _this3.renderCommonMenuItem(c, i, extraProps);
+ };
+ };
+
+ var connected = Object(__WEBPACK_IMPORTED_MODULE_7_mini_store__["connect"])()(SubPopupMenu);
+
+ /* harmony default export */ __webpack_exports__["a"] = (connected);
/***/ }),
- /* 120 */
+ /* 169 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -93702,14322 +84096,10 @@
/* harmony default export */ __webpack_exports__["default"] = (index);
- /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(24)))
-
- /***/ }),
- /* 121 */
- /***/ (function(module, exports) {
-
- // mutationobserver-shim v0.3.2 (github.com/megawac/MutationObserver.js)
- // Authors: Graeme Yeates (github.com/megawac)
- window.MutationObserver=window.MutationObserver||function(w){function v(a){this.i=[];this.m=a}function I(a){(function c(){var d=a.takeRecords();d.length&&a.m(d,a);a.h=setTimeout(c,v._period)})()}function p(a){var b={type:null,target:null,addedNodes:[],removedNodes:[],previousSibling:null,nextSibling:null,attributeName:null,attributeNamespace:null,oldValue:null},c;for(c in a)b[c]!==w&&a[c]!==w&&(b[c]=a[c]);return b}function J(a,b){var c=C(a,b);return function(d){var f=d.length,n;b.a&&3===a.nodeType&&
- a.nodeValue!==c.a&&d.push(new p({type:"characterData",target:a,oldValue:c.a}));b.b&&c.b&&A(d,a,c.b,b.f);if(b.c||b.g)n=K(d,a,c,b);if(n||d.length!==f)c=C(a,b)}}function L(a,b){return b.value}function M(a,b){return"style"!==b.name?b.value:a.style.cssText}function A(a,b,c,d){for(var f={},n=b.attributes,k,g,x=n.length;x--;)k=n[x],g=k.name,d&&d[g]===w||(D(b,k)!==c[g]&&a.push(p({type:"attributes",target:b,attributeName:g,oldValue:c[g],attributeNamespace:k.namespaceURI})),f[g]=!0);for(g in c)f[g]||a.push(p({target:b,
- type:"attributes",attributeName:g,oldValue:c[g]}))}function K(a,b,c,d){function f(b,c,f,k,y){var g=b.length-1;y=-~((g-y)/2);for(var h,l,e;e=b.pop();)h=f[e.j],l=k[e.l],d.c&&y&&Math.abs(e.j-e.l)>=g&&(a.push(p({type:"childList",target:c,addedNodes:[h],removedNodes:[h],nextSibling:h.nextSibling,previousSibling:h.previousSibling})),y--),d.b&&l.b&&A(a,h,l.b,d.f),d.a&&3===h.nodeType&&h.nodeValue!==l.a&&a.push(p({type:"characterData",target:h,oldValue:l.a})),d.g&&n(h,l)}function n(b,c){for(var g=b.childNodes,
- q=c.c,x=g.length,v=q?q.length:0,h,l,e,m,t,z=0,u=0,r=0;u 0) {
- return true;
- }
- }
- return false;
- }
-
- function splitBySeparators(string, separators) {
- var reg = new RegExp('[' + separators.join() + ']');
- return string.split(reg).filter(function (token) {
- return token;
- });
- }
-
- function defaultFilterFn(input, child) {
- if (child.props.disabled) {
- return false;
- }
- var value = toArray(getPropValue(child, this.props.optionFilterProp)).join('');
- return value.toLowerCase().indexOf(input.toLowerCase()) > -1;
- }
-
- function validateOptionValue(value, props) {
- if (isSingleMode(props) || isMultiple(props)) {
- return;
- }
- if (typeof value !== 'string') {
- throw new Error('Invalid `value` of type `' + (typeof value === 'undefined' ? 'undefined' : _typeof(value)) + '` supplied to Option, ' + 'expected `string` when `tags/combobox` is `true`.');
- }
- }
-
- function saveRef(instance, name) {
- return function (node) {
- instance[name] = node;
- };
- }
-
- /***/ }),
- /* 124 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- module.exports = __webpack_require__(653);
-
- /***/ }),
- /* 125 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
- var _contains = __webpack_require__(51);
-
- var _contains2 = _interopRequireDefault(_contains);
-
- var _react = __webpack_require__(0);
-
- var _react2 = _interopRequireDefault(_react);
-
- var _propTypes = __webpack_require__(1);
-
- var _propTypes2 = _interopRequireDefault(_propTypes);
-
- var _reactDom = __webpack_require__(4);
-
- var _reactDom2 = _interopRequireDefault(_reactDom);
-
- var _warning = __webpack_require__(18);
-
- var _warning2 = _interopRequireDefault(_warning);
-
- var _Portal = __webpack_require__(52);
-
- var _Portal2 = _interopRequireDefault(_Portal);
-
- var _Overlay = __webpack_require__(127);
-
- var _Overlay2 = _interopRequireDefault(_Overlay);
-
- var _createChainedFunction = __webpack_require__(704);
-
- var _createChainedFunction2 = _interopRequireDefault(_createChainedFunction);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
-
- function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
-
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
-
- var isReact16 = _reactDom2["default"].createPortal !== undefined;
- var createPortal = isReact16 ? _reactDom2["default"].createPortal : _reactDom2["default"].unstable_renderSubtreeIntoContainer;
-
- /**
- * 检查值是属于这个值,还是等于这个值
- *
- * @param {string} one
- * @param {string|array} of
- * @returns {boolean}
- */
- function isOneOf(one, of) {
- if (Array.isArray(of)) {
- return of.indexOf(one) >= 0;
- }
- return one === of;
- }
-
- var triggerType = _propTypes2["default"].oneOf(['click', 'hover', 'focus']);
-
- var propTypes = _extends({}, _Portal2["default"].propTypes, _Overlay2["default"].propTypes, {
-
- /**
- * 指定哪些操作或操作触发叠加层可见性
- */
- trigger: _propTypes2["default"].oneOfType([triggerType, _propTypes2["default"].arrayOf(triggerType)]),
-
- /**
- * 显示和隐藏覆盖一旦触发的毫秒延迟量
- */
- delay: _propTypes2["default"].number,
- /**
- * 触发后显示叠加层之前的延迟毫秒
- */
- delayShow: _propTypes2["default"].number,
- /**
- * 触发后隐藏叠加层的延迟毫秒
- */
- delayHide: _propTypes2["default"].number,
-
- // FIXME: This should be `defaultShow`.
- /**
- * 覆盖的初始可见性状态。对于更细微的可见性控制,请考虑直接使用覆盖组件。
- */
- defaultOverlayShown: _propTypes2["default"].bool,
- visible: _propTypes2["default"].bool,
-
- /**
- * 要覆盖在目标旁边的元素或文本。
- */
- overlay: _propTypes2["default"].node.isRequired,
-
- /**
- * @private
- */
- onBlur: _propTypes2["default"].func,
- /**
- * @private
- */
- onClick: _propTypes2["default"].func,
- /**
- * @private
- */
- onFocus: _propTypes2["default"].func,
- /**
- * @private
- */
- onMouseOut: _propTypes2["default"].func,
- /**
- * @private
- */
- onMouseOver: _propTypes2["default"].func,
-
- // Overridden props from ``.
- /**
- * @private
- */
- target: _propTypes2["default"].oneOf([null]),
- /**
- * @private
- */
- onHide: _propTypes2["default"].oneOf([null]),
- /**
- * @private
- */
- show: _propTypes2["default"].oneOf([null])
- });
-
- var defaultProps = {
- defaultOverlayShown: false,
- trigger: ['hover', 'focus']
- };
-
- var OverlayTrigger = function (_Component) {
- _inherits(OverlayTrigger, _Component);
-
- function OverlayTrigger(props, context) {
- _classCallCheck(this, OverlayTrigger);
-
- var _this = _possibleConstructorReturn(this, _Component.call(this, props, context));
-
- _this.handleToggle = _this.handleToggle.bind(_this);
- _this.handleDelayedShow = _this.handleDelayedShow.bind(_this);
- _this.handleDelayedHide = _this.handleDelayedHide.bind(_this);
- _this.handleHide = _this.handleHide.bind(_this);
- _this.makeOverlay = _this.makeOverlay.bind(_this);
-
- _this.handleMouseOver = function (e) {
- return _this.handleMouseOverOut(_this.handleDelayedShow, e);
- };
- _this.handleMouseOut = function (e) {
- return _this.handleMouseOverOut(_this.handleDelayedHide, e);
- };
-
- _this._mountNode = null;
-
- var visible = void 0;
- if ('visible' in props) {
- visible = !!props.visible;
- } else {
- visible = !!props.defaultOverlayShown;
- }
-
- _this.state = {
- show: visible
- };
- return _this;
- }
-
- OverlayTrigger.prototype.componentDidMount = function componentDidMount() {
- this._mountNode = document.createElement('div');
- !isReact16 && this.renderOverlay();
- };
-
- OverlayTrigger.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
- !isReact16 && this.renderOverlay();
- if ('visible' in this.props && prevProps.visible !== this.props.visible) {
- this.setState({
- show: this.props.visible
- });
- }
- if ('isHoverShow' in this.props && prevProps.isHoverShow !== this.props.isHoverShow) {
- this.setState({
- show: this.props.isHoverShow
- });
- }
- };
-
- OverlayTrigger.prototype.componentWillUnmount = function componentWillUnmount() {
- !isReact16 && _reactDom2["default"].unmountComponentAtNode(this._mountNode);
- this._mountNode = null;
- // 加判断去掉 clearTimeout
- this._hoverShowDelay && clearTimeout(this._hoverShowDelay);
- this._hoverShowDelay && clearTimeout(this._hoverHideDelay);
- };
-
- OverlayTrigger.prototype.handleToggle = function handleToggle() {
- if (this.state.show) {
- this.hide();
- } else {
- this.show();
- }
- };
-
- OverlayTrigger.prototype.handleDelayedShow = function handleDelayedShow() {
- var _this2 = this;
-
- if (this._hoverHideDelay != null) {
- clearTimeout(this._hoverHideDelay);
- this._hoverHideDelay = null;
- return;
- }
-
- if (this.state.show || this._hoverShowDelay != null) {
- return;
- }
-
- var delay = this.props.delayShow != null ? this.props.delayShow : this.props.delay;
-
- if (!delay) {
- this.show();
- return;
- }
-
- this._hoverShowDelay = setTimeout(function () {
- _this2._hoverShowDelay = null;
- _this2.show();
- }, delay);
- };
-
- OverlayTrigger.prototype.handleDelayedHide = function handleDelayedHide() {
- var _this3 = this;
-
- if (this._hoverShowDelay != null) {
- clearTimeout(this._hoverShowDelay);
- this._hoverShowDelay = null;
- return;
- }
-
- if (!this.state.show || this._hoverHideDelay != null) {
- return;
- }
-
- var delay = this.props.delayHide != null ? this.props.delayHide : this.props.delay;
-
- if (!delay) {
- this.hide();
- return;
- }
-
- this._hoverHideDelay = setTimeout(function () {
- _this3._hoverHideDelay = null;
- _this3.hide();
- }, delay);
- };
-
- // 简单实现mouseEnter和mouseLeave。
- // React的内置版本是有问题的:https://github.com/facebook/react/issues/4251
- //在触发器被禁用的情况下,mouseOut / Over可能导致闪烁
- //从一个子元素移动到另一个子元素。
-
-
- OverlayTrigger.prototype.handleMouseOverOut = function handleMouseOverOut(handler, e) {
- var target = e.currentTarget;
- var related = e.relatedTarget || e.nativeEvent.toElement;
-
- if (!related || related !== target && !(0, _contains2["default"])(target, related)) {
- handler(e);
- }
- };
-
- OverlayTrigger.prototype.handleHide = function handleHide() {
- this.hide();
- };
-
- OverlayTrigger.prototype.show = function show() {
- this.setState({ show: true });
- };
-
- OverlayTrigger.prototype.hide = function hide() {
- this.setState({ show: false });
- };
-
- OverlayTrigger.prototype.makeOverlay = function makeOverlay(overlay, props) {
- return _react2["default"].createElement(
- _Overlay2["default"],
- _extends({}, props, {
- show: this.state.show,
- onHide: this.handleHide,
- target: this
- }),
- overlay
- );
- };
-
- OverlayTrigger.prototype.renderOverlay = function renderOverlay() {
- _reactDom2["default"].unstable_renderSubtreeIntoContainer(this, this._overlay, this._mountNode);
- };
-
- OverlayTrigger.prototype.render = function render() {
- var _props = this.props,
- trigger = _props.trigger,
- overlay = _props.overlay,
- children = _props.children,
- onBlur = _props.onBlur,
- onClick = _props.onClick,
- onFocus = _props.onFocus,
- onMouseOut = _props.onMouseOut,
- onMouseOver = _props.onMouseOver,
- props = _objectWithoutProperties(_props, ['trigger', 'overlay', 'children', 'onBlur', 'onClick', 'onFocus', 'onMouseOut', 'onMouseOver']);
-
- delete props.delay;
- delete props.delayShow;
- delete props.delayHide;
- delete props.defaultOverlayShown;
-
- var child = _react2["default"].Children.only(children);
- var childProps = child.props;
-
- var triggerProps = {
- 'aria-describedby': overlay.props.id
- };
-
- // FIXME: 这里用于传递这个组件上的处理程序的逻辑是不一致的。我们不应该通过任何这些道具。
-
- triggerProps.onClick = (0, _createChainedFunction2["default"])(childProps.onClick, onClick);
-
- if (isOneOf('click', trigger) && !('visible' in this.props)) {
- triggerProps.onClick = (0, _createChainedFunction2["default"])(triggerProps.onClick, this.handleToggle);
- }
-
- if (isOneOf('hover', trigger) && !('visible' in this.props)) {
- (0, _warning2["default"])(!(trigger === 'hover'), '[react-bootstrap] Specifying only the `"hover"` trigger limits the ' + 'visibility of the overlay to just mouse users. Consider also ' + 'including the `"focus"` trigger so that touch and keyboard only ' + 'users can see the overlay as well.');
-
- triggerProps.onMouseOver = (0, _createChainedFunction2["default"])(childProps.onMouseOver, onMouseOver, this.handleMouseOver);
- triggerProps.onMouseOut = (0, _createChainedFunction2["default"])(childProps.onMouseOut, onMouseOut, this.handleMouseOut);
- }
-
- if (isOneOf('focus', trigger) && !('visible' in this.props)) {
- triggerProps.onFocus = (0, _createChainedFunction2["default"])(childProps.onFocus, onFocus, this.handleDelayedShow);
- triggerProps.onBlur = (0, _createChainedFunction2["default"])(childProps.onBlur, onBlur, this.handleDelayedHide);
- }
-
- this._overlay = this.makeOverlay(overlay, props);
-
- if (!isReact16) {
- return (0, _react.cloneElement)(child, triggerProps);
- }
- triggerProps.key = 'overlay';
-
- var portal = _react2["default"].createElement(
- _Portal2["default"],
- {
- key: 'portal',
- container: props.container },
- this._overlay
- );
-
- return [(0, _react.cloneElement)(child, triggerProps), portal];
- };
-
- return OverlayTrigger;
- }(_react.Component);
-
- OverlayTrigger.propTypes = propTypes;
- OverlayTrigger.defaultProps = defaultProps;
-
- exports["default"] = OverlayTrigger;
- module.exports = exports['default'];
-
- /***/ }),
- /* 126 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports["default"] = getContainer;
-
- var _reactDom = __webpack_require__(4);
-
- var _reactDom2 = _interopRequireDefault(_reactDom);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- /**
- * 获取容器组件
- * @param {[type]} container [description]
- * @param {[type]} defaultContainer [description]
- * @return {[type]} [description]
- */
- function getContainer(container, defaultContainer) {
- container = typeof container === 'function' ? container() : container;
- return _reactDom2["default"].findDOMNode(container) || defaultContainer;
- }
- module.exports = exports['default'];
-
- /***/ }),
- /* 127 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
- var _classnames = __webpack_require__(2);
-
- var _classnames2 = _interopRequireDefault(_classnames);
-
- var _react = __webpack_require__(0);
-
- var _react2 = _interopRequireDefault(_react);
-
- var _propTypes = __webpack_require__(1);
-
- var _propTypes2 = _interopRequireDefault(_propTypes);
-
- var _BaseOverlay = __webpack_require__(684);
-
- var _BaseOverlay2 = _interopRequireDefault(_BaseOverlay);
-
- var _tinperBeeCore = __webpack_require__(5);
-
- var _Fade = __webpack_require__(702);
-
- var _Fade2 = _interopRequireDefault(_Fade);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
-
- function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
-
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
-
- var propTypes = _extends({}, _BaseOverlay2["default"].propTypes, {
-
- /**
- * 是否显示
- */
- show: _propTypes2["default"].bool,
- /**
- * 是
- */
- rootClose: _propTypes2["default"].bool,
- /**
- * 当点击rootClose触发close时的回调函数
- */
- onHide: _propTypes2["default"].func,
-
- /**
- * 使用动画
- */
- animation: _propTypes2["default"].oneOfType([_tinperBeeCore.elementType, _propTypes2["default"].func]),
-
- /**
- * Callback fired before the Overlay transitions in
- */
- onEnter: _propTypes2["default"].func,
-
- /**
- * Callback fired as the Overlay begins to transition in
- */
- onEntering: _propTypes2["default"].func,
-
- /**
- * Callback fired after the Overlay finishes transitioning in
- */
- onEntered: _propTypes2["default"].func,
-
- /**
- * Callback fired right before the Overlay transitions out
- */
- onExit: _propTypes2["default"].func,
-
- /**
- * Callback fired as the Overlay begins to transition out
- */
- onExiting: _propTypes2["default"].func,
-
- /**
- * Callback fired after the Overlay finishes transitioning out
- */
- onExited: _propTypes2["default"].func,
-
- /**
- * Sets the direction of the Overlay.
- */
- placement: _propTypes2["default"].oneOf(['top', 'right', 'bottom', 'left']),
-
- /**
- * 当Overlay在placement方向放不下时的第二优先级方向
- */
- secondPlacement: _propTypes2["default"].oneOf(['top', 'right', 'bottom', 'left'])
- });
-
- var defaultProps = {
- animation: _Fade2["default"],
- rootClose: false,
- show: false,
- placement: 'right'
- };
-
- var Overlay = function (_Component) {
- _inherits(Overlay, _Component);
-
- function Overlay() {
- _classCallCheck(this, Overlay);
-
- return _possibleConstructorReturn(this, _Component.apply(this, arguments));
- }
-
- Overlay.prototype.render = function render() {
- var _props = this.props,
- animation = _props.animation,
- children = _props.children,
- props = _objectWithoutProperties(_props, ['animation', 'children']);
-
- var transition = animation === true ? _Fade2["default"] : animation || null;
-
- var child = void 0;
-
- if (!transition) {
- child = (0, _react.cloneElement)(children, {
- className: (0, _classnames2["default"])(children.props.className, 'in')
- });
- } else {
- child = children;
- }
-
- return _react2["default"].createElement(
- _BaseOverlay2["default"],
- _extends({}, props, {
- transition: transition
- }),
- child
- );
- };
-
- return Overlay;
- }(_react.Component);
-
- Overlay.propTypes = propTypes;
- Overlay.defaultProps = defaultProps;
-
- exports["default"] = Overlay;
- module.exports = exports['default'];
-
- /***/ }),
- /* 128 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.EXITING = exports.ENTERED = exports.ENTERING = exports.EXITED = exports.UNMOUNTED = undefined;
-
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
- var _react = __webpack_require__(0);
-
- var _react2 = _interopRequireDefault(_react);
-
- var _reactDom = __webpack_require__(4);
-
- var _reactDom2 = _interopRequireDefault(_reactDom);
-
- var _properties = __webpack_require__(69);
-
- var _properties2 = _interopRequireDefault(_properties);
-
- var _on = __webpack_require__(70);
-
- var _on2 = _interopRequireDefault(_on);
-
- var _classnames = __webpack_require__(55);
-
- var _classnames2 = _interopRequireDefault(_classnames);
-
- var _propTypes = __webpack_require__(1);
-
- var _propTypes2 = _interopRequireDefault(_propTypes);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
-
- function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
-
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
-
- var transitionEndEvent = _properties2["default"].end;
-
- //设置状态码
- var UNMOUNTED = exports.UNMOUNTED = 0;
- var EXITED = exports.EXITED = 1;
- var ENTERING = exports.ENTERING = 2;
- var ENTERED = exports.ENTERED = 3;
- var EXITING = exports.EXITING = 4;
-
- var propTypes = {
- /**
- * 是否触发动画
- */
- "in": _propTypes2["default"].bool,
-
- /**
- * 不显示的时候是否移除组件
- */
- unmountOnExit: _propTypes2["default"].bool,
-
- /**
- * 如果设置为默认显示,挂载时显示动画
- */
- transitionAppear: _propTypes2["default"].bool,
-
- /**
- * 设置超时时间,防止出现问题,可设置为>=动画时间
- */
- timeout: _propTypes2["default"].number,
-
- /**
- * 退出组件时添加的class
- */
- exitedClassName: _propTypes2["default"].string,
- /**
- * 退出组件中添加的class
- */
- exitingClassName: _propTypes2["default"].string,
- /**
- * 进入动画后添加的class
- */
- enteredClassName: _propTypes2["default"].string,
- /**
- * 进入动画时添加的class
- */
- enteringClassName: _propTypes2["default"].string,
-
- /**
- * 进入动画开始时的钩子函数
- */
- onEnter: _propTypes2["default"].func,
- /**
- * 进入动画中的钩子函数
- */
- onEntering: _propTypes2["default"].func,
- /**
- * 进入动画后的钩子函数
- */
- onEntered: _propTypes2["default"].func,
- /**
- * 退出动画开始时的钩子函数
- */
- onExit: _propTypes2["default"].func,
- /**
- * 退出动画中的钩子函数
- */
- onExiting: _propTypes2["default"].func,
- /**
- * 退出动画后的钩子函数
- */
- onExited: _propTypes2["default"].func
- };
-
- function noop() {}
-
- var defaultProps = {
- "in": false,
- unmountOnExit: false,
- transitionAppear: false,
- timeout: 5000,
- onEnter: noop,
- onEntering: noop,
- onEntered: noop,
- onExit: noop,
- onExiting: noop,
- onExited: noop
- };
-
- /**
- * 动画组件
- */
-
- var Transition = function (_Component) {
- _inherits(Transition, _Component);
-
- function Transition(props, context) {
- _classCallCheck(this, Transition);
-
- var _this = _possibleConstructorReturn(this, _Component.call(this, props, context));
-
- var initialStatus = void 0;
- if (props["in"]) {
- // 在componentdidmount时开始执行动画
- initialStatus = props.transitionAppear ? EXITED : ENTERED;
- } else {
- initialStatus = props.unmountOnExit ? UNMOUNTED : EXITED;
- }
- _this.state = { status: initialStatus };
-
- _this.nextCallback = null;
- return _this;
- }
-
- Transition.prototype.componentDidMount = function componentDidMount() {
- if (this.props.transitionAppear && this.props["in"]) {
- this.performEnter(this.props);
- }
- };
-
- Transition.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
- if (nextProps["in"] && this.props.unmountOnExit) {
- if (this.state.status === UNMOUNTED) {
- // 在componentDidUpdate执行动画.
- this.setState({ status: EXITED });
- }
- } else {
- this._needsUpdate = true;
- }
- };
-
- Transition.prototype.componentDidUpdate = function componentDidUpdate() {
- var status = this.state.status;
-
- if (this.props.unmountOnExit && status === EXITED) {
- // 当使用unmountOnExit时,exited为exiting和unmont的过渡状态
- if (this.props["in"]) {
- this.performEnter(this.props);
- } else {
- this.setState({ status: UNMOUNTED });
- }
-
- return;
- }
-
- // 确保只响应prop变化
- if (this._needsUpdate) {
- this._needsUpdate = false;
-
- if (this.props["in"]) {
- if (status === EXITING) {
- this.performEnter(this.props);
- } else if (status === EXITED) {
- this.performEnter(this.props);
- }
- // 其他,当我们已经输入或输出
- } else {
- if (status === ENTERING || status === ENTERED) {
- this.performExit(this.props);
- }
- // 我们已经输入或输出完成
- }
- }
- };
-
- Transition.prototype.componentWillUnmount = function componentWillUnmount() {
- this.cancelNextCallback();
- };
-
- Transition.prototype.performEnter = function performEnter(props) {
- var _this2 = this;
-
- this.cancelNextCallback();
- var node = _reactDom2["default"].findDOMNode(this);
-
- // 这里接收新props
- props.onEnter(node);
-
- this.safeSetState({ status: ENTERING }, function () {
- _this2.props.onEntering(node);
-
- _this2.onTransitionEnd(node, function () {
- _this2.safeSetState({ status: ENTERED }, function () {
- _this2.props.onEntered(node);
- });
- });
- });
- };
-
- Transition.prototype.performExit = function performExit(props) {
- var _this3 = this;
-
- this.cancelNextCallback();
- var node = _reactDom2["default"].findDOMNode(this);
-
- props.onExit(node);
-
- this.safeSetState({ status: EXITING }, function () {
- _this3.props.onExiting(node);
-
- _this3.onTransitionEnd(node, function () {
- _this3.safeSetState({ status: EXITED }, function () {
- _this3.props.onExited(node);
- });
- });
- });
- };
-
- Transition.prototype.cancelNextCallback = function cancelNextCallback() {
- if (this.nextCallback !== null) {
- this.nextCallback.cancel();
- this.nextCallback = null;
- }
- };
-
- Transition.prototype.safeSetState = function safeSetState(nextState, callback) {
- // 确保在组件销毁后挂起的setState被消除
- this.setState(nextState, this.setNextCallback(callback));
- };
-
- Transition.prototype.setNextCallback = function setNextCallback(callback) {
- var _this4 = this;
-
- var active = true;
-
- this.nextCallback = function (event) {
- if (active) {
- active = false;
- _this4.nextCallback = null;
-
- callback(event);
- }
- };
-
- this.nextCallback.cancel = function () {
- active = false;
- };
-
- return this.nextCallback;
- };
-
- Transition.prototype.onTransitionEnd = function onTransitionEnd(node, handler) {
- this.setNextCallback(handler);
-
- if (node) {
- if (transitionEndEvent == undefined) {
- this.nextCallback();
- } else {
- (0, _on2["default"])(node, transitionEndEvent, this.nextCallback);
- }
- setTimeout(this.nextCallback, this.props.timeout);
- } else {
- setTimeout(this.nextCallback, 0);
- }
- };
-
- Transition.prototype.render = function render() {
- var status = this.state.status;
- if (status === UNMOUNTED) {
- return null;
- }
-
- var _props = this.props,
- children = _props.children,
- className = _props.className,
- childProps = _objectWithoutProperties(_props, ['children', 'className']);
-
- Object.keys(Transition.propTypes).forEach(function (key) {
- return delete childProps[key];
- });
-
- var transitionClassName = void 0;
- if (status === EXITED) {
- transitionClassName = this.props.exitedClassName;
- } else if (status === ENTERING) {
- transitionClassName = this.props.enteringClassName;
- } else if (status === ENTERED) {
- transitionClassName = this.props.enteredClassName;
- } else if (status === EXITING) {
- transitionClassName = this.props.exitingClassName;
- }
-
- var child = _react2["default"].Children.only(children);
- return _react2["default"].cloneElement(child, _extends({}, childProps, {
- className: (0, _classnames2["default"])(child.props.className, className, transitionClassName)
- }));
- };
-
- return Transition;
- }(_react.Component);
-
- Transition.propTypes = propTypes;
-
- Transition.defaultProps = defaultProps;
-
- exports["default"] = Transition;
-
- /***/ }),
- /* 129 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.EXITING = exports.ENTERED = exports.ENTERING = exports.EXITED = exports.UNMOUNTED = undefined;
-
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
- var _react = __webpack_require__(0);
-
- var _react2 = _interopRequireDefault(_react);
-
- var _reactDom = __webpack_require__(4);
-
- var _reactDom2 = _interopRequireDefault(_reactDom);
-
- var _properties = __webpack_require__(69);
-
- var _properties2 = _interopRequireDefault(_properties);
-
- var _on = __webpack_require__(70);
-
- var _on2 = _interopRequireDefault(_on);
-
- var _classnames = __webpack_require__(2);
-
- var _classnames2 = _interopRequireDefault(_classnames);
-
- var _propTypes = __webpack_require__(1);
-
- var _propTypes2 = _interopRequireDefault(_propTypes);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
-
- function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
-
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
-
- var transitionEndEvent = _properties2["default"].end;
-
- //设置状态码
- var UNMOUNTED = exports.UNMOUNTED = 0;
- var EXITED = exports.EXITED = 1;
- var ENTERING = exports.ENTERING = 2;
- var ENTERED = exports.ENTERED = 3;
- var EXITING = exports.EXITING = 4;
-
- var propTypes = {
- /**
- * 是否触发动画
- */
- "in": _propTypes2["default"].bool,
-
- /**
- * 不显示的时候是否移除组件
- */
- unmountOnExit: _propTypes2["default"].bool,
-
- /**
- * 如果设置为默认显示,挂载时显示动画
- */
- transitionAppear: _propTypes2["default"].bool,
-
- /**
- * 设置超时时间,防止出现问题,可设置为>=动画时间
- */
- timeout: _propTypes2["default"].number,
-
- /**
- * 退出组件时添加的class
- */
- exitedClassName: _propTypes2["default"].string,
- /**
- * 退出组件中添加的class
- */
- exitingClassName: _propTypes2["default"].string,
- /**
- * 进入动画后添加的class
- */
- enteredClassName: _propTypes2["default"].string,
- /**
- * 进入动画时添加的class
- */
- enteringClassName: _propTypes2["default"].string,
-
- /**
- * 进入动画开始时的钩子函数
- */
- onEnter: _propTypes2["default"].func,
- /**
- * 进入动画中的钩子函数
- */
- onEntering: _propTypes2["default"].func,
- /**
- * 进入动画后的钩子函数
- */
- onEntered: _propTypes2["default"].func,
- /**
- * 退出动画开始时的钩子函数
- */
- onExit: _propTypes2["default"].func,
- /**
- * 退出动画中的钩子函数
- */
- onExiting: _propTypes2["default"].func,
- /**
- * 退出动画后的钩子函数
- */
- onExited: _propTypes2["default"].func
- };
-
- function noop() {}
-
- var defaultProps = {
- "in": false,
- unmountOnExit: false,
- transitionAppear: false,
- timeout: 5000,
- onEnter: noop,
- onEntering: noop,
- onEntered: noop,
- onExit: noop,
- onExiting: noop,
- onExited: noop
- };
-
- /**
- * 动画组件
- */
-
- var Transition = function (_Component) {
- _inherits(Transition, _Component);
-
- function Transition(props, context) {
- _classCallCheck(this, Transition);
-
- var _this = _possibleConstructorReturn(this, _Component.call(this, props, context));
-
- var initialStatus = void 0;
- if (props["in"]) {
- // 在componentdidmount时开始执行动画
- initialStatus = props.transitionAppear ? EXITED : ENTERED;
- } else {
- initialStatus = props.unmountOnExit ? UNMOUNTED : EXITED;
- }
- _this.state = { status: initialStatus };
-
- _this.nextCallback = null;
- return _this;
- }
-
- Transition.prototype.componentDidMount = function componentDidMount() {
- if (this.props.transitionAppear && this.props["in"]) {
- this.performEnter(this.props);
- }
- };
-
- Transition.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
- if (nextProps["in"] && this.props.unmountOnExit) {
- if (this.state.status === UNMOUNTED) {
- // 在componentDidUpdate执行动画.
- this.setState({ status: EXITED });
- }
- } else {
- this._needsUpdate = true;
- }
- };
-
- Transition.prototype.componentDidUpdate = function componentDidUpdate() {
- var status = this.state.status;
-
- if (this.props.unmountOnExit && status === EXITED) {
- // 当使用unmountOnExit时,exited为exiting和unmont的过渡状态
- if (this.props["in"]) {
- this.performEnter(this.props);
- } else {
- this.setState({ status: UNMOUNTED });
- }
-
- return;
- }
-
- // 确保只响应prop变化
- if (this._needsUpdate) {
- this._needsUpdate = false;
-
- if (this.props["in"]) {
- if (status === EXITING) {
- this.performEnter(this.props);
- } else if (status === EXITED) {
- this.performEnter(this.props);
- }
- // 其他,当我们已经输入或输出
- } else {
- if (status === ENTERING || status === ENTERED) {
- this.performExit(this.props);
- }
- // 我们已经输入或输出完成
- }
- }
- };
-
- Transition.prototype.componentWillUnmount = function componentWillUnmount() {
- this.cancelNextCallback();
- };
-
- Transition.prototype.performEnter = function performEnter(props) {
- var _this2 = this;
-
- this.cancelNextCallback();
- var node = _reactDom2["default"].findDOMNode(this);
-
- // 这里接收新props
- props.onEnter(node);
-
- this.safeSetState({ status: ENTERING }, function () {
- _this2.props.onEntering(node);
-
- _this2.onTransitionEnd(node, function () {
- _this2.safeSetState({ status: ENTERED }, function () {
- _this2.props.onEntered(node);
- });
- });
- });
- };
-
- Transition.prototype.performExit = function performExit(props) {
- var _this3 = this;
-
- this.cancelNextCallback();
- var node = _reactDom2["default"].findDOMNode(this);
-
- props.onExit(node);
-
- this.safeSetState({ status: EXITING }, function () {
- _this3.props.onExiting(node);
-
- _this3.onTransitionEnd(node, function () {
- _this3.safeSetState({ status: EXITED }, function () {
- _this3.props.onExited(node);
- });
- });
- });
- };
-
- Transition.prototype.cancelNextCallback = function cancelNextCallback() {
- if (this.nextCallback !== null) {
- this.nextCallback.cancel();
- this.nextCallback = null;
- }
- };
-
- Transition.prototype.safeSetState = function safeSetState(nextState, callback) {
- // 确保在组件销毁后挂起的setState被消除
- this.setState(nextState, this.setNextCallback(callback));
- };
-
- Transition.prototype.setNextCallback = function setNextCallback(callback) {
- var _this4 = this;
-
- var active = true;
-
- this.nextCallback = function (event) {
- if (active) {
- active = false;
- _this4.nextCallback = null;
-
- callback(event);
- }
- };
-
- this.nextCallback.cancel = function () {
- active = false;
- };
-
- return this.nextCallback;
- };
-
- Transition.prototype.onTransitionEnd = function onTransitionEnd(node, handler) {
- this.setNextCallback(handler);
-
- if (node) {
- if (transitionEndEvent == undefined) {
- this.nextCallback();
- } else {
- (0, _on2["default"])(node, transitionEndEvent, this.nextCallback);
- }
- setTimeout(this.nextCallback, this.props.timeout);
- } else {
- setTimeout(this.nextCallback, 0);
- }
- };
-
- Transition.prototype.render = function render() {
- var status = this.state.status;
- if (status === UNMOUNTED) {
- return null;
- }
-
- var _props = this.props,
- children = _props.children,
- className = _props.className,
- childProps = _objectWithoutProperties(_props, ['children', 'className']);
-
- Object.keys(Transition.propTypes).forEach(function (key) {
- return delete childProps[key];
- });
-
- var transitionClassName = void 0;
- if (status === EXITED) {
- transitionClassName = this.props.exitedClassName;
- } else if (status === ENTERING) {
- transitionClassName = this.props.enteringClassName;
- } else if (status === ENTERED) {
- transitionClassName = this.props.enteredClassName;
- } else if (status === EXITING) {
- transitionClassName = this.props.exitingClassName;
- }
-
- var child = _react2["default"].Children.only(children);
- return _react2["default"].cloneElement(child, _extends({}, childProps, {
- className: (0, _classnames2["default"])(child.props.className, className, transitionClassName)
- }));
- };
-
- return Transition;
- }(_react.Component);
-
- Transition.propTypes = propTypes;
-
- Transition.defaultProps = defaultProps;
-
- exports["default"] = Transition;
-
- /***/ }),
- /* 130 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.EXITING = exports.ENTERED = exports.ENTERING = exports.EXITED = exports.UNMOUNTED = undefined;
-
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
- var _react = __webpack_require__(0);
-
- var _react2 = _interopRequireDefault(_react);
-
- var _reactDom = __webpack_require__(4);
-
- var _reactDom2 = _interopRequireDefault(_reactDom);
-
- var _properties = __webpack_require__(69);
-
- var _properties2 = _interopRequireDefault(_properties);
-
- var _on = __webpack_require__(70);
-
- var _on2 = _interopRequireDefault(_on);
-
- var _classnames = __webpack_require__(2);
-
- var _classnames2 = _interopRequireDefault(_classnames);
-
- var _propTypes = __webpack_require__(1);
-
- var _propTypes2 = _interopRequireDefault(_propTypes);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
-
- function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
-
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
-
- var transitionEndEvent = _properties2["default"].end;
-
- //设置状态码
- var UNMOUNTED = exports.UNMOUNTED = 0;
- var EXITED = exports.EXITED = 1;
- var ENTERING = exports.ENTERING = 2;
- var ENTERED = exports.ENTERED = 3;
- var EXITING = exports.EXITING = 4;
-
- var propTypes = {
- /**
- * 是否触发动画
- */
- "in": _propTypes2["default"].bool,
-
- /**
- * 不显示的时候是否移除组件
- */
- unmountOnExit: _propTypes2["default"].bool,
-
- /**
- * 如果设置为默认显示,挂载时显示动画
- */
- transitionAppear: _propTypes2["default"].bool,
-
- /**
- * 设置超时时间,防止出现问题,可设置为>=动画时间
- */
- timeout: _propTypes2["default"].number,
-
- /**
- * 退出组件时添加的class
- */
- exitedClassName: _propTypes2["default"].string,
- /**
- * 退出组件中添加的class
- */
- exitingClassName: _propTypes2["default"].string,
- /**
- * 进入动画后添加的class
- */
- enteredClassName: _propTypes2["default"].string,
- /**
- * 进入动画时添加的class
- */
- enteringClassName: _propTypes2["default"].string,
-
- /**
- * 进入动画开始时的钩子函数
- */
- onEnter: _propTypes2["default"].func,
- /**
- * 进入动画中的钩子函数
- */
- onEntering: _propTypes2["default"].func,
- /**
- * 进入动画后的钩子函数
- */
- onEntered: _propTypes2["default"].func,
- /**
- * 退出动画开始时的钩子函数
- */
- onExit: _propTypes2["default"].func,
- /**
- * 退出动画中的钩子函数
- */
- onExiting: _propTypes2["default"].func,
- /**
- * 退出动画后的钩子函数
- */
- onExited: _propTypes2["default"].func
- };
-
- function noop() {}
-
- var defaultProps = {
- "in": false,
- unmountOnExit: false,
- transitionAppear: false,
- timeout: 5000,
- onEnter: noop,
- onEntering: noop,
- onEntered: noop,
- onExit: noop,
- onExiting: noop,
- onExited: noop
- };
-
- /**
- * 动画组件
- */
-
- var Transition = function (_Component) {
- _inherits(Transition, _Component);
-
- function Transition(props, context) {
- _classCallCheck(this, Transition);
-
- var _this = _possibleConstructorReturn(this, _Component.call(this, props, context));
-
- var initialStatus = void 0;
- if (props["in"]) {
- // 在componentdidmount时开始执行动画
- initialStatus = props.transitionAppear ? EXITED : ENTERED;
- } else {
- initialStatus = props.unmountOnExit ? UNMOUNTED : EXITED;
- }
- _this.state = { status: initialStatus };
-
- _this.nextCallback = null;
- return _this;
- }
-
- Transition.prototype.componentDidMount = function componentDidMount() {
- if (this.props.transitionAppear && this.props["in"]) {
- this.performEnter(this.props);
- }
- };
-
- Transition.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
- if (nextProps["in"] && this.props.unmountOnExit) {
- if (this.state.status === UNMOUNTED) {
- // 在componentDidUpdate执行动画.
- this.setState({ status: EXITED });
- }
- } else {
- this._needsUpdate = true;
- }
- };
-
- Transition.prototype.componentDidUpdate = function componentDidUpdate() {
- var status = this.state.status;
-
- if (this.props.unmountOnExit && status === EXITED) {
- // 当使用unmountOnExit时,exited为exiting和unmont的过渡状态
- if (this.props["in"]) {
- this.performEnter(this.props);
- } else {
- this.setState({ status: UNMOUNTED });
- }
-
- return;
- }
-
- // 确保只响应prop变化
- if (this._needsUpdate) {
- this._needsUpdate = false;
-
- if (this.props["in"]) {
- if (status === EXITING) {
- this.performEnter(this.props);
- } else if (status === EXITED) {
- this.performEnter(this.props);
- }
- // 其他,当我们已经输入或输出
- } else {
- if (status === ENTERING || status === ENTERED) {
- this.performExit(this.props);
- }
- // 我们已经输入或输出完成
- }
- }
- };
-
- Transition.prototype.componentWillUnmount = function componentWillUnmount() {
- this.cancelNextCallback();
- };
-
- Transition.prototype.performEnter = function performEnter(props) {
- var _this2 = this;
-
- this.cancelNextCallback();
- var node = _reactDom2["default"].findDOMNode(this);
-
- // 这里接收新props
- props.onEnter(node);
-
- this.safeSetState({ status: ENTERING }, function () {
- _this2.props.onEntering(node);
-
- _this2.onTransitionEnd(node, function () {
- _this2.safeSetState({ status: ENTERED }, function () {
- _this2.props.onEntered(node);
- });
- });
- });
- };
-
- Transition.prototype.performExit = function performExit(props) {
- var _this3 = this;
-
- this.cancelNextCallback();
- var node = _reactDom2["default"].findDOMNode(this);
-
- props.onExit(node);
-
- this.safeSetState({ status: EXITING }, function () {
- _this3.props.onExiting(node);
-
- _this3.onTransitionEnd(node, function () {
- _this3.safeSetState({ status: EXITED }, function () {
- _this3.props.onExited(node);
- });
- });
- });
- };
-
- Transition.prototype.cancelNextCallback = function cancelNextCallback() {
- if (this.nextCallback !== null) {
- this.nextCallback.cancel();
- this.nextCallback = null;
- }
- };
-
- Transition.prototype.safeSetState = function safeSetState(nextState, callback) {
- // 确保在组件销毁后挂起的setState被消除
- this.setState(nextState, this.setNextCallback(callback));
- };
-
- Transition.prototype.setNextCallback = function setNextCallback(callback) {
- var _this4 = this;
-
- var active = true;
-
- this.nextCallback = function (event) {
- if (active) {
- active = false;
- _this4.nextCallback = null;
-
- callback(event);
- }
- };
-
- this.nextCallback.cancel = function () {
- active = false;
- };
-
- return this.nextCallback;
- };
-
- Transition.prototype.onTransitionEnd = function onTransitionEnd(node, handler) {
- this.setNextCallback(handler);
-
- if (node) {
- if (transitionEndEvent == undefined) {
- this.nextCallback();
- } else {
- (0, _on2["default"])(node, transitionEndEvent, this.nextCallback);
- }
- setTimeout(this.nextCallback, this.props.timeout);
- } else {
- setTimeout(this.nextCallback, 0);
- }
- };
-
- Transition.prototype.render = function render() {
- var status = this.state.status;
- if (status === UNMOUNTED) {
- return null;
- }
-
- var _props = this.props,
- children = _props.children,
- className = _props.className,
- childProps = _objectWithoutProperties(_props, ['children', 'className']);
-
- Object.keys(Transition.propTypes).forEach(function (key) {
- return delete childProps[key];
- });
-
- var transitionClassName = void 0;
- if (status === EXITED) {
- transitionClassName = this.props.exitedClassName;
- } else if (status === ENTERING) {
- transitionClassName = this.props.enteringClassName;
- } else if (status === ENTERED) {
- transitionClassName = this.props.enteredClassName;
- } else if (status === EXITING) {
- transitionClassName = this.props.exitingClassName;
- }
-
- var child = _react2["default"].Children.only(children);
- return _react2["default"].cloneElement(child, _extends({}, childProps, {
- className: (0, _classnames2["default"])(child.props.className, className, transitionClassName)
- }));
- };
-
- return Transition;
- }(_react.Component);
-
- Transition.propTypes = propTypes;
-
- Transition.defaultProps = defaultProps;
-
- exports["default"] = Transition;
-
- /***/ }),
- /* 131 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _inDOM = __webpack_require__(34);
-
- var _inDOM2 = _interopRequireDefault(_inDOM);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
- var on = function on() {};
- if (_inDOM2.default) {
- on = function () {
-
- if (document.addEventListener) return function (node, eventName, handler, capture) {
- return node.addEventListener(eventName, handler, capture || false);
- };else if (document.attachEvent) return function (node, eventName, handler) {
- return node.attachEvent('on' + eventName, handler);
- };
- }();
- }
-
- exports.default = on;
- module.exports = exports['default'];
-
- /***/ }),
- /* 132 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; /*eslint-disable react/prop-types */
-
-
- var _react = __webpack_require__(0);
-
- var _react2 = _interopRequireDefault(_react);
-
- var _propTypes = __webpack_require__(1);
-
- var _propTypes2 = _interopRequireDefault(_propTypes);
-
- var _warning = __webpack_require__(18);
-
- var _warning2 = _interopRequireDefault(_warning);
-
- var _tinperBeeCore = __webpack_require__(5);
-
- var _Portal = __webpack_require__(52);
-
- var _Portal2 = _interopRequireDefault(_Portal);
-
- var _ModalManager = __webpack_require__(821);
-
- var _ModalManager2 = _interopRequireDefault(_ModalManager);
-
- var _ownerDocument = __webpack_require__(53);
-
- var _ownerDocument2 = _interopRequireDefault(_ownerDocument);
-
- var _addEventListener = __webpack_require__(87);
-
- var _addEventListener2 = _interopRequireDefault(_addEventListener);
-
- var _addFocusListener = __webpack_require__(827);
-
- var _addFocusListener2 = _interopRequireDefault(_addFocusListener);
-
- var _inDOM = __webpack_require__(32);
-
- var _inDOM2 = _interopRequireDefault(_inDOM);
-
- var _activeElement = __webpack_require__(828);
-
- var _activeElement2 = _interopRequireDefault(_activeElement);
-
- var _contains = __webpack_require__(51);
-
- var _contains2 = _interopRequireDefault(_contains);
-
- var _getContainer = __webpack_require__(126);
-
- var _getContainer2 = _interopRequireDefault(_getContainer);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
-
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
-
- var modalManager = new _ModalManager2["default"]();
-
- /**
- * 模态框
- */
-
- var propTypes = _extends({}, _Portal2["default"].propTypes, {
-
- /**
- * 是否显示
- */
- show: _propTypes2["default"].bool,
-
- /**
- * 容器
- */
- container: _propTypes2["default"].oneOfType([_tinperBeeCore.componentOrElement, _propTypes2["default"].func]),
-
- /**
- * 当模态框打开时的钩子函数
- */
- onShow: _propTypes2["default"].func,
-
- /**
- * 当show参数为false时触发的模态框关闭时的钩子函数
- */
- onHide: _propTypes2["default"].func,
-
- /**
- * 是否包含背景
- */
- backdrop: _propTypes2["default"].oneOfType([_propTypes2["default"].bool, _propTypes2["default"].oneOf(['static'])]),
-
- /**
- *返回背景组件的函数
- */
- renderBackdrop: _propTypes2["default"].func,
-
- /**
- * 设置esc键特殊钩子函数
- */
- onEscapeKeyUp: _propTypes2["default"].func,
-
- /**
- * 当点击背景时触发的函数
- */
- onBackdropClick: _propTypes2["default"].func,
-
- /**
- * 背景的style
- */
- backdropStyle: _propTypes2["default"].object,
-
- /**
- * 背景的class
- */
- backdropClassName: _propTypes2["default"].string,
-
- /**
- *容器的class
- */
- containerClassName: _propTypes2["default"].string,
-
- /**
- * 按esc键是否关闭模态框
- */
- keyboard: _propTypes2["default"].bool,
-
- /**
- * 动画组件
- */
- transition: _tinperBeeCore.elementType,
-
- /**
- * 设置动画超时时间
- */
- dialogTransitionTimeout: _propTypes2["default"].number,
-
- /**
- * 设置背景动画超时时间
- */
- backdropTransitionTimeout: _propTypes2["default"].number,
-
- /**
- * 是否自动设置焦点
- */
- autoFocus: _propTypes2["default"].bool,
-
- /**
- * 防止焦点离开模态框
- */
- enforceFocus: _propTypes2["default"].bool,
-
- /**
- * 模态框进入时的钩子函数
- */
- onEnter: _propTypes2["default"].func,
-
- /**
- * 模态框开始进入时的钩子函数
- */
- onEntering: _propTypes2["default"].func,
-
- /**
- * 模态框进入后的钩子函数
- */
- onEntered: _propTypes2["default"].func,
-
- /**
- * 模态框退出时的钩子函数
- */
- onExit: _propTypes2["default"].func,
-
- /**
- * 模态框开始退出时的钩子函数
- */
- onExiting: _propTypes2["default"].func,
-
- /**
- * 模态框推出后的钩子函数
- */
- onExited: _propTypes2["default"].func,
-
- /**
- *管理model状态的实例
- */
- manager: _propTypes2["default"].object.isRequired
- });
-
- var defaultProps = {
- show: false,
- backdrop: true,
- keyboard: true,
- autoFocus: true,
- enforceFocus: true,
- onHide: function onHide() {},
- manager: modalManager,
- renderBackdrop: function renderBackdrop(props) {
- return _react2["default"].createElement('div', props);
- }
- };
-
- var BaseModal = function (_Component) {
- _inherits(BaseModal, _Component);
-
- function BaseModal(props, content) {
- _classCallCheck(this, BaseModal);
-
- var _this = _possibleConstructorReturn(this, _Component.call(this, props));
-
- _this.state = {
- exited: !_this.props.show
- };
-
- _this.onShow = _this.onShow.bind(_this);
- _this.onHide = _this.onHide.bind(_this);
- _this.setMountNode = _this.setMountNode.bind(_this);
- _this.handleHidden = _this.handleHidden.bind(_this);
- _this.handleBackdropClick = _this.handleBackdropClick.bind(_this);
- _this.handleDocumentKeyUp = _this.handleDocumentKeyUp.bind(_this);
- _this.checkForFocus = _this.checkForFocus.bind(_this);
- _this.focus = _this.focus.bind(_this);
- _this.restoreLastFocus = _this.restoreLastFocus.bind(_this);
- _this.enforceFocus = _this.enforceFocus.bind(_this);
- _this.getDialogElement = _this.getDialogElement.bind(_this);
- _this.isTopModal = _this.isTopModal.bind(_this);
- _this.renderBackdrop = _this.renderBackdrop.bind(_this);
- return _this;
- }
-
- BaseModal.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
- if (nextProps.show) {
- this.setState({ exited: false });
- } else if (!nextProps.transition) {
- // Otherwise let handleHidden take care of marking exited.
- this.setState({ exited: true });
- }
- };
-
- BaseModal.prototype.componentWillUpdate = function componentWillUpdate(nextProps) {
- if (!this.props.show && nextProps.show) {
- this.checkForFocus();
- }
- };
-
- BaseModal.prototype.componentDidMount = function componentDidMount() {
- if (this.props.show) {
- this.onShow();
- }
- this.mounted = true;
- };
-
- BaseModal.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
- var transition = this.props.transition;
-
-
- if (prevProps.show && !this.props.show && !transition) {
- // Otherwise handleHidden will call this.
- this.onHide();
- } else if (!prevProps.show && this.props.show) {
- this.onShow();
- }
- };
-
- BaseModal.prototype.componentWillUnmount = function componentWillUnmount() {
- var _props = this.props,
- show = _props.show,
- transition = _props.transition;
-
-
- if (show || transition && !this.state.exited) {
- this.onHide();
- }
-
- this.mounted = false;
- };
-
- BaseModal.prototype.onShow = function onShow() {
- var doc = (0, _ownerDocument2["default"])(this);
- var container = (0, _getContainer2["default"])(this.props.container, doc.body);
-
- this.props.manager.add(this, container, this.props.containerClassName);
-
- this._onDocumentKeyupListener = (0, _addEventListener2["default"])(doc, 'keyup', this.handleDocumentKeyUp);
-
- this._onFocusinListener = (0, _addFocusListener2["default"])(this.enforceFocus);
-
- this.focus();
-
- if (this.props.onShow) {
- this.props.onShow();
- }
- };
-
- BaseModal.prototype.onHide = function onHide() {
- this.props.manager.remove(this);
-
- this._onDocumentKeyupListener.remove();
-
- this._onFocusinListener.remove();
-
- this.restoreLastFocus();
- };
-
- BaseModal.prototype.setMountNode = function setMountNode(ref) {
- this.mountNode = ref ? ref.getMountNode() : ref;
- };
-
- BaseModal.prototype.handleHidden = function handleHidden() {
- this.setState({ exited: true });
- this.onHide();
-
- if (this.props.onExited) {
- var _props2;
-
- (_props2 = this.props).onExited.apply(_props2, arguments);
- }
- };
-
- BaseModal.prototype.handleBackdropClick = function handleBackdropClick(e) {
- if (e.target !== e.currentTarget) {
- return;
- }
-
- if (this.props.onBackdropClick) {
- this.props.onBackdropClick(e);
- }
-
- if (this.props.backdrop === true) {
- this.props.onHide();
- }
- };
-
- BaseModal.prototype.handleDocumentKeyUp = function handleDocumentKeyUp(e) {
- if (this.props.keyboard && e.keyCode === 27 && this.isTopModal()) {
- if (this.props.onEscapeKeyUp) {
- this.props.onEscapeKeyUp(e);
- }
- this.props.onHide();
- }
- };
-
- BaseModal.prototype.checkForFocus = function checkForFocus() {
- if (_inDOM2["default"]) {
- this.lastFocus = (0, _activeElement2["default"])();
- }
- };
-
- BaseModal.prototype.focus = function focus() {
- var autoFocus = this.props.autoFocus;
- var modalContent = this.getDialogElement();
- var current = (0, _activeElement2["default"])((0, _ownerDocument2["default"])(this));
- var focusInModal = current && (0, _contains2["default"])(modalContent, current);
-
- if (modalContent && autoFocus && !focusInModal) {
- this.lastFocus = current;
-
- if (!modalContent.hasAttribute('tabIndex')) {
- modalContent.setAttribute('tabIndex', -1);
- (0, _warning2["default"])(false, 'The modal content node does not accept focus. ' + 'For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".');
- }
-
- modalContent.focus();
- }
- };
-
- BaseModal.prototype.restoreLastFocus = function restoreLastFocus() {
- // Support: <=IE11 doesn't support `focus()` on svg elements (RB: #917)
- if (this.lastFocus && this.lastFocus.focus) {
- this.lastFocus.focus();
- this.lastFocus = null;
- }
- };
-
- BaseModal.prototype.enforceFocus = function enforceFocus() {
- var enforceFocus = this.props.enforceFocus;
-
-
- if (!enforceFocus || !this.mounted || !this.isTopModal()) {
- return;
- }
-
- var active = (0, _activeElement2["default"])((0, _ownerDocument2["default"])(this));
- var modal = this.getDialogElement();
-
- if (modal && modal !== active && !(0, _contains2["default"])(modal, active)) {
- modal.focus();
- }
- };
-
- //instead of a ref, which might conflict with one the parent applied.
-
-
- BaseModal.prototype.getDialogElement = function getDialogElement() {
- var node = this.refs.modal;
- return node && node.lastChild;
- };
-
- BaseModal.prototype.isTopModal = function isTopModal() {
- return this.props.manager.isTopModal(this);
- };
-
- BaseModal.prototype.renderBackdrop = function renderBackdrop() {
- var _this2 = this;
-
- var _props3 = this.props,
- backdropStyle = _props3.backdropStyle,
- backdropClassName = _props3.backdropClassName,
- renderBackdrop = _props3.renderBackdrop,
- Transition = _props3.transition,
- backdropTransitionTimeout = _props3.backdropTransitionTimeout;
-
-
- var backdropRef = function backdropRef(ref) {
- return _this2.backdrop = ref;
- };
-
- var backdrop = _react2["default"].createElement('div', {
- ref: backdropRef,
- style: this.props.backdropStyle,
- className: this.props.backdropClassName,
- onClick: this.handleBackdropClick
- });
-
- if (Transition) {
- backdrop = _react2["default"].createElement(
- Transition,
- { transitionAppear: true,
- 'in': this.props.show,
- timeout: backdropTransitionTimeout
- },
- renderBackdrop({
- ref: backdropRef,
- style: backdropStyle,
- className: backdropClassName,
- onClick: this.handleBackdropClick
- })
- );
- }
-
- return backdrop;
- };
-
- BaseModal.prototype.render = function render() {
- var _props4 = this.props,
- show = _props4.show,
- container = _props4.container,
- children = _props4.children,
- Transition = _props4.transition,
- backdrop = _props4.backdrop,
- dialogTransitionTimeout = _props4.dialogTransitionTimeout,
- className = _props4.className,
- style = _props4.style,
- onExit = _props4.onExit,
- onExiting = _props4.onExiting,
- onEnter = _props4.onEnter,
- onEntering = _props4.onEntering,
- onEntered = _props4.onEntered;
-
-
- var dialog = _react2["default"].Children.only(children);
-
- var mountModal = show || Transition && !this.state.exited;
- if (!mountModal) {
- return null;
- }
-
- var _dialog$props = dialog.props,
- role = _dialog$props.role,
- tabIndex = _dialog$props.tabIndex;
-
-
- if (role === undefined || tabIndex === undefined) {
- dialog = (0, _react.cloneElement)(dialog, {
- role: role === undefined ? 'document' : role,
- tabIndex: tabIndex == null ? '-1' : tabIndex
- });
- }
-
- if (Transition) {
- dialog = _react2["default"].createElement(
- Transition,
- {
- transitionAppear: true,
- unmountOnExit: true,
- 'in': show,
- timeout: dialogTransitionTimeout,
- onExit: onExit,
- onExiting: onExiting,
- onExited: this.handleHidden,
- onEnter: onEnter,
- onEntering: onEntering,
- onEntered: onEntered
- },
- dialog
- );
- }
-
- return _react2["default"].createElement(
- _Portal2["default"],
- {
- ref: this.setMountNode,
- container: container
- },
- _react2["default"].createElement(
- 'div',
- {
- ref: 'modal',
- role: role || 'dialog',
- style: style,
- className: className
- },
- backdrop && this.renderBackdrop(),
- dialog
- )
- );
- };
-
- return BaseModal;
- }(_react.Component);
-
- ;
-
- BaseModal.Manager = _ModalManager2["default"];
-
- BaseModal.propTypes = propTypes;
- BaseModal.defaultProps = defaultProps;
-
- exports["default"] = BaseModal;
- module.exports = exports['default'];
-
- /***/ }),
- /* 133 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
-
- "use strict";
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
- /* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DragDropContext", function() { return DragDropContext; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Droppable", function() { return connectedDroppable; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Draggable", function() { return ConnectedDraggable; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "resetServerContext", function() { return resetServerContext; });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__ = __webpack_require__(830);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_tiny_invariant__ = __webpack_require__(236);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_css_box_model__ = __webpack_require__(831);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_core_js_object_keys__ = __webpack_require__(832);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_core_js_object_keys___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_core_js_object_keys__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_memoize_one__ = __webpack_require__(836);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_redux__ = __webpack_require__(237);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_core_js_object_assign__ = __webpack_require__(235);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_core_js_object_assign___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_core_js_object_assign__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_raf_schd__ = __webpack_require__(840);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_esm_inheritsLoose__ = __webpack_require__(841);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_prop_types__ = __webpack_require__(1);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_prop_types__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_react_redux__ = __webpack_require__(843);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_react_motion__ = __webpack_require__(857);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12_react_motion___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_12_react_motion__);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var vertical = {
- direction: 'vertical',
- line: 'y',
- crossAxisLine: 'x',
- start: 'top',
- end: 'bottom',
- size: 'height',
- crossAxisStart: 'left',
- crossAxisEnd: 'right',
- crossAxisSize: 'width'
- };
- var horizontal = {
- direction: 'horizontal',
- line: 'x',
- crossAxisLine: 'y',
- start: 'left',
- end: 'right',
- size: 'width',
- crossAxisStart: 'top',
- crossAxisEnd: 'bottom',
- crossAxisSize: 'height'
- };
-
- var origin = {
- x: 0,
- y: 0
- };
- var add = function add(point1, point2) {
- return {
- x: point1.x + point2.x,
- y: point1.y + point2.y
- };
- };
- var subtract = function subtract(point1, point2) {
- return {
- x: point1.x - point2.x,
- y: point1.y - point2.y
- };
- };
- var isEqual = function isEqual(point1, point2) {
- return point1.x === point2.x && point1.y === point2.y;
- };
- var negate = function negate(point) {
- return {
- x: point.x !== 0 ? -point.x : 0,
- y: point.y !== 0 ? -point.y : 0
- };
- };
- var absolute = function absolute(point) {
- return {
- x: Math.abs(point.x),
- y: Math.abs(point.y)
- };
- };
- var patch = function patch(line, value, otherValue) {
- var _ref;
-
- if (otherValue === void 0) {
- otherValue = 0;
- }
-
- return _ref = {}, _ref[line] = value, _ref[line === 'x' ? 'y' : 'x'] = otherValue, _ref;
- };
- var distance = function distance(point1, point2) {
- return Math.sqrt(Math.pow(point2.x - point1.x, 2) + Math.pow(point2.y - point1.y, 2));
- };
- var closest = function closest(target, points) {
- return Math.min.apply(Math, points.map(function (point) {
- return distance(target, point);
- }));
- };
- var apply = function apply(fn) {
- return function (point) {
- return {
- x: fn(point.x),
- y: fn(point.y)
- };
- };
- };
-
- var offsetByPosition = function offsetByPosition(spacing, point) {
- return {
- top: spacing.top + point.y,
- left: spacing.left + point.x,
- bottom: spacing.bottom + point.y,
- right: spacing.right + point.x
- };
- };
- var expandByPosition = function expandByPosition(spacing, position) {
- return {
- top: spacing.top - position.y,
- left: spacing.left - position.x,
- right: spacing.right + position.x,
- bottom: spacing.bottom + position.y
- };
- };
- var getCorners = function getCorners(spacing) {
- return [{
- x: spacing.left,
- y: spacing.top
- }, {
- x: spacing.right,
- y: spacing.top
- }, {
- x: spacing.left,
- y: spacing.bottom
- }, {
- x: spacing.right,
- y: spacing.bottom
- }];
- };
-
- var getMaxScroll = (function (_ref) {
- var scrollHeight = _ref.scrollHeight,
- scrollWidth = _ref.scrollWidth,
- height = _ref.height,
- width = _ref.width;
- var maxScroll = subtract({
- x: scrollWidth,
- y: scrollHeight
- }, {
- x: width,
- y: height
- });
- var adjustedMaxScroll = {
- x: Math.max(0, maxScroll.x),
- y: Math.max(0, maxScroll.y)
- };
- return adjustedMaxScroll;
- });
-
- var clip = function clip(frame, subject) {
- var result = Object(__WEBPACK_IMPORTED_MODULE_2_css_box_model__["d" /* getRect */])({
- top: Math.max(subject.top, frame.top),
- right: Math.min(subject.right, frame.right),
- bottom: Math.min(subject.bottom, frame.bottom),
- left: Math.max(subject.left, frame.left)
- });
-
- if (result.width <= 0 || result.height <= 0) {
- return null;
- }
-
- return result;
- };
- var getDroppableDimension = function getDroppableDimension(_ref) {
- var descriptor = _ref.descriptor,
- isEnabled = _ref.isEnabled,
- direction = _ref.direction,
- client = _ref.client,
- page = _ref.page,
- closest$$1 = _ref.closest;
-
- var scrollable = function () {
- if (!closest$$1) {
- return null;
- }
-
- var maxScroll = getMaxScroll({
- scrollHeight: closest$$1.scrollHeight,
- scrollWidth: closest$$1.scrollWidth,
- height: closest$$1.client.paddingBox.height,
- width: closest$$1.client.paddingBox.width
- });
- return {
- framePageMarginBox: closest$$1.page.marginBox,
- shouldClipSubject: closest$$1.shouldClipSubject,
- scroll: {
- initial: closest$$1.scroll,
- current: closest$$1.scroll,
- max: maxScroll,
- diff: {
- value: origin,
- displacement: origin
- }
- }
- };
- }();
-
- var subjectPageMarginBox = page.marginBox;
- var clippedPageMarginBox = scrollable && scrollable.shouldClipSubject ? clip(scrollable.framePageMarginBox, subjectPageMarginBox) : subjectPageMarginBox;
- var viewport = {
- closestScrollable: scrollable,
- subjectPageMarginBox: subjectPageMarginBox,
- clippedPageMarginBox: clippedPageMarginBox
- };
- var dimension = {
- descriptor: descriptor,
- axis: direction === 'vertical' ? vertical : horizontal,
- isEnabled: isEnabled,
- client: client,
- page: page,
- viewport: viewport
- };
- return dimension;
- };
- var scrollDroppable = function scrollDroppable(droppable, newScroll) {
- !droppable.viewport.closestScrollable ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- var scrollable = droppable.viewport.closestScrollable;
- var framePageMarginBox = scrollable.framePageMarginBox;
- var scrollDiff = subtract(newScroll, scrollable.scroll.initial);
- var scrollDisplacement = negate(scrollDiff);
- var closestScrollable = {
- framePageMarginBox: scrollable.framePageMarginBox,
- shouldClipSubject: scrollable.shouldClipSubject,
- scroll: {
- initial: scrollable.scroll.initial,
- current: newScroll,
- diff: {
- value: scrollDiff,
- displacement: scrollDisplacement
- },
- max: scrollable.scroll.max
- }
- };
- var displacedSubject = offsetByPosition(droppable.viewport.subjectPageMarginBox, scrollDisplacement);
- var clippedPageMarginBox = closestScrollable.shouldClipSubject ? clip(framePageMarginBox, displacedSubject) : Object(__WEBPACK_IMPORTED_MODULE_2_css_box_model__["d" /* getRect */])(displacedSubject);
- var viewport = {
- closestScrollable: closestScrollable,
- subjectPageMarginBox: droppable.viewport.subjectPageMarginBox,
- clippedPageMarginBox: clippedPageMarginBox
- };
-
- var result = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, droppable, {
- viewport: viewport
- });
-
- return result;
- };
-
- var toDroppableMap = Object(__WEBPACK_IMPORTED_MODULE_4_memoize_one__["a" /* default */])(function (droppables) {
- return droppables.reduce(function (previous, current) {
- previous[current.descriptor.id] = current;
- return previous;
- }, {});
- });
- var toDraggableMap = Object(__WEBPACK_IMPORTED_MODULE_4_memoize_one__["a" /* default */])(function (draggables) {
- return draggables.reduce(function (previous, current) {
- previous[current.descriptor.id] = current;
- return previous;
- }, {});
- });
- var toDroppableList = Object(__WEBPACK_IMPORTED_MODULE_4_memoize_one__["a" /* default */])(function (droppables) {
- return __WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_core_js_object_keys___default()(droppables).map(function (id) {
- return droppables[id];
- });
- });
- var toDraggableList = Object(__WEBPACK_IMPORTED_MODULE_4_memoize_one__["a" /* default */])(function (draggables) {
- return __WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_core_js_object_keys___default()(draggables).map(function (id) {
- return draggables[id];
- });
- });
-
- var getDraggablesInsideDroppable = Object(__WEBPACK_IMPORTED_MODULE_4_memoize_one__["a" /* default */])(function (droppable, draggables) {
- return toDraggableList(draggables).filter(function (draggable) {
- return droppable.descriptor.id === draggable.descriptor.droppableId;
- }).sort(function (a, b) {
- return a.descriptor.index - b.descriptor.index;
- });
- });
-
- var isWithin = (function (lowerBound, upperBound) {
- return function (value) {
- return value <= upperBound && value >= lowerBound;
- };
- });
-
- var isPositionInFrame = (function (frame) {
- var isWithinVertical = isWithin(frame.top, frame.bottom);
- var isWithinHorizontal = isWithin(frame.left, frame.right);
- return function (point) {
- return isWithinVertical(point.y) && isWithinVertical(point.y) && isWithinHorizontal(point.x) && isWithinHorizontal(point.x);
- };
- });
-
- var getRequiredGrowth = Object(__WEBPACK_IMPORTED_MODULE_4_memoize_one__["a" /* default */])(function (draggable, draggables, droppable) {
- var getResult = function getResult(existingSpace) {
- var requiredSpace = draggable.page.marginBox[droppable.axis.size];
-
- if (requiredSpace <= existingSpace) {
- return null;
- }
-
- var requiredGrowth = patch(droppable.axis.line, requiredSpace - existingSpace);
- return requiredGrowth;
- };
-
- var dimensions = getDraggablesInsideDroppable(droppable, draggables);
-
- if (!dimensions.length) {
- var _existingSpace = droppable.page.marginBox[droppable.axis.size];
- return getResult(_existingSpace);
- }
-
- var endOfDraggables = dimensions[dimensions.length - 1].page.marginBox[droppable.axis.end];
- var endOfDroppable = droppable.page.marginBox[droppable.axis.end];
- var existingSpace = endOfDroppable - endOfDraggables;
- return getResult(existingSpace);
- });
- var getWithGrowth = Object(__WEBPACK_IMPORTED_MODULE_4_memoize_one__["a" /* default */])(function (area, growth) {
- return Object(__WEBPACK_IMPORTED_MODULE_2_css_box_model__["d" /* getRect */])(expandByPosition(area, growth));
- });
-
- var getClippedRectWithPlaceholder = function getClippedRectWithPlaceholder(_ref) {
- var draggable = _ref.draggable,
- draggables = _ref.draggables,
- droppable = _ref.droppable,
- previousDroppableOverId = _ref.previousDroppableOverId;
- var isHome = draggable.descriptor.droppableId === droppable.descriptor.id;
- var wasOver = Boolean(previousDroppableOverId && previousDroppableOverId === droppable.descriptor.id);
- var clippedPageMarginBox = droppable.viewport.clippedPageMarginBox;
-
- if (!clippedPageMarginBox) {
- return clippedPageMarginBox;
- }
-
- if (isHome || !wasOver) {
- return clippedPageMarginBox;
- }
-
- var requiredGrowth = getRequiredGrowth(draggable, draggables, droppable);
-
- if (!requiredGrowth) {
- return clippedPageMarginBox;
- }
-
- var subjectWithGrowth = getWithGrowth(clippedPageMarginBox, requiredGrowth);
- var closestScrollable = droppable.viewport.closestScrollable;
-
- if (!closestScrollable) {
- return subjectWithGrowth;
- }
-
- if (!closestScrollable.shouldClipSubject) {
- return subjectWithGrowth;
- }
-
- return clip(closestScrollable.framePageMarginBox, subjectWithGrowth);
- };
-
- var getDroppableOver = (function (_ref2) {
- var target = _ref2.target,
- draggable = _ref2.draggable,
- draggables = _ref2.draggables,
- droppables = _ref2.droppables,
- previousDroppableOverId = _ref2.previousDroppableOverId;
- var maybe = toDroppableList(droppables).filter(function (droppable) {
- return droppable.isEnabled;
- }).find(function (droppable) {
- var withPlaceholder = getClippedRectWithPlaceholder({
- draggable: draggable,
- draggables: draggables,
- droppable: droppable,
- previousDroppableOverId: previousDroppableOverId
- });
-
- if (!withPlaceholder) {
- return false;
- }
-
- return isPositionInFrame(withPlaceholder)(target);
- });
- return maybe ? maybe.descriptor.id : null;
- });
-
- var noMovement = {
- displaced: [],
- amount: origin,
- isBeyondStartPosition: false
- };
- var noImpact = {
- movement: noMovement,
- direction: null,
- destination: null
- };
-
- var getDisplacementMap = Object(__WEBPACK_IMPORTED_MODULE_4_memoize_one__["a" /* default */])(function (displaced) {
- return displaced.reduce(function (map, displacement) {
- map[displacement.draggableId] = displacement;
- return map;
- }, {});
- });
-
- var isPartiallyVisibleThroughFrame = (function (frame) {
- var isWithinVertical = isWithin(frame.top, frame.bottom);
- var isWithinHorizontal = isWithin(frame.left, frame.right);
- return function (subject) {
- var isContained = isWithinVertical(subject.top) && isWithinVertical(subject.bottom) && isWithinHorizontal(subject.left) && isWithinHorizontal(subject.right);
-
- if (isContained) {
- return true;
- }
-
- var isPartiallyVisibleVertically = isWithinVertical(subject.top) || isWithinVertical(subject.bottom);
- var isPartiallyVisibleHorizontally = isWithinHorizontal(subject.left) || isWithinHorizontal(subject.right);
- var isPartiallyContained = isPartiallyVisibleVertically && isPartiallyVisibleHorizontally;
-
- if (isPartiallyContained) {
- return true;
- }
-
- var isBiggerVertically = subject.top < frame.top && subject.bottom > frame.bottom;
- var isBiggerHorizontally = subject.left < frame.left && subject.right > frame.right;
- var isTargetBiggerThanFrame = isBiggerVertically && isBiggerHorizontally;
-
- if (isTargetBiggerThanFrame) {
- return true;
- }
-
- var isTargetBiggerOnOneAxis = isBiggerVertically && isPartiallyVisibleHorizontally || isBiggerHorizontally && isPartiallyVisibleVertically;
- return isTargetBiggerOnOneAxis;
- };
- });
-
- var isTotallyVisibleThroughFrame = (function (frame) {
- var isWithinVertical = isWithin(frame.top, frame.bottom);
- var isWithinHorizontal = isWithin(frame.left, frame.right);
- return function (subject) {
- var isContained = isWithinVertical(subject.top) && isWithinVertical(subject.bottom) && isWithinHorizontal(subject.left) && isWithinHorizontal(subject.right);
- return isContained;
- };
- });
-
- var isVisible = function isVisible(_ref) {
- var target = _ref.target,
- destination = _ref.destination,
- viewport = _ref.viewport,
- isVisibleThroughFrameFn = _ref.isVisibleThroughFrameFn;
- var displacement = destination.viewport.closestScrollable ? destination.viewport.closestScrollable.scroll.diff.displacement : origin;
- var withDisplacement = offsetByPosition(target, displacement);
-
- if (!destination.viewport.clippedPageMarginBox) {
- return false;
- }
-
- var isVisibleInDroppable = isVisibleThroughFrameFn(destination.viewport.clippedPageMarginBox)(withDisplacement);
- var isVisibleInViewport = isVisibleThroughFrameFn(viewport)(withDisplacement);
- return isVisibleInDroppable && isVisibleInViewport;
- };
-
- var isPartiallyVisible = function isPartiallyVisible(_ref2) {
- var target = _ref2.target,
- destination = _ref2.destination,
- viewport = _ref2.viewport;
- return isVisible({
- target: target,
- destination: destination,
- viewport: viewport,
- isVisibleThroughFrameFn: isPartiallyVisibleThroughFrame
- });
- };
- var isTotallyVisible = function isTotallyVisible(_ref3) {
- var target = _ref3.target,
- destination = _ref3.destination,
- viewport = _ref3.viewport;
- return isVisible({
- target: target,
- destination: destination,
- viewport: viewport,
- isVisibleThroughFrameFn: isTotallyVisibleThroughFrame
- });
- };
-
- var getDisplacement = (function (_ref) {
- var draggable = _ref.draggable,
- destination = _ref.destination,
- previousImpact = _ref.previousImpact,
- viewport = _ref.viewport;
- var id = draggable.descriptor.id;
- var map = getDisplacementMap(previousImpact.movement.displaced);
- var isVisible = isPartiallyVisible({
- target: draggable.page.marginBox,
- destination: destination,
- viewport: viewport
- });
-
- var shouldAnimate = function () {
- if (!isVisible) {
- return false;
- }
-
- var previous = map[id];
-
- if (!previous) {
- return true;
- }
-
- return previous.shouldAnimate;
- }();
-
- var displacement = {
- draggableId: id,
- isVisible: isVisible,
- shouldAnimate: shouldAnimate
- };
- return displacement;
- });
-
- var withDroppableScroll = (function (droppable, point) {
- var closestScrollable = droppable.viewport.closestScrollable;
-
- if (!closestScrollable) {
- return point;
- }
-
- return add(point, closestScrollable.scroll.diff.value);
- });
-
- var inHomeList = (function (_ref) {
- var pageBorderBoxCenter = _ref.pageBorderBoxCenter,
- draggable = _ref.draggable,
- home = _ref.home,
- insideHome = _ref.insideHome,
- previousImpact = _ref.previousImpact,
- viewport = _ref.viewport;
- var axis = home.axis;
- var originalCenter = draggable.page.borderBox.center;
- var currentCenter = withDroppableScroll(home, pageBorderBoxCenter);
- var isBeyondStartPosition = currentCenter[axis.line] - originalCenter[axis.line] > 0;
- var amount = patch(axis.line, draggable.client.marginBox[axis.size]);
- var displaced = insideHome.filter(function (child) {
- if (child === draggable) {
- return false;
- }
-
- var borderBox = child.page.borderBox;
-
- if (isBeyondStartPosition) {
- if (borderBox.center[axis.line] < originalCenter[axis.line]) {
- return false;
- }
-
- return currentCenter[axis.line] > borderBox[axis.start];
- }
-
- if (originalCenter[axis.line] < borderBox.center[axis.line]) {
- return false;
- }
-
- return currentCenter[axis.line] < borderBox[axis.end];
- }).map(function (dimension) {
- return getDisplacement({
- draggable: dimension,
- destination: home,
- previousImpact: previousImpact,
- viewport: viewport.frame
- });
- });
- var ordered = isBeyondStartPosition ? displaced.reverse() : displaced;
-
- var index = function () {
- var startIndex = draggable.descriptor.index;
- var length = ordered.length;
-
- if (!length) {
- return startIndex;
- }
-
- if (isBeyondStartPosition) {
- return startIndex + length;
- }
-
- return startIndex - length;
- }();
-
- var movement = {
- amount: amount,
- displaced: ordered,
- isBeyondStartPosition: isBeyondStartPosition
- };
- var impact = {
- movement: movement,
- direction: axis.direction,
- destination: {
- droppableId: home.descriptor.id,
- index: index
- }
- };
- return impact;
- });
-
- var inForeignList = (function (_ref) {
- var pageBorderBoxCenter = _ref.pageBorderBoxCenter,
- draggable = _ref.draggable,
- destination = _ref.destination,
- insideDestination = _ref.insideDestination,
- previousImpact = _ref.previousImpact,
- viewport = _ref.viewport;
- var axis = destination.axis;
- var currentCenter = withDroppableScroll(destination, pageBorderBoxCenter);
- var displaced = insideDestination.filter(function (child) {
- var threshold = child.page.borderBox[axis.end];
- return threshold > currentCenter[axis.line];
- }).map(function (dimension) {
- return getDisplacement({
- draggable: dimension,
- destination: destination,
- previousImpact: previousImpact,
- viewport: viewport.frame
- });
- });
- var newIndex = insideDestination.length - displaced.length;
- var movement = {
- amount: patch(axis.line, draggable.page.marginBox[axis.size]),
- displaced: displaced,
- isBeyondStartPosition: false
- };
- var impact = {
- movement: movement,
- direction: axis.direction,
- destination: {
- droppableId: destination.descriptor.id,
- index: newIndex
- }
- };
- return impact;
- });
-
- var getDragImpact = (function (_ref) {
- var pageBorderBoxCenter = _ref.pageBorderBoxCenter,
- draggable = _ref.draggable,
- draggables = _ref.draggables,
- droppables = _ref.droppables,
- previousImpact = _ref.previousImpact,
- viewport = _ref.viewport;
- var previousDroppableOverId = previousImpact.destination && previousImpact.destination.droppableId;
- var destinationId = getDroppableOver({
- target: pageBorderBoxCenter,
- draggable: draggable,
- draggables: draggables,
- droppables: droppables,
- previousDroppableOverId: previousDroppableOverId
- });
-
- if (!destinationId) {
- return noImpact;
- }
-
- var destination = droppables[destinationId];
-
- if (!destination.isEnabled) {
- return noImpact;
- }
-
- var home = droppables[draggable.descriptor.droppableId];
- var isWithinHomeDroppable = home.descriptor.id === destinationId;
- var insideDestination = getDraggablesInsideDroppable(destination, draggables);
-
- if (isWithinHomeDroppable) {
- return inHomeList({
- pageBorderBoxCenter: pageBorderBoxCenter,
- draggable: draggable,
- home: home,
- insideHome: insideDestination,
- previousImpact: previousImpact || noImpact,
- viewport: viewport
- });
- }
-
- return inForeignList({
- pageBorderBoxCenter: pageBorderBoxCenter,
- draggable: draggable,
- destination: destination,
- insideDestination: insideDestination,
- previousImpact: previousImpact || noImpact,
- viewport: viewport
- });
- });
-
- var getHomeLocation = (function (critical) {
- return {
- index: critical.draggable.index,
- droppableId: critical.droppable.id
- };
- });
-
- var getSafeClipped = function getSafeClipped(droppable) {
- var rect = droppable.viewport.clippedPageMarginBox;
- !rect ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Cannot get clipped area from droppable') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- return rect;
- };
-
- var getBestCrossAxisDroppable = (function (_ref) {
- var isMovingForward = _ref.isMovingForward,
- pageBorderBoxCenter = _ref.pageBorderBoxCenter,
- source = _ref.source,
- droppables = _ref.droppables,
- viewport = _ref.viewport;
- var sourceClipped = source.viewport.clippedPageMarginBox;
-
- if (!sourceClipped) {
- return null;
- }
-
- var axis = source.axis;
- var isBetweenSourceClipped = isWithin(sourceClipped[axis.start], sourceClipped[axis.end]);
- var candidates = toDroppableList(droppables).filter(function (droppable) {
- return droppable !== source;
- }).filter(function (droppable) {
- return droppable.isEnabled;
- }).filter(function (droppable) {
- var clippedPageMarginBox = droppable.viewport.clippedPageMarginBox;
-
- if (!clippedPageMarginBox) {
- return false;
- }
-
- return isPartiallyVisibleThroughFrame(viewport.frame)(clippedPageMarginBox);
- }).filter(function (droppable) {
- var targetClipped = getSafeClipped(droppable);
-
- if (isMovingForward) {
- return sourceClipped[axis.crossAxisEnd] < targetClipped[axis.crossAxisEnd];
- }
-
- return targetClipped[axis.crossAxisStart] < sourceClipped[axis.crossAxisStart];
- }).filter(function (droppable) {
- var targetClipped = getSafeClipped(droppable);
- var isBetweenDestinationClipped = isWithin(targetClipped[axis.start], targetClipped[axis.end]);
- return isBetweenSourceClipped(targetClipped[axis.start]) || isBetweenSourceClipped(targetClipped[axis.end]) || isBetweenDestinationClipped(sourceClipped[axis.start]) || isBetweenDestinationClipped(sourceClipped[axis.end]);
- }).sort(function (a, b) {
- var first = getSafeClipped(a)[axis.crossAxisStart];
- var second = getSafeClipped(b)[axis.crossAxisStart];
-
- if (isMovingForward) {
- return first - second;
- }
-
- return second - first;
- }).filter(function (droppable, index, array) {
- return getSafeClipped(droppable)[axis.crossAxisStart] === getSafeClipped(array[0])[axis.crossAxisStart];
- });
-
- if (!candidates.length) {
- return null;
- }
-
- if (candidates.length === 1) {
- return candidates[0];
- }
-
- var contains = candidates.filter(function (droppable) {
- var isWithinDroppable = isWithin(getSafeClipped(droppable)[axis.start], getSafeClipped(droppable)[axis.end]);
- return isWithinDroppable(pageBorderBoxCenter[axis.line]);
- });
-
- if (contains.length === 1) {
- return contains[0];
- }
-
- if (contains.length > 1) {
- return contains.sort(function (a, b) {
- return getSafeClipped(a)[axis.start] - getSafeClipped(b)[axis.start];
- })[0];
- }
-
- return candidates.sort(function (a, b) {
- var first = closest(pageBorderBoxCenter, getCorners(getSafeClipped(a)));
- var second = closest(pageBorderBoxCenter, getCorners(getSafeClipped(b)));
-
- if (first !== second) {
- return first - second;
- }
-
- return getSafeClipped(a)[axis.start] - getSafeClipped(b)[axis.start];
- })[0];
- });
-
- var withDroppableDisplacement = (function (droppable, point) {
- var closestScrollable = droppable.viewport.closestScrollable;
-
- if (!closestScrollable) {
- return point;
- }
-
- return add(point, closestScrollable.scroll.diff.displacement);
- });
-
- var getClosestDraggable = (function (_ref) {
- var axis = _ref.axis,
- viewport = _ref.viewport,
- pageBorderBoxCenter = _ref.pageBorderBoxCenter,
- destination = _ref.destination,
- insideDestination = _ref.insideDestination;
-
- if (!insideDestination.length) {
- return null;
- }
-
- var result = insideDestination.filter(function (draggable) {
- return isTotallyVisible({
- target: draggable.page.borderBox,
- destination: destination,
- viewport: viewport.frame
- });
- }).sort(function (a, b) {
- var distanceToA = distance(pageBorderBoxCenter, withDroppableDisplacement(destination, a.page.borderBox.center));
- var distanceToB = distance(pageBorderBoxCenter, withDroppableDisplacement(destination, b.page.borderBox.center));
-
- if (distanceToA < distanceToB) {
- return -1;
- }
-
- if (distanceToB < distanceToA) {
- return 1;
- }
-
- return a.page.borderBox[axis.start] - b.page.borderBox[axis.start];
- });
- return result.length ? result[0] : null;
- });
-
- var moveToEdge = (function (_ref) {
- var source = _ref.source,
- sourceEdge = _ref.sourceEdge,
- destination = _ref.destination,
- destinationEdge = _ref.destinationEdge,
- destinationAxis = _ref.destinationAxis;
-
- var getCorner = function getCorner(area) {
- return patch(destinationAxis.line, area[destinationAxis[destinationEdge]], area[destinationAxis.crossAxisStart]);
- };
-
- var corner = getCorner(destination);
- var centerDiff = absolute(subtract(source.center, getCorner(source)));
- var signed = patch(destinationAxis.line, (sourceEdge === 'end' ? -1 : 1) * centerDiff[destinationAxis.line], centerDiff[destinationAxis.crossAxisLine]);
- return add(corner, signed);
- });
-
- var toHomeList = (function (_ref) {
- var amount = _ref.amount,
- homeIndex = _ref.homeIndex,
- movingRelativeTo = _ref.movingRelativeTo,
- insideDestination = _ref.insideDestination,
- draggable = _ref.draggable,
- destination = _ref.destination,
- previousImpact = _ref.previousImpact,
- viewport = _ref.viewport;
- var axis = destination.axis;
- var targetIndex = insideDestination.indexOf(movingRelativeTo);
- !(targetIndex !== -1) ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Unable to find target in destination droppable') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
-
- if (targetIndex === homeIndex) {
- var _newCenter = draggable.page.borderBox.center;
- var _newImpact = {
- movement: {
- displaced: [],
- amount: amount,
- isBeyondStartPosition: false
- },
- direction: destination.axis.direction,
- destination: {
- droppableId: destination.descriptor.id,
- index: homeIndex
- }
- };
- return {
- pageBorderBoxCenter: withDroppableDisplacement(destination, _newCenter),
- impact: _newImpact
- };
- }
-
- var isMovingPastOriginalIndex = targetIndex > homeIndex;
- var edge = isMovingPastOriginalIndex ? 'end' : 'start';
- var newCenter = moveToEdge({
- source: draggable.page.borderBox,
- sourceEdge: edge,
- destination: isMovingPastOriginalIndex ? movingRelativeTo.page.borderBox : movingRelativeTo.page.marginBox,
- destinationEdge: edge,
- destinationAxis: axis
- });
-
- var modified = function () {
- if (!isMovingPastOriginalIndex) {
- return insideDestination.slice(targetIndex, homeIndex);
- }
-
- var from = homeIndex + 1;
- var to = targetIndex + 1;
- return insideDestination.slice(from, to).reverse();
- }();
-
- var displaced = modified.map(function (dimension) {
- return getDisplacement({
- draggable: dimension,
- destination: destination,
- previousImpact: previousImpact,
- viewport: viewport.frame
- });
- });
- var newImpact = {
- movement: {
- displaced: displaced,
- amount: amount,
- isBeyondStartPosition: isMovingPastOriginalIndex
- },
- direction: axis.direction,
- destination: {
- droppableId: destination.descriptor.id,
- index: targetIndex
- }
- };
- return {
- pageBorderBoxCenter: withDroppableDisplacement(destination, newCenter),
- impact: newImpact
- };
- });
-
- var toForeignList = (function (_ref) {
- var amount = _ref.amount,
- pageBorderBoxCenter = _ref.pageBorderBoxCenter,
- movingRelativeTo = _ref.movingRelativeTo,
- insideDestination = _ref.insideDestination,
- draggable = _ref.draggable,
- destination = _ref.destination,
- previousImpact = _ref.previousImpact,
- viewport = _ref.viewport;
- var axis = destination.axis;
- var isGoingBeforeTarget = Boolean(movingRelativeTo && pageBorderBoxCenter[destination.axis.line] < movingRelativeTo.page.borderBox.center[destination.axis.line]);
-
- if (!movingRelativeTo) {
- var _newCenter = moveToEdge({
- source: draggable.page.borderBox,
- sourceEdge: 'start',
- destination: destination.page.contentBox,
- destinationEdge: 'start',
- destinationAxis: axis
- });
-
- var _newImpact = {
- movement: {
- displaced: [],
- amount: amount,
- isBeyondStartPosition: false
- },
- direction: axis.direction,
- destination: {
- droppableId: destination.descriptor.id,
- index: 0
- }
- };
- return {
- pageBorderBoxCenter: withDroppableDisplacement(destination, _newCenter),
- impact: _newImpact
- };
- }
-
- var targetIndex = insideDestination.indexOf(movingRelativeTo);
- !(targetIndex !== -1) ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'The target was not found within its droppable') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- var proposedIndex = isGoingBeforeTarget ? targetIndex : targetIndex + 1;
- var newCenter = moveToEdge({
- source: draggable.page.borderBox,
- sourceEdge: 'start',
- destination: movingRelativeTo.page.marginBox,
- destinationEdge: isGoingBeforeTarget ? 'start' : 'end',
- destinationAxis: axis
- });
- var displaced = insideDestination.slice(proposedIndex, insideDestination.length).map(function (dimension) {
- return getDisplacement({
- draggable: dimension,
- destination: destination,
- viewport: viewport.frame,
- previousImpact: previousImpact
- });
- });
- var newImpact = {
- movement: {
- displaced: displaced,
- amount: amount,
- isBeyondStartPosition: false
- },
- direction: axis.direction,
- destination: {
- droppableId: destination.descriptor.id,
- index: proposedIndex
- }
- };
- return {
- pageBorderBoxCenter: withDroppableDisplacement(destination, newCenter),
- impact: newImpact
- };
- });
-
- var moveToNewDroppable = (function (_ref) {
- var pageBorderBoxCenter = _ref.pageBorderBoxCenter,
- destination = _ref.destination,
- insideDestination = _ref.insideDestination,
- draggable = _ref.draggable,
- movingRelativeTo = _ref.movingRelativeTo,
- home = _ref.home,
- previousImpact = _ref.previousImpact,
- viewport = _ref.viewport;
- var amount = patch(destination.axis.line, draggable.client.marginBox[destination.axis.size]);
-
- if (destination.descriptor.id === draggable.descriptor.droppableId) {
- !movingRelativeTo ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'There will always be a target in the original list') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- return toHomeList({
- amount: amount,
- homeIndex: home.index,
- movingRelativeTo: movingRelativeTo,
- insideDestination: insideDestination,
- draggable: draggable,
- destination: destination,
- previousImpact: previousImpact,
- viewport: viewport
- });
- }
-
- return toForeignList({
- amount: amount,
- pageBorderBoxCenter: pageBorderBoxCenter,
- movingRelativeTo: movingRelativeTo,
- insideDestination: insideDestination,
- draggable: draggable,
- destination: destination,
- previousImpact: previousImpact,
- viewport: viewport
- });
- });
-
- var moveCrossAxis = (function (_ref) {
- var isMovingForward = _ref.isMovingForward,
- pageBorderBoxCenter = _ref.pageBorderBoxCenter,
- draggableId = _ref.draggableId,
- droppableId = _ref.droppableId,
- home = _ref.home,
- draggables = _ref.draggables,
- droppables = _ref.droppables,
- previousImpact = _ref.previousImpact,
- viewport = _ref.viewport;
- var draggable = draggables[draggableId];
- var source = droppables[droppableId];
- var destination = getBestCrossAxisDroppable({
- isMovingForward: isMovingForward,
- pageBorderBoxCenter: pageBorderBoxCenter,
- source: source,
- droppables: droppables,
- viewport: viewport
- });
-
- if (!destination) {
- return null;
- }
-
- var insideDestination = getDraggablesInsideDroppable(destination, draggables);
- var movingRelativeTo = getClosestDraggable({
- axis: destination.axis,
- pageBorderBoxCenter: pageBorderBoxCenter,
- destination: destination,
- insideDestination: insideDestination,
- viewport: viewport
- });
-
- if (insideDestination.length && !movingRelativeTo) {
- return null;
- }
-
- return moveToNewDroppable({
- pageBorderBoxCenter: pageBorderBoxCenter,
- destination: destination,
- draggable: draggable,
- movingRelativeTo: movingRelativeTo,
- insideDestination: insideDestination,
- home: home,
- previousImpact: previousImpact || noImpact,
- viewport: viewport
- });
- });
-
- var isTotallyVisibleInNewLocation = (function (_ref) {
- var draggable = _ref.draggable,
- destination = _ref.destination,
- newPageBorderBoxCenter = _ref.newPageBorderBoxCenter,
- viewport = _ref.viewport;
- var diff = subtract(newPageBorderBoxCenter, draggable.page.borderBox.center);
- var shifted = offsetByPosition(draggable.page.borderBox, diff);
- return isTotallyVisible({
- target: shifted,
- destination: destination,
- viewport: viewport
- });
- });
-
- var withFirstAdded = function withFirstAdded(_ref) {
- var add = _ref.add,
- previousImpact = _ref.previousImpact,
- droppable = _ref.droppable,
- draggables = _ref.draggables,
- viewport = _ref.viewport;
- var newDisplacement = {
- draggableId: add,
- isVisible: true,
- shouldAnimate: true
- };
- var added = [newDisplacement].concat(previousImpact.movement.displaced);
- var withUpdatedVisibility = added.map(function (current) {
- if (current === newDisplacement) {
- return current;
- }
-
- var updated = getDisplacement({
- draggable: draggables[current.draggableId],
- destination: droppable,
- previousImpact: previousImpact,
- viewport: viewport.frame
- });
- return updated;
- });
- return withUpdatedVisibility;
- };
-
- var forceVisibleDisplacement = function forceVisibleDisplacement(current) {
- if (current.isVisible) {
- return current;
- }
-
- return {
- draggableId: current.draggableId,
- isVisible: true,
- shouldAnimate: false
- };
- };
-
- var withFirstRemoved = function withFirstRemoved(_ref2) {
- var dragging = _ref2.dragging,
- isVisibleInNewLocation = _ref2.isVisibleInNewLocation,
- previousImpact = _ref2.previousImpact,
- droppable = _ref2.droppable,
- draggables = _ref2.draggables;
- var last = previousImpact.movement.displaced;
- !last.length ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Cannot remove displacement from empty list') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- var withFirstRestored = last.slice(1, last.length);
-
- if (!withFirstRestored.length) {
- return withFirstRestored;
- }
-
- if (isVisibleInNewLocation) {
- return withFirstRestored;
- }
-
- var axis = droppable.axis;
- var sizeOfRestored = draggables[last[0].draggableId].page.marginBox[axis.size];
- var sizeOfDragging = draggables[dragging].page.marginBox[axis.size];
- var buffer = sizeOfRestored + sizeOfDragging;
- var withUpdatedVisibility = withFirstRestored.map(function (displacement, index) {
- if (index === 0) {
- return forceVisibleDisplacement(displacement);
- }
-
- if (buffer > 0) {
- var current = draggables[displacement.draggableId];
- var size = current.page.marginBox[axis.size];
- buffer -= size;
- return forceVisibleDisplacement(displacement);
- }
-
- return {
- draggableId: displacement.draggableId,
- isVisible: false,
- shouldAnimate: false
- };
- });
- return withUpdatedVisibility;
- };
-
- var inHomeList$1 = (function (_ref) {
- var isMovingForward = _ref.isMovingForward,
- draggableId = _ref.draggableId,
- previousPageBorderBoxCenter = _ref.previousPageBorderBoxCenter,
- previousImpact = _ref.previousImpact,
- droppable = _ref.droppable,
- draggables = _ref.draggables,
- viewport = _ref.viewport;
- var location = previousImpact.destination;
- !location ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Cannot move to next index in home list when there is no previous destination') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- var draggable = draggables[draggableId];
- var axis = droppable.axis;
- var insideDroppable = getDraggablesInsideDroppable(droppable, draggables);
- var startIndex = draggable.descriptor.index;
- var currentIndex = location.index;
- var proposedIndex = isMovingForward ? currentIndex + 1 : currentIndex - 1;
-
- if (proposedIndex > insideDroppable.length - 1) {
- return null;
- }
-
- if (proposedIndex < 0) {
- return null;
- }
-
- var destination = insideDroppable[proposedIndex];
- var isMovingTowardStart = isMovingForward && proposedIndex <= startIndex || !isMovingForward && proposedIndex >= startIndex;
-
- var edge = function () {
- if (!isMovingTowardStart) {
- return isMovingForward ? 'end' : 'start';
- }
-
- return isMovingForward ? 'start' : 'end';
- }();
-
- var newPageBorderBoxCenter = moveToEdge({
- source: draggable.page.borderBox,
- sourceEdge: edge,
- destination: destination.page.borderBox,
- destinationEdge: edge,
- destinationAxis: droppable.axis
- });
- var isVisibleInNewLocation = isTotallyVisibleInNewLocation({
- draggable: draggable,
- destination: droppable,
- newPageBorderBoxCenter: newPageBorderBoxCenter,
- viewport: viewport.frame
- });
- var displaced = isMovingTowardStart ? withFirstRemoved({
- dragging: draggableId,
- isVisibleInNewLocation: isVisibleInNewLocation,
- previousImpact: previousImpact,
- droppable: droppable,
- draggables: draggables
- }) : withFirstAdded({
- add: destination.descriptor.id,
- previousImpact: previousImpact,
- droppable: droppable,
- draggables: draggables,
- viewport: viewport
- });
- var newImpact = {
- movement: {
- displaced: displaced,
- amount: patch(axis.line, draggable.page.marginBox[axis.size]),
- isBeyondStartPosition: proposedIndex > startIndex
- },
- destination: {
- droppableId: droppable.descriptor.id,
- index: proposedIndex
- },
- direction: droppable.axis.direction
- };
-
- if (isVisibleInNewLocation) {
- return {
- pageBorderBoxCenter: withDroppableDisplacement(droppable, newPageBorderBoxCenter),
- impact: newImpact,
- scrollJumpRequest: null
- };
- }
-
- var distance$$1 = subtract(newPageBorderBoxCenter, previousPageBorderBoxCenter);
- var distanceWithScroll = withDroppableDisplacement(droppable, distance$$1);
- return {
- pageBorderBoxCenter: previousPageBorderBoxCenter,
- impact: newImpact,
- scrollJumpRequest: distanceWithScroll
- };
- });
-
- var inForeignList$1 = (function (_ref) {
- var isMovingForward = _ref.isMovingForward,
- draggableId = _ref.draggableId,
- previousImpact = _ref.previousImpact,
- previousPageBorderBoxCenter = _ref.previousPageBorderBoxCenter,
- droppable = _ref.droppable,
- draggables = _ref.draggables,
- viewport = _ref.viewport;
- !previousImpact.destination ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Cannot move to next index where there is no previous destination') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- var location = previousImpact.destination;
- var draggable = draggables[draggableId];
- var axis = droppable.axis;
- var insideForeignDroppable = getDraggablesInsideDroppable(droppable, draggables);
- var currentIndex = location.index;
- var proposedIndex = isMovingForward ? currentIndex + 1 : currentIndex - 1;
- var lastIndex = insideForeignDroppable.length - 1;
-
- if (proposedIndex > insideForeignDroppable.length) {
- return null;
- }
-
- if (proposedIndex < 0) {
- return null;
- }
-
- var movingRelativeTo = insideForeignDroppable[Math.min(proposedIndex, lastIndex)];
- var isMovingPastLastIndex = proposedIndex > lastIndex;
- var sourceEdge = 'start';
-
- var destinationEdge = function () {
- if (isMovingPastLastIndex) {
- return 'end';
- }
-
- return 'start';
- }();
-
- var newPageBorderBoxCenter = moveToEdge({
- source: draggable.page.borderBox,
- sourceEdge: sourceEdge,
- destination: movingRelativeTo.page.marginBox,
- destinationEdge: destinationEdge,
- destinationAxis: droppable.axis
- });
- var isVisibleInNewLocation = isTotallyVisibleInNewLocation({
- draggable: draggable,
- destination: droppable,
- newPageBorderBoxCenter: newPageBorderBoxCenter,
- viewport: viewport.frame
- });
-
- var displaced = function () {
- if (isMovingForward) {
- return withFirstRemoved({
- dragging: draggableId,
- isVisibleInNewLocation: isVisibleInNewLocation,
- previousImpact: previousImpact,
- droppable: droppable,
- draggables: draggables
- });
- }
-
- return withFirstAdded({
- add: movingRelativeTo.descriptor.id,
- previousImpact: previousImpact,
- droppable: droppable,
- draggables: draggables,
- viewport: viewport
- });
- }();
-
- var newImpact = {
- movement: {
- displaced: displaced,
- amount: patch(axis.line, draggable.page.marginBox[axis.size]),
- isBeyondStartPosition: false
- },
- destination: {
- droppableId: droppable.descriptor.id,
- index: proposedIndex
- },
- direction: droppable.axis.direction
- };
-
- if (isVisibleInNewLocation) {
- return {
- pageBorderBoxCenter: withDroppableDisplacement(droppable, newPageBorderBoxCenter),
- impact: newImpact,
- scrollJumpRequest: null
- };
- }
-
- var distanceMoving = subtract(newPageBorderBoxCenter, previousPageBorderBoxCenter);
- var distanceWithScroll = withDroppableDisplacement(droppable, distanceMoving);
- return {
- pageBorderBoxCenter: previousPageBorderBoxCenter,
- impact: newImpact,
- scrollJumpRequest: distanceWithScroll
- };
- });
-
- var moveToNextIndex = (function (args) {
- var draggableId = args.draggableId,
- draggables = args.draggables,
- droppable = args.droppable;
- var draggable = draggables[draggableId];
- var isInHomeList = draggable.descriptor.droppableId === droppable.descriptor.id;
-
- if (!droppable.isEnabled) {
- return null;
- }
-
- if (isInHomeList) {
- return inHomeList$1(args);
- }
-
- return inForeignList$1(args);
- });
-
- var getClientSelection = function getClientSelection(pageBorderBoxCenter, currentScroll) {
- return subtract(pageBorderBoxCenter, currentScroll);
- };
-
- var moveInDirection = (function (_ref) {
- var state = _ref.state,
- type = _ref.type;
-
- var _ref2 = function () {
- if (state.impact.destination) {
- return {
- droppable: state.dimensions.droppables[state.impact.destination.droppableId],
- isMainAxisMovementAllowed: true
- };
- }
-
- return {
- droppable: state.dimensions.droppables[state.critical.droppable.id],
- isMainAxisMovementAllowed: false
- };
- }(),
- droppable = _ref2.droppable,
- isMainAxisMovementAllowed = _ref2.isMainAxisMovementAllowed;
-
- var direction = droppable.axis.direction;
- var isMovingOnMainAxis = direction === 'vertical' && (type === 'MOVE_UP' || type === 'MOVE_DOWN') || direction === 'horizontal' && (type === 'MOVE_LEFT' || type === 'MOVE_RIGHT');
-
- if (isMovingOnMainAxis && !isMainAxisMovementAllowed) {
- return null;
- }
-
- var isMovingForward = type === 'MOVE_DOWN' || type === 'MOVE_RIGHT';
-
- if (isMovingOnMainAxis) {
- var _result = moveToNextIndex({
- isMovingForward: isMovingForward,
- draggableId: state.critical.draggable.id,
- droppable: droppable,
- draggables: state.dimensions.draggables,
- previousPageBorderBoxCenter: state.current.page.borderBoxCenter,
- previousImpact: state.impact,
- viewport: state.viewport
- });
-
- if (!_result) {
- return null;
- }
-
- return {
- impact: _result.impact,
- clientSelection: getClientSelection(_result.pageBorderBoxCenter, state.viewport.scroll.current),
- scrollJumpRequest: _result.scrollJumpRequest
- };
- }
-
- var home = getHomeLocation(state.critical);
- var result = moveCrossAxis({
- isMovingForward: isMovingForward,
- pageBorderBoxCenter: state.current.page.borderBoxCenter,
- draggableId: state.critical.draggable.id,
- droppableId: droppable.descriptor.id,
- home: home,
- draggables: state.dimensions.draggables,
- droppables: state.dimensions.droppables,
- previousImpact: state.impact,
- viewport: state.viewport
- });
-
- if (!result) {
- return null;
- }
-
- return {
- clientSelection: getClientSelection(result.pageBorderBoxCenter, state.viewport.scroll.current),
- impact: result.impact,
- scrollJumpRequest: null
- };
- });
-
- var scrollViewport = (function (viewport, newScroll) {
- var diff = subtract(newScroll, viewport.scroll.initial);
- var displacement = negate(diff);
- var frame = Object(__WEBPACK_IMPORTED_MODULE_2_css_box_model__["d" /* getRect */])({
- top: newScroll.y,
- bottom: newScroll.y + viewport.frame.height,
- left: newScroll.x,
- right: newScroll.x + viewport.frame.width
- });
- var updated = {
- frame: frame,
- scroll: {
- initial: viewport.scroll.initial,
- max: viewport.scroll.max,
- current: newScroll,
- diff: {
- value: diff,
- displacement: displacement
- }
- }
- };
- return updated;
- });
-
- var getHomeImpact = (function (critical, dimensions) {
- var home = dimensions.droppables[critical.droppable.id];
- var axis = home.axis;
- var draggable = dimensions.draggables[critical.draggable.id];
- return {
- movement: {
- displaced: [],
- isBeyondStartPosition: false,
- amount: patch(axis.line, draggable.client.marginBox[axis.size])
- },
- direction: axis.direction,
- destination: getHomeLocation(critical)
- };
- });
-
- var getPageItemPositions = (function (client, windowScroll) {
- return {
- selection: add(client.selection, windowScroll),
- borderBoxCenter: add(client.borderBoxCenter, windowScroll),
- offset: add(client.offset, windowScroll)
- };
- });
-
- function isMovementAllowed(state) {
- return state.phase === 'DRAGGING' || state.phase === 'COLLECTING';
- }
-
- var idle = {
- phase: 'IDLE'
- };
- var preparing = {
- phase: 'PREPARING'
- };
-
- var moveWithPositionUpdates = function moveWithPositionUpdates(_ref) {
- var state = _ref.state,
- clientSelection = _ref.clientSelection,
- shouldAnimate = _ref.shouldAnimate,
- viewport = _ref.viewport,
- impact = _ref.impact,
- scrollJumpRequest = _ref.scrollJumpRequest;
- var newViewport = viewport || state.viewport;
- var currentWindowScroll = newViewport.scroll.current;
-
- var client = function () {
- var offset = subtract(clientSelection, state.initial.client.selection);
- return {
- offset: offset,
- selection: clientSelection,
- borderBoxCenter: add(state.initial.client.borderBoxCenter, offset)
- };
- }();
-
- var page = getPageItemPositions(client, currentWindowScroll);
- var current = {
- client: client,
- page: page
- };
-
- if (state.phase === 'COLLECTING') {
- return Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({
- phase: 'COLLECTING'
- }, state, {
- current: current
- });
- }
-
- var newImpact = impact || getDragImpact({
- pageBorderBoxCenter: page.borderBoxCenter,
- draggable: state.dimensions.draggables[state.critical.draggable.id],
- draggables: state.dimensions.draggables,
- droppables: state.dimensions.droppables,
- previousImpact: state.impact,
- viewport: newViewport
- });
-
- var result = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, state, {
- current: current,
- shouldAnimate: shouldAnimate,
- impact: newImpact,
- scrollJumpRequest: scrollJumpRequest || null,
- viewport: newViewport
- });
-
- return result;
- };
-
- var reducer = (function (state, action) {
- if (state === void 0) {
- state = idle;
- }
-
- if (action.type === 'CLEAN') {
- return idle;
- }
-
- if (action.type === 'PREPARE') {
- return preparing;
- }
-
- if (action.type === 'INITIAL_PUBLISH') {
- !(state.phase === 'PREPARING') ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'INITIAL_PUBLISH must come after a PREPARING phase') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- var _action$payload = action.payload,
- critical = _action$payload.critical,
- client = _action$payload.client,
- viewport = _action$payload.viewport,
- dimensions = _action$payload.dimensions,
- autoScrollMode = _action$payload.autoScrollMode;
- var initial = {
- client: client,
- page: {
- selection: add(client.selection, viewport.scroll.initial),
- borderBoxCenter: add(client.selection, viewport.scroll.initial),
- offset: origin
- }
- };
- var result = {
- phase: 'DRAGGING',
- isDragging: true,
- critical: critical,
- autoScrollMode: autoScrollMode,
- dimensions: dimensions,
- initial: initial,
- current: initial,
- impact: getHomeImpact(critical, dimensions),
- viewport: viewport,
- scrollJumpRequest: null,
- shouldAnimate: false
- };
- return result;
- }
-
- if (action.type === 'COLLECTION_STARTING') {
- var _extends2;
-
- if (state.phase === 'COLLECTING' || state.phase === 'DROP_PENDING') {
- return state;
- }
-
- !(state.phase === 'DRAGGING') ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, "Collection cannot start from phase " + state.phase) : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
-
- var _result = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({
- phase: 'COLLECTING'
- }, state, (_extends2 = {}, _extends2["phase"] = 'COLLECTING', _extends2));
-
- return _result;
- }
-
- if (action.type === 'PUBLISH') {
- !(state.phase === 'COLLECTING' || state.phase === 'DROP_PENDING') ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, "Unexpected " + action.type + " received in phase " + state.phase) : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, "Dynamic additions and removals of Draggable and Droppable components\n is currently not supported. But will be soon!") : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false);
- }
-
- if (action.type === 'MOVE') {
- if (state.phase === 'PREPARING') {
- return state;
- }
-
- if (state.phase === 'DROP_PENDING') {
- return state;
- }
-
- !isMovementAllowed(state) ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, action.type + " not permitted in phase " + state.phase) : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- var _action$payload2 = action.payload,
- _client = _action$payload2.client,
- shouldAnimate = _action$payload2.shouldAnimate;
-
- if (state.shouldAnimate === shouldAnimate && isEqual(_client, state.current.client.selection)) {
- return state;
- }
-
- var impact = state.autoScrollMode === 'JUMP' ? state.impact : null;
- return moveWithPositionUpdates({
- state: state,
- clientSelection: _client,
- impact: impact,
- shouldAnimate: shouldAnimate
- });
- }
-
- if (action.type === 'UPDATE_DROPPABLE_SCROLL') {
- var _extends3, _extends4;
-
- if (state.phase === 'PREPARING') {
- return state;
- }
-
- if (state.phase === 'DROP_PENDING') {
- return state;
- }
-
- !isMovementAllowed(state) ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, action.type + " not permitted in phase " + state.phase) : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- var _action$payload3 = action.payload,
- id = _action$payload3.id,
- offset = _action$payload3.offset;
- var target = state.dimensions.droppables[id];
-
- if (!target) {
- return state;
- }
-
- var updated = scrollDroppable(target, offset);
-
- var _dimensions = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, state.dimensions, {
- droppables: Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, state.dimensions.droppables, (_extends3 = {}, _extends3[id] = updated, _extends3))
- });
-
- var _impact = function () {
- !isMovementAllowed(state) ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
-
- if (state.autoScrollMode === 'JUMP') {
- return state.impact;
- }
-
- return getDragImpact({
- pageBorderBoxCenter: state.current.page.borderBoxCenter,
- draggable: _dimensions.draggables[state.critical.draggable.id],
- draggables: _dimensions.draggables,
- droppables: _dimensions.droppables,
- previousImpact: state.impact,
- viewport: state.viewport
- });
- }();
-
- return Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({
- phase: 'DRAGGING'
- }, state, (_extends4 = {}, _extends4["phase"] = state.phase, _extends4.impact = _impact, _extends4.dimensions = _dimensions, _extends4.scrollJumpRequest = null, _extends4));
- }
-
- if (action.type === 'UPDATE_DROPPABLE_IS_ENABLED') {
- var _extends5, _extends6;
-
- if (state.phase === 'DROP_PENDING') {
- return state;
- }
-
- !isMovementAllowed(state) ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, "Attempting to move in an unsupported phase " + state.phase) : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- var _action$payload4 = action.payload,
- _id = _action$payload4.id,
- isEnabled = _action$payload4.isEnabled;
- var _target = state.dimensions.droppables[_id];
- !_target ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, "Cannot find Droppable[id: " + _id + "] to toggle its enabled state") : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- !(_target.isEnabled !== isEnabled) ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, "Trying to set droppable isEnabled to " + String(isEnabled) + "\n but it is already " + String(_target.isEnabled)) : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
-
- var _updated = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, _target, {
- isEnabled: isEnabled
- });
-
- var _dimensions2 = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, state.dimensions, {
- droppables: Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, state.dimensions.droppables, (_extends5 = {}, _extends5[_id] = _updated, _extends5))
- });
-
- var _impact2 = getDragImpact({
- pageBorderBoxCenter: state.current.page.borderBoxCenter,
- draggable: _dimensions2.draggables[state.critical.draggable.id],
- draggables: _dimensions2.draggables,
- droppables: _dimensions2.droppables,
- previousImpact: state.impact,
- viewport: state.viewport
- });
-
- return Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({
- phase: 'DRAGGING'
- }, state, (_extends6 = {}, _extends6["phase"] = state.phase, _extends6.impact = _impact2, _extends6.dimensions = _dimensions2, _extends6));
- }
-
- if (action.type === 'MOVE_BY_WINDOW_SCROLL') {
- if (state.phase === 'PREPARING') {
- return state;
- }
-
- if (state.phase === 'DROP_PENDING' || state.phase === 'DROP_ANIMATING') {
- return state;
- }
-
- !isMovementAllowed(state) ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, "Cannot move by window in phase " + state.phase) : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- var newScroll = action.payload.scroll;
-
- if (isEqual(state.viewport.scroll.current, newScroll)) {
- return state;
- }
-
- var isJumpScrolling = state.autoScrollMode === 'JUMP';
-
- var _impact3 = isJumpScrolling ? state.impact : null;
-
- var _viewport = scrollViewport(state.viewport, newScroll);
-
- return moveWithPositionUpdates({
- state: state,
- clientSelection: state.current.client.selection,
- viewport: _viewport,
- shouldAnimate: false,
- impact: _impact3
- });
- }
-
- if (action.type === 'UPDATE_VIEWPORT_MAX_SCROLL') {
- var _extends7;
-
- !state.isDragging ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Cannot update the max viewport scroll if not dragging') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- var existing = state.viewport;
-
- var _viewport2 = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, existing, {
- scroll: Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, existing.scroll, {
- max: action.payload
- })
- });
-
- return Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({
- phase: 'DRAGGING'
- }, state, (_extends7 = {}, _extends7["phase"] = state.phase, _extends7.viewport = _viewport2, _extends7));
- }
-
- if (action.type === 'MOVE_UP' || action.type === 'MOVE_DOWN' || action.type === 'MOVE_LEFT' || action.type === 'MOVE_RIGHT') {
- if (state.phase === 'PREPARING') {
- return state;
- }
-
- if (state.phase === 'COLLECTING' || state.phase === 'DROP_PENDING') {
- return state;
- }
-
- !(state.phase === 'DRAGGING') ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, action.type + " received while not in DRAGGING phase") : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
-
- var _result2 = moveInDirection({
- state: state,
- type: action.type
- });
-
- if (!_result2) {
- return state;
- }
-
- return moveWithPositionUpdates({
- state: state,
- impact: _result2.impact,
- clientSelection: _result2.clientSelection,
- shouldAnimate: true,
- scrollJumpRequest: _result2.scrollJumpRequest
- });
- }
-
- if (action.type === 'DROP_PENDING') {
- var _extends8;
-
- var reason = action.payload.reason;
- !(state.phase === 'COLLECTING') ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Can only move into the DROP_PENDING phase from the COLLECTING phase') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
-
- var newState = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({
- phase: 'DROP_PENDING'
- }, state, (_extends8 = {}, _extends8["phase"] = 'DROP_PENDING', _extends8.isWaiting = true, _extends8.reason = reason, _extends8));
-
- return newState;
- }
-
- if (action.type === 'DROP_ANIMATE') {
- var pending = action.payload;
- !(state.phase === 'DRAGGING' || state.phase === 'DROP_PENDING') ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, "Cannot animate drop from phase " + state.phase) : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- var _result3 = {
- phase: 'DROP_ANIMATING',
- pending: pending,
- dimensions: state.dimensions
- };
- return _result3;
- }
-
- if (action.type === 'DROP_COMPLETE') {
- return idle;
- }
-
- return state;
- });
-
- var lift = function lift(args) {
- return {
- type: 'LIFT',
- payload: args
- };
- };
- var initialPublish = function initialPublish(args) {
- return {
- type: 'INITIAL_PUBLISH',
- payload: args
- };
- };
- var publish = function publish(args) {
- return {
- type: 'PUBLISH',
- payload: args
- };
- };
- var collectionStarting = function collectionStarting() {
- return {
- type: 'COLLECTION_STARTING',
- payload: null
- };
- };
- var updateDroppableScroll = function updateDroppableScroll(args) {
- return {
- type: 'UPDATE_DROPPABLE_SCROLL',
- payload: args
- };
- };
- var updateDroppableIsEnabled = function updateDroppableIsEnabled(args) {
- return {
- type: 'UPDATE_DROPPABLE_IS_ENABLED',
- payload: args
- };
- };
- var move = function move(args) {
- return {
- type: 'MOVE',
- payload: args
- };
- };
- var moveByWindowScroll = function moveByWindowScroll(args) {
- return {
- type: 'MOVE_BY_WINDOW_SCROLL',
- payload: args
- };
- };
- var updateViewportMaxScroll = function updateViewportMaxScroll(max) {
- return {
- type: 'UPDATE_VIEWPORT_MAX_SCROLL',
- payload: max
- };
- };
- var moveUp = function moveUp() {
- return {
- type: 'MOVE_UP',
- payload: null
- };
- };
- var moveDown = function moveDown() {
- return {
- type: 'MOVE_DOWN',
- payload: null
- };
- };
- var moveRight = function moveRight() {
- return {
- type: 'MOVE_RIGHT',
- payload: null
- };
- };
- var moveLeft = function moveLeft() {
- return {
- type: 'MOVE_LEFT',
- payload: null
- };
- };
- var clean = function clean() {
- return {
- type: 'CLEAN',
- payload: null
- };
- };
- var prepare = function prepare() {
- return {
- type: 'PREPARE',
- payload: null
- };
- };
- var animateDrop = function animateDrop(pending) {
- return {
- type: 'DROP_ANIMATE',
- payload: pending
- };
- };
- var completeDrop = function completeDrop(result) {
- return {
- type: 'DROP_COMPLETE',
- payload: result
- };
- };
- var drop = function drop(args) {
- return {
- type: 'DROP',
- payload: args
- };
- };
- var dropPending = function dropPending(args) {
- return {
- type: 'DROP_PENDING',
- payload: args
- };
- };
- var dropAnimationFinished = function dropAnimationFinished() {
- return {
- type: 'DROP_ANIMATION_FINISHED',
- payload: null
- };
- };
-
- var lift$1 = (function (getMarshal) {
- var timeoutId = null;
-
- var tryAbortCriticalCollection = function tryAbortCriticalCollection() {
- if (timeoutId == null) {
- return;
- }
-
- clearTimeout(timeoutId);
- timeoutId = null;
- };
-
- return function (_ref) {
- var getState = _ref.getState,
- dispatch = _ref.dispatch;
- return function (next) {
- return function (action) {
- if (action.type === 'CLEAN') {
- tryAbortCriticalCollection();
- next(action);
- return;
- }
-
- if (action.type !== 'LIFT') {
- next(action);
- return;
- }
-
- !!timeoutId ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'There should not be a pending complete lift phase when a lift action is fired') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- var marshal = getMarshal();
- var _action$payload = action.payload,
- id = _action$payload.id,
- client = _action$payload.client,
- autoScrollMode = _action$payload.autoScrollMode,
- viewport = _action$payload.viewport;
- var initial = getState();
-
- if (initial.phase === 'DROP_ANIMATING') {
- dispatch(completeDrop(initial.pending.result));
- }
-
- var postFlushState = getState();
- !(postFlushState.phase === 'IDLE') ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Incorrect phase to start a drag') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- dispatch(prepare());
- timeoutId = setTimeout(function () {
- timeoutId = null;
- var state = getState();
- !(state.phase === 'PREPARING') ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Invalid phase for completing lift') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- var scrollOptions = {
- shouldPublishImmediately: autoScrollMode === 'JUMP'
- };
- var request = {
- draggableId: id,
- scrollOptions: scrollOptions
- };
-
- var _marshal$startPublish = marshal.startPublishing(request, viewport.scroll.current),
- critical = _marshal$startPublish.critical,
- dimensions = _marshal$startPublish.dimensions;
-
- dispatch(initialPublish({
- critical: critical,
- dimensions: dimensions,
- client: client,
- autoScrollMode: autoScrollMode,
- viewport: viewport
- }));
- });
- };
- };
- };
- });
-
- var style = (function (marshal) {
- return function () {
- return function (next) {
- return function (action) {
- if (action.type === 'INITIAL_PUBLISH') {
- marshal.dragging();
- }
-
- if (action.type === 'COLLECTION_STARTING') {
- marshal.collecting();
- }
-
- if (action.type === 'PUBLISH') {
- marshal.dragging();
- }
-
- if (action.type === 'DROP_ANIMATE') {
- marshal.dropping(action.payload.result.reason);
- }
-
- if (action.type === 'CLEAN' || action.type === 'DROP_COMPLETE') {
- marshal.resting();
- }
-
- next(action);
- };
- };
- };
- });
-
- var getNewHomeClientBorderBoxCenter = (function (_ref) {
- var movement = _ref.movement,
- draggable = _ref.draggable,
- draggables = _ref.draggables,
- destination = _ref.destination;
- var originalCenter = draggable.client.borderBox.center;
-
- if (destination == null) {
- return originalCenter;
- }
-
- var displaced = movement.displaced,
- isBeyondStartPosition = movement.isBeyondStartPosition;
- var axis = destination.axis;
- var isWithinHomeDroppable = destination.descriptor.id === draggable.descriptor.droppableId;
-
- if (isWithinHomeDroppable && !displaced.length) {
- return originalCenter;
- }
-
- var draggablesInDestination = getDraggablesInsideDroppable(destination, draggables);
-
- var movingRelativeTo = function () {
- if (isWithinHomeDroppable) {
- return draggables[displaced[0].draggableId].client.borderBox;
- }
-
- if (displaced.length) {
- return draggables[displaced[0].draggableId].client.borderBox;
- }
-
- if (draggablesInDestination.length) {
- return draggablesInDestination[draggablesInDestination.length - 1].client.marginBox;
- }
-
- return destination.client.contentBox;
- }();
-
- var _ref2 = function () {
- if (isWithinHomeDroppable) {
- if (isBeyondStartPosition) {
- return {
- sourceEdge: 'end',
- destinationEdge: 'end'
- };
- }
-
- return {
- sourceEdge: 'start',
- destinationEdge: 'start'
- };
- }
-
- if (!displaced.length && draggablesInDestination.length) {
- return {
- sourceEdge: 'start',
- destinationEdge: 'end'
- };
- }
-
- return {
- sourceEdge: 'start',
- destinationEdge: 'start'
- };
- }(),
- sourceEdge = _ref2.sourceEdge,
- destinationEdge = _ref2.destinationEdge;
-
- var source = draggable.client.borderBox;
- var targetCenter = moveToEdge({
- source: source,
- sourceEdge: sourceEdge,
- destination: movingRelativeTo,
- destinationEdge: destinationEdge,
- destinationAxis: axis
- });
- return targetCenter;
- });
-
- var getScrollDisplacement = function getScrollDisplacement(droppable, viewport) {
- return withDroppableDisplacement(droppable, viewport.scroll.diff.displacement);
- };
-
- var drop$1 = (function (_ref) {
- var getState = _ref.getState,
- dispatch = _ref.dispatch;
- return function (next) {
- return function (action) {
- if (action.type !== 'DROP') {
- next(action);
- return;
- }
-
- var state = getState();
- var reason = action.payload.reason;
-
- if (state.phase === 'COLLECTING') {
- dispatch(dropPending({
- reason: reason
- }));
- return;
- }
-
- if (state.phase === 'PREPARING') {
- dispatch(clean());
- return;
- }
-
- if (state.phase === 'IDLE') {
- return;
- }
-
- var isWaitingForDrop = state.phase === 'DROP_PENDING' && state.isWaiting;
- !!isWaitingForDrop ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'A DROP action occurred while DROP_PENDING and still waiting') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- !(state.phase === 'DRAGGING' || state.phase === 'DROP_PENDING') ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, "Cannot drop in phase: " + state.phase) : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- var critical = state.critical;
- var dimensions = state.dimensions;
- var impact = reason === 'DROP' ? state.impact : noImpact;
- var home = dimensions.droppables[state.critical.droppable.id];
- var draggable = dimensions.draggables[state.critical.draggable.id];
- var droppable = impact && impact.destination ? dimensions.droppables[impact.destination.droppableId] : null;
- var source = {
- index: critical.draggable.index,
- droppableId: critical.droppable.id
- };
- var destination = reason === 'DROP' ? impact.destination : null;
- var result = {
- draggableId: draggable.descriptor.id,
- type: home.descriptor.type,
- source: source,
- destination: destination,
- reason: reason
- };
-
- var clientOffset = function () {
- if (reason === 'CANCEL') {
- return origin;
- }
-
- var newBorderBoxClientCenter = getNewHomeClientBorderBoxCenter({
- movement: impact.movement,
- draggable: draggable,
- draggables: dimensions.draggables,
- destination: droppable
- });
- return subtract(newBorderBoxClientCenter, draggable.client.borderBox.center);
- }();
-
- var newHomeOffset = add(clientOffset, getScrollDisplacement(droppable || home, state.viewport));
- var isAnimationRequired = !isEqual(state.current.client.offset, newHomeOffset);
- var pending = {
- newHomeOffset: newHomeOffset,
- result: result,
- impact: impact
- };
-
- if (isAnimationRequired) {
- dispatch(animateDrop(pending));
- return;
- }
-
- dispatch(completeDrop(result));
- };
- };
- });
-
- var onDragStart = function onDragStart(start) {
- return "\n You have lifted an item in position " + (start.source.index + 1) + ".\n Use the arrow keys to move, space bar to drop, and escape to cancel.\n";
- };
-
- var onDragUpdate = function onDragUpdate(update) {
- if (!update.destination) {
- return 'You are currently not dragging over a droppable area';
- }
-
- if (update.source.droppableId === update.destination.droppableId) {
- return "You have moved the item to position " + (update.destination.index + 1);
- }
-
- return "\n You have moved the item from list " + update.source.droppableId + " in position " + (update.source.index + 1) + "\n to list " + update.destination.droppableId + " in position " + (update.destination.index + 1) + "\n ";
- };
-
- var onDragEnd = function onDragEnd(result) {
- if (result.reason === 'CANCEL') {
- return "\n Movement cancelled.\n The item has returned to its starting position of " + (result.source.index + 1) + "\n ";
- }
-
- if (!result.destination) {
- return "\n The item has been dropped while not over a droppable location.\n The item has returned to its starting position of " + (result.source.index + 1) + "\n ";
- }
-
- if (result.source.droppableId === result.destination.droppableId) {
- if (result.source.index === result.destination.index) {
- return "\n You have dropped the item.\n It has been dropped on its starting position of " + (result.source.index + 1) + "\n ";
- }
-
- return "\n You have dropped the item.\n It has moved from position " + (result.source.index + 1) + " to " + (result.destination.index + 1) + "\n ";
- }
-
- return "\n You have dropped the item.\n It has moved from position " + (result.source.index + 1) + " in list " + result.source.droppableId + "\n to position " + (result.destination.index + 1) + " in list " + result.destination.droppableId + "\n ";
- };
-
- var preset = {
- onDragStart: onDragStart,
- onDragUpdate: onDragUpdate,
- onDragEnd: onDragEnd
- };
-
- var records = {};
- var flag = '__react-beautiful-dnd-debug-timings-hook__';
-
- var isTimingsEnabled = function isTimingsEnabled() {
- return Boolean(window[flag]);
- };
-
- var start = function start(key) {
- if (process.env.NODE_ENV !== 'production') {
- if (!isTimingsEnabled()) {
- return;
- }
-
- var now = performance.now();
- records[key] = now;
- }
- };
- var finish = function finish(key) {
- if (process.env.NODE_ENV !== 'production') {
- if (!isTimingsEnabled()) {
- return;
- }
-
- var now = performance.now();
- var previous = records[key];
- !previous ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'cannot finish timing as no previous time found') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- var result = now - previous;
- var rounded = result.toFixed(2);
-
- var style = function () {
- if (result < 12) {
- return {
- textColor: 'green',
- symbol: '✅'
- };
- }
-
- if (result < 40) {
- return {
- textColor: 'orange',
- symbol: '⚠️'
- };
- }
-
- return {
- textColor: 'red',
- symbol: '❌'
- };
- }();
-
- console.log(style.symbol + " %cTiming %c" + rounded + " %cms %c" + key, 'color: blue; font-weight: bold; ', "color: " + style.textColor + "; font-size: 1.1em;", 'color: grey;', 'color: purple; font-weight: bold;');
- }
- };
-
- var withTimings = function withTimings(key, fn) {
- start(key);
- fn();
- finish(key);
- };
-
- var areLocationsEqual = function areLocationsEqual(first, second) {
- if (first == null && second == null) {
- return true;
- }
-
- if (first == null || second == null) {
- return false;
- }
-
- return first.droppableId === second.droppableId && first.index === second.index;
- };
-
- var isCriticalEqual = function isCriticalEqual(first, second) {
- if (first === second) {
- return true;
- }
-
- var isDraggableEqual = first.draggable.id === second.draggable.id && first.draggable.droppableId === second.draggable.droppableId && first.draggable.type === second.draggable.type && first.draggable.index === second.draggable.index;
- var isDroppableEqual = first.droppable.id === second.droppable.id && first.droppable.type === second.droppable.type;
- return isDraggableEqual && isDroppableEqual;
- };
-
- var getExpiringAnnounce = function getExpiringAnnounce(announce) {
- var wasCalled = false;
- var isExpired = false;
- setTimeout(function () {
- isExpired = true;
- });
-
- var result = function result(message) {
- if (wasCalled) {
- if (process.env.NODE_ENV !== 'production') {
- console.warn('Announcement already made. Not making a second announcement');
- }
-
- return;
- }
-
- if (isExpired) {
- if (process.env.NODE_ENV !== 'production') {
- console.warn("\n Announcements cannot be made asynchronously.\n Default message has already been announced.\n ");
- }
-
- return;
- }
-
- wasCalled = true;
- announce(message);
- };
-
- result.wasCalled = function () {
- return wasCalled;
- };
-
- return result;
- };
-
- var getDragStart = function getDragStart(critical) {
- return {
- draggableId: critical.draggable.id,
- type: critical.droppable.type,
- source: {
- droppableId: critical.droppable.id,
- index: critical.draggable.index
- }
- };
- };
-
- var hooks = (function (getHooks, announce) {
- var execute = function execute(hook, data, getDefaultMessage) {
- if (!hook) {
- announce(getDefaultMessage(data));
- return;
- }
-
- var willExpire = getExpiringAnnounce(announce);
- var provided = {
- announce: willExpire
- };
- hook(data, provided);
-
- if (!willExpire.wasCalled()) {
- announce(getDefaultMessage(data));
- }
- };
-
- var publisher = function () {
- var lastLocation = null;
- var lastCritical = null;
- var _isDragStartPublished = false;
-
- var beforeStart = function beforeStart(critical) {
- !!_isDragStartPublished ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Cannot fire onBeforeDragStart as a drag start has already been published') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- withTimings('onBeforeDragStart', function () {
- var fn = getHooks().onBeforeDragStart;
-
- if (fn) {
- fn(getDragStart(critical));
- }
- });
- };
-
- var start$$1 = function start$$1(critical) {
- !!_isDragStartPublished ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Cannot fire onBeforeDragStart as a drag start has already been published') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- var data = getDragStart(critical);
- lastCritical = critical;
- lastLocation = data.source;
- _isDragStartPublished = true;
- withTimings('onDragStart', function () {
- return execute(getHooks().onDragStart, data, preset.onDragStart);
- });
- };
-
- var move = function move(critical, location) {
- !(_isDragStartPublished && lastCritical) ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Cannot fire onDragMove when onDragStart has not been called') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- var hasCriticalChanged = !isCriticalEqual(critical, lastCritical);
-
- if (hasCriticalChanged) {
- lastCritical = critical;
- }
-
- var hasLocationChanged = !areLocationsEqual(lastLocation, location);
-
- if (hasLocationChanged) {
- lastLocation = location;
- }
-
- if (!hasCriticalChanged && !hasLocationChanged) {
- return;
- }
-
- var data = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, getDragStart(critical), {
- destination: location
- });
-
- withTimings('onDragUpdate', function () {
- return execute(getHooks().onDragUpdate, data, preset.onDragUpdate);
- });
- };
-
- var drop = function drop(result) {
- !_isDragStartPublished ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Cannot fire onDragEnd when there is no matching onDragStart') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- _isDragStartPublished = false;
- lastLocation = null;
- lastCritical = null;
- withTimings('onDragEnd', function () {
- return execute(getHooks().onDragEnd, result, preset.onDragEnd);
- });
- };
-
- var abort = function abort() {
- !(_isDragStartPublished && lastCritical) ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Cannot cancel when onDragStart not fired') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
-
- var result = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, getDragStart(lastCritical), {
- destination: null,
- reason: 'CANCEL'
- });
-
- drop(result);
- };
-
- return {
- beforeStart: beforeStart,
- start: start$$1,
- move: move,
- drop: drop,
- abort: abort,
- isDragStartPublished: function isDragStartPublished() {
- return _isDragStartPublished;
- }
- };
- }();
-
- return function (store) {
- return function (next) {
- return function (action) {
- if (action.type === 'INITIAL_PUBLISH') {
- var critical = action.payload.critical;
- publisher.beforeStart(critical);
- next(action);
- publisher.start(critical);
- return;
- }
-
- next(action);
-
- if (action.type === 'DROP_COMPLETE') {
- var result = action.payload;
- publisher.drop(result);
- return;
- }
-
- if (action.type === 'CLEAN') {
- if (publisher.isDragStartPublished()) {
- publisher.abort();
- }
-
- return;
- }
-
- if (!publisher.isDragStartPublished()) {
- return;
- }
-
- var state = store.getState();
-
- if (state.phase === 'DRAGGING') {
- publisher.move(state.critical, state.impact.destination);
- }
- };
- };
- };
- });
-
- var dropAnimationFinish = (function (store) {
- return function (next) {
- return function (action) {
- if (action.type !== 'DROP_ANIMATION_FINISHED') {
- next(action);
- return;
- }
-
- var state = store.getState();
- !(state.phase === 'DROP_ANIMATING') ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Cannot finish a drop animating when no drop is occurring') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- store.dispatch(completeDrop(state.pending.result));
- };
- };
- });
-
- var dimensionMarshalStopper = (function (getMarshal) {
- return function () {
- return function (next) {
- return function (action) {
- if (action.type === 'DROP_COMPLETE' || action.type === 'CLEAN' || action.type === 'DROP_ANIMATE') {
- var marshal = getMarshal();
- marshal.stopPublishing();
- }
-
- next(action);
- };
- };
- };
- });
-
- var shouldCancel = function shouldCancel(action) {
- return action.type === 'CANCEL' || action.type === 'DROP_ANIMATE' || action.type === 'DROP' || action.type === 'DROP_COMPLETE' || action.type === 'COLLECTION_STARTING';
- };
-
- var autoScroll = (function (getScroller) {
- return function (store) {
- return function (next) {
- return function (action) {
- if (shouldCancel(action)) {
- getScroller().cancel();
- next(action);
- return;
- }
-
- next(action);
- var state = store.getState();
-
- if (state.phase !== 'DRAGGING') {
- return;
- }
-
- if (state.autoScrollMode === 'FLUID') {
- getScroller().fluidScroll(state);
- return;
- }
-
- if (!state.scrollJumpRequest) {
- return;
- }
-
- getScroller().jumpScroll(state);
- };
- };
- };
- });
-
- var shouldCheckOnAction = function shouldCheckOnAction(action) {
- return action.type === 'MOVE' || action.type === 'MOVE_UP' || action.type === 'MOVE_RIGHT' || action.type === 'MOVE_DOWN' || action.type === 'MOVE_LEFT' || action.type === 'MOVE_BY_WINDOW_SCROLL';
- };
-
- var hasDroppableOverChanged = function hasDroppableOverChanged(previous, current) {
- if (!previous) {
- return Boolean(current);
- }
-
- if (!current) {
- return Boolean(previous);
- }
-
- return previous.droppableId !== current.droppableId;
- };
-
- var getNewMaxScroll = function getNewMaxScroll(previous, current, action) {
- if (!shouldCheckOnAction(action)) {
- return null;
- }
-
- if (!isMovementAllowed(previous) || !isMovementAllowed(current)) {
- return null;
- }
-
- if (!hasDroppableOverChanged(previous.impact.destination, current.impact.destination)) {
- return null;
- }
-
- var viewport = current.viewport;
- var doc = document.documentElement;
- !doc ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Could not find document.documentElement') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- var maxScroll = getMaxScroll({
- scrollHeight: doc.scrollHeight,
- scrollWidth: doc.scrollWidth,
- width: viewport.frame.width,
- height: viewport.frame.height
- });
-
- if (isEqual(maxScroll, viewport.scroll.max)) {
- return null;
- }
-
- return maxScroll;
- };
-
- var maxScrollUpdater = (function (store) {
- return function (next) {
- return function (action) {
- var previous = store.getState();
- next(action);
- var current = store.getState();
- var maxScroll = getNewMaxScroll(previous, current, action);
-
- if (maxScroll) {
- next(updateViewportMaxScroll(maxScroll));
- }
- };
- };
- });
-
- var composeEnhancers = typeof window === 'object' && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ : __WEBPACK_IMPORTED_MODULE_5_redux__["c" /* compose */];
- var createStore$1 = (function (_ref) {
- var getDimensionMarshal = _ref.getDimensionMarshal,
- styleMarshal = _ref.styleMarshal,
- getHooks = _ref.getHooks,
- announce = _ref.announce,
- getScroller = _ref.getScroller;
- return Object(__WEBPACK_IMPORTED_MODULE_5_redux__["d" /* createStore */])(reducer, composeEnhancers(Object(__WEBPACK_IMPORTED_MODULE_5_redux__["a" /* applyMiddleware */])(style(styleMarshal), dimensionMarshalStopper(getDimensionMarshal), lift$1(getDimensionMarshal), drop$1, dropAnimationFinish, maxScrollUpdater, autoScroll(getScroller), hooks(getHooks, announce))));
- });
-
- var getEmptyMap = function getEmptyMap() {
- return {
- draggables: {},
- droppables: {}
- };
- };
-
- var timingKey = 'Publish collection from DOM';
- var createPublisher = (function (_ref) {
- var getProvided = _ref.getProvided,
- callbacks = _ref.callbacks;
-
- var advancedUsageWarning = function () {
- if (process.env.NODE_ENV === 'production') {
- return function () {};
- }
-
- var hasAnnounced = false;
- return function () {
- if (hasAnnounced) {
- return;
- }
-
- hasAnnounced = true;
-
- if (process.env.NODE_ENV === 'production') {
- return;
- }
-
- console.warn("\n Advanced usage warning: you are adding or removing a dimension during a drag\n This an advanced feature used to support dynamic interactions such as lazy loading lists.\n\n Keep in mind the following restrictions:\n\n - Draggable's can only be added to Droppable's that are scroll containers\n - Adding a Droppable cannot impact the placement of other Droppables\n (it cannot push a Droppable on the page)\n\n (This warning will be stripped in production builds)\n ".trim());
- };
- }();
-
- var additions = getEmptyMap();
- var removals = getEmptyMap();
- var frameId = null;
-
- var reset = function reset() {
- additions = getEmptyMap();
- removals = getEmptyMap();
- };
-
- var collect = function collect() {
- advancedUsageWarning();
-
- if (frameId) {
- return;
- }
-
- frameId = requestAnimationFrame(function () {
- frameId = null;
- callbacks.collectionStarting();
- start(timingKey);
-
- var _getProvided = getProvided(),
- entries = _getProvided.entries,
- collection = _getProvided.collection;
-
- var windowScroll = collection.initialWindowScroll;
-
- var draggables = __WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_core_js_object_keys___default()(additions.draggables).map(function (id) {
- return entries.draggables[id].getDimension(windowScroll);
- });
-
- var droppables = __WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_core_js_object_keys___default()(additions.droppables).map(function (id) {
- return entries.droppables[id].callbacks.getDimensionAndWatchScroll(windowScroll, collection.scrollOptions);
- });
-
- var result = {
- additions: {
- draggables: draggables,
- droppables: droppables
- },
- removals: {
- draggables: __WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_core_js_object_keys___default()(removals.draggables),
- droppables: __WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_core_js_object_keys___default()(removals.droppables)
- }
- };
- reset();
- finish(timingKey);
- callbacks.publish(result);
- });
- };
-
- var addDraggable = function addDraggable(id) {
- additions.draggables[id] = true;
-
- if (removals.draggables[id]) {
- delete removals.draggables[id];
- }
-
- collect();
- };
-
- var removeDraggable = function removeDraggable(id) {
- removals.draggables[id] = true;
-
- if (additions.draggables[id]) {
- delete additions.draggables[id];
- }
-
- collect();
- };
-
- var addDroppable = function addDroppable(id) {
- additions.droppables[id] = true;
-
- if (removals.droppables[id]) {
- delete removals.droppables[id];
- }
-
- collect();
- };
-
- var removeDroppable = function removeDroppable(id) {
- removals.droppables[id] = true;
-
- if (additions.droppables[id]) {
- delete additions.droppables[id];
- }
-
- collect();
- };
-
- var stop = function stop() {
- if (!frameId) {
- return;
- }
-
- cancelAnimationFrame(frameId);
- frameId = null;
- reset();
- };
-
- return {
- addDraggable: addDraggable,
- removeDraggable: removeDraggable,
- addDroppable: addDroppable,
- removeDroppable: removeDroppable,
- stop: stop
- };
- });
-
- var createDimensionMarshal = (function (callbacks) {
- var entries = {
- droppables: {},
- draggables: {}
- };
- var collection = null;
- var publisher = createPublisher({
- callbacks: {
- publish: callbacks.publish,
- collectionStarting: callbacks.collectionStarting
- },
- getProvided: function getProvided() {
- !collection ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Cannot get scroll options when there is no collection') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- return {
- entries: entries,
- collection: collection
- };
- }
- });
-
- var registerDraggable = function registerDraggable(descriptor, getDimension) {
- var entry = {
- descriptor: descriptor,
- getDimension: getDimension
- };
- entries.draggables[descriptor.id] = entry;
-
- if (!collection) {
- return;
- }
-
- if (collection.critical.draggable.type !== descriptor.type) {
- return;
- }
-
- publisher.addDraggable(descriptor.id);
- };
-
- var updateDraggable = function updateDraggable(previous, descriptor, getDimension) {
- !entries.draggables[previous.id] ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Cannot update draggable registration as no previous registration was found') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- delete entries.draggables[previous.id];
- var entry = {
- descriptor: descriptor,
- getDimension: getDimension
- };
- entries.draggables[descriptor.id] = entry;
- };
-
- var unregisterDraggable = function unregisterDraggable(descriptor) {
- var entry = entries.draggables[descriptor.id];
- !entry ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, "Cannot unregister Draggable with id " + descriptor.id + " as it is not registered") : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
-
- if (entry.descriptor !== descriptor) {
- return;
- }
-
- delete entries.draggables[descriptor.id];
-
- if (!collection) {
- return;
- }
-
- !(collection.critical.draggable.id !== descriptor.id) ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Cannot remove the dragging item during a drag') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
-
- if (descriptor.type !== collection.critical.draggable.type) {
- return;
- }
-
- publisher.removeDraggable(descriptor.id);
- };
-
- var registerDroppable = function registerDroppable(descriptor, droppableCallbacks) {
- var id = descriptor.id;
- entries.droppables[id] = {
- descriptor: descriptor,
- callbacks: droppableCallbacks
- };
-
- if (!collection) {
- return;
- }
-
- if (descriptor.type !== collection.critical.droppable.type) {
- return;
- }
-
- publisher.addDroppable(id);
- };
-
- var updateDroppable = function updateDroppable(previous, descriptor, droppableCallbacks) {
- !entries.droppables[previous.id] ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Cannot update droppable registration as no previous registration was found') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- delete entries.droppables[previous.id];
- var entry = {
- descriptor: descriptor,
- callbacks: droppableCallbacks
- };
- entries.droppables[descriptor.id] = entry;
-
- if (collection) {
- process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'You are not able to update the id or type of a droppable during a drag') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false);
- }
- };
-
- var unregisterDroppable = function unregisterDroppable(descriptor) {
- var entry = entries.droppables[descriptor.id];
- !entry ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, "Cannot unregister Droppable with id " + descriptor.id + " as as it is not registered") : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
-
- if (entry.descriptor !== descriptor) {
- return;
- }
-
- delete entries.droppables[descriptor.id];
-
- if (!collection) {
- return;
- }
-
- !(collection.critical.droppable.id !== descriptor.id) ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Cannot remove the home Droppable during a drag') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
-
- if (collection.critical.droppable.type !== descriptor.type) {
- return;
- }
-
- publisher.removeDroppable(descriptor.id);
- };
-
- var updateDroppableIsEnabled = function updateDroppableIsEnabled(id, isEnabled) {
- !entries.droppables[id] ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, "Cannot update the scroll on Droppable " + id + " as it is not registered") : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
-
- if (!collection) {
- return;
- }
-
- callbacks.updateDroppableIsEnabled({
- id: id,
- isEnabled: isEnabled
- });
- };
-
- var updateDroppableScroll = function updateDroppableScroll(id, newScroll) {
- !entries.droppables[id] ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, "Cannot update the scroll on Droppable " + id + " as it is not registered") : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
-
- if (!collection) {
- return;
- }
-
- callbacks.updateDroppableScroll({
- id: id,
- offset: newScroll
- });
- };
-
- var scrollDroppable = function scrollDroppable(id, change) {
- var entry = entries.droppables[id];
- !entry ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, "Cannot scroll Droppable " + id + " as it is not registered") : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
-
- if (!collection) {
- return;
- }
-
- entry.callbacks.scroll(change);
- };
-
- var getInitialPublish = function getInitialPublish(args) {
- var critical = args.critical,
- scrollOptions = args.scrollOptions,
- windowScroll = args.initialWindowScroll;
- var timingKey = 'Initial collection from DOM';
- start(timingKey);
- var home = critical.droppable;
-
- var droppables = __WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_core_js_object_keys___default()(entries.droppables).map(function (id) {
- return entries.droppables[id];
- }).filter(function (entry) {
- return entry.descriptor.type === home.type;
- }).map(function (entry) {
- return entry.callbacks.getDimensionAndWatchScroll(windowScroll, scrollOptions);
- }).reduce(function (previous, dimension) {
- previous[dimension.descriptor.id] = dimension;
- return previous;
- }, {});
-
- var draggables = __WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_core_js_object_keys___default()(entries.draggables).map(function (id) {
- return entries.draggables[id];
- }).filter(function (entry) {
- return entry.descriptor.type === critical.draggable.type;
- }).map(function (entry) {
- return entry.getDimension(windowScroll);
- }).reduce(function (previous, dimension) {
- previous[dimension.descriptor.id] = dimension;
- return previous;
- }, {});
-
- finish(timingKey);
- var dimensions = {
- draggables: draggables,
- droppables: droppables
- };
- var result = {
- dimensions: dimensions,
- critical: critical
- };
- return result;
- };
-
- var stopPublishing = function stopPublishing() {
- if (!collection) {
- return;
- }
-
- publisher.stop();
- var home = collection.critical.droppable;
-
- __WEBPACK_IMPORTED_MODULE_3__babel_runtime_corejs2_core_js_object_keys___default()(entries.droppables).filter(function (id) {
- return entries.droppables[id].descriptor.type === home.type;
- }).forEach(function (id) {
- return entries.droppables[id].callbacks.unwatchScroll();
- });
-
- collection = null;
- };
-
- var startPublishing = function startPublishing(request, windowScroll) {
- !!collection ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Cannot start capturing critical dimensions as there is already a collection') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- var entry = entries.draggables[request.draggableId];
- !entry ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Cannot find critical draggable entry') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- var home = entries.droppables[entry.descriptor.droppableId];
- !home ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Cannot find critical droppable entry') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- var critical = {
- draggable: entry.descriptor,
- droppable: home.descriptor
- };
- collection = {
- scrollOptions: request.scrollOptions,
- critical: critical,
- initialWindowScroll: windowScroll
- };
- return getInitialPublish(collection);
- };
-
- var marshal = {
- registerDraggable: registerDraggable,
- updateDraggable: updateDraggable,
- unregisterDraggable: unregisterDraggable,
- registerDroppable: registerDroppable,
- updateDroppable: updateDroppable,
- unregisterDroppable: unregisterDroppable,
- updateDroppableIsEnabled: updateDroppableIsEnabled,
- scrollDroppable: scrollDroppable,
- updateDroppableScroll: updateDroppableScroll,
- startPublishing: startPublishing,
- stopPublishing: stopPublishing
- };
- return marshal;
- });
-
- var physics = function () {
- var base = {
- stiffness: 1000,
- damping: 60,
- precision: 0.99
- };
-
- var standard = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, base);
-
- var fast = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, base, {
- stiffness: base.stiffness * 2
- });
-
- return {
- standard: standard,
- fast: fast
- };
- }();
- var css = {
- outOfTheWay: 'transform 0.2s cubic-bezier(0.2, 0, 0, 1)'
- };
-
- var prefix = 'data-react-beautiful-dnd';
- var dragHandle = prefix + "-drag-handle";
- var draggable = prefix + "-draggable";
- var droppable = prefix + "-droppable";
-
- var getStyles = (function (styleContext) {
- var dragHandleSelector = "[" + dragHandle + "=\"" + styleContext + "\"]";
- var draggableSelector = "[" + draggable + "=\"" + styleContext + "\"]";
- var droppableSelector = "[" + droppable + "=\"" + styleContext + "\"]";
- var dragHandleStyles = {
- base: "\n " + dragHandleSelector + " {\n -webkit-touch-callout: none;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n touch-action: manipulation;\n }\n ",
- grabCursor: "\n " + dragHandleSelector + " {\n cursor: -webkit-grab;\n cursor: grab;\n }\n ",
- blockPointerEvents: "\n " + dragHandleSelector + " {\n pointer-events: none;\n }\n "
- };
- var draggableStyles = {
- animateMovement: "\n " + draggableSelector + " {\n transition: " + css.outOfTheWay + ";\n }\n "
- };
- var droppableStyles = {
- base: "\n " + droppableSelector + " {\n overflow-anchor: none;\n }\n "
- };
- var bodyStyles = {
- whileActiveDragging: "\n body {\n cursor: grabbing;\n cursor: -webkit-grabbing;\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n }\n "
- };
- var base = [dragHandleStyles.base, droppableStyles.base];
- var resting = base.concat([dragHandleStyles.grabCursor]);
- var collecting = base.concat([dragHandleStyles.blockPointerEvents, bodyStyles.whileActiveDragging]);
- var dragging = collecting.concat([draggableStyles.animateMovement]);
- var dropAnimating = base.concat([dragHandleStyles.grabCursor, draggableStyles.animateMovement]);
- var userCancel = base.concat([draggableStyles.animateMovement]);
- return {
- resting: resting.join(''),
- dragging: dragging.join(''),
- dropAnimating: dropAnimating.join(''),
- collecting: collecting.join(''),
- userCancel: userCancel.join('')
- };
- });
-
- var count = 0;
- var resetStyleContext = function resetStyleContext() {
- count = 0;
- };
-
- var getHead = function getHead() {
- var head = document.querySelector('head');
- !head ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Cannot find the head to append a style to') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- return head;
- };
-
- var createStyleMarshal = (function () {
- var context = "" + count++;
- var styles = getStyles(context);
- var el = null;
- var setStyle = Object(__WEBPACK_IMPORTED_MODULE_4_memoize_one__["a" /* default */])(function (proposed) {
- !el ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Cannot set style of style tag if not mounted') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- el.innerHTML = proposed;
- });
-
- var mount = function mount() {
- !!el ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Style marshal already mounted') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- el = document.createElement('style');
- el.type = 'text/css';
- el.setAttribute(prefix, context);
- getHead().appendChild(el);
- setStyle(styles.resting);
- };
-
- var collecting = function collecting() {
- return setStyle(styles.collecting);
- };
-
- var dragging = function dragging() {
- return setStyle(styles.dragging);
- };
-
- var dropping = function dropping(reason) {
- if (reason === 'DROP') {
- setStyle(styles.dropAnimating);
- return;
- }
-
- setStyle(styles.userCancel);
- };
-
- var resting = function resting() {
- return setStyle(styles.resting);
- };
-
- var unmount = function unmount() {
- !el ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Cannot unmount style marshal as it is already unmounted') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- getHead().removeChild(el);
- el = null;
- };
-
- var marshal = {
- collecting: collecting,
- dragging: dragging,
- dropping: dropping,
- resting: resting,
- styleContext: context,
- mount: mount,
- unmount: unmount
- };
- return marshal;
- });
-
- var canStartDrag = (function (state, id) {
- if (state.phase === 'IDLE') {
- return true;
- }
-
- if (state.phase !== 'DROP_ANIMATING') {
- return false;
- }
-
- if (state.pending.result.draggableId === id) {
- return false;
- }
-
- return state.pending.result.reason === 'DROP';
- });
-
- var scrollWindow = (function (change) {
- window.scrollBy(change.x, change.y);
- });
-
- var count$1 = 0;
- var visuallyHidden = {
- position: 'absolute',
- width: '1px',
- height: '1px',
- margin: '-1px',
- border: '0',
- padding: '0',
- overflow: 'hidden',
- clip: 'rect(0 0 0 0)',
- 'clip-path': 'inset(100%)'
- };
-
- var getBody = function getBody() {
- !document.body ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Announcer cannot find document.body') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- return document.body;
- };
-
- var createAnnouncer = (function () {
- var id = "react-beautiful-dnd-announcement-" + count$1++;
- var el = null;
-
- var announce = function announce(message) {
- !el ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Cannot announce to unmounted node') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- el.textContent = message;
- };
-
- var mount = function mount() {
- !!el ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Announcer already mounted') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- el = document.createElement('div');
- el.id = id;
- el.setAttribute('aria-live', 'assertive');
- el.setAttribute('role', 'log');
- el.setAttribute('aria-atomic', 'true');
-
- __WEBPACK_IMPORTED_MODULE_6__babel_runtime_corejs2_core_js_object_assign___default()(el.style, visuallyHidden);
-
- getBody().appendChild(el);
- };
-
- var unmount = function unmount() {
- !el ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Will not unmount annoucer as it is already unmounted') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- getBody().removeChild(el);
- el = null;
- };
-
- var announcer = {
- announce: announce,
- id: id,
- mount: mount,
- unmount: unmount
- };
- return announcer;
- });
-
- var getScrollableDroppables = Object(__WEBPACK_IMPORTED_MODULE_4_memoize_one__["a" /* default */])(function (droppables) {
- return toDroppableList(droppables).filter(function (droppable) {
- if (!droppable.isEnabled) {
- return false;
- }
-
- if (!droppable.viewport.closestScrollable) {
- return false;
- }
-
- return true;
- });
- });
-
- var getScrollableDroppableOver = function getScrollableDroppableOver(target, droppables) {
- var maybe = getScrollableDroppables(droppables).find(function (droppable) {
- !droppable.viewport.closestScrollable ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Invalid result') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- return isPositionInFrame(droppable.viewport.closestScrollable.framePageMarginBox)(target);
- });
- return maybe;
- };
-
- var getBestScrollableDroppable = (function (_ref) {
- var center = _ref.center,
- destination = _ref.destination,
- droppables = _ref.droppables;
-
- if (destination) {
- var _dimension = droppables[destination.droppableId];
-
- if (!_dimension.viewport.closestScrollable) {
- return null;
- }
-
- return _dimension;
- }
-
- var dimension = getScrollableDroppableOver(center, droppables);
- return dimension;
- });
-
- var smallestSigned = apply(function (value) {
- if (value === 0) {
- return 0;
- }
-
- return value > 0 ? 1 : -1;
- });
- var getOverlap = function () {
- var getRemainder = function getRemainder(target, max) {
- if (target < 0) {
- return target;
- }
-
- if (target > max) {
- return target - max;
- }
-
- return 0;
- };
-
- return function (_ref) {
- var current = _ref.current,
- max = _ref.max,
- change = _ref.change;
- var targetScroll = add(current, change);
- var overlap = {
- x: getRemainder(targetScroll.x, max.x),
- y: getRemainder(targetScroll.y, max.y)
- };
-
- if (isEqual(overlap, origin)) {
- return null;
- }
-
- return overlap;
- };
- }();
- var canPartiallyScroll = function canPartiallyScroll(_ref2) {
- var rawMax = _ref2.max,
- current = _ref2.current,
- change = _ref2.change;
- var max = {
- x: Math.max(current.x, rawMax.x),
- y: Math.max(current.y, rawMax.y)
- };
- var smallestChange = smallestSigned(change);
- var overlap = getOverlap({
- max: max,
- current: current,
- change: smallestChange
- });
-
- if (!overlap) {
- return true;
- }
-
- if (smallestChange.x !== 0 && overlap.x === 0) {
- return true;
- }
-
- if (smallestChange.y !== 0 && overlap.y === 0) {
- return true;
- }
-
- return false;
- };
- var canScrollWindow = function canScrollWindow(viewport, change) {
- return canPartiallyScroll({
- current: viewport.scroll.current,
- max: viewport.scroll.max,
- change: change
- });
- };
- var getWindowOverlap = function getWindowOverlap(viewport, change) {
- if (!canScrollWindow(viewport, change)) {
- return null;
- }
-
- var max = viewport.scroll.max;
- var current = viewport.scroll.current;
- return getOverlap({
- current: current,
- max: max,
- change: change
- });
- };
- var canScrollDroppable = function canScrollDroppable(droppable, change) {
- var closest$$1 = droppable.viewport.closestScrollable;
-
- if (!closest$$1) {
- return false;
- }
-
- return canPartiallyScroll({
- current: closest$$1.scroll.current,
- max: closest$$1.scroll.max,
- change: change
- });
- };
- var getDroppableOverlap = function getDroppableOverlap(droppable, change) {
- var closest$$1 = droppable.viewport.closestScrollable;
-
- if (!closest$$1) {
- return null;
- }
-
- if (!canScrollDroppable(droppable, change)) {
- return null;
- }
-
- return getOverlap({
- current: closest$$1.scroll.current,
- max: closest$$1.scroll.max,
- change: change
- });
- };
-
- var config = {
- startFrom: 0.25,
- maxSpeedAt: 0.05,
- maxScrollSpeed: 28,
- ease: function ease(percentage) {
- return Math.pow(percentage, 2);
- }
- };
- var clean$1 = apply(function (value) {
- return value === 0 ? 0 : value;
- });
- var getPixelThresholds = function getPixelThresholds(container, axis) {
- var startFrom = container[axis.size] * config.startFrom;
- var maxSpeedAt = container[axis.size] * config.maxSpeedAt;
- var accelerationPlane = startFrom - maxSpeedAt;
- var thresholds = {
- startFrom: startFrom,
- maxSpeedAt: maxSpeedAt,
- accelerationPlane: accelerationPlane
- };
- return thresholds;
- };
-
- var getSpeed = function getSpeed(distance$$1, thresholds) {
- if (distance$$1 >= thresholds.startFrom) {
- return 0;
- }
-
- if (distance$$1 <= thresholds.maxSpeedAt) {
- return config.maxScrollSpeed;
- }
-
- var distancePastStart = thresholds.startFrom - distance$$1;
- var percentage = distancePastStart / thresholds.accelerationPlane;
- var transformed = config.ease(percentage);
- var speed = config.maxScrollSpeed * transformed;
- return speed;
- };
-
- var adjustForSizeLimits = function adjustForSizeLimits(_ref) {
- var container = _ref.container,
- subject = _ref.subject,
- proposedScroll = _ref.proposedScroll;
- var isTooBigVertically = subject.height > container.height;
- var isTooBigHorizontally = subject.width > container.width;
-
- if (!isTooBigHorizontally && !isTooBigVertically) {
- return proposedScroll;
- }
-
- if (isTooBigHorizontally && isTooBigVertically) {
- return null;
- }
-
- return {
- x: isTooBigHorizontally ? 0 : proposedScroll.x,
- y: isTooBigVertically ? 0 : proposedScroll.y
- };
- };
-
- var getRequiredScroll = function getRequiredScroll(_ref2) {
- var container = _ref2.container,
- subject = _ref2.subject,
- center = _ref2.center;
- var distance$$1 = {
- top: center.y - container.top,
- right: container.right - center.x,
- bottom: container.bottom - center.y,
- left: center.x - container.left
- };
-
- var y = function () {
- var thresholds = getPixelThresholds(container, vertical);
- var isCloserToBottom = distance$$1.bottom < distance$$1.top;
-
- if (isCloserToBottom) {
- return getSpeed(distance$$1.bottom, thresholds);
- }
-
- return -1 * getSpeed(distance$$1.top, thresholds);
- }();
-
- var x = function () {
- var thresholds = getPixelThresholds(container, horizontal);
- var isCloserToRight = distance$$1.right < distance$$1.left;
-
- if (isCloserToRight) {
- return getSpeed(distance$$1.right, thresholds);
- }
-
- return -1 * getSpeed(distance$$1.left, thresholds);
- }();
-
- var required = clean$1({
- x: x,
- y: y
- });
-
- if (isEqual(required, origin)) {
- return null;
- }
-
- var limited = adjustForSizeLimits({
- container: container,
- subject: subject,
- proposedScroll: required
- });
-
- if (!limited) {
- return null;
- }
-
- return isEqual(limited, origin) ? null : limited;
- };
-
- var withPlaceholder = function withPlaceholder(droppable, draggable) {
- var closest$$1 = droppable.viewport.closestScrollable;
-
- if (!closest$$1) {
- return null;
- }
-
- var isOverHome = droppable.descriptor.id === draggable.descriptor.droppableId;
- var max = closest$$1.scroll.max;
- var current = closest$$1.scroll.current;
-
- if (isOverHome) {
- return {
- max: max,
- current: current
- };
- }
-
- var spaceForPlaceholder = patch(droppable.axis.line, draggable.placeholder.client.borderBox[droppable.axis.size]);
- var newMax = add(max, spaceForPlaceholder);
- var newCurrent = {
- x: Math.min(current.x, newMax.x),
- y: Math.min(current.y, newMax.y)
- };
- return {
- max: newMax,
- current: newCurrent
- };
- };
-
- var createFluidScroller = (function (_ref3) {
- var scrollWindow = _ref3.scrollWindow,
- scrollDroppable = _ref3.scrollDroppable;
- var scheduleWindowScroll = Object(__WEBPACK_IMPORTED_MODULE_7_raf_schd__["a" /* default */])(scrollWindow);
- var scheduleDroppableScroll = Object(__WEBPACK_IMPORTED_MODULE_7_raf_schd__["a" /* default */])(scrollDroppable);
-
- var scroller = function scroller(state) {
- var center = state.current.page.borderBoxCenter;
- var draggable = state.dimensions.draggables[state.critical.draggable.id];
- var subject = draggable.page.marginBox;
- var viewport = state.viewport;
- var requiredWindowScroll = getRequiredScroll({
- container: viewport.frame,
- subject: subject,
- center: center
- });
-
- if (requiredWindowScroll && canScrollWindow(viewport, requiredWindowScroll)) {
- scheduleWindowScroll(requiredWindowScroll);
- return;
- }
-
- var droppable = getBestScrollableDroppable({
- center: center,
- destination: state.impact.destination,
- droppables: state.dimensions.droppables
- });
-
- if (!droppable) {
- return;
- }
-
- var closestScrollable = droppable.viewport.closestScrollable;
-
- if (!closestScrollable) {
- return;
- }
-
- var requiredFrameScroll = getRequiredScroll({
- container: closestScrollable.framePageMarginBox,
- subject: subject,
- center: center
- });
-
- if (!requiredFrameScroll) {
- return;
- }
-
- var result = withPlaceholder(droppable, draggable);
-
- if (!result) {
- return;
- }
-
- var closest$$1 = droppable.viewport.closestScrollable;
-
- if (!closest$$1) {
- return;
- }
-
- var canScrollDroppable$$1 = canPartiallyScroll({
- current: result.current,
- max: result.max,
- change: requiredFrameScroll
- });
-
- if (canScrollDroppable$$1) {
- scheduleDroppableScroll(droppable.descriptor.id, requiredFrameScroll);
- }
- };
-
- scroller.cancel = function () {
- scheduleWindowScroll.cancel();
- scheduleDroppableScroll.cancel();
- };
-
- return scroller;
- });
-
- var createJumpScroller = (function (_ref) {
- var move = _ref.move,
- scrollDroppable = _ref.scrollDroppable,
- scrollWindow = _ref.scrollWindow;
-
- var moveByOffset = function moveByOffset(state, offset) {
- var client = add(state.current.client.selection, offset);
- move({
- client: client,
- shouldAnimate: true
- });
- };
-
- var scrollDroppableAsMuchAsItCan = function scrollDroppableAsMuchAsItCan(droppable, change) {
- if (!canScrollDroppable(droppable, change)) {
- return change;
- }
-
- var overlap = getDroppableOverlap(droppable, change);
-
- if (!overlap) {
- scrollDroppable(droppable.descriptor.id, change);
- return null;
- }
-
- var whatTheDroppableCanScroll = subtract(change, overlap);
- scrollDroppable(droppable.descriptor.id, whatTheDroppableCanScroll);
- var remainder = subtract(change, whatTheDroppableCanScroll);
- return remainder;
- };
-
- var scrollWindowAsMuchAsItCan = function scrollWindowAsMuchAsItCan(viewport, change) {
- if (!canScrollWindow(viewport, change)) {
- return change;
- }
-
- var overlap = getWindowOverlap(viewport, change);
-
- if (!overlap) {
- scrollWindow(change);
- return null;
- }
-
- var whatTheWindowCanScroll = subtract(change, overlap);
- scrollWindow(whatTheWindowCanScroll);
- var remainder = subtract(change, whatTheWindowCanScroll);
- return remainder;
- };
-
- var jumpScroller = function jumpScroller(state) {
- var request = state.scrollJumpRequest;
-
- if (!request) {
- return;
- }
-
- var destination = state.impact.destination;
- !destination ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Cannot perform a jump scroll when there is no destination') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- var droppableRemainder = scrollDroppableAsMuchAsItCan(state.dimensions.droppables[destination.droppableId], request);
-
- if (!droppableRemainder) {
- return;
- }
-
- var viewport = state.viewport;
- var windowRemainder = scrollWindowAsMuchAsItCan(viewport, droppableRemainder);
-
- if (!windowRemainder) {
- return;
- }
-
- moveByOffset(state, windowRemainder);
- };
-
- return jumpScroller;
- });
-
- var createAutoScroller = (function (_ref) {
- var scrollDroppable = _ref.scrollDroppable,
- scrollWindow = _ref.scrollWindow,
- move = _ref.move;
- var fluidScroll = createFluidScroller({
- scrollWindow: scrollWindow,
- scrollDroppable: scrollDroppable
- });
- var jumpScroll = createJumpScroller({
- move: move,
- scrollWindow: scrollWindow,
- scrollDroppable: scrollDroppable
- });
- var marshal = {
- cancel: fluidScroll.cancel,
- fluidScroll: fluidScroll,
- jumpScroll: jumpScroll
- };
- return marshal;
- });
-
- var prefix$1 = function prefix(key) {
- return "private-react-beautiful-dnd-key-do-not-use-" + key;
- };
-
- var storeKey = prefix$1('store');
- var droppableIdKey = prefix$1('droppable-id');
- var droppableTypeKey = prefix$1('droppable-type');
- var dimensionMarshalKey = prefix$1('dimension-marshal');
- var styleContextKey = prefix$1('style-context');
- var canLiftContextKey = prefix$1('can-lift');
-
- var _DragDropContext$chil;
- var resetServerContext = function resetServerContext() {
- resetStyleContext();
- };
-
- var printFatalDevError = function printFatalDevError(error) {
- if (process.env.NODE_ENV === 'production') {
- return;
- }
-
- console.warn("\n An error has occurred while a drag is occurring.\n Any existing drag will be cancelled.\n\n Raw error:\n ");
- console.error(error);
- };
-
- var DragDropContext = function (_React$Component) {
- Object(__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(DragDropContext, _React$Component);
-
- function DragDropContext(props, context) {
- var _this;
-
- _this = _React$Component.call(this, props, context) || this;
- _this.store = void 0;
- _this.dimensionMarshal = void 0;
- _this.styleMarshal = void 0;
- _this.autoScroller = void 0;
- _this.announcer = void 0;
- _this.unsubscribe = void 0;
-
- _this.canLift = function (id) {
- return canStartDrag(_this.store.getState(), id);
- };
-
- _this.onFatalError = function (error) {
- printFatalDevError(error);
-
- var state = _this.store.getState();
-
- if (state.phase !== 'IDLE') {
- _this.store.dispatch(clean());
- }
- };
-
- _this.onWindowError = function (error) {
- return _this.onFatalError(error);
- };
-
- _this.announcer = createAnnouncer();
- _this.styleMarshal = createStyleMarshal();
- _this.store = createStore$1({
- getDimensionMarshal: function getDimensionMarshal() {
- return _this.dimensionMarshal;
- },
- styleMarshal: _this.styleMarshal,
- getHooks: function getHooks() {
- return {
- onBeforeDragStart: _this.props.onBeforeDragStart,
- onDragStart: _this.props.onDragStart,
- onDragEnd: _this.props.onDragEnd,
- onDragUpdate: _this.props.onDragUpdate
- };
- },
- announce: _this.announcer.announce,
- getScroller: function getScroller() {
- return _this.autoScroller;
- }
- });
- var callbacks = Object(__WEBPACK_IMPORTED_MODULE_5_redux__["b" /* bindActionCreators */])({
- collectionStarting: collectionStarting,
- publish: publish,
- updateDroppableScroll: updateDroppableScroll,
- updateDroppableIsEnabled: updateDroppableIsEnabled
- }, _this.store.dispatch);
- _this.dimensionMarshal = createDimensionMarshal(callbacks);
- _this.autoScroller = createAutoScroller(Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({
- scrollWindow: scrollWindow,
- scrollDroppable: _this.dimensionMarshal.scrollDroppable
- }, Object(__WEBPACK_IMPORTED_MODULE_5_redux__["b" /* bindActionCreators */])({
- move: move
- }, _this.store.dispatch)));
- return _this;
- }
-
- var _proto = DragDropContext.prototype;
-
- _proto.getChildContext = function getChildContext() {
- var _ref;
-
- return _ref = {}, _ref[storeKey] = this.store, _ref[dimensionMarshalKey] = this.dimensionMarshal, _ref[styleContextKey] = this.styleMarshal.styleContext, _ref[canLiftContextKey] = this.canLift, _ref;
- };
-
- _proto.componentDidMount = function componentDidMount() {
- window.addEventListener('error', this.onWindowError);
- this.styleMarshal.mount();
- this.announcer.mount();
- };
-
- _proto.componentDidCatch = function componentDidCatch(error) {
- this.onFatalError(error);
-
- if (error.message.indexOf('Invariant failed') !== -1) {
- this.setState({});
- return;
- }
-
- throw error;
- };
-
- _proto.componentWillUnmount = function componentWillUnmount() {
- window.removeEventListener('error', this.onWindowError);
- var state = this.store.getState();
-
- if (state.phase !== 'IDLE') {
- this.store.dispatch(clean());
- }
-
- this.styleMarshal.unmount();
- this.announcer.unmount();
- };
-
- _proto.render = function render() {
- return this.props.children;
- };
-
- return DragDropContext;
- }(__WEBPACK_IMPORTED_MODULE_9_react___default.a.Component);
-
- DragDropContext.childContextTypes = (_DragDropContext$chil = {}, _DragDropContext$chil[storeKey] = __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.shape({
- dispatch: __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.func.isRequired,
- subscribe: __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.func.isRequired,
- getState: __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.func.isRequired
- }).isRequired, _DragDropContext$chil[dimensionMarshalKey] = __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.object.isRequired, _DragDropContext$chil[styleContextKey] = __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.string.isRequired, _DragDropContext$chil[canLiftContextKey] = __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.func.isRequired, _DragDropContext$chil);
-
- var isScrollable = function isScrollable() {
- for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {
- values[_key] = arguments[_key];
- }
-
- return values.some(function (value) {
- return value === 'auto' || value === 'scroll';
- });
- };
-
- var isElementScrollable = function isElementScrollable(el) {
- var style = window.getComputedStyle(el);
- return isScrollable(style.overflow, style.overflowY, style.overflowX);
- };
-
- var getClosestScrollable = function getClosestScrollable(el) {
- if (el == null) {
- return null;
- }
-
- if (!isElementScrollable(el)) {
- return getClosestScrollable(el.parentElement);
- }
-
- return el;
- };
-
- var _DroppableDimensionPu;
-
- var getScroll = function getScroll(el) {
- return {
- x: el.scrollLeft,
- y: el.scrollTop
- };
- };
-
- var checkForNestedScrollContainers = function checkForNestedScrollContainers(scrollable) {
- if (process.env.NODE_ENV === 'production') {
- return;
- }
-
- if (!scrollable) {
- return;
- }
-
- var anotherScrollParent = getClosestScrollable(scrollable.parentElement);
-
- if (!anotherScrollParent) {
- return;
- }
-
- console.warn("\n Droppable: unsupported nested scroll container detected.\n A Droppable can only have one scroll parent (which can be itself)\n Nested scroll containers are currently not supported.\n\n We hope to support nested scroll containers soon: https://github.com/atlassian/react-beautiful-dnd/issues/131\n ");
- };
-
- var listenerOptions = {
- passive: true
- };
-
- var DroppableDimensionPublisher = function (_React$Component) {
- Object(__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(DroppableDimensionPublisher, _React$Component);
-
- function DroppableDimensionPublisher(props, context) {
- var _this;
-
- _this = _React$Component.call(this, props, context) || this;
- _this.watchingScroll = null;
- _this.callbacks = void 0;
- _this.publishedDescriptor = null;
-
- _this.getClosestScroll = function () {
- if (!_this.watchingScroll) {
- return origin;
- }
-
- return getScroll(_this.watchingScroll.closestScrollable);
- };
-
- _this.memoizedUpdateScroll = Object(__WEBPACK_IMPORTED_MODULE_4_memoize_one__["a" /* default */])(function (x, y) {
- !_this.publishedDescriptor ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Cannot update scroll on unpublished droppable') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- var newScroll = {
- x: x,
- y: y
- };
- var marshal = _this.context[dimensionMarshalKey];
- marshal.updateDroppableScroll(_this.publishedDescriptor.id, newScroll);
- });
-
- _this.updateScroll = function () {
- var offset = _this.getClosestScroll();
-
- _this.memoizedUpdateScroll(offset.x, offset.y);
- };
-
- _this.scheduleScrollUpdate = Object(__WEBPACK_IMPORTED_MODULE_7_raf_schd__["a" /* default */])(_this.updateScroll);
-
- _this.onClosestScroll = function () {
- !_this.watchingScroll ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Could not find scroll options while scrolling') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- var options = _this.watchingScroll.options;
-
- if (options.shouldPublishImmediately) {
- _this.updateScroll();
-
- return;
- }
-
- _this.scheduleScrollUpdate();
- };
-
- _this.scroll = function (change) {
- !_this.watchingScroll ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Cannot scroll a droppable with no closest scrollable') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- var closestScrollable = _this.watchingScroll.closestScrollable;
- closestScrollable.scrollTop += change.y;
- closestScrollable.scrollLeft += change.x;
- };
-
- _this.watchScroll = function (closestScrollable, options) {
- !!_this.watchingScroll ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Droppable cannot watch scroll as it is already watching scroll') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
-
- if (!closestScrollable) {
- return;
- }
-
- _this.watchingScroll = {
- options: options,
- closestScrollable: closestScrollable
- };
- closestScrollable.addEventListener('scroll', _this.onClosestScroll, listenerOptions);
- };
-
- _this.unwatchScroll = function () {
- var watching = _this.watchingScroll;
-
- if (!watching) {
- return;
- }
-
- _this.scheduleScrollUpdate.cancel();
-
- watching.closestScrollable.removeEventListener('scroll', _this.onClosestScroll, listenerOptions);
- _this.watchingScroll = null;
- };
-
- _this.getMemoizedDescriptor = Object(__WEBPACK_IMPORTED_MODULE_4_memoize_one__["a" /* default */])(function (id, type) {
- return {
- id: id,
- type: type
- };
- });
-
- _this.publish = function () {
- var marshal = _this.context[dimensionMarshalKey];
-
- var descriptor = _this.getMemoizedDescriptor(_this.props.droppableId, _this.props.type);
-
- if (!_this.publishedDescriptor) {
- marshal.registerDroppable(descriptor, _this.callbacks);
- _this.publishedDescriptor = descriptor;
- return;
- }
-
- if (_this.publishedDescriptor === descriptor) {
- return;
- }
-
- marshal.updateDroppable(_this.publishedDescriptor, descriptor, _this.callbacks);
- _this.publishedDescriptor = descriptor;
- };
-
- _this.unpublish = function () {
- !_this.publishedDescriptor ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Cannot unpublish descriptor when none is published') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- var marshal = _this.context[dimensionMarshalKey];
- marshal.unregisterDroppable(_this.publishedDescriptor);
- _this.publishedDescriptor = null;
- };
-
- _this.getDimensionAndWatchScroll = function (windowScroll, options) {
- var _this$props = _this.props,
- direction = _this$props.direction,
- ignoreContainerClipping = _this$props.ignoreContainerClipping,
- isDropDisabled = _this$props.isDropDisabled,
- getDroppableRef = _this$props.getDroppableRef;
- var targetRef = getDroppableRef();
- var descriptor = _this.publishedDescriptor;
- !targetRef ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Cannot calculate a dimension when not attached to the DOM') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- !descriptor ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Cannot get dimension for unpublished droppable') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- var scrollableRef = getClosestScrollable(targetRef);
- checkForNestedScrollContainers(scrollableRef);
-
- _this.watchScroll(scrollableRef, options);
-
- var client = function () {
- var base = Object(__WEBPACK_IMPORTED_MODULE_2_css_box_model__["c" /* getBox */])(targetRef);
-
- if (!scrollableRef) {
- return base;
- }
-
- if (targetRef !== scrollableRef) {
- return base;
- }
-
- var top = base.paddingBox.top - scrollableRef.scrollTop;
- var left = base.paddingBox.left - scrollableRef.scrollLeft;
- var bottom = top + scrollableRef.scrollHeight;
- var right = left + scrollableRef.scrollWidth;
- var paddingBox = {
- top: top,
- right: right,
- bottom: bottom,
- left: left
- };
- var borderBox = {
- top: paddingBox.top - base.border.top,
- right: paddingBox.right + base.border.right,
- bottom: paddingBox.bottom + base.border.bottom,
- left: paddingBox.left - base.border.left
- };
- return Object(__WEBPACK_IMPORTED_MODULE_2_css_box_model__["b" /* createBox */])({
- borderBox: borderBox,
- margin: base.margin,
- border: base.border,
- padding: base.padding
- });
- }();
-
- var page = Object(__WEBPACK_IMPORTED_MODULE_2_css_box_model__["e" /* withScroll */])(client, windowScroll);
-
- var closest$$1 = function () {
- if (!scrollableRef) {
- return null;
- }
-
- var frameClient = Object(__WEBPACK_IMPORTED_MODULE_2_css_box_model__["c" /* getBox */])(scrollableRef);
- return {
- client: frameClient,
- page: Object(__WEBPACK_IMPORTED_MODULE_2_css_box_model__["e" /* withScroll */])(frameClient),
- scrollHeight: scrollableRef.scrollHeight,
- scrollWidth: scrollableRef.scrollWidth,
- scroll: getScroll(scrollableRef),
- shouldClipSubject: !ignoreContainerClipping
- };
- }();
-
- return getDroppableDimension({
- descriptor: descriptor,
- isEnabled: !isDropDisabled,
- direction: direction,
- client: client,
- page: page,
- closest: closest$$1
- });
- };
-
- var callbacks = {
- getDimensionAndWatchScroll: _this.getDimensionAndWatchScroll,
- unwatchScroll: _this.unwatchScroll,
- scroll: _this.scroll
- };
- _this.callbacks = callbacks;
- return _this;
- }
-
- var _proto = DroppableDimensionPublisher.prototype;
-
- _proto.componentDidMount = function componentDidMount() {
- this.publish();
- };
-
- _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
- this.publish();
-
- if (this.props.isDropDisabled === prevProps.isDropDisabled) {
- return;
- }
-
- var marshal = this.context[dimensionMarshalKey];
- marshal.updateDroppableIsEnabled(this.props.droppableId, !this.props.isDropDisabled);
- };
-
- _proto.componentWillUnmount = function componentWillUnmount() {
- if (this.watchingScroll) {
- if (process.env.NODE_ENV !== 'production') {
- console.warn('Unmounting droppable while it was watching scroll');
- }
-
- this.unwatchScroll();
- }
-
- this.unpublish();
- };
-
- _proto.render = function render() {
- return this.props.children;
- };
-
- return DroppableDimensionPublisher;
- }(__WEBPACK_IMPORTED_MODULE_9_react___default.a.Component);
-
- DroppableDimensionPublisher.contextTypes = (_DroppableDimensionPu = {}, _DroppableDimensionPu[dimensionMarshalKey] = __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.object.isRequired, _DroppableDimensionPu);
-
- var Placeholder = function (_PureComponent) {
- Object(__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Placeholder, _PureComponent);
-
- function Placeholder() {
- return _PureComponent.apply(this, arguments) || this;
- }
-
- var _proto = Placeholder.prototype;
-
- _proto.componentDidMount = function componentDidMount() {
- if (this.props.onMount) {
- this.props.onMount();
- }
- };
-
- _proto.componentWillUnmount = function componentWillUnmount() {
- if (this.props.onUnmount) {
- this.props.onUnmount();
- }
- };
-
- _proto.render = function render() {
- var placeholder = this.props.placeholder;
- var client = placeholder.client,
- display = placeholder.display,
- tagName = placeholder.tagName;
- var style = {
- display: display,
- boxSizing: 'border-box',
- width: client.borderBox.width,
- height: client.borderBox.height,
- marginTop: client.margin.top,
- marginRight: client.margin.right,
- marginBottom: client.margin.bottom,
- marginLeft: client.margin.left,
- flexShrink: '0',
- flexGrow: '0',
- pointerEvents: 'none'
- };
- return __WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement(tagName, {
- style: style
- });
- };
-
- return Placeholder;
- }(__WEBPACK_IMPORTED_MODULE_9_react__["PureComponent"]);
-
- var throwIfRefIsInvalid = (function (ref) {
- !(ref && ref instanceof HTMLElement) ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, "\n provided.innerRef has not been provided with a HTMLElement.\n\n You can find a guide on using the innerRef callback functions at:\n https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/guides/using-inner-ref.md\n ") : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- });
-
- var _Droppable$contextTyp, _Droppable$childConte;
-
- var Droppable = function (_Component) {
- Object(__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Droppable, _Component);
-
- function Droppable(props, context) {
- var _this;
-
- _this = _Component.call(this, props, context) || this;
- _this.styleContext = void 0;
- _this.ref = null;
- _this.isPlaceholderMounted = false;
-
- _this.onPlaceholderMount = function () {
- _this.isPlaceholderMounted = true;
- };
-
- _this.onPlaceholderUnmount = function () {
- _this.isPlaceholderMounted = false;
- };
-
- _this.setRef = function (ref) {
- if (ref === null) {
- return;
- }
-
- if (ref === _this.ref) {
- return;
- }
-
- _this.ref = ref;
- throwIfRefIsInvalid(ref);
- };
-
- _this.getDroppableRef = function () {
- return _this.ref;
- };
-
- _this.styleContext = context[styleContextKey];
- return _this;
- }
-
- var _proto = Droppable.prototype;
-
- _proto.getChildContext = function getChildContext() {
- var _value;
-
- var value = (_value = {}, _value[droppableIdKey] = this.props.droppableId, _value[droppableTypeKey] = this.props.type, _value);
- return value;
- };
-
- _proto.componentDidMount = function componentDidMount() {
- throwIfRefIsInvalid(this.ref);
- this.warnIfPlaceholderNotMounted();
- };
-
- _proto.componentDidUpdate = function componentDidUpdate() {
- this.warnIfPlaceholderNotMounted();
- };
-
- _proto.warnIfPlaceholderNotMounted = function warnIfPlaceholderNotMounted() {
- if (process.env.NODE_ENV === 'production') {
- return;
- }
-
- if (!this.props.placeholder) {
- return;
- }
-
- if (this.isPlaceholderMounted) {
- return;
- }
-
- console.warn("\n Droppable setup issue: DroppableProvided > placeholder could not be found.\n Please be sure to add the {provided.placeholder} Node as a child of your Droppable\n\n More information: https://github.com/atlassian/react-beautiful-dnd#1-provided-droppableprovided\n ");
- };
-
- _proto.getPlaceholder = function getPlaceholder() {
- if (!this.props.placeholder) {
- return null;
- }
-
- return __WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement(Placeholder, {
- placeholder: this.props.placeholder,
- onMount: this.onPlaceholderMount,
- onUnmount: this.onPlaceholderUnmount
- });
- };
-
- _proto.render = function render() {
- var _this$props = this.props,
- children = _this$props.children,
- direction = _this$props.direction,
- droppableId = _this$props.droppableId,
- ignoreContainerClipping = _this$props.ignoreContainerClipping,
- isDraggingOver = _this$props.isDraggingOver,
- isDropDisabled = _this$props.isDropDisabled,
- draggingOverWith = _this$props.draggingOverWith,
- type = _this$props.type;
- var provided = {
- innerRef: this.setRef,
- placeholder: this.getPlaceholder(),
- droppableProps: {
- 'data-react-beautiful-dnd-droppable': this.styleContext
- }
- };
- var snapshot = {
- isDraggingOver: isDraggingOver,
- draggingOverWith: draggingOverWith
- };
- return __WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement(DroppableDimensionPublisher, {
- droppableId: droppableId,
- type: type,
- direction: direction,
- ignoreContainerClipping: ignoreContainerClipping,
- isDropDisabled: isDropDisabled,
- getDroppableRef: this.getDroppableRef
- }, children(provided, snapshot));
- };
-
- return Droppable;
- }(__WEBPACK_IMPORTED_MODULE_9_react__["Component"]);
-
- Droppable.contextTypes = (_Droppable$contextTyp = {}, _Droppable$contextTyp[styleContextKey] = __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.string.isRequired, _Droppable$contextTyp);
- Droppable.childContextTypes = (_Droppable$childConte = {}, _Droppable$childConte[droppableIdKey] = __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.string.isRequired, _Droppable$childConte[droppableTypeKey] = __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.string.isRequired, _Droppable$childConte);
-
- var isStrictEqual = (function (a, b) {
- return a === b;
- });
-
- var makeMapStateToProps = function makeMapStateToProps() {
- var getIsDraggingOver = function getIsDraggingOver(id, destination) {
- if (!destination) {
- return false;
- }
-
- return destination.droppableId === id;
- };
-
- var shouldUsePlaceholder = function shouldUsePlaceholder(id, descriptor, destination) {
- if (!destination) {
- return false;
- }
-
- if (id === descriptor.droppableId) {
- return false;
- }
-
- return id === destination.droppableId;
- };
-
- var getMapProps = Object(__WEBPACK_IMPORTED_MODULE_4_memoize_one__["a" /* default */])(function (isDraggingOver, draggingOverWith, placeholder) {
- return {
- isDraggingOver: isDraggingOver,
- draggingOverWith: draggingOverWith,
- placeholder: placeholder
- };
- });
-
- var getDefault = function getDefault() {
- return getMapProps(false, null, null);
- };
-
- var selector = function selector(state, ownProps) {
- if (ownProps.isDropDisabled) {
- return getDefault();
- }
-
- var id = ownProps.droppableId;
-
- if (state.isDragging) {
- var destination = state.impact.destination;
- var isDraggingOver = getIsDraggingOver(id, destination);
- var draggableId = state.critical.draggable.id;
- var draggingOverWith = isDraggingOver ? draggableId : null;
- var draggable = state.dimensions.draggables[draggableId];
- var placeholder = shouldUsePlaceholder(id, draggable.descriptor, destination) ? draggable.placeholder : null;
- return getMapProps(isDraggingOver, draggingOverWith, placeholder);
- }
-
- if (state.phase === 'DROP_ANIMATING') {
- var _destination = state.pending.impact.destination;
-
- var _isDraggingOver = getIsDraggingOver(id, _destination);
-
- var _draggableId = state.pending.result.draggableId;
-
- var _draggingOverWith = _isDraggingOver ? _draggableId : null;
-
- var _draggable = state.dimensions.draggables[_draggableId];
-
- var _placeholder = shouldUsePlaceholder(id, _draggable.descriptor, _destination) ? _draggable.placeholder : null;
-
- return getMapProps(_isDraggingOver, _draggingOverWith, _placeholder);
- }
-
- return getDefault();
- };
-
- return selector;
- };
- var connectedDroppable = Object(__WEBPACK_IMPORTED_MODULE_11_react_redux__["a" /* connect */])(makeMapStateToProps, null, null, {
- storeKey: storeKey,
- pure: true,
- areStatePropsEqual: isStrictEqual
- })(Droppable);
- connectedDroppable.defaultProps = {
- type: 'DEFAULT',
- isDropDisabled: false,
- direction: 'vertical',
- ignoreContainerClipping: false
- };
-
- var _DraggableDimensionPu;
-
- var DraggableDimensionPublisher = function (_Component) {
- Object(__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(DraggableDimensionPublisher, _Component);
-
- function DraggableDimensionPublisher() {
- var _this;
-
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
-
- _this = _Component.call.apply(_Component, [this].concat(args)) || this;
- _this.publishedDescriptor = null;
- _this.getMemoizedDescriptor = Object(__WEBPACK_IMPORTED_MODULE_4_memoize_one__["a" /* default */])(function (id, index, droppableId, type) {
- return {
- id: id,
- index: index,
- droppableId: droppableId,
- type: type
- };
- });
-
- _this.publish = function () {
- var marshal = _this.context[dimensionMarshalKey];
-
- var descriptor = _this.getMemoizedDescriptor(_this.props.draggableId, _this.props.index, _this.props.droppableId, _this.props.type);
-
- if (!_this.publishedDescriptor) {
- marshal.registerDraggable(descriptor, _this.getDimension);
- _this.publishedDescriptor = descriptor;
- return;
- }
-
- if (descriptor === _this.publishedDescriptor) {
- return;
- }
-
- marshal.updateDraggable(_this.publishedDescriptor, descriptor, _this.getDimension);
- _this.publishedDescriptor = descriptor;
- };
-
- _this.unpublish = function () {
- !_this.publishedDescriptor ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Cannot unpublish descriptor when none is published') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- var marshal = _this.context[dimensionMarshalKey];
- marshal.unregisterDraggable(_this.publishedDescriptor);
- _this.publishedDescriptor = null;
- };
-
- _this.getDimension = function (windowScroll) {
- var targetRef = _this.props.getDraggableRef();
-
- var descriptor = _this.publishedDescriptor;
- !targetRef ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'DraggableDimensionPublisher cannot calculate a dimension when not attached to the DOM') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- !descriptor ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Cannot get dimension for unpublished draggable') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- var computedStyles = window.getComputedStyle(targetRef);
- var borderBox = targetRef.getBoundingClientRect();
- var client = Object(__WEBPACK_IMPORTED_MODULE_2_css_box_model__["a" /* calculateBox */])(borderBox, computedStyles);
- var page = Object(__WEBPACK_IMPORTED_MODULE_2_css_box_model__["e" /* withScroll */])(client, windowScroll);
- var placeholder = {
- client: client,
- tagName: targetRef.tagName.toLowerCase(),
- display: computedStyles.display
- };
- var dimension = {
- descriptor: descriptor,
- placeholder: placeholder,
- client: client,
- page: page
- };
- return dimension;
- };
-
- return _this;
- }
-
- var _proto = DraggableDimensionPublisher.prototype;
-
- _proto.componentDidMount = function componentDidMount() {
- this.publish();
- };
-
- _proto.componentDidUpdate = function componentDidUpdate() {
- this.publish();
- };
-
- _proto.componentWillUnmount = function componentWillUnmount() {
- this.unpublish();
- };
-
- _proto.render = function render() {
- return this.props.children;
- };
-
- return DraggableDimensionPublisher;
- }(__WEBPACK_IMPORTED_MODULE_9_react__["Component"]);
-
- DraggableDimensionPublisher.contextTypes = (_DraggableDimensionPu = {}, _DraggableDimensionPu[dimensionMarshalKey] = __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.object.isRequired, _DraggableDimensionPu);
-
- var DoubleRenderBlocker = function (_React$Component) {
- Object(__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(DoubleRenderBlocker, _React$Component);
-
- function DoubleRenderBlocker() {
- return _React$Component.apply(this, arguments) || this;
- }
-
- var _proto = DoubleRenderBlocker.prototype;
-
- _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {
- if (isEqual(origin, nextProps.change)) {
- return true;
- }
-
- if (isEqual(this.props.change, nextProps.change)) {
- return false;
- }
-
- return true;
- };
-
- _proto.render = function render() {
- return this.props.children(this.props.change);
- };
-
- return DoubleRenderBlocker;
- }(__WEBPACK_IMPORTED_MODULE_9_react___default.a.Component);
-
- var Moveable = function (_Component) {
- Object(__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Moveable, _Component);
-
- function Moveable() {
- return _Component.apply(this, arguments) || this;
- }
-
- var _proto2 = Moveable.prototype;
-
- _proto2.getFinal = function getFinal() {
- var destination = this.props.destination;
- var speed = this.props.speed;
-
- if (speed === 'INSTANT') {
- return destination;
- }
-
- var config = speed === 'FAST' ? physics.fast : physics.standard;
- return {
- x: Object(__WEBPACK_IMPORTED_MODULE_12_react_motion__["spring"])(destination.x, config),
- y: Object(__WEBPACK_IMPORTED_MODULE_12_react_motion__["spring"])(destination.y, config)
- };
- };
-
- _proto2.render = function render() {
- var _this = this;
-
- var final = this.getFinal();
- return __WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_12_react_motion__["Motion"], {
- defaultStyle: origin,
- style: final,
- onRest: this.props.onMoveEnd
- }, function (current) {
- var _this$props = _this.props,
- speed = _this$props.speed,
- destination = _this$props.destination,
- children = _this$props.children;
- var target = speed === 'INSTANT' ? destination : current;
- return __WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement(DoubleRenderBlocker, {
- change: target
- }, children);
- });
- };
-
- return Moveable;
- }(__WEBPACK_IMPORTED_MODULE_9_react__["Component"]);
-
- Moveable.defaultProps = {
- destination: origin
- };
-
- var getWindowFromRef = (function (ref) {
- return ref ? ref.ownerDocument.defaultView : window;
- });
-
- var selector = "[" + dragHandle + "]";
-
- var isSVG = function isSVG(el) {
- if (typeof SVGElement === 'undefined') {
- return false;
- }
-
- return el instanceof SVGElement;
- };
-
- var throwIfSVG = function throwIfSVG(el) {
- !!isSVG(el) ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, "A drag handle cannot be an SVGElement: it has inconsistent focus support.\n\n More information: https://github.com/atlassian/react-beautiful-dnd/tree/master/docs/guides/dragging-svgs.md") : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- };
-
- var getDragHandleRef = function getDragHandleRef(draggableRef) {
- if (draggableRef.hasAttribute(dragHandle)) {
- throwIfSVG(draggableRef);
- return draggableRef;
- }
-
- var el = draggableRef.querySelector(selector);
- throwIfSVG(draggableRef);
- !el ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, "\n Cannot find drag handle element inside of Draggable.\n Please be sure to apply the {...provided.dragHandleProps} to your Draggable\n\n More information: https://github.com/atlassian/react-beautiful-dnd#draggable\n ") : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- !(el instanceof HTMLElement) ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'A drag handle must be a HTMLElement') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- return el;
- };
-
- var retainingFocusFor = null;
- var listenerOptions$1 = {
- capture: true
- };
-
- var clearRetentionOnFocusChange = function () {
- var isBound = false;
-
- var bind = function bind() {
- if (isBound) {
- return;
- }
-
- isBound = true;
- window.addEventListener('focus', onWindowFocusChange, listenerOptions$1);
- };
-
- var unbind = function unbind() {
- if (!isBound) {
- return;
- }
-
- isBound = false;
- window.removeEventListener('focus', onWindowFocusChange, listenerOptions$1);
- };
-
- var onWindowFocusChange = function onWindowFocusChange() {
- unbind();
- retainingFocusFor = null;
- };
-
- var result = function result() {
- return bind();
- };
-
- result.cancel = function () {
- return unbind();
- };
-
- return result;
- }();
-
- var retain = function retain(id) {
- retainingFocusFor = id;
- clearRetentionOnFocusChange();
- };
-
- var tryRestoreFocus = function tryRestoreFocus(id, draggableRef) {
- if (!retainingFocusFor) {
- return;
- }
-
- if (id !== retainingFocusFor) {
- return;
- }
-
- retainingFocusFor = null;
- clearRetentionOnFocusChange.cancel();
- var dragHandleRef = getDragHandleRef(draggableRef);
-
- if (!dragHandleRef) {
- console.warn('Could not find drag handle in the DOM to focus on it');
- return;
- }
-
- dragHandleRef.focus();
- };
-
- var retainer = {
- retain: retain,
- tryRestoreFocus: tryRestoreFocus
- };
-
- var interactiveTagNames = {
- input: true,
- button: true,
- textarea: true,
- select: true,
- option: true,
- optgroup: true,
- video: true,
- audio: true
- };
-
- var isAnInteractiveElement = function isAnInteractiveElement(parent, current) {
- if (current == null) {
- return false;
- }
-
- var hasAnInteractiveTag = Boolean(interactiveTagNames[current.tagName.toLowerCase()]);
-
- if (hasAnInteractiveTag) {
- return true;
- }
-
- var attribute = current.getAttribute('contenteditable');
-
- if (attribute === 'true' || attribute === '') {
- return true;
- }
-
- if (current === parent) {
- return false;
- }
-
- return isAnInteractiveElement(parent, current.parentElement);
- };
-
- var shouldAllowDraggingFromTarget = (function (event, props) {
- if (props.canDragInteractiveElements) {
- return true;
- }
-
- var target = event.target,
- currentTarget = event.currentTarget;
-
- if (!(target instanceof Element) || !(currentTarget instanceof Element)) {
- return true;
- }
-
- return !isAnInteractiveElement(currentTarget, target);
- });
-
- var createScheduler = (function (callbacks) {
- var memoizedMove = Object(__WEBPACK_IMPORTED_MODULE_4_memoize_one__["a" /* default */])(function (x, y) {
- var point = {
- x: x,
- y: y
- };
- callbacks.onMove(point);
- });
- var move = Object(__WEBPACK_IMPORTED_MODULE_7_raf_schd__["a" /* default */])(function (point) {
- return memoizedMove(point.x, point.y);
- });
- var moveUp = Object(__WEBPACK_IMPORTED_MODULE_7_raf_schd__["a" /* default */])(callbacks.onMoveUp);
- var moveDown = Object(__WEBPACK_IMPORTED_MODULE_7_raf_schd__["a" /* default */])(callbacks.onMoveDown);
- var moveRight = Object(__WEBPACK_IMPORTED_MODULE_7_raf_schd__["a" /* default */])(callbacks.onMoveRight);
- var moveLeft = Object(__WEBPACK_IMPORTED_MODULE_7_raf_schd__["a" /* default */])(callbacks.onMoveLeft);
- var windowScrollMove = Object(__WEBPACK_IMPORTED_MODULE_7_raf_schd__["a" /* default */])(callbacks.onWindowScroll);
-
- var cancel = function cancel() {
- move.cancel();
- moveUp.cancel();
- moveDown.cancel();
- moveRight.cancel();
- moveLeft.cancel();
- windowScrollMove.cancel();
- };
-
- return {
- move: move,
- moveUp: moveUp,
- moveDown: moveDown,
- moveRight: moveRight,
- moveLeft: moveLeft,
- windowScrollMove: windowScrollMove,
- cancel: cancel
- };
- });
-
- var sloppyClickThreshold = 5;
- var isSloppyClickThresholdExceeded = (function (original, current) {
- return Math.abs(current.x - original.x) >= sloppyClickThreshold || Math.abs(current.y - original.y) >= sloppyClickThreshold;
- });
-
- var tab = 9;
- var enter = 13;
- var escape = 27;
- var space = 32;
- var pageUp = 33;
- var pageDown = 34;
- var end = 35;
- var home = 36;
- var arrowLeft = 37;
- var arrowUp = 38;
- var arrowRight = 39;
- var arrowDown = 40;
-
- var _preventedKeys;
- var preventedKeys = (_preventedKeys = {}, _preventedKeys[enter] = true, _preventedKeys[tab] = true, _preventedKeys);
- var preventStandardKeyEvents = (function (event) {
- if (preventedKeys[event.keyCode]) {
- event.preventDefault();
- }
- });
-
- var getOptions = function getOptions(shared, fromBinding) {
- return Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, shared, fromBinding);
- };
-
- var bindEvents = function bindEvents(el, bindings, sharedOptions) {
- bindings.forEach(function (binding) {
- var options = getOptions(sharedOptions, binding.options);
- el.addEventListener(binding.eventName, binding.fn, options);
- });
- };
- var unbindEvents = function unbindEvents(el, bindings, sharedOptions) {
- bindings.forEach(function (binding) {
- var options = getOptions(sharedOptions, binding.options);
- el.removeEventListener(binding.eventName, binding.fn, options);
- });
- };
-
- var sharedOptions = {
- capture: true
- };
- var createPostDragEventPreventer = (function (getWindow) {
- var isBound = false;
-
- var bind = function bind() {
- if (isBound) {
- return;
- }
-
- isBound = true;
- bindEvents(getWindow(), pointerEvents, sharedOptions);
- };
-
- var unbind = function unbind() {
- if (!isBound) {
- return;
- }
-
- isBound = false;
- unbindEvents(getWindow(), pointerEvents, sharedOptions);
- };
-
- var pointerEvents = [{
- eventName: 'click',
- fn: function fn(event) {
- event.preventDefault();
- unbind();
- }
- }, {
- eventName: 'mousedown',
- fn: unbind
- }, {
- eventName: 'touchstart',
- fn: unbind
- }];
-
- var preventNext = function preventNext() {
- if (isBound) {
- unbind();
- }
-
- bind();
- };
-
- var preventer = {
- preventNext: preventNext,
- abort: unbind
- };
- return preventer;
- });
-
- var createEventMarshal = (function () {
- var isMouseDownHandled = false;
-
- var handle = function handle() {
- !!isMouseDownHandled ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Cannot handle mouse down as it is already handled') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- isMouseDownHandled = true;
- };
-
- var isHandled = function isHandled() {
- return isMouseDownHandled;
- };
-
- var reset = function reset() {
- isMouseDownHandled = false;
- };
-
- return {
- handle: handle,
- isHandled: isHandled,
- reset: reset
- };
- });
-
- var supportedEventName = function () {
- var base = 'visibilitychange';
-
- if (typeof document === 'undefined') {
- return base;
- }
-
- var candidates = [base, "ms" + base, "webkit" + base, "moz" + base, "o" + base];
- var supported = candidates.find(function (eventName) {
- return "on" + eventName in document;
- });
- return supported || base;
- }();
-
- var primaryButton = 0;
-
- var noop = function noop() {};
-
- var mouseDownMarshal = createEventMarshal();
- var createMouseSensor = (function (_ref) {
- var callbacks = _ref.callbacks,
- getWindow = _ref.getWindow,
- canStartCapturing = _ref.canStartCapturing;
- var state = {
- isDragging: false,
- pending: null
- };
-
- var setState = function setState(newState) {
- state = newState;
- };
-
- var isDragging = function isDragging() {
- return state.isDragging;
- };
-
- var isCapturing = function isCapturing() {
- return Boolean(state.pending || state.isDragging);
- };
-
- var schedule = createScheduler(callbacks);
- var postDragEventPreventer = createPostDragEventPreventer(getWindow);
-
- var startDragging = function startDragging(fn) {
- if (fn === void 0) {
- fn = noop;
- }
-
- setState({
- pending: null,
- isDragging: true
- });
- fn();
- };
-
- var stopDragging = function stopDragging(fn, shouldBlockClick) {
- if (fn === void 0) {
- fn = noop;
- }
-
- if (shouldBlockClick === void 0) {
- shouldBlockClick = true;
- }
-
- schedule.cancel();
- unbindWindowEvents();
- mouseDownMarshal.reset();
-
- if (shouldBlockClick) {
- postDragEventPreventer.preventNext();
- }
-
- setState({
- isDragging: false,
- pending: null
- });
- fn();
- };
-
- var startPendingDrag = function startPendingDrag(point) {
- setState({
- pending: point,
- isDragging: false
- });
- bindWindowEvents();
- };
-
- var stopPendingDrag = function stopPendingDrag() {
- stopDragging(noop, false);
- };
-
- var kill = function kill(fn) {
- if (fn === void 0) {
- fn = noop;
- }
-
- if (state.pending) {
- stopPendingDrag();
- return;
- }
-
- stopDragging(fn);
- };
-
- var unmount = function unmount() {
- kill();
- postDragEventPreventer.abort();
- };
-
- var cancel = function cancel() {
- kill(callbacks.onCancel);
- };
-
- var windowBindings = [{
- eventName: 'mousemove',
- fn: function fn(event) {
- var button = event.button,
- clientX = event.clientX,
- clientY = event.clientY;
-
- if (button !== primaryButton) {
- return;
- }
-
- var point = {
- x: clientX,
- y: clientY
- };
-
- if (state.isDragging) {
- event.preventDefault();
- schedule.move(point);
- return;
- }
-
- if (!state.pending) {
- kill();
- process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Expected there to be a pending drag') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false);
- }
-
- if (!isSloppyClickThresholdExceeded(state.pending, point)) {
- return;
- }
-
- event.preventDefault();
- startDragging(function () {
- return callbacks.onLift({
- clientSelection: point,
- autoScrollMode: 'FLUID'
- });
- });
- }
- }, {
- eventName: 'mouseup',
- fn: function fn(event) {
- if (state.pending) {
- stopPendingDrag();
- return;
- }
-
- event.preventDefault();
- stopDragging(callbacks.onDrop);
- }
- }, {
- eventName: 'mousedown',
- fn: function fn(event) {
- if (state.isDragging) {
- event.preventDefault();
- }
-
- stopDragging(callbacks.onCancel);
- }
- }, {
- eventName: 'keydown',
- fn: function fn(event) {
- if (!state.isDragging) {
- cancel();
- return;
- }
-
- if (event.keyCode === escape) {
- event.preventDefault();
- cancel();
- return;
- }
-
- preventStandardKeyEvents(event);
- }
- }, {
- eventName: 'resize',
- fn: cancel
- }, {
- eventName: 'scroll',
- options: {
- passive: true,
- capture: false
- },
- fn: function fn() {
- if (state.pending) {
- stopPendingDrag();
- return;
- }
-
- schedule.windowScrollMove();
- }
- }, {
- eventName: 'webkitmouseforcechanged',
- fn: function fn(event) {
- if (event.webkitForce == null || MouseEvent.WEBKIT_FORCE_AT_FORCE_MOUSE_DOWN == null) {
- if (process.env.NODE_ENV !== 'production') {
- console.warn('handling a mouse force changed event when it is not supported');
- }
-
- return;
- }
-
- var forcePressThreshold = MouseEvent.WEBKIT_FORCE_AT_FORCE_MOUSE_DOWN;
- var isForcePressing = event.webkitForce >= forcePressThreshold;
-
- if (isForcePressing) {
- cancel();
- }
- }
- }, {
- eventName: supportedEventName,
- fn: cancel
- }];
-
- var bindWindowEvents = function bindWindowEvents() {
- var win = getWindow();
- bindEvents(win, windowBindings, {
- capture: true
- });
- };
-
- var unbindWindowEvents = function unbindWindowEvents() {
- var win = getWindow();
- unbindEvents(win, windowBindings, {
- capture: true
- });
- };
-
- var onMouseDown = function onMouseDown(event) {
- if (mouseDownMarshal.isHandled()) {
- return;
- }
-
- !!isCapturing() ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Should not be able to perform a mouse down while a drag or pending drag is occurring') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
-
- if (!canStartCapturing(event)) {
- return;
- }
-
- if (event.button !== primaryButton) {
- return;
- }
-
- if (event.ctrlKey || event.metaKey || event.shiftKey || event.altKey) {
- return;
- }
-
- mouseDownMarshal.handle();
- event.preventDefault();
- var point = {
- x: event.clientX,
- y: event.clientY
- };
- startPendingDrag(point);
- };
-
- var sensor = {
- onMouseDown: onMouseDown,
- kill: kill,
- isCapturing: isCapturing,
- isDragging: isDragging,
- unmount: unmount
- };
- return sensor;
- });
-
- var getBorderBoxCenterPosition = (function (el) {
- return Object(__WEBPACK_IMPORTED_MODULE_2_css_box_model__["d" /* getRect */])(el.getBoundingClientRect()).center;
- });
-
- var _scrollJumpKeys;
- var scrollJumpKeys = (_scrollJumpKeys = {}, _scrollJumpKeys[pageDown] = true, _scrollJumpKeys[pageUp] = true, _scrollJumpKeys[home] = true, _scrollJumpKeys[end] = true, _scrollJumpKeys);
-
- var noop$1 = function noop() {};
-
- var createKeyboardSensor = (function (_ref) {
- var callbacks = _ref.callbacks,
- getWindow = _ref.getWindow,
- getDraggableRef = _ref.getDraggableRef,
- canStartCapturing = _ref.canStartCapturing;
- var state = {
- isDragging: false
- };
-
- var setState = function setState(newState) {
- state = newState;
- };
-
- var startDragging = function startDragging(fn) {
- if (fn === void 0) {
- fn = noop$1;
- }
-
- setState({
- isDragging: true
- });
- bindWindowEvents();
- fn();
- };
-
- var stopDragging = function stopDragging(fn) {
- if (fn === void 0) {
- fn = noop$1;
- }
-
- schedule.cancel();
- unbindWindowEvents();
- setState({
- isDragging: false
- });
- fn();
- };
-
- var kill = function kill() {
- return stopDragging();
- };
-
- var cancel = function cancel() {
- stopDragging(callbacks.onCancel);
- };
-
- var isDragging = function isDragging() {
- return state.isDragging;
- };
-
- var schedule = createScheduler(callbacks);
-
- var onKeyDown = function onKeyDown(event) {
- if (!isDragging()) {
- if (event.defaultPrevented) {
- return;
- }
-
- if (!canStartCapturing(event)) {
- return;
- }
-
- if (event.keyCode !== space) {
- return;
- }
-
- var ref = getDraggableRef();
- !ref ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Cannot start a keyboard drag without a draggable ref') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- var center = getBorderBoxCenterPosition(ref);
- event.preventDefault();
- startDragging(function () {
- return callbacks.onLift({
- clientSelection: center,
- autoScrollMode: 'JUMP'
- });
- });
- return;
- }
-
- if (event.keyCode === escape) {
- event.preventDefault();
- cancel();
- return;
- }
-
- if (event.keyCode === space) {
- event.preventDefault();
- stopDragging(callbacks.onDrop);
- return;
- }
-
- if (event.keyCode === arrowDown) {
- event.preventDefault();
- schedule.moveDown();
- return;
- }
-
- if (event.keyCode === arrowUp) {
- event.preventDefault();
- schedule.moveUp();
- return;
- }
-
- if (event.keyCode === arrowRight) {
- event.preventDefault();
- schedule.moveRight();
- return;
- }
-
- if (event.keyCode === arrowLeft) {
- event.preventDefault();
- schedule.moveLeft();
- return;
- }
-
- if (scrollJumpKeys[event.keyCode]) {
- event.preventDefault();
- return;
- }
-
- preventStandardKeyEvents(event);
- };
-
- var windowBindings = [{
- eventName: 'mousedown',
- fn: cancel
- }, {
- eventName: 'mouseup',
- fn: cancel
- }, {
- eventName: 'click',
- fn: cancel
- }, {
- eventName: 'touchstart',
- fn: cancel
- }, {
- eventName: 'resize',
- fn: cancel
- }, {
- eventName: 'wheel',
- fn: cancel
- }, {
- eventName: 'scroll',
- options: {
- capture: false
- },
- fn: callbacks.onWindowScroll
- }, {
- eventName: supportedEventName,
- fn: cancel
- }];
-
- var bindWindowEvents = function bindWindowEvents() {
- bindEvents(getWindow(), windowBindings, {
- capture: true
- });
- };
-
- var unbindWindowEvents = function unbindWindowEvents() {
- unbindEvents(getWindow(), windowBindings, {
- capture: true
- });
- };
-
- var sensor = {
- onKeyDown: onKeyDown,
- kill: kill,
- isDragging: isDragging,
- isCapturing: isDragging,
- unmount: kill
- };
- return sensor;
- });
-
- var timeForLongPress = 150;
- var forcePressThreshold = 0.15;
- var touchStartMarshal = createEventMarshal();
-
- var noop$2 = function noop() {};
-
- var webkitHack = function () {
- var stub = {
- preventTouchMove: noop$2,
- releaseTouchMove: noop$2
- };
-
- if (typeof window === 'undefined') {
- return stub;
- }
-
- if (!('ontouchstart' in window)) {
- return stub;
- }
-
- var isBlocking = false;
- window.addEventListener('touchmove', function (event) {
- if (!isBlocking) {
- return;
- }
-
- if (event.defaultPrevented) {
- return;
- }
-
- event.preventDefault();
- }, {
- passive: false,
- capture: false
- });
-
- var preventTouchMove = function preventTouchMove() {
- isBlocking = true;
- };
-
- var releaseTouchMove = function releaseTouchMove() {
- isBlocking = false;
- };
-
- return {
- preventTouchMove: preventTouchMove,
- releaseTouchMove: releaseTouchMove
- };
- }();
-
- var initial = {
- isDragging: false,
- pending: null,
- hasMoved: false,
- longPressTimerId: null
- };
- var createTouchSensor = (function (_ref) {
- var callbacks = _ref.callbacks,
- getWindow = _ref.getWindow,
- canStartCapturing = _ref.canStartCapturing;
- var state = initial;
-
- var setState = function setState(partial) {
- state = Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_corejs2_helpers_esm_extends__["a" /* default */])({}, state, partial);
- };
-
- var isDragging = function isDragging() {
- return state.isDragging;
- };
-
- var isCapturing = function isCapturing() {
- return Boolean(state.pending || state.isDragging || state.longPressTimerId);
- };
-
- var schedule = createScheduler(callbacks);
- var postDragEventPreventer = createPostDragEventPreventer(getWindow);
-
- var startDragging = function startDragging() {
- var pending = state.pending;
-
- if (!pending) {
- kill();
- process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'cannot start a touch drag without a pending position') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false);
- }
-
- setState({
- isDragging: true,
- hasMoved: false,
- pending: null,
- longPressTimerId: null
- });
- callbacks.onLift({
- clientSelection: pending,
- autoScrollMode: 'FLUID'
- });
- };
-
- var stopDragging = function stopDragging(fn) {
- if (fn === void 0) {
- fn = noop$2;
- }
-
- schedule.cancel();
- touchStartMarshal.reset();
- webkitHack.releaseTouchMove();
- unbindWindowEvents();
- postDragEventPreventer.preventNext();
- setState(initial);
- fn();
- };
-
- var startPendingDrag = function startPendingDrag(event) {
- var touch = event.touches[0];
- var clientX = touch.clientX,
- clientY = touch.clientY;
- var point = {
- x: clientX,
- y: clientY
- };
- var longPressTimerId = setTimeout(startDragging, timeForLongPress);
- setState({
- longPressTimerId: longPressTimerId,
- pending: point,
- isDragging: false,
- hasMoved: false
- });
- bindWindowEvents();
- };
-
- var stopPendingDrag = function stopPendingDrag() {
- if (state.longPressTimerId) {
- clearTimeout(state.longPressTimerId);
- }
-
- schedule.cancel();
- touchStartMarshal.reset();
- webkitHack.releaseTouchMove();
- unbindWindowEvents();
- setState(initial);
- };
-
- var kill = function kill(fn) {
- if (fn === void 0) {
- fn = noop$2;
- }
-
- if (state.pending) {
- stopPendingDrag();
- return;
- }
-
- stopDragging(fn);
- };
-
- var unmount = function unmount() {
- kill();
- postDragEventPreventer.abort();
- };
-
- var cancel = function cancel() {
- kill(callbacks.onCancel);
- };
-
- var windowBindings = [{
- eventName: 'touchmove',
- options: {
- passive: false
- },
- fn: function fn(event) {
- if (!state.isDragging) {
- stopPendingDrag();
- return;
- }
-
- if (!state.hasMoved) {
- setState({
- hasMoved: true
- });
- }
-
- var _event$touches$ = event.touches[0],
- clientX = _event$touches$.clientX,
- clientY = _event$touches$.clientY;
- var point = {
- x: clientX,
- y: clientY
- };
- event.preventDefault();
- schedule.move(point);
- }
- }, {
- eventName: 'touchend',
- fn: function fn(event) {
- if (!state.isDragging) {
- stopPendingDrag();
- return;
- }
-
- event.preventDefault();
- stopDragging(callbacks.onDrop);
- }
- }, {
- eventName: 'touchcancel',
- fn: function fn(event) {
- if (!state.isDragging) {
- stopPendingDrag();
- return;
- }
-
- event.preventDefault();
- stopDragging(callbacks.onCancel);
- }
- }, {
- eventName: 'touchstart',
- fn: cancel
- }, {
- eventName: 'orientationchange',
- fn: cancel
- }, {
- eventName: 'resize',
- fn: cancel
- }, {
- eventName: 'scroll',
- options: {
- passive: true,
- capture: false
- },
- fn: function fn() {
- if (state.pending) {
- stopPendingDrag();
- return;
- }
-
- schedule.windowScrollMove();
- }
- }, {
- eventName: 'contextmenu',
- fn: function fn(event) {
- event.preventDefault();
- }
- }, {
- eventName: 'keydown',
- fn: function fn(event) {
- if (!state.isDragging) {
- cancel();
- return;
- }
-
- if (event.keyCode === escape) {
- event.preventDefault();
- }
-
- cancel();
- }
- }, {
- eventName: 'touchforcechange',
- fn: function fn(event) {
- if (state.hasMoved) {
- event.preventDefault();
- return;
- }
-
- var touch = event.touches[0];
-
- if (touch.force >= forcePressThreshold) {
- cancel();
- }
- }
- }, {
- eventName: supportedEventName,
- fn: cancel
- }];
-
- var bindWindowEvents = function bindWindowEvents() {
- bindEvents(getWindow(), windowBindings, {
- capture: true
- });
- };
-
- var unbindWindowEvents = function unbindWindowEvents() {
- unbindEvents(getWindow(), windowBindings, {
- capture: true
- });
- };
-
- var onTouchStart = function onTouchStart(event) {
- if (touchStartMarshal.isHandled()) {
- return;
- }
-
- !!isCapturing() ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Should not be able to perform a touch start while a drag or pending drag is occurring') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
-
- if (!canStartCapturing(event)) {
- return;
- }
-
- touchStartMarshal.handle();
- webkitHack.preventTouchMove();
- startPendingDrag(event);
- };
-
- var sensor = {
- onTouchStart: onTouchStart,
- kill: kill,
- isCapturing: isCapturing,
- isDragging: isDragging,
- unmount: unmount
- };
- return sensor;
- });
-
- var _DragHandle$contextTy;
-
- var preventHtml5Dnd = function preventHtml5Dnd(event) {
- event.preventDefault();
- };
-
- var DragHandle = function (_Component) {
- Object(__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(DragHandle, _Component);
-
- function DragHandle(props, context) {
- var _this;
-
- _this = _Component.call(this, props, context) || this;
- _this.mouseSensor = void 0;
- _this.keyboardSensor = void 0;
- _this.touchSensor = void 0;
- _this.sensors = void 0;
- _this.styleContext = void 0;
- _this.canLift = void 0;
- _this.isFocused = false;
- _this.lastDraggableRef = void 0;
-
- _this.onFocus = function () {
- _this.isFocused = true;
- };
-
- _this.onBlur = function () {
- _this.isFocused = false;
- };
-
- _this.onKeyDown = function (event) {
- if (_this.mouseSensor.isCapturing() || _this.touchSensor.isCapturing()) {
- return;
- }
-
- _this.keyboardSensor.onKeyDown(event);
- };
-
- _this.onMouseDown = function (event) {
- if (_this.keyboardSensor.isCapturing() || _this.mouseSensor.isCapturing()) {
- return;
- }
-
- _this.mouseSensor.onMouseDown(event);
- };
-
- _this.onTouchStart = function (event) {
- if (_this.mouseSensor.isCapturing() || _this.keyboardSensor.isCapturing()) {
- return;
- }
-
- _this.touchSensor.onTouchStart(event);
- };
-
- _this.canStartCapturing = function (event) {
- if (_this.isAnySensorCapturing()) {
- return false;
- }
-
- if (!_this.canLift(_this.props.draggableId)) {
- return false;
- }
-
- return shouldAllowDraggingFromTarget(event, _this.props);
- };
-
- _this.isAnySensorCapturing = function () {
- return _this.sensors.some(function (sensor) {
- return sensor.isCapturing();
- });
- };
-
- _this.getProvided = Object(__WEBPACK_IMPORTED_MODULE_4_memoize_one__["a" /* default */])(function (isEnabled) {
- if (!isEnabled) {
- return null;
- }
-
- var provided = {
- onMouseDown: _this.onMouseDown,
- onKeyDown: _this.onKeyDown,
- onTouchStart: _this.onTouchStart,
- onFocus: _this.onFocus,
- onBlur: _this.onBlur,
- tabIndex: 0,
- 'data-react-beautiful-dnd-drag-handle': _this.styleContext,
- 'aria-roledescription': 'Draggable item. Press space bar to lift',
- draggable: false,
- onDragStart: preventHtml5Dnd
- };
- return provided;
- });
-
- var getWindow = function getWindow() {
- return getWindowFromRef(_this.props.getDraggableRef());
- };
-
- var args = {
- callbacks: _this.props.callbacks,
- getDraggableRef: _this.props.getDraggableRef,
- getWindow: getWindow,
- canStartCapturing: _this.canStartCapturing
- };
- _this.mouseSensor = createMouseSensor(args);
- _this.keyboardSensor = createKeyboardSensor(args);
- _this.touchSensor = createTouchSensor(args);
- _this.sensors = [_this.mouseSensor, _this.keyboardSensor, _this.touchSensor];
- _this.styleContext = context[styleContextKey];
- _this.canLift = context[canLiftContextKey];
- return _this;
- }
-
- var _proto = DragHandle.prototype;
-
- _proto.componentDidMount = function componentDidMount() {
- var draggableRef = this.props.getDraggableRef();
- this.lastDraggableRef = draggableRef;
- !draggableRef ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Cannot get draggable ref from drag handle') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
-
- if (!this.props.isEnabled) {
- return;
- }
-
- var dragHandleRef = getDragHandleRef(draggableRef);
- retainer.tryRestoreFocus(this.props.draggableId, dragHandleRef);
- };
-
- _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
- var _this2 = this;
-
- var ref = this.props.getDraggableRef();
-
- if (ref !== this.lastDraggableRef) {
- this.lastDraggableRef = ref;
-
- if (!ref || !this.isFocused) {
- return;
- }
-
- if (!this.props.isEnabled) {
- return;
- }
-
- getDragHandleRef(ref).focus();
- }
-
- var isCapturing = this.isAnySensorCapturing();
-
- if (!isCapturing) {
- return;
- }
-
- var isDragStopping = prevProps.isDragging && !this.props.isDragging;
-
- if (isDragStopping) {
- this.sensors.forEach(function (sensor) {
- if (sensor.isCapturing()) {
- sensor.kill();
- }
- });
- }
-
- if (this.props.isEnabled) {
- return;
- }
-
- this.sensors.forEach(function (sensor) {
- if (!sensor.isCapturing()) {
- return;
- }
-
- var wasDragging = sensor.isDragging();
- sensor.kill();
-
- if (wasDragging) {
- if (process.env.NODE_ENV !== 'production') {
- console.warn('You have disabled dragging on a Draggable while it was dragging. The drag has been cancelled');
- }
-
- _this2.props.callbacks.onCancel();
- }
- });
- };
-
- _proto.componentWillUnmount = function componentWillUnmount() {
- var _this3 = this;
-
- this.sensors.forEach(function (sensor) {
- var wasDragging = sensor.isDragging();
- sensor.unmount();
-
- if (wasDragging) {
- _this3.props.callbacks.onCancel();
- }
- });
-
- var shouldRetainFocus = function () {
- if (!_this3.props.isEnabled) {
- return false;
- }
-
- if (!_this3.isFocused) {
- return false;
- }
-
- return _this3.props.isDragging || _this3.props.isDropAnimating;
- }();
-
- if (shouldRetainFocus) {
- retainer.retain(this.props.draggableId);
- }
- };
-
- _proto.render = function render() {
- var _this$props = this.props,
- children = _this$props.children,
- isEnabled = _this$props.isEnabled;
- return children(this.getProvided(isEnabled));
- };
-
- return DragHandle;
- }(__WEBPACK_IMPORTED_MODULE_9_react__["Component"]);
-
- DragHandle.contextTypes = (_DragHandle$contextTy = {}, _DragHandle$contextTy[styleContextKey] = __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.string.isRequired, _DragHandle$contextTy[canLiftContextKey] = __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.func.isRequired, _DragHandle$contextTy);
-
- var getWindowScroll = (function () {
- return {
- x: window.pageXOffset,
- y: window.pageYOffset
- };
- });
-
- var getViewport = (function () {
- var scroll = getWindowScroll();
- var top = scroll.y;
- var left = scroll.x;
- var doc = document.documentElement;
- !doc ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Could not find document.documentElement') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- var width = doc.clientWidth;
- var height = doc.clientHeight;
- var right = left + width;
- var bottom = top + height;
- var frame = Object(__WEBPACK_IMPORTED_MODULE_2_css_box_model__["d" /* getRect */])({
- top: top,
- left: left,
- right: right,
- bottom: bottom
- });
- var maxScroll = getMaxScroll({
- scrollHeight: doc.scrollHeight,
- scrollWidth: doc.scrollWidth,
- width: frame.width,
- height: frame.height
- });
- var viewport = {
- frame: frame,
- scroll: {
- initial: scroll,
- current: scroll,
- max: maxScroll,
- diff: {
- value: origin,
- displacement: origin
- }
- }
- };
- return viewport;
- });
-
- var _Draggable$contextTyp;
- var zIndexOptions = {
- dragging: 5000,
- dropAnimating: 4500
- };
-
- var getTranslate = function getTranslate(offset) {
- if (isEqual(offset, origin)) {
- return null;
- }
-
- return "translate(" + offset.x + "px, " + offset.y + "px)";
- };
-
- var getSpeed$1 = function getSpeed(isDragging, shouldAnimateDragMovement, isDropAnimating) {
- if (isDropAnimating) {
- return 'STANDARD';
- }
-
- if (isDragging && shouldAnimateDragMovement) {
- return 'FAST';
- }
-
- return 'INSTANT';
- };
-
- var Draggable = function (_Component) {
- Object(__WEBPACK_IMPORTED_MODULE_8__babel_runtime_corejs2_helpers_esm_inheritsLoose__["a" /* default */])(Draggable, _Component);
-
- function Draggable(props, context) {
- var _this;
-
- _this = _Component.call(this, props, context) || this;
- _this.callbacks = void 0;
- _this.styleContext = void 0;
- _this.ref = null;
-
- _this.onMoveEnd = function () {
- if (_this.props.isDropAnimating) {
- _this.props.dropAnimationFinished();
- }
- };
-
- _this.onLift = function (options) {
- start('LIFT');
- var ref = _this.ref;
- !ref ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- !!_this.props.isDragDisabled ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Cannot lift a Draggable when it is disabled') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- var clientSelection = options.clientSelection,
- autoScrollMode = options.autoScrollMode;
- var _this$props = _this.props,
- lift = _this$props.lift,
- draggableId = _this$props.draggableId;
- var client = {
- selection: clientSelection,
- borderBoxCenter: getBorderBoxCenterPosition(ref),
- offset: origin
- };
- lift({
- id: draggableId,
- client: client,
- autoScrollMode: autoScrollMode,
- viewport: getViewport()
- });
- finish('LIFT');
- };
-
- _this.setRef = function (ref) {
- if (ref === null) {
- return;
- }
-
- if (ref === _this.ref) {
- return;
- }
-
- _this.ref = ref;
- throwIfRefIsInvalid(ref);
- };
-
- _this.getDraggableRef = function () {
- return _this.ref;
- };
-
- _this.getDraggingStyle = Object(__WEBPACK_IMPORTED_MODULE_4_memoize_one__["a" /* default */])(function (change, dimension, isDropAnimating) {
- var box = dimension.client;
- var style = {
- position: 'fixed',
- top: box.marginBox.top,
- left: box.marginBox.left,
- boxSizing: 'border-box',
- width: box.borderBox.width,
- height: box.borderBox.height,
- transition: 'none',
- zIndex: isDropAnimating ? zIndexOptions.dropAnimating : zIndexOptions.dragging,
- transform: getTranslate(change),
- pointerEvents: 'none'
- };
- return style;
- });
- _this.getNotDraggingStyle = Object(__WEBPACK_IMPORTED_MODULE_4_memoize_one__["a" /* default */])(function (current, shouldAnimateDisplacement) {
- var style = {
- transform: getTranslate(current),
- transition: shouldAnimateDisplacement ? null : 'none'
- };
- return style;
- });
- _this.getProvided = Object(__WEBPACK_IMPORTED_MODULE_4_memoize_one__["a" /* default */])(function (change, isDragging, isDropAnimating, shouldAnimateDisplacement, dimension, dragHandleProps) {
- var useDraggingStyle = isDragging || isDropAnimating;
-
- var draggableStyle = function () {
- if (!useDraggingStyle) {
- return _this.getNotDraggingStyle(change, shouldAnimateDisplacement);
- }
-
- !dimension ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'draggable dimension required for dragging') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- return _this.getDraggingStyle(change, dimension, isDropAnimating);
- }();
-
- var provided = {
- innerRef: _this.setRef,
- draggableProps: {
- 'data-react-beautiful-dnd-draggable': _this.styleContext,
- style: draggableStyle
- },
- dragHandleProps: dragHandleProps
- };
- return provided;
- });
- _this.getSnapshot = Object(__WEBPACK_IMPORTED_MODULE_4_memoize_one__["a" /* default */])(function (isDragging, isDropAnimating, draggingOver) {
- return {
- isDragging: isDragging || isDropAnimating,
- isDropAnimating: isDropAnimating,
- draggingOver: draggingOver
- };
- });
-
- _this.renderChildren = function (change, dragHandleProps) {
- var _this$props2 = _this.props,
- isDragging = _this$props2.isDragging,
- isDropAnimating = _this$props2.isDropAnimating,
- dimension = _this$props2.dimension,
- draggingOver = _this$props2.draggingOver,
- shouldAnimateDisplacement = _this$props2.shouldAnimateDisplacement,
- children = _this$props2.children;
- var child = children(_this.getProvided(change, isDragging, isDropAnimating, shouldAnimateDisplacement, dimension, dragHandleProps), _this.getSnapshot(isDragging, isDropAnimating, draggingOver));
- var isDraggingOrDropping = isDragging || isDropAnimating;
-
- var placeholder = function () {
- if (!isDraggingOrDropping) {
- return null;
- }
-
- !dimension ? process.env.NODE_ENV !== "production" ? Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false, 'Draggable: Dimension is required for dragging') : Object(__WEBPACK_IMPORTED_MODULE_1_tiny_invariant__["a" /* default */])(false) : void 0;
- return __WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement(Placeholder, {
- placeholder: dimension.placeholder
- });
- }();
-
- return __WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_9_react__["Fragment"], null, child, placeholder);
- };
-
- var callbacks = {
- onLift: _this.onLift,
- onMove: function onMove(clientSelection) {
- return props.move({
- client: clientSelection,
- shouldAnimate: false
- });
- },
- onDrop: function onDrop() {
- return props.drop({
- reason: 'DROP'
- });
- },
- onCancel: function onCancel() {
- return props.drop({
- reason: 'CANCEL'
- });
- },
- onMoveUp: props.moveUp,
- onMoveDown: props.moveDown,
- onMoveRight: props.moveRight,
- onMoveLeft: props.moveLeft,
- onWindowScroll: function onWindowScroll() {
- return props.moveByWindowScroll({
- scroll: getWindowScroll()
- });
- }
- };
- _this.callbacks = callbacks;
- _this.styleContext = context[styleContextKey];
- return _this;
- }
-
- var _proto = Draggable.prototype;
-
- _proto.componentWillUnmount = function componentWillUnmount() {
- this.ref = null;
- };
-
- _proto.render = function render() {
- var _this2 = this;
-
- var _this$props3 = this.props,
- draggableId = _this$props3.draggableId,
- index = _this$props3.index,
- offset = _this$props3.offset,
- isDragging = _this$props3.isDragging,
- isDropAnimating = _this$props3.isDropAnimating,
- isDragDisabled = _this$props3.isDragDisabled,
- shouldAnimateDragMovement = _this$props3.shouldAnimateDragMovement,
- disableInteractiveElementBlocking = _this$props3.disableInteractiveElementBlocking;
- var droppableId = this.context[droppableIdKey];
- var type = this.context[droppableTypeKey];
- var speed = getSpeed$1(isDragging, shouldAnimateDragMovement, isDropAnimating);
- return __WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement(DraggableDimensionPublisher, {
- key: draggableId,
- draggableId: draggableId,
- droppableId: droppableId,
- type: type,
- index: index,
- getDraggableRef: this.getDraggableRef
- }, __WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement(Moveable, {
- speed: speed,
- destination: offset,
- onMoveEnd: this.onMoveEnd
- }, function (change) {
- return __WEBPACK_IMPORTED_MODULE_9_react___default.a.createElement(DragHandle, {
- draggableId: draggableId,
- isDragging: isDragging,
- isDropAnimating: isDropAnimating,
- isEnabled: !isDragDisabled,
- callbacks: _this2.callbacks,
- getDraggableRef: _this2.getDraggableRef,
- canDragInteractiveElements: disableInteractiveElementBlocking
- }, function (dragHandleProps) {
- return _this2.renderChildren(change, dragHandleProps);
- });
- }));
- };
-
- return Draggable;
- }(__WEBPACK_IMPORTED_MODULE_9_react__["Component"]);
-
- Draggable.contextTypes = (_Draggable$contextTyp = {}, _Draggable$contextTyp[droppableIdKey] = __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.string.isRequired, _Draggable$contextTyp[droppableTypeKey] = __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.string.isRequired, _Draggable$contextTyp[styleContextKey] = __WEBPACK_IMPORTED_MODULE_10_prop_types___default.a.string.isRequired, _Draggable$contextTyp);
-
- var defaultMapProps = {
- isDropAnimating: false,
- isDragging: false,
- offset: origin,
- shouldAnimateDragMovement: false,
- shouldAnimateDisplacement: true,
- dimension: null,
- draggingOver: null
- };
- var makeMapStateToProps$1 = function makeMapStateToProps() {
- var memoizedOffset = Object(__WEBPACK_IMPORTED_MODULE_4_memoize_one__["a" /* default */])(function (x, y) {
- return {
- x: x,
- y: y
- };
- });
- var getNotDraggingProps = Object(__WEBPACK_IMPORTED_MODULE_4_memoize_one__["a" /* default */])(function (offset, shouldAnimateDisplacement) {
- return {
- isDropAnimating: false,
- isDragging: false,
- offset: offset,
- shouldAnimateDisplacement: shouldAnimateDisplacement,
- shouldAnimateDragMovement: false,
- dimension: null,
- draggingOver: null
- };
- });
- var getDraggingProps = Object(__WEBPACK_IMPORTED_MODULE_4_memoize_one__["a" /* default */])(function (offset, shouldAnimateDragMovement, dimension, draggingOver) {
- return {
- isDragging: true,
- isDropAnimating: false,
- shouldAnimateDisplacement: false,
- offset: offset,
- shouldAnimateDragMovement: shouldAnimateDragMovement,
- dimension: dimension,
- draggingOver: draggingOver
- };
- });
-
- var getOutOfTheWayMovement = function getOutOfTheWayMovement(id, movement) {
- var map = getDisplacementMap(movement.displaced);
- var displacement = map[id];
-
- if (!displacement) {
- return null;
- }
-
- if (!displacement.isVisible) {
- return null;
- }
-
- var amount = movement.isBeyondStartPosition ? negate(movement.amount) : movement.amount;
- return getNotDraggingProps(memoizedOffset(amount.x, amount.y), displacement.shouldAnimate);
- };
-
- var draggingSelector = function draggingSelector(state, ownProps) {
- if (state.isDragging) {
- if (state.critical.draggable.id !== ownProps.draggableId) {
- return null;
- }
-
- var offset = state.current.client.offset;
- var dimension = state.dimensions.draggables[ownProps.draggableId];
- var shouldAnimateDragMovement = state.shouldAnimate;
- var draggingOver = state.impact.destination ? state.impact.destination.droppableId : null;
- return getDraggingProps(memoizedOffset(offset.x, offset.y), shouldAnimateDragMovement, dimension, draggingOver);
- }
-
- if (state.phase === 'DROP_ANIMATING') {
- var pending = state.pending;
-
- if (pending.result.draggableId !== ownProps.draggableId) {
- return null;
- }
-
- var _draggingOver = pending.result.destination ? pending.result.destination.droppableId : null;
-
- return {
- isDragging: false,
- isDropAnimating: true,
- offset: pending.newHomeOffset,
- dimension: state.dimensions.draggables[ownProps.draggableId],
- draggingOver: _draggingOver,
- shouldAnimateDragMovement: false,
- shouldAnimateDisplacement: false
- };
- }
-
- return null;
- };
-
- var movingOutOfTheWaySelector = function movingOutOfTheWaySelector(state, ownProps) {
- if (state.isDragging) {
- if (state.critical.draggable.id === ownProps.draggableId) {
- return null;
- }
-
- return getOutOfTheWayMovement(ownProps.draggableId, state.impact.movement);
- }
-
- if (state.phase === 'DROP_ANIMATING') {
- if (state.pending.result.draggableId === ownProps.draggableId) {
- return null;
- }
-
- return getOutOfTheWayMovement(ownProps.draggableId, state.pending.impact.movement);
- }
-
- return null;
- };
-
- var selector = function selector(state, ownProps) {
- var dragging = draggingSelector(state, ownProps);
-
- if (dragging) {
- return dragging;
- }
-
- var movingOutOfTheWay = movingOutOfTheWaySelector(state, ownProps);
-
- if (movingOutOfTheWay) {
- return movingOutOfTheWay;
- }
-
- return defaultMapProps;
- };
-
- return selector;
- };
- var mapDispatchToProps = {
- lift: lift,
- move: move,
- moveUp: moveUp,
- moveDown: moveDown,
- moveLeft: moveLeft,
- moveRight: moveRight,
- moveByWindowScroll: moveByWindowScroll,
- drop: drop,
- dropAnimationFinished: dropAnimationFinished
- };
- var ConnectedDraggable = Object(__WEBPACK_IMPORTED_MODULE_11_react_redux__["a" /* connect */])(makeMapStateToProps$1, mapDispatchToProps, null, {
- storeKey: storeKey,
- pure: true,
- areStatePropsEqual: isStrictEqual
- })(Draggable);
- ConnectedDraggable.defaultProps = {
- isDragDisabled: false,
- disableInteractiveElementBlocking: false
- };
-
-
-
- /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(10)))
-
- /***/ }),
- /* 134 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
-
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["a"] = warning;
- /**
- * Prints a warning in the console if it exists.
- *
- * @param {String} message The warning message.
- * @returns {void}
- */
- function warning(message) {
- /* eslint-disable no-console */
- if (typeof console !== 'undefined' && typeof console.error === 'function') {
- console.error(message);
- }
- /* eslint-enable no-console */
-
-
- try {
- // This error was thrown as a convenience so that if you enable
- // "break on all exceptions" in your console,
- // it would pause the execution at this line.
- throw new Error(message);
- /* eslint-disable no-empty */
- } catch (e) {}
- /* eslint-enable no-empty */
-
- }
-
- /***/ }),
- /* 135 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
-
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["a"] = _extends;
- function _extends() {
- _extends = Object.assign || function (target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i];
-
- for (var key in source) {
- if (Object.prototype.hasOwnProperty.call(source, key)) {
- target[key] = source[key];
- }
- }
- }
-
- return target;
- };
-
- return _extends.apply(this, arguments);
- }
-
- /***/ }),
- /* 136 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
-
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["a"] = _objectWithoutPropertiesLoose;
- function _objectWithoutPropertiesLoose(source, excluded) {
- if (source == null) return {};
- var target = {};
- var sourceKeys = Object.keys(source);
- var key, i;
-
- for (i = 0; i < sourceKeys.length; i++) {
- key = sourceKeys[i];
- if (excluded.indexOf(key) >= 0) continue;
- target[key] = source[key];
- }
-
- return target;
- }
-
- /***/ }),
- /* 137 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- // currently used to initiate the velocity style object to 0
-
-
- exports.__esModule = true;
- exports['default'] = mapToZero;
-
- function mapToZero(obj) {
- var ret = {};
- for (var key in obj) {
- if (Object.prototype.hasOwnProperty.call(obj, key)) {
- ret[key] = 0;
- }
- }
- return ret;
- }
-
- module.exports = exports['default'];
-
- /***/ }),
- /* 138 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- // stepper is used a lot. Saves allocation to return the same array wrapper.
- // This is fine and danger-free against mutations because the callsite
- // immediately destructures it and gets the numbers inside without passing the
-
-
- exports.__esModule = true;
- exports["default"] = stepper;
-
- var reusedTuple = [0, 0];
-
- function stepper(secondPerFrame, x, v, destX, k, b, precision) {
- // Spring stiffness, in kg / s^2
-
- // for animations, destX is really spring length (spring at rest). initial
- // position is considered as the stretched/compressed position of a spring
- var Fspring = -k * (x - destX);
-
- // Damping, in kg / s
- var Fdamper = -b * v;
-
- // usually we put mass here, but for animation purposes, specifying mass is a
- // bit redundant. you could simply adjust k and b accordingly
- // let a = (Fspring + Fdamper) / mass;
- var a = Fspring + Fdamper;
-
- var newV = v + a * secondPerFrame;
- var newX = x + newV * secondPerFrame;
-
- if (Math.abs(newV) < precision && Math.abs(newX - destX) < precision) {
- reusedTuple[0] = destX;
- reusedTuple[1] = 0;
- return reusedTuple;
- }
-
- reusedTuple[0] = newX;
- reusedTuple[1] = newV;
- return reusedTuple;
- }
-
- module.exports = exports["default"];
- // array reference around.
-
- /***/ }),
- /* 139 */
- /***/ (function(module, exports, __webpack_require__) {
-
- /* WEBPACK VAR INJECTION */(function(process) {// Generated by CoffeeScript 1.7.1
- (function() {
- var getNanoSeconds, hrtime, loadTime;
-
- if ((typeof performance !== "undefined" && performance !== null) && performance.now) {
- module.exports = function() {
- return performance.now();
- };
- } else if ((typeof process !== "undefined" && process !== null) && process.hrtime) {
- module.exports = function() {
- return (getNanoSeconds() - loadTime) / 1e6;
- };
- hrtime = process.hrtime;
- getNanoSeconds = function() {
- var hr;
- hr = hrtime();
- return hr[0] * 1e9 + hr[1];
- };
- loadTime = getNanoSeconds();
- } else if (Date.now) {
- module.exports = function() {
- return Date.now() - loadTime;
- };
- loadTime = Date.now();
- } else {
- module.exports = function() {
- return new Date().getTime() - loadTime;
- };
- loadTime = new Date().getTime();
- }
-
- }).call(this);
-
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(10)))
-
- /***/ }),
- /* 140 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- // usage assumption: currentStyle values have already been rendered but it says
- // nothing of whether currentStyle is stale (see unreadPropStyle)
-
-
- exports.__esModule = true;
- exports['default'] = shouldStopAnimation;
-
- function shouldStopAnimation(currentStyle, style, currentVelocity) {
- for (var key in style) {
- if (!Object.prototype.hasOwnProperty.call(style, key)) {
- continue;
- }
-
- if (currentVelocity[key] !== 0) {
- return false;
- }
-
- var styleValue = typeof style[key] === 'number' ? style[key] : style[key].val;
- // stepper will have already taken care of rounding precision errors, so
- // won't have such thing as 0.9999 !=== 1
- if (currentStyle[key] !== styleValue) {
- return false;
- }
- }
-
- return true;
- }
-
- module.exports = exports['default'];
-
- /***/ }),
- /* 141 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.EXITING = exports.ENTERED = exports.ENTERING = exports.EXITED = exports.UNMOUNTED = undefined;
-
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
- var _react = __webpack_require__(0);
-
- var _react2 = _interopRequireDefault(_react);
-
- var _reactDom = __webpack_require__(4);
-
- var _reactDom2 = _interopRequireDefault(_reactDom);
-
- var _properties = __webpack_require__(245);
-
- var _properties2 = _interopRequireDefault(_properties);
-
- var _on = __webpack_require__(131);
-
- var _on2 = _interopRequireDefault(_on);
-
- var _classnames = __webpack_require__(2);
-
- var _classnames2 = _interopRequireDefault(_classnames);
-
- var _propTypes = __webpack_require__(1);
-
- var _propTypes2 = _interopRequireDefault(_propTypes);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
-
- function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
-
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
-
- var transitionEndEvent = _properties2["default"].end;
-
- //设置状态码
- var UNMOUNTED = exports.UNMOUNTED = 0;
- var EXITED = exports.EXITED = 1;
- var ENTERING = exports.ENTERING = 2;
- var ENTERED = exports.ENTERED = 3;
- var EXITING = exports.EXITING = 4;
-
- var propTypes = {
- /**
- * 是否触发动画
- */
- "in": _propTypes2["default"].bool,
-
- /**
- * 不显示的时候是否移除组件
- */
- unmountOnExit: _propTypes2["default"].bool,
-
- /**
- * 如果设置为默认显示,挂载时显示动画
- */
- transitionAppear: _propTypes2["default"].bool,
-
- /**
- * 设置超时时间,防止出现问题,可设置为>=动画时间
- */
- timeout: _propTypes2["default"].number,
-
- /**
- * 退出组件时添加的class
- */
- exitedClassName: _propTypes2["default"].string,
- /**
- * 退出组件中添加的class
- */
- exitingClassName: _propTypes2["default"].string,
- /**
- * 进入动画后添加的class
- */
- enteredClassName: _propTypes2["default"].string,
- /**
- * 进入动画时添加的class
- */
- enteringClassName: _propTypes2["default"].string,
-
- /**
- * 进入动画开始时的钩子函数
- */
- onEnter: _propTypes2["default"].func,
- /**
- * 进入动画中的钩子函数
- */
- onEntering: _propTypes2["default"].func,
- /**
- * 进入动画后的钩子函数
- */
- onEntered: _propTypes2["default"].func,
- /**
- * 退出动画开始时的钩子函数
- */
- onExit: _propTypes2["default"].func,
- /**
- * 退出动画中的钩子函数
- */
- onExiting: _propTypes2["default"].func,
- /**
- * 退出动画后的钩子函数
- */
- onExited: _propTypes2["default"].func
- };
-
- function noop() {}
-
- var defaultProps = {
- "in": false,
- unmountOnExit: false,
- transitionAppear: false,
- timeout: 5000,
- onEnter: noop,
- onEntering: noop,
- onEntered: noop,
- onExit: noop,
- onExiting: noop,
- onExited: noop
- };
-
- /**
- * 动画组件
- */
-
- var Transition = function (_Component) {
- _inherits(Transition, _Component);
-
- function Transition(props, context) {
- _classCallCheck(this, Transition);
-
- var _this = _possibleConstructorReturn(this, _Component.call(this, props, context));
-
- var initialStatus = void 0;
- if (props["in"]) {
- // 在componentdidmount时开始执行动画
- initialStatus = props.transitionAppear ? EXITED : ENTERED;
- } else {
- initialStatus = props.unmountOnExit ? UNMOUNTED : EXITED;
- }
- _this.state = { status: initialStatus };
-
- _this.nextCallback = null;
- return _this;
- }
-
- Transition.prototype.componentDidMount = function componentDidMount() {
- if (this.props.transitionAppear && this.props["in"]) {
- this.performEnter(this.props);
- }
- };
-
- Transition.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
- if (nextProps["in"] && this.props.unmountOnExit) {
- if (this.state.status === UNMOUNTED) {
- // 在componentDidUpdate执行动画.
- this.setState({ status: EXITED });
- }
- } else {
- this._needsUpdate = true;
- }
- };
-
- Transition.prototype.componentDidUpdate = function componentDidUpdate() {
- var status = this.state.status;
-
- if (this.props.unmountOnExit && status === EXITED) {
- // 当使用unmountOnExit时,exited为exiting和unmont的过渡状态
- if (this.props["in"]) {
- this.performEnter(this.props);
- } else {
- this.setState({ status: UNMOUNTED });
- }
-
- return;
- }
-
- // 确保只响应prop变化
- if (this._needsUpdate) {
- this._needsUpdate = false;
-
- if (this.props["in"]) {
- if (status === EXITING) {
- this.performEnter(this.props);
- } else if (status === EXITED) {
- this.performEnter(this.props);
- }
- // 其他,当我们已经输入或输出
- } else {
- if (status === ENTERING || status === ENTERED) {
- this.performExit(this.props);
- }
- // 我们已经输入或输出完成
- }
- }
- };
-
- Transition.prototype.componentWillUnmount = function componentWillUnmount() {
- this.cancelNextCallback();
- };
-
- Transition.prototype.performEnter = function performEnter(props) {
- var _this2 = this;
-
- this.cancelNextCallback();
- var node = _reactDom2["default"].findDOMNode(this);
-
- // 这里接收新props
- props.onEnter(node);
-
- this.safeSetState({ status: ENTERING }, function () {
- _this2.props.onEntering(node);
-
- _this2.onTransitionEnd(node, function () {
- _this2.safeSetState({ status: ENTERED }, function () {
- _this2.props.onEntered(node);
- });
- });
- });
- };
-
- Transition.prototype.performExit = function performExit(props) {
- var _this3 = this;
-
- this.cancelNextCallback();
- var node = _reactDom2["default"].findDOMNode(this);
-
- props.onExit(node);
-
- this.safeSetState({ status: EXITING }, function () {
- _this3.props.onExiting(node);
-
- _this3.onTransitionEnd(node, function () {
- _this3.safeSetState({ status: EXITED }, function () {
- _this3.props.onExited(node);
- });
- });
- });
- };
-
- Transition.prototype.cancelNextCallback = function cancelNextCallback() {
- if (this.nextCallback !== null) {
- this.nextCallback.cancel();
- this.nextCallback = null;
- }
- };
-
- Transition.prototype.safeSetState = function safeSetState(nextState, callback) {
- // 确保在组件销毁后挂起的setState被消除
- this.setState(nextState, this.setNextCallback(callback));
- };
-
- Transition.prototype.setNextCallback = function setNextCallback(callback) {
- var _this4 = this;
-
- var active = true;
-
- this.nextCallback = function (event) {
- if (active) {
- active = false;
- _this4.nextCallback = null;
-
- callback(event);
- }
- };
-
- this.nextCallback.cancel = function () {
- active = false;
- };
-
- return this.nextCallback;
- };
-
- Transition.prototype.onTransitionEnd = function onTransitionEnd(node, handler) {
- this.setNextCallback(handler);
-
- if (node) {
- if (transitionEndEvent == undefined) {
- this.nextCallback();
- } else {
- (0, _on2["default"])(node, transitionEndEvent, this.nextCallback);
- }
- setTimeout(this.nextCallback, this.props.timeout);
- } else {
- setTimeout(this.nextCallback, 0);
- }
- };
-
- Transition.prototype.render = function render() {
- var status = this.state.status;
- if (status === UNMOUNTED) {
- return null;
- }
-
- var _props = this.props,
- children = _props.children,
- className = _props.className,
- childProps = _objectWithoutProperties(_props, ['children', 'className']);
-
- Object.keys(Transition.propTypes).forEach(function (key) {
- return delete childProps[key];
- });
-
- var transitionClassName = void 0;
- if (status === EXITED) {
- transitionClassName = this.props.exitedClassName;
- } else if (status === ENTERING) {
- transitionClassName = this.props.enteringClassName;
- } else if (status === ENTERED) {
- transitionClassName = this.props.enteredClassName;
- } else if (status === EXITING) {
- transitionClassName = this.props.exitingClassName;
- }
-
- var child = _react2["default"].Children.only(children);
- return _react2["default"].cloneElement(child, _extends({}, childProps, {
- className: (0, _classnames2["default"])(child.props.className, className, transitionClassName)
- }));
- };
-
- return Transition;
- }(_react.Component);
-
- Transition.propTypes = propTypes;
-
- Transition.defaultProps = defaultProps;
-
- exports["default"] = Transition;
-
- /***/ }),
- /* 142 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.toArray = toArray;
- exports.getActiveIndex = getActiveIndex;
- exports.getActiveKey = getActiveKey;
- exports.setTransform = setTransform;
- exports.isTransformSupported = isTransformSupported;
- exports.setTransition = setTransition;
- exports.getTransformPropValue = getTransformPropValue;
- exports.isVertical = isVertical;
- exports.getTransformByIndex = getTransformByIndex;
- exports.getMarginStyle = getMarginStyle;
- exports.getStyle = getStyle;
- exports.setPxStyle = setPxStyle;
-
- var _react = __webpack_require__(0);
-
- var _react2 = _interopRequireDefault(_react);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /**
- * This source code is quoted from rc-tabs.
- * homepage: https://github.com/react-component/tabs
- */
-
-
- function toArray(children) {
- // allow [c,[a,b]]
- var c = [];
- _react2["default"].Children.forEach(children, function (child) {
- if (child) {
- c.push(child);
- }
- });
- return c;
- }
-
- function getActiveIndex(children, activeKey) {
- var c = toArray(children);
- for (var i = 0; i < c.length; i++) {
- if (c[i].key === activeKey) {
- return i;
- }
- }
- return -1;
- }
-
- function getActiveKey(children, index) {
- var c = toArray(children);
- return c[index].key;
- }
-
- function setTransform(style, v) {
- style.transform = v;
- style.webkitTransform = v;
- style.mozTransform = v;
- }
-
- function isTransformSupported(style) {
- return 'transform' in style || 'webkitTransform' in style || 'MozTransform' in style;
- }
-
- function setTransition(style, v) {
- style.transition = v;
- style.webkitTransition = v;
- style.MozTransition = v;
- }
- function getTransformPropValue(v) {
- return {
- transform: v,
- WebkitTransform: v,
- MozTransform: v
- };
- }
-
- function isVertical(tabBarPosition) {
- return tabBarPosition === 'left' || tabBarPosition === 'right';
- }
-
- function getTransformByIndex(index, tabBarPosition) {
- var translate = isVertical(tabBarPosition) ? 'translateY' : 'translateX';
- return translate + '(' + -index * 100 + '%) translateZ(0)';
- }
-
- function getMarginStyle(index, tabBarPosition) {
- var marginDirection = isVertical(tabBarPosition) ? 'marginTop' : 'marginLeft';
- return _defineProperty({}, marginDirection, -index * 100 + '%');
- }
-
- function getStyle(el, property) {
- return +getComputedStyle(el).getPropertyValue(property).replace('px', '');
- }
-
- function setPxStyle(el, property, value) {
- el.style[property] = value + 'px';
- }
-
- /***/ }),
- /* 143 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _Loading = __webpack_require__(914);
-
- var _Loading2 = _interopRequireDefault(_Loading);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- exports["default"] = _Loading2["default"];
- module.exports = exports['default'];
-
- /***/ }),
- /* 144 */
- /***/ (function(module, exports, __webpack_require__) {
-
- //! moment.js locale configuration
-
- ;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
- typeof define === 'function' && define.amd ? define(['../moment'], factory) :
- factory(global.moment)
- }(this, (function (moment) { 'use strict';
-
-
- var enGb = moment.defineLocale('en-gb', {
- months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),
- monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
- weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
- weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
- weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
- longDateFormat : {
- LT : 'HH:mm',
- LTS : 'HH:mm:ss',
- L : 'DD/MM/YYYY',
- LL : 'D MMMM YYYY',
- LLL : 'D MMMM YYYY HH:mm',
- LLLL : 'dddd, D MMMM YYYY HH:mm'
- },
- calendar : {
- sameDay : '[Today at] LT',
- nextDay : '[Tomorrow at] LT',
- nextWeek : 'dddd [at] LT',
- lastDay : '[Yesterday at] LT',
- lastWeek : '[Last] dddd [at] LT',
- sameElse : 'L'
- },
- relativeTime : {
- future : 'in %s',
- past : '%s ago',
- s : 'a few seconds',
- ss : '%d seconds',
- m : 'a minute',
- mm : '%d minutes',
- h : 'an hour',
- hh : '%d hours',
- d : 'a day',
- dd : '%d days',
- M : 'a month',
- MM : '%d months',
- y : 'a year',
- yy : '%d years'
- },
- dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
- ordinal : function (number) {
- var b = number % 10,
- output = (~~(number % 100 / 10) === 1) ? 'th' :
- (b === 1) ? 'st' :
- (b === 2) ? 'nd' :
- (b === 3) ? 'rd' : 'th';
- return number + output;
- },
- week : {
- dow : 1, // Monday is the first day of the week.
- doy : 4 // The week that contains Jan 4th is the first week of the year.
- }
- });
-
- return enGb;
-
- })));
-
-
- /***/ }),
- /* 145 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _react = __webpack_require__(0);
-
- var _react2 = _interopRequireDefault(_react);
-
- var _propTypes = __webpack_require__(1);
-
- var _propTypes2 = _interopRequireDefault(_propTypes);
-
- var _mapSelf = __webpack_require__(381);
-
- var _mapSelf2 = _interopRequireDefault(_mapSelf);
-
- var _MonthPanel = __webpack_require__(933);
-
- var _MonthPanel2 = _interopRequireDefault(_MonthPanel);
-
- var _YearPanel = __webpack_require__(382);
-
- var _YearPanel2 = _interopRequireDefault(_YearPanel);
-
- var _DecadePanel = __webpack_require__(383);
-
- var _DecadePanel2 = _interopRequireDefault(_DecadePanel);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
-
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
-
- function goMonth(direction) {
- var next = this.props.value.clone();
- next.add(direction, 'months');
- this.props.onValueChange(next);
- }
-
- function goYear(direction) {
- var next = this.props.value.clone();
- next.add(direction, 'years');
- this.props.onValueChange(next);
- }
-
- function showIf(condition, el) {
- return condition ? el : null;
- }
-
- var CalendarHeader = function (_React$Component) {
- _inherits(CalendarHeader, _React$Component);
-
- function CalendarHeader(props) {
- _classCallCheck(this, CalendarHeader);
-
- var _this = _possibleConstructorReturn(this, _React$Component.call(this, props));
-
- _initialiseProps.call(_this);
-
- _this.nextMonth = goMonth.bind(_this, 1);
- _this.previousMonth = goMonth.bind(_this, -1);
- _this.nextYear = goYear.bind(_this, 1);
- _this.previousYear = goYear.bind(_this, -1);
-
- _this.state = { yearPanelReferer: null };
- return _this;
- }
-
- CalendarHeader.prototype.render = function render() {
- var _this2 = this;
-
- var props = this.props;
- var prefixCls = props.prefixCls,
- locale = props.locale,
- mode = props.mode,
- value = props.value,
- showTimePicker = props.showTimePicker,
- enableNext = props.enableNext,
- enablePrev = props.enablePrev,
- disabledMonth = props.disabledMonth,
- renderFooter = props.renderFooter,
- onChange = props.onChange,
- onClear = props.onClear,
- showMonthInput = props.showMonthInput;
-
-
- var panel = null;
- if (mode === 'month') {
- panel = _react2["default"].createElement(_MonthPanel2["default"], {
- showDateInput: true,
- locale: locale,
- showMonthInput: showMonthInput,
- defaultValue: value,
- rootPrefixCls: prefixCls,
- onSelect: this.onMonthSelect,
- onYearPanelShow: function onYearPanelShow() {
- return _this2.showYearPanel('month');
- },
- disabledDate: disabledMonth,
- cellRender: props.monthCellRender,
- contentRender: props.monthCellContentRender,
- renderFooter: renderFooter,
- onChange: onChange,
- onClear: onClear,
- value: value
- });
- }
- if (mode === 'year') {
- panel = _react2["default"].createElement(_YearPanel2["default"], {
- locale: locale,
- defaultValue: value,
- rootPrefixCls: prefixCls,
- onSelect: this.onYearSelect,
- onDecadePanelShow: this.showDecadePanel,
- renderFooter: renderFooter
- });
- }
- if (mode === 'decade') {
- panel = _react2["default"].createElement(_DecadePanel2["default"], {
- locale: locale,
- defaultValue: value,
- rootPrefixCls: prefixCls,
- onSelect: this.onDecadeSelect,
- renderFooter: renderFooter
- });
- }
-
- return _react2["default"].createElement(
- 'div',
- { className: prefixCls + '-header' },
- _react2["default"].createElement(
- 'div',
- { style: { position: 'relative' }, className: prefixCls + '-header-btns' },
- showIf(enablePrev && !showTimePicker, _react2["default"].createElement('a', {
- className: prefixCls + '-prev-year-btn',
- role: 'button',
- onClick: this.previousYear,
- title: locale.previousYear
- })),
- showIf(enablePrev && !showTimePicker, _react2["default"].createElement('a', {
- className: prefixCls + '-prev-month-btn',
- role: 'button',
- onClick: this.previousMonth,
- title: locale.previousMonth
- })),
- this.monthYearElement(showTimePicker),
- showIf(enableNext && !showTimePicker, _react2["default"].createElement('a', {
- className: prefixCls + '-next-month-btn',
- onClick: this.nextMonth,
- title: locale.nextMonth
- })),
- showIf(enableNext && !showTimePicker, _react2["default"].createElement('a', {
- className: prefixCls + '-next-year-btn',
- onClick: this.nextYear,
- title: locale.nextYear
- }))
- ),
- panel
- );
- };
-
- return CalendarHeader;
- }(_react2["default"].Component);
-
- CalendarHeader.propTypes = {
- prefixCls: _propTypes2["default"].string,
- value: _propTypes2["default"].object,
- onValueChange: _propTypes2["default"].func,
- showTimePicker: _propTypes2["default"].bool,
- onPanelChange: _propTypes2["default"].func,
- locale: _propTypes2["default"].object,
- enablePrev: _propTypes2["default"].any,
- enableNext: _propTypes2["default"].any,
- disabledMonth: _propTypes2["default"].func,
- renderFooter: _propTypes2["default"].func,
- onMonthSelect: _propTypes2["default"].func
- };
- CalendarHeader.defaultProps = {
- enableNext: 1,
- enablePrev: 1,
- onPanelChange: function onPanelChange() {},
- onValueChange: function onValueChange() {}
- };
-
- var _initialiseProps = function _initialiseProps() {
- var _this3 = this;
-
- this.onMonthSelect = function (value) {
- _this3.props.onPanelChange(value, 'date');
- if (_this3.props.onMonthSelect) {
- _this3.props.onMonthSelect(value);
- } else {
- _this3.props.onValueChange(value);
- }
- };
-
- this.onYearSelect = function (value) {
- var referer = _this3.state.yearPanelReferer;
- _this3.setState({ yearPanelReferer: null });
- _this3.props.onPanelChange(value, referer);
- _this3.props.onValueChange(value);
- };
-
- this.onDecadeSelect = function (value) {
- _this3.props.onPanelChange(value, 'year');
- _this3.props.onValueChange(value);
- };
-
- this.monthYearElement = function (showTimePicker) {
- var props = _this3.props;
- var prefixCls = props.prefixCls;
- var locale = props.locale;
- var value = props.value;
- var localeData = value.localeData();
- var monthBeforeYear = locale.monthBeforeYear;
- var selectClassName = prefixCls + '-' + (monthBeforeYear ? 'my-select' : 'ym-select');
- var timeClassName = showTimePicker ? ' ' + prefixCls + '-time-status' : '';
- var year = _react2["default"].createElement(
- 'a',
- {
- className: prefixCls + '-year-select' + timeClassName,
- role: 'button',
- onClick: showTimePicker ? null : function () {
- return _this3.showYearPanel('date');
- },
- title: showTimePicker ? null : locale.yearSelect
- },
- value.format(locale.yearFormat)
- );
- var month = _react2["default"].createElement(
- 'a',
- {
- className: prefixCls + '-month-select' + timeClassName,
- role: 'button',
- onClick: showTimePicker ? null : _this3.showMonthPanel,
- title: showTimePicker ? null : locale.monthSelect
- },
- locale.monthFormat ? value.format(locale.monthFormat) : localeData.monthsShort(value)
- );
- var day = void 0;
- if (showTimePicker) {
- day = _react2["default"].createElement(
- 'a',
- {
- className: prefixCls + '-day-select' + timeClassName,
- role: 'button'
- },
- value.format(locale.dayFormat)
- );
- }
- var my = [];
- if (monthBeforeYear) {
- my = [month, day, year];
- } else {
- my = [year, month, day];
- }
- return _react2["default"].createElement(
- 'span',
- { className: selectClassName },
- (0, _mapSelf2["default"])(my)
- );
- };
-
- this.showMonthPanel = function () {
- // null means that users' interaction doesn't change value
- _this3.props.onPanelChange(null, 'month');
- };
-
- this.showYearPanel = function (referer) {
- _this3.setState({ yearPanelReferer: referer });
- _this3.props.onPanelChange(null, 'year');
- };
-
- this.showDecadePanel = function () {
- _this3.props.onPanelChange(null, 'decade');
- };
- };
-
- exports["default"] = CalendarHeader;
- module.exports = exports['default'];
-
- /***/ }),
- /* 146 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.commonMixinWrapper = exports.defaultProp = exports.propType = undefined;
-
- var _propTypes = __webpack_require__(1);
-
- var _propTypes2 = _interopRequireDefault(_propTypes);
-
- var _en_US = __webpack_require__(389);
-
- var _en_US2 = _interopRequireDefault(_en_US);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
-
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
-
- function noop() {}
-
- var propType = exports.propType = {
- className: _propTypes2["default"].string,
- locale: _propTypes2["default"].object,
- style: _propTypes2["default"].object,
- visible: _propTypes2["default"].bool,
- onSelect: _propTypes2["default"].func,
- prefixCls: _propTypes2["default"].string,
- onChange: _propTypes2["default"].func,
- onOk: _propTypes2["default"].func
- };
-
- var defaultProp = exports.defaultProp = {
- locale: _en_US2["default"],
- style: {},
- visible: true,
- prefixCls: 'rc-calendar',
- className: '',
- onSelect: noop,
- onChange: noop,
- onClear: noop,
- renderFooter: function renderFooter() {
- return null;
- },
- renderSidebar: function renderSidebar() {
- return null;
- }
- };
-
- var commonMixinWrapper = exports.commonMixinWrapper = function commonMixinWrapper(ComposeComponent) {
- var _class, _temp2;
-
- return _temp2 = _class = function (_ComposeComponent) {
- _inherits(_class, _ComposeComponent);
-
- function _class() {
- var _temp, _this, _ret;
-
- _classCallCheck(this, _class);
-
- for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
- args[_key] = arguments[_key];
- }
-
- return _ret = (_temp = (_this = _possibleConstructorReturn(this, _ComposeComponent.call.apply(_ComposeComponent, [this].concat(args))), _this), _this.getFormat = function () {
- var format = _this.props.format;
- var _this$props = _this.props,
- locale = _this$props.locale,
- timePicker = _this$props.timePicker;
-
- if (!format) {
- if (timePicker) {
- format = locale.dateTimeFormat;
- } else {
- format = locale.dateFormat;
- }
- }
- return format;
- }, _this.focus = function () {
- if (_this.focusElement) {
- _this.focusElement.focus();
- } else if (_this.rootInstance) {
- _this.rootInstance.focus();
- }
- }, _this.saveFocusElement = function (focusElement) {
- _this.focusElement = focusElement;
- }, _this.saveRoot = function (root) {
- _this.rootInstance = root;
- }, _temp), _possibleConstructorReturn(_this, _ret);
- }
-
- _class.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {
- return this.props.visible || nextProps.visible;
- };
-
- return _class;
- }(ComposeComponent), _class.displayName = 'CommonMixinWrapper', _class.defaultProps = ComposeComponent.defaultProps, _class.getDerivedStateFromProps = ComposeComponent.getDerivedStateFromProps, _temp2;
- };
-
- /***/ }),
- /* 147 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _inDOM = __webpack_require__(35);
-
- var _inDOM2 = _interopRequireDefault(_inDOM);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
- var on = function on() {};
- if (_inDOM2.default) {
- on = function () {
-
- if (document.addEventListener) return function (node, eventName, handler, capture) {
- return node.addEventListener(eventName, handler, capture || false);
- };else if (document.attachEvent) return function (node, eventName, handler) {
- return node.attachEvent('on' + eventName, handler);
- };
- }();
- }
-
- exports.default = on;
- module.exports = exports['default'];
-
- /***/ }),
- /* 148 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.EXITING = exports.ENTERED = exports.ENTERING = exports.EXITED = exports.UNMOUNTED = undefined;
-
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
- var _react = __webpack_require__(0);
-
- var _react2 = _interopRequireDefault(_react);
-
- var _reactDom = __webpack_require__(4);
-
- var _reactDom2 = _interopRequireDefault(_reactDom);
-
- var _properties = __webpack_require__(399);
-
- var _properties2 = _interopRequireDefault(_properties);
-
- var _on = __webpack_require__(147);
-
- var _on2 = _interopRequireDefault(_on);
-
- var _classnames = __webpack_require__(2);
-
- var _classnames2 = _interopRequireDefault(_classnames);
-
- var _propTypes = __webpack_require__(1);
-
- var _propTypes2 = _interopRequireDefault(_propTypes);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
-
- function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
-
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
-
- var transitionEndEvent = _properties2["default"].end;
-
- //设置状态码
- var UNMOUNTED = exports.UNMOUNTED = 0;
- var EXITED = exports.EXITED = 1;
- var ENTERING = exports.ENTERING = 2;
- var ENTERED = exports.ENTERED = 3;
- var EXITING = exports.EXITING = 4;
-
- var propTypes = {
- /**
- * 是否触发动画
- */
- "in": _propTypes2["default"].bool,
-
- /**
- * 不显示的时候是否移除组件
- */
- unmountOnExit: _propTypes2["default"].bool,
-
- /**
- * 如果设置为默认显示,挂载时显示动画
- */
- transitionAppear: _propTypes2["default"].bool,
-
- /**
- * 设置超时时间,防止出现问题,可设置为>=动画时间
- */
- timeout: _propTypes2["default"].number,
-
- /**
- * 退出组件时添加的class
- */
- exitedClassName: _propTypes2["default"].string,
- /**
- * 退出组件中添加的class
- */
- exitingClassName: _propTypes2["default"].string,
- /**
- * 进入动画后添加的class
- */
- enteredClassName: _propTypes2["default"].string,
- /**
- * 进入动画时添加的class
- */
- enteringClassName: _propTypes2["default"].string,
-
- /**
- * 进入动画开始时的钩子函数
- */
- onEnter: _propTypes2["default"].func,
- /**
- * 进入动画中的钩子函数
- */
- onEntering: _propTypes2["default"].func,
- /**
- * 进入动画后的钩子函数
- */
- onEntered: _propTypes2["default"].func,
- /**
- * 退出动画开始时的钩子函数
- */
- onExit: _propTypes2["default"].func,
- /**
- * 退出动画中的钩子函数
- */
- onExiting: _propTypes2["default"].func,
- /**
- * 退出动画后的钩子函数
- */
- onExited: _propTypes2["default"].func
- };
-
- function noop() {}
-
- var defaultProps = {
- "in": false,
- unmountOnExit: false,
- transitionAppear: false,
- timeout: 5000,
- onEnter: noop,
- onEntering: noop,
- onEntered: noop,
- onExit: noop,
- onExiting: noop,
- onExited: noop
- };
-
- /**
- * 动画组件
- */
-
- var Transition = function (_Component) {
- _inherits(Transition, _Component);
-
- function Transition(props, context) {
- _classCallCheck(this, Transition);
-
- var _this = _possibleConstructorReturn(this, _Component.call(this, props, context));
-
- var initialStatus = void 0;
- if (props["in"]) {
- // 在componentdidmount时开始执行动画
- initialStatus = props.transitionAppear ? EXITED : ENTERED;
- } else {
- initialStatus = props.unmountOnExit ? UNMOUNTED : EXITED;
- }
- _this.state = { status: initialStatus };
-
- _this.nextCallback = null;
- return _this;
- }
-
- Transition.prototype.componentDidMount = function componentDidMount() {
- if (this.props.transitionAppear && this.props["in"]) {
- this.performEnter(this.props);
- }
- };
-
- Transition.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
- if (nextProps["in"] && this.props.unmountOnExit) {
- if (this.state.status === UNMOUNTED) {
- // 在componentDidUpdate执行动画.
- this.setState({ status: EXITED });
- }
- } else {
- this._needsUpdate = true;
- }
- };
-
- Transition.prototype.componentDidUpdate = function componentDidUpdate() {
- var status = this.state.status;
-
- if (this.props.unmountOnExit && status === EXITED) {
- // 当使用unmountOnExit时,exited为exiting和unmont的过渡状态
- if (this.props["in"]) {
- this.performEnter(this.props);
- } else {
- this.setState({ status: UNMOUNTED });
- }
-
- return;
- }
-
- // 确保只响应prop变化
- if (this._needsUpdate) {
- this._needsUpdate = false;
-
- if (this.props["in"]) {
- if (status === EXITING) {
- this.performEnter(this.props);
- } else if (status === EXITED) {
- this.performEnter(this.props);
- }
- // 其他,当我们已经输入或输出
- } else {
- if (status === ENTERING || status === ENTERED) {
- this.performExit(this.props);
- }
- // 我们已经输入或输出完成
- }
- }
- };
-
- Transition.prototype.componentWillUnmount = function componentWillUnmount() {
- this.cancelNextCallback();
- };
-
- Transition.prototype.performEnter = function performEnter(props) {
- var _this2 = this;
-
- this.cancelNextCallback();
- var node = _reactDom2["default"].findDOMNode(this);
-
- // 这里接收新props
- props.onEnter(node);
-
- this.safeSetState({ status: ENTERING }, function () {
- _this2.props.onEntering(node);
-
- _this2.onTransitionEnd(node, function () {
- _this2.safeSetState({ status: ENTERED }, function () {
- _this2.props.onEntered(node);
- });
- });
- });
- };
-
- Transition.prototype.performExit = function performExit(props) {
- var _this3 = this;
-
- this.cancelNextCallback();
- var node = _reactDom2["default"].findDOMNode(this);
-
- props.onExit(node);
-
- this.safeSetState({ status: EXITING }, function () {
- _this3.props.onExiting(node);
-
- _this3.onTransitionEnd(node, function () {
- _this3.safeSetState({ status: EXITED }, function () {
- _this3.props.onExited(node);
- });
- });
- });
- };
-
- Transition.prototype.cancelNextCallback = function cancelNextCallback() {
- if (this.nextCallback !== null) {
- this.nextCallback.cancel();
- this.nextCallback = null;
- }
- };
-
- Transition.prototype.safeSetState = function safeSetState(nextState, callback) {
- // 确保在组件销毁后挂起的setState被消除
- this.setState(nextState, this.setNextCallback(callback));
- };
-
- Transition.prototype.setNextCallback = function setNextCallback(callback) {
- var _this4 = this;
-
- var active = true;
-
- this.nextCallback = function (event) {
- if (active) {
- active = false;
- _this4.nextCallback = null;
-
- callback(event);
- }
- };
-
- this.nextCallback.cancel = function () {
- active = false;
- };
-
- return this.nextCallback;
- };
-
- Transition.prototype.onTransitionEnd = function onTransitionEnd(node, handler) {
- this.setNextCallback(handler);
-
- if (node) {
- if (transitionEndEvent == undefined) {
- this.nextCallback();
- } else {
- (0, _on2["default"])(node, transitionEndEvent, this.nextCallback);
- }
- setTimeout(this.nextCallback, this.props.timeout);
- } else {
- setTimeout(this.nextCallback, 0);
- }
- };
-
- Transition.prototype.render = function render() {
- var status = this.state.status;
- if (status === UNMOUNTED) {
- return null;
- }
-
- var _props = this.props,
- children = _props.children,
- className = _props.className,
- childProps = _objectWithoutProperties(_props, ['children', 'className']);
-
- Object.keys(Transition.propTypes).forEach(function (key) {
- return delete childProps[key];
- });
-
- var transitionClassName = void 0;
- if (status === EXITED) {
- transitionClassName = this.props.exitedClassName;
- } else if (status === ENTERING) {
- transitionClassName = this.props.enteringClassName;
- } else if (status === ENTERED) {
- transitionClassName = this.props.enteredClassName;
- } else if (status === EXITING) {
- transitionClassName = this.props.exitingClassName;
- }
-
- var child = _react2["default"].Children.only(children);
- return _react2["default"].cloneElement(child, _extends({}, childProps, {
- className: (0, _classnames2["default"])(child.props.className, className, transitionClassName)
- }));
- };
-
- return Transition;
- }(_react.Component);
-
- Transition.propTypes = propTypes;
-
- Transition.defaultProps = defaultProps;
-
- exports["default"] = Transition;
-
- /***/ }),
- /* 149 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _Icon = __webpack_require__(1040);
-
- var _Icon2 = _interopRequireDefault(_Icon);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- exports["default"] = _Icon2["default"];
- module.exports = exports['default'];
-
- /***/ }),
- /* 150 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
- var _react = __webpack_require__(0);
-
- var _react2 = _interopRequireDefault(_react);
-
- var _propTypes = __webpack_require__(1);
-
- var _propTypes2 = _interopRequireDefault(_propTypes);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
-
- function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
-
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); } /**
- * This source code is quoted from rc-slider.
- * homepage: https://github.com/react-component/slider
- */
-
-
- var Handle = function (_React$Component) {
- _inherits(Handle, _React$Component);
-
- function Handle() {
- _classCallCheck(this, Handle);
-
- return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
- }
-
- Handle.prototype.render = function render() {
- var _props = this.props,
- className = _props.className,
- vertical = _props.vertical,
- offset = _props.offset,
- style = _props.style,
- disabled = _props.disabled,
- min = _props.min,
- max = _props.max,
- value = _props.value,
- restProps = _objectWithoutProperties(_props, ['className', 'vertical', 'offset', 'style', 'disabled', 'min', 'max', 'value']);
-
- var postionStyle = vertical ? { bottom: offset + '%' } : { left: offset + '%' };
- var elStyle = _extends({}, style, postionStyle);
- var ariaProps = {};
- if (value !== undefined) {
- ariaProps = _extends({}, ariaProps, {
- 'aria-valuemin': min,
- 'aria-valuemax': max,
- 'aria-valuenow': value,
- 'aria-disabled': !!disabled
- });
- }
-
- return _react2["default"].createElement('div', _extends({
- role: 'slider',
- tabIndex: '0'
- }, ariaProps, restProps, {
- className: className,
- style: elStyle
- }));
- };
-
- return Handle;
- }(_react2["default"].Component);
-
- exports["default"] = Handle;
-
-
- Handle.propTypes = {
- className: _propTypes2["default"].string,
- vertical: _propTypes2["default"].bool,
- offset: _propTypes2["default"].number,
- style: _propTypes2["default"].object,
- disabled: _propTypes2["default"].bool,
- min: _propTypes2["default"].number,
- max: _propTypes2["default"].number,
- value: _propTypes2["default"].number
- };
- module.exports = exports['default'];
-
- /***/ }),
- /* 151 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.isEventFromHandle = isEventFromHandle;
- exports.isValueOutOfRange = isValueOutOfRange;
- exports.isNotTouchEvent = isNotTouchEvent;
- exports.getClosestPoint = getClosestPoint;
- exports.getPrecision = getPrecision;
- exports.getMousePosition = getMousePosition;
- exports.getTouchPosition = getTouchPosition;
- exports.getHandleCenterPosition = getHandleCenterPosition;
- exports.ensureValueInRange = ensureValueInRange;
- exports.ensureValuePrecision = ensureValuePrecision;
- exports.pauseEvent = pauseEvent;
- exports.getKeyboardValueMutator = getKeyboardValueMutator;
-
- var _reactDom = __webpack_require__(4);
-
- var _keyCode = __webpack_require__(186);
-
- var _keyCode2 = _interopRequireDefault(_keyCode);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } /**
- * This source code is quoted from rc-slider.
- * homepage: https://github.com/react-component/slider
- */
-
-
- function isEventFromHandle(e, handles) {
- return Object.keys(handles).some(function (key) {
- return e.target === (0, _reactDom.findDOMNode)(handles[key]);
- });
- }
-
- function isValueOutOfRange(value, _ref) {
- var min = _ref.min,
- max = _ref.max;
-
- return value < min || value > max;
- }
-
- function isNotTouchEvent(e) {
- //event.touches,多点触碰时的位置数组,比如缩放手势必须要用两指的触摸点,就是一个数组
- return e.touches.length > 1 || e.type.toLowerCase() === 'touchend' && e.touches.length > 0;
- }
-
- function getClosestPoint(val, _ref2) {
- var marks = _ref2.marks,
- step = _ref2.step,
- min = _ref2.min;
-
- var points = Object.keys(marks).map(parseFloat);
- if (step !== null) {
- var closestStep = Math.round((val - min) / step) * step + min; //Math.round(((val - min) / step) * step) + min;
- points.push(closestStep);
- }
- var diffs = points.map(function (point) {
- return Math.abs(val - point);
- });
- return points[diffs.indexOf(Math.min.apply(Math, _toConsumableArray(diffs)))];
- }
-
- function getPrecision(step) {
- var stepString = step.toString();
- var precision = 0;
- if (stepString.indexOf('.') >= 0) {
- precision = stepString.length - stepString.indexOf('.') - 1;
- }
- return precision;
- }
-
- function getMousePosition(vertical, e) {
- return vertical ? e.clientY : e.pageX;
- }
-
- function getTouchPosition(vertical, e) {
- return vertical ? e.touches[0].clientY : e.touches[0].pageX;
- }
-
- function getHandleCenterPosition(vertical, handle) {
- var coords = handle.getBoundingClientRect();
- return vertical ? coords.top + coords.height * 0.5 : coords.left + coords.width * 0.5;
- }
-
- function ensureValueInRange(val, _ref3) {
- var max = _ref3.max,
- min = _ref3.min;
-
- if (val <= min) {
- return min;
- }
- if (val >= max) {
- return max;
- }
- return val;
- }
-
- function ensureValuePrecision(val, props) {
- var step = props.step;
-
- var closestPoint = getClosestPoint(val, props);
- return step === null ? closestPoint : parseFloat(closestPoint.toFixed(getPrecision(step)));
- }
-
- function pauseEvent(e) {
- e.stopPropagation();
- e.preventDefault();
- }
-
- function getKeyboardValueMutator(e) {
- switch (e.keyCode) {
- case _keyCode2["default"].UP:
- case _keyCode2["default"].RIGHT:
- return function (value, props) {
- return value + props.step;
- };
-
- case _keyCode2["default"].DOWN:
- case _keyCode2["default"].LEFT:
- return function (value, props) {
- return value - props.step;
- };
-
- case _keyCode2["default"].END:
- return function (value, props) {
- return props.max;
- };
- case _keyCode2["default"].HOME:
- return function (value, props) {
- return props.min;
- };
- case _keyCode2["default"].PAGE_UP:
- return function (value, props) {
- return value + props.step * 2;
- };
- case _keyCode2["default"].PAGE_DOWN:
- return function (value, props) {
- return value - props.step * 2;
- };
-
- default:
- return undefined;
- }
- }
-
- /***/ }),
- /* 152 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _inDOM = __webpack_require__(36);
-
- var _inDOM2 = _interopRequireDefault(_inDOM);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
- var on = function on() {};
- if (_inDOM2.default) {
- on = function () {
-
- if (document.addEventListener) return function (node, eventName, handler, capture) {
- return node.addEventListener(eventName, handler, capture || false);
- };else if (document.attachEvent) return function (node, eventName, handler) {
- return node.attachEvent('on' + eventName, handler);
- };
- }();
- }
-
- exports.default = on;
- module.exports = exports['default'];
-
- /***/ }),
- /* 153 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.EXITING = exports.ENTERED = exports.ENTERING = exports.EXITED = exports.UNMOUNTED = undefined;
-
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
- var _react = __webpack_require__(0);
-
- var _react2 = _interopRequireDefault(_react);
-
- var _reactDom = __webpack_require__(4);
-
- var _reactDom2 = _interopRequireDefault(_reactDom);
-
- var _properties = __webpack_require__(414);
-
- var _properties2 = _interopRequireDefault(_properties);
-
- var _on = __webpack_require__(152);
-
- var _on2 = _interopRequireDefault(_on);
-
- var _classnames = __webpack_require__(2);
-
- var _classnames2 = _interopRequireDefault(_classnames);
-
- var _propTypes = __webpack_require__(1);
-
- var _propTypes2 = _interopRequireDefault(_propTypes);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
-
- function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
-
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
-
- var transitionEndEvent = _properties2["default"].end;
-
- //设置状态码
- var UNMOUNTED = exports.UNMOUNTED = 0;
- var EXITED = exports.EXITED = 1;
- var ENTERING = exports.ENTERING = 2;
- var ENTERED = exports.ENTERED = 3;
- var EXITING = exports.EXITING = 4;
-
- var propTypes = {
- /**
- * 是否触发动画
- */
- "in": _propTypes2["default"].bool,
-
- /**
- * 不显示的时候是否移除组件
- */
- unmountOnExit: _propTypes2["default"].bool,
-
- /**
- * 如果设置为默认显示,挂载时显示动画
- */
- transitionAppear: _propTypes2["default"].bool,
-
- /**
- * 设置超时时间,防止出现问题,可设置为>=动画时间
- */
- timeout: _propTypes2["default"].number,
-
- /**
- * 退出组件时添加的class
- */
- exitedClassName: _propTypes2["default"].string,
- /**
- * 退出组件中添加的class
- */
- exitingClassName: _propTypes2["default"].string,
- /**
- * 进入动画后添加的class
- */
- enteredClassName: _propTypes2["default"].string,
- /**
- * 进入动画时添加的class
- */
- enteringClassName: _propTypes2["default"].string,
-
- /**
- * 进入动画开始时的钩子函数
- */
- onEnter: _propTypes2["default"].func,
- /**
- * 进入动画中的钩子函数
- */
- onEntering: _propTypes2["default"].func,
- /**
- * 进入动画后的钩子函数
- */
- onEntered: _propTypes2["default"].func,
- /**
- * 退出动画开始时的钩子函数
- */
- onExit: _propTypes2["default"].func,
- /**
- * 退出动画中的钩子函数
- */
- onExiting: _propTypes2["default"].func,
- /**
- * 退出动画后的钩子函数
- */
- onExited: _propTypes2["default"].func
- };
-
- function noop() {}
-
- var defaultProps = {
- "in": false,
- unmountOnExit: false,
- transitionAppear: false,
- timeout: 5000,
- onEnter: noop,
- onEntering: noop,
- onEntered: noop,
- onExit: noop,
- onExiting: noop,
- onExited: noop
- };
-
- /**
- * 动画组件
- */
-
- var Transition = function (_Component) {
- _inherits(Transition, _Component);
-
- function Transition(props, context) {
- _classCallCheck(this, Transition);
-
- var _this = _possibleConstructorReturn(this, _Component.call(this, props, context));
-
- var initialStatus = void 0;
- if (props["in"]) {
- // 在componentdidmount时开始执行动画
- initialStatus = props.transitionAppear ? EXITED : ENTERED;
- } else {
- initialStatus = props.unmountOnExit ? UNMOUNTED : EXITED;
- }
- _this.state = { status: initialStatus };
-
- _this.nextCallback = null;
- return _this;
- }
-
- Transition.prototype.componentDidMount = function componentDidMount() {
- if (this.props.transitionAppear && this.props["in"]) {
- this.performEnter(this.props);
- }
- };
-
- Transition.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
- if (nextProps["in"] && this.props.unmountOnExit) {
- if (this.state.status === UNMOUNTED) {
- // 在componentDidUpdate执行动画.
- this.setState({ status: EXITED });
- }
- } else {
- this._needsUpdate = true;
- }
- };
-
- Transition.prototype.componentDidUpdate = function componentDidUpdate() {
- var status = this.state.status;
-
- if (this.props.unmountOnExit && status === EXITED) {
- // 当使用unmountOnExit时,exited为exiting和unmont的过渡状态
- if (this.props["in"]) {
- this.performEnter(this.props);
- } else {
- this.setState({ status: UNMOUNTED });
- }
-
- return;
- }
-
- // 确保只响应prop变化
- if (this._needsUpdate) {
- this._needsUpdate = false;
-
- if (this.props["in"]) {
- if (status === EXITING) {
- this.performEnter(this.props);
- } else if (status === EXITED) {
- this.performEnter(this.props);
- }
- // 其他,当我们已经输入或输出
- } else {
- if (status === ENTERING || status === ENTERED) {
- this.performExit(this.props);
- }
- // 我们已经输入或输出完成
- }
- }
- };
-
- Transition.prototype.componentWillUnmount = function componentWillUnmount() {
- this.cancelNextCallback();
- };
-
- Transition.prototype.performEnter = function performEnter(props) {
- var _this2 = this;
-
- this.cancelNextCallback();
- var node = _reactDom2["default"].findDOMNode(this);
-
- // 这里接收新props
- props.onEnter(node);
-
- this.safeSetState({ status: ENTERING }, function () {
- _this2.props.onEntering(node);
-
- _this2.onTransitionEnd(node, function () {
- _this2.safeSetState({ status: ENTERED }, function () {
- _this2.props.onEntered(node);
- });
- });
- });
- };
-
- Transition.prototype.performExit = function performExit(props) {
- var _this3 = this;
-
- this.cancelNextCallback();
- var node = _reactDom2["default"].findDOMNode(this);
-
- props.onExit(node);
-
- this.safeSetState({ status: EXITING }, function () {
- _this3.props.onExiting(node);
-
- _this3.onTransitionEnd(node, function () {
- _this3.safeSetState({ status: EXITED }, function () {
- _this3.props.onExited(node);
- });
- });
- });
- };
-
- Transition.prototype.cancelNextCallback = function cancelNextCallback() {
- if (this.nextCallback !== null) {
- this.nextCallback.cancel();
- this.nextCallback = null;
- }
- };
-
- Transition.prototype.safeSetState = function safeSetState(nextState, callback) {
- // 确保在组件销毁后挂起的setState被消除
- this.setState(nextState, this.setNextCallback(callback));
- };
-
- Transition.prototype.setNextCallback = function setNextCallback(callback) {
- var _this4 = this;
-
- var active = true;
-
- this.nextCallback = function (event) {
- if (active) {
- active = false;
- _this4.nextCallback = null;
-
- callback(event);
- }
- };
-
- this.nextCallback.cancel = function () {
- active = false;
- };
-
- return this.nextCallback;
- };
-
- Transition.prototype.onTransitionEnd = function onTransitionEnd(node, handler) {
- this.setNextCallback(handler);
-
- if (node) {
- if (transitionEndEvent == undefined) {
- this.nextCallback();
- } else {
- (0, _on2["default"])(node, transitionEndEvent, this.nextCallback);
- }
- setTimeout(this.nextCallback, this.props.timeout);
- } else {
- setTimeout(this.nextCallback, 0);
- }
- };
-
- Transition.prototype.render = function render() {
- var status = this.state.status;
- if (status === UNMOUNTED) {
- return null;
- }
-
- var _props = this.props,
- children = _props.children,
- className = _props.className,
- childProps = _objectWithoutProperties(_props, ['children', 'className']);
-
- Object.keys(Transition.propTypes).forEach(function (key) {
- return delete childProps[key];
- });
-
- var transitionClassName = void 0;
- if (status === EXITED) {
- transitionClassName = this.props.exitedClassName;
- } else if (status === ENTERING) {
- transitionClassName = this.props.enteringClassName;
- } else if (status === ENTERED) {
- transitionClassName = this.props.enteredClassName;
- } else if (status === EXITING) {
- transitionClassName = this.props.exitingClassName;
- }
-
- var child = _react2["default"].Children.only(children);
- return _react2["default"].cloneElement(child, _extends({}, childProps, {
- className: (0, _classnames2["default"])(child.props.className, className, transitionClassName)
- }));
- };
-
- return Transition;
- }(_react.Component);
-
- Transition.propTypes = propTypes;
-
- Transition.defaultProps = defaultProps;
-
- exports["default"] = Transition;
-
- /***/ }),
- /* 154 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _react = __webpack_require__(0);
-
- var _react2 = _interopRequireDefault(_react);
-
- var _propTypes = __webpack_require__(1);
-
- var _propTypes2 = _interopRequireDefault(_propTypes);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
-
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); } /**
- * This source code is quoted from rc-select.
- * homepage: https://github.com/react-component/select
- */
-
-
- var Option = function (_React$Component) {
- _inherits(Option, _React$Component);
-
- function Option() {
- _classCallCheck(this, Option);
-
- return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
- }
-
- return Option;
- }(_react2["default"].Component);
-
- Option.propTypes = {
- value: _propTypes2["default"].oneOfType([_propTypes2["default"].string, _propTypes2["default"].number])
- };
- Option.isSelectOption = true;
- exports["default"] = Option;
- module.exports = exports['default'];
-
- /***/ }),
- /* 155 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.UNSELECTABLE_ATTRIBUTE = exports.UNSELECTABLE_STYLE = undefined;
-
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
- exports.toTitle = toTitle;
- exports.getValuePropValue = getValuePropValue;
- exports.getPropValue = getPropValue;
- exports.isMultiple = isMultiple;
- exports.isCombobox = isCombobox;
- exports.isMultipleOrTags = isMultipleOrTags;
- exports.isMultipleOrTagsOrCombobox = isMultipleOrTagsOrCombobox;
- exports.isSingleMode = isSingleMode;
- exports.toArray = toArray;
- exports.getMapKey = getMapKey;
- exports.preventDefaultEvent = preventDefaultEvent;
- exports.findIndexInValueBySingleValue = findIndexInValueBySingleValue;
- exports.getLabelFromPropsValue = getLabelFromPropsValue;
- exports.getSelectKeys = getSelectKeys;
- exports.findFirstMenuItem = findFirstMenuItem;
- exports.includesSeparators = includesSeparators;
- exports.splitBySeparators = splitBySeparators;
- exports.defaultFilterFn = defaultFilterFn;
- exports.validateOptionValue = validateOptionValue;
- exports.saveRef = saveRef;
-
- var _react = __webpack_require__(0);
-
- var _react2 = _interopRequireDefault(_react);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- function toTitle(title) {
- if (typeof title === 'string') {
- return title;
- }
- return null;
- }
-
- function getValuePropValue(child) {
- if (!child) {
- return null;
- }
-
- var props = child.props;
- if ('value' in props) {
- return props.value;
- }
- if (child.key) {
- return child.key;
- }
- if (child.type && child.type.isSelectOptGroup && props.label) {
- return props.label;
- }
- throw new Error('Need at least a key or a value or a label (only for OptGroup) for ' + child);
- }
-
- function getPropValue(child, prop) {
- if (prop === 'value') {
- return getValuePropValue(child);
- }
- return child.props[prop];
- }
-
- function isMultiple(props) {
- return props.multiple;
- }
-
- function isCombobox(props) {
- return props.combobox;
- }
-
- function isMultipleOrTags(props) {
- return props.multiple || props.tags;
- }
-
- function isMultipleOrTagsOrCombobox(props) {
- return isMultipleOrTags(props) || isCombobox(props);
- }
-
- function isSingleMode(props) {
- return !isMultipleOrTagsOrCombobox(props);
- }
-
- function toArray(value) {
- var ret = value;
- if (value === undefined) {
- ret = [];
- } else if (!Array.isArray(value)) {
- ret = [value];
- }
- return ret;
- }
-
- function getMapKey(value) {
- return (typeof value === 'undefined' ? 'undefined' : _typeof(value)) + '-' + value;
- }
-
- function preventDefaultEvent(e) {
- e.preventDefault();
- }
-
- function findIndexInValueBySingleValue(value, singleValue) {
- var index = -1;
- for (var i = 0; i < value.length; i++) {
- if (value[i] === singleValue) {
- index = i;
- break;
- }
- }
- return index;
- }
-
- function getLabelFromPropsValue(value, key) {
- var label = void 0;
- value = toArray(value);
- for (var i = 0; i < value.length; i++) {
- if (value[i].key === key) {
- label = value[i].label;
- break;
- }
- }
- return label;
- }
-
- function getSelectKeys(menuItems, value) {
- if (value === null || value === undefined) {
- return [];
- }
- var selectedKeys = [];
- _react2["default"].Children.forEach(menuItems, function (item) {
- if (item.type.isMenuItemGroup) {
- selectedKeys = selectedKeys.concat(getSelectKeys(item.props.children, value));
- } else {
- var itemValue = getValuePropValue(item);
- var itemKey = item.key;
- if (findIndexInValueBySingleValue(value, itemValue) !== -1 && itemKey) {
- selectedKeys.push(itemKey);
- }
- }
- });
- return selectedKeys;
- }
-
- var UNSELECTABLE_STYLE = exports.UNSELECTABLE_STYLE = {
- userSelect: 'none',
- WebkitUserSelect: 'none'
- };
-
- var UNSELECTABLE_ATTRIBUTE = exports.UNSELECTABLE_ATTRIBUTE = {
- unselectable: 'on'
- };
-
- function findFirstMenuItem(children) {
- for (var i = 0; i < children.length; i++) {
- var child = children[i];
- if (child.type.isMenuItemGroup) {
- var found = findFirstMenuItem(child.props.children);
- if (found) {
- return found;
- }
- } else if (!child.props.disabled) {
- return child;
- }
- }
- return null;
- }
-
- function includesSeparators(string, separators) {
- for (var i = 0; i < separators.length; ++i) {
- if (string.lastIndexOf(separators[i]) > 0) {
- return true;
- }
- }
- return false;
- }
-
- function splitBySeparators(string, separators) {
- var reg = new RegExp('[' + separators.join() + ']');
- return string.split(reg).filter(function (token) {
- return token;
- });
- }
-
- function defaultFilterFn(input, child) {
- if (child.props.disabled) {
- return false;
- }
- var value = toArray(getPropValue(child, this.props.optionFilterProp)).join('');
- return value.toLowerCase().indexOf(input.toLowerCase()) > -1;
- }
-
- function validateOptionValue(value, props) {
- if (isSingleMode(props) || isMultiple(props)) {
- return;
- }
- if (typeof value !== 'string') {
- throw new Error('Invalid `value` of type `' + (typeof value === 'undefined' ? 'undefined' : _typeof(value)) + '` supplied to Option, ' + 'expected `string` when `tags/combobox` is `true`.');
- }
- }
-
- function saveRef(instance, name) {
- return function (node) {
- instance[name] = node;
- };
- }
-
- /***/ }),
- /* 156 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
-
- "use strict";
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createForm__ = __webpack_require__(458);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__createFormField__ = __webpack_require__(176);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__propTypes__ = __webpack_require__(573);
- /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "createFormField", function() { return __WEBPACK_IMPORTED_MODULE_1__createFormField__["a"]; });
- /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "formShape", function() { return __WEBPACK_IMPORTED_MODULE_2__propTypes__["a"]; });
- /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "createForm", function() { return __WEBPACK_IMPORTED_MODULE_0__createForm__["a"]; });
- // export this package's api
-
-
-
-
-
-
- /***/ }),
- /* 157 */
- /***/ (function(module, exports, __webpack_require__) {
-
- module.exports = { "default": __webpack_require__(460), __esModule: true };
-
- /***/ }),
- /* 158 */
- /***/ (function(module, exports, __webpack_require__) {
-
- module.exports = !__webpack_require__(27) && !__webpack_require__(41)(function () {
- return Object.defineProperty(__webpack_require__(159)('div'), 'a', { get: function () { return 7; } }).a != 7;
- });
-
-
- /***/ }),
- /* 159 */
- /***/ (function(module, exports, __webpack_require__) {
-
- var isObject = __webpack_require__(40);
- var document = __webpack_require__(22).document;
- // typeof document.createElement is 'object' in old IE
- var is = isObject(document) && isObject(document.createElement);
- module.exports = function (it) {
- return is ? document.createElement(it) : {};
- };
-
-
- /***/ }),
- /* 160 */
- /***/ (function(module, exports, __webpack_require__) {
-
- __webpack_require__(464);
- module.exports = __webpack_require__(16).Object.assign;
-
-
- /***/ }),
- /* 161 */
- /***/ (function(module, exports, __webpack_require__) {
-
- var has = __webpack_require__(28);
- var toIObject = __webpack_require__(42);
- var arrayIndexOf = __webpack_require__(466)(false);
- var IE_PROTO = __webpack_require__(100)('IE_PROTO');
-
- module.exports = function (object, names) {
- var O = toIObject(object);
- var i = 0;
- var result = [];
- var key;
- for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
- // Don't enum bug & hidden keys
- while (names.length > i) if (has(O, key = names[i++])) {
- ~arrayIndexOf(result, key) || result.push(key);
- }
- return result;
- };
-
-
- /***/ }),
- /* 162 */
- /***/ (function(module, exports, __webpack_require__) {
-
- // fallback for non-array-like ES3 and non-enumerable old V8 strings
- var cof = __webpack_require__(97);
- // eslint-disable-next-line no-prototype-builtins
- module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
- return cof(it) == 'String' ? it.split('') : Object(it);
- };
-
-
- /***/ }),
- /* 163 */
- /***/ (function(module, exports, __webpack_require__) {
-
- // 7.1.15 ToLength
- var toInteger = __webpack_require__(99);
- var min = Math.min;
- module.exports = function (it) {
- return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
- };
-
-
- /***/ }),
- /* 164 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
- var $at = __webpack_require__(471)(true);
-
- // 21.1.3.27 String.prototype[@@iterator]()
- __webpack_require__(165)(String, 'String', function (iterated) {
- this._t = String(iterated); // target
- this._i = 0; // next index
- // 21.1.5.2.1 %StringIteratorPrototype%.next()
- }, function () {
- var O = this._t;
- var index = this._i;
- var point;
- if (index >= O.length) return { value: undefined, done: true };
- point = $at(O, index);
- this._i += point.length;
- return { value: point, done: false };
- });
-
-
- /***/ }),
- /* 165 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
- var LIBRARY = __webpack_require__(77);
- var $export = __webpack_require__(21);
- var redefine = __webpack_require__(166);
- var hide = __webpack_require__(38);
- var Iterators = __webpack_require__(61);
- var $iterCreate = __webpack_require__(472);
- var setToStringTag = __webpack_require__(105);
- var getPrototypeOf = __webpack_require__(475);
- var ITERATOR = __webpack_require__(19)('iterator');
- var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
- var FF_ITERATOR = '@@iterator';
- var KEYS = 'keys';
- var VALUES = 'values';
-
- var returnThis = function () { return this; };
-
- module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
- $iterCreate(Constructor, NAME, next);
- var getMethod = function (kind) {
- if (!BUGGY && kind in proto) return proto[kind];
- switch (kind) {
- case KEYS: return function keys() { return new Constructor(this, kind); };
- case VALUES: return function values() { return new Constructor(this, kind); };
- } return function entries() { return new Constructor(this, kind); };
- };
- var TAG = NAME + ' Iterator';
- var DEF_VALUES = DEFAULT == VALUES;
- var VALUES_BUG = false;
- var proto = Base.prototype;
- var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
- var $default = $native || getMethod(DEFAULT);
- var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
- var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
- var methods, key, IteratorPrototype;
- // Fix native
- if ($anyNative) {
- IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
- if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
- // Set @@toStringTag to native iterators
- setToStringTag(IteratorPrototype, TAG, true);
- // fix for some old engines
- if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);
- }
- }
- // fix Array#{values, @@iterator}.name in V8 / FF
- if (DEF_VALUES && $native && $native.name !== VALUES) {
- VALUES_BUG = true;
- $default = function values() { return $native.call(this); };
- }
- // Define iterator
- if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
- hide(proto, ITERATOR, $default);
- }
- // Plug for library
- Iterators[NAME] = $default;
- Iterators[TAG] = returnThis;
- if (DEFAULT) {
- methods = {
- values: DEF_VALUES ? $default : getMethod(VALUES),
- keys: IS_SET ? $default : getMethod(KEYS),
- entries: $entries
- };
- if (FORCED) for (key in methods) {
- if (!(key in proto)) redefine(proto, key, methods[key]);
- } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
- }
- return methods;
- };
-
-
- /***/ }),
- /* 166 */
- /***/ (function(module, exports, __webpack_require__) {
-
- module.exports = __webpack_require__(38);
-
-
- /***/ }),
- /* 167 */
- /***/ (function(module, exports, __webpack_require__) {
-
- // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
- var $keys = __webpack_require__(161);
- var hiddenKeys = __webpack_require__(102).concat('length', 'prototype');
-
- exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
- return $keys(O, hiddenKeys);
- };
-
-
- /***/ }),
- /* 168 */
- /***/ (function(module, exports, __webpack_require__) {
-
- var pIE = __webpack_require__(79);
- var createDesc = __webpack_require__(59);
- var toIObject = __webpack_require__(42);
- var toPrimitive = __webpack_require__(96);
- var has = __webpack_require__(28);
- var IE8_DOM_DEFINE = __webpack_require__(158);
- var gOPD = Object.getOwnPropertyDescriptor;
-
- exports.f = __webpack_require__(27) ? gOPD : function getOwnPropertyDescriptor(O, P) {
- O = toIObject(O);
- P = toPrimitive(P, true);
- if (IE8_DOM_DEFINE) try {
- return gOPD(O, P);
- } catch (e) { /* empty */ }
- if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
- };
-
-
- /***/ }),
- /* 169 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
-
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util__ = __webpack_require__(11);
-
-
- /**
- * Rule for validating required fields.
- *
- * @param rule The validation rule.
- * @param value The value of the field on the source object.
- * @param source The source object being validated.
- * @param errors An array of errors that this rule may add
- * validation errors to.
- * @param options The validation options.
- * @param options.messages The validation messages.
- */
- function required(rule, value, source, errors, options, type) {
- if (rule.required && (!source.hasOwnProperty(rule.field) || __WEBPACK_IMPORTED_MODULE_0__util__["e" /* isEmptyValue */](value, type || rule.type))) {
- errors.push(__WEBPACK_IMPORTED_MODULE_0__util__["d" /* format */](options.messages.required, rule.fullField));
- }
- }
-
- /* harmony default export */ __webpack_exports__["a"] = (required);
+ /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(43)))
/***/ }),
/* 170 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
- /* WEBPACK VAR INJECTION */(function(process) {/**
- * Copyright (c) 2014-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-
-
- /**
- * Similar to invariant but only logs a warning if the condition is not met.
- * This can be used to log issues in development environments in critical
- * paths. Removing the logging code for production environments will keep the
- * same logic and follow the same code paths.
- */
-
- var __DEV__ = process.env.NODE_ENV !== 'production';
-
- var warning = function() {};
-
- if (__DEV__) {
- var printWarning = function printWarning(format, args) {
- var len = arguments.length;
- args = new Array(len > 1 ? len - 1 : 0);
- for (var key = 1; key < len; key++) {
- args[key - 1] = arguments[key];
- }
- var argIndex = 0;
- var message = 'Warning: ' +
- format.replace(/%s/g, function() {
- return args[argIndex++];
- });
- if (typeof console !== 'undefined') {
- console.error(message);
- }
- try {
- // --- Welcome to debugging React ---
- // This error was thrown as a convenience so that you can use this stack
- // to find the callsite that caused this warning to fire.
- throw new Error(message);
- } catch (x) {}
- }
-
- warning = function(condition, format, args) {
- var len = arguments.length;
- args = new Array(len > 2 ? len - 2 : 0);
- for (var key = 2; key < len; key++) {
- args[key - 2] = arguments[key];
- }
- if (format === undefined) {
- throw new Error(
- '`warning(condition, format, ...args)` requires a warning ' +
- 'message argument'
- );
- }
- if (!condition) {
- printWarning.apply(null, [format].concat(args));
- }
- };
- }
-
- module.exports = warning;
-
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(10)))
-
- /***/ }),
- /* 171 */
- /***/ (function(module, exports, __webpack_require__) {
-
- var isArray = __webpack_require__(108),
- isKey = __webpack_require__(528),
- stringToPath = __webpack_require__(533),
- toString = __webpack_require__(173);
-
- /**
- * Casts `value` to a path array if it's not one.
- *
- * @private
- * @param {*} value The value to inspect.
- * @param {Object} [object] The object to query keys on.
- * @returns {Array} Returns the cast property path array.
- */
- function castPath(value, object) {
- if (isArray(value)) {
- return value;
- }
- return isKey(value, object) ? [value] : stringToPath(toString(value));
- }
-
- module.exports = castPath;
-
-
- /***/ }),
- /* 172 */
- /***/ (function(module, exports, __webpack_require__) {
-
- var Symbol = __webpack_require__(110),
- getRawTag = __webpack_require__(530),
- objectToString = __webpack_require__(531);
-
- /** `Object#toString` result references. */
- var nullTag = '[object Null]',
- undefinedTag = '[object Undefined]';
-
- /** Built-in value references. */
- var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
-
- /**
- * The base implementation of `getTag` without fallbacks for buggy environments.
- *
- * @private
- * @param {*} value The value to query.
- * @returns {string} Returns the `toStringTag`.
- */
- function baseGetTag(value) {
- if (value == null) {
- return value === undefined ? undefinedTag : nullTag;
- }
- return (symToStringTag && symToStringTag in Object(value))
- ? getRawTag(value)
- : objectToString(value);
- }
-
- module.exports = baseGetTag;
-
-
- /***/ }),
- /* 173 */
- /***/ (function(module, exports, __webpack_require__) {
-
- var baseToString = __webpack_require__(562);
-
- /**
- * Converts `value` to a string. An empty string is returned for `null`
- * and `undefined` values. The sign of `-0` is preserved.
- *
- * @static
- * @memberOf _
- * @since 4.0.0
- * @category Lang
- * @param {*} value The value to convert.
- * @returns {string} Returns the converted string.
- * @example
- *
- * _.toString(null);
- * // => ''
- *
- * _.toString(-0);
- * // => '-0'
- *
- * _.toString([1, 2, 3]);
- * // => '1,2,3'
- */
- function toString(value) {
- return value == null ? '' : baseToString(value);
- }
-
- module.exports = toString;
-
-
- /***/ }),
- /* 174 */
- /***/ (function(module, exports, __webpack_require__) {
-
- var isSymbol = __webpack_require__(109);
-
- /** Used as references for various `Number` constants. */
- var INFINITY = 1 / 0;
-
- /**
- * Converts `value` to a string key if it's not a string or symbol.
- *
- * @private
- * @param {*} value The value to inspect.
- * @returns {string|symbol} Returns the key.
- */
- function toKey(value) {
- if (typeof value == 'string' || isSymbol(value)) {
- return value;
- }
- var result = (value + '');
- return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
- }
-
- module.exports = toKey;
-
-
- /***/ }),
- /* 175 */
- /***/ (function(module, exports, __webpack_require__) {
-
- var baseSet = __webpack_require__(564);
-
- /**
- * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
- * it's created. Arrays are created for missing index properties while objects
- * are created for all other missing properties. Use `_.setWith` to customize
- * `path` creation.
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @since 3.7.0
- * @category Object
- * @param {Object} object The object to modify.
- * @param {Array|string} path The path of the property to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns `object`.
- * @example
- *
- * var object = { 'a': [{ 'b': { 'c': 3 } }] };
- *
- * _.set(object, 'a[0].b.c', 4);
- * console.log(object.a[0].b.c);
- * // => 4
- *
- * _.set(object, ['x', '0', 'y', 'z'], 5);
- * console.log(object.x[0].y.z);
- * // => 5
- */
- function set(object, path, value) {
- return object == null ? object : baseSet(object, path, value);
- }
-
- module.exports = set;
-
-
- /***/ }),
- /* 176 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
-
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["b"] = isFormField;
- /* harmony export (immutable) */ __webpack_exports__["a"] = createFormField;
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(9);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__ = __webpack_require__(6);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__);
-
-
-
- var Field = function Field(fields) {
- __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default()(this, Field);
-
- __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()(this, fields);
- };
-
- function isFormField(obj) {
- return obj instanceof Field;
- }
-
- function createFormField(field) {
- if (isFormField(field)) {
- return field;
- }
- return new Field(field);
- }
-
- /***/ }),
- /* 177 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
-
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["a"] = argumentContainer;
- /* harmony export (immutable) */ __webpack_exports__["i"] = identity;
- /* harmony export (immutable) */ __webpack_exports__["b"] = flattenArray;
- /* unused harmony export treeTraverse */
- /* harmony export (immutable) */ __webpack_exports__["c"] = flattenFields;
- /* harmony export (immutable) */ __webpack_exports__["k"] = normalizeValidateRules;
- /* harmony export (immutable) */ __webpack_exports__["f"] = getValidateTriggers;
- /* harmony export (immutable) */ __webpack_exports__["g"] = getValueFromEvent;
- /* harmony export (immutable) */ __webpack_exports__["d"] = getErrorStrs;
- /* harmony export (immutable) */ __webpack_exports__["e"] = getParams;
- /* harmony export (immutable) */ __webpack_exports__["j"] = isEmptyObject;
- /* harmony export (immutable) */ __webpack_exports__["h"] = hasRules;
- /* harmony export (immutable) */ __webpack_exports__["l"] = startsWith;
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(9);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_hoist_non_react_statics__ = __webpack_require__(570);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_hoist_non_react_statics___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_hoist_non_react_statics__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning__ = __webpack_require__(170);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_warning___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_warning__);
-
-
-
-
- function getDisplayName(WrappedComponent) {
- return WrappedComponent.displayName || WrappedComponent.name || 'WrappedComponent';
- }
-
- function argumentContainer(Container, WrappedComponent) {
- /* eslint no-param-reassign:0 */
- Container.displayName = 'Form(' + getDisplayName(WrappedComponent) + ')';
- Container.WrappedComponent = WrappedComponent;
- return __WEBPACK_IMPORTED_MODULE_1_hoist_non_react_statics___default()(Container, WrappedComponent);
- }
-
- function identity(obj) {
- return obj;
- }
-
- function flattenArray(arr) {
- return Array.prototype.concat.apply([], arr);
- }
-
- function treeTraverse() {
- var path = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
- var tree = arguments[1];
- var isLeafNode = arguments[2];
- var errorMessage = arguments[3];
- var callback = arguments[4];
-
- if (isLeafNode(path, tree)) {
- callback(path, tree);
- } else if (tree === undefined || tree === null) {
- // Do nothing
- } else if (Array.isArray(tree)) {
- tree.forEach(function (subTree, index) {
- return treeTraverse(path + '[' + index + ']', subTree, isLeafNode, errorMessage, callback);
- });
- } else {
- // It's object and not a leaf node
- if (typeof tree !== 'object') {
- __WEBPACK_IMPORTED_MODULE_2_warning___default()(false, errorMessage);
- return;
- }
- Object.keys(tree).forEach(function (subTreeKey) {
- var subTree = tree[subTreeKey];
- treeTraverse('' + path + (path ? '.' : '') + subTreeKey, subTree, isLeafNode, errorMessage, callback);
- });
- }
- }
-
- function flattenFields(maybeNestedFields, isLeafNode, errorMessage) {
- var fields = {};
- treeTraverse(undefined, maybeNestedFields, isLeafNode, errorMessage, function (path, node) {
- fields[path] = node;
- });
- return fields;
- }
-
- function normalizeValidateRules(validate, rules, validateTrigger) {
- var validateRules = validate.map(function (item) {
- var newItem = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, item, {
- trigger: item.trigger || []
- });
- if (typeof newItem.trigger === 'string') {
- newItem.trigger = [newItem.trigger];
- }
- return newItem;
- });
- if (rules) {
- validateRules.push({
- trigger: validateTrigger ? [].concat(validateTrigger) : [],
- rules: rules
- });
- }
- return validateRules;
- }
-
- function getValidateTriggers(validateRules) {
- return validateRules.filter(function (item) {
- return !!item.rules && item.rules.length;
- }).map(function (item) {
- return item.trigger;
- }).reduce(function (pre, curr) {
- return pre.concat(curr);
- }, []);
- }
-
- function getValueFromEvent(e) {
- // To support custom element
- if (!e || !e.target) {
- return e;
- }
- var target = e.target;
-
- return target.type === 'checkbox' ? target.checked : target.value;
- }
-
- function getErrorStrs(errors) {
- if (errors) {
- return errors.map(function (e) {
- if (e && e.message) {
- return e.message;
- }
- return e;
- });
- }
- return errors;
- }
-
- function getParams(ns, opt, cb) {
- var names = ns;
- var options = opt;
- var callback = cb;
- if (cb === undefined) {
- if (typeof names === 'function') {
- callback = names;
- options = {};
- names = undefined;
- } else if (Array.isArray(names)) {
- if (typeof options === 'function') {
- callback = options;
- options = {};
- } else {
- options = options || {};
- }
- } else {
- callback = options;
- options = names || {};
- names = undefined;
- }
- }
- return {
- names: names,
- options: options,
- callback: callback
- };
- }
-
- function isEmptyObject(obj) {
- return Object.keys(obj).length === 0;
- }
-
- function hasRules(validate) {
- if (validate) {
- return validate.some(function (item) {
- return item.rules && item.rules.length;
- });
- }
- return false;
- }
-
- function startsWith(str, prefix) {
- return str.lastIndexOf(prefix, 0) === 0;
- }
-
- /***/ }),
- /* 178 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
- var _classnames = __webpack_require__(2);
-
- var _classnames2 = _interopRequireDefault(_classnames);
-
- var _react = __webpack_require__(0);
-
- var _react2 = _interopRequireDefault(_react);
-
- var _propTypes = __webpack_require__(1);
-
- var _propTypes2 = _interopRequireDefault(_propTypes);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
-
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
-
- function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
-
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
-
- var propTypes = {
- /**
- * Adds `container-fluid` class.
- */
- fluid: _propTypes2["default"].bool,
- /**
- * You can use a custom element for this component
- */
- componentClass: _propTypes2["default"].oneOfType([_propTypes2["default"].element, _propTypes2["default"].string])
- };
-
- var defaultProps = {
- componentClass: 'div',
- fluid: false,
- clsPrefix: 'u-container'
- };
-
- var Con = function (_React$Component) {
- _inherits(Con, _React$Component);
-
- function Con() {
- _classCallCheck(this, Con);
-
- return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
- }
-
- Con.prototype.render = function render() {
- var _tbclass;
-
- var _props = this.props,
- fluid = _props.fluid,
- Component = _props.componentClass,
- clsPrefix = _props.clsPrefix,
- className = _props.className,
- others = _objectWithoutProperties(_props, ['fluid', 'componentClass', 'clsPrefix', 'className']);
-
- var tbclass = (_tbclass = {}, _defineProperty(_tbclass, '' + clsPrefix, !fluid), _defineProperty(_tbclass, clsPrefix + '-fluid', fluid), _tbclass);
-
- return _react2["default"].createElement(
- Component,
- _extends({}, others, {
- className: (0, _classnames2["default"])(tbclass, className)
- }),
- this.props.children
- );
- };
-
- return Con;
- }(_react2["default"].Component);
-
- Con.propTypes = propTypes;
- Con.defaultProps = defaultProps;
-
- exports["default"] = Con;
- module.exports = exports['default'];
-
- /***/ }),
- /* 179 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- module.exports = __webpack_require__(582);
-
- /***/ }),
- /* 180 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _InputNumber = __webpack_require__(587);
-
- var _InputNumber2 = _interopRequireDefault(_InputNumber);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- exports["default"] = _InputNumber2["default"];
- module.exports = exports['default'];
-
- /***/ }),
- /* 181 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
- var _classnames = __webpack_require__(2);
-
- var _classnames2 = _interopRequireDefault(_classnames);
-
- var _react = __webpack_require__(0);
-
- var _react2 = _interopRequireDefault(_react);
-
- var _propTypes = __webpack_require__(1);
-
- var _propTypes2 = _interopRequireDefault(_propTypes);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
-
- function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
-
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
-
- var propTypes = {
-
- colors: _propTypes2["default"].oneOf(['', 'dark', 'success', 'info', 'warning', 'danger', 'primary']),
-
- disabled: _propTypes2["default"].bool,
-
- inverse: _propTypes2["default"].bool
-
- };
-
- var defaultProps = {
- disabled: false,
- inverse: false,
- colors: 'primary',
- clsPrefix: 'u-checkbox',
- defaultChecked: false,
- onClick: function onClick() {}
- };
- var clsPrefix = 'u-checkbox';
-
- var Checkbox = function (_React$Component) {
- _inherits(Checkbox, _React$Component);
-
- function Checkbox(props) {
- _classCallCheck(this, Checkbox);
-
- var _this = _possibleConstructorReturn(this, _React$Component.call(this, props));
-
- _initialiseProps.call(_this);
-
- _this.state = {
- checked: 'checked' in props ? props.checked : props.defaultChecked
- };
- _this.doubleClickFlag = null;
- return _this;
- }
-
- Checkbox.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
- if ('checked' in nextProps) {
- this.setState({
- checked: nextProps.checked
- });
- }
- };
-
- Checkbox.prototype.render = function render() {
- var _props = this.props,
- disabled = _props.disabled,
- inverse = _props.inverse,
- colors = _props.colors,
- size = _props.size,
- className = _props.className,
- indeterminate = _props.indeterminate,
- onClick = _props.onClick,
- children = _props.children,
- checked = _props.checked,
- clsPrefix = _props.clsPrefix,
- onDoubleClick = _props.onDoubleClick,
- onChange = _props.onChange,
- others = _objectWithoutProperties(_props, ['disabled', 'inverse', 'colors', 'size', 'className', 'indeterminate', 'onClick', 'children', 'checked', 'clsPrefix', 'onDoubleClick', 'onChange']);
-
- var input = _react2["default"].createElement('input', _extends({}, others, {
- type: 'checkbox',
- disabled: this.props.disabled
- }));
-
- var classes = {
- 'is-checked': this.state.checked,
- disabled: disabled
- };
-
- if (inverse) {
- classes[clsPrefix + '-inverse'] = true;
- }
-
- if (colors) {
- classes[clsPrefix + '-' + colors] = true;
- }
-
- if (size) {
- classes[clsPrefix + '-' + size] = true;
- }
-
- if (!checked && indeterminate) {
- classes[clsPrefix + '-indeterminate'] = true;
- }
-
- var classNames = (0, _classnames2["default"])(clsPrefix, classes);
-
- return _react2["default"].createElement(
- 'label',
- {
- className: (0, _classnames2["default"])(classNames, className),
- onDoubleClick: this.handledbClick,
- onClick: this.changeState },
- input,
- _react2["default"].createElement(
- 'label',
- { className: clsPrefix + '-label' },
- children
- )
- );
- };
-
- return Checkbox;
- }(_react2["default"].Component);
-
- var _initialiseProps = function _initialiseProps() {
- var _this2 = this;
-
- this.changeState = function (e) {
- var props = _this2.props;
- var checked = _this2.state.checked;
-
- clearTimeout(_this2.doubleClickFlag);
- if (props.onClick instanceof Function) {
- props.onClick(e);
- }
- if (props.onDoubleClick instanceof Function) {
- _this2.doubleClickFlag = setTimeout(function () {
- //do function在此处写单击事件要执行的代码
- _this2.change(props, checked);
- }, 300);
- } else {
- _this2.change(props, checked);
- }
- e.stopPropagation();
- e.preventDefault();
- //执行延时
- };
-
- this.change = function (props, checked) {
- if (props.disabled) {
- return;
- }
- if (!('checked' in props)) {
- _this2.setState({
- checked: !checked
- });
- }
-
- if (props.onChange instanceof Function) {
- props.onChange(!checked);
- }
- };
-
- this.handledbClick = function (e) {
- var onDoubleClick = _this2.props.onDoubleClick;
-
- clearTimeout(_this2.doubleClickFlag);
- onDoubleClick && onDoubleClick(_this2.state.checked, e);
- };
- };
-
- Checkbox.propTypes = propTypes;
- Checkbox.defaultProps = defaultProps;
-
- exports["default"] = Checkbox;
- module.exports = exports['default'];
-
- /***/ }),
- /* 182 */
- /***/ (function(module, exports) {
-
- module.exports = function(module) {
- if(!module.webpackPolyfill) {
- module.deprecate = function() {};
- module.paths = [];
- // module.parent = undefined by default
- if(!module.children) module.children = [];
- Object.defineProperty(module, "loaded", {
- enumerable: true,
- get: function() {
- return module.l;
- }
- });
- Object.defineProperty(module, "id", {
- enumerable: true,
- get: function() {
- return module.i;
- }
- });
- module.webpackPolyfill = 1;
- }
- return module;
- };
-
-
- /***/ }),
- /* 183 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- exports.__esModule = true;
- exports.default = all;
-
- var _createChainableTypeChecker = __webpack_require__(116);
-
- var _createChainableTypeChecker2 = _interopRequireDefault(_createChainableTypeChecker);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
- function all() {
- for (var _len = arguments.length, validators = Array(_len), _key = 0; _key < _len; _key++) {
- validators[_key] = arguments[_key];
- }
-
- function allPropTypes() {
- for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
- args[_key2] = arguments[_key2];
- }
-
- var error = null;
-
- validators.forEach(function (validator) {
- if (error != null) {
- return;
- }
-
- var result = validator.apply(undefined, args);
- if (result != null) {
- error = result;
- }
- });
-
- return error;
- }
-
- return (0, _createChainableTypeChecker2.default)(allPropTypes);
- } /**
- * This source code is quoted from rc-util.
- * homepage: https://github.com/react-component/util
- */
-
- /***/ }),
- /* 184 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- exports.__esModule = true;
-
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; /**
- * This source code is quoted from rc-util.
- * homepage: https://github.com/react-component/util
- */
-
-
- var _react = __webpack_require__(0);
-
- var _react2 = _interopRequireDefault(_react);
-
- var _createChainableTypeChecker = __webpack_require__(116);
-
- var _createChainableTypeChecker2 = _interopRequireDefault(_createChainableTypeChecker);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
- function elementType(props, propName, componentName, location, propFullName) {
- var propValue = props[propName];
- var propType = typeof propValue === 'undefined' ? 'undefined' : _typeof(propValue);
-
- if (_react2.default.isValidElement(propValue)) {
- return new Error('Invalid ' + location + ' `' + propFullName + '` of type ReactElement ' + ('supplied to `' + componentName + '`, expected an element type (a string ') + 'or a ReactClass).');
- }
-
- if (propType !== 'function' && propType !== 'string') {
- return new Error('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected an element type (a string ') + 'or a ReactClass).');
- }
-
- return null;
- }
-
- exports.default = (0, _createChainableTypeChecker2.default)(elementType);
-
- /***/ }),
- /* 185 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- exports.__esModule = true;
- exports.default = isRequiredForA11y;
- /**
- * This source code is quoted from rc-util.
- * homepage: https://github.com/react-component/util
- */
- function isRequiredForA11y(validator) {
- return function validate(props, propName, componentName, location, propFullName) {
- var componentNameSafe = componentName || '<>';
- var propFullNameSafe = propFullName || propName;
-
- if (props[propName] == null) {
- return new Error('The ' + location + ' `' + propFullNameSafe + '` is required to make ' + ('`' + componentNameSafe + '` accessible for users of assistive ') + 'technologies such as screen readers.');
- }
-
- for (var _len = arguments.length, args = Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) {
- args[_key - 5] = arguments[_key];
- }
-
- return validator.apply(undefined, [props, propName, componentName, location, propFullName].concat(args));
- };
- }
-
- /***/ }),
- /* 186 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
- /**
- * This source code is quoted from rc-util.
- * homepage: https://github.com/react-component/util
- */
-
-
- /**
- * @ignore
- * some key-codes definition and utils from closure-library
- * @author yiminghe@gmail.com
- */
-
- var KeyCode = {
- /**
- * MAC_ENTER
- */
- MAC_ENTER: 3,
- /**
- * BACKSPACE
- */
- BACKSPACE: 8,
- /**
- * TAB
- */
- TAB: 9,
- /**
- * NUMLOCK on FF/Safari Mac
- */
- NUM_CENTER: 12, // NUMLOCK on FF/Safari Mac
- /**
- * ENTER
- */
- ENTER: 13,
- /**
- * SHIFT
- */
- SHIFT: 16,
- /**
- * CTRL
- */
- CTRL: 17,
- /**
- * ALT
- */
- ALT: 18,
- /**
- * PAUSE
- */
- PAUSE: 19,
- /**
- * CAPS_LOCK
- */
- CAPS_LOCK: 20,
- /**
- * ESC
- */
- ESC: 27,
- /**
- * SPACE
- */
- SPACE: 32,
- /**
- * PAGE_UP
- */
- PAGE_UP: 33, // also NUM_NORTH_EAST
- /**
- * PAGE_DOWN
- */
- PAGE_DOWN: 34, // also NUM_SOUTH_EAST
- /**
- * END
- */
- END: 35, // also NUM_SOUTH_WEST
- /**
- * HOME
- */
- HOME: 36, // also NUM_NORTH_WEST
- /**
- * LEFT
- */
- LEFT: 37, // also NUM_WEST
- /**
- * UP
- */
- UP: 38, // also NUM_NORTH
- /**
- * RIGHT
- */
- RIGHT: 39, // also NUM_EAST
- /**
- * DOWN
- */
- DOWN: 40, // also NUM_SOUTH
- /**
- * PRINT_SCREEN
- */
- PRINT_SCREEN: 44,
- /**
- * INSERT
- */
- INSERT: 45, // also NUM_INSERT
- /**
- * DELETE
- */
- DELETE: 46, // also NUM_DELETE
- /**
- * ZERO
- */
- ZERO: 48,
- /**
- * ONE
- */
- ONE: 49,
- /**
- * TWO
- */
- TWO: 50,
- /**
- * THREE
- */
- THREE: 51,
- /**
- * FOUR
- */
- FOUR: 52,
- /**
- * FIVE
- */
- FIVE: 53,
- /**
- * SIX
- */
- SIX: 54,
- /**
- * SEVEN
- */
- SEVEN: 55,
- /**
- * EIGHT
- */
- EIGHT: 56,
- /**
- * NINE
- */
- NINE: 57,
- /**
- * QUESTION_MARK
- */
- QUESTION_MARK: 63, // needs localization
- /**
- * A
- */
- A: 65,
- /**
- * B
- */
- B: 66,
- /**
- * C
- */
- C: 67,
- /**
- * D
- */
- D: 68,
- /**
- * E
- */
- E: 69,
- /**
- * F
- */
- F: 70,
- /**
- * G
- */
- G: 71,
- /**
- * H
- */
- H: 72,
- /**
- * I
- */
- I: 73,
- /**
- * J
- */
- J: 74,
- /**
- * K
- */
- K: 75,
- /**
- * L
- */
- L: 76,
- /**
- * M
- */
- M: 77,
- /**
- * N
- */
- N: 78,
- /**
- * O
- */
- O: 79,
- /**
- * P
- */
- P: 80,
- /**
- * Q
- */
- Q: 81,
- /**
- * R
- */
- R: 82,
- /**
- * S
- */
- S: 83,
- /**
- * T
- */
- T: 84,
- /**
- * U
- */
- U: 85,
- /**
- * V
- */
- V: 86,
- /**
- * W
- */
- W: 87,
- /**
- * X
- */
- X: 88,
- /**
- * Y
- */
- Y: 89,
- /**
- * Z
- */
- Z: 90,
- /**
- * META
- */
- META: 91, // WIN_KEY_LEFT
- /**
- * WIN_KEY_RIGHT
- */
- WIN_KEY_RIGHT: 92,
- /**
- * CONTEXT_MENU
- */
- CONTEXT_MENU: 93,
- /**
- * NUM_ZERO
- */
- NUM_ZERO: 96,
- /**
- * NUM_ONE
- */
- NUM_ONE: 97,
- /**
- * NUM_TWO
- */
- NUM_TWO: 98,
- /**
- * NUM_THREE
- */
- NUM_THREE: 99,
- /**
- * NUM_FOUR
- */
- NUM_FOUR: 100,
- /**
- * NUM_FIVE
- */
- NUM_FIVE: 101,
- /**
- * NUM_SIX
- */
- NUM_SIX: 102,
- /**
- * NUM_SEVEN
- */
- NUM_SEVEN: 103,
- /**
- * NUM_EIGHT
- */
- NUM_EIGHT: 104,
- /**
- * NUM_NINE
- */
- NUM_NINE: 105,
- /**
- * NUM_MULTIPLY
- */
- NUM_MULTIPLY: 106,
- /**
- * NUM_PLUS
- */
- NUM_PLUS: 107,
- /**
- * NUM_MINUS
- */
- NUM_MINUS: 109,
- /**
- * NUM_PERIOD
- */
- NUM_PERIOD: 110,
- /**
- * NUM_DIVISION
- */
- NUM_DIVISION: 111,
- /**
- * F1
- */
- F1: 112,
- /**
- * F2
- */
- F2: 113,
- /**
- * F3
- */
- F3: 114,
- /**
- * F4
- */
- F4: 115,
- /**
- * F5
- */
- F5: 116,
- /**
- * F6
- */
- F6: 117,
- /**
- * F7
- */
- F7: 118,
- /**
- * F8
- */
- F8: 119,
- /**
- * F9
- */
- F9: 120,
- /**
- * F10
- */
- F10: 121,
- /**
- * F11
- */
- F11: 122,
- /**
- * F12
- */
- F12: 123,
- /**
- * NUMLOCK
- */
- NUMLOCK: 144,
- /**
- * SEMICOLON
- */
- SEMICOLON: 186, // needs localization
- /**
- * DASH
- */
- DASH: 189, // needs localization
- /**
- * EQUALS
- */
- EQUALS: 187, // needs localization
- /**
- * COMMA
- */
- COMMA: 188, // needs localization
- /**
- * PERIOD
- */
- PERIOD: 190, // needs localization
- /**
- * SLASH
- */
- SLASH: 191, // needs localization
- /**
- * APOSTROPHE
- */
- APOSTROPHE: 192, // needs localization
- /**
- * SINGLE_QUOTE
- */
- SINGLE_QUOTE: 222, // needs localization
- /**
- * OPEN_SQUARE_BRACKET
- */
- OPEN_SQUARE_BRACKET: 219, // needs localization
- /**
- * BACKSLASH
- */
- BACKSLASH: 220, // needs localization
- /**
- * CLOSE_SQUARE_BRACKET
- */
- CLOSE_SQUARE_BRACKET: 221, // needs localization
- /**
- * WIN_KEY
- */
- WIN_KEY: 224,
- /**
- * MAC_FF_META
- */
- MAC_FF_META: 224, // Firefox (Gecko) fires this for the meta key instead of 91
- /**
- * WIN_IME
- */
- WIN_IME: 229
- };
-
- /*
- whether text and modified key is entered at the same time.
- */
- KeyCode.isTextModifyingKeyEvent = function isTextModifyingKeyEvent(e) {
- var keyCode = e.keyCode;
- if (e.altKey && !e.ctrlKey || e.metaKey ||
- // Function keys don't generate text
- keyCode >= KeyCode.F1 && keyCode <= KeyCode.F12) {
- return false;
- }
-
- // The following keys are quite harmless, even in combination with
- // CTRL, ALT or SHIFT.
- switch (keyCode) {
- case KeyCode.ALT:
- case KeyCode.CAPS_LOCK:
- case KeyCode.CONTEXT_MENU:
- case KeyCode.CTRL:
- case KeyCode.DOWN:
- case KeyCode.END:
- case KeyCode.ESC:
- case KeyCode.HOME:
- case KeyCode.INSERT:
- case KeyCode.LEFT:
- case KeyCode.MAC_FF_META:
- case KeyCode.META:
- case KeyCode.NUMLOCK:
- case KeyCode.NUM_CENTER:
- case KeyCode.PAGE_DOWN:
- case KeyCode.PAGE_UP:
- case KeyCode.PAUSE:
- case KeyCode.PRINT_SCREEN:
- case KeyCode.RIGHT:
- case KeyCode.SHIFT:
- case KeyCode.UP:
- case KeyCode.WIN_KEY:
- case KeyCode.WIN_KEY_RIGHT:
- return false;
- default:
- return true;
- }
- };
-
- /*
- whether character is entered.
- */
- KeyCode.isCharacterKey = function isCharacterKey(keyCode) {
- if (keyCode >= KeyCode.ZERO && keyCode <= KeyCode.NINE) {
- return true;
- }
-
- if (keyCode >= KeyCode.NUM_ZERO && keyCode <= KeyCode.NUM_MULTIPLY) {
- return true;
- }
-
- if (keyCode >= KeyCode.A && keyCode <= KeyCode.Z) {
- return true;
- }
-
- // Safari sends zero key code for non-latin characters.
- if (window.navigation.userAgent.indexOf('WebKit') !== -1 && keyCode === 0) {
- return true;
- }
-
- switch (keyCode) {
- case KeyCode.SPACE:
- case KeyCode.QUESTION_MARK:
- case KeyCode.NUM_PLUS:
- case KeyCode.NUM_MINUS:
- case KeyCode.NUM_PERIOD:
- case KeyCode.NUM_DIVISION:
- case KeyCode.SEMICOLON:
- case KeyCode.DASH:
- case KeyCode.EQUALS:
- case KeyCode.COMMA:
- case KeyCode.PERIOD:
- case KeyCode.SLASH:
- case KeyCode.APOSTROPHE:
- case KeyCode.SINGLE_QUOTE:
- case KeyCode.OPEN_SQUARE_BRACKET:
- case KeyCode.BACKSLASH:
- case KeyCode.CLOSE_SQUARE_BRACKET:
- return true;
- default:
- return false;
- }
- };
-
- module.exports = KeyCode;
-
- /***/ }),
- /* 187 */
- /***/ (function(module, exports) {
-
- module.exports = function(arr, obj){
- if (arr.indexOf) return arr.indexOf(obj);
- for (var i = 0; i < arr.length; ++i) {
- if (arr[i] === obj) return i;
- }
- return -1;
- };
-
- /***/ }),
- /* 188 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- exports.__esModule = true;
-
- var _react = __webpack_require__(0);
-
- var _react2 = _interopRequireDefault(_react);
-
- var _propTypes = __webpack_require__(1);
-
- var _propTypes2 = _interopRequireDefault(_propTypes);
-
- var _reactDom = __webpack_require__(4);
-
- var _reactDom2 = _interopRequireDefault(_reactDom);
-
- var _domAlign = __webpack_require__(189);
-
- var _domAlign2 = _interopRequireDefault(_domAlign);
-
- var _addEventListener = __webpack_require__(118);
-
- var _addEventListener2 = _interopRequireDefault(_addEventListener);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
- * This source code is quoted from rc-util.
- * homepage: https://github.com/react-component/util
- */
-
-
- //import isWindow from './isWindow';
-
- function isWindow(obj) {
- /* eslint no-eq-null: 0 */
- /* eslint eqeqeq: 0 */
- return obj != null && obj == obj.window;
- }
-
- function buffer(fn, ms) {
- var timer = void 0;
-
- function clear() {
- if (timer) {
- clearTimeout(timer);
- timer = null;
- }
- }
-
- function bufferFn() {
- clear();
- timer = setTimeout(fn, ms);
- }
-
- bufferFn.clear = clear;
-
- return bufferFn;
- }
-
- var propTypes = {
- childrenProps: _propTypes2.default.object,
- align: _propTypes2.default.object.isRequired,
- target: _propTypes2.default.func,
- onAlign: _propTypes2.default.func,
- monitorBufferTime: _propTypes2.default.number,
- monitorWindowResize: _propTypes2.default.bool,
- disabled: _propTypes2.default.bool,
- children: _propTypes2.default.any
- };
-
- var defaultProps = {
- target: function target() {
- return window;
- },
- onAlign: function onAlign() {},
-
- monitorBufferTime: 50,
- monitorWindowResize: false,
- disabled: false
- };
-
- var Align = function (_React$Component) {
- _inherits(Align, _React$Component);
-
- function Align(props) {
- _classCallCheck(this, Align);
-
- var _this = _possibleConstructorReturn(this, _React$Component.call(this, props));
-
- _initialiseProps.call(_this);
-
- return _this;
- }
-
- Align.prototype.componentDidMount = function componentDidMount() {
- var props = this.props;
- // if parent ref not attached .... use document.getElementById
- this.forceAlign();
- if (!props.disabled && props.monitorWindowResize) {
- this.startMonitorWindowResize();
- }
- };
-
- Align.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
- var reAlign = false;
- var props = this.props;
-
- if (!props.disabled) {
- if (prevProps.disabled || prevProps.align !== props.align) {
- reAlign = true;
- } else {
- var lastTarget = prevProps.target();
- var currentTarget = props.target();
- if (isWindow(lastTarget) && isWindow(currentTarget)) {
- reAlign = false;
- } else if (lastTarget !== currentTarget) {
- reAlign = true;
- }
- }
- }
-
- if (reAlign) {
- this.forceAlign();
- }
-
- if (props.monitorWindowResize && !props.disabled) {
- this.startMonitorWindowResize();
- } else {
- this.stopMonitorWindowResize();
- }
- };
-
- Align.prototype.componentWillUnmount = function componentWillUnmount() {
- this.stopMonitorWindowResize();
- };
-
- Align.prototype.render = function render() {
- var _props = this.props,
- childrenProps = _props.childrenProps,
- children = _props.children;
-
- var child = _react2.default.Children.only(children);
- if (childrenProps) {
- var newProps = {};
- for (var prop in childrenProps) {
- if (childrenProps.hasOwnProperty(prop)) {
- newProps[prop] = this.props[childrenProps[prop]];
- }
- }
- return _react2.default.cloneElement(child, newProps);
- }
- return child;
- };
-
- return Align;
- }(_react2.default.Component);
-
- var _initialiseProps = function _initialiseProps() {
- var _this2 = this;
-
- this.startMonitorWindowResize = function () {
- if (!_this2.resizeHandler) {
- _this2.bufferMonitor = buffer(_this2.forceAlign, _this2.props.monitorBufferTime);
- _this2.resizeHandler = (0, _addEventListener2.default)(window, 'resize', _this2.bufferMonitor);
- }
- };
-
- this.stopMonitorWindowResize = function () {
- if (_this2.resizeHandler) {
- _this2.bufferMonitor.clear();
- _this2.resizeHandler.remove();
- _this2.resizeHandler = null;
- }
- };
-
- this.forceAlign = function () {
- var props = _this2.props;
- if (!props.disabled) {
- var source = _reactDom2.default.findDOMNode(_this2);
- props.onAlign(source, (0, _domAlign2.default)(source, props.target(), props.align));
- }
- };
- };
-
- ;
-
- Align.defaultProps = defaultProps;
- Align.propTypes = propTypes;
-
- exports.default = Align;
-
- /***/ }),
- /* 189 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
-
- "use strict";
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__align_alignElement__ = __webpack_require__(614);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__align_alignPoint__ = __webpack_require__(620);
- /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "alignElement", function() { return __WEBPACK_IMPORTED_MODULE_0__align_alignElement__["a"]; });
- /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "alignPoint", function() { return __WEBPACK_IMPORTED_MODULE_1__align_alignPoint__["a"]; });
-
-
-
-
-
- /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__align_alignElement__["a" /* default */]);
-
- /***/ }),
- /* 190 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
-
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(30);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getVisibleRectForElement__ = __webpack_require__(191);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__adjustForViewport__ = __webpack_require__(617);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__getRegion__ = __webpack_require__(193);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__getElFuturePos__ = __webpack_require__(618);
- /**
- * align dom node flexibly
- * @author yiminghe@gmail.com
- */
-
-
-
-
-
-
-
- // http://yiminghe.iteye.com/blog/1124720
-
- function isFailX(elFuturePos, elRegion, visibleRect) {
- return elFuturePos.left < visibleRect.left || elFuturePos.left + elRegion.width > visibleRect.right;
- }
-
- function isFailY(elFuturePos, elRegion, visibleRect) {
- return elFuturePos.top < visibleRect.top || elFuturePos.top + elRegion.height > visibleRect.bottom;
- }
-
- function isCompleteFailX(elFuturePos, elRegion, visibleRect) {
- return elFuturePos.left > visibleRect.right || elFuturePos.left + elRegion.width < visibleRect.left;
- }
-
- function isCompleteFailY(elFuturePos, elRegion, visibleRect) {
- return elFuturePos.top > visibleRect.bottom || elFuturePos.top + elRegion.height < visibleRect.top;
- }
-
- function flip(points, reg, map) {
- var ret = [];
- __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].each(points, function (p) {
- ret.push(p.replace(reg, function (m) {
- return map[m];
- }));
- });
- return ret;
- }
-
- function flipOffset(offset, index) {
- offset[index] = -offset[index];
- return offset;
- }
-
- function convertOffset(str, offsetLen) {
- var n = void 0;
- if (/%$/.test(str)) {
- n = parseInt(str.substring(0, str.length - 1), 10) / 100 * offsetLen;
- } else {
- n = parseInt(str, 10);
- }
- return n || 0;
- }
-
- function normalizeOffset(offset, el) {
- offset[0] = convertOffset(offset[0], el.width);
- offset[1] = convertOffset(offset[1], el.height);
- }
-
- /**
- * @param el
- * @param tgtRegion 参照节点所占的区域: { left, top, width, height }
- * @param align
- */
- function doAlign(el, tgtRegion, align, isTgtRegionVisible) {
- var points = align.points;
- var offset = align.offset || [0, 0];
- var targetOffset = align.targetOffset || [0, 0];
- var overflow = align.overflow;
- var source = align.source || el;
- offset = [].concat(offset);
- targetOffset = [].concat(targetOffset);
- overflow = overflow || {};
- var newOverflowCfg = {};
- var fail = 0;
- // 当前节点可以被放置的显示区域
- var visibleRect = Object(__WEBPACK_IMPORTED_MODULE_1__getVisibleRectForElement__["a" /* default */])(source);
- // 当前节点所占的区域, left/top/width/height
- var elRegion = Object(__WEBPACK_IMPORTED_MODULE_3__getRegion__["a" /* default */])(source);
- // 将 offset 转换成数值,支持百分比
- normalizeOffset(offset, elRegion);
- normalizeOffset(targetOffset, tgtRegion);
- // 当前节点将要被放置的位置
- var elFuturePos = Object(__WEBPACK_IMPORTED_MODULE_4__getElFuturePos__["a" /* default */])(elRegion, tgtRegion, points, offset, targetOffset);
- // 当前节点将要所处的区域
- var newElRegion = __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].merge(elRegion, elFuturePos);
-
- // 如果可视区域不能完全放置当前节点时允许调整
- if (visibleRect && (overflow.adjustX || overflow.adjustY) && isTgtRegionVisible) {
- if (overflow.adjustX) {
- // 如果横向不能放下
- if (isFailX(elFuturePos, elRegion, visibleRect)) {
- // 对齐位置反下
- var newPoints = flip(points, /[lr]/ig, {
- l: 'r',
- r: 'l'
- });
- // 偏移量也反下
- var newOffset = flipOffset(offset, 0);
- var newTargetOffset = flipOffset(targetOffset, 0);
- var newElFuturePos = Object(__WEBPACK_IMPORTED_MODULE_4__getElFuturePos__["a" /* default */])(elRegion, tgtRegion, newPoints, newOffset, newTargetOffset);
-
- if (!isCompleteFailX(newElFuturePos, elRegion, visibleRect)) {
- fail = 1;
- points = newPoints;
- offset = newOffset;
- targetOffset = newTargetOffset;
- }
- }
- }
-
- if (overflow.adjustY) {
- // 如果纵向不能放下
- if (isFailY(elFuturePos, elRegion, visibleRect)) {
- // 对齐位置反下
- var _newPoints = flip(points, /[tb]/ig, {
- t: 'b',
- b: 't'
- });
- // 偏移量也反下
- var _newOffset = flipOffset(offset, 1);
- var _newTargetOffset = flipOffset(targetOffset, 1);
- var _newElFuturePos = Object(__WEBPACK_IMPORTED_MODULE_4__getElFuturePos__["a" /* default */])(elRegion, tgtRegion, _newPoints, _newOffset, _newTargetOffset);
-
- if (!isCompleteFailY(_newElFuturePos, elRegion, visibleRect)) {
- fail = 1;
- points = _newPoints;
- offset = _newOffset;
- targetOffset = _newTargetOffset;
- }
- }
- }
-
- // 如果失败,重新计算当前节点将要被放置的位置
- if (fail) {
- elFuturePos = Object(__WEBPACK_IMPORTED_MODULE_4__getElFuturePos__["a" /* default */])(elRegion, tgtRegion, points, offset, targetOffset);
- __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].mix(newElRegion, elFuturePos);
- }
- var isStillFailX = isFailX(elFuturePos, elRegion, visibleRect);
- var isStillFailY = isFailY(elFuturePos, elRegion, visibleRect);
- // 检查反下后的位置是否可以放下了,如果仍然放不下:
- // 1. 复原修改过的定位参数
- if (isStillFailX || isStillFailY) {
- points = align.points;
- offset = align.offset || [0, 0];
- targetOffset = align.targetOffset || [0, 0];
- }
- // 2. 只有指定了可以调整当前方向才调整
- newOverflowCfg.adjustX = overflow.adjustX && isStillFailX;
- newOverflowCfg.adjustY = overflow.adjustY && isStillFailY;
-
- // 确实要调整,甚至可能会调整高度宽度
- if (newOverflowCfg.adjustX || newOverflowCfg.adjustY) {
- newElRegion = Object(__WEBPACK_IMPORTED_MODULE_2__adjustForViewport__["a" /* default */])(elFuturePos, elRegion, visibleRect, newOverflowCfg);
- }
- }
-
- // need judge to in case set fixed with in css on height auto element
- if (newElRegion.width !== elRegion.width) {
- __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].css(source, 'width', __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].width(source) + newElRegion.width - elRegion.width);
- }
-
- if (newElRegion.height !== elRegion.height) {
- __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].css(source, 'height', __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].height(source) + newElRegion.height - elRegion.height);
- }
-
- // https://github.com/kissyteam/kissy/issues/190
- // 相对于屏幕位置没变,而 left/top 变了
- // 例如
- __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].offset(source, {
- left: newElRegion.left,
- top: newElRegion.top
- }, {
- useCssRight: align.useCssRight,
- useCssBottom: align.useCssBottom,
- useCssTransform: align.useCssTransform,
- ignoreShake: align.ignoreShake
- });
-
- return {
- points: points,
- offset: offset,
- targetOffset: targetOffset,
- overflow: newOverflowCfg
- };
- }
-
- /* harmony default export */ __webpack_exports__["a"] = (doAlign);
- /**
- * 2012-04-26 yiminghe@gmail.com
- * - 优化智能对齐算法
- * - 慎用 resizeXX
- *
- * 2011-07-13 yiminghe@gmail.com note:
- * - 增加智能对齐,以及大小调整选项
- **/
-
- /***/ }),
- /* 191 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
-
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(30);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getOffsetParent__ = __webpack_require__(192);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isAncestorFixed__ = __webpack_require__(616);
-
-
-
-
- /**
- * 获得元素的显示部分的区域
- */
- function getVisibleRectForElement(element) {
- var visibleRect = {
- left: 0,
- right: Infinity,
- top: 0,
- bottom: Infinity
- };
- var el = Object(__WEBPACK_IMPORTED_MODULE_1__getOffsetParent__["a" /* default */])(element);
- var doc = __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].getDocument(element);
- var win = doc.defaultView || doc.parentWindow;
- var body = doc.body;
- var documentElement = doc.documentElement;
-
- // Determine the size of the visible rect by climbing the dom accounting for
- // all scrollable containers.
- while (el) {
- // clientWidth is zero for inline block elements in ie.
- if ((navigator.userAgent.indexOf('MSIE') === -1 || el.clientWidth !== 0) &&
- // body may have overflow set on it, yet we still get the entire
- // viewport. In some browsers, el.offsetParent may be
- // document.documentElement, so check for that too.
- el !== body && el !== documentElement && __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].css(el, 'overflow') !== 'visible') {
- var pos = __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].offset(el);
- // add border
- pos.left += el.clientLeft;
- pos.top += el.clientTop;
- visibleRect.top = Math.max(visibleRect.top, pos.top);
- visibleRect.right = Math.min(visibleRect.right,
- // consider area without scrollBar
- pos.left + el.clientWidth);
- visibleRect.bottom = Math.min(visibleRect.bottom, pos.top + el.clientHeight);
- visibleRect.left = Math.max(visibleRect.left, pos.left);
- } else if (el === body || el === documentElement) {
- break;
- }
- el = Object(__WEBPACK_IMPORTED_MODULE_1__getOffsetParent__["a" /* default */])(el);
- }
-
- // Set element position to fixed
- // make sure absolute element itself don't affect it's visible area
- // https://github.com/ant-design/ant-design/issues/7601
- var originalPosition = null;
- if (!__WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].isWindow(element) && element.nodeType !== 9) {
- originalPosition = element.style.position;
- var position = __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].css(element, 'position');
- if (position === 'absolute') {
- element.style.position = 'fixed';
- }
- }
-
- var scrollX = __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].getWindowScrollLeft(win);
- var scrollY = __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].getWindowScrollTop(win);
- var viewportWidth = __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].viewportWidth(win);
- var viewportHeight = __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].viewportHeight(win);
- var documentWidth = documentElement.scrollWidth;
- var documentHeight = documentElement.scrollHeight;
-
- // scrollXXX on html is sync with body which means overflow: hidden on body gets wrong scrollXXX.
- // We should cut this ourself.
- var bodyStyle = window.getComputedStyle(body);
- if (bodyStyle.overflowX === 'hidden') {
- documentWidth = win.innerWidth;
- }
- if (bodyStyle.overflowY === 'hidden') {
- documentHeight = win.innerHeight;
- }
-
- // Reset element position after calculate the visible area
- if (element.style) {
- element.style.position = originalPosition;
- }
-
- if (Object(__WEBPACK_IMPORTED_MODULE_2__isAncestorFixed__["a" /* default */])(element)) {
- // Clip by viewport's size.
- visibleRect.left = Math.max(visibleRect.left, scrollX);
- visibleRect.top = Math.max(visibleRect.top, scrollY);
- visibleRect.right = Math.min(visibleRect.right, scrollX + viewportWidth);
- visibleRect.bottom = Math.min(visibleRect.bottom, scrollY + viewportHeight);
- } else {
- // Clip by document's size.
- var maxVisibleWidth = Math.max(documentWidth, scrollX + viewportWidth);
- visibleRect.right = Math.min(visibleRect.right, maxVisibleWidth);
-
- var maxVisibleHeight = Math.max(documentHeight, scrollY + viewportHeight);
- visibleRect.bottom = Math.min(visibleRect.bottom, maxVisibleHeight);
- }
-
- return visibleRect.top >= 0 && visibleRect.left >= 0 && visibleRect.bottom > visibleRect.top && visibleRect.right > visibleRect.left ? visibleRect : null;
- }
-
- /* harmony default export */ __webpack_exports__["a"] = (getVisibleRectForElement);
-
- /***/ }),
- /* 192 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
-
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(30);
-
-
- /**
- * 得到会导致元素显示不全的祖先元素
- */
-
- function getOffsetParent(element) {
- if (__WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].isWindow(element) || element.nodeType === 9) {
- return null;
- }
- // ie 这个也不是完全可行
- /*
-
-
- 元素 6 高 100px 宽 50px
-
-
- */
- // element.offsetParent does the right thing in ie7 and below. Return parent with layout!
- // In other browsers it only includes elements with position absolute, relative or
- // fixed, not elements with overflow set to auto or scroll.
- // if (UA.ie && ieMode < 8) {
- // return element.offsetParent;
- // }
- // 统一的 offsetParent 方法
- var doc = __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].getDocument(element);
- var body = doc.body;
- var parent = void 0;
- var positionStyle = __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].css(element, 'position');
- var skipStatic = positionStyle === 'fixed' || positionStyle === 'absolute';
-
- if (!skipStatic) {
- return element.nodeName.toLowerCase() === 'html' ? null : element.parentNode;
- }
-
- for (parent = element.parentNode; parent && parent !== body; parent = parent.parentNode) {
- positionStyle = __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].css(parent, 'position');
- if (positionStyle !== 'static') {
- return parent;
- }
- }
- return null;
- }
-
- /* harmony default export */ __webpack_exports__["a"] = (getOffsetParent);
-
- /***/ }),
- /* 193 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
-
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils__ = __webpack_require__(30);
-
-
- function getRegion(node) {
- var offset = void 0;
- var w = void 0;
- var h = void 0;
- if (!__WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].isWindow(node) && node.nodeType !== 9) {
- offset = __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].offset(node);
- w = __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].outerWidth(node);
- h = __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].outerHeight(node);
- } else {
- var win = __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].getWindow(node);
- offset = {
- left: __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].getWindowScrollLeft(win),
- top: __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].getWindowScrollTop(win)
- };
- w = __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].viewportWidth(win);
- h = __WEBPACK_IMPORTED_MODULE_0__utils__["a" /* default */].viewportHeight(win);
- }
- offset.width = w;
- offset.height = h;
- return offset;
- }
-
- /* harmony default export */ __webpack_exports__["a"] = (getRegion);
-
- /***/ }),
- /* 194 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- var util = {
- isAppearSupported: function isAppearSupported(props) {
- return props.transitionName && props.transitionAppear || props.animation.appear;
- },
- isEnterSupported: function isEnterSupported(props) {
- return props.transitionName && props.transitionEnter || props.animation.enter;
- },
- isLeaveSupported: function isLeaveSupported(props) {
- return props.transitionName && props.transitionLeave || props.animation.leave;
- },
- allowAppearCallback: function allowAppearCallback(props) {
- return props.transitionAppear || props.animation.appear;
- },
- allowEnterCallback: function allowEnterCallback(props) {
- return props.transitionEnter || props.animation.enter;
- },
- allowLeaveCallback: function allowLeaveCallback(props) {
- return props.transitionLeave || props.animation.leave;
- }
- };
- exports["default"] = util;
- module.exports = exports["default"];
-
- /***/ }),
- /* 195 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
-
- "use strict";
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Menu__ = __webpack_require__(624);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__SubMenu__ = __webpack_require__(201);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__MenuItem__ = __webpack_require__(647);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__MenuItemGroup__ = __webpack_require__(650);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Divider__ = __webpack_require__(651);
- /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "SubMenu", function() { return __WEBPACK_IMPORTED_MODULE_1__SubMenu__["a"]; });
- /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Item", function() { return __WEBPACK_IMPORTED_MODULE_2__MenuItem__["a"]; });
- /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "MenuItem", function() { return __WEBPACK_IMPORTED_MODULE_2__MenuItem__["a"]; });
- /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "MenuItemGroup", function() { return __WEBPACK_IMPORTED_MODULE_3__MenuItemGroup__["a"]; });
- /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ItemGroup", function() { return __WEBPACK_IMPORTED_MODULE_3__MenuItemGroup__["a"]; });
- /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Divider", function() { return __WEBPACK_IMPORTED_MODULE_4__Divider__["a"]; });
-
-
-
-
-
-
-
-
- /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__Menu__["a" /* default */]);
-
- /***/ }),
- /* 196 */
- /***/ (function(module, exports, __webpack_require__) {
-
- __webpack_require__(630);
- var $Object = __webpack_require__(16).Object;
- module.exports = function create(P, D) {
- return $Object.create(P, D);
- };
-
-
- /***/ }),
- /* 197 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.storeShape = undefined;
-
- var _propTypes = __webpack_require__(1);
-
- var _propTypes2 = _interopRequireDefault(_propTypes);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
- var storeShape = exports.storeShape = _propTypes2.default.shape({
- subscribe: _propTypes2.default.func.isRequired,
- setState: _propTypes2.default.func.isRequired,
- getState: _propTypes2.default.func.isRequired
- });
-
- /***/ }),
- /* 198 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
-
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["b"] = getActiveKey;
- /* unused harmony export saveRef */
- /* unused harmony export SubPopupMenu */
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(14);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__ = __webpack_require__(6);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(7);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__ = __webpack_require__(8);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends__ = __webpack_require__(9);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(1);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_mini_store__ = __webpack_require__(17);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_mini_store___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_mini_store__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_rc_util_es_KeyCode__ = __webpack_require__(31);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_rc_util_es_createChainedFunction__ = __webpack_require__(199);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_classnames__ = __webpack_require__(2);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_classnames__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__util__ = __webpack_require__(48);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__DOMWrap__ = __webpack_require__(636);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- function allDisabled(arr) {
- if (!arr.length) {
- return true;
- }
- return arr.every(function (c) {
- return !!c.props.disabled;
- });
- }
-
- function updateActiveKey(store, menuId, activeKey) {
- var _extends2;
-
- var state = store.getState();
- store.setState({
- activeKey: __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default()({}, state.activeKey, (_extends2 = {}, _extends2[menuId] = activeKey, _extends2))
- });
- }
-
- function getEventKey(props) {
- // when eventKey not available ,it's menu and return menu id '0-menu-'
- return props.eventKey || '0-menu-';
- }
-
- function getActiveKey(props, originalActiveKey) {
- var activeKey = originalActiveKey;
- var children = props.children,
- eventKey = props.eventKey;
-
- if (activeKey) {
- var found = void 0;
- Object(__WEBPACK_IMPORTED_MODULE_11__util__["e" /* loopMenuItem */])(children, function (c, i) {
- if (c && c.props && !c.props.disabled && activeKey === Object(__WEBPACK_IMPORTED_MODULE_11__util__["a" /* getKeyFromChildrenIndex */])(c, eventKey, i)) {
- found = true;
- }
- });
- if (found) {
- return activeKey;
- }
- }
- activeKey = null;
- if (props.defaultActiveFirst) {
- Object(__WEBPACK_IMPORTED_MODULE_11__util__["e" /* loopMenuItem */])(children, function (c, i) {
- if (!activeKey && c && !c.props.disabled) {
- activeKey = Object(__WEBPACK_IMPORTED_MODULE_11__util__["a" /* getKeyFromChildrenIndex */])(c, eventKey, i);
- }
- });
- return activeKey;
- }
- return activeKey;
- }
-
- function saveRef(c) {
- if (c) {
- var index = this.instanceArray.indexOf(c);
- if (index !== -1) {
- // update component if it's already inside instanceArray
- this.instanceArray[index] = c;
- } else {
- // add component if it's not in instanceArray yet;
- this.instanceArray.push(c);
- }
- }
- }
-
- var SubPopupMenu = function (_React$Component) {
- __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default()(SubPopupMenu, _React$Component);
-
- function SubPopupMenu(props) {
- var _extends3;
-
- __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default()(this, SubPopupMenu);
-
- var _this = __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.call(this, props));
-
- _initialiseProps.call(_this);
-
- props.store.setState({
- activeKey: __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default()({}, props.store.getState().activeKey, (_extends3 = {}, _extends3[props.eventKey] = getActiveKey(props, props.activeKey), _extends3))
- });
-
- _this.instanceArray = [];
- return _this;
- }
-
- SubPopupMenu.prototype.componentDidMount = function componentDidMount() {
- // invoke customized ref to expose component to mixin
- if (this.props.manualRef) {
- this.props.manualRef(this);
- }
- };
-
- SubPopupMenu.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {
- return this.props.visible || nextProps.visible;
- };
-
- SubPopupMenu.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
- var props = this.props;
- var originalActiveKey = 'activeKey' in props ? props.activeKey : props.store.getState().activeKey[getEventKey(props)];
- var activeKey = getActiveKey(props, originalActiveKey);
- if (activeKey !== originalActiveKey) {
- updateActiveKey(props.store, getEventKey(props), activeKey);
- } else if ('activeKey' in prevProps) {
- // If prev activeKey is not same as current activeKey,
- // we should set it.
- var prevActiveKey = getActiveKey(prevProps, prevProps.activeKey);
- if (activeKey !== prevActiveKey) {
- updateActiveKey(props.store, getEventKey(props), activeKey);
- }
- }
- };
-
- // all keyboard events callbacks run from here at first
-
-
- SubPopupMenu.prototype.render = function render() {
- var _this2 = this;
-
- var props = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties___default()(this.props, []);
-
- this.instanceArray = [];
- var className = __WEBPACK_IMPORTED_MODULE_10_classnames___default()(props.prefixCls, props.className, props.prefixCls + '-' + props.mode);
- var domProps = {
- className: className,
- // role could be 'select' and by default set to menu
- role: props.role || 'menu'
- };
- if (props.id) {
- domProps.id = props.id;
- }
- if (props.focusable) {
- domProps.tabIndex = '0';
- domProps.onKeyDown = this.onKeyDown;
- }
- var prefixCls = props.prefixCls,
- eventKey = props.eventKey,
- visible = props.visible,
- level = props.level,
- mode = props.mode,
- overflowedIndicator = props.overflowedIndicator,
- theme = props.theme;
-
- __WEBPACK_IMPORTED_MODULE_11__util__["g" /* menuAllProps */].forEach(function (key) {
- return delete props[key];
- });
-
- // Otherwise, the propagated click event will trigger another onClick
- delete props.onClick;
-
- return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(
- __WEBPACK_IMPORTED_MODULE_12__DOMWrap__["a" /* default */],
- __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default()({}, props, {
- prefixCls: prefixCls,
- mode: mode,
- tag: 'ul',
- level: level,
- theme: theme,
- hiddenClassName: prefixCls + '-hidden',
- visible: visible,
- overflowedIndicator: overflowedIndicator
- }, domProps),
- __WEBPACK_IMPORTED_MODULE_5_react___default.a.Children.map(props.children, function (c, i) {
- return _this2.renderMenuItem(c, i, eventKey || '0-menu-');
- })
- );
- };
-
- return SubPopupMenu;
- }(__WEBPACK_IMPORTED_MODULE_5_react___default.a.Component);
- SubPopupMenu.propTypes = {
- onSelect: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- onClick: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- onDeselect: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- onOpenChange: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- onDestroy: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- openTransitionName: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
- openAnimation: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.object]),
- openKeys: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string),
- visible: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
- children: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
- parentMenu: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.object,
- eventKey: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
- store: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.shape({
- getState: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- setState: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func
- }),
-
- // adding in refactor
- focusable: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
- multiple: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
- style: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.object,
- defaultActiveFirst: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
- activeKey: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
- selectedKeys: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string),
- defaultSelectedKeys: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string),
- defaultOpenKeys: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string),
- level: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number,
- mode: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf(['horizontal', 'vertical', 'vertical-left', 'vertical-right', 'inline']),
- triggerSubMenuAction: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf(['click', 'hover']),
- inlineIndent: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string]),
- manualRef: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- itemIcon: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.node]),
- expandIcon: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.node])
- };
- SubPopupMenu.defaultProps = {
- prefixCls: 'rc-menu',
- className: '',
- mode: 'vertical',
- level: 1,
- inlineIndent: 24,
- visible: true,
- focusable: true,
- style: {},
- manualRef: __WEBPACK_IMPORTED_MODULE_11__util__["h" /* noop */]
- };
-
- var _initialiseProps = function _initialiseProps() {
- var _this3 = this;
-
- this.onKeyDown = function (e, callback) {
- var keyCode = e.keyCode;
- var handled = void 0;
- _this3.getFlatInstanceArray().forEach(function (obj) {
- if (obj && obj.props.active && obj.onKeyDown) {
- handled = obj.onKeyDown(e);
- }
- });
- if (handled) {
- return 1;
- }
- var activeItem = null;
- if (keyCode === __WEBPACK_IMPORTED_MODULE_8_rc_util_es_KeyCode__["a" /* default */].UP || keyCode === __WEBPACK_IMPORTED_MODULE_8_rc_util_es_KeyCode__["a" /* default */].DOWN) {
- activeItem = _this3.step(keyCode === __WEBPACK_IMPORTED_MODULE_8_rc_util_es_KeyCode__["a" /* default */].UP ? -1 : 1);
- }
- if (activeItem) {
- e.preventDefault();
- updateActiveKey(_this3.props.store, getEventKey(_this3.props), activeItem.props.eventKey);
-
- if (typeof callback === 'function') {
- callback(activeItem);
- }
-
- return 1;
- }
- };
-
- this.onItemHover = function (e) {
- var key = e.key,
- hover = e.hover;
-
- updateActiveKey(_this3.props.store, getEventKey(_this3.props), hover ? key : null);
- };
-
- this.onDeselect = function (selectInfo) {
- _this3.props.onDeselect(selectInfo);
- };
-
- this.onSelect = function (selectInfo) {
- _this3.props.onSelect(selectInfo);
- };
-
- this.onClick = function (e) {
- _this3.props.onClick(e);
- };
-
- this.onOpenChange = function (e) {
- _this3.props.onOpenChange(e);
- };
-
- this.onDestroy = function (key) {
- /* istanbul ignore next */
- _this3.props.onDestroy(key);
- };
-
- this.getFlatInstanceArray = function () {
- return _this3.instanceArray;
- };
-
- this.getOpenTransitionName = function () {
- return _this3.props.openTransitionName;
- };
-
- this.step = function (direction) {
- var children = _this3.getFlatInstanceArray();
- var activeKey = _this3.props.store.getState().activeKey[getEventKey(_this3.props)];
- var len = children.length;
- if (!len) {
- return null;
- }
- if (direction < 0) {
- children = children.concat().reverse();
- }
- // find current activeIndex
- var activeIndex = -1;
- children.every(function (c, ci) {
- if (c && c.props.eventKey === activeKey) {
- activeIndex = ci;
- return false;
- }
- return true;
- });
- if (!_this3.props.defaultActiveFirst && activeIndex !== -1 && allDisabled(children.slice(activeIndex, len - 1))) {
- return undefined;
- }
- var start = (activeIndex + 1) % len;
- var i = start;
-
- do {
- var child = children[i];
- if (!child || child.props.disabled) {
- i = (i + 1) % len;
- } else {
- return child;
- }
- } while (i !== start);
-
- return null;
- };
-
- this.renderCommonMenuItem = function (child, i, extraProps) {
- var state = _this3.props.store.getState();
- var props = _this3.props;
- var key = Object(__WEBPACK_IMPORTED_MODULE_11__util__["a" /* getKeyFromChildrenIndex */])(child, props.eventKey, i);
- var childProps = child.props;
- // https://github.com/ant-design/ant-design/issues/11517#issuecomment-477403055
- if (!childProps || typeof child.type === 'string') {
- return child;
- }
- var isActive = key === state.activeKey;
- var newChildProps = __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default()({
- mode: childProps.mode || props.mode,
- level: props.level,
- inlineIndent: props.inlineIndent,
- renderMenuItem: _this3.renderMenuItem,
- rootPrefixCls: props.prefixCls,
- index: i,
- parentMenu: props.parentMenu,
- // customized ref function, need to be invoked manually in child's componentDidMount
- manualRef: childProps.disabled ? undefined : Object(__WEBPACK_IMPORTED_MODULE_9_rc_util_es_createChainedFunction__["a" /* default */])(child.ref, saveRef.bind(_this3)),
- eventKey: key,
- active: !childProps.disabled && isActive,
- multiple: props.multiple,
- onClick: function onClick(e) {
- (childProps.onClick || __WEBPACK_IMPORTED_MODULE_11__util__["h" /* noop */])(e);
- _this3.onClick(e);
- },
- onItemHover: _this3.onItemHover,
- openTransitionName: _this3.getOpenTransitionName(),
- openAnimation: props.openAnimation,
- subMenuOpenDelay: props.subMenuOpenDelay,
- subMenuCloseDelay: props.subMenuCloseDelay,
- forceSubMenuRender: props.forceSubMenuRender,
- onOpenChange: _this3.onOpenChange,
- onDeselect: _this3.onDeselect,
- onSelect: _this3.onSelect,
- builtinPlacements: props.builtinPlacements,
- itemIcon: childProps.itemIcon || _this3.props.itemIcon,
- expandIcon: childProps.expandIcon || _this3.props.expandIcon
- }, extraProps);
- // ref: https://github.com/ant-design/ant-design/issues/13943
- if (props.mode === 'inline' || Object(__WEBPACK_IMPORTED_MODULE_11__util__["d" /* isMobileDevice */])()) {
- newChildProps.triggerSubMenuAction = 'click';
- }
- return __WEBPACK_IMPORTED_MODULE_5_react___default.a.cloneElement(child, newChildProps);
- };
-
- this.renderMenuItem = function (c, i, subMenuKey) {
- /* istanbul ignore if */
- if (!c) {
- return null;
- }
- var state = _this3.props.store.getState();
- var extraProps = {
- openKeys: state.openKeys,
- selectedKeys: state.selectedKeys,
- triggerSubMenuAction: _this3.props.triggerSubMenuAction,
- subMenuKey: subMenuKey
- };
- return _this3.renderCommonMenuItem(c, i, extraProps);
- };
- };
-
- var connected = Object(__WEBPACK_IMPORTED_MODULE_7_mini_store__["connect"])()(SubPopupMenu);
-
- /* harmony default export */ __webpack_exports__["a"] = (connected);
-
- /***/ }),
- /* 199 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
-
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["a"] = createChainedFunction;
- /**
- * Safe chained function
- *
- * Will only create a new function if needed,
- * otherwise will pass back existing functions or null.
- *
- * @returns {function|null}
- */
- function createChainedFunction() {
- var args = [].slice.call(arguments, 0);
- if (args.length === 1) {
- return args[0];
- }
-
- return function chainedFunction() {
- for (var i = 0; i < args.length; i++) {
- if (args[i] && args[i].apply) {
- args[i].apply(this, arguments);
- }
- }
- };
- }
-
- /***/ }),
- /* 200 */
- /***/ (function(module, exports, __webpack_require__) {
-
- var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!function(e){var n=/iPhone/i,t=/iPod/i,r=/iPad/i,a=/\bAndroid(?:.+)Mobile\b/i,p=/Android/i,l=/\bAndroid(?:.+)SD4930UR\b/i,b=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,f=/Windows Phone/i,u=/\bWindows(?:.+)ARM\b/i,c=/BlackBerry/i,s=/BB10/i,v=/Opera Mini/i,h=/\b(CriOS|Chrome)(?:.+)Mobile/i,w=/\Mobile(?:.+)Firefox\b/i;function m(e,i){return e.test(i)}function i(e){var i=e||("undefined"!=typeof navigator?navigator.userAgent:""),o=i.split("[FBAN");void 0!==o[1]&&(i=o[0]),void 0!==(o=i.split("Twitter"))[1]&&(i=o[0]);var d={apple:{phone:m(n,i)&&!m(f,i),ipod:m(t,i),tablet:!m(n,i)&&m(r,i)&&!m(f,i),device:(m(n,i)||m(t,i)||m(r,i))&&!m(f,i)},amazon:{phone:m(l,i),tablet:!m(l,i)&&m(b,i),device:m(l,i)||m(b,i)},android:{phone:!m(f,i)&&m(l,i)||!m(f,i)&&m(a,i),tablet:!m(f,i)&&!m(l,i)&&!m(a,i)&&(m(b,i)||m(p,i)),device:!m(f,i)&&(m(l,i)||m(b,i)||m(a,i)||m(p,i))},windows:{phone:m(f,i),tablet:m(u,i),device:m(f,i)||m(u,i)},other:{blackberry:m(c,i),blackberry10:m(s,i),opera:m(v,i),firefox:m(w,i),chrome:m(h,i),device:m(c,i)||m(s,i)||m(v,i)||m(w,i)||m(h,i)}};return d.any=d.apple.device||d.android.device||d.windows.device||d.other.device,d.phone=d.apple.phone||d.android.phone||d.windows.phone,d.tablet=d.apple.tablet||d.android.tablet||d.windows.tablet,d}"undefined"!=typeof module&&module.exports&&"undefined"==typeof window?module.exports=i:"undefined"!=typeof module&&module.exports&&"undefined"!=typeof window?module.exports=i(): true?!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (e.isMobile=i()),
- __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
- (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)):e.isMobile=i()}(this);
-
- /***/ }),
- /* 201 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -108036,16 +84118,16 @@
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react_dom__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(1);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_rc_trigger__ = __webpack_require__(637);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_rc_util_es_KeyCode__ = __webpack_require__(31);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_classnames__ = __webpack_require__(2);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_rc_trigger__ = __webpack_require__(577);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_rc_util_es_KeyCode__ = __webpack_require__(74);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_classnames__ = __webpack_require__(3);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_classnames__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_mini_store__ = __webpack_require__(17);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_mini_store__ = __webpack_require__(26);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_mini_store___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_mini_store__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__SubPopupMenu__ = __webpack_require__(198);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__placements__ = __webpack_require__(646);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_rc_animate__ = __webpack_require__(25);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__util__ = __webpack_require__(48);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__SubPopupMenu__ = __webpack_require__(168);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__placements__ = __webpack_require__(586);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_rc_animate__ = __webpack_require__(46);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__util__ = __webpack_require__(45);
@@ -108199,7 +84281,7 @@
// don't show transition on first rendering (no animation for opened menu)
// show appear transition if it's not visible (not sure why)
// show appear transition if it's not inline mode
- var transitionAppear = haveRendered || !baseProps.visible || baseProps.mode !== 'inline';
+ var transitionAppear = haveRendered || !baseProps.visible || !baseProps.mode === 'inline';
baseProps.className = ' ' + baseProps.prefixCls + '-sub';
var animProps = {};
@@ -108644,7 +84726,7 @@
/* harmony default export */ __webpack_exports__["a"] = (connected);
/***/ }),
- /* 202 */
+ /* 171 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -108683,7 +84765,7 @@
}
/***/ }),
- /* 203 */
+ /* 172 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -108710,11 +84792,11 @@
/* harmony default export */ __webpack_exports__["a"] = (util);
/***/ }),
- /* 204 */
+ /* 173 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(14);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(20);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__ = __webpack_require__(6);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__);
@@ -108776,7 +84858,31 @@
/* harmony default export */ __webpack_exports__["a"] = (LazyRenderBox);
/***/ }),
- /* 205 */
+ /* 174 */
+ /***/ (function(module, exports) {
+
+ // mutationobserver-shim v0.3.2 (github.com/megawac/MutationObserver.js)
+ // Authors: Graeme Yeates (github.com/megawac)
+ window.MutationObserver=window.MutationObserver||function(w){function v(a){this.i=[];this.m=a}function I(a){(function c(){var d=a.takeRecords();d.length&&a.m(d,a);a.h=setTimeout(c,v._period)})()}function p(a){var b={type:null,target:null,addedNodes:[],removedNodes:[],previousSibling:null,nextSibling:null,attributeName:null,attributeNamespace:null,oldValue:null},c;for(c in a)b[c]!==w&&a[c]!==w&&(b[c]=a[c]);return b}function J(a,b){var c=C(a,b);return function(d){var f=d.length,n;b.a&&3===a.nodeType&&
+ a.nodeValue!==c.a&&d.push(new p({type:"characterData",target:a,oldValue:c.a}));b.b&&c.b&&A(d,a,c.b,b.f);if(b.c||b.g)n=K(d,a,c,b);if(n||d.length!==f)c=C(a,b)}}function L(a,b){return b.value}function M(a,b){return"style"!==b.name?b.value:a.style.cssText}function A(a,b,c,d){for(var f={},n=b.attributes,k,g,x=n.length;x--;)k=n[x],g=k.name,d&&d[g]===w||(D(b,k)!==c[g]&&a.push(p({type:"attributes",target:b,attributeName:g,oldValue:c[g],attributeNamespace:k.namespaceURI})),f[g]=!0);for(g in c)f[g]||a.push(p({target:b,
+ type:"attributes",attributeName:g,oldValue:c[g]}))}function K(a,b,c,d){function f(b,c,f,k,y){var g=b.length-1;y=-~((g-y)/2);for(var h,l,e;e=b.pop();)h=f[e.j],l=k[e.l],d.c&&y&&Math.abs(e.j-e.l)>=g&&(a.push(p({type:"childList",target:c,addedNodes:[h],removedNodes:[h],nextSibling:h.nextSibling,previousSibling:h.previousSibling})),y--),d.b&&l.b&&A(a,h,l.b,d.f),d.a&&3===h.nodeType&&h.nodeValue!==l.a&&a.push(p({type:"characterData",target:h,oldValue:l.a})),d.g&&n(h,l)}function n(b,c){for(var g=b.childNodes,
+ q=c.c,x=g.length,v=q?q.length:0,h,l,e,m,t,z=0,u=0,r=0;u= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
-
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
-
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
-
- var propTypes = _extends({}, _Modal2["default"].propTypes, _ModalDialog2["default"].propTypes, (_extends2 = {
-
- /**
- * 是否弹出遮罩层/遮罩层点击是否触发关闭
- */
- backdrop: _propTypes2["default"].oneOf(['static', true, false]),
-
- /**
- * 点击遮罩层是否允许关闭
- */
- backdropClosable: _propTypes2["default"].bool,
- /**
- * esc触发关闭
- */
- keyboard: _propTypes2["default"].bool,
-
- /**
- * 显隐时是否使用动画
- */
- animation: _propTypes2["default"].bool,
-
- /**
- * 传递给模态框的样式
- */
- dialogComponentClass: _tinperBeeCore.elementType,
-
- /**
- * 自动设置焦点
- */
- autoFocus: _propTypes2["default"].bool,
-
- /**
- * 防止打开时焦点离开模态框
- */
- enforceFocus: _propTypes2["default"].bool,
-
- /**
- * 是否打开模态框
- */
- show: _propTypes2["default"].bool,
-
- /**
- * 关闭时的钩子函数
- */
- onHide: _propTypes2["default"].func,
-
- onEnter: _propTypes2["default"].func,
-
- onEntering: _propTypes2["default"].func,
-
- onEntered: _propTypes2["default"].func,
-
- onExit: _propTypes2["default"].func,
-
- onExiting: _propTypes2["default"].func,
-
- onExited: _propTypes2["default"].func,
-
- containerClassName: _propTypes2["default"].string
- }, _defineProperty(_extends2, 'containerClassName', _propTypes2["default"].string), _defineProperty(_extends2, 'container', _Modal2["default"].propTypes.container), _defineProperty(_extends2, 'size', _propTypes2["default"].oneOf(["sm", "lg", "xlg", ""])), _defineProperty(_extends2, 'width', _propTypes2["default"].oneOfType([_propTypes2["default"].number, _propTypes2["default"].string])), _defineProperty(_extends2, 'draggable', _propTypes2["default"].bool), _extends2));
-
- var defaultProps = _extends({}, _Modal2["default"].defaultProps, {
- backdropClosable: true,
- animation: true,
- dialogComponentClass: _ModalDialog2["default"],
- draggable: false,
- clsPrefix: 'u-modal'
- });
-
- var ModalFuncProps = {
- prefixCls: _propTypes2["default"].string,
- className: _propTypes2["default"].string,
- show: _propTypes2["default"].bool,
- title: _react2["default"].ReactNode,
- content: _react2["default"].ReactNode,
- onOk: _propTypes2["default"].func,
- onCancel: _propTypes2["default"].func,
- width: _propTypes2["default"].oneOfType([_propTypes2["default"].number, _propTypes2["default"].string]),
- okText: _propTypes2["default"].string,
- okType: _propTypes2["default"].string,
- cancelText: _propTypes2["default"].string,
- icon: _react2["default"].ReactNode,
- backdrop: _propTypes2["default"].oneOf(['static', true, false])
- };
-
- var ModalFunc = function ModalFunc(props) {
- destroy = function destroy() {};
- update = function update(newConfig) {};
- };
-
- var destroyFns = exports.destroyFns = [];
-
- var childContextTypes = {
- $u_modal: _propTypes2["default"].shape({
- onHide: _propTypes2["default"].func
- })
- };
-
- var Modal = function (_React$Component) {
- _inherits(Modal, _React$Component);
-
- function Modal(props, context) {
- _classCallCheck(this, Modal);
-
- var _this = _possibleConstructorReturn(this, _React$Component.call(this, props, context));
-
- _this.handleEntering = _this.handleEntering.bind(_this);
- _this.handleExited = _this.handleExited.bind(_this);
- _this.handleWindowResize = _this.handleWindowResize.bind(_this);
- _this.handleDialogClick = _this.handleDialogClick.bind(_this);
-
- _this.state = {
- style: {}
- };
- return _this;
- }
-
- Modal.prototype.getChildContext = function getChildContext() {
- return {
- $u_modal: {
- onHide: this.props.onHide
- }
- };
- };
-
- Modal.prototype.componentWillUnmount = function componentWillUnmount() {
- // Clean up the listener if we need to.
- this.handleExited();
- };
-
- Modal.prototype.handleEntering = function handleEntering() {
- // FIXME: This should work even when animation is disabled.
- _events2["default"].on(window, 'resize', this.handleWindowResize);
- this.updateStyle();
- };
-
- Modal.prototype.handleExited = function handleExited() {
- // FIXME: This should work even when animation is disabled.
- _events2["default"].off(window, 'resize', this.handleWindowResize);
- };
-
- Modal.prototype.handleWindowResize = function handleWindowResize() {
- this.updateStyle();
- };
-
- Modal.prototype.handleDialogClick = function handleDialogClick(e) {
- if (e.target !== e.currentTarget) {
- return;
- }
-
- this.props.onHide();
- };
-
- Modal.prototype.updateStyle = function updateStyle() {
- if (!_inDOM2["default"] || !this._modal) {
- return;
- }
-
- var dialogNode = this._modal.getDialogElement();
- var dialogHeight = dialogNode.scrollHeight;
-
- var document = (0, _ownerDocument2["default"])(dialogNode);
- var bodyIsOverflowing = (0, _isOverflowing2["default"])(_reactDom2["default"].findDOMNode(this.props.container || document.body));
- var modalIsOverflowing = dialogHeight > document.documentElement.clientHeight;
-
- this.setState({
- style: {
- paddingRight: bodyIsOverflowing && !modalIsOverflowing ? (0, _scrollbarSize2["default"])() : undefined,
- paddingLeft: !bodyIsOverflowing && modalIsOverflowing ? (0, _scrollbarSize2["default"])() : undefined
- }
- });
- };
-
- Modal.prototype.render = function render() {
- var _this2 = this;
-
- var _props = this.props,
- backdrop = _props.backdrop,
- backdropClosable = _props.backdropClosable,
- animation = _props.animation,
- show = _props.show,
- Dialog = _props.dialogComponentClass,
- className = _props.className,
- clsPrefix = _props.clsPrefix,
- _props$style = _props.style,
- style = _props$style === undefined ? {} : _props$style,
- size = _props.size,
- width = _props.width,
- children = _props.children,
- onEntering = _props.onEntering,
- onExited = _props.onExited,
- backdropClassName = _props.backdropClassName,
- containerClassName = _props.containerClassName,
- draggable = _props.draggable,
- props = _objectWithoutProperties(_props, ['backdrop', 'backdropClosable', 'animation', 'show', 'dialogComponentClass', 'className', 'clsPrefix', 'style', 'size', 'width', 'children', 'onEntering', 'onExited', 'backdropClassName', 'containerClassName', 'draggable']);
-
- var _splitComponent = (0, _tinperBeeCore.splitComponent)(props, _Modal2["default"]),
- _splitComponent2 = _slicedToArray(_splitComponent, 2),
- baseModalProps = _splitComponent2[0],
- dialogProps = _splitComponent2[1];
-
- var inClassName = show && !animation && 'in';
-
- var backdropClasses = _defineProperty({}, clsPrefix + '-backdrop', true);
- var containerClasses = _defineProperty({}, clsPrefix + '-open', true);
- if (Number(width)) width += 'px';
-
- var styleRes = _extends({}, this.state.style, style);
- if (width) {
- _extends(styleRes, { width: width });
- }
- return _react2["default"].createElement(
- _Modal2["default"],
- _extends({}, baseModalProps, {
- ref: function ref(c) {
- _this2._modal = c;
- },
- show: show,
- onEntering: (0, _tinperBeeCore.createChainedFunction)(onEntering, this.handleEntering),
- onExited: (0, _tinperBeeCore.createChainedFunction)(onExited, this.handleExited),
- backdrop: backdrop,
- backdropClassName: (0, _classnames2["default"])(backdropClasses, inClassName),
- containerClassName: (0, _classnames2["default"])(containerClasses, containerClassName),
- transition: animation ? _beeTransition.Fade : undefined,
- dialogTransitionTimeout: Modal.TRANSITION_DURATION,
- backdropTransitionTimeout: Modal.BACKDROP_TRANSITION_DURATION
- }),
- _react2["default"].createElement(
- Dialog,
- _extends({}, dialogProps, {
- style: styleRes,
- className: (0, _classnames2["default"])(className, inClassName, backdropClassName),
- onClick: backdrop === true && !!backdropClosable ? this.handleDialogClick : null,
- size: size,
- draggable: draggable
- }),
- children
- )
- );
- };
-
- return Modal;
- }(_react2["default"].Component);
-
- Modal.info = ModalFunc;
- Modal.success = ModalFunc;
- Modal.error = ModalFunc;
- Modal.warn = ModalFunc;
- Modal.warning = ModalFunc;
- Modal.confirm = ModalFunc;
-
- Modal.destroyAll = function () {
- return;
- };
-
- Modal.propTypes = propTypes;
- Modal.defaultProps = defaultProps;
- Modal.childContextTypes = childContextTypes;
-
- Modal.Body = _ModalBody2["default"];
- Modal.Header = _ModalHeader2["default"];
- Modal.Title = _ModalTitle2["default"];
- Modal.Footer = _ModalFooter2["default"];
-
- Modal.Dialog = _ModalDialog2["default"];
-
- Modal.TRANSITION_DURATION = 200000;
- Modal.BACKDROP_TRANSITION_DURATION = 10000;
-
- exports["default"] = Modal;
-
- /***/ }),
- /* 233 */
+ /* 200 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -112057,7 +87672,7 @@
value: true
});
- var _inDOM = __webpack_require__(34);
+ var _inDOM = __webpack_require__(36);
var _inDOM2 = _interopRequireDefault(_inDOM);
@@ -112078,7 +87693,552 @@
module.exports = exports['default'];
/***/ }),
- /* 234 */
+ /* 201 */
+ /***/ (function(module, exports, __webpack_require__) {
+
+ "use strict";
+
+
+ Object.defineProperty(exports, "__esModule", {
+ value: true
+ });
+
+ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; /*eslint-disable react/prop-types */
+
+
+ var _react = __webpack_require__(0);
+
+ var _react2 = _interopRequireDefault(_react);
+
+ var _propTypes = __webpack_require__(1);
+
+ var _propTypes2 = _interopRequireDefault(_propTypes);
+
+ var _warning = __webpack_require__(18);
+
+ var _warning2 = _interopRequireDefault(_warning);
+
+ var _tinperBeeCore = __webpack_require__(5);
+
+ var _Portal = __webpack_require__(48);
+
+ var _Portal2 = _interopRequireDefault(_Portal);
+
+ var _ModalManager = __webpack_require__(762);
+
+ var _ModalManager2 = _interopRequireDefault(_ModalManager);
+
+ var _ownerDocument = __webpack_require__(49);
+
+ var _ownerDocument2 = _interopRequireDefault(_ownerDocument);
+
+ var _addEventListener = __webpack_require__(78);
+
+ var _addEventListener2 = _interopRequireDefault(_addEventListener);
+
+ var _addFocusListener = __webpack_require__(768);
+
+ var _addFocusListener2 = _interopRequireDefault(_addFocusListener);
+
+ var _inDOM = __webpack_require__(34);
+
+ var _inDOM2 = _interopRequireDefault(_inDOM);
+
+ var _activeElement = __webpack_require__(769);
+
+ var _activeElement2 = _interopRequireDefault(_activeElement);
+
+ var _contains = __webpack_require__(47);
+
+ var _contains2 = _interopRequireDefault(_contains);
+
+ var _getContainer = __webpack_require__(112);
+
+ var _getContainer2 = _interopRequireDefault(_getContainer);
+
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+ function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
+
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+ function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
+
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
+
+ var modalManager = new _ModalManager2["default"]();
+
+ /**
+ * 模态框
+ */
+
+ var propTypes = _extends({}, _Portal2["default"].propTypes, {
+
+ /**
+ * 是否显示
+ */
+ show: _propTypes2["default"].bool,
+
+ /**
+ * 容器
+ */
+ container: _propTypes2["default"].oneOfType([_tinperBeeCore.componentOrElement, _propTypes2["default"].func]),
+
+ /**
+ * 当模态框打开时的钩子函数
+ */
+ onShow: _propTypes2["default"].func,
+
+ /**
+ * 当show参数为false时触发的模态框关闭时的钩子函数
+ */
+ onHide: _propTypes2["default"].func,
+
+ /**
+ * 是否包含背景
+ */
+ backdrop: _propTypes2["default"].oneOfType([_propTypes2["default"].bool, _propTypes2["default"].oneOf(['static'])]),
+
+ /**
+ *返回背景组件的函数
+ */
+ renderBackdrop: _propTypes2["default"].func,
+
+ /**
+ * 设置esc键特殊钩子函数
+ */
+ onEscapeKeyUp: _propTypes2["default"].func,
+
+ /**
+ * 当点击背景时触发的函数
+ */
+ onBackdropClick: _propTypes2["default"].func,
+
+ /**
+ * 背景的style
+ */
+ backdropStyle: _propTypes2["default"].object,
+
+ /**
+ * 背景的class
+ */
+ backdropClassName: _propTypes2["default"].string,
+
+ /**
+ *容器的class
+ */
+ containerClassName: _propTypes2["default"].string,
+
+ /**
+ * 按esc键是否关闭模态框
+ */
+ keyboard: _propTypes2["default"].bool,
+
+ /**
+ * 动画组件
+ */
+ transition: _tinperBeeCore.elementType,
+
+ /**
+ * 设置动画超时时间
+ */
+ dialogTransitionTimeout: _propTypes2["default"].number,
+
+ /**
+ * 设置背景动画超时时间
+ */
+ backdropTransitionTimeout: _propTypes2["default"].number,
+
+ /**
+ * 是否自动设置焦点
+ */
+ autoFocus: _propTypes2["default"].bool,
+
+ /**
+ * 防止焦点离开模态框
+ */
+ enforceFocus: _propTypes2["default"].bool,
+
+ /**
+ * 模态框进入时的钩子函数
+ */
+ onEnter: _propTypes2["default"].func,
+
+ /**
+ * 模态框开始进入时的钩子函数
+ */
+ onEntering: _propTypes2["default"].func,
+
+ /**
+ * 模态框进入后的钩子函数
+ */
+ onEntered: _propTypes2["default"].func,
+
+ /**
+ * 模态框退出时的钩子函数
+ */
+ onExit: _propTypes2["default"].func,
+
+ /**
+ * 模态框开始退出时的钩子函数
+ */
+ onExiting: _propTypes2["default"].func,
+
+ /**
+ * 模态框推出后的钩子函数
+ */
+ onExited: _propTypes2["default"].func,
+
+ /**
+ *管理model状态的实例
+ */
+ manager: _propTypes2["default"].object.isRequired
+ });
+
+ var defaultProps = {
+ show: false,
+ backdrop: true,
+ keyboard: true,
+ autoFocus: true,
+ enforceFocus: true,
+ onHide: function onHide() {},
+ manager: modalManager,
+ renderBackdrop: function renderBackdrop(props) {
+ return _react2["default"].createElement('div', props);
+ }
+ };
+
+ var BaseModal = function (_Component) {
+ _inherits(BaseModal, _Component);
+
+ function BaseModal(props, content) {
+ _classCallCheck(this, BaseModal);
+
+ var _this = _possibleConstructorReturn(this, _Component.call(this, props));
+
+ _this.state = {
+ exited: !_this.props.show
+ };
+
+ _this.onShow = _this.onShow.bind(_this);
+ _this.onHide = _this.onHide.bind(_this);
+ _this.setMountNode = _this.setMountNode.bind(_this);
+ _this.handleHidden = _this.handleHidden.bind(_this);
+ _this.handleBackdropClick = _this.handleBackdropClick.bind(_this);
+ _this.handleDocumentKeyUp = _this.handleDocumentKeyUp.bind(_this);
+ _this.checkForFocus = _this.checkForFocus.bind(_this);
+ _this.focus = _this.focus.bind(_this);
+ _this.restoreLastFocus = _this.restoreLastFocus.bind(_this);
+ _this.enforceFocus = _this.enforceFocus.bind(_this);
+ _this.getDialogElement = _this.getDialogElement.bind(_this);
+ _this.isTopModal = _this.isTopModal.bind(_this);
+ _this.renderBackdrop = _this.renderBackdrop.bind(_this);
+ return _this;
+ }
+
+ BaseModal.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
+ if (nextProps.show) {
+ this.setState({ exited: false });
+ } else if (!nextProps.transition) {
+ // Otherwise let handleHidden take care of marking exited.
+ this.setState({ exited: true });
+ }
+ };
+
+ BaseModal.prototype.componentWillUpdate = function componentWillUpdate(nextProps) {
+ if (!this.props.show && nextProps.show) {
+ this.checkForFocus();
+ }
+ };
+
+ BaseModal.prototype.componentDidMount = function componentDidMount() {
+ if (this.props.show) {
+ this.onShow();
+ }
+ this.mounted = true;
+ };
+
+ BaseModal.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
+ var transition = this.props.transition;
+
+
+ if (prevProps.show && !this.props.show && !transition) {
+ // Otherwise handleHidden will call this.
+ this.onHide();
+ } else if (!prevProps.show && this.props.show) {
+ this.onShow();
+ }
+ };
+
+ BaseModal.prototype.componentWillUnmount = function componentWillUnmount() {
+ var _props = this.props,
+ show = _props.show,
+ transition = _props.transition;
+
+
+ if (show || transition && !this.state.exited) {
+ this.onHide();
+ }
+
+ this.mounted = false;
+ };
+
+ BaseModal.prototype.onShow = function onShow() {
+ var doc = (0, _ownerDocument2["default"])(this);
+ var container = (0, _getContainer2["default"])(this.props.container, doc.body);
+
+ this.props.manager.add(this, container, this.props.containerClassName);
+
+ this._onDocumentKeyupListener = (0, _addEventListener2["default"])(doc, 'keyup', this.handleDocumentKeyUp);
+
+ this._onFocusinListener = (0, _addFocusListener2["default"])(this.enforceFocus);
+
+ this.focus();
+
+ if (this.props.onShow) {
+ this.props.onShow();
+ }
+ };
+
+ BaseModal.prototype.onHide = function onHide() {
+ this.props.manager.remove(this);
+
+ this._onDocumentKeyupListener.remove();
+
+ this._onFocusinListener.remove();
+
+ this.restoreLastFocus();
+ };
+
+ BaseModal.prototype.setMountNode = function setMountNode(ref) {
+ this.mountNode = ref ? ref.getMountNode() : ref;
+ };
+
+ BaseModal.prototype.handleHidden = function handleHidden() {
+ this.setState({ exited: true });
+ this.onHide();
+
+ if (this.props.onExited) {
+ var _props2;
+
+ (_props2 = this.props).onExited.apply(_props2, arguments);
+ }
+ };
+
+ BaseModal.prototype.handleBackdropClick = function handleBackdropClick(e) {
+ if (e.target !== e.currentTarget) {
+ return;
+ }
+
+ if (this.props.onBackdropClick) {
+ this.props.onBackdropClick(e);
+ }
+
+ if (this.props.backdrop === true) {
+ this.props.onHide();
+ }
+ };
+
+ BaseModal.prototype.handleDocumentKeyUp = function handleDocumentKeyUp(e) {
+ if (this.props.keyboard && e.keyCode === 27 && this.isTopModal()) {
+ if (this.props.onEscapeKeyUp) {
+ this.props.onEscapeKeyUp(e);
+ }
+ this.props.onHide();
+ }
+ };
+
+ BaseModal.prototype.checkForFocus = function checkForFocus() {
+ if (_inDOM2["default"]) {
+ this.lastFocus = (0, _activeElement2["default"])();
+ }
+ };
+
+ BaseModal.prototype.focus = function focus() {
+ var autoFocus = this.props.autoFocus;
+ var modalContent = this.getDialogElement();
+ var current = (0, _activeElement2["default"])((0, _ownerDocument2["default"])(this));
+ var focusInModal = current && (0, _contains2["default"])(modalContent, current);
+
+ if (modalContent && autoFocus && !focusInModal) {
+ this.lastFocus = current;
+
+ if (!modalContent.hasAttribute('tabIndex')) {
+ modalContent.setAttribute('tabIndex', -1);
+ (0, _warning2["default"])(false, 'The modal content node does not accept focus. ' + 'For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".');
+ }
+
+ modalContent.focus();
+ }
+ };
+
+ BaseModal.prototype.restoreLastFocus = function restoreLastFocus() {
+ // Support: <=IE11 doesn't support `focus()` on svg elements (RB: #917)
+ if (this.lastFocus && this.lastFocus.focus) {
+ this.lastFocus.focus();
+ this.lastFocus = null;
+ }
+ };
+
+ BaseModal.prototype.enforceFocus = function enforceFocus() {
+ var enforceFocus = this.props.enforceFocus;
+
+
+ if (!enforceFocus || !this.mounted || !this.isTopModal()) {
+ return;
+ }
+
+ var active = (0, _activeElement2["default"])((0, _ownerDocument2["default"])(this));
+ var modal = this.getDialogElement();
+
+ if (modal && modal !== active && !(0, _contains2["default"])(modal, active)) {
+ modal.focus();
+ }
+ };
+
+ //instead of a ref, which might conflict with one the parent applied.
+
+
+ BaseModal.prototype.getDialogElement = function getDialogElement() {
+ var node = this.refs.modal;
+ return node && node.lastChild;
+ };
+
+ BaseModal.prototype.isTopModal = function isTopModal() {
+ return this.props.manager.isTopModal(this);
+ };
+
+ BaseModal.prototype.renderBackdrop = function renderBackdrop() {
+ var _this2 = this;
+
+ var _props3 = this.props,
+ backdropStyle = _props3.backdropStyle,
+ backdropClassName = _props3.backdropClassName,
+ renderBackdrop = _props3.renderBackdrop,
+ Transition = _props3.transition,
+ backdropTransitionTimeout = _props3.backdropTransitionTimeout;
+
+
+ var backdropRef = function backdropRef(ref) {
+ return _this2.backdrop = ref;
+ };
+
+ var backdrop = _react2["default"].createElement('div', {
+ ref: backdropRef,
+ style: this.props.backdropStyle,
+ className: this.props.backdropClassName,
+ onClick: this.handleBackdropClick
+ });
+
+ if (Transition) {
+ backdrop = _react2["default"].createElement(
+ Transition,
+ { transitionAppear: true,
+ 'in': this.props.show,
+ timeout: backdropTransitionTimeout
+ },
+ renderBackdrop({
+ ref: backdropRef,
+ style: backdropStyle,
+ className: backdropClassName,
+ onClick: this.handleBackdropClick
+ })
+ );
+ }
+
+ return backdrop;
+ };
+
+ BaseModal.prototype.render = function render() {
+ var _props4 = this.props,
+ show = _props4.show,
+ container = _props4.container,
+ children = _props4.children,
+ Transition = _props4.transition,
+ backdrop = _props4.backdrop,
+ dialogTransitionTimeout = _props4.dialogTransitionTimeout,
+ className = _props4.className,
+ style = _props4.style,
+ onExit = _props4.onExit,
+ onExiting = _props4.onExiting,
+ onEnter = _props4.onEnter,
+ onEntering = _props4.onEntering,
+ onEntered = _props4.onEntered;
+
+
+ var dialog = _react2["default"].Children.only(children);
+
+ var mountModal = show || Transition && !this.state.exited;
+ if (!mountModal) {
+ return null;
+ }
+
+ var _dialog$props = dialog.props,
+ role = _dialog$props.role,
+ tabIndex = _dialog$props.tabIndex;
+
+
+ if (role === undefined || tabIndex === undefined) {
+ dialog = (0, _react.cloneElement)(dialog, {
+ role: role === undefined ? 'document' : role,
+ tabIndex: tabIndex == null ? '-1' : tabIndex
+ });
+ }
+
+ if (Transition) {
+ dialog = _react2["default"].createElement(
+ Transition,
+ {
+ transitionAppear: true,
+ unmountOnExit: true,
+ 'in': show,
+ timeout: dialogTransitionTimeout,
+ onExit: onExit,
+ onExiting: onExiting,
+ onExited: this.handleHidden,
+ onEnter: onEnter,
+ onEntering: onEntering,
+ onEntered: onEntered
+ },
+ dialog
+ );
+ }
+
+ return _react2["default"].createElement(
+ _Portal2["default"],
+ {
+ ref: this.setMountNode,
+ container: container
+ },
+ _react2["default"].createElement(
+ 'div',
+ {
+ ref: 'modal',
+ role: role || 'dialog',
+ style: style,
+ className: className
+ },
+ backdrop && this.renderBackdrop(),
+ dialog
+ )
+ );
+ };
+
+ return BaseModal;
+ }(_react.Component);
+
+ ;
+
+ BaseModal.Manager = _ModalManager2["default"];
+
+ BaseModal.propTypes = propTypes;
+ BaseModal.defaultProps = defaultProps;
+
+ exports["default"] = BaseModal;
+ module.exports = exports['default'];
+
+ /***/ }),
+ /* 202 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -112094,1193 +88254,7 @@
module.exports = exports["default"];
/***/ }),
- /* 235 */
- /***/ (function(module, exports, __webpack_require__) {
-
- module.exports = __webpack_require__(160);
-
- /***/ }),
- /* 236 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
-
- "use strict";
- /* WEBPACK VAR INJECTION */(function(process) {var isProduction = process.env.NODE_ENV === 'production';
- var prefix = 'Invariant failed';
- function invariant(condition, message) {
- if (condition) {
- return;
- }
-
- if (isProduction) {
- throw new Error(prefix);
- } else {
- throw new Error(prefix + ": " + (message || ''));
- }
- }
-
- /* harmony default export */ __webpack_exports__["a"] = (invariant);
-
- /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(10)))
-
- /***/ }),
- /* 237 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
-
- "use strict";
- /* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return createStore; });
- /* unused harmony export combineReducers */
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return bindActionCreators; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return applyMiddleware; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return compose; });
- /* unused harmony export __DO_NOT_USE__ActionTypes */
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_symbol_observable__ = __webpack_require__(837);
-
-
- /**
- * These are private action types reserved by Redux.
- * For any unknown actions, you must return the current state.
- * If the current state is undefined, you must return the initial state.
- * Do not reference these action types directly in your code.
- */
- var randomString = function randomString() {
- return Math.random().toString(36).substring(7).split('').join('.');
- };
-
- var ActionTypes = {
- INIT: "@@redux/INIT" + randomString(),
- REPLACE: "@@redux/REPLACE" + randomString(),
- PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() {
- return "@@redux/PROBE_UNKNOWN_ACTION" + randomString();
- }
- };
-
- /**
- * @param {any} obj The object to inspect.
- * @returns {boolean} True if the argument appears to be a plain object.
- */
- function isPlainObject(obj) {
- if (typeof obj !== 'object' || obj === null) return false;
- var proto = obj;
-
- while (Object.getPrototypeOf(proto) !== null) {
- proto = Object.getPrototypeOf(proto);
- }
-
- return Object.getPrototypeOf(obj) === proto;
- }
-
- /**
- * Creates a Redux store that holds the state tree.
- * The only way to change the data in the store is to call `dispatch()` on it.
- *
- * There should only be a single store in your app. To specify how different
- * parts of the state tree respond to actions, you may combine several reducers
- * into a single reducer function by using `combineReducers`.
- *
- * @param {Function} reducer A function that returns the next state tree, given
- * the current state tree and the action to handle.
- *
- * @param {any} [preloadedState] The initial state. You may optionally specify it
- * to hydrate the state from the server in universal apps, or to restore a
- * previously serialized user session.
- * If you use `combineReducers` to produce the root reducer function, this must be
- * an object with the same shape as `combineReducers` keys.
- *
- * @param {Function} [enhancer] The store enhancer. You may optionally specify it
- * to enhance the store with third-party capabilities such as middleware,
- * time travel, persistence, etc. The only store enhancer that ships with Redux
- * is `applyMiddleware()`.
- *
- * @returns {Store} A Redux store that lets you read the state, dispatch actions
- * and subscribe to changes.
- */
-
- function createStore(reducer, preloadedState, enhancer) {
- var _ref2;
-
- if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') {
- throw new Error('It looks like you are passing several store enhancers to ' + 'createStore(). This is not supported. Instead, compose them ' + 'together to a single function');
- }
-
- if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {
- enhancer = preloadedState;
- preloadedState = undefined;
- }
-
- if (typeof enhancer !== 'undefined') {
- if (typeof enhancer !== 'function') {
- throw new Error('Expected the enhancer to be a function.');
- }
-
- return enhancer(createStore)(reducer, preloadedState);
- }
-
- if (typeof reducer !== 'function') {
- throw new Error('Expected the reducer to be a function.');
- }
-
- var currentReducer = reducer;
- var currentState = preloadedState;
- var currentListeners = [];
- var nextListeners = currentListeners;
- var isDispatching = false;
-
- function ensureCanMutateNextListeners() {
- if (nextListeners === currentListeners) {
- nextListeners = currentListeners.slice();
- }
- }
- /**
- * Reads the state tree managed by the store.
- *
- * @returns {any} The current state tree of your application.
- */
-
-
- function getState() {
- if (isDispatching) {
- throw new Error('You may not call store.getState() while the reducer is executing. ' + 'The reducer has already received the state as an argument. ' + 'Pass it down from the top reducer instead of reading it from the store.');
- }
-
- return currentState;
- }
- /**
- * Adds a change listener. It will be called any time an action is dispatched,
- * and some part of the state tree may potentially have changed. You may then
- * call `getState()` to read the current state tree inside the callback.
- *
- * You may call `dispatch()` from a change listener, with the following
- * caveats:
- *
- * 1. The subscriptions are snapshotted just before every `dispatch()` call.
- * If you subscribe or unsubscribe while the listeners are being invoked, this
- * will not have any effect on the `dispatch()` that is currently in progress.
- * However, the next `dispatch()` call, whether nested or not, will use a more
- * recent snapshot of the subscription list.
- *
- * 2. The listener should not expect to see all state changes, as the state
- * might have been updated multiple times during a nested `dispatch()` before
- * the listener is called. It is, however, guaranteed that all subscribers
- * registered before the `dispatch()` started will be called with the latest
- * state by the time it exits.
- *
- * @param {Function} listener A callback to be invoked on every dispatch.
- * @returns {Function} A function to remove this change listener.
- */
-
-
- function subscribe(listener) {
- if (typeof listener !== 'function') {
- throw new Error('Expected the listener to be a function.');
- }
-
- if (isDispatching) {
- throw new Error('You may not call store.subscribe() while the reducer is executing. ' + 'If you would like to be notified after the store has been updated, subscribe from a ' + 'component and invoke store.getState() in the callback to access the latest state. ' + 'See https://redux.js.org/api-reference/store#subscribe(listener) for more details.');
- }
-
- var isSubscribed = true;
- ensureCanMutateNextListeners();
- nextListeners.push(listener);
- return function unsubscribe() {
- if (!isSubscribed) {
- return;
- }
-
- if (isDispatching) {
- throw new Error('You may not unsubscribe from a store listener while the reducer is executing. ' + 'See https://redux.js.org/api-reference/store#subscribe(listener) for more details.');
- }
-
- isSubscribed = false;
- ensureCanMutateNextListeners();
- var index = nextListeners.indexOf(listener);
- nextListeners.splice(index, 1);
- };
- }
- /**
- * Dispatches an action. It is the only way to trigger a state change.
- *
- * The `reducer` function, used to create the store, will be called with the
- * current state tree and the given `action`. Its return value will
- * be considered the **next** state of the tree, and the change listeners
- * will be notified.
- *
- * The base implementation only supports plain object actions. If you want to
- * dispatch a Promise, an Observable, a thunk, or something else, you need to
- * wrap your store creating function into the corresponding middleware. For
- * example, see the documentation for the `redux-thunk` package. Even the
- * middleware will eventually dispatch plain object actions using this method.
- *
- * @param {Object} action A plain object representing “what changed”. It is
- * a good idea to keep actions serializable so you can record and replay user
- * sessions, or use the time travelling `redux-devtools`. An action must have
- * a `type` property which may not be `undefined`. It is a good idea to use
- * string constants for action types.
- *
- * @returns {Object} For convenience, the same action object you dispatched.
- *
- * Note that, if you use a custom middleware, it may wrap `dispatch()` to
- * return something else (for example, a Promise you can await).
- */
-
-
- function dispatch(action) {
- if (!isPlainObject(action)) {
- throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');
- }
-
- if (typeof action.type === 'undefined') {
- throw new Error('Actions may not have an undefined "type" property. ' + 'Have you misspelled a constant?');
- }
-
- if (isDispatching) {
- throw new Error('Reducers may not dispatch actions.');
- }
-
- try {
- isDispatching = true;
- currentState = currentReducer(currentState, action);
- } finally {
- isDispatching = false;
- }
-
- var listeners = currentListeners = nextListeners;
-
- for (var i = 0; i < listeners.length; i++) {
- var listener = listeners[i];
- listener();
- }
-
- return action;
- }
- /**
- * Replaces the reducer currently used by the store to calculate the state.
- *
- * You might need this if your app implements code splitting and you want to
- * load some of the reducers dynamically. You might also need this if you
- * implement a hot reloading mechanism for Redux.
- *
- * @param {Function} nextReducer The reducer for the store to use instead.
- * @returns {void}
- */
-
-
- function replaceReducer(nextReducer) {
- if (typeof nextReducer !== 'function') {
- throw new Error('Expected the nextReducer to be a function.');
- }
-
- currentReducer = nextReducer;
- dispatch({
- type: ActionTypes.REPLACE
- });
- }
- /**
- * Interoperability point for observable/reactive libraries.
- * @returns {observable} A minimal observable of state changes.
- * For more information, see the observable proposal:
- * https://github.com/tc39/proposal-observable
- */
-
-
- function observable() {
- var _ref;
-
- var outerSubscribe = subscribe;
- return _ref = {
- /**
- * The minimal observable subscription method.
- * @param {Object} observer Any object that can be used as an observer.
- * The observer object should have a `next` method.
- * @returns {subscription} An object with an `unsubscribe` method that can
- * be used to unsubscribe the observable from the store, and prevent further
- * emission of values from the observable.
- */
- subscribe: function subscribe(observer) {
- if (typeof observer !== 'object' || observer === null) {
- throw new TypeError('Expected the observer to be an object.');
- }
-
- function observeState() {
- if (observer.next) {
- observer.next(getState());
- }
- }
-
- observeState();
- var unsubscribe = outerSubscribe(observeState);
- return {
- unsubscribe: unsubscribe
- };
- }
- }, _ref[__WEBPACK_IMPORTED_MODULE_0_symbol_observable__["a" /* default */]] = function () {
- return this;
- }, _ref;
- } // When a store is created, an "INIT" action is dispatched so that every
- // reducer returns their initial state. This effectively populates
- // the initial state tree.
-
-
- dispatch({
- type: ActionTypes.INIT
- });
- return _ref2 = {
- dispatch: dispatch,
- subscribe: subscribe,
- getState: getState,
- replaceReducer: replaceReducer
- }, _ref2[__WEBPACK_IMPORTED_MODULE_0_symbol_observable__["a" /* default */]] = observable, _ref2;
- }
-
- /**
- * Prints a warning in the console if it exists.
- *
- * @param {String} message The warning message.
- * @returns {void}
- */
- function warning(message) {
- /* eslint-disable no-console */
- if (typeof console !== 'undefined' && typeof console.error === 'function') {
- console.error(message);
- }
- /* eslint-enable no-console */
-
-
- try {
- // This error was thrown as a convenience so that if you enable
- // "break on all exceptions" in your console,
- // it would pause the execution at this line.
- throw new Error(message);
- } catch (e) {} // eslint-disable-line no-empty
-
- }
-
- function getUndefinedStateErrorMessage(key, action) {
- var actionType = action && action.type;
- var actionDescription = actionType && "action \"" + String(actionType) + "\"" || 'an action';
- return "Given " + actionDescription + ", reducer \"" + key + "\" returned undefined. " + "To ignore an action, you must explicitly return the previous state. " + "If you want this reducer to hold no value, you can return null instead of undefined.";
- }
-
- function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {
- var reducerKeys = Object.keys(reducers);
- var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';
-
- if (reducerKeys.length === 0) {
- return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';
- }
-
- if (!isPlainObject(inputState)) {
- return "The " + argumentName + " has unexpected type of \"" + {}.toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + "\". Expected argument to be an object with the following " + ("keys: \"" + reducerKeys.join('", "') + "\"");
- }
-
- var unexpectedKeys = Object.keys(inputState).filter(function (key) {
- return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];
- });
- unexpectedKeys.forEach(function (key) {
- unexpectedKeyCache[key] = true;
- });
- if (action && action.type === ActionTypes.REPLACE) return;
-
- if (unexpectedKeys.length > 0) {
- return "Unexpected " + (unexpectedKeys.length > 1 ? 'keys' : 'key') + " " + ("\"" + unexpectedKeys.join('", "') + "\" found in " + argumentName + ". ") + "Expected to find one of the known reducer keys instead: " + ("\"" + reducerKeys.join('", "') + "\". Unexpected keys will be ignored.");
- }
- }
-
- function assertReducerShape(reducers) {
- Object.keys(reducers).forEach(function (key) {
- var reducer = reducers[key];
- var initialState = reducer(undefined, {
- type: ActionTypes.INIT
- });
-
- if (typeof initialState === 'undefined') {
- throw new Error("Reducer \"" + key + "\" returned undefined during initialization. " + "If the state passed to the reducer is undefined, you must " + "explicitly return the initial state. The initial state may " + "not be undefined. If you don't want to set a value for this reducer, " + "you can use null instead of undefined.");
- }
-
- if (typeof reducer(undefined, {
- type: ActionTypes.PROBE_UNKNOWN_ACTION()
- }) === 'undefined') {
- throw new Error("Reducer \"" + key + "\" returned undefined when probed with a random type. " + ("Don't try to handle " + ActionTypes.INIT + " or other actions in \"redux/*\" ") + "namespace. They are considered private. Instead, you must return the " + "current state for any unknown actions, unless it is undefined, " + "in which case you must return the initial state, regardless of the " + "action type. The initial state may not be undefined, but can be null.");
- }
- });
- }
- /**
- * Turns an object whose values are different reducer functions, into a single
- * reducer function. It will call every child reducer, and gather their results
- * into a single state object, whose keys correspond to the keys of the passed
- * reducer functions.
- *
- * @param {Object} reducers An object whose values correspond to different
- * reducer functions that need to be combined into one. One handy way to obtain
- * it is to use ES6 `import * as reducers` syntax. The reducers may never return
- * undefined for any action. Instead, they should return their initial state
- * if the state passed to them was undefined, and the current state for any
- * unrecognized action.
- *
- * @returns {Function} A reducer function that invokes every reducer inside the
- * passed object, and builds a state object with the same shape.
- */
-
-
- function combineReducers(reducers) {
- var reducerKeys = Object.keys(reducers);
- var finalReducers = {};
-
- for (var i = 0; i < reducerKeys.length; i++) {
- var key = reducerKeys[i];
-
- if (process.env.NODE_ENV !== 'production') {
- if (typeof reducers[key] === 'undefined') {
- warning("No reducer provided for key \"" + key + "\"");
- }
- }
-
- if (typeof reducers[key] === 'function') {
- finalReducers[key] = reducers[key];
- }
- }
-
- var finalReducerKeys = Object.keys(finalReducers);
- var unexpectedKeyCache;
-
- if (process.env.NODE_ENV !== 'production') {
- unexpectedKeyCache = {};
- }
-
- var shapeAssertionError;
-
- try {
- assertReducerShape(finalReducers);
- } catch (e) {
- shapeAssertionError = e;
- }
-
- return function combination(state, action) {
- if (state === void 0) {
- state = {};
- }
-
- if (shapeAssertionError) {
- throw shapeAssertionError;
- }
-
- if (process.env.NODE_ENV !== 'production') {
- var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);
-
- if (warningMessage) {
- warning(warningMessage);
- }
- }
-
- var hasChanged = false;
- var nextState = {};
-
- for (var _i = 0; _i < finalReducerKeys.length; _i++) {
- var _key = finalReducerKeys[_i];
- var reducer = finalReducers[_key];
- var previousStateForKey = state[_key];
- var nextStateForKey = reducer(previousStateForKey, action);
-
- if (typeof nextStateForKey === 'undefined') {
- var errorMessage = getUndefinedStateErrorMessage(_key, action);
- throw new Error(errorMessage);
- }
-
- nextState[_key] = nextStateForKey;
- hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
- }
-
- return hasChanged ? nextState : state;
- };
- }
-
- function bindActionCreator(actionCreator, dispatch) {
- return function () {
- return dispatch(actionCreator.apply(this, arguments));
- };
- }
- /**
- * Turns an object whose values are action creators, into an object with the
- * same keys, but with every function wrapped into a `dispatch` call so they
- * may be invoked directly. This is just a convenience method, as you can call
- * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.
- *
- * For convenience, you can also pass a single function as the first argument,
- * and get a function in return.
- *
- * @param {Function|Object} actionCreators An object whose values are action
- * creator functions. One handy way to obtain it is to use ES6 `import * as`
- * syntax. You may also pass a single function.
- *
- * @param {Function} dispatch The `dispatch` function available on your Redux
- * store.
- *
- * @returns {Function|Object} The object mimicking the original object, but with
- * every action creator wrapped into the `dispatch` call. If you passed a
- * function as `actionCreators`, the return value will also be a single
- * function.
- */
-
-
- function bindActionCreators(actionCreators, dispatch) {
- if (typeof actionCreators === 'function') {
- return bindActionCreator(actionCreators, dispatch);
- }
-
- if (typeof actionCreators !== 'object' || actionCreators === null) {
- throw new Error("bindActionCreators expected an object or a function, instead received " + (actionCreators === null ? 'null' : typeof actionCreators) + ". " + "Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?");
- }
-
- var keys = Object.keys(actionCreators);
- var boundActionCreators = {};
-
- for (var i = 0; i < keys.length; i++) {
- var key = keys[i];
- var actionCreator = actionCreators[key];
-
- if (typeof actionCreator === 'function') {
- boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);
- }
- }
-
- return boundActionCreators;
- }
-
- function _defineProperty(obj, key, value) {
- if (key in obj) {
- Object.defineProperty(obj, key, {
- value: value,
- enumerable: true,
- configurable: true,
- writable: true
- });
- } else {
- obj[key] = value;
- }
-
- return obj;
- }
-
- function _objectSpread(target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i] != null ? arguments[i] : {};
- var ownKeys = Object.keys(source);
-
- if (typeof Object.getOwnPropertySymbols === 'function') {
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
- }));
- }
-
- ownKeys.forEach(function (key) {
- _defineProperty(target, key, source[key]);
- });
- }
-
- return target;
- }
-
- /**
- * Composes single-argument functions from right to left. The rightmost
- * function can take multiple arguments as it provides the signature for
- * the resulting composite function.
- *
- * @param {...Function} funcs The functions to compose.
- * @returns {Function} A function obtained by composing the argument functions
- * from right to left. For example, compose(f, g, h) is identical to doing
- * (...args) => f(g(h(...args))).
- */
- function compose() {
- for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {
- funcs[_key] = arguments[_key];
- }
-
- if (funcs.length === 0) {
- return function (arg) {
- return arg;
- };
- }
-
- if (funcs.length === 1) {
- return funcs[0];
- }
-
- return funcs.reduce(function (a, b) {
- return function () {
- return a(b.apply(void 0, arguments));
- };
- });
- }
-
- /**
- * Creates a store enhancer that applies middleware to the dispatch method
- * of the Redux store. This is handy for a variety of tasks, such as expressing
- * asynchronous actions in a concise manner, or logging every action payload.
- *
- * See `redux-thunk` package as an example of the Redux middleware.
- *
- * Because middleware is potentially asynchronous, this should be the first
- * store enhancer in the composition chain.
- *
- * Note that each middleware will be given the `dispatch` and `getState` functions
- * as named arguments.
- *
- * @param {...Function} middlewares The middleware chain to be applied.
- * @returns {Function} A store enhancer applying the middleware.
- */
-
- function applyMiddleware() {
- for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) {
- middlewares[_key] = arguments[_key];
- }
-
- return function (createStore) {
- return function () {
- var store = createStore.apply(void 0, arguments);
-
- var _dispatch = function dispatch() {
- throw new Error("Dispatching while constructing your middleware is not allowed. " + "Other middleware would not be applied to this dispatch.");
- };
-
- var middlewareAPI = {
- getState: store.getState,
- dispatch: function dispatch() {
- return _dispatch.apply(void 0, arguments);
- }
- };
- var chain = middlewares.map(function (middleware) {
- return middleware(middlewareAPI);
- });
- _dispatch = compose.apply(void 0, chain)(store.dispatch);
- return _objectSpread({}, store, {
- dispatch: _dispatch
- });
- };
- };
- }
-
- /*
- * This is a dummy function to check if the function name has been altered by minification.
- * If the function has been minified and NODE_ENV !== 'production', warn the user.
- */
-
- function isCrushed() {}
-
- if (process.env.NODE_ENV !== 'production' && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') {
- warning('You are currently using minified code outside of NODE_ENV === "production". ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or setting mode to production in webpack (https://webpack.js.org/concepts/mode/) ' + 'to ensure you have the correct code for your production build.');
- }
-
-
-
- /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(10)))
-
- /***/ }),
- /* 238 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
-
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["a"] = _inheritsLoose;
- function _inheritsLoose(subClass, superClass) {
- subClass.prototype = Object.create(superClass.prototype);
- subClass.prototype.constructor = subClass;
- subClass.__proto__ = superClass;
- }
-
- /***/ }),
- /* 239 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
-
- "use strict";
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return subscriptionShape; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return storeShape; });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types__ = __webpack_require__(1);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_prop_types__);
-
- var subscriptionShape = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({
- trySubscribe: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,
- tryUnsubscribe: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,
- notifyNestedSubs: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,
- isSubscribed: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired
- });
- var storeShape = __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.shape({
- subscribe: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,
- dispatch: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired,
- getState: __WEBPACK_IMPORTED_MODULE_0_prop_types___default.a.func.isRequired
- });
-
- /***/ }),
- /* 240 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
-
- "use strict";
- /* WEBPACK VAR INJECTION */(function(process) {/* harmony export (immutable) */ __webpack_exports__["a"] = connectAdvanced;
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_inheritsLoose__ = __webpack_require__(238);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_assertThisInitialized__ = __webpack_require__(845);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_extends__ = __webpack_require__(135);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__ = __webpack_require__(136);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_hoist_non_react_statics__ = __webpack_require__(846);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_hoist_non_react_statics___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_hoist_non_react_statics__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_invariant__ = __webpack_require__(847);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_invariant___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_invariant__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_is__ = __webpack_require__(114);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_react_is___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_react_is__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__utils_Subscription__ = __webpack_require__(848);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__utils_PropTypes__ = __webpack_require__(239);
-
-
-
-
-
-
-
-
-
-
- var hotReloadingVersion = 0;
- var dummyState = {};
-
- function noop() {}
-
- function makeSelectorStateful(sourceSelector, store) {
- // wrap the selector in an object that tracks its results between runs.
- var selector = {
- run: function runComponentSelector(props) {
- try {
- var nextProps = sourceSelector(store.getState(), props);
-
- if (nextProps !== selector.props || selector.error) {
- selector.shouldComponentUpdate = true;
- selector.props = nextProps;
- selector.error = null;
- }
- } catch (error) {
- selector.shouldComponentUpdate = true;
- selector.error = error;
- }
- }
- };
- return selector;
- }
-
- function connectAdvanced(
- /*
- selectorFactory is a func that is responsible for returning the selector function used to
- compute new props from state, props, and dispatch. For example:
- export default connectAdvanced((dispatch, options) => (state, props) => ({
- thing: state.things[props.thingId],
- saveThing: fields => dispatch(actionCreators.saveThing(props.thingId, fields)),
- }))(YourComponent)
- Access to dispatch is provided to the factory so selectorFactories can bind actionCreators
- outside of their selector as an optimization. Options passed to connectAdvanced are passed to
- the selectorFactory, along with displayName and WrappedComponent, as the second argument.
- Note that selectorFactory is responsible for all caching/memoization of inbound and outbound
- props. Do not use connectAdvanced directly without memoizing results between calls to your
- selector, otherwise the Connect component will re-render on every state or props change.
- */
- selectorFactory, // options object:
- _ref) {
- var _contextTypes, _childContextTypes;
-
- if (_ref === void 0) {
- _ref = {};
- }
-
- var _ref2 = _ref,
- _ref2$getDisplayName = _ref2.getDisplayName,
- getDisplayName = _ref2$getDisplayName === void 0 ? function (name) {
- return "ConnectAdvanced(" + name + ")";
- } : _ref2$getDisplayName,
- _ref2$methodName = _ref2.methodName,
- methodName = _ref2$methodName === void 0 ? 'connectAdvanced' : _ref2$methodName,
- _ref2$renderCountProp = _ref2.renderCountProp,
- renderCountProp = _ref2$renderCountProp === void 0 ? undefined : _ref2$renderCountProp,
- _ref2$shouldHandleSta = _ref2.shouldHandleStateChanges,
- shouldHandleStateChanges = _ref2$shouldHandleSta === void 0 ? true : _ref2$shouldHandleSta,
- _ref2$storeKey = _ref2.storeKey,
- storeKey = _ref2$storeKey === void 0 ? 'store' : _ref2$storeKey,
- _ref2$withRef = _ref2.withRef,
- withRef = _ref2$withRef === void 0 ? false : _ref2$withRef,
- connectOptions = Object(__WEBPACK_IMPORTED_MODULE_3__babel_runtime_helpers_esm_objectWithoutPropertiesLoose__["a" /* default */])(_ref2, ["getDisplayName", "methodName", "renderCountProp", "shouldHandleStateChanges", "storeKey", "withRef"]);
-
- var subscriptionKey = storeKey + 'Subscription';
- var version = hotReloadingVersion++;
- var contextTypes = (_contextTypes = {}, _contextTypes[storeKey] = __WEBPACK_IMPORTED_MODULE_9__utils_PropTypes__["a" /* storeShape */], _contextTypes[subscriptionKey] = __WEBPACK_IMPORTED_MODULE_9__utils_PropTypes__["b" /* subscriptionShape */], _contextTypes);
- var childContextTypes = (_childContextTypes = {}, _childContextTypes[subscriptionKey] = __WEBPACK_IMPORTED_MODULE_9__utils_PropTypes__["b" /* subscriptionShape */], _childContextTypes);
- return function wrapWithConnect(WrappedComponent) {
- __WEBPACK_IMPORTED_MODULE_5_invariant___default()(Object(__WEBPACK_IMPORTED_MODULE_7_react_is__["isValidElementType"])(WrappedComponent), "You must pass a component to the function returned by " + (methodName + ". Instead received " + JSON.stringify(WrappedComponent)));
- var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component';
- var displayName = getDisplayName(wrappedComponentName);
-
- var selectorFactoryOptions = Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_extends__["a" /* default */])({}, connectOptions, {
- getDisplayName: getDisplayName,
- methodName: methodName,
- renderCountProp: renderCountProp,
- shouldHandleStateChanges: shouldHandleStateChanges,
- storeKey: storeKey,
- withRef: withRef,
- displayName: displayName,
- wrappedComponentName: wrappedComponentName,
- WrappedComponent: WrappedComponent // TODO Actually fix our use of componentWillReceiveProps
-
- /* eslint-disable react/no-deprecated */
-
- });
-
- var Connect =
- /*#__PURE__*/
- function (_Component) {
- Object(__WEBPACK_IMPORTED_MODULE_0__babel_runtime_helpers_esm_inheritsLoose__["a" /* default */])(Connect, _Component);
-
- function Connect(props, context) {
- var _this;
-
- _this = _Component.call(this, props, context) || this;
- _this.version = version;
- _this.state = {};
- _this.renderCount = 0;
- _this.store = props[storeKey] || context[storeKey];
- _this.propsMode = Boolean(props[storeKey]);
- _this.setWrappedInstance = _this.setWrappedInstance.bind(Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_assertThisInitialized__["a" /* default */])(Object(__WEBPACK_IMPORTED_MODULE_1__babel_runtime_helpers_esm_assertThisInitialized__["a" /* default */])(_this)));
- __WEBPACK_IMPORTED_MODULE_5_invariant___default()(_this.store, "Could not find \"" + storeKey + "\" in either the context or props of " + ("\"" + displayName + "\". Either wrap the root component in a , ") + ("or explicitly pass \"" + storeKey + "\" as a prop to \"" + displayName + "\"."));
-
- _this.initSelector();
-
- _this.initSubscription();
-
- return _this;
- }
-
- var _proto = Connect.prototype;
-
- _proto.getChildContext = function getChildContext() {
- var _ref3;
-
- // If this component received store from props, its subscription should be transparent
- // to any descendants receiving store+subscription from context; it passes along
- // subscription passed to it. Otherwise, it shadows the parent subscription, which allows
- // Connect to control ordering of notifications to flow top-down.
- var subscription = this.propsMode ? null : this.subscription;
- return _ref3 = {}, _ref3[subscriptionKey] = subscription || this.context[subscriptionKey], _ref3;
- };
-
- _proto.componentDidMount = function componentDidMount() {
- if (!shouldHandleStateChanges) return; // componentWillMount fires during server side rendering, but componentDidMount and
- // componentWillUnmount do not. Because of this, trySubscribe happens during ...didMount.
- // Otherwise, unsubscription would never take place during SSR, causing a memory leak.
- // To handle the case where a child component may have triggered a state change by
- // dispatching an action in its componentWillMount, we have to re-run the select and maybe
- // re-render.
-
- this.subscription.trySubscribe();
- this.selector.run(this.props);
- if (this.selector.shouldComponentUpdate) this.forceUpdate();
- };
-
- _proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
- this.selector.run(nextProps);
- };
-
- _proto.shouldComponentUpdate = function shouldComponentUpdate() {
- return this.selector.shouldComponentUpdate;
- };
-
- _proto.componentWillUnmount = function componentWillUnmount() {
- if (this.subscription) this.subscription.tryUnsubscribe();
- this.subscription = null;
- this.notifyNestedSubs = noop;
- this.store = null;
- this.selector.run = noop;
- this.selector.shouldComponentUpdate = false;
- };
-
- _proto.getWrappedInstance = function getWrappedInstance() {
- __WEBPACK_IMPORTED_MODULE_5_invariant___default()(withRef, "To access the wrapped instance, you need to specify " + ("{ withRef: true } in the options argument of the " + methodName + "() call."));
- return this.wrappedInstance;
- };
-
- _proto.setWrappedInstance = function setWrappedInstance(ref) {
- this.wrappedInstance = ref;
- };
-
- _proto.initSelector = function initSelector() {
- var sourceSelector = selectorFactory(this.store.dispatch, selectorFactoryOptions);
- this.selector = makeSelectorStateful(sourceSelector, this.store);
- this.selector.run(this.props);
- };
-
- _proto.initSubscription = function initSubscription() {
- if (!shouldHandleStateChanges) return; // parentSub's source should match where store came from: props vs. context. A component
- // connected to the store via props shouldn't use subscription from context, or vice versa.
-
- var parentSub = (this.propsMode ? this.props : this.context)[subscriptionKey];
- this.subscription = new __WEBPACK_IMPORTED_MODULE_8__utils_Subscription__["a" /* default */](this.store, parentSub, this.onStateChange.bind(this)); // `notifyNestedSubs` is duplicated to handle the case where the component is unmounted in
- // the middle of the notification loop, where `this.subscription` will then be null. An
- // extra null check every change can be avoided by copying the method onto `this` and then
- // replacing it with a no-op on unmount. This can probably be avoided if Subscription's
- // listeners logic is changed to not call listeners that have been unsubscribed in the
- // middle of the notification loop.
-
- this.notifyNestedSubs = this.subscription.notifyNestedSubs.bind(this.subscription);
- };
-
- _proto.onStateChange = function onStateChange() {
- this.selector.run(this.props);
-
- if (!this.selector.shouldComponentUpdate) {
- this.notifyNestedSubs();
- } else {
- this.componentDidUpdate = this.notifyNestedSubsOnComponentDidUpdate;
- this.setState(dummyState);
- }
- };
-
- _proto.notifyNestedSubsOnComponentDidUpdate = function notifyNestedSubsOnComponentDidUpdate() {
- // `componentDidUpdate` is conditionally implemented when `onStateChange` determines it
- // needs to notify nested subs. Once called, it unimplements itself until further state
- // changes occur. Doing it this way vs having a permanent `componentDidUpdate` that does
- // a boolean check every time avoids an extra method call most of the time, resulting
- // in some perf boost.
- this.componentDidUpdate = undefined;
- this.notifyNestedSubs();
- };
-
- _proto.isSubscribed = function isSubscribed() {
- return Boolean(this.subscription) && this.subscription.isSubscribed();
- };
-
- _proto.addExtraProps = function addExtraProps(props) {
- if (!withRef && !renderCountProp && !(this.propsMode && this.subscription)) return props; // make a shallow copy so that fields added don't leak to the original selector.
- // this is especially important for 'ref' since that's a reference back to the component
- // instance. a singleton memoized selector would then be holding a reference to the
- // instance, preventing the instance from being garbage collected, and that would be bad
-
- var withExtras = Object(__WEBPACK_IMPORTED_MODULE_2__babel_runtime_helpers_esm_extends__["a" /* default */])({}, props);
-
- if (withRef) withExtras.ref = this.setWrappedInstance;
- if (renderCountProp) withExtras[renderCountProp] = this.renderCount++;
- if (this.propsMode && this.subscription) withExtras[subscriptionKey] = this.subscription;
- return withExtras;
- };
-
- _proto.render = function render() {
- var selector = this.selector;
- selector.shouldComponentUpdate = false;
-
- if (selector.error) {
- throw selector.error;
- } else {
- return Object(__WEBPACK_IMPORTED_MODULE_6_react__["createElement"])(WrappedComponent, this.addExtraProps(selector.props));
- }
- };
-
- return Connect;
- }(__WEBPACK_IMPORTED_MODULE_6_react__["Component"]);
- /* eslint-enable react/no-deprecated */
-
-
- Connect.WrappedComponent = WrappedComponent;
- Connect.displayName = displayName;
- Connect.childContextTypes = childContextTypes;
- Connect.contextTypes = contextTypes;
- Connect.propTypes = contextTypes;
-
- if (process.env.NODE_ENV !== 'production') {
- Connect.prototype.componentWillUpdate = function componentWillUpdate() {
- var _this2 = this;
-
- // We are hot reloading!
- if (this.version !== version) {
- this.version = version;
- this.initSelector(); // If any connected descendants don't hot reload (and resubscribe in the process), their
- // listeners will be lost when we unsubscribe. Unfortunately, by copying over all
- // listeners, this does mean that the old versions of connected descendants will still be
- // notified of state changes; however, their onStateChange function is a no-op so this
- // isn't a huge deal.
-
- var oldListeners = [];
-
- if (this.subscription) {
- oldListeners = this.subscription.listeners.get();
- this.subscription.tryUnsubscribe();
- }
-
- this.initSubscription();
-
- if (shouldHandleStateChanges) {
- this.subscription.trySubscribe();
- oldListeners.forEach(function (listener) {
- return _this2.subscription.listeners.subscribe(listener);
- });
- }
- }
- };
- }
-
- return __WEBPACK_IMPORTED_MODULE_4_hoist_non_react_statics___default()(Connect, WrappedComponent);
- };
- }
- /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(10)))
-
- /***/ }),
- /* 241 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
-
- "use strict";
- /* WEBPACK VAR INJECTION */(function(process) {/* harmony export (immutable) */ __webpack_exports__["a"] = wrapMapToPropsConstant;
- /* unused harmony export getDependsOnOwnProps */
- /* harmony export (immutable) */ __webpack_exports__["b"] = wrapMapToPropsFunc;
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__ = __webpack_require__(242);
-
- function wrapMapToPropsConstant(getConstant) {
- return function initConstantSelector(dispatch, options) {
- var constant = getConstant(dispatch, options);
-
- function constantSelector() {
- return constant;
- }
-
- constantSelector.dependsOnOwnProps = false;
- return constantSelector;
- };
- } // dependsOnOwnProps is used by createMapToPropsProxy to determine whether to pass props as args
- // to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine
- // whether mapToProps needs to be invoked when props have changed.
- //
- // A length of one signals that mapToProps does not depend on props from the parent component.
- // A length of zero is assumed to mean mapToProps is getting args via arguments or ...args and
- // therefore not reporting its length accurately..
-
- function getDependsOnOwnProps(mapToProps) {
- return mapToProps.dependsOnOwnProps !== null && mapToProps.dependsOnOwnProps !== undefined ? Boolean(mapToProps.dependsOnOwnProps) : mapToProps.length !== 1;
- } // Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction,
- // this function wraps mapToProps in a proxy function which does several things:
- //
- // * Detects whether the mapToProps function being called depends on props, which
- // is used by selectorFactory to decide if it should reinvoke on props changes.
- //
- // * On first call, handles mapToProps if returns another function, and treats that
- // new function as the true mapToProps for subsequent calls.
- //
- // * On first call, verifies the first result is a plain object, in order to warn
- // the developer that their mapToProps function is not returning a valid result.
- //
-
- function wrapMapToPropsFunc(mapToProps, methodName) {
- return function initProxySelector(dispatch, _ref) {
- var displayName = _ref.displayName;
-
- var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {
- return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);
- }; // allow detectFactoryAndVerify to get ownProps
-
-
- proxy.dependsOnOwnProps = true;
-
- proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {
- proxy.mapToProps = mapToProps;
- proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);
- var props = proxy(stateOrDispatch, ownProps);
-
- if (typeof props === 'function') {
- proxy.mapToProps = props;
- proxy.dependsOnOwnProps = getDependsOnOwnProps(props);
- props = proxy(stateOrDispatch, ownProps);
- }
-
- if (process.env.NODE_ENV !== 'production') Object(__WEBPACK_IMPORTED_MODULE_0__utils_verifyPlainObject__["a" /* default */])(props, displayName, methodName);
- return props;
- };
-
- return proxy;
- };
- }
- /* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(10)))
-
- /***/ }),
- /* 242 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
-
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["a"] = verifyPlainObject;
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__isPlainObject__ = __webpack_require__(852);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__warning__ = __webpack_require__(134);
-
-
- function verifyPlainObject(value, displayName, methodName) {
- if (!Object(__WEBPACK_IMPORTED_MODULE_0__isPlainObject__["a" /* default */])(value)) {
- Object(__WEBPACK_IMPORTED_MODULE_1__warning__["a" /* default */])(methodName + "() in " + displayName + " must return a plain object. Instead received " + value + ".");
- }
- }
-
- /***/ }),
- /* 243 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- exports.__esModule = true;
- exports["default"] = {
- noWobble: { stiffness: 170, damping: 26 }, // the default, if nothing provided
- gentle: { stiffness: 120, damping: 14 },
- wobbly: { stiffness: 180, damping: 12 },
- stiff: { stiffness: 210, damping: 20 }
- };
- module.exports = exports["default"];
-
- /***/ }),
- /* 244 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- var getClass = exports.getClass = function getClass(props, doing) {
- var dropClass = props.dropClass,
- dropOverClass = props.dropOverClass,
- dragClass = props.dragClass,
- dragingClass = props.dragingClass,
- type = props.type;
-
-
- var verticalObj = {
- drop: {}, drag: {}
- };
- verticalObj.drop['u-drop ' + dropClass] = true;
- verticalObj.drop['u-droping ' + dropOverClass] = doing;
- verticalObj.drag['u-drag ' + dragClass] = true;
- verticalObj.drag['u-draging ' + dragingClass] = doing;
-
- var horizontalObj = {
- drop: {}, drag: {}
- };
- horizontalObj.drop['u-drop u-drop-horizontal ' + dropClass] = true;
- horizontalObj.drop['u-droping u-droping-horizontal ' + dropOverClass] = doing;
- horizontalObj.drag['u-drag u-drag-horizontal ' + dragClass] = true;
- horizontalObj.drag['u-draging u-draging-horizontal ' + dragingClass] = doing;
-
- switch (type) {
- case 'vertical':
- return verticalObj;
- break;
- case 'horizontal':
- return horizontalObj;
- break;
- case 'betweenVertical':
- return verticalObj;
- break;
- case 'betweenHorizontal':
- return horizontalObj;
- break;
- }
- };
-
- /***/ }),
- /* 245 */
+ /* 203 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -113291,7 +88265,7 @@
});
exports.transitionEnd = exports.transitionDuration = exports.transitionDelay = exports.transitionTiming = exports.transitionProperty = exports.transform = undefined;
- var _inDOM = __webpack_require__(34);
+ var _inDOM = __webpack_require__(36);
var _inDOM2 = _interopRequireDefault(_inDOM);
@@ -113362,7 +88336,7 @@
}
/***/ }),
- /* 246 */
+ /* 204 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -113373,7 +88347,7 @@
});
exports.default = camelizeStyleName;
- var _camelize = __webpack_require__(870);
+ var _camelize = __webpack_require__(773);
var _camelize2 = _interopRequireDefault(_camelize);
@@ -113390,7 +88364,7 @@
module.exports = exports['default'];
/***/ }),
- /* 247 */
+ /* 205 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
@@ -113429,11 +88403,11 @@
}
/***/ }),
- /* 248 */
+ /* 206 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(14);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(20);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__ = __webpack_require__(6);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__);
@@ -113495,7 +88469,7 @@
/* harmony default export */ __webpack_exports__["a"] = (LazyRenderBox);
/***/ }),
- /* 249 */
+ /* 207 */
/***/ (function(module, exports, __webpack_require__) {
(function (global, factory) {
@@ -113530,27 +88504,7 @@
/***/ }),
- /* 250 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _Icon = __webpack_require__(906);
-
- var _Icon2 = _interopRequireDefault(_Icon);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- exports["default"] = _Icon2["default"];
- module.exports = exports['default'];
-
- /***/ }),
- /* 251 */
+ /* 208 */
/***/ (function(module, exports) {
//
@@ -113602,7 +88556,7 @@
/***/ }),
- /* 252 */
+ /* 209 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -113632,7 +88586,7 @@
var _warning2 = _interopRequireDefault(_warning);
- var _parseInt = __webpack_require__(925);
+ var _parseInt = __webpack_require__(823);
var _parseInt2 = _interopRequireDefault(_parseInt);
@@ -113759,9 +88713,9 @@
});
}
- /**
- * 简单数组数据对象拷贝
- * @param {*} obj 要拷贝的对象
+ /**
+ * 简单数组数据对象拷贝
+ * @param {*} obj 要拷贝的对象
*/
function ObjectAssign(obj) {
var b = obj instanceof Array;
@@ -113778,8 +88732,8 @@
}
return tagObj;
}
- /**
- * 获取某个父元素
+ /**
+ * 获取某个父元素
* */
function closest(ele, selector) {
@@ -113891,8 +88845,8 @@
}
}
- /*
- * 处理精度
+ /*
+ * 处理精度
*/
};function DicimalFormater(value, precision) {
var value = value + '',
@@ -113921,7 +88875,7 @@
};
/***/ }),
- /* 253 */
+ /* 210 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -113931,7 +88885,7 @@
value: true
});
- var _Calendar = __webpack_require__(929);
+ var _Calendar = __webpack_require__(827);
var _Calendar2 = _interopRequireDefault(_Calendar);
@@ -113941,7 +88895,7 @@
module.exports = exports['default'];
/***/ }),
- /* 254 */
+ /* 211 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -113955,11 +88909,11 @@
var _react2 = _interopRequireDefault(_react);
- var _DateTHead = __webpack_require__(930);
+ var _DateTHead = __webpack_require__(828);
var _DateTHead2 = _interopRequireDefault(_DateTHead);
- var _DateTBody = __webpack_require__(932);
+ var _DateTBody = __webpack_require__(830);
var _DateTBody2 = _interopRequireDefault(_DateTBody);
@@ -114000,7 +88954,7 @@
module.exports = exports['default'];
/***/ }),
- /* 255 */
+ /* 212 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -114016,13 +88970,13 @@
module.exports = exports["default"];
/***/ }),
- /* 256 */
+ /* 213 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -114093,13 +89047,13 @@
/***/ }),
- /* 257 */
+ /* 214 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -114232,13 +89186,13 @@
/***/ }),
- /* 258 */
+ /* 215 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -114295,13 +89249,13 @@
/***/ }),
- /* 259 */
+ /* 216 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -114358,13 +89312,13 @@
/***/ }),
- /* 260 */
+ /* 217 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -114484,13 +89438,13 @@
/***/ }),
- /* 261 */
+ /* 218 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -114547,13 +89501,13 @@
/***/ }),
- /* 262 */
+ /* 219 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -114655,13 +89609,13 @@
/***/ }),
- /* 263 */
+ /* 220 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -114718,13 +89672,13 @@
/***/ }),
- /* 264 */
+ /* 221 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -114827,13 +89781,13 @@
/***/ }),
- /* 265 */
+ /* 222 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -114963,13 +89917,13 @@
/***/ }),
- /* 266 */
+ /* 223 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -115057,13 +90011,13 @@
/***/ }),
- /* 267 */
+ /* 224 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -115119,13 +90073,13 @@
/***/ }),
- /* 268 */
+ /* 225 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -115242,13 +90196,13 @@
/***/ }),
- /* 269 */
+ /* 226 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -115365,13 +90319,13 @@
/***/ }),
- /* 270 */
+ /* 227 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -115477,13 +90431,13 @@
/***/ }),
- /* 271 */
+ /* 228 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -115632,13 +90586,13 @@
/***/ }),
- /* 272 */
+ /* 229 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -115724,13 +90678,13 @@
/***/ }),
- /* 273 */
+ /* 230 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -115900,13 +90854,13 @@
/***/ }),
- /* 274 */
+ /* 231 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -115967,13 +90921,13 @@
/***/ }),
- /* 275 */
+ /* 232 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -116051,13 +91005,13 @@
/***/ }),
- /* 276 */
+ /* 233 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -116115,13 +91069,13 @@
/***/ }),
- /* 277 */
+ /* 234 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -116195,13 +91149,13 @@
/***/ }),
- /* 278 */
+ /* 235 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -116275,13 +91229,13 @@
/***/ }),
- /* 279 */
+ /* 236 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -116355,13 +91309,13 @@
/***/ }),
- /* 280 */
+ /* 237 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -116458,13 +91412,13 @@
/***/ }),
- /* 281 */
+ /* 238 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -116562,13 +91516,13 @@
/***/ }),
- /* 282 */
+ /* 239 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -116633,13 +91587,13 @@
/***/ }),
- /* 283 */
+ /* 240 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -116704,13 +91658,13 @@
/***/ }),
- /* 284 */
+ /* 241 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -116771,13 +91725,13 @@
/***/ }),
- /* 285 */
+ /* 242 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -116842,13 +91796,13 @@
/***/ }),
- /* 286 */
+ /* 243 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -116908,13 +91862,13 @@
/***/ }),
- /* 287 */
+ /* 244 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -116979,13 +91933,13 @@
/***/ }),
- /* 288 */
+ /* 245 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -117054,13 +92008,13 @@
/***/ }),
- /* 289 */
+ /* 246 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -117150,13 +92104,13 @@
/***/ }),
- /* 290 */
+ /* 247 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -117246,13 +92200,13 @@
/***/ }),
- /* 291 */
+ /* 248 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -117342,13 +92296,13 @@
/***/ }),
- /* 292 */
+ /* 249 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -117426,13 +92380,13 @@
/***/ }),
- /* 293 */
+ /* 250 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -117496,13 +92450,13 @@
/***/ }),
- /* 294 */
+ /* 251 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -117606,13 +92560,13 @@
/***/ }),
- /* 295 */
+ /* 252 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -117719,13 +92673,13 @@
/***/ }),
- /* 296 */
+ /* 253 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -117783,13 +92737,13 @@
/***/ }),
- /* 297 */
+ /* 254 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -117870,13 +92824,13 @@
/***/ }),
- /* 298 */
+ /* 255 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -117948,13 +92902,13 @@
/***/ }),
- /* 299 */
+ /* 256 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -118030,13 +92984,13 @@
/***/ }),
- /* 300 */
+ /* 257 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -118109,13 +93063,13 @@
/***/ }),
- /* 301 */
+ /* 258 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -118190,13 +93144,13 @@
/***/ }),
- /* 302 */
+ /* 259 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -118270,13 +93224,13 @@
/***/ }),
- /* 303 */
+ /* 260 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -118351,13 +93305,13 @@
/***/ }),
- /* 304 */
+ /* 261 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -118478,13 +93432,13 @@
/***/ }),
- /* 305 */
+ /* 262 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -118606,13 +93560,13 @@
/***/ }),
- /* 306 */
+ /* 263 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -118707,13 +93661,13 @@
/***/ }),
- /* 307 */
+ /* 264 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -118835,13 +93789,13 @@
/***/ }),
- /* 308 */
+ /* 265 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -118993,13 +93947,13 @@
/***/ }),
- /* 309 */
+ /* 266 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -119107,13 +94061,13 @@
/***/ }),
- /* 310 */
+ /* 267 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -119206,13 +94160,13 @@
/***/ }),
- /* 311 */
+ /* 268 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -119292,13 +94246,13 @@
/***/ }),
- /* 312 */
+ /* 269 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -119428,13 +94382,13 @@
/***/ }),
- /* 313 */
+ /* 270 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -119501,13 +94455,13 @@
/***/ }),
- /* 314 */
+ /* 271 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -119574,13 +94528,13 @@
/***/ }),
- /* 315 */
+ /* 272 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -119670,13 +94624,13 @@
/***/ }),
- /* 316 */
+ /* 273 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -119756,13 +94710,13 @@
/***/ }),
- /* 317 */
+ /* 274 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -119849,13 +94803,13 @@
/***/ }),
- /* 318 */
+ /* 275 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -119940,13 +94894,13 @@
/***/ }),
- /* 319 */
+ /* 276 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -120054,13 +95008,13 @@
/***/ }),
- /* 320 */
+ /* 277 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -120184,13 +95138,13 @@
/***/ }),
- /* 321 */
+ /* 278 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -120269,13 +95223,13 @@
/***/ }),
- /* 322 */
+ /* 279 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -120392,13 +95346,13 @@
/***/ }),
- /* 323 */
+ /* 280 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -120483,13 +95437,13 @@
/***/ }),
- /* 324 */
+ /* 281 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -120623,13 +95577,13 @@
/***/ }),
- /* 325 */
+ /* 282 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -120697,13 +95651,13 @@
/***/ }),
- /* 326 */
+ /* 283 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -120819,13 +95773,13 @@
/***/ }),
- /* 327 */
+ /* 284 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -120920,13 +95874,13 @@
/***/ }),
- /* 328 */
+ /* 285 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -121036,13 +95990,13 @@
/***/ }),
- /* 329 */
+ /* 286 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -121104,13 +96058,13 @@
/***/ }),
- /* 330 */
+ /* 287 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -121198,13 +96152,13 @@
/***/ }),
- /* 331 */
+ /* 288 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -121283,13 +96237,13 @@
/***/ }),
- /* 332 */
+ /* 289 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -121391,13 +96345,13 @@
/***/ }),
- /* 333 */
+ /* 290 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -121555,13 +96509,13 @@
/***/ }),
- /* 334 */
+ /* 291 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -121641,13 +96595,13 @@
/***/ }),
- /* 335 */
+ /* 292 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -121727,13 +96681,13 @@
/***/ }),
- /* 336 */
+ /* 293 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -121791,13 +96745,13 @@
/***/ }),
- /* 337 */
+ /* 294 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -121888,13 +96842,13 @@
/***/ }),
- /* 338 */
+ /* 295 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -121954,13 +96908,13 @@
/***/ }),
- /* 339 */
+ /* 296 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -122081,13 +97035,13 @@
/***/ }),
- /* 340 */
+ /* 297 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -122172,13 +97126,13 @@
/***/ }),
- /* 341 */
+ /* 298 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -122263,13 +97217,13 @@
/***/ }),
- /* 342 */
+ /* 299 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -122327,13 +97281,13 @@
/***/ }),
- /* 343 */
+ /* 300 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -122455,13 +97409,13 @@
/***/ }),
- /* 344 */
+ /* 301 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -122585,13 +97539,13 @@
/***/ }),
- /* 345 */
+ /* 302 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -122654,13 +97608,13 @@
/***/ }),
- /* 346 */
+ /* 303 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -122719,13 +97673,13 @@
/***/ }),
- /* 347 */
+ /* 304 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -122798,13 +97752,13 @@
/***/ }),
- /* 348 */
+ /* 305 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -122984,13 +97938,13 @@
/***/ }),
- /* 349 */
+ /* 306 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -123086,13 +98040,13 @@
/***/ }),
- /* 350 */
+ /* 307 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -123150,13 +98104,13 @@
/***/ }),
- /* 351 */
+ /* 308 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -123225,13 +98179,13 @@
/***/ }),
- /* 352 */
+ /* 309 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -123385,13 +98339,13 @@
/***/ }),
- /* 353 */
+ /* 310 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -123562,13 +98516,13 @@
/***/ }),
- /* 354 */
+ /* 311 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -123634,13 +98588,13 @@
/***/ }),
- /* 355 */
+ /* 312 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -123749,13 +98703,13 @@
/***/ }),
- /* 356 */
+ /* 313 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -123864,13 +98818,13 @@
/***/ }),
- /* 357 */
+ /* 314 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -123956,13 +98910,13 @@
/***/ }),
- /* 358 */
+ /* 315 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -124029,13 +98983,13 @@
/***/ }),
- /* 359 */
+ /* 316 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -124092,13 +99046,13 @@
/***/ }),
- /* 360 */
+ /* 317 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -124225,13 +99179,13 @@
/***/ }),
- /* 361 */
+ /* 318 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -124318,13 +99272,13 @@
/***/ }),
- /* 362 */
+ /* 319 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -124389,13 +99343,13 @@
/***/ }),
- /* 363 */
+ /* 320 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -124509,13 +99463,13 @@
/***/ }),
- /* 364 */
+ /* 321 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -124580,13 +99534,13 @@
/***/ }),
- /* 365 */
+ /* 322 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -124646,13 +99600,13 @@
/***/ }),
- /* 366 */
+ /* 323 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -124772,12 +99726,12 @@
/***/ }),
- /* 367 */
+ /* 324 */
/***/ (function(module, exports, __webpack_require__) {
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -124870,13 +99824,13 @@
/***/ }),
- /* 368 */
+ /* 325 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -124965,13 +99919,13 @@
/***/ }),
- /* 369 */
+ /* 326 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -125027,13 +99981,13 @@
/***/ }),
- /* 370 */
+ /* 327 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -125089,13 +100043,13 @@
/***/ }),
- /* 371 */
+ /* 328 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js language configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -125212,13 +100166,13 @@
/***/ }),
- /* 372 */
+ /* 329 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -125370,13 +100324,13 @@
/***/ }),
- /* 373 */
+ /* 330 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -125472,13 +100426,13 @@
/***/ }),
- /* 374 */
+ /* 331 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -125534,13 +100488,13 @@
/***/ }),
- /* 375 */
+ /* 332 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -125596,13 +100550,13 @@
/***/ }),
- /* 376 */
+ /* 333 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -125679,13 +100633,13 @@
/***/ }),
- /* 377 */
+ /* 334 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -125751,13 +100705,13 @@
/***/ }),
- /* 378 */
+ /* 335 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -125815,13 +100769,13 @@
/***/ }),
- /* 379 */
+ /* 336 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -125922,13 +100876,13 @@
/***/ }),
- /* 380 */
+ /* 337 */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
- true ? factory(__webpack_require__(3)) :
+ true ? factory(__webpack_require__(2)) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
@@ -126029,7 +100983,7 @@
/***/ }),
- /* 381 */
+ /* 338 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -126057,7 +101011,7 @@
module.exports = exports['default'];
/***/ }),
- /* 382 */
+ /* 339 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -126075,19 +101029,19 @@
var _propTypes2 = _interopRequireDefault(_propTypes);
- var _classnames = __webpack_require__(2);
+ var _classnames = __webpack_require__(3);
var _classnames2 = _interopRequireDefault(_classnames);
- var _DecadePanel = __webpack_require__(383);
+ var _DecadePanel = __webpack_require__(340);
var _DecadePanel2 = _interopRequireDefault(_DecadePanel);
- var _DateInput = __webpack_require__(72);
+ var _DateInput = __webpack_require__(61);
var _DateInput2 = _interopRequireDefault(_DateInput);
- var _moment = __webpack_require__(3);
+ var _moment = __webpack_require__(2);
var _moment2 = _interopRequireDefault(_moment);
@@ -126129,18 +101083,10 @@
var _this = _possibleConstructorReturn(this, _React$Component.call(this, props));
- _this.yearSelect = function (value) {
- var _this$props = _this.props,
- onSelect = _this$props.onSelect,
- format = _this$props.format;
-
- onSelect && onSelect(value, value ? value.format(format) : '');
- };
-
_this.onInputChange = function (value) {
- var _this$props2 = _this.props,
- onChange = _this$props2.onChange,
- format = _this$props2.format;
+ var _this$props = _this.props,
+ onChange = _this$props.onChange,
+ format = _this$props.format;
_this.setState({
value: value ? value : (0, _moment2["default"])()
@@ -126149,10 +101095,10 @@
};
_this.onClear = function () {
- var _this$props3 = _this.props,
- onChange = _this$props3.onChange,
- format = _this$props3.format,
- onClear = _this$props3.onClear;
+ var _this$props2 = _this.props,
+ onChange = _this$props2.onChange,
+ format = _this$props2.format,
+ onClear = _this$props2.onClear;
_this.setState({
value: (0, _moment2["default"])()
@@ -126286,8 +101232,7 @@
format: format,
onChange: this.onInputChange,
selectedValue: value,
- onClear: this.onClear,
- onSelect: this.yearSelect
+ onClear: this.onClear
}) : '',
_react2["default"].createElement(
'div',
@@ -126365,7 +101310,7 @@
module.exports = exports['default'];
/***/ }),
- /* 383 */
+ /* 340 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -126383,7 +101328,7 @@
var _propTypes2 = _interopRequireDefault(_propTypes);
- var _classnames = __webpack_require__(2);
+ var _classnames = __webpack_require__(3);
var _classnames2 = _interopRequireDefault(_classnames);
@@ -126578,7 +101523,7 @@
module.exports = exports['default'];
/***/ }),
- /* 384 */
+ /* 341 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -126602,23 +101547,23 @@
var _propTypes2 = _interopRequireDefault(_propTypes);
- var _mapSelf = __webpack_require__(381);
+ var _mapSelf = __webpack_require__(338);
var _mapSelf2 = _interopRequireDefault(_mapSelf);
- var _classnames = __webpack_require__(2);
+ var _classnames = __webpack_require__(3);
var _classnames2 = _interopRequireDefault(_classnames);
- var _TodayButton = __webpack_require__(385);
+ var _TodayButton = __webpack_require__(342);
var _TodayButton2 = _interopRequireDefault(_TodayButton);
- var _OkButton = __webpack_require__(386);
+ var _OkButton = __webpack_require__(343);
var _OkButton2 = _interopRequireDefault(_OkButton);
- var _TimePickerButton = __webpack_require__(387);
+ var _TimePickerButton = __webpack_require__(344);
var _TimePickerButton2 = _interopRequireDefault(_TimePickerButton);
@@ -126715,7 +101660,7 @@
module.exports = exports['default'];
/***/ }),
- /* 385 */
+ /* 342 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -126730,7 +101675,7 @@
var _react2 = _interopRequireDefault(_react);
- var _util = __webpack_require__(26);
+ var _util = __webpack_require__(27);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -126762,7 +101707,7 @@
module.exports = exports['default'];
/***/ }),
- /* 386 */
+ /* 343 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -126777,7 +101722,7 @@
var _react2 = _interopRequireDefault(_react);
- var _beeButton = __webpack_require__(935);
+ var _beeButton = __webpack_require__(19);
var _beeButton2 = _interopRequireDefault(_beeButton);
@@ -126807,7 +101752,7 @@
module.exports = exports['default'];
/***/ }),
- /* 387 */
+ /* 344 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -126822,7 +101767,7 @@
var _react2 = _interopRequireDefault(_react);
- var _classnames2 = __webpack_require__(2);
+ var _classnames2 = __webpack_require__(3);
var _classnames3 = _interopRequireDefault(_classnames2);
@@ -126858,7 +101803,7 @@
module.exports = exports['default'];
/***/ }),
- /* 388 */
+ /* 345 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -126878,15 +101823,15 @@
var _propTypes2 = _interopRequireDefault(_propTypes);
- var _classnames = __webpack_require__(2);
+ var _classnames = __webpack_require__(3);
var _classnames2 = _interopRequireDefault(_classnames);
- var _moment = __webpack_require__(3);
+ var _moment = __webpack_require__(2);
var _moment2 = _interopRequireDefault(_moment);
- var _index = __webpack_require__(26);
+ var _index = __webpack_require__(27);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
@@ -127015,7 +101960,7 @@
};
/***/ }),
- /* 389 */
+ /* 346 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -127058,7 +102003,7 @@
module.exports = exports['default'];
/***/ }),
- /* 390 */
+ /* 347 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -127094,20 +102039,90 @@
}
/***/ }),
- /* 391 */
+ /* 348 */
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
+
+ "use strict";
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(20);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__ = __webpack_require__(6);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass__ = __webpack_require__(21);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass__);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(7);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn__);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__ = __webpack_require__(8);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits__);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(0);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(1);
+ /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__);
+
+
+
+
+
+
+
+
+ var LazyRenderBox = function (_Component) {
+ __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_inherits___default()(LazyRenderBox, _Component);
+
+ function LazyRenderBox() {
+ __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default()(this, LazyRenderBox);
+
+ return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_possibleConstructorReturn___default()(this, (LazyRenderBox.__proto__ || Object.getPrototypeOf(LazyRenderBox)).apply(this, arguments));
+ }
+
+ __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_createClass___default()(LazyRenderBox, [{
+ key: 'shouldComponentUpdate',
+ value: function shouldComponentUpdate(nextProps) {
+ return nextProps.hiddenClassName || nextProps.visible;
+ }
+ }, {
+ key: 'render',
+ value: function render() {
+ var _props = this.props,
+ hiddenClassName = _props.hiddenClassName,
+ visible = _props.visible,
+ props = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['hiddenClassName', 'visible']);
+
+ if (hiddenClassName || __WEBPACK_IMPORTED_MODULE_5_react___default.a.Children.count(props.children) > 1) {
+ if (!visible && hiddenClassName) {
+ props.className += ' ' + hiddenClassName;
+ }
+ return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement('div', props);
+ }
+
+ return __WEBPACK_IMPORTED_MODULE_5_react___default.a.Children.only(props.children);
+ }
+ }]);
+
+ return LazyRenderBox;
+ }(__WEBPACK_IMPORTED_MODULE_5_react__["Component"]);
+
+ LazyRenderBox.propTypes = {
+ children: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
+ className: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
+ visible: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
+ hiddenClassName: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string
+ };
+
+
+ /* harmony default export */ __webpack_exports__["a"] = (LazyRenderBox);
+
+ /***/ }),
+ /* 349 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (immutable) */ __webpack_exports__["a"] = getAlignFromPlacement;
- /* harmony export (immutable) */ __webpack_exports__["b"] = getAlignPopupClassName;
+ /* harmony export (immutable) */ __webpack_exports__["b"] = getPopupClassNameFromAlign;
/* harmony export (immutable) */ __webpack_exports__["c"] = saveRef;
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(9);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);
- function isPointsEq(a1, a2, isAlignPoint) {
- if (isAlignPoint) {
- return a1[0] === a2[0];
- }
+ function isPointsEq(a1, a2) {
return a1[0] === a2[0] && a1[1] === a2[1];
}
@@ -127116,11 +102131,11 @@
return __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, baseAlign, align);
}
- function getAlignPopupClassName(builtinPlacements, prefixCls, align, isAlignPoint) {
+ function getPopupClassNameFromAlign(builtinPlacements, prefixCls, align) {
var points = align.points;
for (var placement in builtinPlacements) {
if (builtinPlacements.hasOwnProperty(placement)) {
- if (isPointsEq(builtinPlacements[placement].points, points, isAlignPoint)) {
+ if (isPointsEq(builtinPlacements[placement].points, points)) {
return prefixCls + '-placement-' + placement;
}
}
@@ -127133,93 +102148,7 @@
}
/***/ }),
- /* 392 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
-
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(14);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__ = __webpack_require__(6);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(7);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__ = __webpack_require__(8);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__(1);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__);
-
-
-
-
-
-
-
- var LazyRenderBox = function (_Component) {
- __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default()(LazyRenderBox, _Component);
-
- function LazyRenderBox() {
- __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default()(this, LazyRenderBox);
-
- return __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default()(this, _Component.apply(this, arguments));
- }
-
- LazyRenderBox.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {
- return nextProps.hiddenClassName || nextProps.visible;
- };
-
- LazyRenderBox.prototype.render = function render() {
- var _props = this.props,
- hiddenClassName = _props.hiddenClassName,
- visible = _props.visible,
- props = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['hiddenClassName', 'visible']);
-
- if (hiddenClassName || __WEBPACK_IMPORTED_MODULE_4_react___default.a.Children.count(props.children) > 1) {
- if (!visible && hiddenClassName) {
- props.className += ' ' + hiddenClassName;
- }
- return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('div', props);
- }
-
- return __WEBPACK_IMPORTED_MODULE_4_react___default.a.Children.only(props.children);
- };
-
- return LazyRenderBox;
- }(__WEBPACK_IMPORTED_MODULE_4_react__["Component"]);
-
- LazyRenderBox.propTypes = {
- children: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.any,
- className: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string,
- visible: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool,
- hiddenClassName: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string
- };
-
-
- /* harmony default export */ __webpack_exports__["a"] = (LazyRenderBox);
-
- /***/ }),
- /* 393 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _Icon = __webpack_require__(957);
-
- var _Icon2 = _interopRequireDefault(_Icon);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- exports["default"] = _Icon2["default"];
- module.exports = exports['default'];
-
- /***/ }),
- /* 394 */
+ /* 350 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -127280,7 +102209,7 @@
module.exports = exports['default'];
/***/ }),
- /* 395 */
+ /* 351 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -127325,7 +102254,7 @@
module.exports = exports['default'];
/***/ }),
- /* 396 */
+ /* 352 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -127700,378 +102629,7 @@
}
/***/ }),
- /* 397 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.destroyFns = undefined;
-
- var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
-
- var _extends2;
-
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
- var _classnames = __webpack_require__(2);
-
- var _classnames2 = _interopRequireDefault(_classnames);
-
- var _events = __webpack_require__(989);
-
- var _events2 = _interopRequireDefault(_events);
-
- var _ownerDocument = __webpack_require__(994);
-
- var _ownerDocument2 = _interopRequireDefault(_ownerDocument);
-
- var _inDOM = __webpack_require__(35);
-
- var _inDOM2 = _interopRequireDefault(_inDOM);
-
- var _scrollbarSize = __webpack_require__(995);
-
- var _scrollbarSize2 = _interopRequireDefault(_scrollbarSize);
-
- var _react = __webpack_require__(0);
-
- var _react2 = _interopRequireDefault(_react);
-
- var _reactDom = __webpack_require__(4);
-
- var _reactDom2 = _interopRequireDefault(_reactDom);
-
- var _Modal = __webpack_require__(132);
-
- var _Modal2 = _interopRequireDefault(_Modal);
-
- var _isOverflowing = __webpack_require__(89);
-
- var _isOverflowing2 = _interopRequireDefault(_isOverflowing);
-
- var _tinperBeeCore = __webpack_require__(5);
-
- var _beeDnd = __webpack_require__(57);
-
- var _beeDnd2 = _interopRequireDefault(_beeDnd);
-
- var _beeTransition = __webpack_require__(996);
-
- var _ModalBody = __webpack_require__(1007);
-
- var _ModalBody2 = _interopRequireDefault(_ModalBody);
-
- var _ModalDialog = __webpack_require__(1008);
-
- var _ModalDialog2 = _interopRequireDefault(_ModalDialog);
-
- var _ModalFooter = __webpack_require__(1009);
-
- var _ModalFooter2 = _interopRequireDefault(_ModalFooter);
-
- var _ModalHeader = __webpack_require__(1010);
-
- var _ModalHeader2 = _interopRequireDefault(_ModalHeader);
-
- var _ModalTitle = __webpack_require__(1011);
-
- var _ModalTitle2 = _interopRequireDefault(_ModalTitle);
-
- var _propTypes = __webpack_require__(1);
-
- var _propTypes2 = _interopRequireDefault(_propTypes);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
-
- function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
-
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
-
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
-
- var propTypes = _extends({}, _Modal2["default"].propTypes, _ModalDialog2["default"].propTypes, (_extends2 = {
-
- /**
- * 是否弹出遮罩层/遮罩层点击是否触发关闭
- */
- backdrop: _propTypes2["default"].oneOf(['static', true, false]),
-
- /**
- * 点击遮罩层是否允许关闭
- */
- backdropClosable: _propTypes2["default"].bool,
- /**
- * esc触发关闭
- */
- keyboard: _propTypes2["default"].bool,
-
- /**
- * 显隐时是否使用动画
- */
- animation: _propTypes2["default"].bool,
-
- /**
- * 传递给模态框的样式
- */
- dialogComponentClass: _tinperBeeCore.elementType,
-
- /**
- * 自动设置焦点
- */
- autoFocus: _propTypes2["default"].bool,
-
- /**
- * 防止打开时焦点离开模态框
- */
- enforceFocus: _propTypes2["default"].bool,
-
- /**
- * 是否打开模态框
- */
- show: _propTypes2["default"].bool,
-
- /**
- * 关闭时的钩子函数
- */
- onHide: _propTypes2["default"].func,
-
- onEnter: _propTypes2["default"].func,
-
- onEntering: _propTypes2["default"].func,
-
- onEntered: _propTypes2["default"].func,
-
- onExit: _propTypes2["default"].func,
-
- onExiting: _propTypes2["default"].func,
-
- onExited: _propTypes2["default"].func,
-
- containerClassName: _propTypes2["default"].string
- }, _defineProperty(_extends2, 'containerClassName', _propTypes2["default"].string), _defineProperty(_extends2, 'container', _Modal2["default"].propTypes.container), _defineProperty(_extends2, 'size', _propTypes2["default"].oneOf(["sm", "lg", "xlg", ""])), _defineProperty(_extends2, 'width', _propTypes2["default"].oneOfType([_propTypes2["default"].number, _propTypes2["default"].string])), _defineProperty(_extends2, 'draggable', _propTypes2["default"].bool), _extends2));
-
- var defaultProps = _extends({}, _Modal2["default"].defaultProps, {
- backdropClosable: true,
- animation: true,
- dialogComponentClass: _ModalDialog2["default"],
- draggable: false,
- clsPrefix: 'u-modal'
- });
-
- var ModalFuncProps = {
- prefixCls: _propTypes2["default"].string,
- className: _propTypes2["default"].string,
- show: _propTypes2["default"].bool,
- title: _react2["default"].ReactNode,
- content: _react2["default"].ReactNode,
- onOk: _propTypes2["default"].func,
- onCancel: _propTypes2["default"].func,
- width: _propTypes2["default"].oneOfType([_propTypes2["default"].number, _propTypes2["default"].string]),
- okText: _propTypes2["default"].string,
- okType: _propTypes2["default"].string,
- cancelText: _propTypes2["default"].string,
- icon: _react2["default"].ReactNode,
- backdrop: _propTypes2["default"].oneOf(['static', true, false])
- };
-
- var ModalFunc = function ModalFunc(props) {
- destroy = function destroy() {};
- update = function update(newConfig) {};
- };
-
- var destroyFns = exports.destroyFns = [];
-
- var childContextTypes = {
- $u_modal: _propTypes2["default"].shape({
- onHide: _propTypes2["default"].func
- })
- };
-
- var Modal = function (_React$Component) {
- _inherits(Modal, _React$Component);
-
- function Modal(props, context) {
- _classCallCheck(this, Modal);
-
- var _this = _possibleConstructorReturn(this, _React$Component.call(this, props, context));
-
- _this.handleEntering = _this.handleEntering.bind(_this);
- _this.handleExited = _this.handleExited.bind(_this);
- _this.handleWindowResize = _this.handleWindowResize.bind(_this);
- _this.handleDialogClick = _this.handleDialogClick.bind(_this);
-
- _this.state = {
- style: {}
- };
- return _this;
- }
-
- Modal.prototype.getChildContext = function getChildContext() {
- return {
- $u_modal: {
- onHide: this.props.onHide
- }
- };
- };
-
- Modal.prototype.componentWillUnmount = function componentWillUnmount() {
- // Clean up the listener if we need to.
- this.handleExited();
- };
-
- Modal.prototype.handleEntering = function handleEntering() {
- // FIXME: This should work even when animation is disabled.
- _events2["default"].on(window, 'resize', this.handleWindowResize);
- this.updateStyle();
- };
-
- Modal.prototype.handleExited = function handleExited() {
- // FIXME: This should work even when animation is disabled.
- _events2["default"].off(window, 'resize', this.handleWindowResize);
- };
-
- Modal.prototype.handleWindowResize = function handleWindowResize() {
- this.updateStyle();
- };
-
- Modal.prototype.handleDialogClick = function handleDialogClick(e) {
- if (e.target !== e.currentTarget) {
- return;
- }
-
- this.props.onHide();
- };
-
- Modal.prototype.updateStyle = function updateStyle() {
- if (!_inDOM2["default"] || !this._modal) {
- return;
- }
-
- var dialogNode = this._modal.getDialogElement();
- var dialogHeight = dialogNode.scrollHeight;
-
- var document = (0, _ownerDocument2["default"])(dialogNode);
- var bodyIsOverflowing = (0, _isOverflowing2["default"])(_reactDom2["default"].findDOMNode(this.props.container || document.body));
- var modalIsOverflowing = dialogHeight > document.documentElement.clientHeight;
-
- this.setState({
- style: {
- paddingRight: bodyIsOverflowing && !modalIsOverflowing ? (0, _scrollbarSize2["default"])() : undefined,
- paddingLeft: !bodyIsOverflowing && modalIsOverflowing ? (0, _scrollbarSize2["default"])() : undefined
- }
- });
- };
-
- Modal.prototype.render = function render() {
- var _this2 = this;
-
- var _props = this.props,
- backdrop = _props.backdrop,
- backdropClosable = _props.backdropClosable,
- animation = _props.animation,
- show = _props.show,
- Dialog = _props.dialogComponentClass,
- className = _props.className,
- clsPrefix = _props.clsPrefix,
- _props$style = _props.style,
- style = _props$style === undefined ? {} : _props$style,
- size = _props.size,
- width = _props.width,
- children = _props.children,
- onEntering = _props.onEntering,
- onExited = _props.onExited,
- backdropClassName = _props.backdropClassName,
- containerClassName = _props.containerClassName,
- draggable = _props.draggable,
- props = _objectWithoutProperties(_props, ['backdrop', 'backdropClosable', 'animation', 'show', 'dialogComponentClass', 'className', 'clsPrefix', 'style', 'size', 'width', 'children', 'onEntering', 'onExited', 'backdropClassName', 'containerClassName', 'draggable']);
-
- var _splitComponent = (0, _tinperBeeCore.splitComponent)(props, _Modal2["default"]),
- _splitComponent2 = _slicedToArray(_splitComponent, 2),
- baseModalProps = _splitComponent2[0],
- dialogProps = _splitComponent2[1];
-
- var inClassName = show && !animation && 'in';
-
- var backdropClasses = _defineProperty({}, clsPrefix + '-backdrop', true);
- var containerClasses = _defineProperty({}, clsPrefix + '-open', true);
- if (Number(width)) width += 'px';
-
- var styleRes = _extends({}, this.state.style, style);
- if (width) {
- _extends(styleRes, { width: width });
- }
- return _react2["default"].createElement(
- _Modal2["default"],
- _extends({}, baseModalProps, {
- ref: function ref(c) {
- _this2._modal = c;
- },
- show: show,
- onEntering: (0, _tinperBeeCore.createChainedFunction)(onEntering, this.handleEntering),
- onExited: (0, _tinperBeeCore.createChainedFunction)(onExited, this.handleExited),
- backdrop: backdrop,
- backdropClassName: (0, _classnames2["default"])(backdropClasses, inClassName),
- containerClassName: (0, _classnames2["default"])(containerClasses, containerClassName),
- transition: animation ? _beeTransition.Fade : undefined,
- dialogTransitionTimeout: Modal.TRANSITION_DURATION,
- backdropTransitionTimeout: Modal.BACKDROP_TRANSITION_DURATION
- }),
- _react2["default"].createElement(
- Dialog,
- _extends({}, dialogProps, {
- style: styleRes,
- className: (0, _classnames2["default"])(className, inClassName, backdropClassName),
- onClick: backdrop === true && !!backdropClosable ? this.handleDialogClick : null,
- size: size,
- draggable: draggable
- }),
- children
- )
- );
- };
-
- return Modal;
- }(_react2["default"].Component);
-
- Modal.info = ModalFunc;
- Modal.success = ModalFunc;
- Modal.error = ModalFunc;
- Modal.warn = ModalFunc;
- Modal.warning = ModalFunc;
- Modal.confirm = ModalFunc;
-
- Modal.destroyAll = function () {
- return;
- };
-
- Modal.propTypes = propTypes;
- Modal.defaultProps = defaultProps;
- Modal.childContextTypes = childContextTypes;
-
- Modal.Body = _ModalBody2["default"];
- Modal.Header = _ModalHeader2["default"];
- Modal.Title = _ModalTitle2["default"];
- Modal.Footer = _ModalFooter2["default"];
-
- Modal.Dialog = _ModalDialog2["default"];
-
- Modal.TRANSITION_DURATION = 200000;
- Modal.BACKDROP_TRANSITION_DURATION = 10000;
-
- exports["default"] = Modal;
-
- /***/ }),
- /* 398 */
+ /* 353 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -128081,7 +102639,7 @@
value: true
});
- var _inDOM = __webpack_require__(35);
+ var _inDOM = __webpack_require__(37);
var _inDOM2 = _interopRequireDefault(_inDOM);
@@ -128102,7 +102660,7 @@
module.exports = exports['default'];
/***/ }),
- /* 399 */
+ /* 354 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -128113,7 +102671,7 @@
});
exports.transitionEnd = exports.transitionDuration = exports.transitionDelay = exports.transitionTiming = exports.transitionProperty = exports.transform = undefined;
- var _inDOM = __webpack_require__(35);
+ var _inDOM = __webpack_require__(37);
var _inDOM2 = _interopRequireDefault(_inDOM);
@@ -128184,7 +102742,7 @@
}
/***/ }),
- /* 400 */
+ /* 355 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -128195,7 +102753,7 @@
});
exports.default = camelizeStyleName;
- var _camelize = __webpack_require__(999);
+ var _camelize = __webpack_require__(893);
var _camelize2 = _interopRequireDefault(_camelize);
@@ -128212,27 +102770,7 @@
module.exports = exports['default'];
/***/ }),
- /* 401 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _Button = __webpack_require__(1013);
-
- var _Button2 = _interopRequireDefault(_Button);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- exports["default"] = _Button2["default"];
- module.exports = exports['default'];
-
- /***/ }),
- /* 402 */
+ /* 356 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {/**
@@ -128613,10 +103151,10 @@
module.exports = debounce;
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(24)))
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(43)))
/***/ }),
- /* 403 */
+ /* 357 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -128634,11 +103172,11 @@
var _react2 = _interopRequireDefault(_react);
- var _classnames = __webpack_require__(2);
+ var _classnames = __webpack_require__(3);
var _classnames2 = _interopRequireDefault(_classnames);
- var _splitObject3 = __webpack_require__(404);
+ var _splitObject3 = __webpack_require__(358);
var _splitObject4 = _interopRequireDefault(_splitObject3);
@@ -128729,7 +103267,7 @@
module.exports = exports['default'];
/***/ }),
- /* 404 */
+ /* 358 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -128754,7 +103292,7 @@
module.exports = exports["default"];
/***/ }),
- /* 405 */
+ /* 359 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -128764,7 +103302,7 @@
value: true
});
- var _Transfer = __webpack_require__(1038);
+ var _Transfer = __webpack_require__(928);
var _Transfer2 = _interopRequireDefault(_Transfer);
@@ -128774,7 +103312,7 @@
module.exports = exports['default'];
/***/ }),
- /* 406 */
+ /* 360 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -128788,11 +103326,11 @@
var _react2 = _interopRequireDefault(_react);
- var _beeIcon = __webpack_require__(149);
+ var _beeIcon = __webpack_require__(14);
var _beeIcon2 = _interopRequireDefault(_beeIcon);
- var _beeFormControl = __webpack_require__(1041);
+ var _beeFormControl = __webpack_require__(15);
var _beeFormControl2 = _interopRequireDefault(_beeFormControl);
@@ -128888,54 +103426,54 @@
module.exports = exports['default'];
/***/ }),
- /* 407 */
+ /* 361 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
- /**
- * Copyright 2013-present, Facebook, Inc.
- * All rights reserved.
- *
- * This source code is licensed under the BSD-style license found in the
- * LICENSE file in the root directory of this source tree. An additional grant
- * of patent rights can be found in the PATENTS file in the same directory.
- *
- * @providesModule ReactComponentWithPureRenderMixin
+ /**
+ * Copyright 2013-present, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ *
+ * @providesModule ReactComponentWithPureRenderMixin
*/
- var shallowEqual = __webpack_require__(1043);
+ var shallowEqual = __webpack_require__(930);
function shallowCompare(instance, nextProps, nextState) {
return !shallowEqual(instance.props, nextProps) || !shallowEqual(instance.state, nextState);
}
- /**
- * If your React component's render function is "pure", e.g. it will render the
- * same result given the same props and state, provide this mixin for a
- * considerable performance boost.
- *
- * Most React components have pure render functions.
- *
- * Example:
- *
- * var ReactComponentWithPureRenderMixin =
- * require('ReactComponentWithPureRenderMixin');
- * React.createClass({
- * mixins: [ReactComponentWithPureRenderMixin],
- *
- * render: function() {
- * return foo
;
- * }
- * });
- *
- * Note: This only checks shallow equality for props and state. If these contain
- * complex data structures this mixin may have false-negatives for deeper
- * differences. Only mixin to components which have simple props and state, or
- * use `forceUpdate()` when you know deep data structures have changed.
- *
- * See https://facebook.github.io/react/docs/pure-render-mixin.html
+ /**
+ * If your React component's render function is "pure", e.g. it will render the
+ * same result given the same props and state, provide this mixin for a
+ * considerable performance boost.
+ *
+ * Most React components have pure render functions.
+ *
+ * Example:
+ *
+ * var ReactComponentWithPureRenderMixin =
+ * require('ReactComponentWithPureRenderMixin');
+ * React.createClass({
+ * mixins: [ReactComponentWithPureRenderMixin],
+ *
+ * render: function() {
+ * return foo
;
+ * }
+ * });
+ *
+ * Note: This only checks shallow equality for props and state. If these contain
+ * complex data structures this mixin may have false-negatives for deeper
+ * differences. Only mixin to components which have simple props and state, or
+ * use `forceUpdate()` when you know deep data structures have changed.
+ *
+ * See https://facebook.github.io/react/docs/pure-render-mixin.html
*/
var ReactComponentWithPureRenderMixin = {
shouldComponentUpdate: function shouldComponentUpdate(nextProps, nextState) {
@@ -128946,7 +103484,7 @@
module.exports = ReactComponentWithPureRenderMixin;
/***/ }),
- /* 408 */
+ /* 362 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -128956,11 +103494,11 @@
value: true
});
- var _Checkbox = __webpack_require__(409);
+ var _Checkbox = __webpack_require__(363);
var _Checkbox2 = _interopRequireDefault(_Checkbox);
- var _CheckboxGroup = __webpack_require__(1051);
+ var _CheckboxGroup = __webpack_require__(938);
var _CheckboxGroup2 = _interopRequireDefault(_CheckboxGroup);
@@ -128971,7 +103509,7 @@
module.exports = exports['default'];
/***/ }),
- /* 409 */
+ /* 363 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -128983,7 +103521,7 @@
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
- var _classnames = __webpack_require__(2);
+ var _classnames = __webpack_require__(3);
var _classnames2 = _interopRequireDefault(_classnames);
@@ -129168,7 +103706,7 @@
module.exports = exports['default'];
/***/ }),
- /* 410 */
+ /* 364 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -129219,7 +103757,7 @@
module.exports = exports['default'];
/***/ }),
- /* 411 */
+ /* 365 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -129241,11 +103779,11 @@
var _propTypes2 = _interopRequireDefault(_propTypes);
- var _addEventListener = __webpack_require__(1068);
+ var _addEventListener = __webpack_require__(953);
var _addEventListener2 = _interopRequireDefault(_addEventListener);
- var _classnames = __webpack_require__(2);
+ var _classnames = __webpack_require__(3);
var _classnames2 = _interopRequireDefault(_classnames);
@@ -129253,19 +103791,19 @@
var _warning2 = _interopRequireDefault(_warning);
- var _Steps = __webpack_require__(1069);
+ var _Steps = __webpack_require__(954);
var _Steps2 = _interopRequireDefault(_Steps);
- var _Marks = __webpack_require__(1070);
+ var _Marks = __webpack_require__(955);
var _Marks2 = _interopRequireDefault(_Marks);
- var _Handle = __webpack_require__(150);
+ var _Handle = __webpack_require__(127);
var _Handle2 = _interopRequireDefault(_Handle);
- var _utils = __webpack_require__(151);
+ var _utils = __webpack_require__(128);
var utils = _interopRequireWildcard(_utils);
@@ -129630,1900 +104168,67 @@
}), _temp;
}
module.exports = exports['default'];
- /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(10)))
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(12)))
/***/ }),
- /* 412 */
+ /* 366 */
/***/ (function(module, exports, __webpack_require__) {
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.destroyFns = undefined;
-
- var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
-
- var _extends2;
-
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
- var _classnames = __webpack_require__(2);
-
- var _classnames2 = _interopRequireDefault(_classnames);
-
- var _events = __webpack_require__(1113);
-
- var _events2 = _interopRequireDefault(_events);
-
- var _ownerDocument = __webpack_require__(1118);
-
- var _ownerDocument2 = _interopRequireDefault(_ownerDocument);
-
- var _inDOM = __webpack_require__(36);
-
- var _inDOM2 = _interopRequireDefault(_inDOM);
-
- var _scrollbarSize = __webpack_require__(1119);
-
- var _scrollbarSize2 = _interopRequireDefault(_scrollbarSize);
-
- var _react = __webpack_require__(0);
-
- var _react2 = _interopRequireDefault(_react);
-
- var _reactDom = __webpack_require__(4);
-
- var _reactDom2 = _interopRequireDefault(_reactDom);
-
- var _Modal = __webpack_require__(132);
-
- var _Modal2 = _interopRequireDefault(_Modal);
-
- var _isOverflowing = __webpack_require__(89);
-
- var _isOverflowing2 = _interopRequireDefault(_isOverflowing);
-
- var _tinperBeeCore = __webpack_require__(5);
-
- var _beeDnd = __webpack_require__(57);
-
- var _beeDnd2 = _interopRequireDefault(_beeDnd);
-
- var _beeTransition = __webpack_require__(1120);
-
- var _ModalBody = __webpack_require__(1131);
-
- var _ModalBody2 = _interopRequireDefault(_ModalBody);
-
- var _ModalDialog = __webpack_require__(1132);
-
- var _ModalDialog2 = _interopRequireDefault(_ModalDialog);
-
- var _ModalFooter = __webpack_require__(1133);
-
- var _ModalFooter2 = _interopRequireDefault(_ModalFooter);
-
- var _ModalHeader = __webpack_require__(1134);
-
- var _ModalHeader2 = _interopRequireDefault(_ModalHeader);
-
- var _ModalTitle = __webpack_require__(1135);
-
- var _ModalTitle2 = _interopRequireDefault(_ModalTitle);
-
- var _propTypes = __webpack_require__(1);
-
- var _propTypes2 = _interopRequireDefault(_propTypes);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
-
- function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
-
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
-
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
-
- var propTypes = _extends({}, _Modal2["default"].propTypes, _ModalDialog2["default"].propTypes, (_extends2 = {
-
- /**
- * 是否弹出遮罩层/遮罩层点击是否触发关闭
- */
- backdrop: _propTypes2["default"].oneOf(['static', true, false]),
-
- /**
- * 点击遮罩层是否允许关闭
- */
- backdropClosable: _propTypes2["default"].bool,
- /**
- * esc触发关闭
- */
- keyboard: _propTypes2["default"].bool,
-
- /**
- * 显隐时是否使用动画
- */
- animation: _propTypes2["default"].bool,
-
- /**
- * 传递给模态框的样式
- */
- dialogComponentClass: _tinperBeeCore.elementType,
-
- /**
- * 自动设置焦点
- */
- autoFocus: _propTypes2["default"].bool,
-
- /**
- * 防止打开时焦点离开模态框
- */
- enforceFocus: _propTypes2["default"].bool,
-
- /**
- * 是否打开模态框
- */
- show: _propTypes2["default"].bool,
-
- /**
- * 关闭时的钩子函数
- */
- onHide: _propTypes2["default"].func,
-
- onEnter: _propTypes2["default"].func,
-
- onEntering: _propTypes2["default"].func,
-
- onEntered: _propTypes2["default"].func,
-
- onExit: _propTypes2["default"].func,
-
- onExiting: _propTypes2["default"].func,
-
- onExited: _propTypes2["default"].func,
-
- containerClassName: _propTypes2["default"].string
- }, _defineProperty(_extends2, 'containerClassName', _propTypes2["default"].string), _defineProperty(_extends2, 'container', _Modal2["default"].propTypes.container), _defineProperty(_extends2, 'size', _propTypes2["default"].oneOf(["sm", "lg", "xlg", ""])), _defineProperty(_extends2, 'width', _propTypes2["default"].oneOfType([_propTypes2["default"].number, _propTypes2["default"].string])), _defineProperty(_extends2, 'draggable', _propTypes2["default"].bool), _extends2));
-
- var defaultProps = _extends({}, _Modal2["default"].defaultProps, {
- backdropClosable: true,
- animation: true,
- dialogComponentClass: _ModalDialog2["default"],
- draggable: false,
- clsPrefix: 'u-modal'
- });
-
- var ModalFuncProps = {
- prefixCls: _propTypes2["default"].string,
- className: _propTypes2["default"].string,
- show: _propTypes2["default"].bool,
- title: _react2["default"].ReactNode,
- content: _react2["default"].ReactNode,
- onOk: _propTypes2["default"].func,
- onCancel: _propTypes2["default"].func,
- width: _propTypes2["default"].oneOfType([_propTypes2["default"].number, _propTypes2["default"].string]),
- okText: _propTypes2["default"].string,
- okType: _propTypes2["default"].string,
- cancelText: _propTypes2["default"].string,
- icon: _react2["default"].ReactNode,
- backdrop: _propTypes2["default"].oneOf(['static', true, false])
- };
-
- var ModalFunc = function ModalFunc(props) {
- destroy = function destroy() {};
- update = function update(newConfig) {};
- };
-
- var destroyFns = exports.destroyFns = [];
-
- var childContextTypes = {
- $u_modal: _propTypes2["default"].shape({
- onHide: _propTypes2["default"].func
- })
- };
-
- var Modal = function (_React$Component) {
- _inherits(Modal, _React$Component);
-
- function Modal(props, context) {
- _classCallCheck(this, Modal);
-
- var _this = _possibleConstructorReturn(this, _React$Component.call(this, props, context));
-
- _this.handleEntering = _this.handleEntering.bind(_this);
- _this.handleExited = _this.handleExited.bind(_this);
- _this.handleWindowResize = _this.handleWindowResize.bind(_this);
- _this.handleDialogClick = _this.handleDialogClick.bind(_this);
-
- _this.state = {
- style: {}
- };
- return _this;
- }
-
- Modal.prototype.getChildContext = function getChildContext() {
- return {
- $u_modal: {
- onHide: this.props.onHide
- }
- };
- };
-
- Modal.prototype.componentWillUnmount = function componentWillUnmount() {
- // Clean up the listener if we need to.
- this.handleExited();
- };
-
- Modal.prototype.handleEntering = function handleEntering() {
- // FIXME: This should work even when animation is disabled.
- _events2["default"].on(window, 'resize', this.handleWindowResize);
- this.updateStyle();
- };
-
- Modal.prototype.handleExited = function handleExited() {
- // FIXME: This should work even when animation is disabled.
- _events2["default"].off(window, 'resize', this.handleWindowResize);
- };
-
- Modal.prototype.handleWindowResize = function handleWindowResize() {
- this.updateStyle();
- };
-
- Modal.prototype.handleDialogClick = function handleDialogClick(e) {
- if (e.target !== e.currentTarget) {
- return;
- }
-
- this.props.onHide();
- };
-
- Modal.prototype.updateStyle = function updateStyle() {
- if (!_inDOM2["default"] || !this._modal) {
- return;
- }
-
- var dialogNode = this._modal.getDialogElement();
- var dialogHeight = dialogNode.scrollHeight;
-
- var document = (0, _ownerDocument2["default"])(dialogNode);
- var bodyIsOverflowing = (0, _isOverflowing2["default"])(_reactDom2["default"].findDOMNode(this.props.container || document.body));
- var modalIsOverflowing = dialogHeight > document.documentElement.clientHeight;
-
- this.setState({
- style: {
- paddingRight: bodyIsOverflowing && !modalIsOverflowing ? (0, _scrollbarSize2["default"])() : undefined,
- paddingLeft: !bodyIsOverflowing && modalIsOverflowing ? (0, _scrollbarSize2["default"])() : undefined
- }
- });
- };
-
- Modal.prototype.render = function render() {
- var _this2 = this;
-
- var _props = this.props,
- backdrop = _props.backdrop,
- backdropClosable = _props.backdropClosable,
- animation = _props.animation,
- show = _props.show,
- Dialog = _props.dialogComponentClass,
- className = _props.className,
- clsPrefix = _props.clsPrefix,
- _props$style = _props.style,
- style = _props$style === undefined ? {} : _props$style,
- size = _props.size,
- width = _props.width,
- children = _props.children,
- onEntering = _props.onEntering,
- onExited = _props.onExited,
- backdropClassName = _props.backdropClassName,
- containerClassName = _props.containerClassName,
- draggable = _props.draggable,
- props = _objectWithoutProperties(_props, ['backdrop', 'backdropClosable', 'animation', 'show', 'dialogComponentClass', 'className', 'clsPrefix', 'style', 'size', 'width', 'children', 'onEntering', 'onExited', 'backdropClassName', 'containerClassName', 'draggable']);
-
- var _splitComponent = (0, _tinperBeeCore.splitComponent)(props, _Modal2["default"]),
- _splitComponent2 = _slicedToArray(_splitComponent, 2),
- baseModalProps = _splitComponent2[0],
- dialogProps = _splitComponent2[1];
-
- var inClassName = show && !animation && 'in';
-
- var backdropClasses = _defineProperty({}, clsPrefix + '-backdrop', true);
- var containerClasses = _defineProperty({}, clsPrefix + '-open', true);
- if (Number(width)) width += 'px';
-
- var styleRes = _extends({}, this.state.style, style);
- if (width) {
- _extends(styleRes, { width: width });
- }
- return _react2["default"].createElement(
- _Modal2["default"],
- _extends({}, baseModalProps, {
- ref: function ref(c) {
- _this2._modal = c;
- },
- show: show,
- onEntering: (0, _tinperBeeCore.createChainedFunction)(onEntering, this.handleEntering),
- onExited: (0, _tinperBeeCore.createChainedFunction)(onExited, this.handleExited),
- backdrop: backdrop,
- backdropClassName: (0, _classnames2["default"])(backdropClasses, inClassName),
- containerClassName: (0, _classnames2["default"])(containerClasses, containerClassName),
- transition: animation ? _beeTransition.Fade : undefined,
- dialogTransitionTimeout: Modal.TRANSITION_DURATION,
- backdropTransitionTimeout: Modal.BACKDROP_TRANSITION_DURATION
- }),
- _react2["default"].createElement(
- Dialog,
- _extends({}, dialogProps, {
- style: styleRes,
- className: (0, _classnames2["default"])(className, inClassName, backdropClassName),
- onClick: backdrop === true && !!backdropClosable ? this.handleDialogClick : null,
- size: size,
- draggable: draggable
- }),
- children
- )
- );
- };
-
- return Modal;
- }(_react2["default"].Component);
-
- Modal.info = ModalFunc;
- Modal.success = ModalFunc;
- Modal.error = ModalFunc;
- Modal.warn = ModalFunc;
- Modal.warning = ModalFunc;
- Modal.confirm = ModalFunc;
-
- Modal.destroyAll = function () {
- return;
- };
-
- Modal.propTypes = propTypes;
- Modal.defaultProps = defaultProps;
- Modal.childContextTypes = childContextTypes;
-
- Modal.Body = _ModalBody2["default"];
- Modal.Header = _ModalHeader2["default"];
- Modal.Title = _ModalTitle2["default"];
- Modal.Footer = _ModalFooter2["default"];
-
- Modal.Dialog = _ModalDialog2["default"];
-
- Modal.TRANSITION_DURATION = 200000;
- Modal.BACKDROP_TRANSITION_DURATION = 10000;
-
- exports["default"] = Modal;
-
- /***/ }),
- /* 413 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _inDOM = __webpack_require__(36);
-
- var _inDOM2 = _interopRequireDefault(_inDOM);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
- var off = function off() {};
- if (_inDOM2.default) {
- off = function () {
- if (document.addEventListener) return function (node, eventName, handler, capture) {
- return node.removeEventListener(eventName, handler, capture || false);
- };else if (document.attachEvent) return function (node, eventName, handler) {
- return node.detachEvent('on' + eventName, handler);
- };
- }();
- }
-
- exports.default = off;
- module.exports = exports['default'];
-
- /***/ }),
- /* 414 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.transitionEnd = exports.transitionDuration = exports.transitionDelay = exports.transitionTiming = exports.transitionProperty = exports.transform = undefined;
-
- var _inDOM = __webpack_require__(36);
-
- var _inDOM2 = _interopRequireDefault(_inDOM);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
- var transform = 'transform';
- var prefix = void 0,
- transitionEnd = void 0;
- var transitionTiming = void 0,
- transitionDuration = void 0;
- var transitionProperty = void 0,
- transitionDelay = void 0;
-
- if (_inDOM2.default) {
- var _getTransitionPropert = getTransitionProperties();
-
- prefix = _getTransitionPropert.prefix;
- exports.transitionEnd = transitionEnd = _getTransitionPropert.transitionEnd;
-
-
- exports.transform = transform = prefix + '-' + transform;
- exports.transitionProperty = transitionProperty = prefix + '-transition-property';
- exports.transitionDuration = transitionDuration = prefix + '-transition-duration';
- exports.transitionDelay = transitionDelay = prefix + '-transition-delay';
- exports.transitionTiming = transitionTiming = prefix + '-transition-timing-function';
- }
-
- exports.transform = transform;
- exports.transitionProperty = transitionProperty;
- exports.transitionTiming = transitionTiming;
- exports.transitionDelay = transitionDelay;
- exports.transitionDuration = transitionDuration;
- exports.transitionEnd = transitionEnd;
- exports.default = {
- transform: transform,
- end: transitionEnd,
- property: transitionProperty,
- timing: transitionTiming,
- delay: transitionDelay,
- duration: transitionDuration
- };
-
-
- function getTransitionProperties() {
- var transitionEnd = void 0;
- var prefix = '';
- var eventNames = {
- O: 'otransitionend',
- Moz: 'transitionend',
- Webkit: 'webkitTransitionEnd',
- ms: 'MSTransitionEnd'
- };
-
- var element = document.createElement('div');
- for (var vendor in eventNames) {
- if (eventNames.hasOwnProperty(vendor)) {
- if (element.style[vendor + 'TransitionProperty'] !== undefined) {
- prefix = '-' + vendor.toLowerCase();
- transitionEnd = eventNames[vendor];
- break;
- }
- }
- }if (!transitionEnd && element.style.transitionProperty !== undefined) transitionEnd = 'transitionend';
-
- element = null;
-
- return { transitionEnd: transitionEnd, prefix: prefix };
- }
-
- /***/ }),
- /* 415 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = camelizeStyleName;
-
- var _camelize = __webpack_require__(1123);
-
- var _camelize2 = _interopRequireDefault(_camelize);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
- var msPattern = /^-ms-/; /**
- * Copyright 2014-2015, Facebook, Inc.
- * All rights reserved.
- * https://github.com/facebook/react/blob/2aeb8a2a6beb00617a4217f7f8284924fa2ad819/src/vendor/core/camelizeStyleName.js
- */
- function camelizeStyleName(string) {
- return (0, _camelize2.default)(string.replace(msPattern, 'ms-'));
- }
- module.exports = exports['default'];
-
- /***/ }),
- /* 416 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
-
- "use strict";
- Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Menu__ = __webpack_require__(1140);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__SubMenu__ = __webpack_require__(418);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__MenuItem__ = __webpack_require__(1146);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__MenuItemGroup__ = __webpack_require__(1147);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__Divider__ = __webpack_require__(1148);
- /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "SubMenu", function() { return __WEBPACK_IMPORTED_MODULE_1__SubMenu__["a"]; });
- /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Item", function() { return __WEBPACK_IMPORTED_MODULE_2__MenuItem__["a"]; });
- /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "MenuItem", function() { return __WEBPACK_IMPORTED_MODULE_2__MenuItem__["a"]; });
- /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "MenuItemGroup", function() { return __WEBPACK_IMPORTED_MODULE_3__MenuItemGroup__["a"]; });
- /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "ItemGroup", function() { return __WEBPACK_IMPORTED_MODULE_3__MenuItemGroup__["a"]; });
- /* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "Divider", function() { return __WEBPACK_IMPORTED_MODULE_4__Divider__["a"]; });
-
-
-
-
-
-
-
-
- /* harmony default export */ __webpack_exports__["default"] = (__WEBPACK_IMPORTED_MODULE_0__Menu__["a" /* default */]);
-
- /***/ }),
- /* 417 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
-
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["b"] = getActiveKey;
- /* unused harmony export saveRef */
- /* unused harmony export SubPopupMenu */
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(14);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__ = __webpack_require__(6);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(7);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__ = __webpack_require__(8);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends__ = __webpack_require__(9);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(1);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_mini_store__ = __webpack_require__(17);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_mini_store___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_mini_store__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_rc_util_es_KeyCode__ = __webpack_require__(31);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_rc_util_es_createChainedFunction__ = __webpack_require__(199);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_classnames__ = __webpack_require__(2);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_classnames__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__util__ = __webpack_require__(58);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__DOMWrap__ = __webpack_require__(1141);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- function allDisabled(arr) {
- if (!arr.length) {
- return true;
- }
- return arr.every(function (c) {
- return !!c.props.disabled;
- });
- }
-
- function updateActiveKey(store, menuId, activeKey) {
- var _extends2;
-
- var state = store.getState();
- store.setState({
- activeKey: __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default()({}, state.activeKey, (_extends2 = {}, _extends2[menuId] = activeKey, _extends2))
- });
- }
-
- function getEventKey(props) {
- // when eventKey not available ,it's menu and return menu id '0-menu-'
- return props.eventKey || '0-menu-';
- }
-
- function getActiveKey(props, originalActiveKey) {
- var activeKey = originalActiveKey;
- var children = props.children,
- eventKey = props.eventKey;
-
- if (activeKey) {
- var found = void 0;
- Object(__WEBPACK_IMPORTED_MODULE_11__util__["e" /* loopMenuItem */])(children, function (c, i) {
- if (c && c.props && !c.props.disabled && activeKey === Object(__WEBPACK_IMPORTED_MODULE_11__util__["a" /* getKeyFromChildrenIndex */])(c, eventKey, i)) {
- found = true;
- }
- });
- if (found) {
- return activeKey;
- }
- }
- activeKey = null;
- if (props.defaultActiveFirst) {
- Object(__WEBPACK_IMPORTED_MODULE_11__util__["e" /* loopMenuItem */])(children, function (c, i) {
- if (!activeKey && c && !c.props.disabled) {
- activeKey = Object(__WEBPACK_IMPORTED_MODULE_11__util__["a" /* getKeyFromChildrenIndex */])(c, eventKey, i);
- }
- });
- return activeKey;
- }
- return activeKey;
- }
-
- function saveRef(c) {
- if (c) {
- var index = this.instanceArray.indexOf(c);
- if (index !== -1) {
- // update component if it's already inside instanceArray
- this.instanceArray[index] = c;
- } else {
- // add component if it's not in instanceArray yet;
- this.instanceArray.push(c);
- }
- }
- }
-
- var SubPopupMenu = function (_React$Component) {
- __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default()(SubPopupMenu, _React$Component);
-
- function SubPopupMenu(props) {
- var _extends3;
-
- __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default()(this, SubPopupMenu);
-
- var _this = __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.call(this, props));
-
- _initialiseProps.call(_this);
-
- props.store.setState({
- activeKey: __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default()({}, props.store.getState().activeKey, (_extends3 = {}, _extends3[props.eventKey] = getActiveKey(props, props.activeKey), _extends3))
- });
-
- _this.instanceArray = [];
- return _this;
- }
-
- SubPopupMenu.prototype.componentDidMount = function componentDidMount() {
- // invoke customized ref to expose component to mixin
- if (this.props.manualRef) {
- this.props.manualRef(this);
- }
- };
-
- SubPopupMenu.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {
- return this.props.visible || nextProps.visible;
- };
-
- SubPopupMenu.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
- var props = this.props;
- var originalActiveKey = 'activeKey' in props ? props.activeKey : props.store.getState().activeKey[getEventKey(props)];
- var activeKey = getActiveKey(props, originalActiveKey);
- if (activeKey !== originalActiveKey) {
- updateActiveKey(props.store, getEventKey(props), activeKey);
- } else if ('activeKey' in prevProps) {
- // If prev activeKey is not same as current activeKey,
- // we should set it.
- var prevActiveKey = getActiveKey(prevProps, prevProps.activeKey);
- if (activeKey !== prevActiveKey) {
- updateActiveKey(props.store, getEventKey(props), activeKey);
- }
- }
- };
-
- // all keyboard events callbacks run from here at first
-
-
- SubPopupMenu.prototype.render = function render() {
- var _this2 = this;
-
- var props = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties___default()(this.props, []);
-
- this.instanceArray = [];
- var className = __WEBPACK_IMPORTED_MODULE_10_classnames___default()(props.prefixCls, props.className, props.prefixCls + '-' + props.mode);
- var domProps = {
- className: className,
- // role could be 'select' and by default set to menu
- role: props.role || 'menu'
- };
- if (props.id) {
- domProps.id = props.id;
- }
- if (props.focusable) {
- domProps.tabIndex = '0';
- domProps.onKeyDown = this.onKeyDown;
- }
- var prefixCls = props.prefixCls,
- eventKey = props.eventKey,
- visible = props.visible,
- level = props.level,
- mode = props.mode,
- overflowedIndicator = props.overflowedIndicator,
- theme = props.theme;
-
- __WEBPACK_IMPORTED_MODULE_11__util__["g" /* menuAllProps */].forEach(function (key) {
- return delete props[key];
- });
-
- // Otherwise, the propagated click event will trigger another onClick
- delete props.onClick;
-
- return __WEBPACK_IMPORTED_MODULE_5_react___default.a.createElement(
- __WEBPACK_IMPORTED_MODULE_12__DOMWrap__["a" /* default */],
- __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default()({}, props, {
- prefixCls: prefixCls,
- mode: mode,
- tag: 'ul',
- level: level,
- theme: theme,
- hiddenClassName: prefixCls + '-hidden',
- visible: visible,
- overflowedIndicator: overflowedIndicator
- }, domProps),
- __WEBPACK_IMPORTED_MODULE_5_react___default.a.Children.map(props.children, function (c, i) {
- return _this2.renderMenuItem(c, i, eventKey || '0-menu-');
- })
- );
- };
-
- return SubPopupMenu;
- }(__WEBPACK_IMPORTED_MODULE_5_react___default.a.Component);
- SubPopupMenu.propTypes = {
- onSelect: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- onClick: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- onDeselect: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- onOpenChange: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- onDestroy: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- openTransitionName: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
- openAnimation: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.object]),
- openKeys: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string),
- visible: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
- children: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
- parentMenu: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.object,
- eventKey: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
- store: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.shape({
- getState: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- setState: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func
- }),
-
- // adding in refactor
- focusable: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
- multiple: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
- style: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.object,
- defaultActiveFirst: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
- activeKey: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
- selectedKeys: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string),
- defaultSelectedKeys: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string),
- defaultOpenKeys: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.arrayOf(__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string),
- level: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number,
- mode: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf(['horizontal', 'vertical', 'vertical-left', 'vertical-right', 'inline']),
- triggerSubMenuAction: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf(['click', 'hover']),
- inlineIndent: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.number, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string]),
- manualRef: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- itemIcon: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.node]),
- expandIcon: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.node])
- };
- SubPopupMenu.defaultProps = {
- prefixCls: 'rc-menu',
- className: '',
- mode: 'vertical',
- level: 1,
- inlineIndent: 24,
- visible: true,
- focusable: true,
- style: {},
- manualRef: __WEBPACK_IMPORTED_MODULE_11__util__["h" /* noop */]
- };
-
- var _initialiseProps = function _initialiseProps() {
- var _this3 = this;
-
- this.onKeyDown = function (e, callback) {
- var keyCode = e.keyCode;
- var handled = void 0;
- _this3.getFlatInstanceArray().forEach(function (obj) {
- if (obj && obj.props.active && obj.onKeyDown) {
- handled = obj.onKeyDown(e);
- }
- });
- if (handled) {
- return 1;
- }
- var activeItem = null;
- if (keyCode === __WEBPACK_IMPORTED_MODULE_8_rc_util_es_KeyCode__["a" /* default */].UP || keyCode === __WEBPACK_IMPORTED_MODULE_8_rc_util_es_KeyCode__["a" /* default */].DOWN) {
- activeItem = _this3.step(keyCode === __WEBPACK_IMPORTED_MODULE_8_rc_util_es_KeyCode__["a" /* default */].UP ? -1 : 1);
- }
- if (activeItem) {
- e.preventDefault();
- updateActiveKey(_this3.props.store, getEventKey(_this3.props), activeItem.props.eventKey);
-
- if (typeof callback === 'function') {
- callback(activeItem);
- }
-
- return 1;
- }
- };
-
- this.onItemHover = function (e) {
- var key = e.key,
- hover = e.hover;
-
- updateActiveKey(_this3.props.store, getEventKey(_this3.props), hover ? key : null);
- };
-
- this.onDeselect = function (selectInfo) {
- _this3.props.onDeselect(selectInfo);
- };
-
- this.onSelect = function (selectInfo) {
- _this3.props.onSelect(selectInfo);
- };
-
- this.onClick = function (e) {
- _this3.props.onClick(e);
- };
-
- this.onOpenChange = function (e) {
- _this3.props.onOpenChange(e);
- };
-
- this.onDestroy = function (key) {
- /* istanbul ignore next */
- _this3.props.onDestroy(key);
- };
-
- this.getFlatInstanceArray = function () {
- return _this3.instanceArray;
- };
-
- this.getOpenTransitionName = function () {
- return _this3.props.openTransitionName;
- };
-
- this.step = function (direction) {
- var children = _this3.getFlatInstanceArray();
- var activeKey = _this3.props.store.getState().activeKey[getEventKey(_this3.props)];
- var len = children.length;
- if (!len) {
- return null;
- }
- if (direction < 0) {
- children = children.concat().reverse();
- }
- // find current activeIndex
- var activeIndex = -1;
- children.every(function (c, ci) {
- if (c && c.props.eventKey === activeKey) {
- activeIndex = ci;
- return false;
- }
- return true;
- });
- if (!_this3.props.defaultActiveFirst && activeIndex !== -1 && allDisabled(children.slice(activeIndex, len - 1))) {
- return undefined;
- }
- var start = (activeIndex + 1) % len;
- var i = start;
-
- do {
- var child = children[i];
- if (!child || child.props.disabled) {
- i = (i + 1) % len;
- } else {
- return child;
- }
- } while (i !== start);
-
- return null;
- };
-
- this.renderCommonMenuItem = function (child, i, extraProps) {
- var state = _this3.props.store.getState();
- var props = _this3.props;
- var key = Object(__WEBPACK_IMPORTED_MODULE_11__util__["a" /* getKeyFromChildrenIndex */])(child, props.eventKey, i);
- var childProps = child.props;
- // https://github.com/ant-design/ant-design/issues/11517#issuecomment-477403055
- if (!childProps || typeof child.type === 'string') {
- return child;
- }
- var isActive = key === state.activeKey;
- var newChildProps = __WEBPACK_IMPORTED_MODULE_4_babel_runtime_helpers_extends___default()({
- mode: childProps.mode || props.mode,
- level: props.level,
- inlineIndent: props.inlineIndent,
- renderMenuItem: _this3.renderMenuItem,
- rootPrefixCls: props.prefixCls,
- index: i,
- parentMenu: props.parentMenu,
- // customized ref function, need to be invoked manually in child's componentDidMount
- manualRef: childProps.disabled ? undefined : Object(__WEBPACK_IMPORTED_MODULE_9_rc_util_es_createChainedFunction__["a" /* default */])(child.ref, saveRef.bind(_this3)),
- eventKey: key,
- active: !childProps.disabled && isActive,
- multiple: props.multiple,
- onClick: function onClick(e) {
- (childProps.onClick || __WEBPACK_IMPORTED_MODULE_11__util__["h" /* noop */])(e);
- _this3.onClick(e);
- },
- onItemHover: _this3.onItemHover,
- openTransitionName: _this3.getOpenTransitionName(),
- openAnimation: props.openAnimation,
- subMenuOpenDelay: props.subMenuOpenDelay,
- subMenuCloseDelay: props.subMenuCloseDelay,
- forceSubMenuRender: props.forceSubMenuRender,
- onOpenChange: _this3.onOpenChange,
- onDeselect: _this3.onDeselect,
- onSelect: _this3.onSelect,
- builtinPlacements: props.builtinPlacements,
- itemIcon: childProps.itemIcon || _this3.props.itemIcon,
- expandIcon: childProps.expandIcon || _this3.props.expandIcon
- }, extraProps);
- // ref: https://github.com/ant-design/ant-design/issues/13943
- if (props.mode === 'inline' || Object(__WEBPACK_IMPORTED_MODULE_11__util__["d" /* isMobileDevice */])()) {
- newChildProps.triggerSubMenuAction = 'click';
- }
- return __WEBPACK_IMPORTED_MODULE_5_react___default.a.cloneElement(child, newChildProps);
- };
-
- this.renderMenuItem = function (c, i, subMenuKey) {
- /* istanbul ignore if */
- if (!c) {
- return null;
- }
- var state = _this3.props.store.getState();
- var extraProps = {
- openKeys: state.openKeys,
- selectedKeys: state.selectedKeys,
- triggerSubMenuAction: _this3.props.triggerSubMenuAction,
- subMenuKey: subMenuKey
- };
- return _this3.renderCommonMenuItem(c, i, extraProps);
- };
- };
-
- var connected = Object(__WEBPACK_IMPORTED_MODULE_7_mini_store__["connect"])()(SubPopupMenu);
-
- /* harmony default export */ __webpack_exports__["a"] = (connected);
-
- /***/ }),
- /* 418 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
-
- "use strict";
- /* unused harmony export SubMenu */
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__ = __webpack_require__(6);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(7);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits__ = __webpack_require__(8);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_extends__ = __webpack_require__(9);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_extends__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react_dom__ = __webpack_require__(4);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_react_dom__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types__ = __webpack_require__(1);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_prop_types__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_rc_trigger__ = __webpack_require__(1142);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_8_rc_util_es_KeyCode__ = __webpack_require__(31);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_classnames__ = __webpack_require__(2);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_9_classnames___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9_classnames__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_mini_store__ = __webpack_require__(17);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_mini_store___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_mini_store__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_11__SubPopupMenu__ = __webpack_require__(417);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__placements__ = __webpack_require__(1145);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_13_rc_animate__ = __webpack_require__(25);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_14__util__ = __webpack_require__(58);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- var guid = 0;
-
- var popupPlacementMap = {
- horizontal: 'bottomLeft',
- vertical: 'rightTop',
- 'vertical-left': 'rightTop',
- 'vertical-right': 'leftTop'
- };
-
- var updateDefaultActiveFirst = function updateDefaultActiveFirst(store, eventKey, defaultActiveFirst) {
- var _extends2;
-
- var menuId = Object(__WEBPACK_IMPORTED_MODULE_14__util__["b" /* getMenuIdFromSubMenuEventKey */])(eventKey);
- var state = store.getState();
- store.setState({
- defaultActiveFirst: __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_extends___default()({}, state.defaultActiveFirst, (_extends2 = {}, _extends2[menuId] = defaultActiveFirst, _extends2))
- });
- };
-
- var SubMenu = function (_React$Component) {
- __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_inherits___default()(SubMenu, _React$Component);
-
- function SubMenu(props) {
- __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_classCallCheck___default()(this, SubMenu);
-
- var _this = __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_possibleConstructorReturn___default()(this, _React$Component.call(this, props));
-
- _initialiseProps.call(_this);
-
- var store = props.store;
- var eventKey = props.eventKey;
- var defaultActiveFirst = store.getState().defaultActiveFirst;
-
- _this.isRootMenu = false;
-
- var value = false;
-
- if (defaultActiveFirst) {
- value = defaultActiveFirst[eventKey];
- }
-
- updateDefaultActiveFirst(store, eventKey, value);
- return _this;
- }
-
- SubMenu.prototype.componentDidMount = function componentDidMount() {
- this.componentDidUpdate();
- };
-
- SubMenu.prototype.componentDidUpdate = function componentDidUpdate() {
- var _this2 = this;
-
- var _props = this.props,
- mode = _props.mode,
- parentMenu = _props.parentMenu,
- manualRef = _props.manualRef;
-
- // invoke customized ref to expose component to mixin
-
- if (manualRef) {
- manualRef(this);
- }
-
- if (mode !== 'horizontal' || !parentMenu.isRootMenu || !this.props.isOpen) {
- return;
- }
-
- this.minWidthTimeout = setTimeout(function () {
- return _this2.adjustWidth();
- }, 0);
- };
-
- SubMenu.prototype.componentWillUnmount = function componentWillUnmount() {
- var _props2 = this.props,
- onDestroy = _props2.onDestroy,
- eventKey = _props2.eventKey;
-
- if (onDestroy) {
- onDestroy(eventKey);
- }
-
- /* istanbul ignore if */
- if (this.minWidthTimeout) {
- clearTimeout(this.minWidthTimeout);
- }
-
- /* istanbul ignore if */
- if (this.mouseenterTimeout) {
- clearTimeout(this.mouseenterTimeout);
- }
- };
-
- SubMenu.prototype.renderChildren = function renderChildren(children) {
- var props = this.props;
- var baseProps = {
- mode: props.mode === 'horizontal' ? 'vertical' : props.mode,
- visible: this.props.isOpen,
- level: props.level + 1,
- inlineIndent: props.inlineIndent,
- focusable: false,
- onClick: this.onSubMenuClick,
- onSelect: this.onSelect,
- onDeselect: this.onDeselect,
- onDestroy: this.onDestroy,
- selectedKeys: props.selectedKeys,
- eventKey: props.eventKey + '-menu-',
- openKeys: props.openKeys,
- openTransitionName: props.openTransitionName,
- openAnimation: props.openAnimation,
- onOpenChange: this.onOpenChange,
- subMenuOpenDelay: props.subMenuOpenDelay,
- parentMenu: this,
- subMenuCloseDelay: props.subMenuCloseDelay,
- forceSubMenuRender: props.forceSubMenuRender,
- triggerSubMenuAction: props.triggerSubMenuAction,
- builtinPlacements: props.builtinPlacements,
- defaultActiveFirst: props.store.getState().defaultActiveFirst[Object(__WEBPACK_IMPORTED_MODULE_14__util__["b" /* getMenuIdFromSubMenuEventKey */])(props.eventKey)],
- multiple: props.multiple,
- prefixCls: props.rootPrefixCls,
- id: this._menuId,
- manualRef: this.saveMenuInstance,
- itemIcon: props.itemIcon,
- expandIcon: props.expandIcon
- };
-
- var haveRendered = this.haveRendered;
- this.haveRendered = true;
-
- this.haveOpened = this.haveOpened || baseProps.visible || baseProps.forceSubMenuRender;
- // never rendered not planning to, don't render
- if (!this.haveOpened) {
- return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('div', null);
- }
-
- // don't show transition on first rendering (no animation for opened menu)
- // show appear transition if it's not visible (not sure why)
- // show appear transition if it's not inline mode
- var transitionAppear = haveRendered || !baseProps.visible || baseProps.mode !== 'inline';
-
- baseProps.className = ' ' + baseProps.prefixCls + '-sub';
- var animProps = {};
-
- if (baseProps.openTransitionName) {
- animProps.transitionName = baseProps.openTransitionName;
- } else if (typeof baseProps.openAnimation === 'object') {
- animProps.animation = __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_extends___default()({}, baseProps.openAnimation);
- if (!transitionAppear) {
- delete animProps.animation.appear;
- }
- }
-
- return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(
- __WEBPACK_IMPORTED_MODULE_13_rc_animate__["default"],
- __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_extends___default()({}, animProps, {
- showProp: 'visible',
- component: '',
- transitionAppear: transitionAppear
- }),
- __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(
- __WEBPACK_IMPORTED_MODULE_11__SubPopupMenu__["a" /* default */],
- __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_extends___default()({}, baseProps, { id: this._menuId }),
- children
- )
- );
- };
-
- SubMenu.prototype.render = function render() {
- var _classNames;
-
- var props = __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_extends___default()({}, this.props);
- var isOpen = props.isOpen;
- var prefixCls = this.getPrefixCls();
- var isInlineMode = props.mode === 'inline';
- var className = __WEBPACK_IMPORTED_MODULE_9_classnames___default()(prefixCls, prefixCls + '-' + props.mode, (_classNames = {}, _classNames[props.className] = !!props.className, _classNames[this.getOpenClassName()] = isOpen, _classNames[this.getActiveClassName()] = props.active || isOpen && !isInlineMode, _classNames[this.getDisabledClassName()] = props.disabled, _classNames[this.getSelectedClassName()] = this.isChildrenSelected(), _classNames));
-
- if (!this._menuId) {
- if (props.eventKey) {
- this._menuId = props.eventKey + '$Menu';
- } else {
- this._menuId = '$__$' + ++guid + '$Menu';
- }
- }
-
- var mouseEvents = {};
- var titleClickEvents = {};
- var titleMouseEvents = {};
- if (!props.disabled) {
- mouseEvents = {
- onMouseLeave: this.onMouseLeave,
- onMouseEnter: this.onMouseEnter
- };
-
- // only works in title, not outer li
- titleClickEvents = {
- onClick: this.onTitleClick
- };
- titleMouseEvents = {
- onMouseEnter: this.onTitleMouseEnter,
- onMouseLeave: this.onTitleMouseLeave
- };
- }
-
- var style = {};
- if (isInlineMode) {
- style.paddingLeft = props.inlineIndent * props.level;
- }
-
- var ariaOwns = {};
- // only set aria-owns when menu is open
- // otherwise it would be an invalid aria-owns value
- // since corresponding node cannot be found
- if (this.props.isOpen) {
- ariaOwns = {
- 'aria-owns': this._menuId
- };
- }
-
- // expand custom icon should NOT be displayed in menu with horizontal mode.
- var icon = null;
- if (props.mode !== 'horizontal') {
- icon = this.props.expandIcon; // ReactNode
- if (typeof this.props.expandIcon === 'function') {
- icon = __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(this.props.expandIcon, __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_extends___default()({}, this.props));
- }
- }
-
- var title = __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(
- 'div',
- __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_extends___default()({
- ref: this.saveSubMenuTitle,
- style: style,
- className: prefixCls + '-title'
- }, titleMouseEvents, titleClickEvents, {
- 'aria-expanded': isOpen
- }, ariaOwns, {
- 'aria-haspopup': 'true',
- title: typeof props.title === 'string' ? props.title : undefined
- }),
- props.title,
- icon || __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('i', { className: prefixCls + '-arrow' })
- );
- var children = this.renderChildren(props.children);
-
- var getPopupContainer = props.parentMenu.isRootMenu ? props.parentMenu.props.getPopupContainer : function (triggerNode) {
- return triggerNode.parentNode;
- };
- var popupPlacement = popupPlacementMap[props.mode];
- var popupAlign = props.popupOffset ? { offset: props.popupOffset } : {};
- var popupClassName = props.mode === 'inline' ? '' : props.popupClassName;
- var disabled = props.disabled,
- triggerSubMenuAction = props.triggerSubMenuAction,
- subMenuOpenDelay = props.subMenuOpenDelay,
- forceSubMenuRender = props.forceSubMenuRender,
- subMenuCloseDelay = props.subMenuCloseDelay,
- builtinPlacements = props.builtinPlacements;
-
- __WEBPACK_IMPORTED_MODULE_14__util__["g" /* menuAllProps */].forEach(function (key) {
- return delete props[key];
- });
- // Set onClick to null, to ignore propagated onClick event
- delete props.onClick;
-
- return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(
- 'li',
- __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_extends___default()({}, props, mouseEvents, {
- className: className,
- role: 'menuitem'
- }),
- isInlineMode && title,
- isInlineMode && children,
- !isInlineMode && __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement(
- __WEBPACK_IMPORTED_MODULE_7_rc_trigger__["a" /* default */],
- {
- prefixCls: prefixCls,
- popupClassName: prefixCls + '-popup ' + popupClassName,
- getPopupContainer: getPopupContainer,
- builtinPlacements: __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_extends___default()({}, __WEBPACK_IMPORTED_MODULE_12__placements__["a" /* default */], builtinPlacements),
- popupPlacement: popupPlacement,
- popupVisible: isOpen,
- popupAlign: popupAlign,
- popup: children,
- action: disabled ? [] : [triggerSubMenuAction],
- mouseEnterDelay: subMenuOpenDelay,
- mouseLeaveDelay: subMenuCloseDelay,
- onPopupVisibleChange: this.onPopupVisibleChange,
- forceRender: forceSubMenuRender
- },
- title
- )
- );
- };
-
- return SubMenu;
- }(__WEBPACK_IMPORTED_MODULE_4_react___default.a.Component);
-
- SubMenu.propTypes = {
- parentMenu: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.object,
- title: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.node,
- children: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.any,
- selectedKeys: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.array,
- openKeys: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.array,
- onClick: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- onOpenChange: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- rootPrefixCls: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
- eventKey: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
- multiple: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
- active: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool, // TODO: remove
- onItemHover: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- onSelect: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- triggerSubMenuAction: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.string,
- onDeselect: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- onDestroy: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- onMouseEnter: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- onMouseLeave: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- onTitleMouseEnter: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- onTitleMouseLeave: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- onTitleClick: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- popupOffset: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.array,
- isOpen: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.bool,
- store: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.object,
- mode: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOf(['horizontal', 'vertical', 'vertical-left', 'vertical-right', 'inline']),
- manualRef: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func,
- itemIcon: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.node]),
- expandIcon: __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.func, __WEBPACK_IMPORTED_MODULE_6_prop_types___default.a.node])
- };
- SubMenu.defaultProps = {
- onMouseEnter: __WEBPACK_IMPORTED_MODULE_14__util__["h" /* noop */],
- onMouseLeave: __WEBPACK_IMPORTED_MODULE_14__util__["h" /* noop */],
- onTitleMouseEnter: __WEBPACK_IMPORTED_MODULE_14__util__["h" /* noop */],
- onTitleMouseLeave: __WEBPACK_IMPORTED_MODULE_14__util__["h" /* noop */],
- onTitleClick: __WEBPACK_IMPORTED_MODULE_14__util__["h" /* noop */],
- manualRef: __WEBPACK_IMPORTED_MODULE_14__util__["h" /* noop */],
- mode: 'vertical',
- title: ''
- };
-
- var _initialiseProps = function _initialiseProps() {
- var _this3 = this;
-
- this.onDestroy = function (key) {
- _this3.props.onDestroy(key);
- };
-
- this.onKeyDown = function (e) {
- var keyCode = e.keyCode;
- var menu = _this3.menuInstance;
- var _props3 = _this3.props,
- isOpen = _props3.isOpen,
- store = _props3.store;
-
-
- if (keyCode === __WEBPACK_IMPORTED_MODULE_8_rc_util_es_KeyCode__["a" /* default */].ENTER) {
- _this3.onTitleClick(e);
- updateDefaultActiveFirst(store, _this3.props.eventKey, true);
- return true;
- }
-
- if (keyCode === __WEBPACK_IMPORTED_MODULE_8_rc_util_es_KeyCode__["a" /* default */].RIGHT) {
- if (isOpen) {
- menu.onKeyDown(e);
- } else {
- _this3.triggerOpenChange(true);
- // need to update current menu's defaultActiveFirst value
- updateDefaultActiveFirst(store, _this3.props.eventKey, true);
- }
- return true;
- }
- if (keyCode === __WEBPACK_IMPORTED_MODULE_8_rc_util_es_KeyCode__["a" /* default */].LEFT) {
- var handled = void 0;
- if (isOpen) {
- handled = menu.onKeyDown(e);
- } else {
- return undefined;
- }
- if (!handled) {
- _this3.triggerOpenChange(false);
- handled = true;
- }
- return handled;
- }
-
- if (isOpen && (keyCode === __WEBPACK_IMPORTED_MODULE_8_rc_util_es_KeyCode__["a" /* default */].UP || keyCode === __WEBPACK_IMPORTED_MODULE_8_rc_util_es_KeyCode__["a" /* default */].DOWN)) {
- return menu.onKeyDown(e);
- }
- };
-
- this.onOpenChange = function (e) {
- _this3.props.onOpenChange(e);
- };
-
- this.onPopupVisibleChange = function (visible) {
- _this3.triggerOpenChange(visible, visible ? 'mouseenter' : 'mouseleave');
- };
-
- this.onMouseEnter = function (e) {
- var _props4 = _this3.props,
- key = _props4.eventKey,
- onMouseEnter = _props4.onMouseEnter,
- store = _props4.store;
-
- updateDefaultActiveFirst(store, _this3.props.eventKey, false);
- onMouseEnter({
- key: key,
- domEvent: e
- });
- };
-
- this.onMouseLeave = function (e) {
- var _props5 = _this3.props,
- parentMenu = _props5.parentMenu,
- eventKey = _props5.eventKey,
- onMouseLeave = _props5.onMouseLeave;
-
- parentMenu.subMenuInstance = _this3;
- onMouseLeave({
- key: eventKey,
- domEvent: e
- });
- };
-
- this.onTitleMouseEnter = function (domEvent) {
- var _props6 = _this3.props,
- key = _props6.eventKey,
- onItemHover = _props6.onItemHover,
- onTitleMouseEnter = _props6.onTitleMouseEnter;
-
- onItemHover({
- key: key,
- hover: true
- });
- onTitleMouseEnter({
- key: key,
- domEvent: domEvent
- });
- };
-
- this.onTitleMouseLeave = function (e) {
- var _props7 = _this3.props,
- parentMenu = _props7.parentMenu,
- eventKey = _props7.eventKey,
- onItemHover = _props7.onItemHover,
- onTitleMouseLeave = _props7.onTitleMouseLeave;
-
- parentMenu.subMenuInstance = _this3;
- onItemHover({
- key: eventKey,
- hover: false
- });
- onTitleMouseLeave({
- key: eventKey,
- domEvent: e
- });
- };
-
- this.onTitleClick = function (e) {
- var props = _this3.props;
-
- props.onTitleClick({
- key: props.eventKey,
- domEvent: e
- });
- if (props.triggerSubMenuAction === 'hover') {
- return;
- }
- _this3.triggerOpenChange(!props.isOpen, 'click');
- updateDefaultActiveFirst(props.store, _this3.props.eventKey, false);
- };
-
- this.onSubMenuClick = function (info) {
- // in the case of overflowed submenu
- // onClick is not copied over
- if (typeof _this3.props.onClick === 'function') {
- _this3.props.onClick(_this3.addKeyPath(info));
- }
- };
-
- this.onSelect = function (info) {
- _this3.props.onSelect(info);
- };
-
- this.onDeselect = function (info) {
- _this3.props.onDeselect(info);
- };
-
- this.getPrefixCls = function () {
- return _this3.props.rootPrefixCls + '-submenu';
- };
-
- this.getActiveClassName = function () {
- return _this3.getPrefixCls() + '-active';
- };
-
- this.getDisabledClassName = function () {
- return _this3.getPrefixCls() + '-disabled';
- };
-
- this.getSelectedClassName = function () {
- return _this3.getPrefixCls() + '-selected';
- };
-
- this.getOpenClassName = function () {
- return _this3.props.rootPrefixCls + '-submenu-open';
- };
-
- this.saveMenuInstance = function (c) {
- // children menu instance
- _this3.menuInstance = c;
- };
-
- this.addKeyPath = function (info) {
- return __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_extends___default()({}, info, {
- keyPath: (info.keyPath || []).concat(_this3.props.eventKey)
- });
- };
-
- this.triggerOpenChange = function (open, type) {
- var key = _this3.props.eventKey;
- var openChange = function openChange() {
- _this3.onOpenChange({
- key: key,
- item: _this3,
- trigger: type,
- open: open
- });
- };
- if (type === 'mouseenter') {
- // make sure mouseenter happen after other menu item's mouseleave
- _this3.mouseenterTimeout = setTimeout(function () {
- openChange();
- }, 0);
- } else {
- openChange();
- }
- };
-
- this.isChildrenSelected = function () {
- var ret = { find: false };
- Object(__WEBPACK_IMPORTED_MODULE_14__util__["f" /* loopMenuItemRecursively */])(_this3.props.children, _this3.props.selectedKeys, ret);
- return ret.find;
- };
-
- this.isOpen = function () {
- return _this3.props.openKeys.indexOf(_this3.props.eventKey) !== -1;
- };
-
- this.adjustWidth = function () {
- /* istanbul ignore if */
- if (!_this3.subMenuTitle || !_this3.menuInstance) {
- return;
- }
- var popupMenu = __WEBPACK_IMPORTED_MODULE_5_react_dom___default.a.findDOMNode(_this3.menuInstance);
- if (popupMenu.offsetWidth >= _this3.subMenuTitle.offsetWidth) {
- return;
- }
-
- /* istanbul ignore next */
- popupMenu.style.minWidth = _this3.subMenuTitle.offsetWidth + 'px';
- };
-
- this.saveSubMenuTitle = function (subMenuTitle) {
- _this3.subMenuTitle = subMenuTitle;
- };
- };
-
- var connected = Object(__WEBPACK_IMPORTED_MODULE_10_mini_store__["connect"])(function (_ref, _ref2) {
- var openKeys = _ref.openKeys,
- activeKey = _ref.activeKey,
- selectedKeys = _ref.selectedKeys;
- var eventKey = _ref2.eventKey,
- subMenuKey = _ref2.subMenuKey;
- return {
- isOpen: openKeys.indexOf(eventKey) > -1,
- active: activeKey[subMenuKey] === eventKey,
- selectedKeys: selectedKeys
- };
- })(SubMenu);
-
- connected.isSubMenu = true;
-
- /* harmony default export */ __webpack_exports__["a"] = (connected);
-
- /***/ }),
- /* 419 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
-
- "use strict";
- /* harmony export (immutable) */ __webpack_exports__["a"] = getAlignFromPlacement;
- /* harmony export (immutable) */ __webpack_exports__["b"] = getAlignPopupClassName;
- /* harmony export (immutable) */ __webpack_exports__["c"] = saveRef;
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__(9);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);
-
- function isPointsEq(a1, a2, isAlignPoint) {
- if (isAlignPoint) {
- return a1[0] === a2[0];
- }
- return a1[0] === a2[0] && a1[1] === a2[1];
- }
-
- function getAlignFromPlacement(builtinPlacements, placementStr, align) {
- var baseAlign = builtinPlacements[placementStr] || {};
- return __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, baseAlign, align);
- }
-
- function getAlignPopupClassName(builtinPlacements, prefixCls, align, isAlignPoint) {
- var points = align.points;
- for (var placement in builtinPlacements) {
- if (builtinPlacements.hasOwnProperty(placement)) {
- if (isPointsEq(builtinPlacements[placement].points, points, isAlignPoint)) {
- return prefixCls + '-placement-' + placement;
- }
- }
- }
- return '';
- }
-
- function saveRef(name, component) {
- this[name] = component;
- }
-
- /***/ }),
- /* 420 */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
-
- "use strict";
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__ = __webpack_require__(14);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__ = __webpack_require__(6);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__ = __webpack_require__(7);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__ = __webpack_require__(8);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react__ = __webpack_require__(0);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_react__);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types__ = __webpack_require__(1);
- /* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_prop_types___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_prop_types__);
-
-
-
-
-
-
-
- var LazyRenderBox = function (_Component) {
- __WEBPACK_IMPORTED_MODULE_3_babel_runtime_helpers_inherits___default()(LazyRenderBox, _Component);
-
- function LazyRenderBox() {
- __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_classCallCheck___default()(this, LazyRenderBox);
-
- return __WEBPACK_IMPORTED_MODULE_2_babel_runtime_helpers_possibleConstructorReturn___default()(this, _Component.apply(this, arguments));
- }
-
- LazyRenderBox.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {
- return nextProps.hiddenClassName || nextProps.visible;
- };
-
- LazyRenderBox.prototype.render = function render() {
- var _props = this.props,
- hiddenClassName = _props.hiddenClassName,
- visible = _props.visible,
- props = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_objectWithoutProperties___default()(_props, ['hiddenClassName', 'visible']);
-
- if (hiddenClassName || __WEBPACK_IMPORTED_MODULE_4_react___default.a.Children.count(props.children) > 1) {
- if (!visible && hiddenClassName) {
- props.className += ' ' + hiddenClassName;
- }
- return __WEBPACK_IMPORTED_MODULE_4_react___default.a.createElement('div', props);
- }
-
- return __WEBPACK_IMPORTED_MODULE_4_react___default.a.Children.only(props.children);
- };
-
- return LazyRenderBox;
- }(__WEBPACK_IMPORTED_MODULE_4_react__["Component"]);
-
- LazyRenderBox.propTypes = {
- children: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.any,
- className: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string,
- visible: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.bool,
- hiddenClassName: __WEBPACK_IMPORTED_MODULE_5_prop_types___default.a.string
- };
-
-
- /* harmony default export */ __webpack_exports__["a"] = (LazyRenderBox);
-
- /***/ }),
- /* 421 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.SelectPropTypes = undefined;
-
- var _propTypes = __webpack_require__(1);
-
- var _propTypes2 = _interopRequireDefault(_propTypes);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- function valueType(props, propName, componentName) {
- var basicType = _propTypes2["default"].oneOfType([_propTypes2["default"].string, _propTypes2["default"].number]);
-
- var labelInValueShape = _propTypes2["default"].shape({
- key: basicType.isRequired,
- label: _propTypes2["default"].node
- });
- if (props.labelInValue) {
- var validate = _propTypes2["default"].oneOfType([_propTypes2["default"].arrayOf(labelInValueShape), labelInValueShape]);
- var error = validate.apply(undefined, arguments);
- if (error) {
- return new Error('Invalid prop `' + propName + '` supplied to `' + componentName + '`, ' + ('when you set `labelInValue` to `true`, `' + propName + '` should in ') + 'shape of `{ key: string | number, label?: ReactNode }`.');
- }
- } else if ((props.mode === 'multiple' || props.mode === 'tags' || props.multiple || props.tags) && props[propName] === '') {
- return new Error('Invalid prop `' + propName + '` of type `string` supplied to `' + componentName + '`, ' + 'expected `array` when `multiple` or `tags` is `true`.');
- } else {
- var _validate = _propTypes2["default"].oneOfType([_propTypes2["default"].arrayOf(basicType), basicType]);
- return _validate.apply(undefined, arguments);
- }
- } /**
- * This source code is quoted from rc-select.
- * homepage: https://github.com/react-component/select
- */
- var SelectPropTypes = exports.SelectPropTypes = {
- id: _propTypes2["default"].string,
- defaultActiveFirstOption: _propTypes2["default"].bool,
- multiple: _propTypes2["default"].bool,
- filterOption: _propTypes2["default"].any,
- children: _propTypes2["default"].any,
- showSearch: _propTypes2["default"].bool,
- disabled: _propTypes2["default"].bool,
- allowClear: _propTypes2["default"].bool,
- showArrow: _propTypes2["default"].bool,
- tags: _propTypes2["default"].bool,
- prefixCls: _propTypes2["default"].string,
- className: _propTypes2["default"].string,
- transitionName: _propTypes2["default"].string,
- optionLabelProp: _propTypes2["default"].string,
- optionFilterProp: _propTypes2["default"].string,
- animation: _propTypes2["default"].string,
- choiceTransitionName: _propTypes2["default"].string,
- open: _propTypes2["default"].bool,
- defaultOpen: _propTypes2["default"].bool,
- onChange: _propTypes2["default"].func,
- onBlur: _propTypes2["default"].func,
- onFocus: _propTypes2["default"].func,
- onSelect: _propTypes2["default"].func,
- onSearch: _propTypes2["default"].func,
- onPopupScroll: _propTypes2["default"].func,
- onMouseEnter: _propTypes2["default"].func,
- onMouseLeave: _propTypes2["default"].func,
- onInputKeyDown: _propTypes2["default"].func,
- placeholder: _propTypes2["default"].any,
- onDeselect: _propTypes2["default"].func,
- labelInValue: _propTypes2["default"].bool,
- value: valueType,
- defaultValue: valueType,
- dropdownStyle: _propTypes2["default"].object,
- maxTagTextLength: _propTypes2["default"].number,
- maxTagCount: _propTypes2["default"].number,
- maxTagPlaceholder: _propTypes2["default"].oneOfType([_propTypes2["default"].node, _propTypes2["default"].func]),
- tokenSeparators: _propTypes2["default"].arrayOf(_propTypes2["default"].string),
- getInputElement: _propTypes2["default"].func,
- showAction: _propTypes2["default"].arrayOf(_propTypes2["default"].string),
- clearIcon: _propTypes2["default"].node,
- inputIcon: _propTypes2["default"].node,
- removeIcon: _propTypes2["default"].node,
- menuItemSelectedIcon: _propTypes2["default"].oneOfType([_propTypes2["default"].func, _propTypes2["default"].node])
- };
-
- /***/ }),
- /* 422 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _react = __webpack_require__(0);
-
- var _react2 = _interopRequireDefault(_react);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
-
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
-
- var OptGroup = function (_React$Component) {
- _inherits(OptGroup, _React$Component);
-
- function OptGroup() {
- _classCallCheck(this, OptGroup);
-
- return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
- }
-
- return OptGroup;
- }(_react2["default"].Component);
-
- OptGroup.isSelectOptGroup = true;
- exports["default"] = OptGroup;
- module.exports = exports['default'];
-
- /***/ }),
- /* 423 */
- /***/ (function(module, exports, __webpack_require__) {
-
- var Button = __webpack_require__(424);
- var Badge = __webpack_require__(427);
- var Alert = __webpack_require__(431);
- var ButtonGroup = __webpack_require__(436);
- var Label = __webpack_require__(442);
- var FormControl = __webpack_require__(446);
- var FormGroup = __webpack_require__(450);
- var Form = __webpack_require__(454);
- var Layout = __webpack_require__(575);
- var InputGroup = __webpack_require__(580);
- var InputNumber = __webpack_require__(585);
- var Checkbox = __webpack_require__(593);
- var Pagination = __webpack_require__(597);
- var ProgressBar = __webpack_require__(667);
- var Radio = __webpack_require__(671);
- var Switch = __webpack_require__(676);
- var Tooltip = __webpack_require__(680);
- var Dropdown = __webpack_require__(705);
- var Panel = __webpack_require__(709);
- var PanelGroup = __webpack_require__(725);
- var SearchPanel = __webpack_require__(219);
- var Transition = __webpack_require__(740);
- var Navbar = __webpack_require__(744);
- var Animate = __webpack_require__(754);
- var Select = __webpack_require__(756);
- var Tile = __webpack_require__(758);
- var Icon = __webpack_require__(762);
- var Menu = __webpack_require__(764);
- var Upload = __webpack_require__(781);
- var Breadcrumb = __webpack_require__(793);
-
- var Message = __webpack_require__(798);
- var Notification = __webpack_require__(802);
- var Popconfirm = __webpack_require__(804);
- var Modal = __webpack_require__(811);
- var Tabs = __webpack_require__(884);
- var Cascader = __webpack_require__(895);
- var Loading = __webpack_require__(912);
- var Table = __webpack_require__(915);
- var Tree = __webpack_require__(965);
- var Clipboard = __webpack_require__(971);
-
- var Rate = __webpack_require__(1016);
- var Step = __webpack_require__(1026);
- var Timeline = __webpack_require__(1032);
- var Transfer = __webpack_require__(1036);
- var BackTop = __webpack_require__(1055);
- var Collapse = __webpack_require__(1059);
-
- var Slider = __webpack_require__(1064);
- var AutoComplete = __webpack_require__(1076);
-
- var LoadingState = __webpack_require__(1082);
- var Locale = __webpack_require__(1086);
- var Popover = __webpack_require__(1090);
- var Anchor = __webpack_require__(1095);
- var ColorPicker = __webpack_require__(1100);
- var Tag = __webpack_require__(1156);
- var SearchPanel = __webpack_require__(219);
+ var Button = __webpack_require__(367);
+ var Badge = __webpack_require__(370);
+ var Alert = __webpack_require__(374);
+ var ButtonGroup = __webpack_require__(379);
+ var Label = __webpack_require__(383);
+ var FormControl = __webpack_require__(387);
+ var FormGroup = __webpack_require__(390);
+ var Form = __webpack_require__(394);
+ var Layout = __webpack_require__(518);
+ var InputGroup = __webpack_require__(523);
+ var InputNumber = __webpack_require__(529);
+ var Checkbox = __webpack_require__(532);
+ var Pagination = __webpack_require__(536);
+ var ProgressBar = __webpack_require__(608);
+ var Radio = __webpack_require__(612);
+ var Switch = __webpack_require__(617);
+ var Tooltip = __webpack_require__(621);
+ var Dropdown = __webpack_require__(646);
+ var Panel = __webpack_require__(650);
+ var PanelGroup = __webpack_require__(666);
+ var SearchPanel = __webpack_require__(667);
+ var Transition = __webpack_require__(680);
+ var Navbar = __webpack_require__(684);
+ var Animate = __webpack_require__(694);
+ var Select = __webpack_require__(696);
+ var Tile = __webpack_require__(698);
+ var Icon = __webpack_require__(702);
+ var Menu = __webpack_require__(704);
+ var Upload = __webpack_require__(721);
+ var Breadcrumb = __webpack_require__(733);
+
+ var Message = __webpack_require__(738);
+ var Notification = __webpack_require__(742);
+ var Popconfirm = __webpack_require__(744);
+ var Modal = __webpack_require__(751);
+ var Tabs = __webpack_require__(786);
+ var Cascader = __webpack_require__(797);
+ var Loading = __webpack_require__(810);
+ var Table = __webpack_require__(813);
+ var Tree = __webpack_require__(857);
+ var Clipboard = __webpack_require__(863);
+
+ var Rate = __webpack_require__(906);
+ var Step = __webpack_require__(916);
+ var Timeline = __webpack_require__(922);
+ var Transfer = __webpack_require__(926);
+ var BackTop = __webpack_require__(940);
+ var Collapse = __webpack_require__(944);
+
+ var Slider = __webpack_require__(949);
+ var AutoComplete = __webpack_require__(961);
+
+ var LoadingState = __webpack_require__(965);
+ var Locale = __webpack_require__(969);
+ var Popover = __webpack_require__(973);
var TinperBee = {
@@ -131580,31 +104285,27 @@
LoadingState: LoadingState,
Locale: Locale,
Popover: Popover,
- Anchor:Anchor,
- Tag: Tag,
- ColorPicker: ColorPicker,
- SearchPanel: SearchPanel
}
module.exports = TinperBee;
/***/ }),
- /* 424 */
+ /* 367 */
/***/ (function(module, exports, __webpack_require__) {
- __webpack_require__(425);
- module.exports = __webpack_require__(37);
+ __webpack_require__(368);
+ module.exports = __webpack_require__(19);
/***/ }),
- /* 425 */
+ /* 368 */
/***/ (function(module, exports) {
// removed by extract-text-webpack-plugin
/***/ }),
- /* 426 */
+ /* 369 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -131628,7 +104329,7 @@
var _propTypes2 = _interopRequireDefault(_propTypes);
- var _classnames = __webpack_require__(2);
+ var _classnames = __webpack_require__(3);
var _classnames2 = _interopRequireDefault(_classnames);
@@ -131780,21 +104481,21 @@
module.exports = exports['default'];
/***/ }),
- /* 427 */
+ /* 370 */
/***/ (function(module, exports, __webpack_require__) {
- __webpack_require__(428);
- module.exports = __webpack_require__(429);
+ __webpack_require__(371);
+ module.exports = __webpack_require__(372);
/***/ }),
- /* 428 */
+ /* 371 */
/***/ (function(module, exports) {
// removed by extract-text-webpack-plugin
/***/ }),
- /* 429 */
+ /* 372 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -131804,7 +104505,7 @@
value: true
});
- var _Badge = __webpack_require__(430);
+ var _Badge = __webpack_require__(373);
var _Badge2 = _interopRequireDefault(_Badge);
@@ -131814,7 +104515,7 @@
module.exports = exports['default'];
/***/ }),
- /* 430 */
+ /* 373 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -131830,7 +104531,7 @@
var _react2 = _interopRequireDefault(_react);
- var _classnames = __webpack_require__(2);
+ var _classnames = __webpack_require__(3);
var _classnames2 = _interopRequireDefault(_classnames);
@@ -131937,21 +104638,21 @@
module.exports = exports['default'];
/***/ }),
- /* 431 */
+ /* 374 */
/***/ (function(module, exports, __webpack_require__) {
- __webpack_require__(432);
- module.exports = __webpack_require__(433);
+ __webpack_require__(375);
+ module.exports = __webpack_require__(376);
/***/ }),
- /* 432 */
+ /* 375 */
/***/ (function(module, exports) {
// removed by extract-text-webpack-plugin
/***/ }),
- /* 433 */
+ /* 376 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -131961,7 +104662,7 @@
value: true
});
- var _Alert = __webpack_require__(434);
+ var _Alert = __webpack_require__(377);
var _Alert2 = _interopRequireDefault(_Alert);
@@ -131971,7 +104672,7 @@
module.exports = exports['default'];
/***/ }),
- /* 434 */
+ /* 377 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -131983,7 +104684,7 @@
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
- var _classnames = __webpack_require__(2);
+ var _classnames = __webpack_require__(3);
var _classnames2 = _interopRequireDefault(_classnames);
@@ -131995,7 +104696,7 @@
var _propTypes2 = _interopRequireDefault(_propTypes);
- var _beeIcon = __webpack_require__(13);
+ var _beeIcon = __webpack_require__(14);
var _beeIcon2 = _interopRequireDefault(_beeIcon);
@@ -132097,7 +104798,7 @@
module.exports = exports['default'];
/***/ }),
- /* 435 */
+ /* 378 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -132113,7 +104814,7 @@
var _react2 = _interopRequireDefault(_react);
- var _classnames = __webpack_require__(2);
+ var _classnames = __webpack_require__(3);
var _classnames2 = _interopRequireDefault(_classnames);
@@ -132177,21 +104878,21 @@
module.exports = exports['default'];
/***/ }),
- /* 436 */
+ /* 379 */
/***/ (function(module, exports, __webpack_require__) {
- __webpack_require__(437);
- module.exports = __webpack_require__(438);
+ __webpack_require__(380);
+ module.exports = __webpack_require__(381);
/***/ }),
- /* 437 */
+ /* 380 */
/***/ (function(module, exports) {
// removed by extract-text-webpack-plugin
/***/ }),
- /* 438 */
+ /* 381 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -132201,7 +104902,7 @@
value: true
});
- var _ButtonGroup = __webpack_require__(439);
+ var _ButtonGroup = __webpack_require__(382);
var _ButtonGroup2 = _interopRequireDefault(_ButtonGroup);
@@ -132211,7 +104912,7 @@
module.exports = exports['default'];
/***/ }),
- /* 439 */
+ /* 382 */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
@@ -132227,11 +104928,11 @@
var _react2 = _interopRequireDefault(_react);
- var _classnames = __webpack_require__(2);
+ var _classnames = __webpack_require__(3);
var _classnames2 = _interopRequireDefault(_classnames);
- var _beeButton = __webpack_require__(440);
+ var _beeButton = __webpack_require__(19);
var _beeButton2 = _interopRequireDefault(_beeButton);
@@ -132361,217 +105062,21 @@
module.exports = exports['default'];
/***/ }),
- /* 440 */
+ /* 383 */
/***/ (function(module, exports, __webpack_require__) {
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _Button = __webpack_require__(441);
-
- var _Button2 = _interopRequireDefault(_Button);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- exports["default"] = _Button2["default"];
- module.exports = exports['default'];
-
- /***/ }),
- /* 441 */
- /***/ (function(module, exports, __webpack_require__) {
-
- "use strict";
-
-
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
-
- var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
- var _react = __webpack_require__(0);
-
- var _react2 = _interopRequireDefault(_react);
-
- var _reactDom = __webpack_require__(4);
-
- var _reactDom2 = _interopRequireDefault(_reactDom);
-
- var _propTypes = __webpack_require__(1);
-
- var _propTypes2 = _interopRequireDefault(_propTypes);
-
- var _classnames = __webpack_require__(2);
-
- var _classnames2 = _interopRequireDefault(_classnames);
-
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
-
- function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
-
- function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
-
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
- function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }
-
- var propTypes = {
- /**
- * @title 尺寸
- */
- size: _propTypes2["default"].oneOf(['sm', 'md', 'xg', 'lg']),
- /**
- * @title 样式
- */
- style: _propTypes2["default"].object,
- /**
- * @title 形状
- */
- shape: _propTypes2["default"].oneOf(['block', 'round', 'border', 'squared', 'floating', 'pillRight', 'pillLeft', 'icon']),
-
- bordered: _propTypes2["default"].bool,
- /**
- * @title 类型
- */
- colors: _propTypes2["default"].oneOf(['primary', 'secondary', 'accent', 'success', 'info', 'warning', 'danger', 'dark', 'light', 'default']),
- /**
- * @title 是否禁用
- * @veIgnore
- */
- disabled: _propTypes2["default"].bool,
- /**
- * @title 类名
- * @veIgnore
- */
- className: _propTypes2["default"].string,
-
- /**
- * @title