/******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModules[moduleId].exports; /******/ /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ exports: {}, /******/ id: moduleId, /******/ loaded: false /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.loaded = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(0); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var _beeLayout = __webpack_require__(1); var _beePanel = __webpack_require__(8); var _beeButton = __webpack_require__(82); var _beeButton2 = _interopRequireDefault(_beeButton); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _reactDom = __webpack_require__(12); var _reactDom2 = _interopRequireDefault(_reactDom); 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 CARET = _react2['default'].createElement('i', { className: 'uf uf-arrow-down' }); var CARETUP = _react2['default'].createElement('i', { className: 'uf uf-arrow-up' }); var Demo1 = __webpack_require__(84);var Demo10 = __webpack_require__(508);var Demo11 = __webpack_require__(509);var Demo12 = __webpack_require__(511);var Demo13 = __webpack_require__(518);var Demo14 = __webpack_require__(520);var Demo15 = __webpack_require__(529);var Demo16 = __webpack_require__(530);var Demo17 = __webpack_require__(531);var Demo18 = __webpack_require__(532);var Demo19 = __webpack_require__(533);var Demo2 = __webpack_require__(534);var Demo20 = __webpack_require__(539);var Demo21 = __webpack_require__(540);var Demo22 = __webpack_require__(545);var Demo23 = __webpack_require__(548);var Demo24 = __webpack_require__(549);var Demo25 = __webpack_require__(550);var Demo26 = __webpack_require__(551);var Demo27 = __webpack_require__(552);var Demo28 = __webpack_require__(554);var Demo29 = __webpack_require__(555);var Demo3 = __webpack_require__(578);var Demo30 = __webpack_require__(579);var Demo31 = __webpack_require__(581);var Demo32 = __webpack_require__(582);var Demo33 = __webpack_require__(583);var Demo4 = __webpack_require__(584);var Demo5 = __webpack_require__(585);var Demo6 = __webpack_require__(586);var Demo7 = __webpack_require__(587);var Demo8 = __webpack_require__(588);var Demo9 = __webpack_require__(593);var DemoArray = [{ "example": _react2['default'].createElement(Demo1, null), "title": " 简单表格、文字过长,两种tip", "code": "/**\n*\n* @title 简单表格、文字过长,两种tip\n* 【Tooltip】\n* @description\n*/\n\nimport React, { Component } from \"react\";\nimport { Table, Tooltip, Button } from 'tinper-bee';\n\nconst columns = [\n {\n title: \"用户名\", dataIndex: \"a\", key: \"a\", width: 80, 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: '10%' },\n { title: \"年龄\", dataIndex: \"c\", key: \"c\", width: 200 },\n {\n title: \"操作\",\n dataIndex: \"d\",\n key: \"d\",\n render(text, record, index) {\n return (\n
\n {\n alert('这是第' + index + '列,内容为:' + text);\n }}\n >\n 一些操作\n \n
\n );\n }\n }\n];\n\nconst data = [\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\nclass Demo1 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 {\n this.setState({\n selectedRowIndex: index\n });\n }}\n />\n\n \n );\n }\n}\n\n\n", "desc": "" }, { "example": _react2['default'].createElement(Demo10, null), "title": " 无数据时显示", "code": "/**\n*\n* @title 无数据时显示\n* @description 无数据时显示效果展示(可自定义)\n *\n* import {Table} from 'tinper-bee';\n*/\n\n\nimport React, { Component } from 'react';\nimport { Table } from 'tinper-bee';\n\n\nconst columns10 = [\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 \n const data10 = [\n \n ];\n\n const emptyFunc = () => 这里没有数据!\n \n class Demo10 extends Component {\n render() {\n return ;\n }\n }\n\n", "desc": " 无数据时显示效果展示(可自定义)" }, { "example": _react2['default'].createElement(Demo11, null), "title": " 列排序", "code": "/**\n*\n* @title 列排序\n*\n*/\n\n\nimport React, { Component } from 'react';\nimport { Table, Icon } from 'tinper-bee';\nimport sort from \"tinper-bee/lib/sort.js\";;\nlet ComplexTable = sort(Table, Icon);\nconst 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\nconst data11 = [\n { a: \"杨过\", b: \"男\", c: 30,d:'内行', key: \"2\" },\n { a: \"令狐冲\", b: \"男\", c: 41,d:'大侠', key: \"1\" },\n { a: \"郭靖\", b: \"男\", c: 25,d:'大侠', 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": "" }, { "example": _react2['default'].createElement(Demo12, null), "title": " 全选功能", "code": "/**\n*\n* @title 全选功能\n* @description 点击表格左列按钮即可选中,并且在选中的回调函数中能获取到选中的数据(未使用封装好的全选功能)\n*\n*/\n\n\nimport React, { Component } from 'react';\nimport { Table, Checkbox } from 'tinper-bee';\nimport multiSelect from \"tinper-bee/lib/multiSelect.js\";;\n\nconst columns12 = [\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\nconst data12 = [\n { a: \"杨过\", b: \"男\", c: 30,d:'内行', key: \"2\",_checked:true },\n { a: \"令狐冲\", b: \"男\", c: 41,d:'大侠', key: \"1\" ,_checked:true},\n { a: \"郭靖\", b: \"男\", c: 25,d:'大侠', key: \"3\" ,_checked:true}\n];\n//拼接成复杂功能的table组件不能在render中定义,需要像此例子声明在组件的外侧,不然操作state会导致功能出现异常\nlet MultiSelectTable = multiSelect(Table, Checkbox);\n\nclass Demo12 extends Component {\n constructor(props) {\n super(props);\n this.state = {\n data: data12\n };\n }\n getSelectedDataFunc = data => {\n console.log(data);\n };\n \n render() {\n let multiObj = {\n type: \"checkbox\"\n };\n return (\n \n );\n }\n}\n\n", "desc": " 点击表格左列按钮即可选中,并且在选中的回调函数中能获取到选中的数据(未使用封装好的全选功能)" }, { "example": _react2['default'].createElement(Demo13, null), "title": " 多列排序、全选功能、合计", "code": "/**\n *\n * @title 多列排序、全选功能、合计\n * @description 多列排序、全选功能、合计(通过使用的封装好的功能方法实现复杂功能,简单易用!)新增回调函数(sorterClick)\n *\n */\n\nimport React, { Component } from \"react\";\nimport { Table, Icon, Button, Checkbox } 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: \"杨过\", b: 675, c: 30, d: \"内行\",e:100, key: \"2\" },\n { a: \"令狐冲\", b: 43, c: 41, d: \"大侠\",e:90, key: \"1\" },\n { a: \"令狐冲1\", b: 43, c: 81, d: \"大侠\", e:120,key: \"4\" },\n { a: \"令狐冲2\", b: 43, c: 81, d: \"大侠\", e:130,key: \"5\" },\n { a: \"郭靖\", b: 153, c: 25, d: \"大侠\",e:90, key: \"3\" }\n];\n\n\n//拼接成复杂功能的table组件不能在render中定义,需要像此例子声明在组件的外侧,不然操作state会导致功能出现异常\nlet ComplexTable = multiSelect(sum(sort(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(Demo14, null), "title": " 编辑态表格", "code": "/**\n*\n* @title 编辑态表格\n* @description 这是带有多种不同格式的编辑态表格(编辑态是通过使用不同的render来达到不同编辑格式)\n*\n*/\n\nimport React from \"react\";\nimport { Table, Select, Datepicker, Checkbox, Input, Icon, Form, Button, Tooltip, Animate } 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, Input, 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 Demo14 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 }\n}\n\n\n", "desc": " 这是带有多种不同格式的编辑态表格(编辑态是通过使用不同的render来达到不同编辑格式)" }, { "example": _react2['default'].createElement(Demo15, null), "title": " 表格行/列合并", "code": "/**\n*\n* @title 表格行/列合并\n* @description 表头只支持列合并,使用 column 里的 colSpan 进行设置。表格支持行/列合并,使用 render 里的单元格属性 colSpan 或者 rowSpan 设值为 0 时,设置的表格不会渲染。\n*\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(Demo16, null), "title": " 嵌套子表格", "code": "/**\n*\n* @title 嵌套子表格\n* @description 通过expandedRowRender参数来实现子表格\n*\n*/\n\nimport React, { Component } from \"react\";\nimport { Table } from 'tinper-bee';\n\nconst columns16 = [\n {\n title: \"操作\",\n dataIndex: \"d\",\n key: \"d\", \n width:200,\n render(text, record, index) {\n return (\n {\n alert(\"这是第\" + index + \"列,内容为:\" + text);\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 alert(\"这是第\" + index + \"列,内容为:\" + text);\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 footer={currentData =>
表尾: 我是小尾巴
}\n />\n );\n }\n}\n\n\n", "desc": " 通过expandedRowRender参数来实现子表格" }, { "example": _react2['default'].createElement(Demo17, null), "title": " loading属性指定表格是否加载中", "code": "/**\n*\n* @title loading属性指定表格是否加载中\n* @description loading可以传boolean或者obj对象,obj为bee-loading组件的参数类型\n*\n*/\n\nimport React, { Component } from \"react\";\nimport { Table, Button } from 'tinper-bee';\n\nconst columns17 = [\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 title: \"操作\",\n dataIndex: \"d\",\n key: \"d\",\n render(text, record, index) {\n return (\n {\n alert('这是第'+index+'列,内容为:'+text);\n }}\n >\n 一些操作\n \n );\n }\n }\n];\n\nconst data17 = [\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\nclass Demo17 extends Component {\n constructor(props){\n super(props);\n this.state = {\n loading : true\n }\n }\n changeLoading = () => {\n this.setState({\n loading : !this.state.loading\n })\n }\n render() {\n return (\n
\n \n 切换loading\n \n
标题: 这是一个标题
}\n footer={currentData =>
表尾: 我是小尾巴
}\n // loading={this.state.loading}或者是boolean\n loading={{show:this.state.loading,loadingType:\"line\"}}\n />\n
\n );\n }\n}\n\n\n", "desc": " loading可以传boolean或者obj对象,obj为bee-loading组件的参数类型" }, { "example": _react2['default'].createElement(Demo18, null), "title": " 合并标题后的合计,且支持多字段统计", "code": "/**\n *\n * @title 合并标题后的合计,且支持多字段统计\n * @description 合计(通过使用的封装好的功能方法实现复杂功能,简单易用!)\n *\n */\n\nimport React, { Component } from \"react\";\nimport { Table, Button } from 'tinper-bee'; \nimport sum from \"tinper-bee/lib/sum.js\";;\n \nlet ComplexTable = sum(Table);\n\nconst columns = [\n {\n title: \"Name\",\n dataIndex: \"name\",\n key: \"name\",\n width: 100,\n fixed: \"left\"\n },\n {\n title: \"Other\",\n children: [\n {\n title: \"Age\",\n dataIndex: \"age\",\n key: \"age\",\n width: 200,\n sumCol: true,\n },\n {\n title: \"Address\",\n children: [\n {\n title: \"Street\",\n dataIndex: \"street\",\n key: \"street\",\n width: 200\n },\n {\n title: \"Block\",\n children: [\n {\n title: \"Building\",\n dataIndex: \"building\",\n key: \"building\",\n width: 100\n },\n {\n title: \"Door No.\",\n dataIndex: \"number\",\n key: \"number\",\n // width: 100,\n sumCol: true,\n }\n ]\n }\n ]\n }\n ]\n },\n // {\n // title: \"Company\",\n // children: [\n // {\n // title: \"Company Address\",\n // dataIndex: \"companyAddress\",\n // key: \"companyAddress\",\n // width: 100,\n // },\n // {\n // title: \"Company Name\",\n // dataIndex: \"companyName\",\n // key: \"companyName\",\n // width: 100,\n // }\n // ]\n // },\n {\n title: \"Gender\",\n dataIndex: \"gender\",\n key: \"gender\",\n width: 80,\n fixed: \"right\"\n }\n];\n\nfunction getData(){\n const data = [];\n for (let i = 0; i < 5; i++) {\n data.push({\n key: i,\n name: \"John Brown\"+i,\n age: i + Math.floor(Math.random()*10),\n street: \"Lake Park\",\n building: \"C\",\n number: 20 * Math.floor(Math.random()*10),\n companyAddress: \"Lake Street 42\",\n companyName: \"SoftLake Co\",\n gender: \"M\"\n });\n }\n return data;\n}\n\nclass Demo18 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": " 合计(通过使用的封装好的功能方法实现复杂功能,简单易用!)" }, { "example": _react2['default'].createElement(Demo19, null), "title": " 编辑态表格", "code": "/**\n*\n* @title 编辑态表格\n* @description 这是带有多种不同格式的编辑态表格(编辑态是通过使用不同的render来达到不同编辑格式)\n*\n*/\n\nimport React from \"react\";\nimport { Table, Select, Form, Input, Icon, Tooltip, Animate, Button } from 'tinper-bee';\nimport renderInput from \"tinper-bee/lib/InputRender.js\";;\nimport renderSelect from \"tinper-bee/lib/SelectRender.js\";;\n\nconst InputRender = renderInput(Form, Input, Icon);\nconst SelectRender = renderSelect(Select, Icon);\n\nconst Option = Select.Option;\n\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 Demo19 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: \"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 {\n title:(
下拉框的div
),\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 }\n check = (flag, obj) => {\n console.log(flag);\n console.log(obj);\n };\n\n handFocus = (value,e) => {\n console.log(value+` 获取焦点事件`);\n };\n onBlur = (value,e) => {\n console.log(value+` onBlur`);\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\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\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 }\n}\n\n\n", "desc": " 这是带有多种不同格式的编辑态表格(编辑态是通过使用不同的render来达到不同编辑格式)" }, { "example": _react2['default'].createElement(Demo2, null), "title": " 增删改表格", "code": "/**\n*\n* @title 增删改表格\n* @description 这是带有增删改功能的表格(此编辑功能未使用render组件)\n*\n*/\n\nimport React, { Component } from \"react\";\nimport { Table, Popconfirm, Input, Icon, Animate, Button } from 'tinper-bee';\n\nclass EditableCell extends React.Component {\n state = {\n value: this.props.value,\n editable: false\n };\n handleChange = e => {\n const value = e;\n this.setState({ value });\n };\n check = () => {\n this.setState({ editable: false });\n if (this.props.onChange) {\n this.props.onChange(this.state.value);\n }\n };\n edit = () => {\n this.setState({ editable: true });\n };\n handleKeydown = event => {\n if (event.keyCode == 13) {\n this.check();\n }\n };\n render() {\n const { value, editable } = this.state;\n return (\n
\n {editable ? (\n
\n \n \n
\n ) : (\n
\n {value || \" \"}\n \n
\n )}\n
\n );\n }\n}\n\nclass Demo2 extends React.Component {\n constructor(props) {\n super(props);\n this.columns = [\n {\n title: \"姓名\",\n dataIndex: \"name\",\n key: \"name\",\n width: \"30%\",\n render: (text, record, index) => (\n \n )\n },\n {\n title: \"年龄\",\n dataIndex: \"age\",\n key: \"age\"\n },\n {\n title: \"你懂的\",\n dataIndex: \"address\",\n key: \"address\"\n },\n {\n title: \"操作\",\n dataIndex: \"operation\",\n key: \"operation\",\n render: (text, record, index) => {\n return this.state.dataSource.length > 1 ? (\n \n \n \n ) : null;\n }\n }\n ];\n\n this.state = {\n dataSource: [\n {\n key: \"0\",\n name: \"沉鱼\",\n age: \"18\",\n address: \"96, 77, 89\"\n },\n {\n key: \"1\",\n name: \"落雁\",\n age: \"16\",\n address: \"90, 70, 80\"\n },\n {\n key: \"2\",\n name: \"闭月\",\n age: \"17\",\n address: \"80, 60, 80\"\n },\n {\n key: \"3\",\n name: \"羞花\",\n age: \"20\",\n address: \"120, 60, 90\"\n }\n ],\n count: 4\n };\n }\n onCellChange = (index, key) => {\n return value => {\n const dataSource = [...this.state.dataSource];\n dataSource[index][key] = value;\n this.setState({ dataSource });\n };\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: `100 100 100`\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 render() {\n const { dataSource } = this.state;\n const columns = this.columns;\n return (\n
\n \n 添加\n \n \n
\n );\n }\n}\n\n\n", "desc": " 这是带有增删改功能的表格(此编辑功能未使用render组件)" }, { "example": _react2['default'].createElement(Demo20, null), "title": " 简单表格选中行的背景色、表头表尾", "code": "/**\n*\n* @title 简单表格选中行的背景色、表头表尾\n* @description\n*/\n\nimport React, { Component } from \"react\";\nimport { Table, Tooltip, Button } from 'tinper-bee';\n\nconst columns = [\n { title: \"用户名\", dataIndex: \"a\", key: \"a\", width:80 , className:\"rowClassName\"},\n { id: \"123\", title: \"性别\", dataIndex: \"b\", key: \"b\", width: 100 },\n { title: \"年龄\", dataIndex: \"c\", key: \"c\", width: 200 },\n];\n\nconst data = [\n { a: \"令狐冲\", b: \"男\", c: 41, key: \"1\" },\n { a: \"杨过叔叔的女儿黄蓉\", b: \"男\", c: 67, key: \"2\" },\n { a: \"郭靖\", b: \"男\", c: 25, key: \"3\" }\n];\n\nclass Demo26 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 if (this.state.selectedRowIndex == index) {\n return 'selected';\n } else {\n return '';\n }\n }}\n onRowClick={(record,index,indent)=>{\n this.setState({ \n selectedRowIndex: index\n });\n }}\n title={currentData =>
标题: 这是一个标题
}\n footer={currentData =>
表尾: 我是小尾巴
}\n /> \n );\n }\n}\n\n\n", "desc": "" }, { "example": _react2['default'].createElement(Demo21, null), "title": " 根据列进行过滤", "code": "/**\n*\n* @title 根据列进行过滤\n* @description 点击表格右侧按钮,进行表格列的数据过滤。可以自定义设置显示某列,通过ifshow属性控制,默认为true都显示。afterFilter为过滤之后的回调函数\n*\n*/\n\n\nimport React, { Component } from 'react';\nimport { Table, Popover, Checkbox, Icon } from 'tinper-bee';\nimport filterColumn from \"tinper-bee/lib/filterColumn\";;\nimport sum from \"tinper-bee/lib/sum\";;\n\nconst data21 = [\n { a: \"杨过\", b: \"男\", c: 30,d:'内行',e: \"操作\", key: \"2\" },\n { a: \"令狐冲\", b: \"男\", c: 41,d:'大侠',e: \"操作\", key: \"1\" },\n { a: \"郭靖\", b: \"男\", c: 25,d:'大侠',e: \"操作\", key: \"3\" }\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 columns21: [\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 ifshow:false,\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 },\n {\n title: \"操作\",\n dataIndex: \"e\",\n key: \"e\",\n render(text, record, index){\n return (\n \n );\n }\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 \n return ;\n }\n}\nDemo21.defaultProps = defaultProps21;\n\n\n", "desc": " 点击表格右侧按钮,进行表格列的数据过滤。可以自定义设置显示某列,通过ifshow属性控制,默认为true都显示。afterFilter为过滤之后的回调函数" }, { "example": _react2['default'].createElement(Demo22, null), "title": " 列的拖拽,交换表头的顺序", "code": "/**\n*\n* @title 列的拖拽,交换表头的顺序\n* @description 点击列的表头,进行左右拖拽\n*/\nimport React, { Component } from 'react';\nimport { Table, Icon } from 'tinper-bee'; \nimport dragColumn from \"tinper-bee/lib/dragColumn\";;\n\n\nconst columns22 = [\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 data22 = [\n { a: \"杨过\", b: \"男\", c: 30,d:'内行', key: \"2\" },\n { a: \"令狐冲\", b: \"男\", c: 41,d:'大侠', key: \"1\" },\n { a: \"郭靖\", b: \"男\", c: 25,d:'大侠', 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 }\n}\nDemo22.defaultProps = defaultProps22;\n\n\n", "desc": " 点击列的表头,进行左右拖拽" }, { "example": _react2['default'].createElement(Demo23, null), "title": " 拖拽调整列的宽度", "code": "/**\n*\n* @title 拖拽调整列的宽度\n* @description 注:不支持tree结构的表头、合并表头的table【目前支持表头拖拽宽度、交互列一起使用】\n*/\nimport React, { Component } from 'react';\nimport { Table, Icon } from 'tinper-bee'; \nimport dragColumn from \"tinper-bee/lib/dragColumn\";;\n\n\nconst columns23 = [\n {\n title: \"名字\",\n dataIndex: \"a\",\n key: \"a\",\n width: '200'\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 sumCol: true,\n sorter: (a, b) => a.c - b.c\n },\n {\n title: \"武功级别\",\n dataIndex: \"d\",\n key: \"d\",\n fixed:'right',\n width: 200,\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: \"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 }\n}\nDemo23.defaultProps = defaultProps23;\n\n\n", "desc": " 注:不支持tree结构的表头、合并表头的table【目前支持表头拖拽宽度、交互列一起使用】" }, { "example": _react2['default'].createElement(Demo24, null), "title": " 动态设置固、取消固定列", "code": "/**\n*\n* @title 动态设置固、取消固定列\n* @description 动态设置固、取消固定列\n* @description 动态固定列设置 一个table动态设置一个方向【fixed: \"left\",fixed: \"right\"】。\n*\n*/\nimport React, { Component } from 'react';\nimport { Table, Dropdown, Menu, Icon } from 'tinper-bee';\n\n\nconst { Item } = Menu;\n// const columns24 = [\n// {\n// title: \"Full Name\",\n// width: 100,\n// dataIndex: \"name\",\n// key: \"name\",\n// fixed: \"left\",\n// },\n// { title: \"Age\", width: 100, dataIndex: \"age\", key: \"age\", fixed: \"left\" },\n// { title: \"Column 1\", dataIndex: \"address\", key: \"1\" },\n// { title: \"Column 2\", dataIndex: \"address2\", key: \"2\" },\n// { title: \"Column 3\", dataIndex: \"address\", key: \"3\" },\n// { title: \"Column 4\", dataIndex: \"address\", key: \"4\" },\n// { title: \"Column 24\", dataIndex: \"address\", key: \"24\" },\n// { title: \"Column 6\", dataIndex: \"address\", key: \"6\" },\n// { title: \"Column 7\", dataIndex: \"address\", key: \"7\" },\n// { title: \"Column 8\", dataIndex: \"address\", key: \"8\" }\n// ];\n\n\nconst columns24 = [\n {\n title: \"名字\",\n dataIndex: \"a\",\n key: \"a\",\n width: 100,\n fixed: \"left\",\n },\n {\n title: \"性别\",\n dataIndex: \"b\",\n key: \"b\",\n width: 100,\n fixed: \"left\",\n },\n {\n title: \"年龄\",\n dataIndex: \"c\",\n key: \"c\",\n width: 100, \n },\n {\n title: \"武功级别\",\n dataIndex: \"d\",\n key: \"d\",\n width: 150 \n },\n {\n title: \"对手\",\n dataIndex: \"e\",\n key: \"e\",\n width: 100 \n },\n {\n title: \"帮派\",\n dataIndex: \"f\",\n key: \"f\",\n width: 100 \n },\n {\n title: \"武功类型\",\n dataIndex: \"g\",\n key: \"g\",\n width: 100 \n },\n {\n title: \"师傅\",\n dataIndex: \"k\",\n key: \"k\",\n // width: 100 \n },\n {\n title: \"攻击系数\",\n dataIndex: \"h\",\n key: \"h\",\n width: 100 \n }\n];\n\n\nconst data24 = [\n { a: \"杨过\", b: \"男\", c: 30,d:'内行',e:'黄荣',f:'古墓派',g:'剑术',k:'小龙女',h:'0.5', key: \"1\" },\n { a: \"令狐冲\", b: \"男\", c: 41,d:'剑客',e:'自己',f:'无',g:'剑术',k:'无',h:'0.5', key: \"2\" },\n { a: \"郭靖\", b: \"男\", c: 25,d:'大侠',e:'黄荣',f:'朝廷',g:'内容',k:'外侵势力',h:'0.6', key: \"3\" }\n]; \n \nclass Demo24 extends Component {\n\n constructor(props) {\n super(props);\n // let columns = [];\n // Object.assign(columns,columns24);\n // columns.forEach(da=>da.onHeadCellClick=this.onHeadCellClick);\n this.state = {\n columns:columns24\n }\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 menuInfo.map(da=>{ return {da.info} })\n }\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": " 动态设置固、取消固定列", "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(Demo25, null), "title": " 根据列进行过滤、拖拽交换列综合使用案例", "code": "/**\n* @title 根据列进行过滤、拖拽交换列综合使用案例\n* @description 新增属性【checkMinSize 当前表格显示最少列数 】 1. 当所有列都设置了width属性后,需要给table增加checkMinSize属性 2. 所有列不设置width。\n*/\n\n/**注:\n * 在使用过滤列的时候,如果每一列都设置了width属性,勾选的时候回出现重复列问题。当表格的宽度小于合计宽度的时候,就会出现此问题。 \n * 必须有个别列不设置width属性,即可避免此问题。\n */\nimport React, { Component } from 'react';\nimport { Table, Popover, Checkbox, Icon } from 'tinper-bee';\nimport multiSelect from \"tinper-bee/lib/multiSelect\";;\nimport filterColumn from \"tinper-bee/lib/filterColumn\";;\nimport dragColumn from \"tinper-bee/lib/dragColumn\";;\n\nimport sum from \"tinper-bee/lib/sum\";;\n\n //Cloumns1\nfunction getCloumns(){\n const column = [\n {\n title: \"序号\",\n dataIndex: \"index\",\n key: \"index\",\n width: 100, \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: 300\n },\n {\n title: \"凭证日期\",\n dataIndex: \"voucherDate\",\n key: \"voucherDate\",\n width: 100,\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 alert('这是第'+index+'列,内容为:'+text);\n }}\n >\n 一些操作\n \n
\n )\n }\n }\n ];\n return column;\n}\n\nconst dataList = [ \n { \n index: 1, \n orderCode:\"2343\", \n supplierName: \"xxx\",\n type_name: \"123\",\n purchasing:'内行', \n purchasingGroup:\"323\",\n voucherDate:\"kkkk\",\n approvalState_name:\"vvvv\",\n confirmState_name:\"aaaa\",\n closeState_name:\"vnnnnn\",\n d:\"操作\",\n key: \"1\"\n }, \n { \n index: 2, \n _checked:true,\n orderCode:\"222\", \n supplierName: \"22xxx\",\n type_name: \"1223\",\n purchasing:'内行2', \n purchasingGroup:\"3223\",\n voucherDate:\"222kk\",\n approvalState_name:\"22vvvv\",\n confirmState_name:\"2aaaa\",\n closeState_name:\"2vnnnnn\",\n d:\"2操作\",\n key: \"2\"\n },\n { \n index: 3, \n orderCode:\"222\", \n supplierName: \"22xxx\",\n _disabled:true,\n type_name: \"1223\",\n purchasing:'内行2', \n purchasingGroup:\"3223\",\n voucherDate:\"222kk\",\n approvalState_name:\"22vvvv\",\n confirmState_name:\"2aaaa\",\n closeState_name:\"2vnnnnn\",\n d:\"3操作\",\n key: \"3\"\n },\n { \n index: 4, \n orderCode:\"222\", \n supplierName: \"22xxx\",\n type_name: \"1223\",\n purchasing:'内行2', \n purchasingGroup:\"3223\",\n voucherDate:\"222kk\",\n approvalState_name:\"22vvvv\",\n confirmState_name:\"2aaaa\",\n closeState_name:\"2vnnnnn\",\n d:\"4操作\",\n key: \"4\"\n },\n]\n\nconst DragColumnTable = filterColumn(dragColumn(multiSelect(Table, Checkbox)),Popover);\n\nconst defaultProps25 = {\n prefixCls: \"bee-table\"\n};\n\nclass Demo25 extends Component {\n constructor(props) {\n super(props);\n }\n\n getSelectedDataFunc=(data)=>{\n console.log(\"data\",data);\n }\n \n getCloumnsScroll=(columns)=>{\n let sum = 0;\n columns.forEach((da)=>{\n sum += da.width;\n })\n console.log(\"sum\",sum);\n return (sum);\n }\n\n selectedRow=(record, index)=>{\n\n }\n\n render() {\n let columns = getCloumns();\n \n return
\n \n
\n }\n}\nDemo25.defaultProps = defaultProps25;\n\n\n", "desc": " 新增属性【checkMinSize 当前表格显示最少列数 】 1. 当所有列都设置了width属性后,需要给table增加checkMinSize属性 2. 所有列不设置width。" }, { "example": _react2['default'].createElement(Demo26, null), "title": " 按条件和值过滤", "code": "/**\n*\n* @title 按条件和值过滤\n* @description 可以根据输入项目以及判断条件对表格内的数据进行过滤\n*\n*/\n\n\nimport React, { Component } from 'react';\nimport { Table } from 'tinper-bee';\n\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(Demo27, null), "title": " 组合过滤和其他功能使用", "code": "/**\n*\n* @title 组合过滤和其他功能使用\n* @description 在过滤数据行的基础上增加列拖拽、动态菜单显示、下拉条件动态传入自定义等\n*\n*/\n\n/**\n * @description \n */\n\nimport React, { Component } from 'react';\nimport { Table, Dropdown, Menu, Icon, Checkbox } from 'tinper-bee';\nimport multiSelect from \"tinper-bee/lib/MultiSelect\";;\nimport sort from \"tinper-bee/lib/sort\";;\n\n\nconst { Item } = Menu;\nconst SubMenu = Menu.SubMenu;\nconst MenuItemGroup = Menu.ItemGroup;\n\n\nconst dataList = [\n { \"key\": \"1\", value: \"库存明细\", id: \"a\" },\n { \"key\": \"2\", value: \"订单明细\", id: \"v\" },\n { \"key\": \"3\", value: \"发货明细\", id: \"c\" }\n]\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 组织 1}>\n \n 选项 1\n 选项 2\n \n \n 选项 3\n 选项 4\n \n \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(Demo28, null), "title": " 列排序,后端排序", "code": "/**\n*\n* @title 列排序,后端排序\n*\n*/\n\n\nimport React, { Component } from 'react';\nimport { Table, Icon } from 'tinper-bee';\nimport sort from \"tinper-bee/lib/sort.js\";;\nlet ComplexTable = sort(Table, Icon);\nconst 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\nconst 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];\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(Demo29, null), "title": " 从弹出框内显示过滤行并且设置可选下拉条件", "code": "/**\n*\n* @title 从弹出框内显示过滤行并且设置可选下拉条件\n* @description 通过Modal组件来展示表格的过滤相关能力,并且通过filterDropdownIncludeKeys设置可选条件\n*\n*/\n\n\nimport React, { Component } from 'react';\nimport { Table, Button, Modal } from 'tinper-bee';\n\n\nconst columns29 = [\n {\n title: \"姓名\",\n width: 180,\n dataIndex: \"name\",\n key: \"name\",\n filterType: \"text\",\n filterDropdown: \"show\",\n filterDropdownIncludeKeys: ['LIKE', 'EQ']\n },\n {\n title: \"年龄\",\n width: 170,\n dataIndex: \"age\",\n key: \"age\",\n filterType: \"number\",\n filterDropdown: \"show\",\n filterDropdownType: \"number\",\n filterDropdownIncludeKeys: ['EQ'],\n filterInputNumberOptions: {\n max: 200,\n min: 0,\n step: 1,\n precision: 0\n }\n },\n {\n title: \"日期\",\n width: 200,\n dataIndex: \"date\",\n key: \"date\",\n filterType: \"date\",\n filterDropdown: \"show\",\n format: \"YYYY-MM-DD\"\n }\n];\n\nconst data29 = [\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 Demo29 extends Component {\n constructor() {\n super();\n this.state = {\n show: false\n }\n this.close = this.close.bind(this);\n this.open = this.open.bind(this);\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 close() {\n this.setState({\n show: false\n });\n }\n open() {\n this.setState({\n show: true\n });\n }\n render() {\n return (
\n \n 过滤行\n \n \n ()\n onFilterClear={this.handlerFilterClear}//触发输入操作以及其他的回调(key,val)=>()\n filterDelay={500}//输入文本多少ms触发回调函数,默认300ms\n filterable={true}//是否开启过滤数据功能\n bordered\n columns={columns29}\n data={data29} />\n \n \n \n
)\n }\n}\n\n", "desc": " 通过Modal组件来展示表格的过滤相关能力,并且通过filterDropdownIncludeKeys设置可选条件" }, { "example": _react2['default'].createElement(Demo3, null), "title": " 表头分组并自定义表头高度", "code": "/**\n *\n * @title 表头分组并自定义表头高度\n * @description columns[n] 可以内嵌 children,以渲染分组表头。\n * 自定义表头高度需要传headerHeight,注:修改th的padding top和bottom置为0,否则会有影响\n *\n */\n\nimport React, { Component } from \"react\";\nimport { Table, Button } from 'tinper-bee';\n\nconst { ColumnGroup, Column } = Table;\n\nconst columns = [\n {\n title: \"Name\",\n dataIndex: \"name\",\n key: \"name\",\n width: 100,\n fixed: \"left\"\n },\n {\n title: \"Other\",\n width:600,\n children: [\n {\n title: \"Age\",\n dataIndex: \"age\",\n key: \"age\",\n width: 200\n },\n {\n title: \"Address\",\n children: [\n {\n title: \"Street\",\n dataIndex: \"street\",\n key: \"street\",\n width: 200\n },\n {\n title: \"Block\",\n children: [\n {\n title: \"Building\",\n dataIndex: \"building\",\n key: \"building\",\n width: 100\n },\n {\n title: \"Door No.\",\n dataIndex: \"number\",\n key: \"number\",\n width: 100\n }\n ]\n }\n ]\n }\n ]\n },\n {\n title: \"Company\",\n width:400,\n children: [\n {\n title: \"Company Address\",\n dataIndex: \"companyAddress\",\n key: \"companyAddress\",\n width:200,\n },\n {\n title: \"Company Name\",\n dataIndex: \"companyName\",\n key: \"companyName\",\n width:200,\n }\n ]\n },\n {\n title: \"Gender\",\n dataIndex: \"gender\",\n key: \"gender\",\n width: 60,\n fixed: \"right\"\n }\n];\n\nconst data = [];\nfor (let i = 0; i < 20; i++) {\n data.push({\n key: i,\n name: \"John Brown\",\n age: i + 1,\n street: \"Lake Park\",\n building: \"C\",\n number: 2035,\n companyAddress: \"Lake Street 42\",\n companyName: \"SoftLake Co\",\n gender: \"M\"\n });\n}\n\nclass Demo3 extends Component {\n render() {\n return (\n \n );\n }\n}\n\n\n", "desc": " columns[n] 可以内嵌 children,以渲染分组表头。", "scss_code": ".demo3{\n .u-table-thead th {\n padding-top: 0px;\n padding-bottom: 0px;\n }\n}" }, { "example": _react2['default'].createElement(Demo30, null), "title": " 大数据加载", "code": "/**\n*\n* @title 大数据加载\n* 【Tooltip】\n* @description\n*/\n\nimport React, { Component } from \"react\";\nimport { Table, Tooltip } from 'tinper-bee';\nimport BigData from \"tinper-bee/lib/bigData\";;\nconst BigDataTable = BigData(Table);\nconst columns = [\n {\n title:'序号',\n dataIndex:'index',\n width:'50',\n render:(text,record,index)=>{\n return index\n },\n fixed:'left'\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 title: \"操作\",\n dataIndex: \"d\",\n key: \"d\",\n fixed:'right',\n render(text, record, index) {\n return (\n
\n {\n alert('这是第' + index + '列,内容为:' + text);\n }}\n >\n 一些操作\n \n
\n );\n }\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\n", "desc": "", "scss_code": ".big-data tr td {\n // height: 48px;\n}" }, { "example": _react2['default'].createElement(Demo31, null), "title": " 含有嵌套子表格的大数据场景", "code": "/**\n*\n* @title 含有嵌套子表格的大数据场景\n* @description 通过expandedRowRender参数来实现子表格\n*\n*/\n\nimport React, { Component } from \"react\";\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 alert(\"这是第\" + index + \"列,内容为:\" + text);\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 alert(\"这是第\" + index + \"列,内容为:\" + text);\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\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 = 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 { 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 footer={currentData =>
表尾: 我是小尾巴
}\n />\n );\n }\n}\n\n\n", "desc": " 通过expandedRowRender参数来实现子表格" }, { "example": _react2['default'].createElement(Demo32, null), "title": " 大数据加载下的复杂Table", "code": "/**\n*\n* @title 大数据加载下的复杂Table\n*\n* @description\n*/\n\nimport React, { Component } from \"react\";\nimport { Table, Popover, Icon, Checkbox, Tooltip } 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:'50',\n render:(text,record,index)=>{\n return index\n },\n fixed:'left'\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 title: \"操作\",\n dataIndex: \"d\",\n key: \"d\",\n fixed:'right',\n render(text, record, index) {\n return (\n
\n {\n alert('这是第' + index + '列,内容为:' + text);\n }}\n >\n 一些操作\n \n
\n );\n }\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 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(Demo33, null), "title": " 快捷键在table中的简单使用应用。", "code": "/**\n*\n* @title 快捷键在table中的简单使用应用。\n* @description tab 键可以默认选中第一行、up 选中上一条、down 选中下一条 更多api 见文档说明。\n*/\n\nimport React, { Component } from \"react\";\nimport { Table, Checkbox, Tooltip, Button } from 'tinper-bee';\n\nconst columns = [\n {\n title: \"\",\n dataIndex: \"d\",\n fixed: \"left\",\n key: \"d\",\n width:80,\n render(text, record, index) {\n return (\n
\n \n
\n );\n }\n },\n { title: \"用户名\", dataIndex: \"a\", key: \"a\", width:80 , className:\"rowClassName\"},\n { id: \"123\", title: \"性别\", dataIndex: \"b\", key: \"b\", width: 100 },\n { title: \"年龄\", dataIndex: \"c\", key: \"c\", width: 200 }\n];\n\nconst data = [\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\nclass Demo33 extends Component {\n\n constructor(props){\n super(props);\n this.state = {\n data: data,\n selectedRowIndex: 2\n }\n }\n\n onKeyTab=()=>{\n let {selectedRowIndex} = this.state;\n // let count = selectedRowIndex;//(selectedRowIndex+1);\n // count == (data.length-1)?count = -1:count;\n // this.setState({\n // selectedRowIndex: (count+1)\n // })\n console.log(\" ---onKeyTab---- \",selectedRowIndex);\n this.setState({\n selectedRowIndex: 0\n })\n }\n\n onKeyUp=()=>{\n let {selectedRowIndex} = this.state;\n let count = selectedRowIndex;\n let len = (data.length-1);\n count = count == 0?count = len:(count-1);\n this.setState({\n selectedRowIndex: count\n })\n }\n\n onKeyDown=()=>{\n let {selectedRowIndex} = this.state;\n let count = selectedRowIndex;\n count == (data.length-1)?count = -1:(count+1);\n this.setState({\n selectedRowIndex: (count+1)\n })\n }\n \n onTableKeyDown = ()=>{\n let {selectedRowIndex} = this.state;\n console.log(\" ----onTabkeKeyDown--- \",selectedRowIndex);\n }\n \n render() {\n return (\n
\n {\n if (this.state.selectedRowIndex == index) {\n return 'selected';\n } else {\n return '';\n }\n }}\n onRowClick={(record,index,indent)=>{\n this.setState({ \n selectedRowIndex: index\n });\n }}\n onKeyTab={this.onKeyTab}\n onKeyUp={this.onKeyUp}\n onKeyDown={this.onKeyDown}\n onTableKeyDown={this.onTableKeyDown} \n scroll={{ x: \"110%\", y: 140 }}\n />
\n );\n }\n}\n\n\n", "desc": " tab 键可以默认选中第一行、up 选中上一条、down 选中下一条 更多api 见文档说明。" }, { "example": _react2['default'].createElement(Demo4, null), "title": " 树形数据展示", "code": "/**\n*\n* @title 树形数据展示\n* @description 通过在data中配置children数据,来自动生成树形数据\n*\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(Demo5, null), "title": " 固定列", "code": "/**\n*\n* @title 固定列\n* @description 固定列到表格的某侧\n*\n*/\n\n\n\nimport React, { Component } from 'react';\nimport { Table } from 'tinper-bee';\n\n\n\nconst columns5 = [\n {\n title: \"Full Name\",\n width: 100,\n dataIndex: \"name\",\n key: \"name\",\n fixed: \"left\"\n },\n { title: \"Age\", width: 100, dataIndex: \"age\", key: \"age\", fixed: \"left\" },\n { title: \"address\", dataIndex: \"address\", key: \"address\" }\n];\n\nconst data5 = [\n {\n key: \"1\",\n name: \"John Brown\",\n age: 32,\n address: \"New York Park\"\n },\n {\n key: \"2\",\n name: \"Jim Green\",\n age: 40,\n address: \"London Park\"\n },\n {\n key: \"3\",\n name: \"Jim Green\",\n age: 40,\n address: \"London Park\"\n },\n {\n key: \"4\",\n name: \"Jim Green\",\n age: 40,\n address: \"London Park\"\n }\n];\n\nclass Demo5 extends Component {\n render() {\n return
;\n }\n}\n\n", "desc": " 固定列到表格的某侧" }, { "example": _react2['default'].createElement(Demo6, null), "title": " 固定表头", "code": "/**\n*\n* @title 固定表头\n* @description 方便一页内展示大量数据。需要指定 column 的 width 属性,否则列头和内容可能不对齐。(还可以设置scroll来支持横向或纵向滚动)\n*\n*/\n\n\nimport React, { Component } from 'react';\nimport { Table } from 'tinper-bee';\nimport dragColumn from \"tinper-bee/lib/dragColumn\";;;\nconst DragColumnTable = dragColumn(Table);\n\nconst columns6 = [\n {\n title: \"Full Name\",\n width: 100,\n dataIndex: \"name\",\n key: \"name\"\n },\n { title: \"Age\", width: 100, dataIndex: \"age\", key: \"age\"},\n { title: \"Address\", dataIndex: \"address\", key: \"1\" }\n];\n\nconst data6 = [\n {\n key: \"1\",\n name: \"John Brown\",\n age: 32,\n address: \"New York Park\"\n },\n {\n key: \"2\",\n name: \"Jim Green\",\n age: 40,\n address: \"London Park\"\n },\n {\n key: \"3\",\n name: \"Jim Green\",\n age: 40,\n address: \"London Park\"\n },\n {\n key: \"4\",\n name: \"Jim Green\",\n age: 40,\n address: \"London Park\"\n },{\n key: \"11\",\n name: \"John Brown\",\n age: 32,\n address: \"New York Park\"\n },\n {\n key: \"12\",\n name: \"Jim Green\",\n age: 40,\n address: \"London Park\"\n },\n {\n key: \"13\",\n name: \"Jim Green\",\n age: 40,\n address: \"London Park\"\n },\n {\n key: \"14\",\n name: \"Jim Green\",\n age: 40,\n address: \"London Park\"\n }\n];\n\nclass Demo6 extends Component {\n render() {\n return ;\n }\n}\n\n", "desc": " 方便一页内展示大量数据。需要指定 column 的 width 属性,否则列头和内容可能不对齐。(还可以设置scroll来支持横向或纵向滚动)" }, { "example": _react2['default'].createElement(Demo7, null), "title": " 主子表", "code": "/**\n *\n * @title 主子表\n * @description 主表点击子表联动\n *\n */\n\nimport React, { Component } from \"react\";\nimport { Table } from 'tinper-bee';\n\nconst columns7 = [\n { title: \"班级\", dataIndex: \"a\", key: \"a\" },\n { title: \"人数\", dataIndex: \"b\", key: \"b\" },\n { title: \"班主任\", dataIndex: \"c\", key: \"c\" },\n {\n title: \"武功级别\",\n dataIndex: \"d\",\n key: \"d\"\n }\n];\n\nconst data7 = [\n { a: \"02级一班\", b: \"2\", c: \"欧阳锋\", d: \"大侠\", key: \"1\" },\n { a: \"03级二班\", b: \"3\", c: \"归海一刀\", d: \"大侠\", key: \"2\" },\n { a: \"05级三班\", b: \"1\", c: \"一拳超人\", d: \"愣头青\", key: \"3\" }\n];\n\nconst columns7_1 = [\n { title: \"姓名\", dataIndex: \"a\", key: \"a\" },\n { title: \"班级\", dataIndex: \"b\", key: \"b\" },\n { title: \"系别\", dataIndex: \"c\", key: \"c\" }\n];\n\nclass Demo7 extends Component {\n constructor(props) {\n super(props);\n this.state = {\n children_data: []\n };\n }\n\n rowclick = (record, index) => {\n if (record.a === \"02级一班\") {\n this.setState({\n children_data: [\n { a: \"郭靖\", b: \"02级一班\", c: \"文学系\", key: \"1\" },\n { a: \"黄蓉\", b: \"02级一班\", c: \"文学系\", key: \"2\" }\n ]\n });\n } else if (record.a === \"03级二班\") {\n this.setState({\n children_data: [\n { a: \"杨过\", b: \"03级二班\", c: \"外语系\", key: \"1\" },\n { a: \"小龙女\", b: \"03级二班\", c: \"外语系\", key: \"2\" },\n { a: \"傻姑\", b: \"03级二班\", c: \"外语系\", key: \"3\" }\n ]\n });\n } else if (record.a === \"05级三班\") {\n this.setState({\n children_data: [{ a: \"金圣叹\", b: \"05级三班\", c: \"美术系\", key: \"1\" }]\n });\n }\n };\n\n render() {\n return (\n
\n
标题: 我是主表
}\n />\n
标题: 我是子表
}\n />\n
\n );\n }\n}\n\n\n", "desc": " 主表点击子表联动" }, { "example": _react2['default'].createElement(Demo8, null), "title": " 表格+分页", "code": "/**\n *\n * @title 表格+分页\n * @description 点击分页联动表格\n */\n\nimport React, { Component } from \"react\";\n\nimport { Table, Pagination } from 'tinper-bee';\n\nconst columns8 = [\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 title: \"武功级别\",\n dataIndex: \"d\",\n key: \"d\"\n }\n];\n\nconst pageData = {\n 1: [\n { a: \"杨过\", b: \"男\", c: 30, d: \"内行\", key: \"2\" },\n { a: \"令狐冲\", b: \"男\", c: 41, d: \"大侠\", key: \"1\" },\n { a: \"郭靖\", b: \"男\", c: 25, d: \"大侠\", key: \"3\" }\n ],\n 2: [\n { a: \"芙蓉姐姐\", b: \"女\", c: 23, d: \"大侠\", key: \"1\" },\n { a: \"芙蓉妹妹\", b: \"女\", c: 23, d: \"内行\", key: \"2\" }\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 }\n}\n\n", "desc": " 点击分页联动表格" }, { "example": _react2['default'].createElement(Demo9, null), "title": " 表格+搜索", "code": "/**\n *\n * @title 表格+搜索\n * @description 搜索刷新表格数据\n *\n *\n * import {Table} from 'tinper-bee';\n */\n\nimport React, { Component } from \"react\";\n\nimport { Table, FormControl, InputGroup, Icon } 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 columns9 = [\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 },\n {\n title: \"武功级别\",\n dataIndex: \"d\",\n key: \"d\"\n }\n];\n\nconst userData = [\n { a: \"杨过\", b: \"男\", c: 30, d: \"内行\", key: \"2\" },\n { a: \"令狐冲\", b: \"男\", c: 41, d: \"大侠\", key: \"1\" },\n { a: \"郭靖\", b: \"男\", c: 25, 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 );\n }\n}\n\n\n", "desc": " 搜索刷新表格数据" }]; var Demo = function (_Component) { _inherits(Demo, _Component); function Demo(props) { _classCallCheck(this, Demo); var _this = _possibleConstructorReturn(this, _Component.call(this, props)); _this.state = { open: false }; _this.handleClick = _this.handleClick.bind(_this); return _this; } Demo.prototype.handleClick = function handleClick() { this.setState({ open: !this.state.open }); }; Demo.prototype.render = function render() { var _props = this.props, title = _props.title, example = _props.example, code = _props.code, desc = _props.desc, scss_code = _props.scss_code; var caret = this.state.open ? CARETUP : CARET; var text = this.state.open ? "隐藏代码" : "查看代码"; var header = _react2['default'].createElement( 'div', null, example, _react2['default'].createElement( _beeButton2['default'], { style: { "marginTop": "10px" }, shape: 'block', onClick: this.handleClick }, caret, text ) ); return _react2['default'].createElement( _beeLayout.Col, { md: 12 }, _react2['default'].createElement( 'h3', null, title ), _react2['default'].createElement( 'p', null, desc ), _react2['default'].createElement( _beePanel.Panel, { copyable: true, collapsible: true, headerContent: true, expanded: this.state.open, colors: 'bordered', header: header, footerStyle: { padding: 0 } }, _react2['default'].createElement( 'pre', null, _react2['default'].createElement( 'code', { className: 'hljs javascript' }, code ) ), !!scss_code ? _react2['default'].createElement( 'pre', null, _react2['default'].createElement( 'code', { className: 'hljs css' }, scss_code ) ) : null ) ); }; return Demo; }(_react.Component); var DemoGroup = function (_Component2) { _inherits(DemoGroup, _Component2); function DemoGroup(props) { _classCallCheck(this, DemoGroup); return _possibleConstructorReturn(this, _Component2.call(this, props)); } DemoGroup.prototype.render = function render() { return _react2['default'].createElement( _beeLayout.Row, null, DemoArray.map(function (child, index) { return _react2['default'].createElement(Demo, { example: child.example, title: child.title, code: child.code, scss_code: child.scss_code, desc: child.desc, key: index }); }) ); }; return DemoGroup; }(_react.Component); _reactDom2['default'].render(_react2['default'].createElement(DemoGroup, null), document.getElementById('tinperBeeDemo')); /***/ }), /* 1 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.Con = exports.Row = exports.Col = undefined; var _Col2 = __webpack_require__(2); var _Col3 = _interopRequireDefault(_Col2); var _Row2 = __webpack_require__(6); var _Row3 = _interopRequireDefault(_Row2); var _Layout = __webpack_require__(7); var _Layout2 = _interopRequireDefault(_Layout); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } exports.Col = _Col3["default"]; exports.Row = _Row3["default"]; exports.Con = _Layout2["default"]; /***/ }), /* 2 */ /***/ (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__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); 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]), /** * xs显示列数 */ xs: _propTypes2["default"].number, /** * sm显示列数 */ sm: _propTypes2["default"].number, /** * md显示列数 */ md: _propTypes2["default"].number, /** * lg显示列数 */ lg: _propTypes2["default"].number, /** * xs偏移列数 */ xsOffset: _propTypes2["default"].number, /** * sm偏移列数 */ smOffset: _propTypes2["default"].number, /** * md偏移列数 */ mdOffset: _propTypes2["default"].number, /** * lg偏移列数 */ lgOffset: _propTypes2["default"].number, /** * xs右偏移列数 */ xsPush: _propTypes2["default"].number, /** * sm右偏移列数 */ smPush: _propTypes2["default"].number, /** * md右偏移列数 */ mdPush: _propTypes2["default"].number, /** * lg右偏移列数 */ lgPush: _propTypes2["default"].number, /** * xs左偏移列数 */ xsPull: _propTypes2["default"].number, /** * sm左偏移列数 */ smPull: _propTypes2["default"].number, /** * md左偏移列数 */ mdPull: _propTypes2["default"].number, /** * lg左偏移列数 */ lgPull: _propTypes2["default"].number }; var defaultProps = { componentClass: 'div', clsPrefix: 'u-col' }; var DEVICE_SIZES = ['lg', 'md', 'sm', 'xs']; var Col = function (_Component) { _inherits(Col, _Component); function Col() { _classCallCheck(this, Col); return _possibleConstructorReturn(this, _Component.apply(this, arguments)); } Col.prototype.render = function render() { var _props = this.props, Component = _props.componentClass, className = _props.className, clsPrefix = _props.clsPrefix, others = _objectWithoutProperties(_props, ['componentClass', 'className', 'clsPrefix']); var tbClass = []; /** * 对传入props做样式转化 * @type {[type]} */ DEVICE_SIZES.forEach(function (size) { function popProp(propSuffix, modifier) { var propName = '' + size + propSuffix; var propValue = others[propName]; if (propValue != undefined && propValue != null) { tbClass.push(clsPrefix + '-' + size + modifier + '-' + propValue); } delete others[propName]; } popProp('', ''); popProp('Offset', '-offset'); popProp('Push', '-push'); popProp('Pull', '-pull'); }); return _react2["default"].createElement( Component, _extends({ className: (0, _classnames2["default"])(tbClass, className) }, others), this.props.children ); }; return Col; }(_react.Component); Col.defaultProps = defaultProps; Col.propTypes = propTypes; exports["default"] = Col; module.exports = exports['default']; /***/ }), /* 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 */ /***/ (function(module, exports) { module.exports = React; /***/ }), /* 5 */ /***/ (function(module, exports) { module.exports = PropTypes; /***/ }), /* 6 */ /***/ (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__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); 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]) }; var defaultProps = { componentClass: 'div', clsPrefix: 'u-row' }; var Row = function (_Component) { _inherits(Row, _Component); function Row() { _classCallCheck(this, Row); return _possibleConstructorReturn(this, _Component.apply(this, arguments)); } Row.prototype.render = function render() { var _props = this.props, Component = _props.componentClass, clsPrefix = _props.clsPrefix, className = _props.className, others = _objectWithoutProperties(_props, ['componentClass', 'clsPrefix', 'className']); var bsclass = '' + clsPrefix; return _react2["default"].createElement( Component, _extends({}, others, { className: (0, _classnames2["default"])(bsclass, className) }), this.props.children ); }; return Row; }(_react.Component); Row.propTypes = propTypes; Row.defaultProps = defaultProps; exports["default"] = Row; module.exports = exports['default']; /***/ }), /* 7 */ /***/ (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__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); 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']; /***/ }), /* 8 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.PanelGroup = exports.Panel = undefined; var _Panel2 = __webpack_require__(9); var _Panel3 = _interopRequireDefault(_Panel2); var _PanelGroup2 = __webpack_require__(81); var _PanelGroup3 = _interopRequireDefault(_PanelGroup2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } exports.Panel = _Panel3["default"]; exports.PanelGroup = _PanelGroup3["default"]; /***/ }), /* 9 */ /***/ (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__(4); var _react2 = _interopRequireDefault(_react); var _beeTransition = __webpack_require__(10); var _beeMessage = __webpack_require__(65); var _beeMessage2 = _interopRequireDefault(_beeMessage); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _copyToClipboard = __webpack_require__(79); var _copyToClipboard2 = _interopRequireDefault(_copyToClipboard); 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 = { //是否添加折叠 collapsible: _propTypes2["default"].bool, onSelect: _propTypes2["default"].func, //头部组件 header: _propTypes2["default"].node, headerStyle: _propTypes2["default"].object, id: _propTypes2["default"].oneOfType([_propTypes2["default"].string, _propTypes2["default"].number]), headerContent: _propTypes2["default"].bool, //footer组件 footer: _propTypes2["default"].node, footerStyle: _propTypes2["default"].object, //默认是否打开 defaultExpanded: _propTypes2["default"].bool, //是否打开 expanded: _propTypes2["default"].bool, //每个panel的标记 eventKey: _propTypes2["default"].any, headerRole: _propTypes2["default"].string, panelRole: _propTypes2["default"].string, //颜色 colors: _propTypes2["default"].oneOf(['primary', 'accent', 'success', 'info', 'warning', 'danger', 'default', 'bordered']), // From Collapse.的扩展动画 onEnter: _propTypes2["default"].func, onEntering: _propTypes2["default"].func, onEntered: _propTypes2["default"].func, onExit: _propTypes2["default"].func, onExiting: _propTypes2["default"].func, onExited: _propTypes2["default"].func, //是否可复制内容 copyable: _propTypes2["default"].bool }; var defaultProps = { defaultExpanded: false, clsPrefix: "u-panel", colors: "default" }; var Panel = function (_React$Component) { _inherits(Panel, _React$Component); function Panel(props, context) { _classCallCheck(this, Panel); var _this = _possibleConstructorReturn(this, _React$Component.call(this, props, context)); _this.handleClickTitle = _this.handleClickTitle.bind(_this); _this.state = { expanded: _this.props.defaultExpanded }; return _this; } //头部点击事件 Panel.prototype.handleClickTitle = function handleClickTitle(e) { // 不让事件进入事件池 e.persist(); e.selected = true; if (this.props.onSelect) { this.props.onSelect(this.props.eventKey, e); } else { e.preventDefault(); } if (e.selected) { this.setState({ expanded: !this.state.expanded }); } }; //渲染panelheader Panel.prototype.renderHeader = function renderHeader(collapsible, header, id, role, expanded, clsPrefix) { var titleClassName = clsPrefix + '-title'; if (!collapsible) { if (!_react2["default"].isValidElement(header)) { return header; } return (0, _react.cloneElement)(header, { className: (0, _classnames2["default"])(header.props.className, titleClassName) }); } if (!_react2["default"].isValidElement(header)) { return _react2["default"].createElement( 'h4', { role: 'presentation', className: titleClassName }, this.renderAnchor(header, id, role, expanded) ); } if (this.props.headerContent) { return (0, _react.cloneElement)(header, { className: (0, _classnames2["default"])(header.props.className, titleClassName) }); } return (0, _react.cloneElement)(header, { className: (0, _classnames2["default"])(header.props.className, titleClassName), children: this.renderAnchor(header.props.children, id, role, expanded) }); }; //如果使用链接,渲染为a标签 Panel.prototype.renderAnchor = function renderAnchor(header, id, role, expanded) { return _react2["default"].createElement( 'a', { role: role, href: id && '#' + id, 'aria-controls': id, 'aria-expanded': expanded, 'aria-selected': expanded, className: expanded ? null : 'collapsed' }, header ); }; //复制代码,弹出提示信息 Panel.prototype.copyDemo = function copyDemo(e) { var panelTarget = e.target.parentNode; var clipBoardContent = panelTarget.firstChild.innerText; (0, _copyToClipboard2["default"])(clipBoardContent); _beeMessage2["default"].create({ content: '复制成功!', color: 'success', duration: 2 }); }; //如果有折叠动画,渲染折叠动画 Panel.prototype.renderCollapsibleBody = function renderCollapsibleBody(id, expanded, role, children, clsPrefix, copyable, animationHooks) { return _react2["default"].createElement( _beeTransition.Collapse, _extends({ 'in': expanded }, animationHooks), _react2["default"].createElement( 'div', { id: id, role: role, className: clsPrefix + '-collapse', 'aria-hidden': !expanded }, this.renderBody(children, clsPrefix, copyable) ) ); }; //渲染panelbody Panel.prototype.renderBody = function renderBody(rawChildren, clsPrefix, copyable) { var self = this; var children = []; var bodyChildren = []; var bodyClassName = clsPrefix + '-body'; //添加到body的children中 function maybeAddBody(self) { if (!bodyChildren.length) { return; } // 给子组件添加key,为了之后触发事件时使用 children.push(_react2["default"].createElement( 'div', { key: children.length, className: bodyClassName }, bodyChildren, copyable && _react2["default"].createElement('i', { className: clsPrefix + '-copy uf uf-files-o', onClick: self.copyDemo }) )); bodyChildren = []; } //转换为数组,方便复用 _react2["default"].Children.toArray(rawChildren).forEach(function (child) { if (_react2["default"].isValidElement(child) && child.props.fill) { maybeAddBody(self); //将标示fill设置为undefined children.push((0, _react.cloneElement)(child, { fill: undefined })); return; } bodyChildren.push(child); }); maybeAddBody(self); return children; }; Panel.prototype.render = function render() { var _props = this.props, collapsible = _props.collapsible, header = _props.header, id = _props.id, footer = _props.footer, propsExpanded = _props.expanded, footerStyle = _props.footerStyle, headerStyle = _props.headerStyle, headerRole = _props.headerRole, panelRole = _props.panelRole, className = _props.className, colors = _props.colors, children = _props.children, onEnter = _props.onEnter, onEntering = _props.onEntering, onEntered = _props.onEntered, clsPrefix = _props.clsPrefix, onExit = _props.onExit, headerContent = _props.headerContent, onExiting = _props.onExiting, onExited = _props.onExited, defaultExpanded = _props.defaultExpanded, eventKey = _props.eventKey, onSelect = _props.onSelect, copyable = _props.copyable, props = _objectWithoutProperties(_props, ['collapsible', 'header', 'id', 'footer', 'expanded', 'footerStyle', 'headerStyle', 'headerRole', 'panelRole', 'className', 'colors', 'children', 'onEnter', 'onEntering', 'onEntered', 'clsPrefix', 'onExit', 'headerContent', 'onExiting', 'onExited', 'defaultExpanded', 'eventKey', 'onSelect', 'copyable']); var expanded = propsExpanded != null ? propsExpanded : this.state.expanded; var classes = {}; classes['' + clsPrefix] = true; classes[clsPrefix + '-' + colors] = true; var headerClass = _defineProperty({}, clsPrefix + '-heading', true); copyable === false ? false : true; return _react2["default"].createElement( 'div', _extends({}, props, { className: (0, _classnames2["default"])(className, classes), id: collapsible ? null : id }), header && _react2["default"].createElement( 'div', { className: (0, _classnames2["default"])(headerClass), style: headerStyle, onClick: this.handleClickTitle }, this.renderHeader(collapsible, header, id, headerRole, expanded, clsPrefix) ), collapsible ? this.renderCollapsibleBody(id, expanded, panelRole, children, clsPrefix, copyable, { onEnter: onEnter, onEntering: onEntering, onEntered: onEntered, onExit: onExit, onExiting: onExiting, onExited: onExited }) : this.renderBody(children, clsPrefix, copyable), footer && _react2["default"].createElement( 'div', { className: clsPrefix + '-footer', style: footerStyle }, footer ) ); }; return Panel; }(_react2["default"].Component); Panel.propTypes = propTypes; Panel.defaultProps = defaultProps; exports["default"] = Panel; module.exports = exports['default']; /***/ }), /* 10 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.Fade = exports.Collapse = exports.Transition = undefined; var _Transition2 = __webpack_require__(11); var _Transition3 = _interopRequireDefault(_Transition2); var _Collapse2 = __webpack_require__(17); var _Collapse3 = _interopRequireDefault(_Collapse2); var _Fade2 = __webpack_require__(64); var _Fade3 = _interopRequireDefault(_Fade2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } exports.Transition = _Transition3["default"]; exports.Collapse = _Collapse3["default"]; exports.Fade = _Fade3["default"]; /***/ }), /* 11 */ /***/ (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__(4); var _react2 = _interopRequireDefault(_react); var _reactDom = __webpack_require__(12); var _reactDom2 = _interopRequireDefault(_reactDom); var _properties = __webpack_require__(13); var _properties2 = _interopRequireDefault(_properties); var _on = __webpack_require__(16); var _on2 = _interopRequireDefault(_on); var _classnames = __webpack_require__(3); var _classnames2 = _interopRequireDefault(_classnames); var _propTypes = __webpack_require__(5); 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; /***/ }), /* 12 */ /***/ (function(module, exports) { module.exports = ReactDOM; /***/ }), /* 13 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(14); 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__(15)); 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 }; } /***/ }), /* 14 */ /***/ (function(module, exports) { function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } module.exports = _interopRequireDefault; /***/ }), /* 15 */ /***/ (function(module, exports) { "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"]; /***/ }), /* 16 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(14); exports.__esModule = true; exports.default = void 0; var _inDOM = _interopRequireDefault(__webpack_require__(15)); 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"]; /***/ }), /* 17 */ /***/ (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 _style = __webpack_require__(18); var _style2 = _interopRequireDefault(_style); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _Transition = __webpack_require__(11); var _Transition2 = _interopRequireDefault(_Transition); var _capitalize = __webpack_require__(26); var _capitalize2 = _interopRequireDefault(_capitalize); var _tinperBeeCore = __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 _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 MARGINS = { height: ['marginTop', 'marginBottom'], width: ['marginLeft', 'marginRight'] }; // reading a dimension prop will cause the browser to recalculate, // which will let our animations work function triggerBrowserReflow(node) { node.offsetHeight; // eslint-disable-line no-unused-expressions } function getDimensionValue(dimension, elem) { var value = elem['offset' + (0, _capitalize2["default"])(dimension)]; var margins = MARGINS[dimension]; return value + parseInt((0, _style2["default"])(elem, margins[0]), 10) + parseInt((0, _style2["default"])(elem, margins[1]), 10); } var propTypes = { /** * Show the component; triggers the expand or collapse animation */ "in": _propTypes2["default"].bool, /** * Unmount the component (remove it from the DOM) when it is collapsed */ unmountOnExit: _propTypes2["default"].bool, /** * Run the expand animation when the component mounts, if it is initially * shown */ transitionAppear: _propTypes2["default"].bool, /** * Duration of the collapse animation in milliseconds, to ensure that * finishing callbacks are fired even if the original browser transition end * events are canceled */ timeout: _propTypes2["default"].number, /** * Callback fired before the component expands */ onEnter: _propTypes2["default"].func, /** * Callback fired after the component starts to expand */ onEntering: _propTypes2["default"].func, /** * Callback fired after the component has expanded */ onEntered: _propTypes2["default"].func, /** * Callback fired before the component collapses */ onExit: _propTypes2["default"].func, /** * Callback fired after the component starts to collapse */ onExiting: _propTypes2["default"].func, /** * Callback fired after the component has collapsed */ onExited: _propTypes2["default"].func, /** * The dimension used when collapsing, or a function that returns the * dimension * * _Note: Bootstrap only partially supports 'width'! * You will need to supply your own CSS animation for the `.width` CSS class._ */ dimension: _propTypes2["default"].oneOfType([_propTypes2["default"].oneOf(['height', 'width']), _propTypes2["default"].func]), /** * Function that returns the height or width of the animating DOM node * * Allows for providing some custom logic for how much the Collapse component * should animate in its specified dimension. Called with the current * dimension prop value and the DOM node. */ getDimensionValue: _propTypes2["default"].func, /** * ARIA role of collapsible element */ role: _propTypes2["default"].string }; var defaultProps = { "in": false, timeout: 300, unmountOnExit: false, transitionAppear: false, dimension: 'height', getDimensionValue: getDimensionValue }; var Collapse = function (_React$Component) { _inherits(Collapse, _React$Component); function Collapse(props, context) { _classCallCheck(this, Collapse); var _this = _possibleConstructorReturn(this, _React$Component.call(this, props, context)); _this.handleEnter = _this.handleEnter.bind(_this); _this.handleEntering = _this.handleEntering.bind(_this); _this.handleEntered = _this.handleEntered.bind(_this); _this.handleExit = _this.handleExit.bind(_this); _this.handleExiting = _this.handleExiting.bind(_this); return _this; } /* -- Expanding -- */ Collapse.prototype.handleEnter = function handleEnter(elem) { var dimension = this._dimension(); elem.style[dimension] = '0'; }; Collapse.prototype.handleEntering = function handleEntering(elem) { var dimension = this._dimension(); elem.style[dimension] = this._getScrollDimensionValue(elem, dimension); }; Collapse.prototype.handleEntered = function handleEntered(elem) { var dimension = this._dimension(); elem.style[dimension] = null; }; /* -- Collapsing -- */ Collapse.prototype.handleExit = function handleExit(elem) { var dimension = this._dimension(); elem.style[dimension] = this.props.getDimensionValue(dimension, elem) + 'px'; triggerBrowserReflow(elem); }; Collapse.prototype.handleExiting = function handleExiting(elem) { var dimension = this._dimension(); elem.style[dimension] = '0'; }; Collapse.prototype._dimension = function _dimension() { return typeof this.props.dimension === 'function' ? this.props.dimension() : this.props.dimension; }; // for testing Collapse.prototype._getScrollDimensionValue = function _getScrollDimensionValue(elem, dimension) { return elem['scroll' + (0, _capitalize2["default"])(dimension)] + 'px'; }; Collapse.prototype.render = function render() { var _props = this.props, onEnter = _props.onEnter, onEntering = _props.onEntering, onEntered = _props.onEntered, onExit = _props.onExit, onExiting = _props.onExiting, className = _props.className, props = _objectWithoutProperties(_props, ['onEnter', 'onEntering', 'onEntered', 'onExit', 'onExiting', 'className']); delete props.dimension; delete props.getDimensionValue; var handleEnter = (0, _tinperBeeCore.createChainedFunction)(this.handleEnter, onEnter); var handleEntering = (0, _tinperBeeCore.createChainedFunction)(this.handleEntering, onEntering); var handleEntered = (0, _tinperBeeCore.createChainedFunction)(this.handleEntered, onEntered); var handleExit = (0, _tinperBeeCore.createChainedFunction)(this.handleExit, onExit); var handleExiting = (0, _tinperBeeCore.createChainedFunction)(this.handleExiting, onExiting); var classes = { width: this._dimension() === 'width' }; return _react2["default"].createElement(_Transition2["default"], _extends({}, props, { 'aria-expanded': props.role ? props["in"] : null, className: (0, _classnames2["default"])(className, classes), exitedClassName: 'collapse', exitingClassName: 'collapsing', enteredClassName: 'collapse in', enteringClassName: 'collapsing', onEnter: handleEnter, onEntering: handleEntering, onEntered: handleEntered, onExit: handleExit, onExiting: handleExiting })); }; return Collapse; }(_react2["default"].Component); Collapse.propTypes = propTypes; Collapse.defaultProps = defaultProps; exports["default"] = Collapse; module.exports = exports['default']; /***/ }), /* 18 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(14); exports.__esModule = true; exports.default = style; var _camelizeStyle = _interopRequireDefault(__webpack_require__(19)); var _hyphenateStyle = _interopRequireDefault(__webpack_require__(21)); var _getComputedStyle2 = _interopRequireDefault(__webpack_require__(23)); var _removeStyle = _interopRequireDefault(__webpack_require__(24)); var _properties = __webpack_require__(13); var _isTransform = _interopRequireDefault(__webpack_require__(25)); 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"]; /***/ }), /* 19 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(14); exports.__esModule = true; exports.default = camelizeStyleName; var _camelize = _interopRequireDefault(__webpack_require__(20)); /** * Copyright 2014-2015, Facebook, Inc. * All rights reserved. * https://github.com/facebook/react/blob/2aeb8a2a6beb00617a4217f7f8284924fa2ad819/src/vendor/core/camelizeStyleName.js */ var msPattern = /^-ms-/; function camelizeStyleName(string) { return (0, _camelize.default)(string.replace(msPattern, 'ms-')); } module.exports = exports["default"]; /***/ }), /* 20 */ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports.default = camelize; var rHyphen = /-(.)/g; function camelize(string) { return string.replace(rHyphen, function (_, chr) { return chr.toUpperCase(); }); } module.exports = exports["default"]; /***/ }), /* 21 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(14); exports.__esModule = true; exports.default = hyphenateStyleName; var _hyphenate = _interopRequireDefault(__webpack_require__(22)); /** * Copyright 2013-2014, Facebook, Inc. * All rights reserved. * https://github.com/facebook/react/blob/2aeb8a2a6beb00617a4217f7f8284924fa2ad819/src/vendor/core/hyphenateStyleName.js */ var msPattern = /^ms-/; function hyphenateStyleName(string) { return (0, _hyphenate.default)(string).replace(msPattern, '-ms-'); } module.exports = exports["default"]; /***/ }), /* 22 */ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports.default = hyphenate; var rUpper = /([A-Z])/g; function hyphenate(string) { return string.replace(rUpper, '-$1').toLowerCase(); } module.exports = exports["default"]; /***/ }), /* 23 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(14); exports.__esModule = true; exports.default = _getComputedStyle; var _camelizeStyle = _interopRequireDefault(__webpack_require__(19)); var rposition = /^(top|right|bottom|left)$/; var rnumnonpx = /^([+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|))(?!px)[a-z%]+$/i; function _getComputedStyle(node) { if (!node) throw new TypeError('No Element passed to `getComputedStyle()`'); var doc = node.ownerDocument; return 'defaultView' in doc ? doc.defaultView.opener ? node.ownerDocument.defaultView.getComputedStyle(node, null) : window.getComputedStyle(node, null) : { //ie 8 "magic" from: https://github.com/jquery/jquery/blob/1.11-stable/src/css/curCSS.js#L72 getPropertyValue: function getPropertyValue(prop) { var style = node.style; prop = (0, _camelizeStyle.default)(prop); if (prop == 'float') prop = 'styleFloat'; var current = node.currentStyle[prop] || null; if (current == null && style && style[prop]) current = style[prop]; if (rnumnonpx.test(current) && !rposition.test(prop)) { // Remember the original values var left = style.left; var runStyle = node.runtimeStyle; var rsLeft = runStyle && runStyle.left; // Put in the new values to get a computed value out if (rsLeft) runStyle.left = node.currentStyle.left; style.left = prop === 'fontSize' ? '1em' : current; current = style.pixelLeft + 'px'; // Revert the changed values style.left = left; if (rsLeft) runStyle.left = rsLeft; } return current; } }; } module.exports = exports["default"]; /***/ }), /* 24 */ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports.default = removeStyle; function removeStyle(node, key) { return 'removeProperty' in node.style ? node.style.removeProperty(key) : node.style.removeAttribute(key); } module.exports = exports["default"]; /***/ }), /* 25 */ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports.default = isTransform; var supportedTransforms = /^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i; function isTransform(property) { return !!(property && supportedTransforms.test(property)); } module.exports = exports["default"]; /***/ }), /* 26 */ /***/ (function(module, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = capitalize; function capitalize(string) { return "" + string.charAt(0).toUpperCase() + string.slice(1); } module.exports = exports["default"]; /***/ }), /* 27 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; 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__(28); var _all3 = _interopRequireDefault(_all2); var _componentOrElement2 = __webpack_require__(30); var _componentOrElement3 = _interopRequireDefault(_componentOrElement2); var _deprecated2 = __webpack_require__(31); var _deprecated3 = _interopRequireDefault(_deprecated2); var _elementType2 = __webpack_require__(34); var _elementType3 = _interopRequireDefault(_elementType2); var _isRequiredForA11y2 = __webpack_require__(35); var _isRequiredForA11y3 = _interopRequireDefault(_isRequiredForA11y2); var _splitComponent2 = __webpack_require__(36); var _splitComponent3 = _interopRequireDefault(_splitComponent2); var _createChainedFunction2 = __webpack_require__(37); var _createChainedFunction3 = _interopRequireDefault(_createChainedFunction2); var _keyCode = __webpack_require__(38); var _keyCode2 = _interopRequireDefault(_keyCode); var _contains2 = __webpack_require__(39); var _contains3 = _interopRequireDefault(_contains2); var _addEventListener2 = __webpack_require__(40); var _addEventListener3 = _interopRequireDefault(_addEventListener2); var _cssAnimation2 = __webpack_require__(45); var _cssAnimation3 = _interopRequireDefault(_cssAnimation2); var _toArray2 = __webpack_require__(49); var _toArray3 = _interopRequireDefault(_toArray2); var _Align2 = __webpack_require__(50); var _Align3 = _interopRequireDefault(_Align2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.all = _all3.default; exports.componentOrElement = _componentOrElement3.default; exports.deprecated = _deprecated3.default; exports.elementType = _elementType3.default; exports.isRequiredForA11y = _isRequiredForA11y3.default; exports.splitComponent = _splitComponent3.default; exports.createChainedFunction = _createChainedFunction3.default; exports.KeyCode = _keyCode2.default; exports.contains = _contains3.default; exports.addEventListener = _addEventListener3.default; exports.cssAnimation = _cssAnimation3.default; exports.toArray = _toArray3.default; //export getContainerRenderMixin from './getContainerRenderMixin'; exports.Align = _Align3.default; /***/ }), /* 28 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; exports.default = all; var _createChainableTypeChecker = __webpack_require__(29); 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); } /***/ }), /* 29 */ /***/ (function(module, exports) { '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. 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; } /***/ }), /* 30 */ /***/ (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; }; var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _createChainableTypeChecker = __webpack_require__(29); var _createChainableTypeChecker2 = _interopRequireDefault(_createChainableTypeChecker); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function validate(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 a ReactComponent or a ') + 'DOMElement. You can usually obtain a ReactComponent or DOMElement ' + 'from a ReactElement by attaching a ref to it.'); } if ((propType !== 'object' || typeof propValue.render !== 'function') && propValue.nodeType !== 1) { return new Error('Invalid ' + location + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected a ReactComponent or a ') + 'DOMElement.'); } return null; } exports.default = (0, _createChainableTypeChecker2.default)(validate); /***/ }), /* 31 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; exports.default = deprecated; var _warning = __webpack_require__(32); var _warning2 = _interopRequireDefault(_warning); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var warned = {}; function deprecated(validator, reason) { return function validate(props, propName, componentName, location, propFullName) { var componentNameSafe = componentName || '<>'; var propFullNameSafe = propFullName || propName; if (props[propName] != null) { var messageKey = componentName + '.' + propName; (0, _warning2.default)(warned[messageKey], 'The ' + location + ' `' + propFullNameSafe + '` of ' + ('`' + componentNameSafe + '` is deprecated. ' + reason + '.')); warned[messageKey] = true; } 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)); }; } /* eslint-disable no-underscore-dangle */ function _resetWarned() { warned = {}; } deprecated._resetWarned = _resetWarned; /* eslint-enable no-underscore-dangle */ /***/ }), /* 32 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** * Copyright 2014-2015, 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. */ 'use strict'; /** * 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 = function() {}; if (process.env.NODE_ENV !== 'production') { 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 (format.length < 10 || (/^[s\W]*$/).test(format)) { throw new Error( 'The warning format should be able to uniquely identify this ' + 'warning. Please, use a more descriptive format than: ' + format ); } if (!condition) { var argIndex = 0; var message = 'Warning: ' + format.replace(/%s/g, function() { return args[argIndex++]; }); if (typeof console !== 'undefined') { console.error(message); } try { // 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) {} } }; } module.exports = warning; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(33))) /***/ }), /* 33 */ /***/ (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; }; /***/ }), /* 34 */ /***/ (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; }; var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _createChainableTypeChecker = __webpack_require__(29); 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); /***/ }), /* 35 */ /***/ (function(module, exports) { 'use strict'; exports.__esModule = true; exports.default = isRequiredForA11y; 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)); }; } /***/ }), /* 36 */ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports.default = splitComponentProps; 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]; } /***/ }), /* 37 */ /***/ (function(module, exports) { 'use strict'; exports.__esModule = true; 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; /***/ }), /* 38 */ /***/ (function(module, exports) { 'use strict'; /** * @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; /***/ }), /* 39 */ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports.default = contains; function contains(root, n) { var node = n; while (node) { if (node === root) { return true; } node = node.parentNode; } return false; } /***/ }), /* 40 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; exports.default = addEventListenerWrap; var _addDomEventListener = __webpack_require__(41); var _addDomEventListener2 = _interopRequireDefault(_addDomEventListener); var _reactDom = __webpack_require__(12); var _reactDom2 = _interopRequireDefault(_reactDom); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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); } /***/ }), /* 41 */ /***/ (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__(42); 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']; /***/ }), /* 42 */ /***/ (function(module, exports, __webpack_require__) { /** * @ignore * event object for dom * @author yiminghe@gmail.com */ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var _EventBaseObject = __webpack_require__(43); var _EventBaseObject2 = _interopRequireDefault(_EventBaseObject); var _objectAssign = __webpack_require__(44); var _objectAssign2 = _interopRequireDefault(_objectAssign); var TRUE = true; var FALSE = false; var commonProps = ['altKey', 'bubbles', 'cancelable', 'ctrlKey', 'currentTarget', 'eventPhase', 'metaKey', 'shiftKey', 'target', 'timeStamp', 'view', 'type']; function isNullOrUndefined(w) { return w === null || w === undefined; } var eventNormalizers = [{ reg: /^key/, props: ['char', 'charCode', 'key', 'keyCode', 'which'], fix: function fix(event, nativeEvent) { if (isNullOrUndefined(event.which)) { event.which = !isNullOrUndefined(nativeEvent.charCode) ? nativeEvent.charCode : nativeEvent.keyCode; } // add metaKey to non-Mac browsers (use ctrl for PC 's and Meta for Macs) if (event.metaKey === undefined) { event.metaKey = event.ctrlKey; } } }, { reg: /^touch/, props: ['touches', 'changedTouches', 'targetTouches'] }, { reg: /^hashchange$/, props: ['newURL', 'oldURL'] }, { reg: /^gesturechange$/i, props: ['rotation', 'scale'] }, { reg: /^(mousewheel|DOMMouseScroll)$/, props: [], fix: function fix(event, nativeEvent) { var deltaX = undefined; var deltaY = undefined; var delta = undefined; var wheelDelta = nativeEvent.wheelDelta; var axis = nativeEvent.axis; var wheelDeltaY = nativeEvent.wheelDeltaY; var wheelDeltaX = nativeEvent.wheelDeltaX; var detail = nativeEvent.detail; // ie/webkit if (wheelDelta) { delta = wheelDelta / 120; } // gecko if (detail) { // press control e.detail == 1 else e.detail == 3 delta = 0 - (detail % 3 === 0 ? detail / 3 : detail); } // Gecko if (axis !== undefined) { if (axis === event.HORIZONTAL_AXIS) { deltaY = 0; deltaX = 0 - delta; } else if (axis === event.VERTICAL_AXIS) { deltaX = 0; deltaY = delta; } } // Webkit if (wheelDeltaY !== undefined) { deltaY = wheelDeltaY / 120; } if (wheelDeltaX !== undefined) { deltaX = -1 * wheelDeltaX / 120; } // 默认 deltaY (ie) if (!deltaX && !deltaY) { deltaY = delta; } if (deltaX !== undefined) { /** * deltaX of mousewheel event * @property deltaX * @member Event.DomEvent.Object */ event.deltaX = deltaX; } if (deltaY !== undefined) { /** * deltaY of mousewheel event * @property deltaY * @member Event.DomEvent.Object */ event.deltaY = deltaY; } if (delta !== undefined) { /** * delta of mousewheel event * @property delta * @member Event.DomEvent.Object */ event.delta = delta; } } }, { reg: /^mouse|contextmenu|click|mspointer|(^DOMMouseScroll$)/i, props: ['buttons', 'clientX', 'clientY', 'button', 'offsetX', 'relatedTarget', 'which', 'fromElement', 'toElement', 'offsetY', 'pageX', 'pageY', 'screenX', 'screenY'], fix: function fix(event, nativeEvent) { var eventDoc = undefined; var doc = undefined; var body = undefined; var target = event.target; var button = nativeEvent.button; // Calculate pageX/Y if missing and clientX/Y available if (target && isNullOrUndefined(event.pageX) && !isNullOrUndefined(nativeEvent.clientX)) { eventDoc = target.ownerDocument || document; doc = eventDoc.documentElement; body = eventDoc.body; event.pageX = nativeEvent.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0); event.pageY = nativeEvent.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0); } // which for click: 1 === left; 2 === middle; 3 === right // do not use button if (!event.which && button !== undefined) { if (button & 1) { event.which = 1; } else if (button & 2) { event.which = 3; } else if (button & 4) { event.which = 2; } else { event.which = 0; } } // add relatedTarget, if necessary if (!event.relatedTarget && event.fromElement) { event.relatedTarget = event.fromElement === target ? event.toElement : event.fromElement; } return event; } }]; function retTrue() { return TRUE; } function retFalse() { return FALSE; } function DomEventObject(nativeEvent) { var type = nativeEvent.type; var isNative = typeof nativeEvent.stopPropagation === 'function' || typeof nativeEvent.cancelBubble === 'boolean'; _EventBaseObject2['default'].call(this); this.nativeEvent = nativeEvent; // in case dom event has been mark as default prevented by lower dom node var isDefaultPrevented = retFalse; if ('defaultPrevented' in nativeEvent) { isDefaultPrevented = nativeEvent.defaultPrevented ? retTrue : retFalse; } else if ('getPreventDefault' in nativeEvent) { // https://bugzilla.mozilla.org/show_bug.cgi?id=691151 isDefaultPrevented = nativeEvent.getPreventDefault() ? retTrue : retFalse; } else if ('returnValue' in nativeEvent) { isDefaultPrevented = nativeEvent.returnValue === FALSE ? retTrue : retFalse; } this.isDefaultPrevented = isDefaultPrevented; var fixFns = []; var fixFn = undefined; var l = undefined; var prop = undefined; var props = commonProps.concat(); eventNormalizers.forEach(function (normalizer) { if (type.match(normalizer.reg)) { props = props.concat(normalizer.props); if (normalizer.fix) { fixFns.push(normalizer.fix); } } }); l = props.length; // clone properties of the original event object while (l) { prop = props[--l]; this[prop] = nativeEvent[prop]; } // fix target property, if necessary if (!this.target && isNative) { this.target = nativeEvent.srcElement || document; // srcElement might not be defined either } // check if target is a text node (safari) if (this.target && this.target.nodeType === 3) { this.target = this.target.parentNode; } l = fixFns.length; while (l) { fixFn = fixFns[--l]; fixFn(this, nativeEvent); } this.timeStamp = nativeEvent.timeStamp || Date.now(); } var EventBaseObjectProto = _EventBaseObject2['default'].prototype; (0, _objectAssign2['default'])(DomEventObject.prototype, EventBaseObjectProto, { constructor: DomEventObject, preventDefault: function preventDefault() { var e = this.nativeEvent; // if preventDefault exists run it on the original event if (e.preventDefault) { e.preventDefault(); } else { // otherwise set the returnValue property of the original event to FALSE (IE) e.returnValue = FALSE; } EventBaseObjectProto.preventDefault.call(this); }, stopPropagation: function stopPropagation() { var e = this.nativeEvent; // if stopPropagation exists run it on the original event if (e.stopPropagation) { e.stopPropagation(); } else { // otherwise set the cancelBubble property of the original event to TRUE (IE) e.cancelBubble = TRUE; } EventBaseObjectProto.stopPropagation.call(this); } }); exports['default'] = DomEventObject; module.exports = exports['default']; /***/ }), /* 43 */ /***/ (function(module, exports) { /** * @ignore * base event object for custom and dom event. * @author yiminghe@gmail.com */ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function returnFalse() { return false; } function returnTrue() { return true; } function EventBaseObject() { this.timeStamp = Date.now(); this.target = undefined; this.currentTarget = undefined; } EventBaseObject.prototype = { isEventObject: 1, constructor: EventBaseObject, isDefaultPrevented: returnFalse, isPropagationStopped: returnFalse, isImmediatePropagationStopped: returnFalse, preventDefault: function preventDefault() { this.isDefaultPrevented = returnTrue; }, stopPropagation: function stopPropagation() { this.isPropagationStopped = returnTrue; }, stopImmediatePropagation: function stopImmediatePropagation() { this.isImmediatePropagationStopped = returnTrue; // fixed 1.2 // call stopPropagation implicitly this.stopPropagation(); }, halt: function halt(immediate) { if (immediate) { this.stopImmediatePropagation(); } else { this.stopPropagation(); } this.preventDefault(); } }; exports["default"] = EventBaseObject; module.exports = exports["default"]; /***/ }), /* 44 */ /***/ (function(module, exports) { /* object-assign (c) Sindre Sorhus @license MIT */ 'use strict'; /* 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 _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 _Event = __webpack_require__(46); var _Event2 = _interopRequireDefault(_Event); var _componentClasses = __webpack_require__(47); var _componentClasses2 = _interopRequireDefault(_componentClasses); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var isCssAnimationSupported = _Event2.default.endEvents.length !== 0; var capitalPrefixes = ['Webkit', 'Moz', 'O', // ms is special .... ! 'ms']; var prefixes = ['-webkit-', '-moz-', '-o-', 'ms-', '']; function getStyleProperty(node, name) { var style = window.getComputedStyle(node); var ret = ''; for (var i = 0; i < prefixes.length; i++) { ret = style.getPropertyValue(prefixes[i] + name); if (ret) { break; } } return ret; } function fixBrowserByTimeout(node) { if (isCssAnimationSupported) { var transitionDelay = parseFloat(getStyleProperty(node, 'transition-delay')) || 0; var transitionDuration = parseFloat(getStyleProperty(node, 'transition-duration')) || 0; var animationDelay = parseFloat(getStyleProperty(node, 'animation-delay')) || 0; var animationDuration = parseFloat(getStyleProperty(node, 'animation-duration')) || 0; var time = Math.max(transitionDuration + transitionDelay, animationDuration + animationDelay); // sometimes, browser bug node.rcEndAnimTimeout = setTimeout(function () { node.rcEndAnimTimeout = null; if (node.rcEndListener) { node.rcEndListener(); } }, time * 1000 + 200); } } function clearBrowserBugTimeout(node) { if (node.rcEndAnimTimeout) { clearTimeout(node.rcEndAnimTimeout); node.rcEndAnimTimeout = null; } } var cssAnimation = function cssAnimation(node, transitionName, endCallback) { var nameIsObj = (typeof transitionName === 'undefined' ? 'undefined' : _typeof(transitionName)) === 'object'; var className = nameIsObj ? transitionName.name : transitionName; var activeClassName = nameIsObj ? transitionName.active : transitionName + '-active'; var end = endCallback; var start = void 0; var active = void 0; var nodeClasses = (0, _componentClasses2.default)(node); if (endCallback && Object.prototype.toString.call(endCallback) === '[object Object]') { end = endCallback.end; start = endCallback.start; active = endCallback.active; } if (node.rcEndListener) { node.rcEndListener(); } node.rcEndListener = function (e) { if (e && e.target !== node) { return; } if (node.rcAnimTimeout) { clearTimeout(node.rcAnimTimeout); node.rcAnimTimeout = null; } clearBrowserBugTimeout(node); nodeClasses.remove(className); nodeClasses.remove(activeClassName); _Event2.default.removeEndEventListener(node, node.rcEndListener); node.rcEndListener = null; // Usually this optional end is used for informing an owner of // a leave animation and telling it to remove the child. if (end) { end(); } }; _Event2.default.addEndEventListener(node, node.rcEndListener); if (start) { start(); } nodeClasses.add(className); node.rcAnimTimeout = setTimeout(function () { node.rcAnimTimeout = null; nodeClasses.add(activeClassName); if (active) { setTimeout(active, 0); } fixBrowserByTimeout(node); // 30ms for firefox }, 30); return { stop: function stop() { if (node.rcEndListener) { node.rcEndListener(); } } }; }; cssAnimation.style = function (node, style, callback) { if (node.rcEndListener) { node.rcEndListener(); } node.rcEndListener = function (e) { if (e && e.target !== node) { return; } if (node.rcAnimTimeout) { clearTimeout(node.rcAnimTimeout); node.rcAnimTimeout = null; } clearBrowserBugTimeout(node); _Event2.default.removeEndEventListener(node, node.rcEndListener); node.rcEndListener = null; // Usually this optional callback is used for informing an owner of // a leave animation and telling it to remove the child. if (callback) { callback(); } }; _Event2.default.addEndEventListener(node, node.rcEndListener); node.rcAnimTimeout = setTimeout(function () { for (var s in style) { if (style.hasOwnProperty(s)) { node.style[s] = style[s]; } } node.rcAnimTimeout = null; fixBrowserByTimeout(node); }, 0); }; cssAnimation.setTransition = function (node, p, value) { var property = p; var v = value; if (value === undefined) { v = property; property = ''; } property = property || ''; capitalPrefixes.forEach(function (prefix) { node.style[prefix + 'Transition' + property] = v; }); }; cssAnimation.isCssAnimationSupported = isCssAnimationSupported; exports.default = cssAnimation; /***/ }), /* 46 */ /***/ (function(module, exports) { 'use strict'; exports.__esModule = true; var EVENT_NAME_MAP = { transitionend: { transition: 'transitionend', WebkitTransition: 'webkitTransitionEnd', MozTransition: 'mozTransitionEnd', OTransition: 'oTransitionEnd', msTransition: 'MSTransitionEnd' }, animationend: { animation: 'animationend', WebkitAnimation: 'webkitAnimationEnd', MozAnimation: 'mozAnimationEnd', OAnimation: 'oAnimationEnd', msAnimation: 'MSAnimationEnd' } }; var endEvents = []; function detectEvents() { var testEl = document.createElement('div'); var style = testEl.style; if (!('AnimationEvent' in window)) { delete EVENT_NAME_MAP.animationend.animation; } if (!('TransitionEvent' in window)) { delete EVENT_NAME_MAP.transitionend.transition; } for (var baseEventName in EVENT_NAME_MAP) { if (EVENT_NAME_MAP.hasOwnProperty(baseEventName)) { var baseEvents = EVENT_NAME_MAP[baseEventName]; for (var styleName in baseEvents) { if (styleName in style) { endEvents.push(baseEvents[styleName]); break; } } } } } if (typeof window !== 'undefined' && typeof document !== 'undefined') { detectEvents(); } function addEventListener(node, eventName, eventListener) { node.addEventListener(eventName, eventListener, false); } function removeEventListener(node, eventName, eventListener) { node.removeEventListener(eventName, eventListener, false); } var TransitionEvents = { addEndEventListener: function addEndEventListener(node, eventListener) { if (endEvents.length === 0) { window.setTimeout(eventListener, 0); return; } endEvents.forEach(function (endEvent) { addEventListener(node, endEvent, eventListener); }); }, endEvents: endEvents, removeEndEventListener: function removeEndEventListener(node, eventListener) { if (endEvents.length === 0) { return; } endEvents.forEach(function (endEvent) { removeEventListener(node, endEvent, eventListener); }); } }; exports.default = TransitionEvents; /***/ }), /* 47 */ /***/ (function(module, exports, __webpack_require__) { /** * Module dependencies. */ try { var index = __webpack_require__(48); } catch (err) { var index = __webpack_require__(48); } /** * 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); }; /***/ }), /* 48 */ /***/ (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; }; /***/ }), /* 49 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; exports.default = toArray; var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function toArray(children) { var ret = []; _react2.default.Children.forEach(children, function (c) { ret.push(c); }); return ret; } /***/ }), /* 50 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _reactDom = __webpack_require__(12); var _reactDom2 = _interopRequireDefault(_reactDom); var _domAlign = __webpack_require__(51); var _domAlign2 = _interopRequireDefault(_domAlign); var _addEventListener = __webpack_require__(40); 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; } //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; /***/ }), /* 51 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.alignPoint = exports.alignElement = undefined; var _alignElement = __webpack_require__(52); var _alignElement2 = _interopRequireDefault(_alignElement); var _alignPoint = __webpack_require__(63); var _alignPoint2 = _interopRequireDefault(_alignPoint); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } exports.alignElement = _alignElement2['default']; exports.alignPoint = _alignPoint2['default']; exports['default'] = _alignElement2['default']; /***/ }), /* 52 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _align = __webpack_require__(53); var _align2 = _interopRequireDefault(_align); var _getOffsetParent = __webpack_require__(57); var _getOffsetParent2 = _interopRequireDefault(_getOffsetParent); var _getVisibleRectForElement = __webpack_require__(56); var _getVisibleRectForElement2 = _interopRequireDefault(_getVisibleRectForElement); var _getRegion = __webpack_require__(60); var _getRegion2 = _interopRequireDefault(_getRegion); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function isOutOfVisibleRect(target) { var visibleRect = (0, _getVisibleRectForElement2['default'])(target); var targetRegion = (0, _getRegion2['default'])(target); return !visibleRect || targetRegion.left + targetRegion.width <= visibleRect.left || targetRegion.top + targetRegion.height <= visibleRect.top || targetRegion.left >= visibleRect.right || targetRegion.top >= visibleRect.bottom; } function alignElement(el, refNode, align) { var target = align.target || refNode; var refNodeRegion = (0, _getRegion2['default'])(target); var isTargetNotOutOfVisible = !isOutOfVisibleRect(target); return (0, _align2['default'])(el, refNodeRegion, align, isTargetNotOutOfVisible); } alignElement.__getOffsetParent = _getOffsetParent2['default']; alignElement.__getVisibleRectForElement = _getVisibleRectForElement2['default']; exports['default'] = alignElement; module.exports = exports['default']; /***/ }), /* 53 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _utils = __webpack_require__(54); var _utils2 = _interopRequireDefault(_utils); var _getVisibleRectForElement = __webpack_require__(56); var _getVisibleRectForElement2 = _interopRequireDefault(_getVisibleRectForElement); var _adjustForViewport = __webpack_require__(59); var _adjustForViewport2 = _interopRequireDefault(_adjustForViewport); var _getRegion = __webpack_require__(60); var _getRegion2 = _interopRequireDefault(_getRegion); var _getElFuturePos = __webpack_require__(61); var _getElFuturePos2 = _interopRequireDefault(_getElFuturePos); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } // http://yiminghe.iteye.com/blog/1124720 function isFailX(elFuturePos, elRegion, visibleRect) { return elFuturePos.left < visibleRect.left || elFuturePos.left + elRegion.width > visibleRect.right; } /** * align dom node flexibly * @author yiminghe@gmail.com */ 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 = []; _utils2['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 = (0, _getVisibleRectForElement2['default'])(source); // 当前节点所占的区域, left/top/width/height var elRegion = (0, _getRegion2['default'])(source); // 将 offset 转换成数值,支持百分比 normalizeOffset(offset, elRegion); normalizeOffset(targetOffset, tgtRegion); // 当前节点将要被放置的位置 var elFuturePos = (0, _getElFuturePos2['default'])(elRegion, tgtRegion, points, offset, targetOffset); // 当前节点将要所处的区域 var newElRegion = _utils2['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 = (0, _getElFuturePos2['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 = (0, _getElFuturePos2['default'])(elRegion, tgtRegion, _newPoints, _newOffset, _newTargetOffset); if (!isCompleteFailY(_newElFuturePos, elRegion, visibleRect)) { fail = 1; points = _newPoints; offset = _newOffset; targetOffset = _newTargetOffset; } } } // 如果失败,重新计算当前节点将要被放置的位置 if (fail) { elFuturePos = (0, _getElFuturePos2['default'])(elRegion, tgtRegion, points, offset, targetOffset); _utils2['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 = (0, _adjustForViewport2['default'])(elFuturePos, elRegion, visibleRect, newOverflowCfg); } } // need judge to in case set fixed with in css on height auto element if (newElRegion.width !== elRegion.width) { _utils2['default'].css(source, 'width', _utils2['default'].width(source) + newElRegion.width - elRegion.width); } if (newElRegion.height !== elRegion.height) { _utils2['default'].css(source, 'height', _utils2['default'].height(source) + newElRegion.height - elRegion.height); } // https://github.com/kissyteam/kissy/issues/190 // 相对于屏幕位置没变,而 left/top 变了 // 例如
_utils2['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 }; } exports['default'] = doAlign; /** * 2012-04-26 yiminghe@gmail.com * - 优化智能对齐算法 * - 慎用 resizeXX * * 2011-07-13 yiminghe@gmail.com note: * - 增加智能对齐,以及大小调整选项 **/ module.exports = exports['default']; /***/ }), /* 54 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: 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; }; var _propertyUtils = __webpack_require__(55); var RE_NUM = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source; var getComputedStyleX = void 0; // https://stackoverflow.com/a/3485654/3040605 function forceRelayout(elem) { var originalStyle = elem.style.display; elem.style.display = 'none'; elem.offsetHeight; // eslint-disable-line elem.style.display = originalStyle; } function css(el, name, v) { var value = v; if ((typeof name === 'undefined' ? 'undefined' : _typeof(name)) === 'object') { for (var i in name) { if (name.hasOwnProperty(i)) { css(el, i, name[i]); } } return undefined; } if (typeof value !== 'undefined') { if (typeof value === 'number') { value = value + 'px'; } el.style[name] = value; return undefined; } return getComputedStyleX(el, name); } function getClientPosition(elem) { var box = void 0; var x = void 0; var y = void 0; var doc = elem.ownerDocument; var body = doc.body; var docElem = doc && doc.documentElement; // 根据 GBS 最新数据,A-Grade Browsers 都已支持 getBoundingClientRect 方法,不用再考虑传统的实现方式 box = elem.getBoundingClientRect(); // 注:jQuery 还考虑减去 docElem.clientLeft/clientTop // 但测试发现,这样反而会导致当 html 和 body 有边距/边框样式时,获取的值不正确 // 此外,ie6 会忽略 html 的 margin 值,幸运地是没有谁会去设置 html 的 margin x = box.left; y = box.top; // In IE, most of the time, 2 extra pixels are added to the top and left // due to the implicit 2-pixel inset border. In IE6/7 quirks mode and // IE6 standards mode, this border can be overridden by setting the // document element's border to zero -- thus, we cannot rely on the // offset always being 2 pixels. // In quirks mode, the offset can be determined by querying the body's // clientLeft/clientTop, but in standards mode, it is found by querying // the document element's clientLeft/clientTop. Since we already called // getClientBoundingRect we have already forced a reflow, so it is not // too expensive just to query them all. // ie 下应该减去窗口的边框吧,毕竟默认 absolute 都是相对窗口定位的 // 窗口边框标准是设 documentElement ,quirks 时设置 body // 最好禁止在 body 和 html 上边框 ,但 ie < 9 html 默认有 2px ,减去 // 但是非 ie 不可能设置窗口边框,body html 也不是窗口 ,ie 可以通过 html,body 设置 // 标准 ie 下 docElem.clientTop 就是 border-top // ie7 html 即窗口边框改变不了。永远为 2 // 但标准 firefox/chrome/ie9 下 docElem.clientTop 是窗口边框,即使设了 border-top 也为 0 x -= docElem.clientLeft || body.clientLeft || 0; y -= docElem.clientTop || body.clientTop || 0; return { left: x, top: y }; } function getScroll(w, top) { var ret = w['page' + (top ? 'Y' : 'X') + 'Offset']; var method = 'scroll' + (top ? 'Top' : 'Left'); if (typeof ret !== 'number') { var d = w.document; // ie6,7,8 standard mode ret = d.documentElement[method]; if (typeof ret !== 'number') { // quirks mode ret = d.body[method]; } } return ret; } function getScrollLeft(w) { return getScroll(w); } function getScrollTop(w) { return getScroll(w, true); } function getOffset(el) { var pos = getClientPosition(el); var doc = el.ownerDocument; var w = doc.defaultView || doc.parentWindow; pos.left += getScrollLeft(w); pos.top += getScrollTop(w); return pos; } /** * A crude way of determining if an object is a window * @member util */ function isWindow(obj) { // must use == for ie8 /* eslint eqeqeq:0 */ return obj !== null && obj !== undefined && obj == obj.window; } function getDocument(node) { if (isWindow(node)) { return node.document; } if (node.nodeType === 9) { return node; } return node.ownerDocument; } function _getComputedStyle(elem, name, cs) { var computedStyle = cs; var val = ''; var d = getDocument(elem); computedStyle = computedStyle || d.defaultView.getComputedStyle(elem, null); // https://github.com/kissyteam/kissy/issues/61 if (computedStyle) { val = computedStyle.getPropertyValue(name) || computedStyle[name]; } return val; } var _RE_NUM_NO_PX = new RegExp('^(' + RE_NUM + ')(?!px)[a-z%]+$', 'i'); var RE_POS = /^(top|right|bottom|left)$/; var CURRENT_STYLE = 'currentStyle'; var RUNTIME_STYLE = 'runtimeStyle'; var LEFT = 'left'; var PX = 'px'; function _getComputedStyleIE(elem, name) { // currentStyle maybe null // http://msdn.microsoft.com/en-us/library/ms535231.aspx var ret = elem[CURRENT_STYLE] && elem[CURRENT_STYLE][name]; // 当 width/height 设置为百分比时,通过 pixelLeft 方式转换的 width/height 值 // 一开始就处理了! CUSTOM_STYLE.height,CUSTOM_STYLE.width ,cssHook 解决@2011-08-19 // 在 ie 下不对,需要直接用 offset 方式 // borderWidth 等值也有问题,但考虑到 borderWidth 设为百分比的概率很小,这里就不考虑了 // From the awesome hack by Dean Edwards // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 // If we're not dealing with a regular pixel number // but a number that has a weird ending, we need to convert it to pixels // exclude left right for relativity if (_RE_NUM_NO_PX.test(ret) && !RE_POS.test(name)) { // Remember the original values var style = elem.style; var left = style[LEFT]; var rsLeft = elem[RUNTIME_STYLE][LEFT]; // prevent flashing of content elem[RUNTIME_STYLE][LEFT] = elem[CURRENT_STYLE][LEFT]; // Put in the new values to get a computed value out style[LEFT] = name === 'fontSize' ? '1em' : ret || 0; ret = style.pixelLeft + PX; // Revert the changed values style[LEFT] = left; elem[RUNTIME_STYLE][LEFT] = rsLeft; } return ret === '' ? 'auto' : ret; } if (typeof window !== 'undefined') { getComputedStyleX = window.getComputedStyle ? _getComputedStyle : _getComputedStyleIE; } function getOffsetDirection(dir, option) { if (dir === 'left') { return option.useCssRight ? 'right' : dir; } return option.useCssBottom ? 'bottom' : dir; } function oppositeOffsetDirection(dir) { if (dir === 'left') { return 'right'; } else if (dir === 'right') { return 'left'; } else if (dir === 'top') { return 'bottom'; } else if (dir === 'bottom') { return 'top'; } } // 设置 elem 相对 elem.ownerDocument 的坐标 function setLeftTop(elem, offset, option) { // set position first, in-case top/left are set even on static elem if (css(elem, 'position') === 'static') { elem.style.position = 'relative'; } var presetH = -999; var presetV = -999; var horizontalProperty = getOffsetDirection('left', option); var verticalProperty = getOffsetDirection('top', option); var oppositeHorizontalProperty = oppositeOffsetDirection(horizontalProperty); var oppositeVerticalProperty = oppositeOffsetDirection(verticalProperty); if (horizontalProperty !== 'left') { presetH = 999; } if (verticalProperty !== 'top') { presetV = 999; } var originalTransition = ''; var originalOffset = getOffset(elem); if ('left' in offset || 'top' in offset) { originalTransition = (0, _propertyUtils.getTransitionProperty)(elem) || ''; (0, _propertyUtils.setTransitionProperty)(elem, 'none'); } if ('left' in offset) { elem.style[oppositeHorizontalProperty] = ''; elem.style[horizontalProperty] = presetH + 'px'; } if ('top' in offset) { elem.style[oppositeVerticalProperty] = ''; elem.style[verticalProperty] = presetV + 'px'; } // force relayout forceRelayout(elem); var old = getOffset(elem); var originalStyle = {}; for (var key in offset) { if (offset.hasOwnProperty(key)) { var dir = getOffsetDirection(key, option); var preset = key === 'left' ? presetH : presetV; var off = originalOffset[key] - old[key]; if (dir === key) { originalStyle[dir] = preset + off; } else { originalStyle[dir] = preset - off; } } } css(elem, originalStyle); // force relayout forceRelayout(elem); if ('left' in offset || 'top' in offset) { (0, _propertyUtils.setTransitionProperty)(elem, originalTransition); } var ret = {}; for (var _key in offset) { if (offset.hasOwnProperty(_key)) { var _dir = getOffsetDirection(_key, option); var _off = offset[_key] - originalOffset[_key]; if (_key === _dir) { ret[_dir] = originalStyle[_dir] + _off; } else { ret[_dir] = originalStyle[_dir] - _off; } } } css(elem, ret); } function setTransform(elem, offset) { var originalOffset = getOffset(elem); var originalXY = (0, _propertyUtils.getTransformXY)(elem); var resultXY = { x: originalXY.x, y: originalXY.y }; if ('left' in offset) { resultXY.x = originalXY.x + offset.left - originalOffset.left; } if ('top' in offset) { resultXY.y = originalXY.y + offset.top - originalOffset.top; } (0, _propertyUtils.setTransformXY)(elem, resultXY); } function setOffset(elem, offset, option) { if (option.ignoreShake) { var oriOffset = getOffset(elem); var oLeft = oriOffset.left.toFixed(0); var oTop = oriOffset.top.toFixed(0); var tLeft = offset.left.toFixed(0); var tTop = offset.top.toFixed(0); if (oLeft === tLeft && oTop === tTop) { return; } } if (option.useCssRight || option.useCssBottom) { setLeftTop(elem, offset, option); } else if (option.useCssTransform && (0, _propertyUtils.getTransformName)() in document.body.style) { setTransform(elem, offset, option); } else { setLeftTop(elem, offset, option); } } function each(arr, fn) { for (var i = 0; i < arr.length; i++) { fn(arr[i]); } } function isBorderBoxFn(elem) { return getComputedStyleX(elem, 'boxSizing') === 'border-box'; } var BOX_MODELS = ['margin', 'border', 'padding']; var CONTENT_INDEX = -1; var PADDING_INDEX = 2; var BORDER_INDEX = 1; var MARGIN_INDEX = 0; function swap(elem, options, callback) { var old = {}; var style = elem.style; var name = void 0; // Remember the old values, and insert the new ones for (name in options) { if (options.hasOwnProperty(name)) { old[name] = style[name]; style[name] = options[name]; } } callback.call(elem); // Revert the old values for (name in options) { if (options.hasOwnProperty(name)) { style[name] = old[name]; } } } function getPBMWidth(elem, props, which) { var value = 0; var prop = void 0; var j = void 0; var i = void 0; for (j = 0; j < props.length; j++) { prop = props[j]; if (prop) { for (i = 0; i < which.length; i++) { var cssProp = void 0; if (prop === 'border') { cssProp = '' + prop + which[i] + 'Width'; } else { cssProp = prop + which[i]; } value += parseFloat(getComputedStyleX(elem, cssProp)) || 0; } } } return value; } var domUtils = {}; each(['Width', 'Height'], function (name) { domUtils['doc' + name] = function (refWin) { var d = refWin.document; return Math.max( // firefox chrome documentElement.scrollHeight< body.scrollHeight // ie standard mode : documentElement.scrollHeight> body.scrollHeight d.documentElement['scroll' + name], // quirks : documentElement.scrollHeight 最大等于可视窗口多一点? d.body['scroll' + name], domUtils['viewport' + name](d)); }; domUtils['viewport' + name] = function (win) { // pc browser includes scrollbar in window.innerWidth var prop = 'client' + name; var doc = win.document; var body = doc.body; var documentElement = doc.documentElement; var documentElementProp = documentElement[prop]; // 标准模式取 documentElement // backcompat 取 body return doc.compatMode === 'CSS1Compat' && documentElementProp || body && body[prop] || documentElementProp; }; }); /* 得到元素的大小信息 @param elem @param name @param {String} [extra] 'padding' : (css width) + padding 'border' : (css width) + padding + border 'margin' : (css width) + padding + border + margin */ function getWH(elem, name, ex) { var extra = ex; if (isWindow(elem)) { return name === 'width' ? domUtils.viewportWidth(elem) : domUtils.viewportHeight(elem); } else if (elem.nodeType === 9) { return name === 'width' ? domUtils.docWidth(elem) : domUtils.docHeight(elem); } var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom']; var borderBoxValue = name === 'width' ? elem.getBoundingClientRect().width : elem.getBoundingClientRect().height; var computedStyle = getComputedStyleX(elem); var isBorderBox = isBorderBoxFn(elem, computedStyle); var cssBoxValue = 0; if (borderBoxValue === null || borderBoxValue === undefined || borderBoxValue <= 0) { borderBoxValue = undefined; // Fall back to computed then un computed css if necessary cssBoxValue = getComputedStyleX(elem, name); if (cssBoxValue === null || cssBoxValue === undefined || Number(cssBoxValue) < 0) { cssBoxValue = elem.style[name] || 0; } // Normalize '', auto, and prepare for extra cssBoxValue = parseFloat(cssBoxValue) || 0; } if (extra === undefined) { extra = isBorderBox ? BORDER_INDEX : CONTENT_INDEX; } var borderBoxValueOrIsBorderBox = borderBoxValue !== undefined || isBorderBox; var val = borderBoxValue || cssBoxValue; if (extra === CONTENT_INDEX) { if (borderBoxValueOrIsBorderBox) { return val - getPBMWidth(elem, ['border', 'padding'], which, computedStyle); } return cssBoxValue; } else if (borderBoxValueOrIsBorderBox) { if (extra === BORDER_INDEX) { return val; } return val + (extra === PADDING_INDEX ? -getPBMWidth(elem, ['border'], which, computedStyle) : getPBMWidth(elem, ['margin'], which, computedStyle)); } return cssBoxValue + getPBMWidth(elem, BOX_MODELS.slice(extra), which, computedStyle); } var cssShow = { position: 'absolute', visibility: 'hidden', display: 'block' }; // fix #119 : https://github.com/kissyteam/kissy/issues/119 function getWHIgnoreDisplay() { for (var _len = arguments.length, args = Array(_len), _key2 = 0; _key2 < _len; _key2++) { args[_key2] = arguments[_key2]; } var val = void 0; var elem = args[0]; // in case elem is window // elem.offsetWidth === undefined if (elem.offsetWidth !== 0) { val = getWH.apply(undefined, args); } else { swap(elem, cssShow, function () { val = getWH.apply(undefined, args); }); } return val; } each(['width', 'height'], function (name) { var first = name.charAt(0).toUpperCase() + name.slice(1); domUtils['outer' + first] = function (el, includeMargin) { return el && getWHIgnoreDisplay(el, name, includeMargin ? MARGIN_INDEX : BORDER_INDEX); }; var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom']; domUtils[name] = function (elem, v) { var val = v; if (val !== undefined) { if (elem) { var computedStyle = getComputedStyleX(elem); var isBorderBox = isBorderBoxFn(elem); if (isBorderBox) { val += getPBMWidth(elem, ['padding', 'border'], which, computedStyle); } return css(elem, name, val); } return undefined; } return elem && getWHIgnoreDisplay(elem, name, CONTENT_INDEX); }; }); function mix(to, from) { for (var i in from) { if (from.hasOwnProperty(i)) { to[i] = from[i]; } } return to; } var utils = { getWindow: function getWindow(node) { if (node && node.document && node.setTimeout) { return node; } var doc = node.ownerDocument || node; return doc.defaultView || doc.parentWindow; }, getDocument: getDocument, offset: function offset(el, value, option) { if (typeof value !== 'undefined') { setOffset(el, value, option || {}); } else { return getOffset(el); } }, isWindow: isWindow, each: each, css: css, clone: function clone(obj) { var i = void 0; var ret = {}; for (i in obj) { if (obj.hasOwnProperty(i)) { ret[i] = obj[i]; } } var overflow = obj.overflow; if (overflow) { for (i in obj) { if (obj.hasOwnProperty(i)) { ret.overflow[i] = obj.overflow[i]; } } } return ret; }, mix: mix, getWindowScrollLeft: function getWindowScrollLeft(w) { return getScrollLeft(w); }, getWindowScrollTop: function getWindowScrollTop(w) { return getScrollTop(w); }, merge: function merge() { var ret = {}; for (var _len2 = arguments.length, args = Array(_len2), _key3 = 0; _key3 < _len2; _key3++) { args[_key3] = arguments[_key3]; } for (var i = 0; i < args.length; i++) { utils.mix(ret, args[i]); } return ret; }, viewportWidth: 0, viewportHeight: 0 }; mix(utils, domUtils); exports['default'] = utils; module.exports = exports['default']; /***/ }), /* 55 */ /***/ (function(module, exports) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.getTransformName = getTransformName; exports.setTransitionProperty = setTransitionProperty; exports.getTransitionProperty = getTransitionProperty; exports.getTransformXY = getTransformXY; exports.setTransformXY = setTransformXY; var vendorPrefix = void 0; var jsCssMap = { Webkit: '-webkit-', Moz: '-moz-', // IE did it wrong again ... ms: '-ms-', O: '-o-' }; function getVendorPrefix() { if (vendorPrefix !== undefined) { return vendorPrefix; } vendorPrefix = ''; var style = document.createElement('p').style; var testProp = 'Transform'; for (var key in jsCssMap) { if (key + testProp in style) { vendorPrefix = key; } } return vendorPrefix; } function getTransitionName() { return getVendorPrefix() ? getVendorPrefix() + 'TransitionProperty' : 'transitionProperty'; } function getTransformName() { return getVendorPrefix() ? getVendorPrefix() + 'Transform' : 'transform'; } function setTransitionProperty(node, value) { var name = getTransitionName(); if (name) { node.style[name] = value; if (name !== 'transitionProperty') { node.style.transitionProperty = value; } } } function setTransform(node, value) { var name = getTransformName(); if (name) { node.style[name] = value; if (name !== 'transform') { node.style.transform = value; } } } function getTransitionProperty(node) { return node.style.transitionProperty || node.style[getTransitionName()]; } function getTransformXY(node) { var style = window.getComputedStyle(node, null); var transform = style.getPropertyValue('transform') || style.getPropertyValue(getTransformName()); if (transform && transform !== 'none') { var matrix = transform.replace(/[^0-9\-.,]/g, '').split(','); return { x: parseFloat(matrix[12] || matrix[4], 0), y: parseFloat(matrix[13] || matrix[5], 0) }; } return { x: 0, y: 0 }; } var matrix2d = /matrix\((.*)\)/; var matrix3d = /matrix3d\((.*)\)/; function setTransformXY(node, xy) { var style = window.getComputedStyle(node, null); var transform = style.getPropertyValue('transform') || style.getPropertyValue(getTransformName()); if (transform && transform !== 'none') { var arr = void 0; var match2d = transform.match(matrix2d); if (match2d) { match2d = match2d[1]; arr = match2d.split(',').map(function (item) { return parseFloat(item, 10); }); arr[4] = xy.x; arr[5] = xy.y; setTransform(node, 'matrix(' + arr.join(',') + ')'); } else { var match3d = transform.match(matrix3d)[1]; arr = match3d.split(',').map(function (item) { return parseFloat(item, 10); }); arr[12] = xy.x; arr[13] = xy.y; setTransform(node, 'matrix3d(' + arr.join(',') + ')'); } } else { setTransform(node, 'translateX(' + xy.x + 'px) translateY(' + xy.y + 'px) translateZ(0)'); } } /***/ }), /* 56 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _utils = __webpack_require__(54); var _utils2 = _interopRequireDefault(_utils); var _getOffsetParent = __webpack_require__(57); var _getOffsetParent2 = _interopRequireDefault(_getOffsetParent); var _isAncestorFixed = __webpack_require__(58); var _isAncestorFixed2 = _interopRequireDefault(_isAncestorFixed); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } /** * 获得元素的显示部分的区域 */ function getVisibleRectForElement(element) { var visibleRect = { left: 0, right: Infinity, top: 0, bottom: Infinity }; var el = (0, _getOffsetParent2['default'])(element); var doc = _utils2['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 && _utils2['default'].css(el, 'overflow') !== 'visible') { var pos = _utils2['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 = (0, _getOffsetParent2['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 (!_utils2['default'].isWindow(element) && element.nodeType !== 9) { originalPosition = element.style.position; var position = _utils2['default'].css(element, 'position'); if (position === 'absolute') { element.style.position = 'fixed'; } } var scrollX = _utils2['default'].getWindowScrollLeft(win); var scrollY = _utils2['default'].getWindowScrollTop(win); var viewportWidth = _utils2['default'].viewportWidth(win); var viewportHeight = _utils2['default'].viewportHeight(win); var documentWidth = documentElement.scrollWidth; var documentHeight = documentElement.scrollHeight; // Reset element position after calculate the visible area if (element.style) { element.style.position = originalPosition; } if ((0, _isAncestorFixed2['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; } exports['default'] = getVisibleRectForElement; module.exports = exports['default']; /***/ }), /* 57 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _utils = __webpack_require__(54); var _utils2 = _interopRequireDefault(_utils); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } /** * 得到会导致元素显示不全的祖先元素 */ function getOffsetParent(element) { if (_utils2['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 = _utils2['default'].getDocument(element); var body = doc.body; var parent = void 0; var positionStyle = _utils2['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 = _utils2['default'].css(parent, 'position'); if (positionStyle !== 'static') { return parent; } } return null; } exports['default'] = getOffsetParent; module.exports = exports['default']; /***/ }), /* 58 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports['default'] = isAncestorFixed; var _utils = __webpack_require__(54); var _utils2 = _interopRequireDefault(_utils); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function isAncestorFixed(element) { if (_utils2['default'].isWindow(element) || element.nodeType === 9) { return false; } var doc = _utils2['default'].getDocument(element); var body = doc.body; var parent = null; for (parent = element.parentNode; parent && parent !== body; parent = parent.parentNode) { var positionStyle = _utils2['default'].css(parent, 'position'); if (positionStyle === 'fixed') { return true; } } return false; } module.exports = exports['default']; /***/ }), /* 59 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _utils = __webpack_require__(54); var _utils2 = _interopRequireDefault(_utils); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function adjustForViewport(elFuturePos, elRegion, visibleRect, overflow) { var pos = _utils2['default'].clone(elFuturePos); var size = { width: elRegion.width, height: elRegion.height }; if (overflow.adjustX && pos.left < visibleRect.left) { pos.left = visibleRect.left; } // Left edge inside and right edge outside viewport, try to resize it. if (overflow.resizeWidth && pos.left >= visibleRect.left && pos.left + size.width > visibleRect.right) { size.width -= pos.left + size.width - visibleRect.right; } // Right edge outside viewport, try to move it. if (overflow.adjustX && pos.left + size.width > visibleRect.right) { // 保证左边界和可视区域左边界对齐 pos.left = Math.max(visibleRect.right - size.width, visibleRect.left); } // Top edge outside viewport, try to move it. if (overflow.adjustY && pos.top < visibleRect.top) { pos.top = visibleRect.top; } // Top edge inside and bottom edge outside viewport, try to resize it. if (overflow.resizeHeight && pos.top >= visibleRect.top && pos.top + size.height > visibleRect.bottom) { size.height -= pos.top + size.height - visibleRect.bottom; } // Bottom edge outside viewport, try to move it. if (overflow.adjustY && pos.top + size.height > visibleRect.bottom) { // 保证上边界和可视区域上边界对齐 pos.top = Math.max(visibleRect.bottom - size.height, visibleRect.top); } return _utils2['default'].mix(pos, size); } exports['default'] = adjustForViewport; module.exports = exports['default']; /***/ }), /* 60 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _utils = __webpack_require__(54); var _utils2 = _interopRequireDefault(_utils); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function getRegion(node) { var offset = void 0; var w = void 0; var h = void 0; if (!_utils2['default'].isWindow(node) && node.nodeType !== 9) { offset = _utils2['default'].offset(node); w = _utils2['default'].outerWidth(node); h = _utils2['default'].outerHeight(node); } else { var win = _utils2['default'].getWindow(node); offset = { left: _utils2['default'].getWindowScrollLeft(win), top: _utils2['default'].getWindowScrollTop(win) }; w = _utils2['default'].viewportWidth(win); h = _utils2['default'].viewportHeight(win); } offset.width = w; offset.height = h; return offset; } exports['default'] = getRegion; module.exports = exports['default']; /***/ }), /* 61 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _getAlignOffset = __webpack_require__(62); var _getAlignOffset2 = _interopRequireDefault(_getAlignOffset); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function getElFuturePos(elRegion, refNodeRegion, points, offset, targetOffset) { var p1 = (0, _getAlignOffset2['default'])(refNodeRegion, points[1]); var p2 = (0, _getAlignOffset2['default'])(elRegion, points[0]); var diff = [p2.left - p1.left, p2.top - p1.top]; return { left: elRegion.left - diff[0] + offset[0] - targetOffset[0], top: elRegion.top - diff[1] + offset[1] - targetOffset[1] }; } exports['default'] = getElFuturePos; module.exports = exports['default']; /***/ }), /* 62 */ /***/ (function(module, exports) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); /** * 获取 node 上的 align 对齐点 相对于页面的坐标 */ function getAlignOffset(region, align) { var V = align.charAt(0); var H = align.charAt(1); var w = region.width; var h = region.height; var x = region.left; var y = region.top; if (V === 'c') { y += h / 2; } else if (V === 'b') { y += h; } if (H === 'c') { x += w / 2; } else if (H === 'r') { x += w; } return { left: x, top: y }; } exports['default'] = getAlignOffset; module.exports = exports['default']; /***/ }), /* 63 */ /***/ (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 _utils = __webpack_require__(54); var _utils2 = _interopRequireDefault(_utils); var _align = __webpack_require__(53); var _align2 = _interopRequireDefault(_align); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } /** * `tgtPoint`: { pageX, pageY } or { clientX, clientY }. * If client position provided, will internal convert to page position. */ function alignPoint(el, tgtPoint, align) { var pageX = void 0; var pageY = void 0; var doc = _utils2['default'].getDocument(el); var win = doc.defaultView || doc.parentWindow; var scrollX = _utils2['default'].getWindowScrollLeft(win); var scrollY = _utils2['default'].getWindowScrollTop(win); var viewportWidth = _utils2['default'].viewportWidth(win); var viewportHeight = _utils2['default'].viewportHeight(win); if ('pageX' in tgtPoint) { pageX = tgtPoint.pageX; } else { pageX = scrollX + tgtPoint.clientX; } if ('pageY' in tgtPoint) { pageY = tgtPoint.pageY; } else { pageY = scrollY + tgtPoint.clientY; } var tgtRegion = { left: pageX, top: pageY, width: 0, height: 0 }; var pointInView = pageX >= 0 && pageX <= scrollX + viewportWidth && pageY >= 0 && pageY <= scrollY + viewportHeight; // Provide default target point var points = [align.points[0], 'cc']; return (0, _align2['default'])(el, tgtRegion, _extends({}, align, { points: points }), pointInView); } exports['default'] = alignPoint; module.exports = exports['default']; /***/ }), /* 64 */ /***/ (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__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _Transition = __webpack_require__(11); var _Transition2 = _interopRequireDefault(_Transition); 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 = { /** * Show the component; triggers the fade in or fade out animation */ "in": _propTypes2["default"].bool, /** * Unmount the component (remove it from the DOM) when it is faded out */ unmountOnExit: _propTypes2["default"].bool, /** * Run the fade in animation when the component mounts, if it is initially * shown */ transitionAppear: _propTypes2["default"].bool, /** * Duration of the fade animation in milliseconds, to ensure that finishing * callbacks are fired even if the original browser transition end events are * canceled */ timeout: _propTypes2["default"].number, /** * Callback fired before the component fades in */ onEnter: _propTypes2["default"].func, /** * Callback fired after the component starts to fade in */ onEntering: _propTypes2["default"].func, /** * Callback fired after the has component faded in */ onEntered: _propTypes2["default"].func, /** * Callback fired before the component fades out */ onExit: _propTypes2["default"].func, /** * Callback fired after the component starts to fade out */ onExiting: _propTypes2["default"].func, /** * Callback fired after the component has faded out */ onExited: _propTypes2["default"].func }; var defaultProps = { "in": false, timeout: 300, unmountOnExit: false, transitionAppear: false }; var Fade = function (_React$Component) { _inherits(Fade, _React$Component); function Fade() { _classCallCheck(this, Fade); return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); } Fade.prototype.render = function render() { return _react2["default"].createElement(_Transition2["default"], _extends({}, this.props, { className: (0, _classnames2["default"])(this.props.className, 'fade'), enteredClassName: 'in', enteringClassName: 'in' })); }; return Fade; }(_react2["default"].Component); Fade.propTypes = propTypes; Fade.defaultProps = defaultProps; exports["default"] = Fade; module.exports = exports['default']; /***/ }), /* 65 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _Message = __webpack_require__(66); var _Message2 = _interopRequireDefault(_Message); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } exports["default"] = _Message2["default"]; module.exports = exports['default']; /***/ }), /* 66 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: 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; }; 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__(4); var _react2 = _interopRequireDefault(_react); var _beeNotification = __webpack_require__(67); var _beeNotification2 = _interopRequireDefault(_beeNotification); var _classnames = __webpack_require__(3); var _classnames2 = _interopRequireDefault(_classnames); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var defaultDuration = 1.5; var defaultTop = 0; var defaultBottom = 48; var bottom = 90; var padding = 30; var width = 200; var messageInstance = void 0; var key = 1; var clsPrefix = 'u-message'; var noop = function noop() {}; var positionObj = { "top": { messageStyle: { width: "100%" }, notificationStyle: { top: defaultTop, width: "100%" }, transitionName: 'top' }, "bottom": { messageStyle: { width: "100%" }, notificationStyle: { bottom: defaultBottom, width: "100%" }, transitionName: 'bottom' }, "topRight": { messageStyle: { width: width }, notificationStyle: { top: padding, right: padding, width: width }, transitionName: 'right' }, "bottomRight": { messageStyle: { width: width }, notificationStyle: { bottom: bottom, right: padding, width: width }, transitionName: 'right' }, "topLeft": { messageStyle: { width: width }, notificationStyle: { top: padding, left: padding, width: width }, transitionName: 'left' }, "bottomLeft": { messageStyle: { width: width }, notificationStyle: { bottom: bottom, left: padding, width: width }, transitionName: 'left' } }; function getMessageInstance() { var position = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'top'; var callback = arguments[1]; var keyboard = arguments[2]; var onEscapeKeyUp = arguments[3]; if (messageInstance) { callback(messageInstance); return; } var style = positionObj[position].notificationStyle; var instanceObj = { clsPrefix: clsPrefix, transitionName: clsPrefix + '-' + positionObj[position].transitionName, style: style, // 覆盖原来的样式 position: '' }; if (typeof keyboard === 'boolean') { instanceObj.keyboard = keyboard; } if (typeof onEscapeKeyUp === 'function') { instanceObj.onEscapeKeyUp = onEscapeKeyUp; } _beeNotification2["default"].newInstance(instanceObj, function (instance) { messageInstance = instance; callback(instance); }); } function notice(content, duration, type, onClose, position, style, keyboard, onEscapeKeyUp, showIcon) { var iconType = { info: 'uf uf-i-c-2', success: 'uf uf-correct', danger: 'uf uf-close-c', warning: 'uf uf-exc-t', light: 'uf uf-notification', dark: 'uf uf-bubble', news: 'uf uf-bell', infolight: 'uf uf-i-c-2', successlight: 'uf uf-correct', dangerlight: 'uf uf-close-c', warninglight: 'uf uf-exc-t' }[type]; var positionStyle = positionObj[position].messageStyle; getMessageInstance(position, function (instance) { instance.notice({ key: key, duration: duration, color: type, style: _extends({}, positionStyle, style), content: _react2["default"].createElement( 'div', null, showIcon ? _react2["default"].createElement( 'div', { className: clsPrefix + '-notice-description-icon' }, _react2["default"].createElement('i', { className: (0, _classnames2["default"])(iconType) }) ) : null, _react2["default"].createElement( 'div', { className: clsPrefix + '-notice-description-content' }, content ) ), onClose: onClose }); }, keyboard, onEscapeKeyUp); return function () { var target = key++; return function () { if (messageInstance) { messageInstance.removeNotice(target); } }; }(); } exports["default"] = { create: function create(obj) { var content = obj.content || ''; var duration = _typeof(obj.duration) == undefined ? defaultDuration : obj.duration; var color = obj.color || 'dark'; var onClose = obj.onClose || noop; var position = obj.position || "top"; var style = obj.style || {}; var showIcon = obj.showIcon || false; return notice(content, duration, color, onClose, position, style, obj.keyboard, obj.onEscapeKeyUp, showIcon); }, config: function config(options) { if (options.top !== undefined) { defaultTop = options.top; } if (options.duration !== undefined) { defaultDuration = options.duration; } if (options.clsPrefix !== undefined) { clsPrefix = options.clsPrefix; } if (options.defaultBottom !== undefined) { defaultBottom = options.defaultBottom; } if (options.bottom !== undefined) { bottom = options.bottom; } if (options.width !== undefined) { bottom = options.width; } }, destroy: function destroy() { if (messageInstance) { messageInstance.destroy(); messageInstance = null; } } }; module.exports = exports['default']; /***/ }), /* 67 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _Notification = __webpack_require__(68); var _Notification2 = _interopRequireDefault(_Notification); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } exports["default"] = _Notification2["default"]; module.exports = exports['default']; /***/ }), /* 68 */ /***/ (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__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _reactDom = __webpack_require__(12); var _reactDom2 = _interopRequireDefault(_reactDom); var _beeAnimate = __webpack_require__(69); var _beeAnimate2 = _interopRequireDefault(_beeAnimate); var _createChainedFunction = __webpack_require__(37); var _createChainedFunction2 = _interopRequireDefault(_createChainedFunction); var _ownerDocument = __webpack_require__(74); var _ownerDocument2 = _interopRequireDefault(_ownerDocument); var _addEventListener = __webpack_require__(76); var _addEventListener2 = _interopRequireDefault(_addEventListener); var _classnames = __webpack_require__(3); var _classnames2 = _interopRequireDefault(_classnames); var _Notice = __webpack_require__(78); var _Notice2 = _interopRequireDefault(_Notice); 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 _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 seed = 0; var now = Date.now(); function getUuid() { return 'uNotification_' + now + '_' + seed++; } var propTypes = { show: _propTypes2["default"].bool, clsPrefix: _propTypes2["default"].string, style: _propTypes2["default"].object, position: _propTypes2["default"].oneOf(['topRight', 'bottomRight', '']), transitionName: _propTypes2["default"].string, keyboard: _propTypes2["default"].bool, // 按esc键是否关闭notice onEscapeKeyUp: _propTypes2["default"].func, // 设置esc键特殊钩子函数 animation: _propTypes2["default"].oneOfType([_propTypes2["default"].string, _propTypes2["default"].object]) }; var defaultProps = { clsPrefix: 'u-notification', animation: 'fade', keyboard: true, position: 'topRight' }; var Notification = function (_Component) { _inherits(Notification, _Component); function Notification(props) { _classCallCheck(this, Notification); var _this = _possibleConstructorReturn(this, _Component.call(this, props)); _this.handleDocumentKeyUp = function (e) { if (_this.props.keyboard && e.keyCode === 27 && _this.state.notices.length) { _this.setState(function (previousState) { previousState.notices.shift(); return { notices: previousState.notices }; }); if (_this.props.onEscapeKeyUp) { _this.props.onEscapeKeyUp(e); } } }; _this.state = { notices: [] }; _this.add = _this.add.bind(_this); _this.remove = _this.remove.bind(_this); return _this; } Notification.prototype.componentDidMount = function componentDidMount() { // 给document绑定keyup事件 var doc = (0, _ownerDocument2["default"])(this); this._onDocumentKeyupListener = (0, _addEventListener2["default"])(doc, 'keyup', this.handleDocumentKeyUp); }; Notification.prototype.componentWillUnmount = function componentWillUnmount() { this._onDocumentKeyupListener.remove(); }; Notification.prototype.getTransitionName = function getTransitionName() { var props = this.props; var transitionName = props.transitionName; if (!transitionName && props.animation) { transitionName = props.clsPrefix + '-' + props.animation; } return transitionName; }; Notification.prototype.add = function add(notice) { var key = notice.key = notice.key || getUuid(); this.setState(function (previousState) { var notices = previousState.notices; if (!notices.filter(function (v) { return v.key === key; }).length) { return { notices: notices.concat(notice) }; } }); }; Notification.prototype.remove = function remove(key) { this.setState(function (previousState) { return { notices: previousState.notices.filter(function (notice) { return notice.key !== key; }) }; }); }; /** * 处理绑定在document上的keyup事件 */ Notification.prototype.render = function render() { var _this2 = this, _classes; var _props = this.props, clsPrefix = _props.clsPrefix, className = _props.className, position = _props.position, style = _props.style; var noticeNodes = this.state.notices.map(function (notice) { var onClose = (0, _createChainedFunction2["default"])(_this2.remove.bind(_this2, notice.key), notice.onClose); return _react2["default"].createElement( _Notice2["default"], _extends({ clsPrefix: clsPrefix }, notice, { onClose: onClose }), notice.content ); }); var classes = (_classes = {}, _defineProperty(_classes, clsPrefix, 1), _defineProperty(_classes, className, !!className), _classes); if (position) { classes[clsPrefix + '-' + position] = !!position; } return _react2["default"].createElement( 'div', { className: (0, _classnames2["default"])(className, classes), style: style }, _react2["default"].createElement( _beeAnimate2["default"], { transitionName: this.getTransitionName() }, noticeNodes ) ); }; return Notification; }(_react.Component); ; Notification.propTypes = propTypes; Notification.defaultProps = defaultProps; Notification.newInstance = function newNotificationInstance(properties, callback) { if (typeof callback !== 'function') { console.error('You must introduce callback as the second parameter of Notification.newInstance().'); return; } var props = properties || {}; var div = document.createElement('div'); document.body.appendChild(div); var called = false; function ref(notification) { if (called) { return; } called = true; callback({ notice: function notice(noticeProps) { notification.add(noticeProps); }, removeNotice: function removeNotice(key) { notification.remove(key); }, component: notification, destroy: function destroy() { _reactDom2["default"].unmountComponentAtNode(div); document.body.removeChild(div); } }); } _reactDom2["default"].render(_react2["default"].createElement(Notification, _extends({}, props, { ref: ref })), div); }; exports["default"] = Notification; module.exports = exports['default']; /***/ }), /* 69 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _Animate = __webpack_require__(70); var _Animate2 = _interopRequireDefault(_Animate); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } exports["default"] = _Animate2["default"]; module.exports = exports['default']; /***/ }), /* 70 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _ChildrenUtils = __webpack_require__(71); var _AnimateChild = __webpack_require__(72); var _AnimateChild2 = _interopRequireDefault(_AnimateChild); var _util = __webpack_require__(73); var _util2 = _interopRequireDefault(_util); 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 _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 defaultKey = 'u_animate_' + Date.now(); function getChildrenFromProps(props) { var children = props.children; if (_react2["default"].isValidElement(children)) { if (!children.key) { return _react2["default"].cloneElement(children, { key: defaultKey }); } } return children; } function noop() {} var propTypes = { component: _propTypes2["default"].any, animation: _propTypes2["default"].object, transitionName: _propTypes2["default"].oneOfType([_propTypes2["default"].string, _propTypes2["default"].object]), transitionEnter: _propTypes2["default"].bool, transitionAppear: _propTypes2["default"].bool, exclusive: _propTypes2["default"].bool, transitionLeave: _propTypes2["default"].bool, onEnd: _propTypes2["default"].func, onEnter: _propTypes2["default"].func, onLeave: _propTypes2["default"].func, onAppear: _propTypes2["default"].func, showProp: _propTypes2["default"].string }; var defaultProps = { animation: {}, component: 'span', transitionEnter: true, transitionLeave: true, transitionAppear: false, onEnd: noop, onEnter: noop, onLeave: noop, onAppear: noop }; var Animate = function (_Component) { _inherits(Animate, _Component); function Animate(props) { _classCallCheck(this, Animate); var _this = _possibleConstructorReturn(this, _Component.call(this, props)); _this.currentlyAnimatingKeys = {}; _this.keysToEnter = []; _this.keysToLeave = []; _this.state = { children: (0, _ChildrenUtils.toArrayChildren)(getChildrenFromProps(_this.props)) }; _this.performEnter = _this.performEnter.bind(_this); _this.performAppear = _this.performAppear.bind(_this); _this.handleDoneAdding = _this.handleDoneAdding.bind(_this); _this.performLeave = _this.performLeave.bind(_this); _this.performLeave = _this.performLeave.bind(_this); _this.handleDoneLeaving = _this.handleDoneLeaving.bind(_this); _this.isValidChildByKey = _this.isValidChildByKey.bind(_this); _this.stop = _this.stop.bind(_this); return _this; } Animate.prototype.componentDidMount = function componentDidMount() { var _this2 = this; this.mounted = true; 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); } }); }; Animate.prototype.componentWillUnmount = function componentWillUnmount() { this.mounted = false; }; Animate.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { var _this3 = this; this.nextProps = nextProps; var nextChildren = (0, _ChildrenUtils.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 ? (0, _ChildrenUtils.toArrayChildren)(getChildrenFromProps(props)) : this.state.children; // in case destroy in showProp mode var newChildren = []; if (showProp) { currentChildren.forEach(function (currentChild) { var nextChild = currentChild && (0, _ChildrenUtils.findChildInChildrenByKey)(nextChildren, currentChild.key); var newChild = void 0; if ((!nextChild || !nextChild.props[showProp]) && currentChild.props[showProp]) { newChild = _react2["default"].cloneElement(nextChild || currentChild, _defineProperty({}, showProp, true)); } else { newChild = nextChild; } if (newChild) { newChildren.push(newChild); } }); nextChildren.forEach(function (nextChild) { if (!nextChild || !(0, _ChildrenUtils.findChildInChildrenByKey)(currentChildren, nextChild.key)) { newChildren.push(nextChild); } }); } else { newChildren = (0, _ChildrenUtils.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 && (0, _ChildrenUtils.findChildInChildrenByKey)(currentChildren, key); if (showProp) { var showInNext = child.props[showProp]; if (hasPrev) { var showInNow = (0, _ChildrenUtils.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 && (0, _ChildrenUtils.findChildInChildrenByKey)(nextChildren, key); if (showProp) { var showInNow = child.props[showProp]; if (hasNext) { var showInNext = (0, _ChildrenUtils.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); } }); }; Animate.prototype.componentDidUpdate = function componentDidUpdate() { var keysToEnter = this.keysToEnter; this.keysToEnter = []; keysToEnter.forEach(this.performEnter); var keysToLeave = this.keysToLeave; this.keysToLeave = []; keysToLeave.forEach(this.performLeave); }; Animate.prototype.performEnter = function performEnter(key) { // may already remove by exclusive if (this.refs[key]) { this.currentlyAnimatingKeys[key] = true; this.refs[key].componentWillEnter(this.handleDoneAdding.bind(this, key, 'enter')); } }; Animate.prototype.performAppear = function performAppear(key) { if (this.refs[key]) { this.currentlyAnimatingKeys[key] = true; this.refs[key].componentWillAppear(this.handleDoneAdding.bind(this, key, 'appear')); } }; Animate.prototype.handleDoneAdding = function handleDoneAdding(key, type) { var props = this.props; delete this.currentlyAnimatingKeys[key]; // if update on exclusive mode, skip check if (props.exclusive && props !== this.nextProps) { return; } var currentChildren = (0, _ChildrenUtils.toArrayChildren)(getChildrenFromProps(props)); if (!this.isValidChildByKey(currentChildren, key)) { // exclusive will not need this this.performLeave(key); } else { if (type === 'appear') { if (_util2["default"].allowAppearCallback(props)) { props.onAppear(key); props.onEnd(key, true); } } else { if (_util2["default"].allowEnterCallback(props)) { props.onEnter(key); props.onEnd(key, true); } } } }; Animate.prototype.performLeave = function performLeave(key) { // may already remove by exclusive if (this.refs[key]) { this.currentlyAnimatingKeys[key] = true; this.refs[key].componentWillLeave(this.handleDoneLeaving.bind(this, key)); } }; Animate.prototype.handleDoneLeaving = function handleDoneLeaving(key) { var props = this.props; delete this.currentlyAnimatingKeys[key]; // if update on exclusive mode, skip check if (props.exclusive && props !== this.nextProps) { return; } var currentChildren = (0, _ChildrenUtils.toArrayChildren)(getChildrenFromProps(props)); // in case state change is too fast if (this.isValidChildByKey(currentChildren, key)) { this.performEnter(key); } else { var end = function end() { if (_util2["default"].allowLeaveCallback(props)) { props.onLeave(key); props.onEnd(key, false); } }; /* eslint react/no-is-mounted:0 */ if (this.mounted && !(0, _ChildrenUtils.isSameChildren)(this.state.children, currentChildren, props.showProp)) { this.setState({ children: currentChildren }, end); } else { end(); } } }; Animate.prototype.isValidChildByKey = function isValidChildByKey(currentChildren, key) { var showProp = this.props.showProp; if (showProp) { return (0, _ChildrenUtils.findShownChildInChildrenByKey)(currentChildren, key, showProp); } return (0, _ChildrenUtils.findChildInChildrenByKey)(currentChildren, key); }; Animate.prototype.stop = function stop(key) { delete this.currentlyAnimatingKeys[key]; var component = this.refs[key]; if (component) { component.stop(); } }; Animate.prototype.render = function render() { 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 _react2["default"].createElement( _AnimateChild2["default"], { key: child.key, ref: child.key, 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 = { className: props.className, style: props.style }; } return _react2["default"].createElement( Component, passedProps, children ); } return children[0] || null; }; return Animate; }(_react.Component); ; Animate.defaultProps = defaultProps; Animate.propTypes = Animate.propTypes; exports["default"] = Animate; module.exports = exports['default']; /***/ }), /* 71 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.toArrayChildren = toArrayChildren; exports.findChildInChildrenByKey = findChildInChildrenByKey; exports.findShownChildInChildrenByKey = findShownChildInChildrenByKey; exports.findHiddenChildInChildrenByKey = findHiddenChildInChildrenByKey; exports.isSameChildren = isSameChildren; exports.mergeChildren = mergeChildren; var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function toArrayChildren(children) { var ret = []; _react2["default"].Children.forEach(children, function (child) { ret.push(child); }); return ret; } function findChildInChildrenByKey(children, key) { var ret = null; if (children) { children.forEach(function (child) { if (ret) { return; } if (child && child.key === key) { ret = child; } }); } return ret; } function findShownChildInChildrenByKey(children, key, showProp) { var ret = null; if (children) { children.forEach(function (child) { if (child && child.key === key && child.props[showProp]) { if (ret) { throw new Error('two child with same key for children'); } ret = child; } }); } return ret; } function findHiddenChildInChildrenByKey(children, key, showProp) { var found = 0; if (children) { children.forEach(function (child) { if (found) { return; } found = child && child.key === key && !child.props[showProp]; }); } return found; } function isSameChildren(c1, c2, showProp) { var same = c1.length === c2.length; if (same) { c1.forEach(function (child, index) { var child2 = c2[index]; if (child && child2) { if (child && !child2 || !child && child2) { same = false; } else if (child.key !== child2.key) { same = false; } else if (showProp && child.props[showProp] !== child2.props[showProp]) { same = false; } } }); } return same; } function mergeChildren(prev, next) { var ret = []; // For each key of `next`, the list of keys to insert before that key in // the combined list var nextChildrenPending = {}; var pendingChildren = []; prev.forEach(function (child) { if (child && findChildInChildrenByKey(next, child.key)) { if (pendingChildren.length) { nextChildrenPending[child.key] = pendingChildren; pendingChildren = []; } } else { pendingChildren.push(child); } }); next.forEach(function (child) { if (child && nextChildrenPending.hasOwnProperty(child.key)) { ret = ret.concat(nextChildrenPending[child.key]); } ret.push(child); }); ret = ret.concat(pendingChildren); return ret; } /***/ }), /* 72 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: 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; }; var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _reactDom = __webpack_require__(12); var _reactDom2 = _interopRequireDefault(_reactDom); var _tinperBeeCore = __webpack_require__(27); var _util = __webpack_require__(73); var _util2 = _interopRequireDefault(_util); 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 transitionMap = { enter: 'transitionEnter', appear: 'transitionAppear', leave: 'transitionLeave' }; var propTypes = { children: _propTypes2["default"].any }; var AnimateChild = function (_Component) { _inherits(AnimateChild, _Component); function AnimateChild(props) { _classCallCheck(this, AnimateChild); var _this = _possibleConstructorReturn(this, _Component.call(this, props)); _this.transition = _this.transition.bind(_this); _this.stop = _this.stop.bind(_this); return _this; } AnimateChild.prototype.componentWillUnmount = function componentWillUnmount() { this.stop(); }; AnimateChild.prototype.componentWillEnter = function componentWillEnter(done) { if (_util2["default"].isEnterSupported(this.props)) { this.transition('enter', done); } else { done(); } }; AnimateChild.prototype.componentWillAppear = function componentWillAppear(done) { if (_util2["default"].isAppearSupported(this.props)) { this.transition('appear', done); } else { done(); } }; AnimateChild.prototype.componentWillLeave = function componentWillLeave(done) { if (_util2["default"].isLeaveSupported(this.props)) { this.transition('leave', done); } else { // always sync, do not interupt with react component life cycle // update hidden -> animate hidden -> // didUpdate -> animate leave -> unmount (if animate is none) done(); } }; AnimateChild.prototype.transition = function transition(animationType, finishCallback) { var _this2 = this; var node = _reactDom2["default"].findDOMNode(this); var props = this.props; var transitionName = props.transitionName; var nameIsObj = (typeof transitionName === 'undefined' ? 'undefined' : _typeof(transitionName)) === 'object'; this.stop(); var end = function end() { _this2.stopper = null; finishCallback(); }; if ((_tinperBeeCore.cssAnimation.isCssAnimationSupported || !props.animation[animationType]) && transitionName && props[transitionMap[animationType]]) { var name = nameIsObj ? transitionName[animationType] : transitionName + '-' + animationType; var activeName = name + '-active'; if (nameIsObj && transitionName[animationType + 'Active']) { activeName = transitionName[animationType + 'Active']; } this.stopper = (0, _tinperBeeCore.cssAnimation)(node, { name: name, active: activeName }, end); } else { this.stopper = props.animation[animationType](node, end); } }; AnimateChild.prototype.stop = function stop() { var stopper = this.stopper; if (stopper) { this.stopper = null; stopper.stop(); } }; AnimateChild.prototype.render = function render() { return this.props.children; }; return AnimateChild; }(_react.Component); ; AnimateChild.propTypes = propTypes; exports["default"] = AnimateChild; module.exports = exports['default']; /***/ }), /* 73 */ /***/ (function(module, exports) { "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"]; /***/ }), /* 74 */ /***/ (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__(12); var _reactDom2 = _interopRequireDefault(_reactDom); var _ownerDocument = __webpack_require__(75); var _ownerDocument2 = _interopRequireDefault(_ownerDocument); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } module.exports = exports['default']; /***/ }), /* 75 */ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports.default = ownerDocument; function ownerDocument(node) { return node && node.ownerDocument || document; } module.exports = exports["default"]; /***/ }), /* 76 */ /***/ (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__(16); var _on2 = _interopRequireDefault(_on); var _off = __webpack_require__(77); var _off2 = _interopRequireDefault(_off); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } module.exports = exports['default']; /***/ }), /* 77 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(14); exports.__esModule = true; exports.default = void 0; var _inDOM = _interopRequireDefault(__webpack_require__(15)); var off = function off() {}; if (_inDOM.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); }; }(); } var _default = off; exports.default = _default; module.exports = exports["default"]; /***/ }), /* 78 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _classnames = __webpack_require__(3); var _classnames2 = _interopRequireDefault(_classnames); var _propTypes = __webpack_require__(5); 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 _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 = { duration: _propTypes2["default"].number, onClose: _propTypes2["default"].func, children: _propTypes2["default"].any, color: _propTypes2["default"].oneOf(['info', 'success', 'danger', 'warning', 'light', 'dark', 'news', 'infolight', 'successlight', 'dangerlight', 'warninglight']), title: _propTypes2["default"].any }; function noop() {} var defaultProps = { onEnd: noop, onClose: noop, duration: 4.5, closable: true }; var Notice = function (_React$Component) { _inherits(Notice, _React$Component); function Notice(props) { _classCallCheck(this, Notice); var _this = _possibleConstructorReturn(this, _React$Component.call(this, props)); _this.clearCloseTimer = _this.clearCloseTimer.bind(_this); _this.close = _this.close.bind(_this); return _this; } Notice.prototype.componentDidMount = function componentDidMount() { var _this2 = this; if (this.props.duration) { this.closeTimer = setTimeout(function () { _this2.close(); }, this.props.duration * 1000); } }; Notice.prototype.componentWillUnmount = function componentWillUnmount() { this.clearCloseTimer(); }; Notice.prototype.clearCloseTimer = function clearCloseTimer() { if (this.closeTimer) { clearTimeout(this.closeTimer); this.closeTimer = null; } }; Notice.prototype.close = function close() { this.clearCloseTimer(); this.props.onClose(); }; Notice.prototype.render = function render() { var _classes; var _props = this.props, closable = _props.closable, clsPrefix = _props.clsPrefix, className = _props.className, style = _props.style, children = _props.children, color = _props.color, title = _props.title; var componentClass = clsPrefix + '-notice'; var classes = (_classes = {}, _defineProperty(_classes, '' + componentClass, 1), _defineProperty(_classes, componentClass + '-closable', closable), _defineProperty(_classes, className, !!className), _classes); if (color) { classes[componentClass + '-' + color] = true; } return _react2["default"].createElement( 'div', { className: (0, _classnames2["default"])(classes), style: style, onClick: this.close }, _react2["default"].createElement( 'div', { className: componentClass + '-content' }, title && _react2["default"].createElement( 'div', { className: componentClass + '-title' }, title ), _react2["default"].createElement( 'div', { className: componentClass + '-description' }, children ) ), closable ? _react2["default"].createElement( 'a', { tabIndex: '0', onClick: this.close, className: componentClass + '-close' }, _react2["default"].createElement('span', { className: componentClass + '-close-x' }) ) : null ); }; return Notice; }(_react2["default"].Component); ; Notice.propTypes = propTypes; Notice.defaultProps = defaultProps; exports["default"] = Notice; module.exports = exports['default']; /***/ }), /* 79 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var deselectCurrent = __webpack_require__(80); var defaultMessage = 'Copy to clipboard: #{key}, Enter'; function format(message) { 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 = {}; } debug = options.debug || false; try { reselectPrevious = deselectCurrent(); range = document.createRange(); selection = document.getSelection(); mark = document.createElement('span'); mark.textContent = text; // reset user styles for span element mark.style.all = 'unset'; // prevents scrolling to the end of the page mark.style.position = 'fixed'; mark.style.top = 0; mark.style.clip = 'rect(0, 0, 0, 0)'; // used to preserve spaces and line breaks 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'; document.body.appendChild(mark); range.selectNode(mark); selection.addRange(range); var successful = document.execCommand('copy'); if (!successful) { 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'); try { 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); window.prompt(message, text); } } finally { if (selection) { if (typeof selection.removeRange == 'function') { selection.removeRange(range); } else { selection.removeAllRanges(); } } if (mark) { document.body.removeChild(mark); } reselectPrevious(); } return success; } module.exports = copy; /***/ }), /* 80 */ /***/ (function(module, exports) { module.exports = function () { var selection = document.getSelection(); if (!selection.rangeCount) { return function () {}; } var active = document.activeElement; var ranges = []; for (var i = 0; i < selection.rangeCount; i++) { ranges.push(selection.getRangeAt(i)); } switch (active.tagName.toUpperCase()) { // .toUpperCase handles XHTML case 'INPUT': case 'TEXTAREA': active.blur(); break; default: active = null; break; } selection.removeAllRanges(); return function () { selection.type === 'Caret' && selection.removeAllRanges(); if (!selection.rangeCount) { ranges.forEach(function(range) { selection.addRange(range); }); } active && active.focus(); }; }; /***/ }), /* 81 */ /***/ (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__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _tinperBeeCore = __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 _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 = { //是否是手风琴效果 accordion: _propTypes2["default"].bool, //激活的项 activeKey: _propTypes2["default"].any, //默认的激活的项 defaultActiveKey: _propTypes2["default"].any, //选中函数 onSelect: _propTypes2["default"].func, role: _propTypes2["default"].string }; var defaultProps = { accordion: false, clsPrefix: 'u-panel-group' }; // TODO: Use uncontrollable. var PanelGroup = function (_React$Component) { _inherits(PanelGroup, _React$Component); function PanelGroup(props, context) { _classCallCheck(this, PanelGroup); var _this = _possibleConstructorReturn(this, _React$Component.call(this, props, context)); _this.handleSelect = _this.handleSelect.bind(_this); _this.state = { activeKey: props.defaultActiveKey }; return _this; } PanelGroup.prototype.handleSelect = function handleSelect(key, e) { e.preventDefault(); if (this.props.onSelect) { this.props.onSelect(key, e); } if (this.state.activeKey === key) { key = null; } this.setState({ activeKey: key }); }; PanelGroup.prototype.render = function render() { var _this2 = this; var _props = this.props, accordion = _props.accordion, propsActiveKey = _props.activeKey, className = _props.className, children = _props.children, defaultActiveKey = _props.defaultActiveKey, onSelect = _props.onSelect, style = _props.style, clsPrefix = _props.clsPrefix, others = _objectWithoutProperties(_props, ['accordion', 'activeKey', 'className', 'children', 'defaultActiveKey', 'onSelect', 'style', 'clsPrefix']); var activeKey = void 0; if (accordion) { activeKey = propsActiveKey != null ? propsActiveKey : this.state.activeKey; others.role = others.role || 'tablist'; } var classes = {}; classes['' + clsPrefix] = true; return _react2["default"].createElement( 'div', _extends({}, others, { className: (0, _classnames2["default"])(className, classes) }), _react2["default"].Children.map(children, function (child) { if (!_react2["default"].isValidElement(child)) { return child; } var childProps = { style: child.props.style }; if (accordion) { _extends(childProps, { headerRole: 'tab', panelRole: 'tabpanel', collapsible: true, expanded: child.props.eventKey === activeKey, onSelect: (0, _tinperBeeCore.createChainedFunction)(_this2.handleSelect, child.props.onSelect) }); } return (0, _react.cloneElement)(child, childProps); }) ); }; return PanelGroup; }(_react2["default"].Component); PanelGroup.propTypes = propTypes; PanelGroup.defaultProps = defaultProps; exports["default"] = PanelGroup; module.exports = exports['default']; /***/ }), /* 82 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _Button = __webpack_require__(83); var _Button2 = _interopRequireDefault(_Button); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } exports["default"] = _Button2["default"]; module.exports = exports['default']; /***/ }), /* 83 */ /***/ (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__(4); var _react2 = _interopRequireDefault(_react); var _reactDom = __webpack_require__(12); var _reactDom2 = _interopRequireDefault(_reactDom); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _classnames = __webpack_require__(3); 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', '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', 'accent', 'success', 'info', 'warning', 'danger', 'default']), /** * @title 是否禁用 * @veIgnore */ disabled: _propTypes2["default"].bool, /** * @title 类名 * @veIgnore */ className: _propTypes2["default"].string, /** * @title
对象 * @memberof TableHeader */ TableHeader.prototype.getThDome = function getThDome(element) { var _tagName = element.tagName.toLowerCase(); if (element.getAttribute('data-filter-type') === 'filterContext') return null; if (_tagName === 'i') return null; if (_tagName != 'th') { return this.getThDome(element.parentElement); } else { return element; } }; //---拖拽列交换----end----- /** * 过滤输入后或下拉条件的回调函数 */ /** * 过滤行清除回调 */ /** * 过滤渲染的组件类型 */ TableHeader.prototype.render = function render() { var _this2 = this; var _props = this.props, clsPrefix = _props.clsPrefix, rowStyle = _props.rowStyle, draggable = _props.draggable, dragborder = _props.dragborder, rows = _props.rows, filterable = _props.filterable, fixed = _props.fixed, lastShowIndex = _props.lastShowIndex; var attr = dragborder ? { id: "u-table-drag-thead-" + this.theadKey } : {}; return _react2["default"].createElement( "thead", _extends({ className: clsPrefix + "-thead" }, attr, { "data-theader-fixed": "scroll", ref: function ref(_thead) { return _this2._thead = _thead; } }), rows.map(function (row, index) { return _react2["default"].createElement( "tr", { key: index, style: rowStyle, className: filterable && index == rows.length - 1 ? 'filterable' : '' }, row.map(function (da, columIndex, arr) { var thHover = da.drgHover ? " " + clsPrefix + "-thead th-drag-hover" : ""; delete da.drgHover; var fixedStyle = ""; var canDotDrag = ""; //主表格下、固定列或者是过滤行中含有固定列时添加该属性 if (!fixed && (da.fixed || filterable && index == rows.length - 1 && rows[0][columIndex].fixed)) { fixedStyle = " " + clsPrefix + "-row-fixed-columns-in-body"; } if (lastShowIndex == columIndex) { canDotDrag = "th-can-not-drag"; } if (filterable && index == rows.length - 1) { da.children = _this2.filterRenderType(da["filtertype"], da.dataindex, columIndex); delete da.filterdropdownfocus; } var thDefaultObj = {}; var thClassName = "" + da.className ? "" + da.className : ''; if (draggable) { thClassName += clsPrefix + "-thead th-drag " + thHover + " "; } if (dragborder) { thClassName += clsPrefix + "-thead-th " + canDotDrag; } thClassName += " " + fixedStyle; if (!da.fixed) { return _react2["default"].createElement( "th", _extends({}, da, { key: 'table-header-th-' + da.dataindex, className: thClassName, "data-th-fixed": da.fixed, "data-line-key": da.key, "data-line-index": columIndex, "data-th-width": da.width }), da.children, dragborder ? _react2["default"].createElement( "div", { ref: function ref(el) { return _this2.gap = el; }, "data-line-key": da.key, "data-line-index": columIndex, "data-th-width": da.width, "data-type": "online", className: clsPrefix + "-thead-th-drag-gap" }, _react2["default"].createElement("div", { id: "th-online", className: "online", "data-line-key": da.key, "data-line-index": columIndex, "data-th-width": da.width }) ) : "" ); } else { thDefaultObj = _extends({}, da, { className: da.className + " " + fixedStyle, key: columIndex }); da.onClick ? thDefaultObj.onClick = function (e) { da.onClick(da, e); } : ""; return _react2["default"].createElement("th", _extends({}, thDefaultObj, { "data-th-fixed": da.fixed })); } }) ); }) ); }; return TableHeader; }(_react.Component); TableHeader.defaultProps = { contentWidthDiff: 0 }; TableHeader.propTypes = propTypes; exports["default"] = TableHeader; module.exports = exports["default"]; /***/ }), /* 117 */ /***/ (function(module, exports) { 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); /* eslint-disable no-undefined,no-param-reassign,no-shadow */ /** * Throttle execution of a function. Especially useful for rate limiting * execution of handlers on events like resize and scroll. * * @param {Number} delay A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful. * @param {Boolean} [noTrailing] Optional, defaults to false. If noTrailing is true, callback will only execute every `delay` milliseconds while the * throttled-function is being called. If noTrailing is false or unspecified, callback will be executed one final time * after the last throttled-function call. (After the throttled-function has not been called for `delay` milliseconds, * the internal counter is reset) * @param {Function} callback A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is, * to `callback` when the throttled-function is executed. * @param {Boolean} [debounceMode] If `debounceMode` is true (at begin), schedule `clear` to execute after `delay` ms. If `debounceMode` is false (at end), * schedule `callback` to execute after `delay` ms. * * @return {Function} A new, throttled, function. */ function throttle ( delay, noTrailing, callback, debounceMode ) { /* * After wrapper has stopped being called, this timeout ensures that * `callback` is executed at the proper times in `throttle` and `end` * debounce modes. */ var timeoutID; // Keep track of the last time `callback` was executed. var lastExec = 0; // `noTrailing` defaults to falsy. if ( typeof noTrailing !== 'boolean' ) { debounceMode = callback; callback = noTrailing; noTrailing = undefined; } /* * The `wrapper` function encapsulates all of the throttling / debouncing * functionality and when executed will limit the rate at which `callback` * is executed. */ function wrapper () { var self = this; var elapsed = Number(new Date()) - lastExec; var args = arguments; // Execute `callback` and update the `lastExec` timestamp. function exec () { lastExec = Number(new Date()); callback.apply(self, args); } /* * If `debounceMode` is true (at begin) this is used to clear the flag * to allow future `callback` executions. */ function clear () { timeoutID = undefined; } if ( debounceMode && !timeoutID ) { /* * Since `wrapper` is being called for the first time and * `debounceMode` is true (at begin), execute `callback`. */ exec(); } // Clear any existing timeout. if ( timeoutID ) { clearTimeout(timeoutID); } if ( debounceMode === undefined && elapsed > delay ) { /* * In throttle mode, if `delay` time has been exceeded, execute * `callback`. */ exec(); } else if ( noTrailing !== true ) { /* * In trailing throttle mode, since `delay` time has not been * exceeded, schedule `callback` to execute `delay` ms after most * recent execution. * * If `debounceMode` is true (at begin), schedule `clear` to execute * after `delay` ms. * * If `debounceMode` is false (at end), schedule `callback` to * execute after `delay` ms. */ timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === undefined ? delay - elapsed : delay); } } // Return the wrapper function. return wrapper; } /* eslint-disable no-undefined */ /** * Debounce execution of a function. Debouncing, unlike throttling, * guarantees that a function is only executed a single time, either at the * very beginning of a series of calls, or at the very end. * * @param {Number} delay A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful. * @param {Boolean} [atBegin] Optional, defaults to false. If atBegin is false or unspecified, callback will only be executed `delay` milliseconds * after the last debounced-function call. If atBegin is true, callback will be executed only at the first debounced-function call. * (After the throttled-function has not been called for `delay` milliseconds, the internal counter is reset). * @param {Function} callback A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is, * to `callback` when the debounced-function is executed. * * @return {Function} A new, debounced function. */ function debounce ( delay, atBegin, callback ) { return callback === undefined ? throttle(delay, atBegin, false) : throttle(delay, callback, atBegin !== false); } exports.throttle = throttle; exports.debounce = debounce; /***/ }), /* 118 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.Event = exports.EventUtil = exports.tryParseInt = 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; }; exports.measureScrollbar = measureScrollbar; exports.debounce = debounce; exports.warningOnce = warningOnce; exports.addClass = addClass; exports.removeClass = removeClass; exports.ObjectAssign = ObjectAssign; exports.closest = closest; exports.getMaxColChildrenLength = getMaxColChildrenLength; exports.getColChildrenLength = getColChildrenLength; exports.DicimalFormater = DicimalFormater; exports.checkDicimalInvalid = checkDicimalInvalid; var _warning = __webpack_require__(32); var _warning2 = _interopRequireDefault(_warning); var _parseInt = __webpack_require__(119); var _parseInt2 = _interopRequireDefault(_parseInt); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var scrollbarSize = void 0; // Measure scrollbar width for padding body during modal show/hide var scrollbarMeasure = { position: 'absolute', top: '-9999px', width: '50px', height: '50px', overflow: 'scroll' }; function measureScrollbar() { var direction = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'vertical'; if (typeof document === 'undefined' || typeof window === 'undefined') { return 0; } if (scrollbarSize) { return scrollbarSize; } var scrollDiv = document.createElement('div'); Object.keys(scrollbarMeasure).forEach(function (scrollProp) { scrollDiv.style[scrollProp] = scrollbarMeasure[scrollProp]; }); document.body.appendChild(scrollDiv); var size = 0; if (direction === 'vertical') { size = scrollDiv.offsetWidth - scrollDiv.clientWidth; } else if (direction === 'horizontal') { size = scrollDiv.offsetHeight - scrollDiv.clientHeight; } document.body.removeChild(scrollDiv); scrollbarSize = size; return scrollbarSize; } function debounce(func, wait, immediate) { var timeout = void 0; return function debounceFunc() { var context = this; var args = arguments; // https://fb.me/react-event-pooling if (args[0] && args[0].persist) { args[0].persist(); } var later = function later() { timeout = null; if (!immediate) { func.apply(context, args); } }; var callNow = immediate && !timeout; clearTimeout(timeout); timeout = setTimeout(later, wait); if (callNow) { func.apply(context, args); } }; } var warned = {}; function warningOnce(condition, format, args) { if (!warned[format]) { (0, _warning2['default'])(condition, format, args); warned[format] = true; } } var tryParseInt = exports.tryParseInt = function tryParseInt(value) { var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; var resultValue = (0, _parseInt2['default'])(value); if (isNaN(resultValue)) { return defaultValue; } return resultValue; }; function addClass(elm, className) { if (!className) return; var els = Array.isArray(elm) ? elm : [elm]; els.forEach(function (el) { if (el.classList) { el.classList.add(className.split(' ')); } else { el.className += ' ' + className; } }); } function removeClass(elm, className) { if (!className) return; var els = Array.isArray(elm) ? elm : [elm]; els.forEach(function (el) { if (el.classList) { el.classList.remove(className.split(' ')); } else { el.className = el.className.replace(new RegExp('(^|\\b)' + className.split(' ').join('|') + '(\\b|$)', 'gi'), ' '); } }); } /** * 简单数组数据对象拷贝 * @param {*} obj 要拷贝的对象 */ function ObjectAssign(obj) { var b = obj instanceof Array; var tagObj = b ? [] : {}; if (b) { //数组 obj.forEach(function (da) { var _da = {}; _extends(_da, da); tagObj.push(_da); }); } else { _extends(tagObj, obj); } return tagObj; } /** * 获取某个父元素 * */ function closest(ele, selector) { var matches = ele.matches || ele.webkitMatchesSelector || ele.mozMatchesSelector || ele.msMatchesSelector; if (matches) { while (ele) { if (matches.call(ele, selector)) { return ele; } else { ele = ele.parentElement; } } } return null; } function getMaxColChildrenLength(columns) { var arr = []; arr = columns.map(function (item, index) { var chilrenLen = 0; if (item.children) { chilrenLen = getColChildrenLength(item.children, chilrenLen + 1); } return chilrenLen; }); var max = Math.max.apply(null, arr); return max; } function getColChildrenLength(columns, chilrenLen) { columns.forEach(function (item, index) { if (item.children) { chilrenLen = getColChildrenLength(item.children, chilrenLen + 1); } }); return chilrenLen; } function addHandler(element, type, handler) { var event = null; if (element.addEventListener) { //检测是否为DOM2级方法 event = element.addEventListener(type, handler, false); } else if (element.attachEvent) { //检测是否为IE级方法 event = element.attachEvent("on" + type, handler); } else { //检测是否为DOM0级方法 event = element["on" + type] = handler; } return event; } function removeHandler(element, type, handler) { if (element.removeEventListener) { element.removeEventListener(type, handler, false); } else if (element.detachEvent) { element.detachEvent("on" + type, handler); } else { element["on" + type] = null; } } //获取事件对象的兼容性写法 function getEvent(event) { return event ? event : window.event; } //获取事件对象目标的兼容性写法 function getTarget(event) { return event.target || event.srcElement; } function preventDefault(event) { if (event.preventDefault) { event.preventDefault(); } else { event.returnValue = false; } } function stopPropagation(event) { if (event.stopPropagation) { event.stopPropagation(); } else { event.cancelBubble = true; } } //用事件冒泡方式,如果想兼容事件捕获只需要添加个bool参数 var EventUtil = exports.EventUtil = { addHandler: function addHandler(element, type, handler) { if (element.addEventListener) { element.addEventListener(type, handler, false); } else if (element.attachEvent) { element.attachEvent('on' + type, handler); } else { element['on' + type] = handler; } }, removeHandler: function removeHandler(element, type, handler) { if (element.removeEventListener) { element.removeEventListener(type, handler, false); } else if (element.detachEvent) { element.detachEvent('on' + type, handler); } else { element['on' + type] = null; } } /* * 处理精度 */ };function DicimalFormater(value, precision) { var value = value + '', precision = precision ? precision : 0; for (var i = 0; i < value.length; i++) { if ("-0123456789.".indexOf(value.charAt(i)) == -1) return ""; } return checkDicimalInvalid(value, precision); }; function checkDicimalInvalid(value, precision) { if (value == null || isNaN(value)) return ""; // 浮点数总位数不能超过10位 var digit = parseFloat(value); var result = (digit * Math.pow(10, precision) / Math.pow(10, precision)).toFixed(precision); if (result == "NaN") return ""; return result; }; var Event = exports.Event = { addHandler: addHandler, removeHandler: removeHandler, getEvent: getEvent, getTarget: getTarget, preventDefault: preventDefault, stopPropagation: stopPropagation }; /***/ }), /* 119 */ /***/ (function(module, exports, __webpack_require__) { var root = __webpack_require__(120), toString = __webpack_require__(122); /** Used to match leading and trailing whitespace. */ var reTrimStart = /^\s+/; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeParseInt = root.parseInt; /** * Converts `string` to an integer of the specified radix. If `radix` is * `undefined` or `0`, a `radix` of `10` is used unless `value` is a * hexadecimal, in which case a `radix` of `16` is used. * * **Note:** This method aligns with the * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`. * * @static * @memberOf _ * @since 1.1.0 * @category String * @param {string} string The string to convert. * @param {number} [radix=10] The radix to interpret `value` by. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {number} Returns the converted integer. * @example * * _.parseInt('08'); * // => 8 * * _.map(['6', '08', '10'], _.parseInt); * // => [6, 8, 10] */ function parseInt(string, radix, guard) { if (guard || radix == null) { radix = 0; } else if (radix) { radix = +radix; } return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0); } module.exports = parseInt; /***/ }), /* 120 */ /***/ (function(module, exports, __webpack_require__) { var freeGlobal = __webpack_require__(121); /** 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; /***/ }), /* 121 */ /***/ (function(module, exports) { /* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; module.exports = freeGlobal; /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }), /* 122 */ /***/ (function(module, exports, __webpack_require__) { var baseToString = __webpack_require__(123); /** * 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; /***/ }), /* 123 */ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(124), arrayMap = __webpack_require__(125), isArray = __webpack_require__(126), isSymbol = __webpack_require__(127); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0; /** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol.prototype : undefined, symbolToString = symbolProto ? symbolProto.toString : undefined; /** * The base implementation of `_.toString` which doesn't convert nullish * values to empty strings. * * @private * @param {*} value The value to process. * @returns {string} Returns the string. */ function baseToString(value) { // Exit early for strings to avoid a performance hit in some environments. if (typeof value == 'string') { return value; } if (isArray(value)) { // Recursively convert values (susceptible to call stack limits). return arrayMap(value, baseToString) + ''; } if (isSymbol(value)) { return symbolToString ? symbolToString.call(value) : ''; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } module.exports = baseToString; /***/ }), /* 124 */ /***/ (function(module, exports, __webpack_require__) { var root = __webpack_require__(120); /** Built-in value references. */ var Symbol = root.Symbol; module.exports = Symbol; /***/ }), /* 125 */ /***/ (function(module, exports) { /** * A specialized version of `_.map` for arrays without support for iteratee * shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the new mapped array. */ function arrayMap(array, iteratee) { var index = -1, length = array == null ? 0 : array.length, result = Array(length); while (++index < length) { result[index] = iteratee(array[index], index, array); } return result; } module.exports = arrayMap; /***/ }), /* 126 */ /***/ (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; /***/ }), /* 127 */ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(128), isObjectLike = __webpack_require__(131); /** `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; /***/ }), /* 128 */ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(124), getRawTag = __webpack_require__(129), objectToString = __webpack_require__(130); /** `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; /***/ }), /* 129 */ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(124); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var nativeObjectToString = objectProto.toString; /** Built-in value references. */ var symToStringTag = Symbol ? Symbol.toStringTag : 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; } module.exports = getRawTag; /***/ }), /* 130 */ /***/ (function(module, exports) { /** Used for built-in method references. */ var objectProto = Object.prototype; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var nativeObjectToString = objectProto.toString; /** * 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); } module.exports = objectToString; /***/ }), /* 131 */ /***/ (function(module, exports) { /** * 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'; } module.exports = isObjectLike; /***/ }), /* 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; }; var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _zh_CN = __webpack_require__(133); var _zh_CN2 = _interopRequireDefault(_zh_CN); var _beeFormControl = __webpack_require__(134); var _beeFormControl2 = _interopRequireDefault(_beeFormControl); var _beeSelect = __webpack_require__(138); var _beeSelect2 = _interopRequireDefault(_beeSelect); var _beeInputNumber = __webpack_require__(288); var _beeInputNumber2 = _interopRequireDefault(_beeInputNumber); var _beeDatepicker = __webpack_require__(295); var _beeDatepicker2 = _interopRequireDefault(_beeDatepicker); var _FilterDropDown = __webpack_require__(475); var _FilterDropDown2 = _interopRequireDefault(_FilterDropDown); 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 RangePicker = _beeDatepicker2['default'].RangePicker; var propTypes = { filterDropdown: _propTypes2['default'].string }; var FilterType = function (_Component) { _inherits(FilterType, _Component); function FilterType(props) { _classCallCheck(this, FilterType); var _this = _possibleConstructorReturn(this, _Component.call(this, props)); _this.clearFilter = function () { var _this$props = _this.props, onFilterClear = _this$props.onFilterClear, dataIndex = _this$props.dataIndex; if (_this.state.value !== "") { _this.setState({ value: "", //清空值 condition: _this.props.filterDropdownType == 'string' ? 'LIKE' : 'EQ' //切回默认查询条件 }, function () { //调用清除方法参数为当前字段的field onFilterClear && onFilterClear(dataIndex); }); } }; _this.changeText = function (val) { _this.setState({ value: val }); }; _this.changeTextCall = function (e) { var _this$props2 = _this.props, onFilterChange = _this$props2.onFilterChange, dataIndex = _this$props2.dataIndex; if (e.keyCode == 13) { e.target.value !== "" && onFilterChange(dataIndex, e.target.value, _this.state.condition); } }; _this.changeValue = function () { _this.setState({ value: "" }); }; _this.onSelectDropdown = function (item) { var _this$props3 = _this.props, onFilterChange = _this$props3.onFilterChange, dataIndex = _this$props3.dataIndex; _this.setState({ condition: item.key }, function () { _this.state.value !== "" && onFilterChange && onFilterChange(dataIndex, _this.state.value, _this.state.condition); }); }; _this.changeNumber = function (value) { var _this$props4 = _this.props, onFilterChange = _this$props4.onFilterChange, dataIndex = _this$props4.dataIndex; _this.setState({ value: value }, function () { onFilterChange(dataIndex, value, _this.state.condition); }); }; _this.clearNumber = function () { var onChange = _this.props.onChange; onChange && onChange(""); _this.setState({ value: "" }); }; _this.changeTextCallBlur = function (val) { var onChange = _this.props.onChange; onChange && onChange(val); }; _this.changeSelect = function (value) { var _this$props5 = _this.props, onFilterChange = _this$props5.onFilterChange, dataIndex = _this$props5.dataIndex; if (onFilterChange) { onFilterChange(dataIndex, value, _this.state.condition); _this.setState({ value: value }); } }; _this.clearSelectValue = function () { _this.setState({ selectValue: "" }, function () { _this.changeSelect(""); }); }; _this.clearDateValue = function () { _this.setState({ dateValue: "" }, function () { _this.changeDate(""); }); }; _this.changeDate = function (value) { var _this$props6 = _this.props, onFilterChange = _this$props6.onFilterChange, dataIndex = _this$props6.dataIndex; if (onFilterChange) { onFilterChange(dataIndex, value, _this.state.condition); _this.setState({ value: value, open: false }); } }; _this.renderControl = function (rendertype) { var _this$props7 = _this.props, filterInputNumberOptions = _this$props7.filterInputNumberOptions, filterDropdownIncludeKeys = _this$props7.filterDropdownIncludeKeys, dataIndex = _this$props7.dataIndex, filterDropdown = _this$props7.filterDropdown, filterDropdownType = _this$props7.filterDropdownType, format = _this$props7.format, className = _this$props7.className, onChange = _this$props7.onChange, onSelectDropdown = _this$props7.onSelectDropdown, clsPrefix = _this$props7.clsPrefix, locale = _this$props7.locale; switch (rendertype) { case 'text': return _react2['default'].createElement( 'div', { className: clsPrefix + ' filter-wrap' }, _react2['default'].createElement(_beeFormControl2['default'], { value: _this.state.value, className: className, onChange: _this.changeText, onKeyDown: _this.changeTextCall //onBlur={this.changeTextCallBlur} }), _react2['default'].createElement(_FilterDropDown2['default'], { locale: locale, dataIndex: dataIndex, dataText: _this.state.value, onSelectDropdown: _this.onSelectDropdown, onClickClear: _this.clearFilter, isShowClear: _this.state.value, isShowCondition: filterDropdown, filterDropdownType: filterDropdownType, filterDropdownIncludeKeys: filterDropdownIncludeKeys }) ); case 'number': return _react2['default'].createElement( 'div', { className: clsPrefix + ' filter-wrap' }, _react2['default'].createElement(_beeInputNumber2['default'], _extends({}, filterInputNumberOptions, { className: className, value: _this.state.value, onChange: _this.changeNumber, iconStyle: 'one' })), _react2['default'].createElement(_FilterDropDown2['default'], { locale: locale, dataIndex: dataIndex, dataText: _this.state.value, onSelectDropdown: _this.onSelectDropdown, onClickClear: _this.clearFilter, isShowClear: _this.state.value != 0, isShowCondition: filterDropdown, filterDropdownType: filterDropdownType, filterDropdownIncludeKeys: filterDropdownIncludeKeys }) ); case 'dropdown': return _react2['default'].createElement( 'div', { className: clsPrefix + ' filter-wrap' }, _react2['default'].createElement(_beeSelect2['default'], _extends({}, _this.props, { value: _this.state.value, onChange: _this.changeSelect })), _react2['default'].createElement(_FilterDropDown2['default'], { locale: locale, dataIndex: dataIndex, dataText: _this.state.value, onSelectDropdown: _this.onSelectDropdown, onClickClear: _this.clearFilter, isShowCondition: filterDropdown, isShowClear: _this.state.value, filterDropdownType: filterDropdownType, filterDropdownIncludeKeys: filterDropdownIncludeKeys }) ); case 'date': return _react2['default'].createElement( 'div', { className: clsPrefix + ' filter-wrap' }, _react2['default'].createElement(_beeDatepicker2['default'], _extends({}, _this.props, { value: _this.state.value, onChange: _this.changeDate, open: _this.state.open, format: format, locale: _zh_CN2['default'] })), _react2['default'].createElement(_FilterDropDown2['default'], { locale: locale, dataIndex: dataIndex, dataText: _this.state.value, onSelectDropdown: _this.onSelectDropdown, onClickClear: _this.clearFilter, isShowCondition: filterDropdown, isShowClear: _this.state.value, filterDropdownType: filterDropdownType, filterDropdownIncludeKeys: filterDropdownIncludeKeys }) ); case 'daterange': return _react2['default'].createElement( 'div', { className: clsPrefix + ' filter-wrap' }, _react2['default'].createElement(RangePicker, _extends({}, _this.props, { value: _this.state.value, onChange: _this.changeDate, open: _this.state.open, format: format, showTime: true, locale: _zh_CN2['default'], placeholder: '开始 ~ 结束', dateInputPlaceholder: ['开始', '结束'], showClear: true })), _react2['default'].createElement(_FilterDropDown2['default'], { locale: locale, dataIndex: dataIndex, dataText: _this.state.value, onSelectDropdown: _this.onSelectDropdown, onClickClear: _this.clearFilter, isShowCondition: filterDropdown, isShowClear: _this.state.value, filterDropdownIncludeKeys: filterDropdownIncludeKeys }) ); case 'bool': return _react2['default'].createElement( 'div', { className: clsPrefix + ' filter-wrap' }, _react2['default'].createElement(Switch, { className: className, onChange: onChange }), _react2['default'].createElement(_FilterDropDown2['default'], { locale: locale, onSelectDropdown: onSelectDropdown, filterDropdownIncludeKeys: filterDropdownIncludeKeys }) ); default: return _react2['default'].createElement('div', null); } }; _this.state = { value: "", text: "", selectValue: "", dateValue: "", open: false, condition: props.filterDropdownType == 'string' ? 'LIKE' : 'EQ', number: 0 }; return _this; } /** * 清除过滤条件 * */ /** * 设置输入文本的值 * */ /** * 输入框回车执行回调 * */ /** * 更改修改值 * */ /** * 下拉条件的回调 * * @param {*} key 字段 * @param {*} value 值1,2,3...6 */ /** * 修改数值型的值 * */ //清除数值 //失去焦点后执行函数 //设置下拉值 //清除下拉值 //清除日期值 //设置日期值 //组件渲染 /** * 根据不同的类型生成对应的组件类型包含一些参数的适应 * * @param {*} rendertype 参数类型,包括['text','dropdown','date','daterange','number'] * @returns */ FilterType.prototype.render = function render() { var rendertype = this.props.rendertype; return _react2['default'].createElement( 'div', { 'data-filter-type': 'filterContext' }, this.renderControl(rendertype) ); }; return FilterType; }(_react.Component); FilterType.propTypes = propTypes; FilterType.defaultProps = { filterDropdown: 'show' }; exports['default'] = FilterType; module.exports = exports['default']; /***/ }), /* 133 */ /***/ (function(module, exports) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports['default'] = { today: '今天', now: '此刻', backToToday: '返回今天', ok: '确定', timeSelect: '选择时间', dateSelect: '选择日期', 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: '下一世纪' }; module.exports = exports['default']; /***/ }), /* 134 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _FormControl = __webpack_require__(135); var _FormControl2 = _interopRequireDefault(_FormControl); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } exports["default"] = _FormControl2["default"]; module.exports = exports['default']; /***/ }), /* 135 */ /***/ (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__(4); var _react2 = _interopRequireDefault(_react); var _classnames = __webpack_require__(3); var _classnames2 = _interopRequireDefault(_classnames); var _beeIcon = __webpack_require__(136); var _beeIcon2 = _interopRequireDefault(_beeIcon); var _propTypes = __webpack_require__(5); 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, value = _this$props.value, type = _this$props.type; if (e.keyCode === 13 && type === "search") { if (onSearch) { onSearch(value); } } }; _this.handleSearch = function (e) { var _this$props2 = _this.props, onSearch = _this$props2.onSearch, value = _this$props2.value; if (onSearch) onSearch(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$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, showClose = _this$props3.showClose, focusSelect = _this$props3.focusSelect, others = _objectWithoutProperties(_this$props3, ['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$props4 = _this.props, Component = _this$props4.componentClass, type = _this$props4.type, className = _this$props4.className, size = _this$props4.size, clsPrefix = _this$props4.clsPrefix, value = _this$props4.value, onChange = _this$props4.onChange, onSearch = _this$props4.onSearch, onBlur = _this$props4.onBlur, others = _objectWithoutProperties(_this$props4, ['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']; /***/ }), /* 136 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _Icon = __webpack_require__(137); var _Icon2 = _interopRequireDefault(_Icon); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } exports["default"] = _Icon2["default"]; module.exports = exports['default']; /***/ }), /* 137 */ /***/ (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__(4); var _react2 = _interopRequireDefault(_react); var _classnames = __webpack_require__(3); var _classnames2 = _interopRequireDefault(_classnames); var _propTypes = __webpack_require__(5); 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 = { type: _propTypes2["default"].string }; /** * badge 默认显示内容1 */ var defaultProps = { clsPrefix: 'uf' }; var Icon = function (_Component) { _inherits(Icon, _Component); function Icon(props) { _classCallCheck(this, Icon); return _possibleConstructorReturn(this, _Component.call(this, props)); } Icon.prototype.render = function render() { var _props = this.props, type = _props.type, className = _props.className, clsPrefix = _props.clsPrefix, others = _objectWithoutProperties(_props, ['type', 'className', 'clsPrefix']); var clsObj = {}; var classNames = (0, _classnames2["default"])(clsPrefix, type); return _react2["default"].createElement('i', _extends({}, others, { className: (0, _classnames2["default"])(classNames, className) })); }; return Icon; }(_react.Component); Icon.defaultProps = defaultProps; Icon.propTypes = propTypes; exports["default"] = Icon; module.exports = exports['default']; /***/ }), /* 138 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.SelectPropTypes = exports.OptGroup = exports.Option = undefined; var _Select = __webpack_require__(139); var _Select2 = _interopRequireDefault(_Select); var _Option = __webpack_require__(280); var _Option2 = _interopRequireDefault(_Option); var _PropTypes = __webpack_require__(286); var _OptGroup = __webpack_require__(287); 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.Option = _Option2["default"]; exports.OptGroup = _OptGroup2["default"]; exports.SelectPropTypes = _PropTypes.SelectPropTypes; exports["default"] = _Select2["default"]; /***/ }), /* 139 */ /***/ (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__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _RcSelect = __webpack_require__(140); var _RcSelect2 = _interopRequireDefault(_RcSelect); var _Option = __webpack_require__(280); var _Option2 = _interopRequireDefault(_Option); var _OptGroup = __webpack_require__(287); var _OptGroup2 = _interopRequireDefault(_OptGroup); var _classnames = __webpack_require__(3); 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 _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 _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 SelectContext = { antLocale: { Select: _propTypes2["default"].any } }; var defaultProps = { clsPrefix: "u-select", showSearch: false, transitionName: "slide-up", choiceTransitionName: "zoom" }; var propTypes = { clsPrefix: _propTypes2["default"].string, className: _propTypes2["default"].string, value: _propTypes2["default"].oneOfType([_propTypes2["default"].string, _propTypes2["default"].any]), defaultValue: _propTypes2["default"].oneOfType([_propTypes2["default"].node, _propTypes2["default"].array, _propTypes2["default"].any]), size: _propTypes2["default"].oneOf(["default", "lg", "sm"]), combobox: _propTypes2["default"].bool, notFoundContent: _propTypes2["default"].oneOfType([_propTypes2["default"].node, _propTypes2["default"].array, _propTypes2["default"].any]), showSearch: _propTypes2["default"].bool, open: _propTypes2["default"].bool, transitionName: _propTypes2["default"].string, choiceTransitionName: _propTypes2["default"].string, multiple: _propTypes2["default"].bool, allowClear: _propTypes2["default"].bool, filterOption: _propTypes2["default"].oneOfType([_propTypes2["default"].bool, _propTypes2["default"].func]), tags: _propTypes2["default"].bool, onSelect: _propTypes2["default"].func, onDeselect: _propTypes2["default"].func, onSearch: _propTypes2["default"].func, placeholder: _propTypes2["default"].string, dropdownMatchSelectWidth: _propTypes2["default"].bool, optionFilterProp: _propTypes2["default"].string, optionLabelProp: _propTypes2["default"].string, disabled: _propTypes2["default"].bool, defaultActiveFirstOption: _propTypes2["default"].bool, labelInValue: _propTypes2["default"].bool, getPopupContainer: _propTypes2["default"].func, style: _propTypes2["default"].object, dropdownStyle: _propTypes2["default"].object, dropdownMenuStyle: _propTypes2["default"].object, onChange: _propTypes2["default"].func, scrollToEnd: _propTypes2["default"].func }; var Select = function (_Component) { _inherits(Select, _Component); function Select(props) { _classCallCheck(this, Select); return _possibleConstructorReturn(this, _Component.call(this, props)); } Select.prototype.render = function render() { var _classNames; var _props = this.props, clsPrefix = _props.clsPrefix, _props$className = _props.className, className = _props$className === undefined ? "" : _props$className, size = _props.size, data = _props.data, showSearch = _props.showSearch, combobox = _props.combobox; var _props2 = this.props, _props2$notFoundConte = _props2.notFoundContent, notFoundContent = _props2$notFoundConte === undefined ? "Not Found" : _props2$notFoundConte, optionLabelProp = _props2.optionLabelProp; var cls = (0, _classnames2["default"])((_classNames = {}, _defineProperty(_classNames, clsPrefix + "-lg", size === "lg"), _defineProperty(_classNames, clsPrefix + "-sm", size === "sm"), _defineProperty(_classNames, clsPrefix + "-show-search", showSearch), _classNames), className); var antLocale = this.context.antLocale; if (antLocale && antLocale.Select) { notFoundContent = "notFoundContent" in this.props ? notFoundContent : antLocale.Select.notFoundContent; } if (combobox) { notFoundContent = null; // children 带 dom 结构时,无法填入输入框 optionLabelProp = optionLabelProp || "value"; } if (data) { data.map(function (item) { return _react2["default"].createElement( _Option2["default"], { value: item.value }, item.key ); }); } return data ? _react2["default"].createElement( _RcSelect2["default"], _extends({}, this.props, { className: cls, optionLabelProp: optionLabelProp || "children", notFoundContent: notFoundContent }), data.map(function (item) { return _react2["default"].createElement( _Option2["default"], { key: item.value, value: item.value, disabled: item.disabled ? true : false }, item.key ); }) ) : _react2["default"].createElement(_RcSelect2["default"], _extends({}, this.props, { className: cls, optionLabelProp: optionLabelProp || "children", notFoundContent: notFoundContent })); }; return Select; }(_react.Component); Select.context = SelectContext; Select.propTypes = propTypes; Select.defaultProps = defaultProps; Select.Option = _Option2["default"]; Select.OptGroup = _OptGroup2["default"]; exports["default"] = Select; module.exports = exports["default"]; /***/ }), /* 140 */ /***/ (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__(4); var _react2 = _interopRequireDefault(_react); var _reactDom = __webpack_require__(12); var _reactDom2 = _interopRequireDefault(_reactDom); var _reactLifecyclesCompat = __webpack_require__(141); var _tinperBeeCore = __webpack_require__(27); var _toArray = __webpack_require__(142); var _toArray2 = _interopRequireDefault(_toArray); var _classnames2 = __webpack_require__(3); var _classnames3 = _interopRequireDefault(_classnames2); var _beeAnimate = __webpack_require__(69); var _beeAnimate2 = _interopRequireDefault(_beeAnimate); var _componentClasses = __webpack_require__(47); var _componentClasses2 = _interopRequireDefault(_componentClasses); var _rcMenu = __webpack_require__(143); var _warning = __webpack_require__(32); var _warning2 = _interopRequireDefault(_warning); var _Option = __webpack_require__(280); var _Option2 = _interopRequireDefault(_Option); var _util = __webpack_require__(281); var _SelectTrigger = __webpack_require__(282); var _SelectTrigger2 = _interopRequireDefault(_SelectTrigger); var _PropTypes = __webpack_require__(286); 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 _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); } /* eslint func-names: 1 */ /* eslint-disable no-multi-assign, no-lonely-if, jsx-a11y/no-noninteractive-element-interactions, no-restricted-syntax, jsx-a11y/role-has-required-aria-props */ // TODO: Fix eslint later function noop() {} function chaining() { for (var _len = arguments.length, fns = Array(_len), _key = 0; _key < _len; _key++) { fns[_key] = arguments[_key]; } return function () { for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } // eslint-disable-line // eslint-disable-line for (var i = 0; i < fns.length; i++) { if (fns[i] && typeof fns[i] === 'function') { fns[i].apply(this, args); } } }; } var Select = function (_React$Component) { _inherits(Select, _React$Component); function Select(props) { _classCallCheck(this, Select); var _this = _possibleConstructorReturn(this, _React$Component.call(this, props)); _initialiseProps.call(_this); var optionsInfo = Select.getOptionsInfoFromProps(props); _this.state = { value: Select.getValueFromProps(props, true), // true: use default value inputValue: props.combobox ? Select.getInputValueForCombobox(props, optionsInfo, true // use default value ) : '', open: props.defaultOpen, optionsInfo: optionsInfo, // a flag for aviod redundant getOptionsInfoFromProps call skipBuildOptionsInfo: true }; _this.saveInputRef = (0, _util.saveRef)(_this, 'inputRef'); _this.saveInputMirrorRef = (0, _util.saveRef)(_this, 'inputMirrorRef'); _this.saveTopCtrlRef = (0, _util.saveRef)(_this, 'topCtrlRef'); _this.saveSelectTriggerRef = (0, _util.saveRef)(_this, 'selectTriggerRef'); _this.saveRootRef = (0, _util.saveRef)(_this, 'rootRef'); _this.saveSelectionRef = (0, _util.saveRef)(_this, 'selectionRef'); return _this; } Select.prototype.componentDidMount = function componentDidMount() { if (this.props.autoFocus) { this.focus(); } }; Select.prototype.componentDidUpdate = function componentDidUpdate() { if ((0, _util.isMultipleOrTags)(this.props)) { var inputNode = this.getInputDOMNode(); var mirrorNode = this.getInputMirrorDOMNode(); if (inputNode.value) { inputNode.style.width = ''; inputNode.style.width = mirrorNode.clientWidth + 'px'; } else { inputNode.style.width = ''; } } this.forcePopupAlign(); }; Select.prototype.componentWillUnmount = function componentWillUnmount() { this.clearFocusTime(); this.clearBlurTime(); if (this.dropdownContainer) { _reactDom2["default"].unmountComponentAtNode(this.dropdownContainer); document.body.removeChild(this.dropdownContainer); this.dropdownContainer = null; } }; // combobox ignore Select.prototype.focus = function focus() { if ((0, _util.isSingleMode)(this.props)) { this.selectionRef.focus(); } else { this.getInputDOMNode().focus(); } }; Select.prototype.blur = function blur() { if ((0, _util.isSingleMode)(this.props)) { this.selectionRef.blur(); } else { this.getInputDOMNode().blur(); } }; Select.prototype.renderClear = function renderClear() { var _props = this.props, prefixCls = _props.prefixCls, allowClear = _props.allowClear, clearIcon = _props.clearIcon; var _state = this.state, value = _state.value, inputValue = _state.inputValue; var clear = _react2["default"].createElement( 'span', _extends({ key: 'clear', className: prefixCls + '-selection-clear', onMouseDown: _util.preventDefaultEvent, style: _util.UNSELECTABLE_STYLE }, _util.UNSELECTABLE_ATTRIBUTE, { onClick: this.onClearSelection }), clearIcon || _react2["default"].createElement( 'i', { className: prefixCls + '-selection-clear-icon' }, '\xD7' ) ); if (!allowClear) { return null; } if ((0, _util.isCombobox)(this.props)) { if (inputValue) { return clear; } return null; } if (inputValue || value.length) { return clear; } return null; }; Select.prototype.render = function render() { var _rootCls; var props = this.props; var multiple = (0, _util.isMultipleOrTags)(props); var state = this.state; var className = props.className, disabled = props.disabled, prefixCls = props.prefixCls, inputIcon = props.inputIcon; var ctrlNode = this.renderTopControlNode(); var open = this.state.open; if (open) { this._options = this.renderFilterOptions(); } var realOpen = this.getRealOpenState(); var options = this._options || []; var dataOrAriaAttributeProps = {}; for (var key in props) { if (Object.prototype.hasOwnProperty.call(props, key) && (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-' || key === 'role')) { dataOrAriaAttributeProps[key] = props[key]; } } var extraSelectionProps = _extends({}, dataOrAriaAttributeProps); if (!(0, _util.isMultipleOrTagsOrCombobox)(props)) { extraSelectionProps = _extends({}, extraSelectionProps, { onKeyDown: this.onKeyDown, tabIndex: props.disabled ? -1 : 0 }); } var rootCls = (_rootCls = {}, _defineProperty(_rootCls, className, !!className), _defineProperty(_rootCls, prefixCls, 1), _defineProperty(_rootCls, prefixCls + '-open', open), _defineProperty(_rootCls, prefixCls + '-focused', open || !!this._focused), _defineProperty(_rootCls, prefixCls + '-combobox', (0, _util.isCombobox)(props)), _defineProperty(_rootCls, prefixCls + '-disabled', disabled), _defineProperty(_rootCls, prefixCls + '-enabled', !disabled), _defineProperty(_rootCls, prefixCls + '-allow-clear', !!props.allowClear), _defineProperty(_rootCls, prefixCls + '-no-arrow', !props.showArrow), _rootCls); return _react2["default"].createElement( _SelectTrigger2["default"], { open: props.open, onPopupFocus: this.onPopupFocus, onMouseEnter: this.props.onMouseEnter, onMouseLeave: this.props.onMouseLeave, dropdownAlign: props.dropdownAlign, dropdownClassName: props.dropdownClassName, dropdownMatchSelectWidth: props.dropdownMatchSelectWidth, defaultActiveFirstOption: props.defaultActiveFirstOption, dropdownMenuStyle: props.dropdownMenuStyle, transitionName: props.transitionName, animation: props.animation, prefixCls: props.prefixCls, dropdownStyle: props.dropdownStyle, combobox: props.combobox, showSearch: props.showSearch, options: options, multiple: multiple, disabled: disabled, visible: realOpen, inputValue: state.inputValue, value: state.value, backfillValue: state.backfillValue, firstActiveValue: props.firstActiveValue, onDropdownVisibleChange: this.onDropdownVisibleChange, getPopupContainer: props.getPopupContainer, onMenuSelect: this.onMenuSelect, onMenuDeselect: this.onMenuDeselect, onPopupScroll: props.onPopupScroll, showAction: props.showAction, ref: this.saveSelectTriggerRef, menuItemSelectedIcon: props.menuItemSelectedIcon }, _react2["default"].createElement( 'div', { id: props.id, style: props.style, ref: this.saveRootRef, onBlur: this.onOuterBlur, onFocus: this.onOuterFocus, onClick: this.onOuterClick //sp , className: (0, _classnames3["default"])(rootCls), onMouseDown: this.markMouseDown, onMouseUp: this.markMouseLeave, onMouseOut: this.markMouseLeave }, _react2["default"].createElement( 'div', _extends({ ref: this.saveSelectionRef, key: 'selection', className: prefixCls + '-selection\n ' + prefixCls + '-selection--' + (multiple ? 'multiple' : 'single'), role: 'combobox', 'aria-autocomplete': 'list', 'aria-haspopup': 'true', 'aria-expanded': realOpen }, extraSelectionProps), ctrlNode, this.renderClear(), !props.showArrow ? null : //sp _react2["default"].createElement( 'span', _extends({ key: 'arrow', className: prefixCls + '-arrow', style: _util.UNSELECTABLE_STYLE }, _util.UNSELECTABLE_ATTRIBUTE, { onClick: this.onArrowClick }), inputIcon || _react2["default"].createElement('i', { className: prefixCls + '-arrow-icon' }) ) ) ) ); }; return Select; }(_react2["default"].Component); Select.propTypes = _PropTypes.SelectPropTypes; Select.defaultProps = { prefixCls: 'u-select', defaultOpen: false, labelInValue: false, defaultActiveFirstOption: true, showSearch: true, allowClear: false, placeholder: '', onChange: noop, onFocus: noop, onBlur: noop, onSelect: noop, onSearch: noop, onDeselect: noop, onInputKeyDown: noop, showArrow: true, dropdownMatchSelectWidth: true, dropdownStyle: {}, dropdownMenuStyle: {}, optionFilterProp: 'value', optionLabelProp: 'value', notFoundContent: 'Not Found', backfill: false, showAction: ['click'], tokenSeparators: [], autoClearSearchValue: true, onKeyDown: noop }; Select.getDerivedStateFromProps = function (nextProps, prevState) { var optionsInfo = prevState.skipBuildOptionsInfo ? prevState.optionsInfo : Select.getOptionsInfoFromProps(nextProps, prevState); var newState = { optionsInfo: optionsInfo, skipBuildOptionsInfo: false }; if ('open' in nextProps) { newState.open = nextProps.open; } if ('value' in nextProps) { var value = Select.getValueFromProps(nextProps); newState.value = value; if (nextProps.combobox) { newState.inputValue = Select.getInputValueForCombobox(nextProps, optionsInfo); } } return newState; }; Select.getOptionsFromChildren = function (children) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; _react2["default"].Children.forEach(children, function (child) { if (!child) { return; } if (child.type.isSelectOptGroup) { Select.getOptionsFromChildren(child.props.children, options); } else { options.push(child); } }); return options; }; Select.getInputValueForCombobox = function (props, optionsInfo, useDefaultValue) { var value = []; if ('value' in props && !useDefaultValue) { value = (0, _util.toArray)(props.value); } if ('defaultValue' in props && useDefaultValue) { value = (0, _util.toArray)(props.defaultValue); } if (value.length) { value = value[0]; } else { return ''; } var label = value; if (props.labelInValue) { label = value.label; } else if (optionsInfo[(0, _util.getMapKey)(value)]) { label = optionsInfo[(0, _util.getMapKey)(value)].label; } if (label === undefined) { label = ''; } return label; }; Select.getLabelFromOption = function (props, option) { return (0, _util.getPropValue)(option, props.optionLabelProp); }; Select.getOptionsInfoFromProps = function (props, preState) { var options = Select.getOptionsFromChildren(props.children); var optionsInfo = {}; options.forEach(function (option) { var singleValue = (0, _util.getValuePropValue)(option); optionsInfo[(0, _util.getMapKey)(singleValue)] = { option: option, value: singleValue, label: Select.getLabelFromOption(props, option), title: option.props.title }; }); if (preState) { // keep option info in pre state value. var oldOptionsInfo = preState.optionsInfo; var value = preState.value; value.forEach(function (v) { var key = (0, _util.getMapKey)(v); if (!optionsInfo[key] && oldOptionsInfo[key] !== undefined) { optionsInfo[key] = oldOptionsInfo[key]; } }); } return optionsInfo; }; Select.getValueFromProps = function (props, useDefaultValue) { var value = []; if ('value' in props && !useDefaultValue) { value = (0, _util.toArray)(props.value); } if ('defaultValue' in props && useDefaultValue) { value = (0, _util.toArray)(props.defaultValue); } if (props.labelInValue) { value = value.map(function (v) { return v.key; }); } return value; }; var _initialiseProps = function _initialiseProps() { var _this2 = this; this.onInputChange = function (event) { var tokenSeparators = _this2.props.tokenSeparators; var val = event.target.value; if ((0, _util.isMultipleOrTags)(_this2.props) && tokenSeparators.length && (0, _util.includesSeparators)(val, tokenSeparators)) { var nextValue = _this2.getValueByInput(val); if (nextValue !== undefined) { _this2.fireChange(nextValue); } _this2.setOpenState(false, true); _this2.setInputValue('', false); return; } _this2.setInputValue(val); _this2.setState({ open: true }); if ((0, _util.isCombobox)(_this2.props)) { _this2.fireChange([val]); } }; this.onDropdownVisibleChange = function (open) { if (open && !_this2._focused) { _this2.clearBlurTime(); _this2.timeoutFocus(); _this2._focused = true; _this2.updateFocusClassName(); } _this2.setOpenState(open); }; this.onKeyDown = function (event) { var open = _this2.state.open; var _props2 = _this2.props, disabled = _props2.disabled, onKeyDown = _props2.onKeyDown; if (disabled) { return; } 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) { if (!open) _this2.setOpenState(true); event.preventDefault(); } onKeyDown(event); //sp }; this.onInputKeyDown = function (event) { var props = _this2.props; if (props.disabled) { return; } var state = _this2.state; var keyCode = event.keyCode; if ((0, _util.isMultipleOrTags)(props) && !event.target.value && keyCode === _tinperBeeCore.KeyCode.BACKSPACE) { event.preventDefault(); var value = state.value; if (value.length) { _this2.removeSelected(value[value.length - 1]); } return; } if (keyCode === _tinperBeeCore.KeyCode.DOWN) { if (!state.open) { _this2.openIfHasChildren(); event.preventDefault(); event.stopPropagation(); return; } } else if (keyCode === _tinperBeeCore.KeyCode.ENTER && state.open) { // Aviod trigger form submit when select item // https://github.com/ant-design/ant-design/issues/10861 event.preventDefault(); } else if (keyCode === _tinperBeeCore.KeyCode.ESC) { if (state.open) { _this2.setOpenState(false); event.preventDefault(); event.stopPropagation(); } if (props.showSearch) props.onKeyDown(event); //sp return; } if (_this2.getRealOpenState(state)) { var menu = _this2.selectTriggerRef.getInnerMenu(); if (menu && menu.onKeyDown(event, _this2.handleBackfill)) { event.preventDefault(); event.stopPropagation(); } } }; this.onMenuSelect = function (_ref) { var item = _ref.item; if (!item) { return; } var value = _this2.state.value; var props = _this2.props; var selectedValue = (0, _util.getValuePropValue)(item); var lastValue = value[value.length - 1]; _this2.fireSelect(selectedValue); if ((0, _util.isMultipleOrTags)(props)) { if ((0, _util.findIndexInValueBySingleValue)(value, selectedValue) !== -1) { return; } value = value.concat([selectedValue]); } else { if (lastValue !== undefined && lastValue === selectedValue && selectedValue !== _this2.state.backfillValue) { _this2.setOpenState(false, true); return; } value = [selectedValue]; _this2.setOpenState(false, true); } _this2.fireChange(value); var inputValue = void 0; if ((0, _util.isCombobox)(props)) { inputValue = (0, _util.getPropValue)(item, props.optionLabelProp); } else { inputValue = ''; } if (props.autoClearSearchValue) { _this2.setInputValue(inputValue, false); } }; this.onMenuDeselect = function (_ref2) { var item = _ref2.item, domEvent = _ref2.domEvent; if (domEvent.type === 'keydown' && domEvent.keyCode === _tinperBeeCore.KeyCode.ENTER) { _this2.removeSelected((0, _util.getValuePropValue)(item)); return; } if (domEvent.type === 'click') { _this2.removeSelected((0, _util.getValuePropValue)(item)); } var props = _this2.props; if (props.autoClearSearchValue) { _this2.setInputValue('', false); } }; this.onArrowClick = function (e) { e.stopPropagation(); e.preventDefault(); _this2.props.onFocus(_this2.state.value); if (!_this2.props.disabled) { _this2.setOpenState(!_this2.state.open, !_this2.state.open); } }; this.onPlaceholderClick = function () { if (_this2.getInputDOMNode()) { _this2.getInputDOMNode().focus(); } }; this.onOuterFocus = function (e) { if (_this2.props.disabled) { e.preventDefault(); return; } _this2.clearBlurTime(); if (!(0, _util.isMultipleOrTagsOrCombobox)(_this2.props) && e.target === _this2.getInputDOMNode()) { return; } if (_this2._focused) { return; } _this2._focused = true; _this2.updateFocusClassName(); if (!_this2._mouseDown) { _this2.timeoutFocus(); } }; this.onPopupFocus = function () { // fix ie scrollbar, focus element again _this2.maybeFocus(true, true); }; this.onOuterBlur = function (e) { if (_this2.props.disabled) { e.preventDefault(); return; } _this2.blurTimer = setTimeout(function () { _this2._focused = false; _this2.updateFocusClassName(); var props = _this2.props; var value = _this2.state.value; var inputValue = _this2.state.inputValue; if ((0, _util.isSingleMode)(props) && props.showSearch && inputValue && props.defaultActiveFirstOption) { var options = _this2._options || []; if (options.length) { var firstOption = (0, _util.findFirstMenuItem)(options); if (firstOption) { value = [(0, _util.getValuePropValue)(firstOption)]; _this2.fireChange(value); } } } else if ((0, _util.isMultipleOrTags)(props) && inputValue) { if (_this2._mouseDown) { // need update dropmenu when not blur _this2.setInputValue(''); } else { // why not use setState? _this2.state.inputValue = _this2.getInputDOMNode().value = ''; } value = _this2.getValueByInput(inputValue); if (value !== undefined) { _this2.fireChange(value); } } // if click the rest space of Select in multiple mode if ((0, _util.isMultipleOrTags)(props) && _this2._mouseDown) { _this2.maybeFocus(true, true); _this2._mouseDown = false; return; } _this2.setOpenState(false); props.onBlur(_this2.getVLForOnChange(value)); }, 10); }; this.onClearSelection = function (event) { var props = _this2.props; var state = _this2.state; if (props.disabled) { return; } var inputValue = state.inputValue, value = state.value; event.stopPropagation(); if (inputValue || value.length) { if (value.length) { _this2.fireChange([]); } _this2.setOpenState(false, true); if (inputValue) { _this2.setInputValue(''); } } }; this.onChoiceAnimationLeave = function () { _this2.forcePopupAlign(); }; this.getOptionInfoBySingleValue = function (value, optionsInfo) { var info = void 0; optionsInfo = optionsInfo || _this2.state.optionsInfo; if (optionsInfo[(0, _util.getMapKey)(value)]) { info = optionsInfo[(0, _util.getMapKey)(value)]; } if (info) { return info; } var defaultLabel = value; if (_this2.props.labelInValue) { var label = (0, _util.getLabelFromPropsValue)(_this2.props.value, value); if (label !== undefined) { defaultLabel = label; } } var defaultInfo = { option: _react2["default"].createElement( _Option2["default"], { value: value, key: value }, value ), value: value, label: defaultLabel }; return defaultInfo; }; this.getOptionBySingleValue = function (value) { var _getOptionInfoBySingl = _this2.getOptionInfoBySingleValue(value), option = _getOptionInfoBySingl.option; return option; }; this.getOptionsBySingleValue = function (values) { return values.map(function (value) { return _this2.getOptionBySingleValue(value); }); }; this.getValueByLabel = function (label) { if (label === undefined) { return null; } var value = null; Object.keys(_this2.state.optionsInfo).forEach(function (key) { var info = _this2.state.optionsInfo[key]; if ((0, _util.toArray)(info.label).join('') === label) { value = info.value; } }); return value; }; this.getVLBySingleValue = function (value) { if (_this2.props.labelInValue) { return { key: value, label: _this2.getLabelBySingleValue(value) }; } return value; }; this.getVLForOnChange = function (vls_) { var vls = vls_; if (vls !== undefined) { if (!_this2.props.labelInValue) { vls = vls.map(function (v) { return v; }); } else { vls = vls.map(function (vl) { return { key: vl, label: _this2.getLabelBySingleValue(vl) }; }); } return (0, _util.isMultipleOrTags)(_this2.props) ? vls : vls[0]; } return vls; }; this.getLabelBySingleValue = function (value, optionsInfo) { var _getOptionInfoBySingl2 = _this2.getOptionInfoBySingleValue(value, optionsInfo), label = _getOptionInfoBySingl2.label; return label; }; this.getDropdownContainer = function () { if (!_this2.dropdownContainer) { _this2.dropdownContainer = document.createElement('div'); document.body.appendChild(_this2.dropdownContainer); } return _this2.dropdownContainer; }; this.getPlaceholderElement = function () { var props = _this2.props, state = _this2.state; var hidden = false; if (state.inputValue) { hidden = true; } if (state.value.length) { hidden = true; } if ((0, _util.isCombobox)(props) && state.value.length === 1 && !state.value[0]) { hidden = false; } var placeholder = props.placeholder; if (placeholder) { return _react2["default"].createElement( 'div', _extends({ onMouseDown: _util.preventDefaultEvent, style: _extends({ display: hidden ? 'none' : 'block' }, _util.UNSELECTABLE_STYLE) }, _util.UNSELECTABLE_ATTRIBUTE, { onClick: _this2.onPlaceholderClick, className: props.prefixCls + '-selection-placeholder' }), placeholder ); } return null; }; this.getInputElement = function () { var props = _this2.props; var inputElement = props.getInputElement ? props.getInputElement() : _react2["default"].createElement('input', { id: props.id, autoComplete: 'off' }); var inputCls = (0, _classnames3["default"])(inputElement.props.className, _defineProperty({}, props.prefixCls + '-search-field', true)); // https://github.com/ant-design/ant-design/issues/4992#issuecomment-281542159 // Add space to the end of the inputValue as the width measurement tolerance return _react2["default"].createElement( 'div', { className: props.prefixCls + '-search-field-wrap' }, _react2["default"].cloneElement(inputElement, { ref: _this2.saveInputRef, onChange: _this2.onInputChange, onKeyDown: chaining(_this2.onInputKeyDown, inputElement.props.onKeyDown, _this2.props.onInputKeyDown), value: _this2.state.inputValue, disabled: props.disabled, className: inputCls }), _react2["default"].createElement( 'span', { ref: _this2.saveInputMirrorRef, className: props.prefixCls + '-search-field-mirror' }, _this2.state.inputValue, '\xA0' ) ); }; this.getInputDOMNode = function () { return _this2.topCtrlRef ? _this2.topCtrlRef.querySelector('input,textarea,div[contentEditable]') : _this2.inputRef; }; this.getInputMirrorDOMNode = function () { return _this2.inputMirrorRef; }; this.getPopupDOMNode = function () { return _this2.selectTriggerRef.getPopupDOMNode(); }; this.getPopupMenuComponent = function () { return _this2.selectTriggerRef.getInnerMenu(); }; this.setOpenState = function (open, needFocus) { var props = _this2.props, state = _this2.state; if (state.open === open) { _this2.maybeFocus(open, needFocus); return; } if (_this2.props.onDropdownVisibleChange) { _this2.props.onDropdownVisibleChange(open); } var nextState = { open: open, backfillValue: undefined }; // clear search input value when open is false in singleMode. if (!open && (0, _util.isSingleMode)(props) && props.showSearch) { _this2.setInputValue('', false); } if (!open) { _this2.maybeFocus(open, needFocus); } _this2.setState(nextState, function () { if (open) { _this2.maybeFocus(open, needFocus); } }); }; this.setInputValue = function (inputValue) { var fireSearch = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; if (inputValue !== _this2.state.inputValue) { _this2.setState({ inputValue: inputValue }, _this2.forcePopupAlign); if (fireSearch) { _this2.props.onSearch(inputValue); } } }; this.getValueByInput = function (string) { var _props3 = _this2.props, multiple = _props3.multiple, tokenSeparators = _props3.tokenSeparators; var nextValue = _this2.state.value; var hasNewValue = false; (0, _util.splitBySeparators)(string, tokenSeparators).forEach(function (label) { var selectedValue = [label]; if (multiple) { var value = _this2.getValueByLabel(label); if (value && (0, _util.findIndexInValueBySingleValue)(nextValue, value) === -1) { nextValue = nextValue.concat(value); hasNewValue = true; _this2.fireSelect(value); } } else { // tag if ((0, _util.findIndexInValueBySingleValue)(nextValue, label) === -1) { nextValue = nextValue.concat(selectedValue); hasNewValue = true; _this2.fireSelect(label); } } }); return hasNewValue ? nextValue : undefined; }; this.getRealOpenState = function (state) { var _open = _this2.props.open; if (typeof _open === 'boolean') { return _open; } var open = (state || _this2.state).open; var options = _this2._options || []; if ((0, _util.isMultipleOrTagsOrCombobox)(_this2.props) || !_this2.props.showSearch) { if (open && !options.length) { open = false; } } return open; }; this.markMouseDown = function () { _this2._mouseDown = true; }; this.markMouseLeave = function () { _this2._mouseDown = false; }; this.handleBackfill = function (item) { if (!_this2.props.backfill || !((0, _util.isSingleMode)(_this2.props) || (0, _util.isCombobox)(_this2.props))) { return; } var key = (0, _util.getValuePropValue)(item); if ((0, _util.isCombobox)(_this2.props)) { _this2.setInputValue(key, false); } _this2.setState({ value: [key], backfillValue: key }); }; this.filterOption = function (input, child) { var defaultFilter = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _util.defaultFilterFn; var value = _this2.state.value; var lastValue = value[value.length - 1]; if (!input || lastValue && lastValue === _this2.state.backfillValue) { return true; } var filterFn = _this2.props.filterOption; if ('filterOption' in _this2.props) { if (_this2.props.filterOption === true) { filterFn = defaultFilter; } } else { filterFn = defaultFilter; } if (!filterFn) { return true; } else if (typeof filterFn === 'function') { return filterFn.call(_this2, input, child); } else if (child.props.disabled) { return false; } return true; }; this.timeoutFocus = function () { if (_this2.focusTimer) { _this2.clearFocusTime(); } _this2.focusTimer = setTimeout(function () { _this2.props.onFocus(); }, 10); }; this.clearFocusTime = function () { if (_this2.focusTimer) { clearTimeout(_this2.focusTimer); _this2.focusTimer = null; } }; this.clearBlurTime = function () { if (_this2.blurTimer) { clearTimeout(_this2.blurTimer); _this2.blurTimer = null; } }; this.updateFocusClassName = function () { var rootRef = _this2.rootRef, props = _this2.props; // avoid setState and its side effect if (_this2._focused) { (0, _componentClasses2["default"])(rootRef).add(props.prefixCls + '-focused'); } else { (0, _componentClasses2["default"])(rootRef).remove(props.prefixCls + '-focused'); } }; this.maybeFocus = function (open, needFocus) { if (needFocus || open) { var input = _this2.getInputDOMNode(); var _document = document, activeElement = _document.activeElement; if (input && (open || (0, _util.isMultipleOrTagsOrCombobox)(_this2.props))) { if (activeElement !== input) { input.focus(); _this2._focused = true; } } else if (activeElement !== _this2.selectionRef) { _this2.selectionRef.focus(); _this2._focused = true; } } }; this.removeSelected = function (selectedKey, e) { var props = _this2.props; if (props.disabled || _this2.isChildDisabled(selectedKey)) { return; } // Do not trigger Trigger popup if (e && e.stopPropagation) { e.stopPropagation(); } var value = _this2.state.value.filter(function (singleValue) { return singleValue !== selectedKey; }); var canMultiple = (0, _util.isMultipleOrTags)(props); if (canMultiple) { var event = selectedKey; if (props.labelInValue) { event = { key: selectedKey, label: _this2.getLabelBySingleValue(selectedKey) }; } props.onDeselect(event, _this2.getOptionBySingleValue(selectedKey)); } _this2.fireChange(value); }; this.openIfHasChildren = function () { var props = _this2.props; if (_react2["default"].Children.count(props.children) || (0, _util.isSingleMode)(props)) { _this2.setOpenState(true); } }; this.fireSelect = function (value) { _this2.props.onSelect(_this2.getVLBySingleValue(value), _this2.getOptionBySingleValue(value)); }; this.fireChange = function (value) { var props = _this2.props; if (!('value' in props)) { _this2.setState({ value: value }, _this2.forcePopupAlign); } var vls = _this2.getVLForOnChange(value); var options = _this2.getOptionsBySingleValue(value); props.onChange(vls, (0, _util.isMultipleOrTags)(_this2.props) ? options : options[0]); }; this.isChildDisabled = function (key) { return (0, _toArray2["default"])(_this2.props.children).some(function (child) { var childValue = (0, _util.getValuePropValue)(child); return childValue === key && child.props && child.props.disabled; }); }; this.forcePopupAlign = function () { if (!_this2.state.open) { return; } _this2.selectTriggerRef.triggerRef.forcePopupAlign(); }; this.renderFilterOptions = function () { var inputValue = _this2.state.inputValue; var _props4 = _this2.props, children = _props4.children, tags = _props4.tags, filterOption = _props4.filterOption, notFoundContent = _props4.notFoundContent; var menuItems = []; var childrenKeys = []; var options = _this2.renderFilterOptionsFromChildren(children, childrenKeys, menuItems); if (tags) { // tags value must be string var value = _this2.state.value; value = value.filter(function (singleValue) { return childrenKeys.indexOf(singleValue) === -1 && (!inputValue || String(singleValue).indexOf(String(inputValue)) > -1); }); value.forEach(function (singleValue) { var key = singleValue; var menuItem = _react2["default"].createElement( _rcMenu.Item, { style: _util.UNSELECTABLE_STYLE, role: 'option', attribute: _util.UNSELECTABLE_ATTRIBUTE, value: key, key: key }, key ); options.push(menuItem); menuItems.push(menuItem); }); if (inputValue) { var notFindInputItem = menuItems.every(function (option) { // this.filterOption return true has two meaning, // 1, some one exists after filtering // 2, filterOption is set to false // condition 2 does not mean the option has same value with inputValue var filterFn = function filterFn() { return (0, _util.getValuePropValue)(option) === inputValue; }; if (filterOption !== false) { return !_this2.filterOption.call(_this2, inputValue, option, filterFn); } return !filterFn(); }); if (notFindInputItem) { options.unshift(_react2["default"].createElement( _rcMenu.Item, { style: _util.UNSELECTABLE_STYLE, role: 'option', attribute: _util.UNSELECTABLE_ATTRIBUTE, value: inputValue, key: inputValue }, inputValue )); } } } if (!options.length && notFoundContent) { options = [_react2["default"].createElement( _rcMenu.Item, { style: _util.UNSELECTABLE_STYLE, attribute: _util.UNSELECTABLE_ATTRIBUTE, disabled: true, role: 'option', value: 'NOT_FOUND', key: 'NOT_FOUND' }, notFoundContent )]; } return options; }; this.renderFilterOptionsFromChildren = function (children, childrenKeys, menuItems) { var sel = []; var props = _this2.props; var inputValue = _this2.state.inputValue; var tags = props.tags; _react2["default"].Children.forEach(children, function (child) { if (!child) { return; } if (child.type.isSelectOptGroup) { var innerItems = _this2.renderFilterOptionsFromChildren(child.props.children, childrenKeys, menuItems); if (innerItems.length) { var label = child.props.label; var key = child.key; if (!key && typeof label === 'string') { key = label; } else if (!label && key) { label = key; } sel.push(_react2["default"].createElement( _rcMenu.ItemGroup, { key: key, title: label }, innerItems )); } return; } (0, _warning2["default"])(child.type.isSelectOption, 'the children of `Select` should be `Select.Option` or `Select.OptGroup`, ' + ('instead of `' + (child.type.name || child.type.displayName || child.type) + '`.')); var childValue = (0, _util.getValuePropValue)(child); (0, _util.validateOptionValue)(childValue, _this2.props); if (_this2.filterOption(inputValue, child)) { var menuItem = _react2["default"].createElement(_rcMenu.Item, _extends({ style: _util.UNSELECTABLE_STYLE, attribute: _util.UNSELECTABLE_ATTRIBUTE, value: childValue, key: childValue, role: 'option' }, child.props)); sel.push(menuItem); menuItems.push(menuItem); } if (tags) { childrenKeys.push(childValue); } }); return sel; }; this.renderTopControlNode = function () { var _state2 = _this2.state, value = _state2.value, open = _state2.open, inputValue = _state2.inputValue; var props = _this2.props; var choiceTransitionName = props.choiceTransitionName, prefixCls = props.prefixCls, maxTagTextLength = props.maxTagTextLength, maxTagCount = props.maxTagCount, maxTagPlaceholder = props.maxTagPlaceholder, showSearch = props.showSearch, removeIcon = props.removeIcon; var className = prefixCls + '-selection-rendered'; // search input is inside topControlNode in single, multiple & combobox. 2016/04/13 var innerNode = null; if ((0, _util.isSingleMode)(props)) { var selectedValue = null; if (value.length) { var showSelectedValue = false; var opacity = 1; if (!showSearch) { showSelectedValue = true; } else if (open) { showSelectedValue = !inputValue; if (showSelectedValue) { opacity = 0.4; } } else { showSelectedValue = true; } var singleValue = value[0]; var _getOptionInfoBySingl3 = _this2.getOptionInfoBySingleValue(singleValue), label = _getOptionInfoBySingl3.label, title = _getOptionInfoBySingl3.title; selectedValue = _react2["default"].createElement( 'div', { key: 'value', className: prefixCls + '-selection-selected-value', title: (0, _util.toTitle)(title || label), style: { display: showSelectedValue ? 'block' : 'none', opacity: opacity } }, label ); } if (!showSearch) { innerNode = [selectedValue]; } else { innerNode = [selectedValue, _react2["default"].createElement( 'div', { className: prefixCls + '-search ' + prefixCls + '-search--inline', key: 'input', style: { display: open ? 'block' : 'none' } }, _this2.getInputElement() )]; } } else { var selectedValueNodes = []; var limitedCountValue = value; var maxTagPlaceholderEl = void 0; if (maxTagCount !== undefined && value.length > maxTagCount) { limitedCountValue = limitedCountValue.slice(0, maxTagCount); var omittedValues = _this2.getVLForOnChange(value.slice(maxTagCount, value.length)); var content = '+ ' + (value.length - maxTagCount) + ' ...'; if (maxTagPlaceholder) { content = typeof maxTagPlaceholder === 'function' ? maxTagPlaceholder(omittedValues) : maxTagPlaceholder; } maxTagPlaceholderEl = _react2["default"].createElement( 'li', _extends({ style: _util.UNSELECTABLE_STYLE }, _util.UNSELECTABLE_ATTRIBUTE, { onMouseDown: _util.preventDefaultEvent, className: prefixCls + '-selection-choice ' + prefixCls + '-selection-choice-disabled', key: 'maxTagPlaceholder', title: (0, _util.toTitle)(content) }), _react2["default"].createElement( 'div', { className: prefixCls + '-selection-choice-content' }, content ) ); } if ((0, _util.isMultipleOrTags)(props)) { selectedValueNodes = limitedCountValue.map(function (singleValue) { var info = _this2.getOptionInfoBySingleValue(singleValue); var content = info.label; var title = info.title || content; if (maxTagTextLength && typeof content === 'string' && content.length > maxTagTextLength) { content = content.slice(0, maxTagTextLength) + '...'; } var disabled = _this2.isChildDisabled(singleValue); var choiceClassName = disabled ? prefixCls + '-selection-choice ' + prefixCls + '-selection-choice-disabled' : prefixCls + '-selection-choice'; return _react2["default"].createElement( 'li', _extends({ style: _util.UNSELECTABLE_STYLE }, _util.UNSELECTABLE_ATTRIBUTE, { onMouseDown: _util.preventDefaultEvent, className: choiceClassName, key: singleValue, title: (0, _util.toTitle)(title) }), _react2["default"].createElement( 'div', { className: prefixCls + '-selection-choice-content' }, content ), disabled ? null : _react2["default"].createElement( 'span', { onClick: function onClick(event) { _this2.removeSelected(singleValue, event); }, className: prefixCls + '-selection-choice-remove' }, removeIcon || _react2["default"].createElement( 'i', { className: prefixCls + '-selection-choice-remove-icon' }, '\xD7' ) ) ); }); } if (maxTagPlaceholderEl) { selectedValueNodes.push(maxTagPlaceholderEl); } selectedValueNodes.push(_react2["default"].createElement( 'li', { className: prefixCls + '-search ' + prefixCls + '-search--inline', key: '-input' }, _this2.getInputElement() )); if ((0, _util.isMultipleOrTags)(props) && choiceTransitionName) { innerNode = _react2["default"].createElement( _beeAnimate2["default"], { onLeave: _this2.onChoiceAnimationLeave, component: 'ul', transitionName: choiceTransitionName }, selectedValueNodes ); } else { innerNode = _react2["default"].createElement( 'ul', null, selectedValueNodes ); } } return _react2["default"].createElement( 'div', { className: className, ref: _this2.saveTopCtrlRef }, _this2.getPlaceholderElement(), innerNode ); }; this.onOuterClick = function (event) { //sp:在不能输入的情况下,点击事件触发focus _this2._focused = true; _this2.updateFocusClassName(); _this2.props.onFocus(_this2.state.value); }; }; Select.displayName = 'Select'; (0, _reactLifecyclesCompat.polyfill)(Select); exports["default"] = Select; module.exports = exports['default']; /***/ }), /* 141 */ /***/ (function(module, exports) { 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); /** * 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 componentWillMount() { // Call this.constructor.gDSFP to support sub-classes. var state = this.constructor.getDerivedStateFromProps(this.props, this.state); if (state !== null && state !== undefined) { this.setState(state); } } function componentWillReceiveProps(nextProps) { // Call this.constructor.gDSFP to support sub-classes. // Use the setState() updater to ensure state isn't stale in certain edge cases. function updater(prevState) { var state = this.constructor.getDerivedStateFromProps(nextProps, prevState); return state !== null && state !== undefined ? state : null; } // Binding "this" is important for shallow renderer support. this.setState(updater.bind(this)); } function componentWillUpdate(nextProps, nextState) { try { var prevProps = this.props; var prevState = this.state; this.props = nextProps; this.state = nextState; this.__reactInternalSnapshotFlag = true; this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate( prevProps, prevState ); } finally { this.props = prevProps; this.state = prevState; } } // React may warn about cWM/cWRP/cWU methods being deprecated. // Add a flag to suppress these warnings for this special case. componentWillMount.__suppressDeprecationWarning = true; componentWillReceiveProps.__suppressDeprecationWarning = true; componentWillUpdate.__suppressDeprecationWarning = true; function polyfill(Component) { var prototype = Component.prototype; if (!prototype || !prototype.isReactComponent) { throw new Error('Can only polyfill class components'); } if ( typeof Component.getDerivedStateFromProps !== 'function' && typeof prototype.getSnapshotBeforeUpdate !== 'function' ) { return Component; } // If new component APIs are defined, "unsafe" lifecycles won't be called. // Error if any of these lifecycles are present, // Because they would work differently between older and newer (16.3+) versions of React. var foundWillMountName = null; var foundWillReceivePropsName = null; var foundWillUpdateName = null; if (typeof prototype.componentWillMount === 'function') { foundWillMountName = 'componentWillMount'; } else if (typeof prototype.UNSAFE_componentWillMount === 'function') { foundWillMountName = 'UNSAFE_componentWillMount'; } if (typeof prototype.componentWillReceiveProps === 'function') { foundWillReceivePropsName = 'componentWillReceiveProps'; } else if (typeof prototype.UNSAFE_componentWillReceiveProps === 'function') { foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps'; } if (typeof prototype.componentWillUpdate === 'function') { foundWillUpdateName = 'componentWillUpdate'; } else if (typeof prototype.UNSAFE_componentWillUpdate === 'function') { foundWillUpdateName = 'UNSAFE_componentWillUpdate'; } if ( foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null ) { var componentName = Component.displayName || Component.name; var newApiName = typeof Component.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()'; throw Error( 'Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' + componentName + ' uses ' + newApiName + ' but also contains the following legacy lifecycles:' + (foundWillMountName !== null ? '\n ' + foundWillMountName : '') + (foundWillReceivePropsName !== null ? '\n ' + foundWillReceivePropsName : '') + (foundWillUpdateName !== null ? '\n ' + foundWillUpdateName : '') + '\n\nThe above lifecycles should be removed. Learn more about this warning here:\n' + 'https://fb.me/react-async-component-lifecycle-hooks' ); } // React <= 16.2 does not support static getDerivedStateFromProps. // As a workaround, use cWM and cWRP to invoke the new static lifecycle. // Newer versions of React will ignore these lifecycles if gDSFP exists. if (typeof Component.getDerivedStateFromProps === 'function') { prototype.componentWillMount = componentWillMount; prototype.componentWillReceiveProps = componentWillReceiveProps; } // React <= 16.2 does not support getSnapshotBeforeUpdate. // As a workaround, use cWU to invoke the new lifecycle. // Newer versions of React will ignore that lifecycle if gSBU exists. if (typeof prototype.getSnapshotBeforeUpdate === 'function') { if (typeof prototype.componentDidUpdate !== 'function') { throw new Error( 'Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype' ); } prototype.componentWillUpdate = componentWillUpdate; var componentDidUpdate = prototype.componentDidUpdate; prototype.componentDidUpdate = function componentDidUpdatePolyfill( prevProps, prevState, maybeSnapshot ) { // 16.3+ will not execute our will-update method; // It will pass a snapshot value to did-update though. // Older versions will require our polyfilled will-update value. // We need to handle both cases, but can't just check for the presence of "maybeSnapshot", // Because for <= 15.x versions this might be a "prevContext" object. // We also can't just check "__reactInternalSnapshot", // Because get-snapshot might return a falsy value. // So check for the explicit __reactInternalSnapshotFlag flag to determine behavior. var snapshot = this.__reactInternalSnapshotFlag ? this.__reactInternalSnapshot : maybeSnapshot; componentDidUpdate.call(this, prevProps, prevState, snapshot); }; } return Component; } exports.polyfill = polyfill; /***/ }), /* 142 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports['default'] = toArray; var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function toArray(children) { var ret = []; _react2['default'].Children.forEach(children, function (c) { ret.push(c); }); return ret; } module.exports = exports['default']; /***/ }), /* 143 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; exports.Divider = exports.ItemGroup = exports.MenuItemGroup = exports.MenuItem = exports.Item = exports.SubMenu = undefined; var _Menu = __webpack_require__(144); var _Menu2 = _interopRequireDefault(_Menu); var _SubMenu = __webpack_require__(243); var _SubMenu2 = _interopRequireDefault(_SubMenu); var _MenuItem = __webpack_require__(274); var _MenuItem2 = _interopRequireDefault(_MenuItem); var _MenuItemGroup = __webpack_require__(278); var _MenuItemGroup2 = _interopRequireDefault(_MenuItemGroup); var _Divider = __webpack_require__(279); var _Divider2 = _interopRequireDefault(_Divider); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } exports.SubMenu = _SubMenu2['default']; exports.Item = _MenuItem2['default']; exports.MenuItem = _MenuItem2['default']; exports.MenuItemGroup = _MenuItemGroup2['default']; exports.ItemGroup = _MenuItemGroup2['default']; exports.Divider = _Divider2['default']; exports['default'] = _Menu2['default']; /***/ }), /* 144 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; var _extends2 = __webpack_require__(145); var _extends3 = _interopRequireDefault(_extends2); var _objectWithoutProperties2 = __webpack_require__(184); var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); var _classCallCheck2 = __webpack_require__(185); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _possibleConstructorReturn2 = __webpack_require__(186); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(220); var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _miniStore = __webpack_require__(228); var _SubPopupMenu = __webpack_require__(237); var _SubPopupMenu2 = _interopRequireDefault(_SubPopupMenu); var _util = __webpack_require__(240); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var Menu = function (_React$Component) { (0, _inherits3['default'])(Menu, _React$Component); function Menu(props) { (0, _classCallCheck3['default'])(this, Menu); var _this = (0, _possibleConstructorReturn3['default'])(this, _React$Component.call(this, props)); _initialiseProps.call(_this); _this.isRootMenu = true; var selectedKeys = props.defaultSelectedKeys; var openKeys = props.defaultOpenKeys; if ('selectedKeys' in props) { selectedKeys = props.selectedKeys || []; } if ('openKeys' in props) { openKeys = props.openKeys || []; } _this.store = (0, _miniStore.create)({ selectedKeys: selectedKeys, openKeys: openKeys, activeKey: { '0-menu-': (0, _SubPopupMenu.getActiveKey)(props, props.activeKey) } }); return _this; } Menu.prototype.componentDidMount = function componentDidMount() { this.updateMiniStore(); }; Menu.prototype.componentDidUpdate = function componentDidUpdate() { this.updateMiniStore(); }; // onKeyDown needs to be exposed as a instance method // e.g., in rc-select, we need to navigate menu item while // current active item is rc-select input box rather than the menu itself Menu.prototype.updateMiniStore = function updateMiniStore() { if ('selectedKeys' in this.props) { this.store.setState({ selectedKeys: this.props.selectedKeys || [] }); } if ('openKeys' in this.props) { this.store.setState({ openKeys: this.props.openKeys || [] }); } }; Menu.prototype.render = function render() { var _this2 = this; var props = (0, _objectWithoutProperties3['default'])(this.props, []); props.className += ' ' + props.prefixCls + '-root'; props = (0, _extends3['default'])({}, props, { onClick: this.onClick, onOpenChange: this.onOpenChange, onDeselect: this.onDeselect, onSelect: this.onSelect, openTransitionName: this.getOpenTransitionName(), parentMenu: this }); return _react2['default'].createElement( _miniStore.Provider, { store: this.store }, _react2['default'].createElement( _SubPopupMenu2['default'], (0, _extends3['default'])({}, props, { ref: function ref(c) { return _this2.innerMenu = c; } }), this.props.children ) ); }; return Menu; }(_react2['default'].Component); Menu.propTypes = { defaultSelectedKeys: _propTypes2['default'].arrayOf(_propTypes2['default'].string), defaultActiveFirst: _propTypes2['default'].bool, selectedKeys: _propTypes2['default'].arrayOf(_propTypes2['default'].string), defaultOpenKeys: _propTypes2['default'].arrayOf(_propTypes2['default'].string), openKeys: _propTypes2['default'].arrayOf(_propTypes2['default'].string), mode: _propTypes2['default'].oneOf(['horizontal', 'vertical', 'vertical-left', 'vertical-right', 'inline']), getPopupContainer: _propTypes2['default'].func, onClick: _propTypes2['default'].func, onSelect: _propTypes2['default'].func, onDeselect: _propTypes2['default'].func, onDestroy: _propTypes2['default'].func, openTransitionName: _propTypes2['default'].string, openAnimation: _propTypes2['default'].oneOfType([_propTypes2['default'].string, _propTypes2['default'].object]), subMenuOpenDelay: _propTypes2['default'].number, subMenuCloseDelay: _propTypes2['default'].number, forceSubMenuRender: _propTypes2['default'].bool, triggerSubMenuAction: _propTypes2['default'].string, level: _propTypes2['default'].number, selectable: _propTypes2['default'].bool, multiple: _propTypes2['default'].bool, children: _propTypes2['default'].any, className: _propTypes2['default'].string, style: _propTypes2['default'].object, activeKey: _propTypes2['default'].string, prefixCls: _propTypes2['default'].string, builtinPlacements: _propTypes2['default'].object, itemIcon: _propTypes2['default'].oneOfType([_propTypes2['default'].func, _propTypes2['default'].node]), expandIcon: _propTypes2['default'].oneOfType([_propTypes2['default'].func, _propTypes2['default'].node]), overflowedIndicator: _propTypes2['default'].node }; Menu.defaultProps = { selectable: true, onClick: _util.noop, onSelect: _util.noop, onOpenChange: _util.noop, onDeselect: _util.noop, defaultSelectedKeys: [], defaultOpenKeys: [], subMenuOpenDelay: 0.1, subMenuCloseDelay: 0.1, triggerSubMenuAction: 'hover', prefixCls: 'rc-menu', className: '', mode: 'vertical', style: {}, builtinPlacements: {}, overflowedIndicator: _react2['default'].createElement( 'span', null, '\xB7\xB7\xB7' ) }; var _initialiseProps = function _initialiseProps() { var _this3 = this; this.onSelect = function (selectInfo) { var props = _this3.props; if (props.selectable) { // root menu var selectedKeys = _this3.store.getState().selectedKeys; var selectedKey = selectInfo.key; if (props.multiple) { selectedKeys = selectedKeys.concat([selectedKey]); } else { selectedKeys = [selectedKey]; } if (!('selectedKeys' in props)) { _this3.store.setState({ selectedKeys: selectedKeys }); } props.onSelect((0, _extends3['default'])({}, selectInfo, { selectedKeys: selectedKeys })); } }; this.onClick = function (e) { _this3.props.onClick(e); }; this.onKeyDown = function (e, callback) { _this3.innerMenu.getWrappedInstance().onKeyDown(e, callback); }; this.onOpenChange = function (event) { var props = _this3.props; var openKeys = _this3.store.getState().openKeys.concat(); var changed = false; var processSingle = function processSingle(e) { var oneChanged = false; if (e.open) { oneChanged = openKeys.indexOf(e.key) === -1; if (oneChanged) { openKeys.push(e.key); } } else { var index = openKeys.indexOf(e.key); oneChanged = index !== -1; if (oneChanged) { openKeys.splice(index, 1); } } changed = changed || oneChanged; }; if (Array.isArray(event)) { // batch change call event.forEach(processSingle); } else { processSingle(event); } if (changed) { if (!('openKeys' in _this3.props)) { _this3.store.setState({ openKeys: openKeys }); } props.onOpenChange(openKeys); } }; this.onDeselect = function (selectInfo) { var props = _this3.props; if (props.selectable) { var selectedKeys = _this3.store.getState().selectedKeys.concat(); var selectedKey = selectInfo.key; var index = selectedKeys.indexOf(selectedKey); if (index !== -1) { selectedKeys.splice(index, 1); } if (!('selectedKeys' in props)) { _this3.store.setState({ selectedKeys: selectedKeys }); } props.onDeselect((0, _extends3['default'])({}, selectInfo, { selectedKeys: selectedKeys })); } }; this.getOpenTransitionName = function () { var props = _this3.props; var transitionName = props.openTransitionName; var animationName = props.openAnimation; if (!transitionName && typeof animationName === 'string') { transitionName = props.prefixCls + '-open-' + animationName; } return transitionName; }; }; exports['default'] = Menu; module.exports = exports['default']; /***/ }), /* 145 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _assign = __webpack_require__(146); var _assign2 = _interopRequireDefault(_assign); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = _assign2.default || 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; }; /***/ }), /* 146 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(147), __esModule: true }; /***/ }), /* 147 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(148); module.exports = __webpack_require__(151).Object.assign; /***/ }), /* 148 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.3.1 Object.assign(target, source) var $export = __webpack_require__(149); $export($export.S + $export.F, 'Object', { assign: __webpack_require__(165) }); /***/ }), /* 149 */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(150); var core = __webpack_require__(151); var ctx = __webpack_require__(152); var hide = __webpack_require__(154); var has = __webpack_require__(164); 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; /***/ }), /* 150 */ /***/ (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 /***/ }), /* 151 */ /***/ (function(module, exports) { var core = module.exports = { version: '2.6.1' }; if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef /***/ }), /* 152 */ /***/ (function(module, exports, __webpack_require__) { // optional / simple context binding var aFunction = __webpack_require__(153); 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); }; }; /***/ }), /* 153 */ /***/ (function(module, exports) { module.exports = function (it) { if (typeof it != 'function') throw TypeError(it + ' is not a function!'); return it; }; /***/ }), /* 154 */ /***/ (function(module, exports, __webpack_require__) { var dP = __webpack_require__(155); var createDesc = __webpack_require__(163); module.exports = __webpack_require__(159) ? function (object, key, value) { return dP.f(object, key, createDesc(1, value)); } : function (object, key, value) { object[key] = value; return object; }; /***/ }), /* 155 */ /***/ (function(module, exports, __webpack_require__) { var anObject = __webpack_require__(156); var IE8_DOM_DEFINE = __webpack_require__(158); var toPrimitive = __webpack_require__(162); var dP = Object.defineProperty; exports.f = __webpack_require__(159) ? 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; }; /***/ }), /* 156 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(157); module.exports = function (it) { if (!isObject(it)) throw TypeError(it + ' is not an object!'); return it; }; /***/ }), /* 157 */ /***/ (function(module, exports) { module.exports = function (it) { return typeof it === 'object' ? it !== null : typeof it === 'function'; }; /***/ }), /* 158 */ /***/ (function(module, exports, __webpack_require__) { module.exports = !__webpack_require__(159) && !__webpack_require__(160)(function () { return Object.defineProperty(__webpack_require__(161)('div'), 'a', { get: function () { return 7; } }).a != 7; }); /***/ }), /* 159 */ /***/ (function(module, exports, __webpack_require__) { // Thank's IE8 for his funny defineProperty module.exports = !__webpack_require__(160)(function () { return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; }); /***/ }), /* 160 */ /***/ (function(module, exports) { module.exports = function (exec) { try { return !!exec(); } catch (e) { return true; } }; /***/ }), /* 161 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(157); var document = __webpack_require__(150).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) : {}; }; /***/ }), /* 162 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.1 ToPrimitive(input [, PreferredType]) var isObject = __webpack_require__(157); // 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"); }; /***/ }), /* 163 */ /***/ (function(module, exports) { module.exports = function (bitmap, value) { return { enumerable: !(bitmap & 1), configurable: !(bitmap & 2), writable: !(bitmap & 4), value: value }; }; /***/ }), /* 164 */ /***/ (function(module, exports) { var hasOwnProperty = {}.hasOwnProperty; module.exports = function (it, key) { return hasOwnProperty.call(it, key); }; /***/ }), /* 165 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; // 19.1.2.1 Object.assign(target, source, ...) var getKeys = __webpack_require__(166); var gOPS = __webpack_require__(181); var pIE = __webpack_require__(182); var toObject = __webpack_require__(183); var IObject = __webpack_require__(169); var $assign = Object.assign; // should work with symbols and should have deterministic property order (V8 bug) module.exports = !$assign || __webpack_require__(160)(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; /***/ }), /* 166 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.14 / 15.2.3.14 Object.keys(O) var $keys = __webpack_require__(167); var enumBugKeys = __webpack_require__(180); module.exports = Object.keys || function keys(O) { return $keys(O, enumBugKeys); }; /***/ }), /* 167 */ /***/ (function(module, exports, __webpack_require__) { var has = __webpack_require__(164); var toIObject = __webpack_require__(168); var arrayIndexOf = __webpack_require__(172)(false); var IE_PROTO = __webpack_require__(176)('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; }; /***/ }), /* 168 */ /***/ (function(module, exports, __webpack_require__) { // to indexed object, toObject with fallback for non-array-like ES3 strings var IObject = __webpack_require__(169); var defined = __webpack_require__(171); module.exports = function (it) { return IObject(defined(it)); }; /***/ }), /* 169 */ /***/ (function(module, exports, __webpack_require__) { // fallback for non-array-like ES3 and non-enumerable old V8 strings var cof = __webpack_require__(170); // eslint-disable-next-line no-prototype-builtins module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { return cof(it) == 'String' ? it.split('') : Object(it); }; /***/ }), /* 170 */ /***/ (function(module, exports) { var toString = {}.toString; module.exports = function (it) { return toString.call(it).slice(8, -1); }; /***/ }), /* 171 */ /***/ (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; }; /***/ }), /* 172 */ /***/ (function(module, exports, __webpack_require__) { // false -> Array#indexOf // true -> Array#includes var toIObject = __webpack_require__(168); var toLength = __webpack_require__(173); var toAbsoluteIndex = __webpack_require__(175); 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; }; }; /***/ }), /* 173 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.15 ToLength var toInteger = __webpack_require__(174); var min = Math.min; module.exports = function (it) { return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 }; /***/ }), /* 174 */ /***/ (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); }; /***/ }), /* 175 */ /***/ (function(module, exports, __webpack_require__) { var toInteger = __webpack_require__(174); 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); }; /***/ }), /* 176 */ /***/ (function(module, exports, __webpack_require__) { var shared = __webpack_require__(177)('keys'); var uid = __webpack_require__(179); module.exports = function (key) { return shared[key] || (shared[key] = uid(key)); }; /***/ }), /* 177 */ /***/ (function(module, exports, __webpack_require__) { var core = __webpack_require__(151); var global = __webpack_require__(150); 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__(178) ? 'pure' : 'global', copyright: '© 2018 Denis Pushkarev (zloirock.ru)' }); /***/ }), /* 178 */ /***/ (function(module, exports) { module.exports = true; /***/ }), /* 179 */ /***/ (function(module, exports) { var id = 0; var px = Math.random(); module.exports = function (key) { return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); }; /***/ }), /* 180 */ /***/ (function(module, exports) { // IE 8- don't enum bug keys module.exports = ( 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' ).split(','); /***/ }), /* 181 */ /***/ (function(module, exports) { exports.f = Object.getOwnPropertySymbols; /***/ }), /* 182 */ /***/ (function(module, exports) { exports.f = {}.propertyIsEnumerable; /***/ }), /* 183 */ /***/ (function(module, exports, __webpack_require__) { // 7.1.13 ToObject(argument) var defined = __webpack_require__(171); module.exports = function (it) { return Object(defined(it)); }; /***/ }), /* 184 */ /***/ (function(module, exports) { "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; }; /***/ }), /* 185 */ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports.default = function (instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }; /***/ }), /* 186 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _typeof2 = __webpack_require__(187); var _typeof3 = _interopRequireDefault(_typeof2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self; }; /***/ }), /* 187 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _iterator = __webpack_require__(188); var _iterator2 = _interopRequireDefault(_iterator); var _symbol = __webpack_require__(207); var _symbol2 = _interopRequireDefault(_symbol); var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj; }; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) { return typeof obj === "undefined" ? "undefined" : _typeof(obj); } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default && obj !== _symbol2.default.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj); }; /***/ }), /* 188 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(189), __esModule: true }; /***/ }), /* 189 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(190); __webpack_require__(202); module.exports = __webpack_require__(206).f('iterator'); /***/ }), /* 190 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var $at = __webpack_require__(191)(true); // 21.1.3.27 String.prototype[@@iterator]() __webpack_require__(192)(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 }; }); /***/ }), /* 191 */ /***/ (function(module, exports, __webpack_require__) { var toInteger = __webpack_require__(174); var defined = __webpack_require__(171); // true -> String#at // false -> String#codePointAt module.exports = function (TO_STRING) { return function (that, pos) { var s = String(defined(that)); var i = toInteger(pos); var l = s.length; var a, b; if (i < 0 || i >= l) return TO_STRING ? '' : undefined; a = s.charCodeAt(i); return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; }; }; /***/ }), /* 192 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var LIBRARY = __webpack_require__(178); var $export = __webpack_require__(149); var redefine = __webpack_require__(193); var hide = __webpack_require__(154); var Iterators = __webpack_require__(194); var $iterCreate = __webpack_require__(195); var setToStringTag = __webpack_require__(199); var getPrototypeOf = __webpack_require__(201); var ITERATOR = __webpack_require__(200)('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; }; /***/ }), /* 193 */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(154); /***/ }), /* 194 */ /***/ (function(module, exports) { module.exports = {}; /***/ }), /* 195 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var create = __webpack_require__(196); var descriptor = __webpack_require__(163); var setToStringTag = __webpack_require__(199); var IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() __webpack_require__(154)(IteratorPrototype, __webpack_require__(200)('iterator'), function () { return this; }); module.exports = function (Constructor, NAME, next) { Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); setToStringTag(Constructor, NAME + ' Iterator'); }; /***/ }), /* 196 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) var anObject = __webpack_require__(156); var dPs = __webpack_require__(197); var enumBugKeys = __webpack_require__(180); var IE_PROTO = __webpack_require__(176)('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__(161)('iframe'); var i = enumBugKeys.length; var lt = '<'; var gt = '>'; var iframeDocument; iframe.style.display = 'none'; __webpack_require__(198).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); }; /***/ }), /* 197 */ /***/ (function(module, exports, __webpack_require__) { var dP = __webpack_require__(155); var anObject = __webpack_require__(156); var getKeys = __webpack_require__(166); module.exports = __webpack_require__(159) ? 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; }; /***/ }), /* 198 */ /***/ (function(module, exports, __webpack_require__) { var document = __webpack_require__(150).document; module.exports = document && document.documentElement; /***/ }), /* 199 */ /***/ (function(module, exports, __webpack_require__) { var def = __webpack_require__(155).f; var has = __webpack_require__(164); var TAG = __webpack_require__(200)('toStringTag'); module.exports = function (it, tag, stat) { if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag }); }; /***/ }), /* 200 */ /***/ (function(module, exports, __webpack_require__) { var store = __webpack_require__(177)('wks'); var uid = __webpack_require__(179); var Symbol = __webpack_require__(150).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)); }; $exports.store = store; /***/ }), /* 201 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) var has = __webpack_require__(164); var toObject = __webpack_require__(183); var IE_PROTO = __webpack_require__(176)('IE_PROTO'); var ObjectProto = Object.prototype; module.exports = Object.getPrototypeOf || function (O) { O = toObject(O); if (has(O, IE_PROTO)) return O[IE_PROTO]; if (typeof O.constructor == 'function' && O instanceof O.constructor) { return O.constructor.prototype; } return O instanceof Object ? ObjectProto : null; }; /***/ }), /* 202 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(203); var global = __webpack_require__(150); var hide = __webpack_require__(154); var Iterators = __webpack_require__(194); var TO_STRING_TAG = __webpack_require__(200)('toStringTag'); var DOMIterables = ('CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,' + 'DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,' + 'MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,' + 'SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,' + 'TextTrackList,TouchList').split(','); for (var i = 0; i < DOMIterables.length; i++) { var NAME = DOMIterables[i]; var Collection = global[NAME]; var proto = Collection && Collection.prototype; if (proto && !proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); Iterators[NAME] = Iterators.Array; } /***/ }), /* 203 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var addToUnscopables = __webpack_require__(204); var step = __webpack_require__(205); var Iterators = __webpack_require__(194); var toIObject = __webpack_require__(168); // 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__(192)(Array, 'Array', function (iterated, kind) { this._t = toIObject(iterated); // target this._i = 0; // next index this._k = kind; // kind // 22.1.5.2.1 %ArrayIteratorPrototype%.next() }, function () { var O = this._t; var kind = this._k; var index = this._i++; if (!O || index >= O.length) { this._t = undefined; return step(1); } if (kind == 'keys') return step(0, index); if (kind == 'values') return step(0, O[index]); return step(0, [index, O[index]]); }, 'values'); // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) Iterators.Arguments = Iterators.Array; addToUnscopables('keys'); addToUnscopables('values'); addToUnscopables('entries'); /***/ }), /* 204 */ /***/ (function(module, exports) { module.exports = function () { /* empty */ }; /***/ }), /* 205 */ /***/ (function(module, exports) { module.exports = function (done, value) { return { value: value, done: !!done }; }; /***/ }), /* 206 */ /***/ (function(module, exports, __webpack_require__) { exports.f = __webpack_require__(200); /***/ }), /* 207 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(208), __esModule: true }; /***/ }), /* 208 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(209); __webpack_require__(217); __webpack_require__(218); __webpack_require__(219); module.exports = __webpack_require__(151).Symbol; /***/ }), /* 209 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; // ECMAScript 6 symbols shim var global = __webpack_require__(150); var has = __webpack_require__(164); var DESCRIPTORS = __webpack_require__(159); var $export = __webpack_require__(149); var redefine = __webpack_require__(193); var META = __webpack_require__(210).KEY; var $fails = __webpack_require__(160); var shared = __webpack_require__(177); var setToStringTag = __webpack_require__(199); var uid = __webpack_require__(179); var wks = __webpack_require__(200); var wksExt = __webpack_require__(206); var wksDefine = __webpack_require__(211); var enumKeys = __webpack_require__(212); var isArray = __webpack_require__(213); var anObject = __webpack_require__(156); var isObject = __webpack_require__(157); var toIObject = __webpack_require__(168); var toPrimitive = __webpack_require__(162); var createDesc = __webpack_require__(163); var _create = __webpack_require__(196); var gOPNExt = __webpack_require__(214); var $GOPD = __webpack_require__(216); var $DP = __webpack_require__(155); var $keys = __webpack_require__(166); var gOPD = $GOPD.f; var dP = $DP.f; var gOPN = gOPNExt.f; var $Symbol = global.Symbol; var $JSON = global.JSON; var _stringify = $JSON && $JSON.stringify; var PROTOTYPE = 'prototype'; var HIDDEN = wks('_hidden'); var TO_PRIMITIVE = wks('toPrimitive'); var isEnum = {}.propertyIsEnumerable; var SymbolRegistry = shared('symbol-registry'); var AllSymbols = shared('symbols'); var OPSymbols = shared('op-symbols'); var ObjectProto = Object[PROTOTYPE]; var USE_NATIVE = typeof $Symbol == 'function'; var QObject = global.QObject; // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 var setSymbolDesc = DESCRIPTORS && $fails(function () { return _create(dP({}, 'a', { get: function () { return dP(this, 'a', { value: 7 }).a; } })).a != 7; }) ? function (it, key, D) { var protoDesc = gOPD(ObjectProto, key); if (protoDesc) delete ObjectProto[key]; dP(it, key, D); if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); } : dP; var wrap = function (tag) { var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); sym._k = tag; return sym; }; var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) { return typeof it == 'symbol'; } : function (it) { return it instanceof $Symbol; }; var $defineProperty = function defineProperty(it, key, D) { if (it === ObjectProto) $defineProperty(OPSymbols, key, D); anObject(it); key = toPrimitive(key, true); anObject(D); if (has(AllSymbols, key)) { if (!D.enumerable) { if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); it[HIDDEN][key] = true; } else { if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; D = _create(D, { enumerable: createDesc(0, false) }); } return setSymbolDesc(it, key, D); } return dP(it, key, D); }; var $defineProperties = function defineProperties(it, P) { anObject(it); var keys = enumKeys(P = toIObject(P)); var i = 0; var l = keys.length; var key; while (l > i) $defineProperty(it, key = keys[i++], P[key]); return it; }; var $create = function create(it, P) { return P === undefined ? _create(it) : $defineProperties(_create(it), P); }; var $propertyIsEnumerable = function propertyIsEnumerable(key) { var E = isEnum.call(this, key = toPrimitive(key, true)); if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; }; var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { it = toIObject(it); key = toPrimitive(key, true); if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; var D = gOPD(it, key); if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; return D; }; var $getOwnPropertyNames = function getOwnPropertyNames(it) { var names = gOPN(toIObject(it)); var result = []; var i = 0; var key; while (names.length > i) { if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key); } return result; }; var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { var IS_OP = it === ObjectProto; var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); var result = []; var i = 0; var key; while (names.length > i) { if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]); } return result; }; // 19.4.1.1 Symbol([description]) if (!USE_NATIVE) { $Symbol = function Symbol() { if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); var tag = uid(arguments.length > 0 ? arguments[0] : undefined); var $set = function (value) { if (this === ObjectProto) $set.call(OPSymbols, value); if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; setSymbolDesc(this, tag, createDesc(1, value)); }; if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set }); return wrap(tag); }; redefine($Symbol[PROTOTYPE], 'toString', function toString() { return this._k; }); $GOPD.f = $getOwnPropertyDescriptor; $DP.f = $defineProperty; __webpack_require__(215).f = gOPNExt.f = $getOwnPropertyNames; __webpack_require__(182).f = $propertyIsEnumerable; __webpack_require__(181).f = $getOwnPropertySymbols; if (DESCRIPTORS && !__webpack_require__(178)) { redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); } wksExt.f = function (name) { return wrap(wks(name)); }; } $export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); for (var es6Symbols = ( // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' ).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]); for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]); $export($export.S + $export.F * !USE_NATIVE, 'Symbol', { // 19.4.2.1 Symbol.for(key) 'for': function (key) { return has(SymbolRegistry, key += '') ? SymbolRegistry[key] : SymbolRegistry[key] = $Symbol(key); }, // 19.4.2.5 Symbol.keyFor(sym) keyFor: function keyFor(sym) { if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key; }, useSetter: function () { setter = true; }, useSimple: function () { setter = false; } }); $export($export.S + $export.F * !USE_NATIVE, 'Object', { // 19.1.2.2 Object.create(O [, Properties]) create: $create, // 19.1.2.4 Object.defineProperty(O, P, Attributes) defineProperty: $defineProperty, // 19.1.2.3 Object.defineProperties(O, Properties) defineProperties: $defineProperties, // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) getOwnPropertyDescriptor: $getOwnPropertyDescriptor, // 19.1.2.7 Object.getOwnPropertyNames(O) getOwnPropertyNames: $getOwnPropertyNames, // 19.1.2.8 Object.getOwnPropertySymbols(O) getOwnPropertySymbols: $getOwnPropertySymbols }); // 24.3.2 JSON.stringify(value [, replacer [, space]]) $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () { var S = $Symbol(); // MS Edge converts symbol values to JSON as {} // WebKit converts symbol values to JSON as null // V8 throws on boxed symbols return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}'; })), 'JSON', { stringify: function stringify(it) { var args = [it]; var i = 1; var replacer, $replacer; while (arguments.length > i) args.push(arguments[i++]); $replacer = replacer = args[1]; if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined if (!isArray(replacer)) replacer = function (key, value) { if (typeof $replacer == 'function') value = $replacer.call(this, key, value); if (!isSymbol(value)) return value; }; args[1] = replacer; return _stringify.apply($JSON, args); } }); // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) $Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(154)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); // 19.4.3.5 Symbol.prototype[@@toStringTag] setToStringTag($Symbol, 'Symbol'); // 20.2.1.9 Math[@@toStringTag] setToStringTag(Math, 'Math', true); // 24.3.3 JSON[@@toStringTag] setToStringTag(global.JSON, 'JSON', true); /***/ }), /* 210 */ /***/ (function(module, exports, __webpack_require__) { var META = __webpack_require__(179)('meta'); var isObject = __webpack_require__(157); var has = __webpack_require__(164); var setDesc = __webpack_require__(155).f; var id = 0; var isExtensible = Object.isExtensible || function () { return true; }; var FREEZE = !__webpack_require__(160)(function () { return isExtensible(Object.preventExtensions({})); }); var setMeta = function (it) { setDesc(it, META, { value: { i: 'O' + ++id, // object ID w: {} // weak collections IDs } }); }; var fastKey = function (it, create) { // return primitive with prefix if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; if (!has(it, META)) { // can't set metadata to uncaught frozen object if (!isExtensible(it)) return 'F'; // not necessary to add metadata if (!create) return 'E'; // add missing metadata setMeta(it); // return object ID } return it[META].i; }; var getWeak = function (it, create) { if (!has(it, META)) { // can't set metadata to uncaught frozen object if (!isExtensible(it)) return true; // not necessary to add metadata if (!create) return false; // add missing metadata setMeta(it); // return hash weak collections IDs } return it[META].w; }; // add metadata on freeze-family methods calling var onFreeze = function (it) { if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); return it; }; var meta = module.exports = { KEY: META, NEED: false, fastKey: fastKey, getWeak: getWeak, onFreeze: onFreeze }; /***/ }), /* 211 */ /***/ (function(module, exports, __webpack_require__) { var global = __webpack_require__(150); var core = __webpack_require__(151); var LIBRARY = __webpack_require__(178); var wksExt = __webpack_require__(206); var defineProperty = __webpack_require__(155).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) }); }; /***/ }), /* 212 */ /***/ (function(module, exports, __webpack_require__) { // all enumerable object keys, includes symbols var getKeys = __webpack_require__(166); var gOPS = __webpack_require__(181); var pIE = __webpack_require__(182); module.exports = function (it) { var result = getKeys(it); var getSymbols = gOPS.f; if (getSymbols) { var symbols = getSymbols(it); var isEnum = pIE.f; var i = 0; var key; while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key); } return result; }; /***/ }), /* 213 */ /***/ (function(module, exports, __webpack_require__) { // 7.2.2 IsArray(argument) var cof = __webpack_require__(170); module.exports = Array.isArray || function isArray(arg) { return cof(arg) == 'Array'; }; /***/ }), /* 214 */ /***/ (function(module, exports, __webpack_require__) { // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window var toIObject = __webpack_require__(168); var gOPN = __webpack_require__(215).f; var toString = {}.toString; var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : []; var getWindowNames = function (it) { try { return gOPN(it); } catch (e) { return windowNames.slice(); } }; module.exports.f = function getOwnPropertyNames(it) { return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); }; /***/ }), /* 215 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) var $keys = __webpack_require__(167); var hiddenKeys = __webpack_require__(180).concat('length', 'prototype'); exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { return $keys(O, hiddenKeys); }; /***/ }), /* 216 */ /***/ (function(module, exports, __webpack_require__) { var pIE = __webpack_require__(182); var createDesc = __webpack_require__(163); var toIObject = __webpack_require__(168); var toPrimitive = __webpack_require__(162); var has = __webpack_require__(164); var IE8_DOM_DEFINE = __webpack_require__(158); var gOPD = Object.getOwnPropertyDescriptor; exports.f = __webpack_require__(159) ? 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]); }; /***/ }), /* 217 */ /***/ (function(module, exports) { /***/ }), /* 218 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(211)('asyncIterator'); /***/ }), /* 219 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(211)('observable'); /***/ }), /* 220 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _setPrototypeOf = __webpack_require__(221); var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf); var _create = __webpack_require__(225); var _create2 = _interopRequireDefault(_create); var _typeof2 = __webpack_require__(187); var _typeof3 = _interopRequireDefault(_typeof2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass))); } subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass; }; /***/ }), /* 221 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(222), __esModule: true }; /***/ }), /* 222 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(223); module.exports = __webpack_require__(151).Object.setPrototypeOf; /***/ }), /* 223 */ /***/ (function(module, exports, __webpack_require__) { // 19.1.3.19 Object.setPrototypeOf(O, proto) var $export = __webpack_require__(149); $export($export.S, 'Object', { setPrototypeOf: __webpack_require__(224).set }); /***/ }), /* 224 */ /***/ (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__(157); var anObject = __webpack_require__(156); var check = function (O, proto) { anObject(O); if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); }; module.exports = { set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line function (test, buggy, set) { try { set = __webpack_require__(152)(Function.call, __webpack_require__(216).f(Object.prototype, '__proto__').set, 2); set(test, []); buggy = !(test instanceof Array); } catch (e) { buggy = true; } return function setPrototypeOf(O, proto) { check(O, proto); if (buggy) O.__proto__ = proto; else set(O, proto); return O; }; }({}, false) : undefined), check: check }; /***/ }), /* 225 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(226), __esModule: true }; /***/ }), /* 226 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(227); var $Object = __webpack_require__(151).Object; module.exports = function create(P, D) { return $Object.create(P, D); }; /***/ }), /* 227 */ /***/ (function(module, exports, __webpack_require__) { var $export = __webpack_require__(149); // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) $export($export.S, 'Object', { create: __webpack_require__(196) }); /***/ }), /* 228 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.create = exports.connect = exports.Provider = undefined; var _Provider2 = __webpack_require__(229); var _Provider3 = _interopRequireDefault(_Provider2); var _connect2 = __webpack_require__(231); var _connect3 = _interopRequireDefault(_connect2); var _create2 = __webpack_require__(236); 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; /***/ }), /* 229 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); 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 _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _PropTypes = __webpack_require__(230); 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; } var Provider = function (_Component) { _inherits(Provider, _Component); function Provider() { _classCallCheck(this, Provider); return _possibleConstructorReturn(this, (Provider.__proto__ || Object.getPrototypeOf(Provider)).apply(this, arguments)); } _createClass(Provider, [{ key: 'getChildContext', value: function getChildContext() { return { miniStore: this.props.store }; } }, { key: 'render', value: function render() { return _react.Children.only(this.props.children); } }]); return Provider; }(_react.Component); Provider.propTypes = { store: _PropTypes.storeShape.isRequired }; Provider.childContextTypes = { miniStore: _PropTypes.storeShape.isRequired }; exports.default = Provider; /***/ }), /* 230 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.storeShape = undefined; var _propTypes = __webpack_require__(5); 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 }); /***/ }), /* 231 */ /***/ (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 _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; }; }(); exports.default = connect; var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _shallowequal = __webpack_require__(115); var _shallowequal2 = _interopRequireDefault(_shallowequal); var _hoistNonReactStatics = __webpack_require__(232); var _hoistNonReactStatics2 = _interopRequireDefault(_hoistNonReactStatics); var _reactLifecyclesCompat = __webpack_require__(141); var _PropTypes = __webpack_require__(230); 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; } function getDisplayName(WrappedComponent) { return WrappedComponent.displayName || WrappedComponent.name || 'Component'; } function isStateless(Component) { return !Component.prototype.render; } var defaultMapStateToProps = function defaultMapStateToProps() { return {}; }; function connect(mapStateToProps) { var shouldSubscribe = !!mapStateToProps; var finnalMapStateToProps = mapStateToProps || defaultMapStateToProps; return function wrapWithConnect(WrappedComponent) { var Connect = function (_Component) { _inherits(Connect, _Component); _createClass(Connect, null, [{ key: 'getDerivedStateFromProps', value: function getDerivedStateFromProps(props, prevState) { // using ownProps if (mapStateToProps && mapStateToProps.length === 2 && props !== prevState.props) { return { subscribed: finnalMapStateToProps(prevState.store.getState(), props), props: props }; } return { props: props }; } }]); function Connect(props, context) { _classCallCheck(this, Connect); var _this = _possibleConstructorReturn(this, (Connect.__proto__ || Object.getPrototypeOf(Connect)).call(this, props, context)); _this.handleChange = function () { if (!_this.unsubscribe) { return; } var nextState = finnalMapStateToProps(_this.store.getState(), _this.props); _this.setState({ subscribed: nextState }); }; _this.store = context.miniStore; _this.state = { subscribed: finnalMapStateToProps(_this.store.getState(), props), store: _this.store, props: props }; return _this; } _createClass(Connect, [{ key: 'componentDidMount', value: function componentDidMount() { this.trySubscribe(); } }, { key: 'componentWillUnmount', value: function componentWillUnmount() { this.tryUnsubscribe(); } }, { key: 'shouldComponentUpdate', value: function shouldComponentUpdate(nextProps, nextState) { return !(0, _shallowequal2.default)(this.props, nextProps) || !(0, _shallowequal2.default)(this.state.subscribed, nextState.subscribed); } }, { key: 'trySubscribe', value: function trySubscribe() { if (shouldSubscribe) { this.unsubscribe = this.store.subscribe(this.handleChange); this.handleChange(); } } }, { key: 'tryUnsubscribe', value: function tryUnsubscribe() { if (this.unsubscribe) { this.unsubscribe(); this.unsubscribe = null; } } }, { key: 'getWrappedInstance', value: function getWrappedInstance() { return this.wrappedInstance; } }, { key: 'render', value: function render() { var _this2 = this; var props = _extends({}, this.props, this.state.subscribed, { store: this.store }); if (!isStateless(WrappedComponent)) { props = _extends({}, props, { ref: function ref(c) { return _this2.wrappedInstance = c; } }); } return _react2.default.createElement(WrappedComponent, props); } }]); return Connect; }(_react.Component); Connect.displayName = 'Connect(' + getDisplayName(WrappedComponent) + ')'; Connect.contextTypes = { miniStore: _PropTypes.storeShape.isRequired }; (0, _reactLifecyclesCompat.polyfill)(Connect); return (0, _hoistNonReactStatics2.default)(Connect, WrappedComponent); }; } /***/ }), /* 232 */ /***/ (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__(233); 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 TYPE_STATICS = {}; TYPE_STATICS[ReactIs.ForwardRef] = FORWARD_REF_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 = TYPE_STATICS[targetComponent['$$typeof']] || REACT_STATICS; var sourceStatics = TYPE_STATICS[sourceComponent['$$typeof']] || REACT_STATICS; 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; /***/ }), /* 233 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {'use strict'; if (process.env.NODE_ENV === 'production') { module.exports = __webpack_require__(234); } else { module.exports = __webpack_require__(235); } /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(33))) /***/ }), /* 234 */ /***/ (function(module, exports) { /** @license React v16.7.0 * 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}; /***/ }), /* 235 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @license React v16.7.0 * 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))) /***/ }), /* 236 */ /***/ (function(module, exports) { "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; }; exports.default = create; function create(initialState) { var state = initialState; var listeners = []; function setState(partial) { state = _extends({}, state, partial); for (var i = 0; i < listeners.length; i++) { listeners[i](); } } function getState() { return state; } function subscribe(listener) { listeners.push(listener); return function unsubscribe() { var index = listeners.indexOf(listener); listeners.splice(index, 1); }; } return { setState: setState, getState: getState, subscribe: subscribe }; } /***/ }), /* 237 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; exports.SubPopupMenu = undefined; var _objectWithoutProperties2 = __webpack_require__(184); var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); var _classCallCheck2 = __webpack_require__(185); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _possibleConstructorReturn2 = __webpack_require__(186); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(220); var _inherits3 = _interopRequireDefault(_inherits2); var _extends4 = __webpack_require__(145); var _extends5 = _interopRequireDefault(_extends4); exports.getActiveKey = getActiveKey; exports.saveRef = saveRef; var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _miniStore = __webpack_require__(228); var _KeyCode = __webpack_require__(238); var _KeyCode2 = _interopRequireDefault(_KeyCode); var _createChainedFunction = __webpack_require__(239); var _createChainedFunction2 = _interopRequireDefault(_createChainedFunction); var _classnames = __webpack_require__(3); var _classnames2 = _interopRequireDefault(_classnames); var _util = __webpack_require__(240); var _DOMWrap = __webpack_require__(241); var _DOMWrap2 = _interopRequireDefault(_DOMWrap); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } 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: (0, _extends5['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; (0, _util.loopMenuItem)(children, function (c, i) { if (c && !c.props.disabled && activeKey === (0, _util.getKeyFromChildrenIndex)(c, eventKey, i)) { found = true; } }); if (found) { return activeKey; } } activeKey = null; if (props.defaultActiveFirst) { (0, _util.loopMenuItem)(children, function (c, i) { if (!activeKey && c && !c.props.disabled) { activeKey = (0, _util.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 = exports.SubPopupMenu = function (_React$Component) { (0, _inherits3['default'])(SubPopupMenu, _React$Component); function SubPopupMenu(props) { var _extends3; (0, _classCallCheck3['default'])(this, SubPopupMenu); var _this = (0, _possibleConstructorReturn3['default'])(this, _React$Component.call(this, props)); _initialiseProps.call(_this); props.store.setState({ activeKey: (0, _extends5['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 = (0, _objectWithoutProperties3['default'])(this.props, []); this.instanceArray = []; var className = (0, _classnames2['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; _util.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 */ _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 SubPopupMenu; }(_react2['default'].Component); SubPopupMenu.propTypes = { onSelect: _propTypes2['default'].func, onClick: _propTypes2['default'].func, onDeselect: _propTypes2['default'].func, onOpenChange: _propTypes2['default'].func, onDestroy: _propTypes2['default'].func, openTransitionName: _propTypes2['default'].string, openAnimation: _propTypes2['default'].oneOfType([_propTypes2['default'].string, _propTypes2['default'].object]), openKeys: _propTypes2['default'].arrayOf(_propTypes2['default'].string), visible: _propTypes2['default'].bool, children: _propTypes2['default'].any, parentMenu: _propTypes2['default'].object, eventKey: _propTypes2['default'].string, store: _propTypes2['default'].shape({ getState: _propTypes2['default'].func, setState: _propTypes2['default'].func }), // adding in refactor focusable: _propTypes2['default'].bool, multiple: _propTypes2['default'].bool, style: _propTypes2['default'].object, defaultActiveFirst: _propTypes2['default'].bool, activeKey: _propTypes2['default'].string, selectedKeys: _propTypes2['default'].arrayOf(_propTypes2['default'].string), defaultSelectedKeys: _propTypes2['default'].arrayOf(_propTypes2['default'].string), defaultOpenKeys: _propTypes2['default'].arrayOf(_propTypes2['default'].string), level: _propTypes2['default'].number, mode: _propTypes2['default'].oneOf(['horizontal', 'vertical', 'vertical-left', 'vertical-right', 'inline']), triggerSubMenuAction: _propTypes2['default'].oneOf(['click', 'hover']), inlineIndent: _propTypes2['default'].oneOfType([_propTypes2['default'].number, _propTypes2['default'].string]), manualRef: _propTypes2['default'].func, itemIcon: _propTypes2['default'].oneOfType([_propTypes2['default'].func, _propTypes2['default'].node]), expandIcon: _propTypes2['default'].oneOfType([_propTypes2['default'].func, _propTypes2['default'].node]) }; SubPopupMenu.defaultProps = { prefixCls: 'rc-menu', className: '', mode: 'vertical', level: 1, inlineIndent: 24, visible: true, focusable: true, style: {}, manualRef: _util.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 === _KeyCode2['default'].UP || keyCode === _KeyCode2['default'].DOWN) { activeItem = _this3.step(keyCode === _KeyCode2['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 = (0, _util.getKeyFromChildrenIndex)(child, props.eventKey, i); var childProps = child.props; var isActive = key === state.activeKey; var newChildProps = (0, _extends5['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 : (0, _createChainedFunction2['default'])(child.ref, saveRef.bind(_this3)), eventKey: key, active: !childProps.disabled && isActive, multiple: props.multiple, onClick: function onClick(e) { (childProps.onClick || _util.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); if (props.mode === 'inline') { newChildProps.triggerSubMenuAction = 'click'; } return _react2['default'].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 = (0, _miniStore.connect)()(SubPopupMenu); exports['default'] = connected; /***/ }), /* 238 */ /***/ (function(module, exports) { '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']; /***/ }), /* 239 */ /***/ (function(module, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = 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); } } }; } module.exports = exports['default']; /***/ }), /* 240 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; exports.setStyle = exports.getWidth = exports.menuAllProps = undefined; exports.noop = noop; exports.getKeyFromChildrenIndex = getKeyFromChildrenIndex; exports.getMenuIdFromSubMenuEventKey = getMenuIdFromSubMenuEventKey; exports.loopMenuItem = loopMenuItem; exports.loopMenuItemRecursively = loopMenuItemRecursively; var _react = __webpack_require__(4); 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; } }; /***/ }), /* 241 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; var _extends2 = __webpack_require__(145); var _extends3 = _interopRequireDefault(_extends2); var _objectWithoutProperties2 = __webpack_require__(184); var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); var _classCallCheck2 = __webpack_require__(185); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _possibleConstructorReturn2 = __webpack_require__(186); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(220); var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _reactDom = __webpack_require__(12); var _reactDom2 = _interopRequireDefault(_reactDom); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _resizeObserverPolyfill = __webpack_require__(242); var _resizeObserverPolyfill2 = _interopRequireDefault(_resizeObserverPolyfill); var _SubMenu = __webpack_require__(243); var _SubMenu2 = _interopRequireDefault(_SubMenu); var _util = __webpack_require__(240); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); var MENUITEM_OVERFLOWED_CLASSNAME = 'menuitem-overflowed'; // Fix ssr if (canUseDOM) { __webpack_require__(273); } var DOMWrap = function (_React$Component) { (0, _inherits3['default'])(DOMWrap, _React$Component); function DOMWrap() { var _temp, _this, _ret; (0, _classCallCheck3['default'])(this, DOMWrap); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = (0, _possibleConstructorReturn3['default'])(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = { lastVisibleIndex: undefined }, _this.getMenuItemNodes = function () { var prefixCls = _this.props.prefixCls; var ul = _reactDom2['default'].findDOMNode(_this); if (!ul) { return []; } // filter out all overflowed indicator placeholder return [].slice.call(ul.children).filter(function (node) { return node.className.split(' ').indexOf(prefixCls + '-overflowed-submenu') < 0; }); }, _this.getOverflowedSubMenuItem = function (keyPrefix, overflowedItems, renderPlaceholder) { var _this$props = _this.props, overflowedIndicator = _this$props.overflowedIndicator, level = _this$props.level, mode = _this$props.mode, prefixCls = _this$props.prefixCls, theme = _this$props.theme, propStyle = _this$props.style; if (level !== 1 || mode !== 'horizontal') { return null; } // put all the overflowed item inside a submenu // with a title of overflow indicator ('...') var copy = _this.props.children[0]; 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']); var style = (0, _extends3['default'])({}, propStyle); var key = keyPrefix + '-overflowed-indicator'; if (overflowedItems.length === 0 && renderPlaceholder !== true) { style = (0, _extends3['default'])({}, style, { display: 'none' }); } else if (renderPlaceholder) { style = (0, _extends3['default'])({}, style, { visibility: 'hidden', // prevent from taking normal dom space position: 'absolute' }); key = key + '-placeholder'; } var popupClassName = theme ? prefixCls + '-' + theme : ''; var props = {}; _util.menuAllProps.forEach(function (k) { if (rest[k] !== undefined) { props[k] = rest[k]; } }); return _react2['default'].createElement( _SubMenu2['default'], (0, _extends3['default'])({ title: overflowedIndicator, className: prefixCls + '-overflowed-submenu', popupClassName: popupClassName }, props, { key: key, eventKey: keyPrefix + '-overflowed-indicator', disabled: false, style: style }), overflowedItems ); }, _this.setChildrenWidthAndResize = function () { if (_this.props.mode !== 'horizontal') { return; } var ul = _reactDom2['default'].findDOMNode(_this); if (!ul) { return; } var ulChildrenNodes = ul.children; if (!ulChildrenNodes || ulChildrenNodes.length === 0) { return; } var lastOverflowedIndicatorPlaceholder = ul.children[ulChildrenNodes.length - 1]; // need last overflowed indicator for calculating length; (0, _util.setStyle)(lastOverflowedIndicatorPlaceholder, 'display', 'inline-block'); var menuItemNodes = _this.getMenuItemNodes(); // reset display attribute for all hidden elements caused by overflow to calculate updated width // and then reset to original state after width calculation var overflowedItems = menuItemNodes.filter(function (c) { return c.className.split(' ').indexOf(MENUITEM_OVERFLOWED_CLASSNAME) >= 0; }); overflowedItems.forEach(function (c) { (0, _util.setStyle)(c, 'display', 'inline-block'); }); _this.menuItemSizes = menuItemNodes.map(function (c) { return (0, _util.getWidth)(c); }); overflowedItems.forEach(function (c) { (0, _util.setStyle)(c, 'display', 'none'); }); _this.overflowedIndicatorWidth = (0, _util.getWidth)(ul.children[ul.children.length - 1]); _this.originalTotalWidth = _this.menuItemSizes.reduce(function (acc, cur) { return acc + cur; }, 0); _this.handleResize(); // prevent the overflowed indicator from taking space; (0, _util.setStyle)(lastOverflowedIndicatorPlaceholder, 'display', 'none'); }, _this.resizeObserver = null, _this.mutationObserver = null, _this.originalTotalWidth = 0, _this.overflowedItems = [], _this.menuItemSizes = [], _this.handleResize = function () { if (_this.props.mode !== 'horizontal') { return; } var ul = _reactDom2['default'].findDOMNode(_this); if (!ul) { return; } var width = (0, _util.getWidth)(ul); _this.overflowedItems = []; var currentSumWidth = 0; // index for last visible child in horizontal mode var lastVisibleIndex = undefined; if (_this.originalTotalWidth > width) { lastVisibleIndex = -1; _this.menuItemSizes.forEach(function (liWidth) { currentSumWidth += liWidth; if (currentSumWidth + _this.overflowedIndicatorWidth <= width) { lastVisibleIndex++; } }); } _this.setState({ lastVisibleIndex: lastVisibleIndex }); }, _temp), (0, _possibleConstructorReturn3['default'])(_this, _ret); } DOMWrap.prototype.componentDidMount = function componentDidMount() { var _this2 = this; this.setChildrenWidthAndResize(); if (this.props.level === 1 && this.props.mode === 'horizontal') { var menuUl = _reactDom2['default'].findDOMNode(this); if (!menuUl) { return; } this.resizeObserver = new _resizeObserverPolyfill2['default'](function (entries) { entries.forEach(_this2.setChildrenWidthAndResize); }); [].slice.call(menuUl.children).concat(menuUl).forEach(function (el) { _this2.resizeObserver.observe(el); }); if (typeof MutationObserver !== 'undefined') { this.mutationObserver = new MutationObserver(function () { _this2.resizeObserver.disconnect(); [].slice.call(menuUl.children).concat(menuUl).forEach(function (el) { _this2.resizeObserver.observe(el); }); _this2.setChildrenWidthAndResize(); }); this.mutationObserver.observe(menuUl, { attributes: false, childList: true, subTree: false }); } } }; DOMWrap.prototype.componentWillUnmount = function componentWillUnmount() { if (this.resizeObserver) { this.resizeObserver.disconnect(); } if (this.mutationObserver) { this.resizeObserver.disconnect(); } }; // get all valid menuItem nodes // memorize rendered menuSize // original scroll size of the list // copy of overflowed items // cache item of the original items (so we can track the size and order) DOMWrap.prototype.renderChildren = function renderChildren(children) { var _this3 = this; // need to take care of overflowed items in horizontal mode var lastVisibleIndex = this.state.lastVisibleIndex; return (children || []).reduce(function (acc, childNode, index) { var item = childNode; if (_this3.props.mode === 'horizontal') { var overflowed = _this3.getOverflowedSubMenuItem(childNode.props.eventKey, []); if (lastVisibleIndex !== undefined && _this3.props.className.indexOf(_this3.props.prefixCls + '-root') !== -1) { if (index > lastVisibleIndex) { item = _react2['default'].cloneElement(childNode, // 这里修改 eventKey 是为了防止隐藏状态下还会触发 openkeys 事件 { style: { display: 'none' }, eventKey: childNode.props.eventKey + '-hidden', className: childNode.className + ' ' + MENUITEM_OVERFLOWED_CLASSNAME }); } if (index === lastVisibleIndex + 1) { _this3.overflowedItems = children.slice(lastVisibleIndex + 1).map(function (c) { return _react2['default'].cloneElement(c, // children[index].key will become '.$key' in clone by default, // we have to overwrite with the correct key explicitly { key: c.props.eventKey, mode: 'vertical-left' }); }); overflowed = _this3.getOverflowedSubMenuItem(childNode.props.eventKey, _this3.overflowedItems); } } var ret = [].concat(acc, [overflowed, item]); if (index === children.length - 1) { // need a placeholder for calculating overflowed indicator width ret.push(_this3.getOverflowedSubMenuItem(childNode.props.eventKey, [], true)); } return ret; } return [].concat(acc, [item]); }, []); }; DOMWrap.prototype.render = function render() { var _props = this.props, hiddenClassName = _props.hiddenClassName, visible = _props.visible, prefixCls = _props.prefixCls, overflowedIndicator = _props.overflowedIndicator, mode = _props.mode, level = _props.level, Tag = _props.tag, children = _props.children, theme = _props.theme, rest = (0, _objectWithoutProperties3['default'])(_props, ['hiddenClassName', 'visible', 'prefixCls', 'overflowedIndicator', 'mode', 'level', 'tag', 'children', 'theme']); if (!visible) { rest.className += ' ' + hiddenClassName; } return _react2['default'].createElement( Tag, rest, this.renderChildren(this.props.children) ); }; return DOMWrap; }(_react2['default'].Component); DOMWrap.propTypes = { className: _propTypes2['default'].string, children: _propTypes2['default'].node, mode: _propTypes2['default'].oneOf(['horizontal', 'vertical', 'vertical-left', 'vertical-right', 'inline']), prefixCls: _propTypes2['default'].string, level: _propTypes2['default'].number, theme: _propTypes2['default'].string, overflowedIndicator: _propTypes2['default'].node, visible: _propTypes2['default'].bool, hiddenClassName: _propTypes2['default'].string, tag: _propTypes2['default'].string, style: _propTypes2['default'].object }; DOMWrap.defaultProps = { tag: 'div', className: '' }; exports['default'] = DOMWrap; module.exports = exports['default']; /***/ }), /* 242 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {(function (global, factory) { true ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global.ResizeObserver = factory()); }(this, (function () { 'use strict'; /** * A collection of shims that provide minimal functionality of the ES6 collections. * * These implementations are not meant to be used outside of the ResizeObserver * modules as they cover only a limited range of use cases. */ /* eslint-disable require-jsdoc, valid-jsdoc */ var MapShim = (function () { if (typeof Map !== 'undefined') { return Map; } /** * Returns index in provided array that matches the specified key. * * @param {Array} arr * @param {*} key * @returns {number} */ function getIndex(arr, key) { var result = -1; arr.some(function (entry, index) { if (entry[0] === key) { result = index; return true; } return false; }); return result; } return /** @class */ (function () { function class_1() { this.__entries__ = []; } Object.defineProperty(class_1.prototype, "size", { /** * @returns {boolean} */ get: function () { return this.__entries__.length; }, enumerable: true, configurable: true }); /** * @param {*} key * @returns {*} */ class_1.prototype.get = function (key) { var index = getIndex(this.__entries__, key); var entry = this.__entries__[index]; return entry && entry[1]; }; /** * @param {*} key * @param {*} value * @returns {void} */ class_1.prototype.set = function (key, value) { var index = getIndex(this.__entries__, key); if (~index) { this.__entries__[index][1] = value; } else { this.__entries__.push([key, value]); } }; /** * @param {*} key * @returns {void} */ class_1.prototype.delete = function (key) { var entries = this.__entries__; var index = getIndex(entries, key); if (~index) { entries.splice(index, 1); } }; /** * @param {*} key * @returns {void} */ class_1.prototype.has = function (key) { return !!~getIndex(this.__entries__, key); }; /** * @returns {void} */ class_1.prototype.clear = function () { this.__entries__.splice(0); }; /** * @param {Function} callback * @param {*} [ctx=null] * @returns {void} */ class_1.prototype.forEach = function (callback, ctx) { if (ctx === void 0) { ctx = null; } for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) { var entry = _a[_i]; callback.call(ctx, entry[1], entry[0]); } }; return class_1; }()); })(); /** * Detects whether window and document objects are available in current environment. */ var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document; // Returns global object of a current environment. var global$1 = (function () { if (typeof global !== 'undefined' && global.Math === Math) { return global; } if (typeof self !== 'undefined' && self.Math === Math) { return self; } if (typeof window !== 'undefined' && window.Math === Math) { return window; } // eslint-disable-next-line no-new-func return Function('return this')(); })(); /** * A shim for the requestAnimationFrame which falls back to the setTimeout if * first one is not supported. * * @returns {number} Requests' identifier. */ var requestAnimationFrame$1 = (function () { if (typeof requestAnimationFrame === 'function') { // It's required to use a bounded function because IE sometimes throws // an "Invalid calling object" error if rAF is invoked without the global // object on the left hand side. return requestAnimationFrame.bind(global$1); } return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); }; })(); // Defines minimum timeout before adding a trailing call. var trailingTimeout = 2; /** * Creates a wrapper function which ensures that provided callback will be * invoked only once during the specified delay period. * * @param {Function} callback - Function to be invoked after the delay period. * @param {number} delay - Delay after which to invoke callback. * @returns {Function} */ function throttle (callback, delay) { var leadingCall = false, trailingCall = false, lastCallTime = 0; /** * Invokes the original callback function and schedules new invocation if * the "proxy" was called during current request. * * @returns {void} */ function resolvePending() { if (leadingCall) { leadingCall = false; callback(); } if (trailingCall) { proxy(); } } /** * Callback invoked after the specified delay. It will further postpone * invocation of the original function delegating it to the * requestAnimationFrame. * * @returns {void} */ function timeoutCallback() { requestAnimationFrame$1(resolvePending); } /** * Schedules invocation of the original function. * * @returns {void} */ function proxy() { var timeStamp = Date.now(); if (leadingCall) { // Reject immediately following calls. if (timeStamp - lastCallTime < trailingTimeout) { return; } // Schedule new call to be in invoked when the pending one is resolved. // This is important for "transitions" which never actually start // immediately so there is a chance that we might miss one if change // happens amids the pending invocation. trailingCall = true; } else { leadingCall = true; trailingCall = false; setTimeout(timeoutCallback, delay); } lastCallTime = timeStamp; } return proxy; } // Minimum delay before invoking the update of observers. var REFRESH_DELAY = 20; // A list of substrings of CSS properties used to find transition events that // might affect dimensions of observed elements. var transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight']; // Check if MutationObserver is available. var mutationObserverSupported = typeof MutationObserver !== 'undefined'; /** * Singleton controller class which handles updates of ResizeObserver instances. */ var ResizeObserverController = /** @class */ (function () { /** * Creates a new instance of ResizeObserverController. * * @private */ function ResizeObserverController() { /** * Indicates whether DOM listeners have been added. * * @private {boolean} */ this.connected_ = false; /** * Tells that controller has subscribed for Mutation Events. * * @private {boolean} */ this.mutationEventsAdded_ = false; /** * Keeps reference to the instance of MutationObserver. * * @private {MutationObserver} */ this.mutationsObserver_ = null; /** * A list of connected observers. * * @private {Array} */ this.observers_ = []; this.onTransitionEnd_ = this.onTransitionEnd_.bind(this); this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY); } /** * Adds observer to observers list. * * @param {ResizeObserverSPI} observer - Observer to be added. * @returns {void} */ ResizeObserverController.prototype.addObserver = function (observer) { if (!~this.observers_.indexOf(observer)) { this.observers_.push(observer); } // Add listeners if they haven't been added yet. if (!this.connected_) { this.connect_(); } }; /** * Removes observer from observers list. * * @param {ResizeObserverSPI} observer - Observer to be removed. * @returns {void} */ ResizeObserverController.prototype.removeObserver = function (observer) { var observers = this.observers_; var index = observers.indexOf(observer); // Remove observer if it's present in registry. if (~index) { observers.splice(index, 1); } // Remove listeners if controller has no connected observers. if (!observers.length && this.connected_) { this.disconnect_(); } }; /** * Invokes the update of observers. It will continue running updates insofar * it detects changes. * * @returns {void} */ ResizeObserverController.prototype.refresh = function () { var changesDetected = this.updateObservers_(); // Continue running updates if changes have been detected as there might // be future ones caused by CSS transitions. if (changesDetected) { this.refresh(); } }; /** * Updates every observer from observers list and notifies them of queued * entries. * * @private * @returns {boolean} Returns "true" if any observer has detected changes in * dimensions of it's elements. */ ResizeObserverController.prototype.updateObservers_ = function () { // Collect observers that have active observations. var activeObservers = this.observers_.filter(function (observer) { return observer.gatherActive(), observer.hasActive(); }); // Deliver notifications in a separate cycle in order to avoid any // collisions between observers, e.g. when multiple instances of // ResizeObserver are tracking the same element and the callback of one // of them changes content dimensions of the observed target. Sometimes // this may result in notifications being blocked for the rest of observers. activeObservers.forEach(function (observer) { return observer.broadcastActive(); }); return activeObservers.length > 0; }; /** * Initializes DOM listeners. * * @private * @returns {void} */ ResizeObserverController.prototype.connect_ = function () { // Do nothing if running in a non-browser environment or if listeners // have been already added. if (!isBrowser || this.connected_) { return; } // Subscription to the "Transitionend" event is used as a workaround for // delayed transitions. This way it's possible to capture at least the // final state of an element. document.addEventListener('transitionend', this.onTransitionEnd_); window.addEventListener('resize', this.refresh); if (mutationObserverSupported) { this.mutationsObserver_ = new MutationObserver(this.refresh); this.mutationsObserver_.observe(document, { attributes: true, childList: true, characterData: true, subtree: true }); } else { document.addEventListener('DOMSubtreeModified', this.refresh); this.mutationEventsAdded_ = true; } this.connected_ = true; }; /** * Removes DOM listeners. * * @private * @returns {void} */ ResizeObserverController.prototype.disconnect_ = function () { // Do nothing if running in a non-browser environment or if listeners // have been already removed. if (!isBrowser || !this.connected_) { return; } document.removeEventListener('transitionend', this.onTransitionEnd_); window.removeEventListener('resize', this.refresh); if (this.mutationsObserver_) { this.mutationsObserver_.disconnect(); } if (this.mutationEventsAdded_) { document.removeEventListener('DOMSubtreeModified', this.refresh); } this.mutationsObserver_ = null; this.mutationEventsAdded_ = false; this.connected_ = false; }; /** * "Transitionend" event handler. * * @private * @param {TransitionEvent} event * @returns {void} */ ResizeObserverController.prototype.onTransitionEnd_ = function (_a) { var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b; // Detect whether transition may affect dimensions of an element. var isReflowProperty = transitionKeys.some(function (key) { return !!~propertyName.indexOf(key); }); if (isReflowProperty) { this.refresh(); } }; /** * Returns instance of the ResizeObserverController. * * @returns {ResizeObserverController} */ ResizeObserverController.getInstance = function () { if (!this.instance_) { this.instance_ = new ResizeObserverController(); } return this.instance_; }; /** * Holds reference to the controller's instance. * * @private {ResizeObserverController} */ ResizeObserverController.instance_ = null; return ResizeObserverController; }()); /** * Defines non-writable/enumerable properties of the provided target object. * * @param {Object} target - Object for which to define properties. * @param {Object} props - Properties to be defined. * @returns {Object} Target object. */ var defineConfigurable = (function (target, props) { for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) { var key = _a[_i]; Object.defineProperty(target, key, { value: props[key], enumerable: false, writable: false, configurable: true }); } return target; }); /** * Returns the global object associated with provided element. * * @param {Object} target * @returns {Object} */ var getWindowOf = (function (target) { // Assume that the element is an instance of Node, which means that it // has the "ownerDocument" property from which we can retrieve a // corresponding global object. var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView; // Return the local global object if it's not possible extract one from // provided element. return ownerGlobal || global$1; }); // Placeholder of an empty content rectangle. var emptyRect = createRectInit(0, 0, 0, 0); /** * Converts provided string to a number. * * @param {number|string} value * @returns {number} */ function toFloat(value) { return parseFloat(value) || 0; } /** * Extracts borders size from provided styles. * * @param {CSSStyleDeclaration} styles * @param {...string} positions - Borders positions (top, right, ...) * @returns {number} */ function getBordersSize(styles) { var positions = []; for (var _i = 1; _i < arguments.length; _i++) { positions[_i - 1] = arguments[_i]; } return positions.reduce(function (size, position) { var value = styles['border-' + position + '-width']; return size + toFloat(value); }, 0); } /** * Extracts paddings sizes from provided styles. * * @param {CSSStyleDeclaration} styles * @returns {Object} Paddings box. */ function getPaddings(styles) { var positions = ['top', 'right', 'bottom', 'left']; var paddings = {}; for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) { var position = positions_1[_i]; var value = styles['padding-' + position]; paddings[position] = toFloat(value); } return paddings; } /** * Calculates content rectangle of provided SVG element. * * @param {SVGGraphicsElement} target - Element content rectangle of which needs * to be calculated. * @returns {DOMRectInit} */ function getSVGContentRect(target) { var bbox = target.getBBox(); return createRectInit(0, 0, bbox.width, bbox.height); } /** * Calculates content rectangle of provided HTMLElement. * * @param {HTMLElement} target - Element for which to calculate the content rectangle. * @returns {DOMRectInit} */ function getHTMLElementContentRect(target) { // Client width & height properties can't be // used exclusively as they provide rounded values. var clientWidth = target.clientWidth, clientHeight = target.clientHeight; // By this condition we can catch all non-replaced inline, hidden and // detached elements. Though elements with width & height properties less // than 0.5 will be discarded as well. // // Without it we would need to implement separate methods for each of // those cases and it's not possible to perform a precise and performance // effective test for hidden elements. E.g. even jQuery's ':visible' filter // gives wrong results for elements with width & height less than 0.5. if (!clientWidth && !clientHeight) { return emptyRect; } var styles = getWindowOf(target).getComputedStyle(target); var paddings = getPaddings(styles); var horizPad = paddings.left + paddings.right; var vertPad = paddings.top + paddings.bottom; // Computed styles of width & height are being used because they are the // only dimensions available to JS that contain non-rounded values. It could // be possible to utilize the getBoundingClientRect if only it's data wasn't // affected by CSS transformations let alone paddings, borders and scroll bars. var width = toFloat(styles.width), height = toFloat(styles.height); // Width & height include paddings and borders when the 'border-box' box // model is applied (except for IE). if (styles.boxSizing === 'border-box') { // Following conditions are required to handle Internet Explorer which // doesn't include paddings and borders to computed CSS dimensions. // // We can say that if CSS dimensions + paddings are equal to the "client" // properties then it's either IE, and thus we don't need to subtract // anything, or an element merely doesn't have paddings/borders styles. if (Math.round(width + horizPad) !== clientWidth) { width -= getBordersSize(styles, 'left', 'right') + horizPad; } if (Math.round(height + vertPad) !== clientHeight) { height -= getBordersSize(styles, 'top', 'bottom') + vertPad; } } // Following steps can't be applied to the document's root element as its // client[Width/Height] properties represent viewport area of the window. // Besides, it's as well not necessary as the itself neither has // rendered scroll bars nor it can be clipped. if (!isDocumentElement(target)) { // In some browsers (only in Firefox, actually) CSS width & height // include scroll bars size which can be removed at this step as scroll // bars are the only difference between rounded dimensions + paddings // and "client" properties, though that is not always true in Chrome. var vertScrollbar = Math.round(width + horizPad) - clientWidth; var horizScrollbar = Math.round(height + vertPad) - clientHeight; // Chrome has a rather weird rounding of "client" properties. // E.g. for an element with content width of 314.2px it sometimes gives // the client width of 315px and for the width of 314.7px it may give // 314px. And it doesn't happen all the time. So just ignore this delta // as a non-relevant. if (Math.abs(vertScrollbar) !== 1) { width -= vertScrollbar; } if (Math.abs(horizScrollbar) !== 1) { height -= horizScrollbar; } } return createRectInit(paddings.left, paddings.top, width, height); } /** * Checks whether provided element is an instance of the SVGGraphicsElement. * * @param {Element} target - Element to be checked. * @returns {boolean} */ var isSVGGraphicsElement = (function () { // Some browsers, namely IE and Edge, don't have the SVGGraphicsElement // interface. if (typeof SVGGraphicsElement !== 'undefined') { return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; }; } // If it's so, then check that element is at least an instance of the // SVGElement and that it has the "getBBox" method. // eslint-disable-next-line no-extra-parens return function (target) { return (target instanceof getWindowOf(target).SVGElement && typeof target.getBBox === 'function'); }; })(); /** * Checks whether provided element is a document element (). * * @param {Element} target - Element to be checked. * @returns {boolean} */ function isDocumentElement(target) { return target === getWindowOf(target).document.documentElement; } /** * Calculates an appropriate content rectangle for provided html or svg element. * * @param {Element} target - Element content rectangle of which needs to be calculated. * @returns {DOMRectInit} */ function getContentRect(target) { if (!isBrowser) { return emptyRect; } if (isSVGGraphicsElement(target)) { return getSVGContentRect(target); } return getHTMLElementContentRect(target); } /** * Creates rectangle with an interface of the DOMRectReadOnly. * Spec: https://drafts.fxtf.org/geometry/#domrectreadonly * * @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions. * @returns {DOMRectReadOnly} */ function createReadOnlyRect(_a) { var x = _a.x, y = _a.y, width = _a.width, height = _a.height; // If DOMRectReadOnly is available use it as a prototype for the rectangle. var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object; var rect = Object.create(Constr.prototype); // Rectangle's properties are not writable and non-enumerable. defineConfigurable(rect, { x: x, y: y, width: width, height: height, top: y, right: x + width, bottom: height + y, left: x }); return rect; } /** * Creates DOMRectInit object based on the provided dimensions and the x/y coordinates. * Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit * * @param {number} x - X coordinate. * @param {number} y - Y coordinate. * @param {number} width - Rectangle's width. * @param {number} height - Rectangle's height. * @returns {DOMRectInit} */ function createRectInit(x, y, width, height) { return { x: x, y: y, width: width, height: height }; } /** * Class that is responsible for computations of the content rectangle of * provided DOM element and for keeping track of it's changes. */ var ResizeObservation = /** @class */ (function () { /** * Creates an instance of ResizeObservation. * * @param {Element} target - Element to be observed. */ function ResizeObservation(target) { /** * Broadcasted width of content rectangle. * * @type {number} */ this.broadcastWidth = 0; /** * Broadcasted height of content rectangle. * * @type {number} */ this.broadcastHeight = 0; /** * Reference to the last observed content rectangle. * * @private {DOMRectInit} */ this.contentRect_ = createRectInit(0, 0, 0, 0); this.target = target; } /** * Updates content rectangle and tells whether it's width or height properties * have changed since the last broadcast. * * @returns {boolean} */ ResizeObservation.prototype.isActive = function () { var rect = getContentRect(this.target); this.contentRect_ = rect; return (rect.width !== this.broadcastWidth || rect.height !== this.broadcastHeight); }; /** * Updates 'broadcastWidth' and 'broadcastHeight' properties with a data * from the corresponding properties of the last observed content rectangle. * * @returns {DOMRectInit} Last observed content rectangle. */ ResizeObservation.prototype.broadcastRect = function () { var rect = this.contentRect_; this.broadcastWidth = rect.width; this.broadcastHeight = rect.height; return rect; }; return ResizeObservation; }()); var ResizeObserverEntry = /** @class */ (function () { /** * Creates an instance of ResizeObserverEntry. * * @param {Element} target - Element that is being observed. * @param {DOMRectInit} rectInit - Data of the element's content rectangle. */ function ResizeObserverEntry(target, rectInit) { var contentRect = createReadOnlyRect(rectInit); // According to the specification following properties are not writable // and are also not enumerable in the native implementation. // // Property accessors are not being used as they'd require to define a // private WeakMap storage which may cause memory leaks in browsers that // don't support this type of collections. defineConfigurable(this, { target: target, contentRect: contentRect }); } return ResizeObserverEntry; }()); var ResizeObserverSPI = /** @class */ (function () { /** * Creates a new instance of ResizeObserver. * * @param {ResizeObserverCallback} callback - Callback function that is invoked * when one of the observed elements changes it's content dimensions. * @param {ResizeObserverController} controller - Controller instance which * is responsible for the updates of observer. * @param {ResizeObserver} callbackCtx - Reference to the public * ResizeObserver instance which will be passed to callback function. */ function ResizeObserverSPI(callback, controller, callbackCtx) { /** * Collection of resize observations that have detected changes in dimensions * of elements. * * @private {Array} */ this.activeObservations_ = []; /** * Registry of the ResizeObservation instances. * * @private {Map} */ this.observations_ = new MapShim(); if (typeof callback !== 'function') { throw new TypeError('The callback provided as parameter 1 is not a function.'); } this.callback_ = callback; this.controller_ = controller; this.callbackCtx_ = callbackCtx; } /** * Starts observing provided element. * * @param {Element} target - Element to be observed. * @returns {void} */ ResizeObserverSPI.prototype.observe = function (target) { if (!arguments.length) { throw new TypeError('1 argument required, but only 0 present.'); } // Do nothing if current environment doesn't have the Element interface. if (typeof Element === 'undefined' || !(Element instanceof Object)) { return; } if (!(target instanceof getWindowOf(target).Element)) { throw new TypeError('parameter 1 is not of type "Element".'); } var observations = this.observations_; // Do nothing if element is already being observed. if (observations.has(target)) { return; } observations.set(target, new ResizeObservation(target)); this.controller_.addObserver(this); // Force the update of observations. this.controller_.refresh(); }; /** * Stops observing provided element. * * @param {Element} target - Element to stop observing. * @returns {void} */ ResizeObserverSPI.prototype.unobserve = function (target) { if (!arguments.length) { throw new TypeError('1 argument required, but only 0 present.'); } // Do nothing if current environment doesn't have the Element interface. if (typeof Element === 'undefined' || !(Element instanceof Object)) { return; } if (!(target instanceof getWindowOf(target).Element)) { throw new TypeError('parameter 1 is not of type "Element".'); } var observations = this.observations_; // Do nothing if element is not being observed. if (!observations.has(target)) { return; } observations.delete(target); if (!observations.size) { this.controller_.removeObserver(this); } }; /** * Stops observing all elements. * * @returns {void} */ ResizeObserverSPI.prototype.disconnect = function () { this.clearActive(); this.observations_.clear(); this.controller_.removeObserver(this); }; /** * Collects observation instances the associated element of which has changed * it's content rectangle. * * @returns {void} */ ResizeObserverSPI.prototype.gatherActive = function () { var _this = this; this.clearActive(); this.observations_.forEach(function (observation) { if (observation.isActive()) { _this.activeObservations_.push(observation); } }); }; /** * Invokes initial callback function with a list of ResizeObserverEntry * instances collected from active resize observations. * * @returns {void} */ ResizeObserverSPI.prototype.broadcastActive = function () { // Do nothing if observer doesn't have active observations. if (!this.hasActive()) { return; } var ctx = this.callbackCtx_; // Create ResizeObserverEntry instance for every active observation. var entries = this.activeObservations_.map(function (observation) { return new ResizeObserverEntry(observation.target, observation.broadcastRect()); }); this.callback_.call(ctx, entries, ctx); this.clearActive(); }; /** * Clears the collection of active observations. * * @returns {void} */ ResizeObserverSPI.prototype.clearActive = function () { this.activeObservations_.splice(0); }; /** * Tells whether observer has active observations. * * @returns {boolean} */ ResizeObserverSPI.prototype.hasActive = function () { return this.activeObservations_.length > 0; }; return ResizeObserverSPI; }()); // Registry of internal observers. If WeakMap is not available use current shim // for the Map collection as it has all required methods and because WeakMap // can't be fully polyfilled anyway. var observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim(); /** * ResizeObserver API. Encapsulates the ResizeObserver SPI implementation * exposing only those methods and properties that are defined in the spec. */ var ResizeObserver = /** @class */ (function () { /** * Creates a new instance of ResizeObserver. * * @param {ResizeObserverCallback} callback - Callback that is invoked when * dimensions of the observed elements change. */ function ResizeObserver(callback) { if (!(this instanceof ResizeObserver)) { throw new TypeError('Cannot call a class as a function.'); } if (!arguments.length) { throw new TypeError('1 argument required, but only 0 present.'); } var controller = ResizeObserverController.getInstance(); var observer = new ResizeObserverSPI(callback, controller, this); observers.set(this, observer); } return ResizeObserver; }()); // Expose public methods of ResizeObserver. [ 'observe', 'unobserve', 'disconnect' ].forEach(function (method) { ResizeObserver.prototype[method] = function () { var _a; return (_a = observers.get(this))[method].apply(_a, arguments); }; }); var index = (function () { // Export existing implementation if available. if (typeof global$1.ResizeObserver !== 'undefined') { return global$1.ResizeObserver; } return ResizeObserver; })(); return index; }))); /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()))) /***/ }), /* 243 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; exports.SubMenu = undefined; var _classCallCheck2 = __webpack_require__(185); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _possibleConstructorReturn2 = __webpack_require__(186); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(220); var _inherits3 = _interopRequireDefault(_inherits2); var _extends3 = __webpack_require__(145); var _extends4 = _interopRequireDefault(_extends3); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _reactDom = __webpack_require__(12); var _reactDom2 = _interopRequireDefault(_reactDom); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _rcTrigger = __webpack_require__(244); var _rcTrigger2 = _interopRequireDefault(_rcTrigger); var _KeyCode = __webpack_require__(238); var _KeyCode2 = _interopRequireDefault(_KeyCode); var _classnames = __webpack_require__(3); var _classnames2 = _interopRequireDefault(_classnames); var _miniStore = __webpack_require__(228); var _SubPopupMenu = __webpack_require__(237); var _SubPopupMenu2 = _interopRequireDefault(_SubPopupMenu); var _placements = __webpack_require__(272); var _placements2 = _interopRequireDefault(_placements); var _rcAnimate = __webpack_require__(261); var _rcAnimate2 = _interopRequireDefault(_rcAnimate); var _util = __webpack_require__(240); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } 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 = (0, _util.getMenuIdFromSubMenuEventKey)(eventKey); var state = store.getState(); store.setState({ defaultActiveFirst: (0, _extends4['default'])({}, state.defaultActiveFirst, (_extends2 = {}, _extends2[menuId] = defaultActiveFirst, _extends2)) }); }; var SubMenu = exports.SubMenu = function (_React$Component) { (0, _inherits3['default'])(SubMenu, _React$Component); function SubMenu(props) { (0, _classCallCheck3['default'])(this, SubMenu); var _this = (0, _possibleConstructorReturn3['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[(0, _util.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 _react2['default'].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 = (0, _extends4['default'])({}, baseProps.openAnimation); if (!transitionAppear) { delete animProps.animation.appear; } } return _react2['default'].createElement( _rcAnimate2['default'], (0, _extends4['default'])({}, animProps, { showProp: 'visible', component: '', transitionAppear: transitionAppear }), _react2['default'].createElement( _SubPopupMenu2['default'], (0, _extends4['default'])({}, baseProps, { id: this._menuId }), children ) ); }; SubMenu.prototype.render = function render() { var _classNames; var props = (0, _extends4['default'])({}, this.props); var isOpen = props.isOpen; var prefixCls = this.getPrefixCls(); var isInlineMode = props.mode === 'inline'; var className = (0, _classnames2['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 = _react2['default'].createElement(this.props.expandIcon, (0, _extends4['default'])({}, this.props)); } } var title = _react2['default'].createElement( 'div', (0, _extends4['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 || _react2['default'].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; _util.menuAllProps.forEach(function (key) { return delete props[key]; }); // Set onClick to null, to ignore propagated onClick event delete props.onClick; return _react2['default'].createElement( 'li', (0, _extends4['default'])({}, props, mouseEvents, { className: className, role: 'menuitem' }), isInlineMode && title, isInlineMode && children, !isInlineMode && _react2['default'].createElement( _rcTrigger2['default'], { prefixCls: prefixCls, popupClassName: prefixCls + '-popup ' + popupClassName, getPopupContainer: getPopupContainer, builtinPlacements: (0, _extends4['default'])({}, _placements2['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; }(_react2['default'].Component); SubMenu.propTypes = { parentMenu: _propTypes2['default'].object, title: _propTypes2['default'].node, children: _propTypes2['default'].any, selectedKeys: _propTypes2['default'].array, openKeys: _propTypes2['default'].array, onClick: _propTypes2['default'].func, onOpenChange: _propTypes2['default'].func, rootPrefixCls: _propTypes2['default'].string, eventKey: _propTypes2['default'].string, multiple: _propTypes2['default'].bool, active: _propTypes2['default'].bool, // TODO: remove onItemHover: _propTypes2['default'].func, onSelect: _propTypes2['default'].func, triggerSubMenuAction: _propTypes2['default'].string, onDeselect: _propTypes2['default'].func, onDestroy: _propTypes2['default'].func, onMouseEnter: _propTypes2['default'].func, onMouseLeave: _propTypes2['default'].func, onTitleMouseEnter: _propTypes2['default'].func, onTitleMouseLeave: _propTypes2['default'].func, onTitleClick: _propTypes2['default'].func, popupOffset: _propTypes2['default'].array, isOpen: _propTypes2['default'].bool, store: _propTypes2['default'].object, mode: _propTypes2['default'].oneOf(['horizontal', 'vertical', 'vertical-left', 'vertical-right', 'inline']), manualRef: _propTypes2['default'].func, itemIcon: _propTypes2['default'].oneOfType([_propTypes2['default'].func, _propTypes2['default'].node]), expandIcon: _propTypes2['default'].oneOfType([_propTypes2['default'].func, _propTypes2['default'].node]) }; SubMenu.defaultProps = { onMouseEnter: _util.noop, onMouseLeave: _util.noop, onTitleMouseEnter: _util.noop, onTitleMouseLeave: _util.noop, onTitleClick: _util.noop, manualRef: _util.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 === _KeyCode2['default'].ENTER) { _this3.onTitleClick(e); updateDefaultActiveFirst(store, _this3.props.eventKey, true); return true; } if (keyCode === _KeyCode2['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 === _KeyCode2['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 === _KeyCode2['default'].UP || keyCode === _KeyCode2['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 (0, _extends4['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 }; (0, _util.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 = _reactDom2['default'].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 = (0, _miniStore.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; exports['default'] = connected; /***/ }), /* 244 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends2 = __webpack_require__(145); var _extends3 = _interopRequireDefault(_extends2); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _reactDom = __webpack_require__(12); var _createReactClass = __webpack_require__(245); var _createReactClass2 = _interopRequireDefault(_createReactClass); var _contains = __webpack_require__(251); var _contains2 = _interopRequireDefault(_contains); var _addEventListener = __webpack_require__(252); var _addEventListener2 = _interopRequireDefault(_addEventListener); var _Popup = __webpack_require__(253); var _Popup2 = _interopRequireDefault(_Popup); var _utils = __webpack_require__(270); var _getContainerRenderMixin = __webpack_require__(271); var _getContainerRenderMixin2 = _interopRequireDefault(_getContainerRenderMixin); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function noop() {} function returnEmptyString() { return ''; } function returnDocument() { return window.document; } var isMobile = typeof navigator !== 'undefined' && !!navigator.userAgent.match(/(Android|iPhone|iPad|iPod|iOS|UCWEB)/i); var ALL_HANDLERS = ['onClick', 'onMouseDown', 'onTouchStart', 'onMouseEnter', 'onMouseLeave', 'onFocus', 'onBlur']; var Trigger = (0, _createReactClass2['default'])({ displayName: 'Trigger', propTypes: { children: _propTypes2['default'].any, action: _propTypes2['default'].oneOfType([_propTypes2['default'].string, _propTypes2['default'].arrayOf(_propTypes2['default'].string)]), showAction: _propTypes2['default'].any, hideAction: _propTypes2['default'].any, getPopupClassNameFromAlign: _propTypes2['default'].any, onPopupVisibleChange: _propTypes2['default'].func, afterPopupVisibleChange: _propTypes2['default'].func, popup: _propTypes2['default'].oneOfType([_propTypes2['default'].node, _propTypes2['default'].func]).isRequired, popupStyle: _propTypes2['default'].object, prefixCls: _propTypes2['default'].string, popupClassName: _propTypes2['default'].string, popupPlacement: _propTypes2['default'].string, builtinPlacements: _propTypes2['default'].object, popupTransitionName: _propTypes2['default'].oneOfType([_propTypes2['default'].string, _propTypes2['default'].object]), popupAnimation: _propTypes2['default'].any, mouseEnterDelay: _propTypes2['default'].number, mouseLeaveDelay: _propTypes2['default'].number, zIndex: _propTypes2['default'].number, focusDelay: _propTypes2['default'].number, blurDelay: _propTypes2['default'].number, getPopupContainer: _propTypes2['default'].func, getDocument: _propTypes2['default'].func, destroyPopupOnHide: _propTypes2['default'].bool, mask: _propTypes2['default'].bool, maskClosable: _propTypes2['default'].bool, onPopupAlign: _propTypes2['default'].func, popupAlign: _propTypes2['default'].object, popupVisible: _propTypes2['default'].bool, maskTransitionName: _propTypes2['default'].oneOfType([_propTypes2['default'].string, _propTypes2['default'].object]), maskAnimation: _propTypes2['default'].string }, mixins: [(0, _getContainerRenderMixin2['default'])({ autoMount: false, isVisible: function isVisible(instance) { return instance.state.popupVisible; }, getContainer: function getContainer(instance) { var props = instance.props; var popupContainer = document.createElement('div'); // Make sure default popup container will never cause scrollbar appearing // https://github.com/react-component/trigger/issues/41 popupContainer.style.position = 'absolute'; popupContainer.style.top = '0'; popupContainer.style.left = '0'; popupContainer.style.width = '100%'; var mountNode = props.getPopupContainer ? props.getPopupContainer((0, _reactDom.findDOMNode)(instance)) : props.getDocument().body; mountNode.appendChild(popupContainer); return popupContainer; } })], getDefaultProps: function getDefaultProps() { return { prefixCls: 'rc-trigger-popup', getPopupClassNameFromAlign: returnEmptyString, getDocument: returnDocument, onPopupVisibleChange: noop, afterPopupVisibleChange: noop, onPopupAlign: noop, popupClassName: '', mouseEnterDelay: 0, mouseLeaveDelay: 0.1, focusDelay: 0, blurDelay: 0.15, popupStyle: {}, destroyPopupOnHide: false, popupAlign: {}, defaultPopupVisible: false, mask: false, maskClosable: true, action: [], showAction: [], hideAction: [] }; }, getInitialState: function getInitialState() { var props = this.props; var popupVisible = void 0; if ('popupVisible' in props) { popupVisible = !!props.popupVisible; } else { popupVisible = !!props.defaultPopupVisible; } return { popupVisible: popupVisible }; }, componentWillMount: function componentWillMount() { var _this = this; ALL_HANDLERS.forEach(function (h) { _this['fire' + h] = function (e) { _this.fireEvents(h, e); }; }); }, componentDidMount: function componentDidMount() { this.componentDidUpdate({}, { popupVisible: this.state.popupVisible }); }, componentWillReceiveProps: function componentWillReceiveProps(_ref) { var popupVisible = _ref.popupVisible; if (popupVisible !== undefined) { this.setState({ popupVisible: popupVisible }); } }, componentDidUpdate: function componentDidUpdate(_, prevState) { var props = this.props; var state = this.state; this.renderComponent(null, function () { if (prevState.popupVisible !== state.popupVisible) { props.afterPopupVisibleChange(state.popupVisible); } }); // We must listen to `mousedown`, edge case: // https://github.com/ant-design/ant-design/issues/5804 // https://github.com/react-component/calendar/issues/250 // https://github.com/react-component/trigger/issues/50 if (state.popupVisible) { var currentDocument = void 0; if (!this.clickOutsideHandler && this.isClickToHide()) { currentDocument = props.getDocument(); this.clickOutsideHandler = (0, _addEventListener2['default'])(currentDocument, 'mousedown', this.onDocumentClick); } // always hide on mobile // `isMobile` fix: mask clicked will cause below element events triggered // https://github.com/ant-design/ant-design-mobile/issues/1909 // https://github.com/ant-design/ant-design-mobile/issues/1928 if (!this.touchOutsideHandler && isMobile) { currentDocument = currentDocument || props.getDocument(); this.touchOutsideHandler = (0, _addEventListener2['default'])(currentDocument, 'click', this.onDocumentClick); } return; } this.clearOutsideHandler(); }, componentWillUnmount: function componentWillUnmount() { this.clearDelayTimer(); this.clearOutsideHandler(); }, onMouseEnter: function onMouseEnter(e) { this.fireEvents('onMouseEnter', e); this.delaySetPopupVisible(true, this.props.mouseEnterDelay); }, onMouseLeave: function onMouseLeave(e) { this.fireEvents('onMouseLeave', e); this.delaySetPopupVisible(false, this.props.mouseLeaveDelay); }, onPopupMouseEnter: function onPopupMouseEnter() { this.clearDelayTimer(); }, onPopupMouseLeave: function onPopupMouseLeave(e) { // https://github.com/react-component/trigger/pull/13 // react bug? if (e.relatedTarget && !e.relatedTarget.setTimeout && this._component && this._component.getPopupDomNode && (0, _contains2['default'])(this._component.getPopupDomNode(), e.relatedTarget)) { return; } this.delaySetPopupVisible(false, this.props.mouseLeaveDelay); }, onFocus: function onFocus(e) { this.fireEvents('onFocus', e); // incase focusin and focusout this.clearDelayTimer(); if (this.isFocusToShow()) { this.focusTime = Date.now(); this.delaySetPopupVisible(true, this.props.focusDelay); } }, onMouseDown: function onMouseDown(e) { this.fireEvents('onMouseDown', e); this.preClickTime = Date.now(); }, onTouchStart: function onTouchStart(e) { this.fireEvents('onTouchStart', e); this.preTouchTime = Date.now(); }, onBlur: function onBlur(e) { this.fireEvents('onBlur', e); this.clearDelayTimer(); if (this.isBlurToHide()) { this.delaySetPopupVisible(false, this.props.blurDelay); } }, onClick: function onClick(event) { this.fireEvents('onClick', event); // focus will trigger click if (this.focusTime) { var preTime = void 0; if (this.preClickTime && this.preTouchTime) { preTime = Math.min(this.preClickTime, this.preTouchTime); } else if (this.preClickTime) { preTime = this.preClickTime; } else if (this.preTouchTime) { preTime = this.preTouchTime; } if (Math.abs(preTime - this.focusTime) < 20) { return; } this.focusTime = 0; } this.preClickTime = 0; this.preTouchTime = 0; event.preventDefault(); var nextVisible = !this.state.popupVisible; if (this.isClickToHide() && !nextVisible || nextVisible && this.isClickToShow()) { this.setPopupVisible(!this.state.popupVisible); } }, onDocumentClick: function onDocumentClick(event) { if (this.props.mask && !this.props.maskClosable) { return; } var target = event.target; var root = (0, _reactDom.findDOMNode)(this); var popupNode = this.getPopupDomNode(); if (!(0, _contains2['default'])(root, target) && !(0, _contains2['default'])(popupNode, target)) { this.close(); } }, getPopupDomNode: function getPopupDomNode() { // for test if (this._component && this._component.getPopupDomNode) { return this._component.getPopupDomNode(); } return null; }, getRootDomNode: function getRootDomNode() { return (0, _reactDom.findDOMNode)(this); }, getPopupClassNameFromAlign: function getPopupClassNameFromAlign(align) { var className = []; var props = this.props; var popupPlacement = props.popupPlacement, builtinPlacements = props.builtinPlacements, prefixCls = props.prefixCls; if (popupPlacement && builtinPlacements) { className.push((0, _utils.getPopupClassNameFromAlign)(builtinPlacements, prefixCls, align)); } if (props.getPopupClassNameFromAlign) { className.push(props.getPopupClassNameFromAlign(align)); } return className.join(' '); }, getPopupAlign: function getPopupAlign() { var props = this.props; var popupPlacement = props.popupPlacement, popupAlign = props.popupAlign, builtinPlacements = props.builtinPlacements; if (popupPlacement && builtinPlacements) { return (0, _utils.getAlignFromPlacement)(builtinPlacements, popupPlacement, popupAlign); } return popupAlign; }, getComponent: function getComponent() { var props = this.props, state = this.state; var mouseProps = {}; if (this.isMouseEnterToShow()) { mouseProps.onMouseEnter = this.onPopupMouseEnter; } if (this.isMouseLeaveToHide()) { mouseProps.onMouseLeave = this.onPopupMouseLeave; } return _react2['default'].createElement( _Popup2['default'], (0, _extends3['default'])({ prefixCls: props.prefixCls, destroyPopupOnHide: props.destroyPopupOnHide, visible: state.popupVisible, className: props.popupClassName, action: props.action, align: this.getPopupAlign(), onAlign: props.onPopupAlign, animation: props.popupAnimation, getClassNameFromAlign: this.getPopupClassNameFromAlign }, mouseProps, { getRootDomNode: this.getRootDomNode, style: props.popupStyle, mask: props.mask, zIndex: props.zIndex, transitionName: props.popupTransitionName, maskAnimation: props.maskAnimation, maskTransitionName: props.maskTransitionName }), typeof props.popup === 'function' ? props.popup() : props.popup ); }, setPopupVisible: function setPopupVisible(popupVisible) { this.clearDelayTimer(); if (this.state.popupVisible !== popupVisible) { if (!('popupVisible' in this.props)) { this.setState({ popupVisible: popupVisible }); } this.props.onPopupVisibleChange(popupVisible); } }, delaySetPopupVisible: function delaySetPopupVisible(visible, delayS) { var _this2 = this; var delay = delayS * 1000; this.clearDelayTimer(); if (delay) { this.delayTimer = setTimeout(function () { _this2.setPopupVisible(visible); _this2.clearDelayTimer(); }, delay); } else { this.setPopupVisible(visible); } }, clearDelayTimer: function clearDelayTimer() { if (this.delayTimer) { clearTimeout(this.delayTimer); this.delayTimer = null; } }, clearOutsideHandler: function clearOutsideHandler() { if (this.clickOutsideHandler) { this.clickOutsideHandler.remove(); this.clickOutsideHandler = null; } if (this.touchOutsideHandler) { this.touchOutsideHandler.remove(); this.touchOutsideHandler = null; } }, createTwoChains: function createTwoChains(event) { var childPros = this.props.children.props; var props = this.props; if (childPros[event] && props[event]) { return this['fire' + event]; } return childPros[event] || props[event]; }, isClickToShow: function isClickToShow() { var _props = this.props, action = _props.action, showAction = _props.showAction; return action.indexOf('click') !== -1 || showAction.indexOf('click') !== -1; }, isClickToHide: function isClickToHide() { var _props2 = this.props, action = _props2.action, hideAction = _props2.hideAction; return action.indexOf('click') !== -1 || hideAction.indexOf('click') !== -1; }, isMouseEnterToShow: function isMouseEnterToShow() { var _props3 = this.props, action = _props3.action, showAction = _props3.showAction; return action.indexOf('hover') !== -1 || showAction.indexOf('mouseEnter') !== -1; }, isMouseLeaveToHide: function isMouseLeaveToHide() { var _props4 = this.props, action = _props4.action, hideAction = _props4.hideAction; return action.indexOf('hover') !== -1 || hideAction.indexOf('mouseLeave') !== -1; }, isFocusToShow: function isFocusToShow() { var _props5 = this.props, action = _props5.action, showAction = _props5.showAction; return action.indexOf('focus') !== -1 || showAction.indexOf('focus') !== -1; }, isBlurToHide: function isBlurToHide() { var _props6 = this.props, action = _props6.action, hideAction = _props6.hideAction; return action.indexOf('focus') !== -1 || hideAction.indexOf('blur') !== -1; }, forcePopupAlign: function forcePopupAlign() { if (this.state.popupVisible && this._component && this._component.alignInstance) { this._component.alignInstance.forceAlign(); } }, fireEvents: function fireEvents(type, e) { var childCallback = this.props.children.props[type]; if (childCallback) { childCallback(e); } var callback = this.props[type]; if (callback) { callback(e); } }, close: function close() { this.setPopupVisible(false); }, render: function render() { var props = this.props; var children = props.children; var child = _react2['default'].Children.only(children); var newChildProps = {}; if (this.isClickToHide() || this.isClickToShow()) { newChildProps.onClick = this.onClick; newChildProps.onMouseDown = this.onMouseDown; newChildProps.onTouchStart = this.onTouchStart; } else { newChildProps.onClick = this.createTwoChains('onClick'); newChildProps.onMouseDown = this.createTwoChains('onMouseDown'); newChildProps.onTouchStart = this.createTwoChains('onTouchStart'); } if (this.isMouseEnterToShow()) { newChildProps.onMouseEnter = this.onMouseEnter; } else { newChildProps.onMouseEnter = this.createTwoChains('onMouseEnter'); } if (this.isMouseLeaveToHide()) { newChildProps.onMouseLeave = this.onMouseLeave; } else { newChildProps.onMouseLeave = this.createTwoChains('onMouseLeave'); } if (this.isFocusToShow() || this.isBlurToHide()) { newChildProps.onFocus = this.onFocus; newChildProps.onBlur = this.onBlur; } else { newChildProps.onFocus = this.createTwoChains('onFocus'); newChildProps.onBlur = this.createTwoChains('onBlur'); } return _react2['default'].cloneElement(child, newChildProps); } }); exports['default'] = Trigger; module.exports = exports['default']; /***/ }), /* 245 */ /***/ (function(module, exports, __webpack_require__) { /** * 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'; var React = __webpack_require__(4); var factory = __webpack_require__(246); 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 ); /***/ }), /* 246 */ /***/ (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'; var _assign = __webpack_require__(44); var emptyObject = __webpack_require__(247); var _invariant = __webpack_require__(248); if (process.env.NODE_ENV !== 'production') { var warning = __webpack_require__(249); } var MIXINS_KEY = 'mixins'; // Helper function to allow the creation of anonymous functions which do not // have .name set to the name of the variable being assigned to. function identity(fn) { return fn; } var ReactPropTypeLocationNames; if (process.env.NODE_ENV !== 'production') { ReactPropTypeLocationNames = { prop: 'prop', context: 'context', childContext: 'child context' }; } else { ReactPropTypeLocationNames = {}; } function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) { /** * Policies that describe methods in `ReactClassInterface`. */ var injectedMixins = []; /** * Composite components are higher-level components that compose other composite * or host components. * * To create a new type of `ReactClass`, pass a specification of * your new class to `React.createClass`. The only requirement of your class * specification is that you implement a `render` method. * * var MyComponent = React.createClass({ * render: function() { * return
Hello World
; * } * }); * * The class specification supports a specific protocol of methods that have * special meaning (e.g. `render`). See `ReactClassInterface` for * more the comprehensive protocol. Any other properties and methods in the * class specification will be available on the prototype. * * @interface ReactClassInterface * @internal */ var ReactClassInterface = { /** * An array of Mixin objects to include when defining your component. * * @type {array} * @optional */ mixins: 'DEFINE_MANY', /** * An object containing properties and methods that should be defined on * the component's constructor instead of its prototype (static methods). * * @type {object} * @optional */ statics: 'DEFINE_MANY', /** * Definition of prop types for this component. * * @type {object} * @optional */ propTypes: 'DEFINE_MANY', /** * Definition of context types for this component. * * @type {object} * @optional */ contextTypes: 'DEFINE_MANY', /** * Definition of context types this component sets for its children. * * @type {object} * @optional */ childContextTypes: 'DEFINE_MANY', // ==== Definition methods ==== /** * Invoked when the component is mounted. Values in the mapping will be set on * `this.props` if that prop is not specified (i.e. using an `in` check). * * This method is invoked before `getInitialState` and therefore cannot rely * on `this.state` or use `this.setState`. * * @return {object} * @optional */ getDefaultProps: 'DEFINE_MANY_MERGED', /** * Invoked once before the component is mounted. The return value will be used * as the initial value of `this.state`. * * getInitialState: function() { * return { * isOn: false, * fooBaz: new BazFoo() * } * } * * @return {object} * @optional */ getInitialState: 'DEFINE_MANY_MERGED', /** * @return {object} * @optional */ getChildContext: 'DEFINE_MANY_MERGED', /** * Uses props from `this.props` and state from `this.state` to render the * structure of the component. * * No guarantees are made about when or how often this method is invoked, so * it must not have side effects. * * render: function() { * var name = this.props.name; * return
Hello, {name}!
; * } * * @return {ReactComponent} * @required */ render: 'DEFINE_ONCE', // ==== Delegate methods ==== /** * Invoked when the component is initially created and about to be mounted. * This may have side effects, but any external subscriptions or data created * by this method must be cleaned up in `componentWillUnmount`. * * @optional */ componentWillMount: 'DEFINE_MANY', /** * Invoked when the component has been mounted and has a DOM representation. * However, there is no guarantee that the DOM node is in the document. * * Use this as an opportunity to operate on the DOM when the component has * been mounted (initialized and rendered) for the first time. * * @param {DOMElement} rootNode DOM element representing the component. * @optional */ componentDidMount: 'DEFINE_MANY', /** * Invoked before the component receives new props. * * Use this as an opportunity to react to a prop transition by updating the * state using `this.setState`. Current props are accessed via `this.props`. * * componentWillReceiveProps: function(nextProps, nextContext) { * this.setState({ * likesIncreasing: nextProps.likeCount > this.props.likeCount * }); * } * * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop * transition may cause a state change, but the opposite is not true. If you * need it, you are probably looking for `componentWillUpdate`. * * @param {object} nextProps * @optional */ componentWillReceiveProps: 'DEFINE_MANY', /** * Invoked while deciding if the component should be updated as a result of * receiving new props, state and/or context. * * Use this as an opportunity to `return false` when you're certain that the * transition to the new props/state/context will not require a component * update. * * shouldComponentUpdate: function(nextProps, nextState, nextContext) { * return !equal(nextProps, this.props) || * !equal(nextState, this.state) || * !equal(nextContext, this.context); * } * * @param {object} nextProps * @param {?object} nextState * @param {?object} nextContext * @return {boolean} True if the component should update. * @optional */ shouldComponentUpdate: 'DEFINE_ONCE', /** * Invoked when the component is about to update due to a transition from * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState` * and `nextContext`. * * Use this as an opportunity to perform preparation before an update occurs. * * NOTE: You **cannot** use `this.setState()` in this method. * * @param {object} nextProps * @param {?object} nextState * @param {?object} nextContext * @param {ReactReconcileTransaction} transaction * @optional */ componentWillUpdate: 'DEFINE_MANY', /** * Invoked when the component's DOM representation has been updated. * * Use this as an opportunity to operate on the DOM when the component has * been updated. * * @param {object} prevProps * @param {?object} prevState * @param {?object} prevContext * @param {DOMElement} rootNode DOM element representing the component. * @optional */ componentDidUpdate: 'DEFINE_MANY', /** * Invoked when the component is about to be removed from its parent and have * its DOM representation destroyed. * * Use this as an opportunity to deallocate any external resources. * * NOTE: There is no `componentDidUnmount` since your component will have been * destroyed by that point. * * @optional */ componentWillUnmount: 'DEFINE_MANY', /** * Replacement for (deprecated) `componentWillMount`. * * @optional */ UNSAFE_componentWillMount: 'DEFINE_MANY', /** * Replacement for (deprecated) `componentWillReceiveProps`. * * @optional */ UNSAFE_componentWillReceiveProps: 'DEFINE_MANY', /** * Replacement for (deprecated) `componentWillUpdate`. * * @optional */ UNSAFE_componentWillUpdate: 'DEFINE_MANY', // ==== Advanced methods ==== /** * Updates the component's currently mounted DOM representation. * * By default, this implements React's rendering and reconciliation algorithm. * Sophisticated clients may wish to override this. * * @param {ReactReconcileTransaction} transaction * @internal * @overridable */ updateComponent: 'OVERRIDE_BASE' }; /** * Similar to ReactClassInterface but for static methods. */ var ReactClassStaticInterface = { /** * This method is invoked after a component is instantiated and when it * receives new props. Return an object to update state in response to * prop changes. Return null to indicate no change to state. * * If an object is returned, its keys will be merged into the existing state. * * @return {object || null} * @optional */ getDerivedStateFromProps: 'DEFINE_MANY_MERGED' }; /** * Mapping from class specification keys to special processing functions. * * Although these are declared like instance properties in the specification * when defining classes using `React.createClass`, they are actually static * and are accessible on the constructor instead of the prototype. Despite * being static, they must be defined outside of the "statics" key under * which all other static methods are defined. */ var RESERVED_SPEC_KEYS = { displayName: function(Constructor, displayName) { Constructor.displayName = displayName; }, mixins: function(Constructor, mixins) { if (mixins) { for (var i = 0; i < mixins.length; i++) { mixSpecIntoComponent(Constructor, mixins[i]); } } }, childContextTypes: function(Constructor, childContextTypes) { if (process.env.NODE_ENV !== 'production') { validateTypeDef(Constructor, childContextTypes, 'childContext'); } Constructor.childContextTypes = _assign( {}, Constructor.childContextTypes, childContextTypes ); }, contextTypes: function(Constructor, contextTypes) { if (process.env.NODE_ENV !== 'production') { validateTypeDef(Constructor, contextTypes, 'context'); } Constructor.contextTypes = _assign( {}, Constructor.contextTypes, contextTypes ); }, /** * Special case getDefaultProps which should move into statics but requires * automatic merging. */ getDefaultProps: function(Constructor, getDefaultProps) { if (Constructor.getDefaultProps) { Constructor.getDefaultProps = createMergedResultFunction( Constructor.getDefaultProps, getDefaultProps ); } else { Constructor.getDefaultProps = getDefaultProps; } }, propTypes: function(Constructor, propTypes) { if (process.env.NODE_ENV !== 'production') { validateTypeDef(Constructor, propTypes, 'prop'); } Constructor.propTypes = _assign({}, Constructor.propTypes, propTypes); }, statics: function(Constructor, statics) { mixStaticSpecIntoComponent(Constructor, statics); }, autobind: function() {} }; function validateTypeDef(Constructor, typeDef, location) { for (var propName in typeDef) { if (typeDef.hasOwnProperty(propName)) { // use a warning instead of an _invariant so components // don't show up in prod but only in __DEV__ if (process.env.NODE_ENV !== 'production') { warning( typeof typeDef[propName] === 'function', '%s: %s type `%s` is invalid; it must be a function, usually from ' + 'React.PropTypes.', Constructor.displayName || 'ReactClass', ReactPropTypeLocationNames[location], propName ); } } } } function validateMethodOverride(isAlreadyDefined, name) { var specPolicy = ReactClassInterface.hasOwnProperty(name) ? ReactClassInterface[name] : null; // Disallow overriding of base class methods unless explicitly allowed. if (ReactClassMixin.hasOwnProperty(name)) { _invariant( specPolicy === 'OVERRIDE_BASE', 'ReactClassInterface: You are attempting to override ' + '`%s` from your class specification. Ensure that your method names ' + 'do not overlap with React methods.', name ); } // Disallow defining methods more than once unless explicitly allowed. if (isAlreadyDefined) { _invariant( specPolicy === 'DEFINE_MANY' || specPolicy === 'DEFINE_MANY_MERGED', 'ReactClassInterface: You are attempting to define ' + '`%s` on your component more than once. This conflict may be due ' + 'to a mixin.', name ); } } /** * Mixin helper which handles policy validation and reserved * specification keys when building React classes. */ function mixSpecIntoComponent(Constructor, spec) { if (!spec) { if (process.env.NODE_ENV !== 'production') { var typeofSpec = typeof spec; var isMixinValid = typeofSpec === 'object' && spec !== null; if (process.env.NODE_ENV !== 'production') { warning( isMixinValid, "%s: You're attempting to include a mixin that is either null " + 'or not an object. Check the mixins included by the component, ' + 'as well as any mixins they include themselves. ' + 'Expected object but got %s.', Constructor.displayName || 'ReactClass', spec === null ? null : typeofSpec ); } } return; } _invariant( typeof spec !== 'function', "ReactClass: You're attempting to " + 'use a component class or function as a mixin. Instead, just use a ' + 'regular object.' ); _invariant( !isValidElement(spec), "ReactClass: You're attempting to " + 'use a component as a mixin. Instead, just use a regular object.' ); var proto = Constructor.prototype; var autoBindPairs = proto.__reactAutoBindPairs; // By handling mixins before any other properties, we ensure the same // chaining order is applied to methods with DEFINE_MANY policy, whether // mixins are listed before or after these methods in the spec. if (spec.hasOwnProperty(MIXINS_KEY)) { RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins); } for (var name in spec) { if (!spec.hasOwnProperty(name)) { continue; } if (name === MIXINS_KEY) { // We have already handled mixins in a special case above. continue; } var property = spec[name]; var isAlreadyDefined = proto.hasOwnProperty(name); validateMethodOverride(isAlreadyDefined, name); if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) { RESERVED_SPEC_KEYS[name](Constructor, property); } else { // Setup methods on prototype: // The following member methods should not be automatically bound: // 1. Expected ReactClass methods (in the "interface"). // 2. Overridden methods (that were mixed in). var isReactClassMethod = ReactClassInterface.hasOwnProperty(name); var isFunction = typeof property === 'function'; var shouldAutoBind = isFunction && !isReactClassMethod && !isAlreadyDefined && spec.autobind !== false; if (shouldAutoBind) { autoBindPairs.push(name, property); proto[name] = property; } else { if (isAlreadyDefined) { var specPolicy = ReactClassInterface[name]; // These cases should already be caught by validateMethodOverride. _invariant( isReactClassMethod && (specPolicy === 'DEFINE_MANY_MERGED' || specPolicy === 'DEFINE_MANY'), 'ReactClass: Unexpected spec policy %s for key %s ' + 'when mixing in component specs.', specPolicy, name ); // For methods which are defined more than once, call the existing // methods before calling the new property, merging if appropriate. if (specPolicy === 'DEFINE_MANY_MERGED') { proto[name] = createMergedResultFunction(proto[name], property); } else if (specPolicy === 'DEFINE_MANY') { proto[name] = createChainedFunction(proto[name], property); } } else { proto[name] = property; if (process.env.NODE_ENV !== 'production') { // Add verbose displayName to the function, which helps when looking // at profiling tools. if (typeof property === 'function' && spec.displayName) { proto[name].displayName = spec.displayName + '_' + name; } } } } } } } function mixStaticSpecIntoComponent(Constructor, statics) { if (!statics) { return; } for (var name in statics) { var property = statics[name]; if (!statics.hasOwnProperty(name)) { continue; } var isReserved = name in RESERVED_SPEC_KEYS; _invariant( !isReserved, 'ReactClass: You are attempting to define a reserved ' + 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' + 'as an instance property instead; it will still be accessible on the ' + 'constructor.', name ); var isAlreadyDefined = name in Constructor; if (isAlreadyDefined) { var specPolicy = ReactClassStaticInterface.hasOwnProperty(name) ? ReactClassStaticInterface[name] : null; _invariant( specPolicy === 'DEFINE_MANY_MERGED', 'ReactClass: You are attempting to define ' + '`%s` on your component more than once. This conflict may be ' + 'due to a mixin.', name ); Constructor[name] = createMergedResultFunction(Constructor[name], property); return; } Constructor[name] = property; } } /** * Merge two objects, but throw if both contain the same key. * * @param {object} one The first object, which is mutated. * @param {object} two The second object * @return {object} one after it has been mutated to contain everything in two. */ function mergeIntoWithNoDuplicateKeys(one, two) { _invariant( one && two && typeof one === 'object' && typeof two === 'object', 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.' ); for (var key in two) { if (two.hasOwnProperty(key)) { _invariant( one[key] === undefined, 'mergeIntoWithNoDuplicateKeys(): ' + 'Tried to merge two objects with the same key: `%s`. This conflict ' + 'may be due to a mixin; in particular, this may be caused by two ' + 'getInitialState() or getDefaultProps() methods returning objects ' + 'with clashing keys.', key ); one[key] = two[key]; } } return one; } /** * Creates a function that invokes two functions and merges their return values. * * @param {function} one Function to invoke first. * @param {function} two Function to invoke second. * @return {function} Function that invokes the two argument functions. * @private */ function createMergedResultFunction(one, two) { return function mergedResult() { var a = one.apply(this, arguments); var b = two.apply(this, arguments); if (a == null) { return b; } else if (b == null) { return a; } var c = {}; mergeIntoWithNoDuplicateKeys(c, a); mergeIntoWithNoDuplicateKeys(c, b); return c; }; } /** * Creates a function that invokes two functions and ignores their return vales. * * @param {function} one Function to invoke first. * @param {function} two Function to invoke second. * @return {function} Function that invokes the two argument functions. * @private */ function createChainedFunction(one, two) { return function chainedFunction() { one.apply(this, arguments); two.apply(this, arguments); }; } /** * Binds a method to the component. * * @param {object} component Component whose method is going to be bound. * @param {function} method Method to be bound. * @return {function} The bound method. */ function bindAutoBindMethod(component, method) { var boundMethod = method.bind(component); if (process.env.NODE_ENV !== 'production') { boundMethod.__reactBoundContext = component; boundMethod.__reactBoundMethod = method; boundMethod.__reactBoundArguments = null; var componentName = component.constructor.displayName; var _bind = boundMethod.bind; boundMethod.bind = function(newThis) { for ( var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++ ) { args[_key - 1] = arguments[_key]; } // User is trying to bind() an autobound method; we effectively will // ignore the value of "this" that the user is trying to use, so // let's warn. if (newThis !== component && newThis !== null) { if (process.env.NODE_ENV !== 'production') { warning( false, 'bind(): React component methods may only be bound to the ' + 'component instance. See %s', componentName ); } } else if (!args.length) { if (process.env.NODE_ENV !== 'production') { warning( false, 'bind(): You are binding a component method to the component. ' + 'React does this for you automatically in a high-performance ' + 'way, so you can safely remove this call. See %s', componentName ); } return boundMethod; } var reboundMethod = _bind.apply(boundMethod, arguments); reboundMethod.__reactBoundContext = component; reboundMethod.__reactBoundMethod = method; reboundMethod.__reactBoundArguments = args; return reboundMethod; }; } return boundMethod; } /** * Binds all auto-bound methods in a component. * * @param {object} component Component whose method is going to be bound. */ function bindAutoBindMethods(component) { var pairs = component.__reactAutoBindPairs; for (var i = 0; i < pairs.length; i += 2) { var autoBindKey = pairs[i]; var method = pairs[i + 1]; component[autoBindKey] = bindAutoBindMethod(component, method); } } var IsMountedPreMixin = { componentDidMount: function() { this.__isMounted = true; } }; var IsMountedPostMixin = { componentWillUnmount: function() { this.__isMounted = false; } }; /** * Add more to the ReactClass base class. These are all legacy features and * therefore not already part of the modern ReactComponent. */ var ReactClassMixin = { /** * TODO: This will be deprecated because state should always keep a consistent * type signature and the only use case for this, is to avoid that. */ replaceState: function(newState, callback) { this.updater.enqueueReplaceState(this, newState, callback); }, /** * Checks whether or not this composite component is mounted. * @return {boolean} True if mounted, false otherwise. * @protected * @final */ isMounted: function() { if (process.env.NODE_ENV !== 'production') { warning( this.__didWarnIsMounted, '%s: isMounted is deprecated. Instead, make sure to clean up ' + 'subscriptions and pending requests in componentWillUnmount to ' + 'prevent memory leaks.', (this.constructor && this.constructor.displayName) || this.name || 'Component' ); this.__didWarnIsMounted = true; } return !!this.__isMounted; } }; var ReactClassComponent = function() {}; _assign( ReactClassComponent.prototype, ReactComponent.prototype, ReactClassMixin ); /** * Creates a composite component class given a class specification. * See https://facebook.github.io/react/docs/top-level-api.html#react.createclass * * @param {object} spec Class specification (which must define `render`). * @return {function} Component constructor function. * @public */ function createClass(spec) { // To keep our warnings more understandable, we'll use a little hack here to // ensure that Constructor.name !== 'Constructor'. This makes sure we don't // unnecessarily identify a class without displayName as 'Constructor'. var Constructor = identity(function(props, context, updater) { // This constructor gets overridden by mocks. The argument is used // by mocks to assert on what gets mounted. if (process.env.NODE_ENV !== 'production') { warning( this instanceof Constructor, 'Something is calling a React component directly. Use a factory or ' + 'JSX instead. See: https://fb.me/react-legacyfactory' ); } // Wire up auto-binding if (this.__reactAutoBindPairs.length) { bindAutoBindMethods(this); } this.props = props; this.context = context; this.refs = emptyObject; this.updater = updater || ReactNoopUpdateQueue; this.state = null; // ReactClasses doesn't have constructors. Instead, they use the // getInitialState and componentWillMount methods for initialization. var initialState = this.getInitialState ? this.getInitialState() : null; if (process.env.NODE_ENV !== 'production') { // We allow auto-mocks to proceed as if they're returning null. if ( initialState === undefined && this.getInitialState._isMockFunction ) { // This is probably bad practice. Consider warning here and // deprecating this convenience. initialState = null; } } _invariant( typeof initialState === 'object' && !Array.isArray(initialState), '%s.getInitialState(): must return an object or null', Constructor.displayName || 'ReactCompositeComponent' ); this.state = initialState; }); Constructor.prototype = new ReactClassComponent(); Constructor.prototype.constructor = Constructor; Constructor.prototype.__reactAutoBindPairs = []; injectedMixins.forEach(mixSpecIntoComponent.bind(null, Constructor)); mixSpecIntoComponent(Constructor, IsMountedPreMixin); mixSpecIntoComponent(Constructor, spec); mixSpecIntoComponent(Constructor, IsMountedPostMixin); // Initialize the defaultProps property after all mixins have been merged. if (Constructor.getDefaultProps) { Constructor.defaultProps = Constructor.getDefaultProps(); } if (process.env.NODE_ENV !== 'production') { // This is a tag to indicate that the use of these method names is ok, // since it's used with createClass. If it's not, then it's likely a // mistake so we'll warn you to use the static property, property // initializer or constructor respectively. if (Constructor.getDefaultProps) { Constructor.getDefaultProps.isReactClassApproved = {}; } if (Constructor.prototype.getInitialState) { Constructor.prototype.getInitialState.isReactClassApproved = {}; } } _invariant( Constructor.prototype.render, 'createClass(...): Class specification must implement a `render` method.' ); if (process.env.NODE_ENV !== 'production') { warning( !Constructor.prototype.componentShouldUpdate, '%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', spec.displayName || 'A component' ); warning( !Constructor.prototype.componentWillRecieveProps, '%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', spec.displayName || 'A component' ); warning( !Constructor.prototype.UNSAFE_componentWillRecieveProps, '%s has a method called UNSAFE_componentWillRecieveProps(). ' + 'Did you mean UNSAFE_componentWillReceiveProps()?', spec.displayName || 'A component' ); } // Reduce time spent doing lookups by setting these on the prototype. for (var methodName in ReactClassInterface) { if (!Constructor.prototype[methodName]) { Constructor.prototype[methodName] = null; } } return Constructor; } return createClass; } module.exports = factory; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(33))) /***/ }), /* 247 */ /***/ (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'; var emptyObject = {}; if (process.env.NODE_ENV !== 'production') { Object.freeze(emptyObject); } module.exports = emptyObject; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(33))) /***/ }), /* 248 */ /***/ (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 validateFormat = function validateFormat(format) {}; if (process.env.NODE_ENV !== 'production') { 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; } } module.exports = invariant; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(33))) /***/ }), /* 249 */ /***/ (function(module, exports, __webpack_require__) { /* 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. * */ 'use strict'; var emptyFunction = __webpack_require__(250); /** * 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; if (process.env.NODE_ENV !== 'production') { 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)); } }; } module.exports = warning; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(33))) /***/ }), /* 250 */ /***/ (function(module, exports) { "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. * * */ 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; }; module.exports = emptyFunction; /***/ }), /* 251 */ /***/ (function(module, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = contains; function contains(root, n) { var node = n; while (node) { if (node === root) { return true; } node = node.parentNode; } return false; } module.exports = exports['default']; /***/ }), /* 252 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports['default'] = addEventListenerWrap; var _addDomEventListener = __webpack_require__(41); var _addDomEventListener2 = _interopRequireDefault(_addDomEventListener); var _reactDom = __webpack_require__(12); var _reactDom2 = _interopRequireDefault(_reactDom); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function addEventListenerWrap(target, eventType, cb, option) { /* 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, option); } module.exports = exports['default']; /***/ }), /* 253 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends2 = __webpack_require__(145); var _extends3 = _interopRequireDefault(_extends2); var _classCallCheck2 = __webpack_require__(185); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _createClass2 = __webpack_require__(254); var _createClass3 = _interopRequireDefault(_createClass2); var _possibleConstructorReturn2 = __webpack_require__(186); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(220); var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _reactDom = __webpack_require__(12); var _reactDom2 = _interopRequireDefault(_reactDom); var _rcAlign = __webpack_require__(258); var _rcAlign2 = _interopRequireDefault(_rcAlign); var _rcAnimate = __webpack_require__(261); var _rcAnimate2 = _interopRequireDefault(_rcAnimate); var _PopupInner = __webpack_require__(268); var _PopupInner2 = _interopRequireDefault(_PopupInner); var _LazyRenderBox = __webpack_require__(269); var _LazyRenderBox2 = _interopRequireDefault(_LazyRenderBox); var _utils = __webpack_require__(270); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var Popup = function (_Component) { (0, _inherits3['default'])(Popup, _Component); function Popup(props) { (0, _classCallCheck3['default'])(this, Popup); var _this = (0, _possibleConstructorReturn3['default'])(this, (Popup.__proto__ || Object.getPrototypeOf(Popup)).call(this, props)); _initialiseProps.call(_this); _this.savePopupRef = _utils.saveRef.bind(_this, 'popupInstance'); _this.saveAlignRef = _utils.saveRef.bind(_this, 'alignInstance'); return _this; } (0, _createClass3['default'])(Popup, [{ key: 'componentDidMount', value: function componentDidMount() { this.rootNode = this.getPopupDomNode(); } }, { key: 'getPopupDomNode', value: function getPopupDomNode() { return _reactDom2['default'].findDOMNode(this.popupInstance); } }, { key: 'getMaskTransitionName', value: function getMaskTransitionName() { var props = this.props; var transitionName = props.maskTransitionName; var animation = props.maskAnimation; if (!transitionName && animation) { transitionName = props.prefixCls + '-' + animation; } return transitionName; } }, { key: 'getTransitionName', value: function getTransitionName() { var props = this.props; var transitionName = props.transitionName; if (!transitionName && props.animation) { transitionName = props.prefixCls + '-' + props.animation; } return transitionName; } }, { key: 'getClassName', value: function getClassName(currentAlignClassName) { return this.props.prefixCls + ' ' + this.props.className + ' ' + currentAlignClassName; } }, { key: 'getPopupElement', value: function getPopupElement() { var savePopupRef = this.savePopupRef, props = this.props; var align = props.align, style = props.style, visible = props.visible, prefixCls = props.prefixCls, destroyPopupOnHide = props.destroyPopupOnHide; var className = this.getClassName(this.currentAlignClassName || props.getClassNameFromAlign(align)); var hiddenClassName = prefixCls + '-hidden'; if (!visible) { this.currentAlignClassName = null; } var newStyle = (0, _extends3['default'])({}, style, this.getZIndexStyle()); var popupInnerProps = { className: className, prefixCls: prefixCls, ref: savePopupRef, onMouseEnter: props.onMouseEnter, onMouseLeave: props.onMouseLeave, style: newStyle }; if (destroyPopupOnHide) { return _react2['default'].createElement( _rcAnimate2['default'], { component: '', exclusive: true, transitionAppear: true, transitionName: this.getTransitionName() }, visible ? _react2['default'].createElement( _rcAlign2['default'], { target: this.getTarget, key: 'popup', ref: this.saveAlignRef, monitorWindowResize: true, align: align, onAlign: this.onAlign }, _react2['default'].createElement( _PopupInner2['default'], (0, _extends3['default'])({ visible: true }, popupInnerProps), props.children ) ) : null ); } return _react2['default'].createElement( _rcAnimate2['default'], { component: '', exclusive: true, transitionAppear: true, transitionName: this.getTransitionName(), showProp: 'xVisible' }, _react2['default'].createElement( _rcAlign2['default'], { target: this.getTarget, key: 'popup', ref: this.saveAlignRef, monitorWindowResize: true, xVisible: visible, childrenProps: { visible: 'xVisible' }, disabled: !visible, align: align, onAlign: this.onAlign }, _react2['default'].createElement( _PopupInner2['default'], (0, _extends3['default'])({ hiddenClassName: hiddenClassName }, popupInnerProps), props.children ) ) ); } }, { key: 'getZIndexStyle', value: function getZIndexStyle() { var style = {}; var props = this.props; if (props.zIndex !== undefined) { style.zIndex = props.zIndex; } return style; } }, { key: 'getMaskElement', value: function getMaskElement() { var props = this.props; var maskElement = void 0; if (props.mask) { var maskTransition = this.getMaskTransitionName(); maskElement = _react2['default'].createElement(_LazyRenderBox2['default'], { style: this.getZIndexStyle(), key: 'mask', className: props.prefixCls + '-mask', hiddenClassName: props.prefixCls + '-mask-hidden', visible: props.visible }); if (maskTransition) { maskElement = _react2['default'].createElement( _rcAnimate2['default'], { key: 'mask', showProp: 'visible', transitionAppear: true, component: '', transitionName: maskTransition }, maskElement ); } } return maskElement; } }, { key: 'render', value: function render() { return _react2['default'].createElement( 'div', null, this.getMaskElement(), this.getPopupElement() ); } }]); return Popup; }(_react.Component); Popup.propTypes = { visible: _propTypes2['default'].bool, style: _propTypes2['default'].object, getClassNameFromAlign: _propTypes2['default'].func, onAlign: _propTypes2['default'].func, getRootDomNode: _propTypes2['default'].func, onMouseEnter: _propTypes2['default'].func, align: _propTypes2['default'].any, destroyPopupOnHide: _propTypes2['default'].bool, className: _propTypes2['default'].string, prefixCls: _propTypes2['default'].string, onMouseLeave: _propTypes2['default'].func }; var _initialiseProps = function _initialiseProps() { var _this2 = this; this.onAlign = function (popupDomNode, align) { var props = _this2.props; var currentAlignClassName = props.getClassNameFromAlign(align); // FIX: https://github.com/react-component/trigger/issues/56 // FIX: https://github.com/react-component/tooltip/issues/79 if (_this2.currentAlignClassName !== currentAlignClassName) { _this2.currentAlignClassName = currentAlignClassName; popupDomNode.className = _this2.getClassName(currentAlignClassName); } props.onAlign(popupDomNode, align); }; this.getTarget = function () { return _this2.props.getRootDomNode(); }; }; exports['default'] = Popup; module.exports = exports['default']; /***/ }), /* 254 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _defineProperty = __webpack_require__(255); 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; }; }(); /***/ }), /* 255 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(256), __esModule: true }; /***/ }), /* 256 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(257); var $Object = __webpack_require__(151).Object; module.exports = function defineProperty(it, key, desc) { return $Object.defineProperty(it, key, desc); }; /***/ }), /* 257 */ /***/ (function(module, exports, __webpack_require__) { var $export = __webpack_require__(149); // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) $export($export.S + $export.F * !__webpack_require__(159), 'Object', { defineProperty: __webpack_require__(155).f }); /***/ }), /* 258 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; var _Align = __webpack_require__(259); var _Align2 = _interopRequireDefault(_Align); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } exports['default'] = _Align2['default']; // export this package's api module.exports = exports['default']; /***/ }), /* 259 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; var _classCallCheck2 = __webpack_require__(185); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _possibleConstructorReturn2 = __webpack_require__(186); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(220); var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _reactDom = __webpack_require__(12); var _reactDom2 = _interopRequireDefault(_reactDom); var _domAlign = __webpack_require__(51); var _addEventListener = __webpack_require__(252); var _addEventListener2 = _interopRequireDefault(_addEventListener); var _util = __webpack_require__(260); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function getElement(func) { if (typeof func !== 'function' || !func) return null; return func(); } function getPoint(point) { if (typeof point !== 'object' || !point) return null; return point; } var Align = function (_Component) { (0, _inherits3['default'])(Align, _Component); function Align() { var _temp, _this, _ret; (0, _classCallCheck3['default'])(this, Align); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = (0, _possibleConstructorReturn3['default'])(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.forceAlign = function () { var _this$props = _this.props, disabled = _this$props.disabled, target = _this$props.target, align = _this$props.align, onAlign = _this$props.onAlign; if (!disabled && target) { var source = _reactDom2['default'].findDOMNode(_this); var result = void 0; var element = getElement(target); var point = getPoint(target); if (element) { result = (0, _domAlign.alignElement)(source, element, align); } else if (point) { result = (0, _domAlign.alignPoint)(source, point, align); } if (onAlign) { onAlign(source, result); } } }, _temp), (0, _possibleConstructorReturn3['default'])(_this, _ret); } 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) { var source = _reactDom2['default'].findDOMNode(this); var sourceRect = source ? source.getBoundingClientRect() : null; if (prevProps.disabled) { reAlign = true; } else { var lastElement = getElement(prevProps.target); var currentElement = getElement(props.target); var lastPoint = getPoint(prevProps.target); var currentPoint = getPoint(props.target); if ((0, _util.isWindow)(lastElement) && (0, _util.isWindow)(currentElement)) { // Skip if is window reAlign = false; } else if (lastElement !== currentElement || // Element change lastElement && !currentElement && currentPoint || // Change from element to point lastPoint && currentPoint && currentElement || // Change from point to element currentPoint && !(0, _util.isSamePoint)(lastPoint, currentPoint)) { reAlign = true; } // If source element size changed var preRect = this.sourceRect || {}; if (!reAlign && source && (preRect.width !== sourceRect.width || preRect.height !== sourceRect.height)) { reAlign = true; } } this.sourceRect = sourceRect; } if (reAlign) { this.forceAlign(); } if (props.monitorWindowResize && !props.disabled) { this.startMonitorWindowResize(); } else { this.stopMonitorWindowResize(); } }; Align.prototype.componentWillUnmount = function componentWillUnmount() { this.stopMonitorWindowResize(); }; Align.prototype.startMonitorWindowResize = function startMonitorWindowResize() { if (!this.resizeHandler) { this.bufferMonitor = (0, _util.buffer)(this.forceAlign, this.props.monitorBufferTime); this.resizeHandler = (0, _addEventListener2['default'])(window, 'resize', this.bufferMonitor); } }; Align.prototype.stopMonitorWindowResize = function stopMonitorWindowResize() { if (this.resizeHandler) { this.bufferMonitor.clear(); this.resizeHandler.remove(); this.resizeHandler = null; } }; Align.prototype.render = function render() { var _this2 = this; var _props = this.props, childrenProps = _props.childrenProps, children = _props.children; var child = _react2['default'].Children.only(children); if (childrenProps) { var newProps = {}; var propList = Object.keys(childrenProps); propList.forEach(function (prop) { newProps[prop] = _this2.props[childrenProps[prop]]; }); return _react2['default'].cloneElement(child, newProps); } return child; }; return Align; }(_react.Component); Align.propTypes = { childrenProps: _propTypes2['default'].object, align: _propTypes2['default'].object.isRequired, target: _propTypes2['default'].oneOfType([_propTypes2['default'].func, _propTypes2['default'].shape({ clientX: _propTypes2['default'].number, clientY: _propTypes2['default'].number, pageX: _propTypes2['default'].number, pageY: _propTypes2['default'].number })]), onAlign: _propTypes2['default'].func, monitorBufferTime: _propTypes2['default'].number, monitorWindowResize: _propTypes2['default'].bool, disabled: _propTypes2['default'].bool, children: _propTypes2['default'].any }; Align.defaultProps = { target: function target() { return window; }, monitorBufferTime: 50, monitorWindowResize: false, disabled: false }; exports['default'] = Align; module.exports = exports['default']; /***/ }), /* 260 */ /***/ (function(module, exports) { 'use strict'; exports.__esModule = true; exports.buffer = buffer; exports.isSamePoint = isSamePoint; exports.isWindow = isWindow; 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; } function isSamePoint(prev, next) { if (prev === next) return true; if (!prev || !next) return false; if ('pageX' in next && 'pageY' in next) { return prev.pageX === next.pageX && prev.pageY === next.pageY; } if ('clientX' in next && 'clientY' in next) { return prev.clientX === next.clientX && prev.clientY === next.clientY; } return false; } function isWindow(obj) { return obj && typeof obj === 'object' && obj.window === obj; } /***/ }), /* 261 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends2 = __webpack_require__(145); var _extends3 = _interopRequireDefault(_extends2); var _defineProperty2 = __webpack_require__(262); var _defineProperty3 = _interopRequireDefault(_defineProperty2); var _classCallCheck2 = __webpack_require__(185); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _createClass2 = __webpack_require__(254); var _createClass3 = _interopRequireDefault(_createClass2); var _possibleConstructorReturn2 = __webpack_require__(186); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(220); var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _ChildrenUtils = __webpack_require__(263); var _AnimateChild = __webpack_require__(264); var _AnimateChild2 = _interopRequireDefault(_AnimateChild); var _animate = __webpack_require__(267); var _animate2 = _interopRequireDefault(_animate); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var defaultKey = 'rc_animate_' + Date.now(); function getChildrenFromProps(props) { var children = props.children; if (_react2['default'].isValidElement(children)) { if (!children.key) { return _react2['default'].cloneElement(children, { key: defaultKey }); } } return children; } function noop() {} var Animate = function (_React$Component) { (0, _inherits3['default'])(Animate, _React$Component); // eslint-disable-line function Animate(props) { (0, _classCallCheck3['default'])(this, Animate); var _this = (0, _possibleConstructorReturn3['default'])(this, (Animate.__proto__ || Object.getPrototypeOf(Animate)).call(this, props)); _initialiseProps.call(_this); _this.currentlyAnimatingKeys = {}; _this.keysToEnter = []; _this.keysToLeave = []; _this.state = { children: (0, _ChildrenUtils.toArrayChildren)(getChildrenFromProps(props)) }; _this.childrenRefs = {}; return _this; } (0, _createClass3['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 = (0, _ChildrenUtils.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 ? (0, _ChildrenUtils.toArrayChildren)(getChildrenFromProps(props)) : this.state.children; // in case destroy in showProp mode var newChildren = []; if (showProp) { currentChildren.forEach(function (currentChild) { var nextChild = currentChild && (0, _ChildrenUtils.findChildInChildrenByKey)(nextChildren, currentChild.key); var newChild = void 0; if ((!nextChild || !nextChild.props[showProp]) && currentChild.props[showProp]) { newChild = _react2['default'].cloneElement(nextChild || currentChild, (0, _defineProperty3['default'])({}, showProp, true)); } else { newChild = nextChild; } if (newChild) { newChildren.push(newChild); } }); nextChildren.forEach(function (nextChild) { if (!nextChild || !(0, _ChildrenUtils.findChildInChildrenByKey)(currentChildren, nextChild.key)) { newChildren.push(nextChild); } }); } else { newChildren = (0, _ChildrenUtils.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 && (0, _ChildrenUtils.findChildInChildrenByKey)(currentChildren, key); if (showProp) { var showInNext = child.props[showProp]; if (hasPrev) { var showInNow = (0, _ChildrenUtils.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 && (0, _ChildrenUtils.findChildInChildrenByKey)(nextChildren, key); if (showProp) { var showInNow = child.props[showProp]; if (hasNext) { var showInNext = (0, _ChildrenUtils.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 (0, _ChildrenUtils.findShownChildInChildrenByKey)(currentChildren, key, showProp); } return (0, _ChildrenUtils.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 _react2['default'].createElement( _AnimateChild2['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 = (0, _extends3['default'])({ className: props.className, style: props.style }, props.componentProps); } return _react2['default'].createElement( Component, passedProps, children ); } return children[0] || null; } }]); return Animate; }(_react2['default'].Component); Animate.isAnimate = true; Animate.propTypes = { component: _propTypes2['default'].any, componentProps: _propTypes2['default'].object, animation: _propTypes2['default'].object, transitionName: _propTypes2['default'].oneOfType([_propTypes2['default'].string, _propTypes2['default'].object]), transitionEnter: _propTypes2['default'].bool, transitionAppear: _propTypes2['default'].bool, exclusive: _propTypes2['default'].bool, transitionLeave: _propTypes2['default'].bool, onEnd: _propTypes2['default'].func, onEnter: _propTypes2['default'].func, onLeave: _propTypes2['default'].func, onAppear: _propTypes2['default'].func, showProp: _propTypes2['default'].string, children: _propTypes2['default'].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 = (0, _ChildrenUtils.toArrayChildren)(getChildrenFromProps(props)); if (!_this5.isValidChildByKey(currentChildren, key)) { // exclusive will not need this _this5.performLeave(key); } else if (type === 'appear') { if (_animate2['default'].allowAppearCallback(props)) { props.onAppear(key); props.onEnd(key, true); } } else if (_animate2['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 = (0, _ChildrenUtils.toArrayChildren)(getChildrenFromProps(props)); // in case state change is too fast if (_this5.isValidChildByKey(currentChildren, key)) { _this5.performEnter(key); } else { var end = function end() { if (_animate2['default'].allowLeaveCallback(props)) { props.onLeave(key); props.onEnd(key, false); } }; if (!(0, _ChildrenUtils.isSameChildren)(_this5.state.children, currentChildren, props.showProp)) { _this5.setState({ children: currentChildren }, end); } else { end(); } } }; }; exports['default'] = Animate; module.exports = exports['default']; /***/ }), /* 262 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _defineProperty = __webpack_require__(255); 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; }; /***/ }), /* 263 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.toArrayChildren = toArrayChildren; exports.findChildInChildrenByKey = findChildInChildrenByKey; exports.findShownChildInChildrenByKey = findShownChildInChildrenByKey; exports.findHiddenChildInChildrenByKey = findHiddenChildInChildrenByKey; exports.isSameChildren = isSameChildren; exports.mergeChildren = mergeChildren; var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function toArrayChildren(children) { var ret = []; _react2['default'].Children.forEach(children, function (child) { ret.push(child); }); return ret; } function findChildInChildrenByKey(children, key) { var ret = null; if (children) { children.forEach(function (child) { if (ret) { return; } if (child && child.key === key) { ret = child; } }); } return ret; } function findShownChildInChildrenByKey(children, key, showProp) { var ret = null; if (children) { children.forEach(function (child) { if (child && child.key === key && child.props[showProp]) { if (ret) { throw new Error('two child with same key for children'); } ret = child; } }); } return ret; } function findHiddenChildInChildrenByKey(children, key, showProp) { var found = 0; if (children) { children.forEach(function (child) { if (found) { return; } found = child && child.key === key && !child.props[showProp]; }); } return found; } function isSameChildren(c1, c2, showProp) { var same = c1.length === c2.length; if (same) { c1.forEach(function (child, index) { var child2 = c2[index]; if (child && child2) { if (child && !child2 || !child && child2) { same = false; } else if (child.key !== child2.key) { same = false; } else if (showProp && child.props[showProp] !== child2.props[showProp]) { same = false; } } }); } return same; } function mergeChildren(prev, next) { var ret = []; // For each key of `next`, the list of keys to insert before that key in // the combined list var nextChildrenPending = {}; var pendingChildren = []; prev.forEach(function (child) { if (child && findChildInChildrenByKey(next, child.key)) { if (pendingChildren.length) { nextChildrenPending[child.key] = pendingChildren; pendingChildren = []; } } else { pendingChildren.push(child); } }); next.forEach(function (child) { if (child && Object.prototype.hasOwnProperty.call(nextChildrenPending, child.key)) { ret = ret.concat(nextChildrenPending[child.key]); } ret.push(child); }); ret = ret.concat(pendingChildren); return ret; } /***/ }), /* 264 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _classCallCheck2 = __webpack_require__(185); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _createClass2 = __webpack_require__(254); var _createClass3 = _interopRequireDefault(_createClass2); var _possibleConstructorReturn2 = __webpack_require__(186); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(220); var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _reactDom = __webpack_require__(12); var _reactDom2 = _interopRequireDefault(_reactDom); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _cssAnimation = __webpack_require__(265); var _cssAnimation2 = _interopRequireDefault(_cssAnimation); var _animate = __webpack_require__(267); var _animate2 = _interopRequireDefault(_animate); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var transitionMap = { enter: 'transitionEnter', appear: 'transitionAppear', leave: 'transitionLeave' }; var AnimateChild = function (_React$Component) { (0, _inherits3['default'])(AnimateChild, _React$Component); function AnimateChild() { (0, _classCallCheck3['default'])(this, AnimateChild); return (0, _possibleConstructorReturn3['default'])(this, (AnimateChild.__proto__ || Object.getPrototypeOf(AnimateChild)).apply(this, arguments)); } (0, _createClass3['default'])(AnimateChild, [{ key: 'componentWillUnmount', value: function componentWillUnmount() { this.stop(); } }, { key: 'componentWillEnter', value: function componentWillEnter(done) { if (_animate2['default'].isEnterSupported(this.props)) { this.transition('enter', done); } else { done(); } } }, { key: 'componentWillAppear', value: function componentWillAppear(done) { if (_animate2['default'].isAppearSupported(this.props)) { this.transition('appear', done); } else { done(); } } }, { key: 'componentWillLeave', value: function componentWillLeave(done) { if (_animate2['default'].isLeaveSupported(this.props)) { this.transition('leave', done); } else { // always sync, do not interupt with react component life cycle // update hidden -> animate hidden -> // didUpdate -> animate leave -> unmount (if animate is none) done(); } } }, { key: 'transition', value: function transition(animationType, finishCallback) { var _this2 = this; var node = _reactDom2['default'].findDOMNode(this); var props = this.props; var transitionName = props.transitionName; var nameIsObj = typeof transitionName === 'object'; this.stop(); var end = function end() { _this2.stopper = null; finishCallback(); }; if ((_cssAnimation.isCssAnimationSupported || !props.animation[animationType]) && transitionName && props[transitionMap[animationType]]) { var name = nameIsObj ? transitionName[animationType] : transitionName + '-' + animationType; var activeName = name + '-active'; if (nameIsObj && transitionName[animationType + 'Active']) { activeName = transitionName[animationType + 'Active']; } this.stopper = (0, _cssAnimation2['default'])(node, { name: name, active: activeName }, end); } else { this.stopper = props.animation[animationType](node, end); } } }, { key: 'stop', value: function stop() { var stopper = this.stopper; if (stopper) { this.stopper = null; stopper.stop(); } } }, { key: 'render', value: function render() { return this.props.children; } }]); return AnimateChild; }(_react2['default'].Component); AnimateChild.propTypes = { children: _propTypes2['default'].any }; exports['default'] = AnimateChild; module.exports = exports['default']; /***/ }), /* 265 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.isCssAnimationSupported = undefined; var _typeof2 = __webpack_require__(187); var _typeof3 = _interopRequireDefault(_typeof2); var _Event = __webpack_require__(266); var _Event2 = _interopRequireDefault(_Event); var _componentClasses = __webpack_require__(47); var _componentClasses2 = _interopRequireDefault(_componentClasses); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var isCssAnimationSupported = _Event2['default'].endEvents.length !== 0; var capitalPrefixes = ['Webkit', 'Moz', 'O', // ms is special .... ! 'ms']; var prefixes = ['-webkit-', '-moz-', '-o-', 'ms-', '']; function getStyleProperty(node, name) { // old ff need null, https://developer.mozilla.org/en-US/docs/Web/API/Window/getComputedStyle var style = window.getComputedStyle(node, null); var ret = ''; for (var i = 0; i < prefixes.length; i++) { ret = style.getPropertyValue(prefixes[i] + name); if (ret) { break; } } return ret; } function fixBrowserByTimeout(node) { if (isCssAnimationSupported) { var transitionDelay = parseFloat(getStyleProperty(node, 'transition-delay')) || 0; var transitionDuration = parseFloat(getStyleProperty(node, 'transition-duration')) || 0; var animationDelay = parseFloat(getStyleProperty(node, 'animation-delay')) || 0; var animationDuration = parseFloat(getStyleProperty(node, 'animation-duration')) || 0; var time = Math.max(transitionDuration + transitionDelay, animationDuration + animationDelay); // sometimes, browser bug node.rcEndAnimTimeout = setTimeout(function () { node.rcEndAnimTimeout = null; if (node.rcEndListener) { node.rcEndListener(); } }, time * 1000 + 200); } } function clearBrowserBugTimeout(node) { if (node.rcEndAnimTimeout) { clearTimeout(node.rcEndAnimTimeout); node.rcEndAnimTimeout = null; } } var cssAnimation = function cssAnimation(node, transitionName, endCallback) { var nameIsObj = (typeof transitionName === 'undefined' ? 'undefined' : (0, _typeof3['default'])(transitionName)) === 'object'; var className = nameIsObj ? transitionName.name : transitionName; var activeClassName = nameIsObj ? transitionName.active : transitionName + '-active'; var end = endCallback; var start = void 0; var active = void 0; var nodeClasses = (0, _componentClasses2['default'])(node); if (endCallback && Object.prototype.toString.call(endCallback) === '[object Object]') { end = endCallback.end; start = endCallback.start; active = endCallback.active; } if (node.rcEndListener) { node.rcEndListener(); } node.rcEndListener = function (e) { if (e && e.target !== node) { return; } if (node.rcAnimTimeout) { clearTimeout(node.rcAnimTimeout); node.rcAnimTimeout = null; } clearBrowserBugTimeout(node); nodeClasses.remove(className); nodeClasses.remove(activeClassName); _Event2['default'].removeEndEventListener(node, node.rcEndListener); node.rcEndListener = null; // Usually this optional end is used for informing an owner of // a leave animation and telling it to remove the child. if (end) { end(); } }; _Event2['default'].addEndEventListener(node, node.rcEndListener); if (start) { start(); } nodeClasses.add(className); node.rcAnimTimeout = setTimeout(function () { node.rcAnimTimeout = null; nodeClasses.add(activeClassName); if (active) { setTimeout(active, 0); } fixBrowserByTimeout(node); // 30ms for firefox }, 30); return { stop: function stop() { if (node.rcEndListener) { node.rcEndListener(); } } }; }; cssAnimation.style = function (node, style, callback) { if (node.rcEndListener) { node.rcEndListener(); } node.rcEndListener = function (e) { if (e && e.target !== node) { return; } if (node.rcAnimTimeout) { clearTimeout(node.rcAnimTimeout); node.rcAnimTimeout = null; } clearBrowserBugTimeout(node); _Event2['default'].removeEndEventListener(node, node.rcEndListener); node.rcEndListener = null; // Usually this optional callback is used for informing an owner of // a leave animation and telling it to remove the child. if (callback) { callback(); } }; _Event2['default'].addEndEventListener(node, node.rcEndListener); node.rcAnimTimeout = setTimeout(function () { for (var s in style) { if (style.hasOwnProperty(s)) { node.style[s] = style[s]; } } node.rcAnimTimeout = null; fixBrowserByTimeout(node); }, 0); }; cssAnimation.setTransition = function (node, p, value) { var property = p; var v = value; if (value === undefined) { v = property; property = ''; } property = property || ''; capitalPrefixes.forEach(function (prefix) { node.style[prefix + 'Transition' + property] = v; }); }; cssAnimation.isCssAnimationSupported = isCssAnimationSupported; exports.isCssAnimationSupported = isCssAnimationSupported; exports['default'] = cssAnimation; /***/ }), /* 266 */ /***/ (function(module, exports) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var START_EVENT_NAME_MAP = { transitionstart: { transition: 'transitionstart', WebkitTransition: 'webkitTransitionStart', MozTransition: 'mozTransitionStart', OTransition: 'oTransitionStart', msTransition: 'MSTransitionStart' }, animationstart: { animation: 'animationstart', WebkitAnimation: 'webkitAnimationStart', MozAnimation: 'mozAnimationStart', OAnimation: 'oAnimationStart', msAnimation: 'MSAnimationStart' } }; var END_EVENT_NAME_MAP = { transitionend: { transition: 'transitionend', WebkitTransition: 'webkitTransitionEnd', MozTransition: 'mozTransitionEnd', OTransition: 'oTransitionEnd', msTransition: 'MSTransitionEnd' }, animationend: { animation: 'animationend', WebkitAnimation: 'webkitAnimationEnd', MozAnimation: 'mozAnimationEnd', OAnimation: 'oAnimationEnd', msAnimation: 'MSAnimationEnd' } }; var startEvents = []; var endEvents = []; function detectEvents() { var testEl = document.createElement('div'); var style = testEl.style; if (!('AnimationEvent' in window)) { delete START_EVENT_NAME_MAP.animationstart.animation; delete END_EVENT_NAME_MAP.animationend.animation; } if (!('TransitionEvent' in window)) { delete START_EVENT_NAME_MAP.transitionstart.transition; delete END_EVENT_NAME_MAP.transitionend.transition; } function process(EVENT_NAME_MAP, events) { for (var baseEventName in EVENT_NAME_MAP) { if (EVENT_NAME_MAP.hasOwnProperty(baseEventName)) { var baseEvents = EVENT_NAME_MAP[baseEventName]; for (var styleName in baseEvents) { if (styleName in style) { events.push(baseEvents[styleName]); break; } } } } } process(START_EVENT_NAME_MAP, startEvents); process(END_EVENT_NAME_MAP, endEvents); } if (typeof window !== 'undefined' && typeof document !== 'undefined') { detectEvents(); } function addEventListener(node, eventName, eventListener) { node.addEventListener(eventName, eventListener, false); } function removeEventListener(node, eventName, eventListener) { node.removeEventListener(eventName, eventListener, false); } var TransitionEvents = { // Start events startEvents: startEvents, addStartEventListener: function addStartEventListener(node, eventListener) { if (startEvents.length === 0) { window.setTimeout(eventListener, 0); return; } startEvents.forEach(function (startEvent) { addEventListener(node, startEvent, eventListener); }); }, removeStartEventListener: function removeStartEventListener(node, eventListener) { if (startEvents.length === 0) { return; } startEvents.forEach(function (startEvent) { removeEventListener(node, startEvent, eventListener); }); }, // End events endEvents: endEvents, addEndEventListener: function addEndEventListener(node, eventListener) { if (endEvents.length === 0) { window.setTimeout(eventListener, 0); return; } endEvents.forEach(function (endEvent) { addEventListener(node, endEvent, eventListener); }); }, removeEndEventListener: function removeEndEventListener(node, eventListener) { if (endEvents.length === 0) { return; } endEvents.forEach(function (endEvent) { removeEventListener(node, endEvent, eventListener); }); } }; exports['default'] = TransitionEvents; module.exports = exports['default']; /***/ }), /* 267 */ /***/ (function(module, exports) { "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']; /***/ }), /* 268 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _classCallCheck2 = __webpack_require__(185); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _createClass2 = __webpack_require__(254); var _createClass3 = _interopRequireDefault(_createClass2); var _possibleConstructorReturn2 = __webpack_require__(186); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(220); var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _LazyRenderBox = __webpack_require__(269); var _LazyRenderBox2 = _interopRequireDefault(_LazyRenderBox); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var PopupInner = function (_Component) { (0, _inherits3['default'])(PopupInner, _Component); function PopupInner() { (0, _classCallCheck3['default'])(this, PopupInner); return (0, _possibleConstructorReturn3['default'])(this, (PopupInner.__proto__ || Object.getPrototypeOf(PopupInner)).apply(this, arguments)); } (0, _createClass3['default'])(PopupInner, [{ key: 'render', value: function render() { var props = this.props; var className = props.className; if (!props.visible) { className += ' ' + props.hiddenClassName; } return _react2['default'].createElement( 'div', { className: className, onMouseEnter: props.onMouseEnter, onMouseLeave: props.onMouseLeave, style: props.style }, _react2['default'].createElement( _LazyRenderBox2['default'], { className: props.prefixCls + '-content', visible: props.visible }, props.children ) ); } }]); return PopupInner; }(_react.Component); PopupInner.propTypes = { hiddenClassName: _propTypes2['default'].string, className: _propTypes2['default'].string, prefixCls: _propTypes2['default'].string, onMouseEnter: _propTypes2['default'].func, onMouseLeave: _propTypes2['default'].func, children: _propTypes2['default'].any }; exports['default'] = PopupInner; module.exports = exports['default']; /***/ }), /* 269 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _objectWithoutProperties2 = __webpack_require__(184); var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); var _classCallCheck2 = __webpack_require__(185); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _createClass2 = __webpack_require__(254); var _createClass3 = _interopRequireDefault(_createClass2); var _possibleConstructorReturn2 = __webpack_require__(186); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(220); var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var LazyRenderBox = function (_Component) { (0, _inherits3['default'])(LazyRenderBox, _Component); function LazyRenderBox() { (0, _classCallCheck3['default'])(this, LazyRenderBox); return (0, _possibleConstructorReturn3['default'])(this, (LazyRenderBox.__proto__ || Object.getPrototypeOf(LazyRenderBox)).apply(this, arguments)); } (0, _createClass3['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 = (0, _objectWithoutProperties3['default'])(_props, ['hiddenClassName', 'visible']); if (hiddenClassName || _react2['default'].Children.count(props.children) > 1) { if (!visible && hiddenClassName) { props.className += ' ' + hiddenClassName; } return _react2['default'].createElement('div', props); } return _react2['default'].Children.only(props.children); } }]); return LazyRenderBox; }(_react.Component); LazyRenderBox.propTypes = { children: _propTypes2['default'].any, className: _propTypes2['default'].string, visible: _propTypes2['default'].bool, hiddenClassName: _propTypes2['default'].string }; exports['default'] = LazyRenderBox; module.exports = exports['default']; /***/ }), /* 270 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends2 = __webpack_require__(145); var _extends3 = _interopRequireDefault(_extends2); exports.getAlignFromPlacement = getAlignFromPlacement; exports.getPopupClassNameFromAlign = getPopupClassNameFromAlign; exports.saveRef = saveRef; function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function isPointsEq(a1, a2) { return a1[0] === a2[0] && a1[1] === a2[1]; } function getAlignFromPlacement(builtinPlacements, placementStr, align) { var baseAlign = builtinPlacements[placementStr] || {}; return (0, _extends3['default'])({}, baseAlign, align); } function getPopupClassNameFromAlign(builtinPlacements, prefixCls, align) { var points = align.points; for (var placement in builtinPlacements) { if (builtinPlacements.hasOwnProperty(placement)) { if (isPointsEq(builtinPlacements[placement].points, points)) { return prefixCls + '-placement-' + placement; } } } return ''; } function saveRef(name, component) { this[name] = component; } /***/ }), /* 271 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends2 = __webpack_require__(145); var _extends3 = _interopRequireDefault(_extends2); exports['default'] = getContainerRenderMixin; var _reactDom = __webpack_require__(12); var _reactDom2 = _interopRequireDefault(_reactDom); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function defaultGetContainer() { var container = document.createElement('div'); document.body.appendChild(container); return container; } function getContainerRenderMixin(config) { var _config$autoMount = config.autoMount, autoMount = _config$autoMount === undefined ? true : _config$autoMount, _config$autoDestroy = config.autoDestroy, autoDestroy = _config$autoDestroy === undefined ? true : _config$autoDestroy, isVisible = config.isVisible, isForceRender = config.isForceRender, getComponent = config.getComponent, _config$getContainer = config.getContainer, getContainer = _config$getContainer === undefined ? defaultGetContainer : _config$getContainer; var mixin = void 0; function _renderComponent(instance, componentArg, ready) { if (!isVisible || instance._component || isVisible(instance) || isForceRender && isForceRender(instance)) { if (!instance._container) { instance._container = getContainer(instance); } var component = void 0; if (instance.getComponent) { component = instance.getComponent(componentArg); } else { component = getComponent(instance, componentArg); } _reactDom2['default'].unstable_renderSubtreeIntoContainer(instance, component, instance._container, function callback() { instance._component = this; if (ready) { ready.call(this); } }); } } if (autoMount) { mixin = (0, _extends3['default'])({}, mixin, { componentDidMount: function componentDidMount() { _renderComponent(this); }, componentDidUpdate: function componentDidUpdate() { _renderComponent(this); } }); } if (!autoMount || !autoDestroy) { mixin = (0, _extends3['default'])({}, mixin, { renderComponent: function renderComponent(componentArg, ready) { _renderComponent(this, componentArg, ready); } }); } function _removeContainer(instance) { if (instance._container) { var container = instance._container; _reactDom2['default'].unmountComponentAtNode(container); container.parentNode.removeChild(container); instance._container = null; } } if (autoDestroy) { mixin = (0, _extends3['default'])({}, mixin, { componentWillUnmount: function componentWillUnmount() { _removeContainer(this); } }); } else { mixin = (0, _extends3['default'])({}, mixin, { removeContainer: function removeContainer() { _removeContainer(this); } }); } return mixin; } module.exports = exports['default']; /***/ }), /* 272 */ /***/ (function(module, exports) { 'use strict'; exports.__esModule = true; var autoAdjustOverflow = { adjustX: 1, adjustY: 1 }; var placements = exports.placements = { topLeft: { points: ['bl', 'tl'], overflow: autoAdjustOverflow, offset: [0, -7] }, bottomLeft: { points: ['tl', 'bl'], overflow: autoAdjustOverflow, offset: [0, 7] }, leftTop: { points: ['tr', 'tl'], overflow: autoAdjustOverflow, offset: [-4, 0] }, rightTop: { points: ['tl', 'tr'], overflow: autoAdjustOverflow, offset: [4, 0] } }; exports['default'] = placements; /***/ }), /* 273 */ /***/ (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 element //
  • Link
  • would be a good example // in this case the role on
  • should be "none" to // remove the implied listitem role. // https://www.w3.org/TR/wai-aria-practices-1.1/examples/menubar/menubar-1/menubar-1.html attrs.role = 'none'; } // In case that onClick/onMouseLeave/onMouseEnter is passed down from owner var mouseEvent = { onClick: props.disabled ? null : this.onClick, onMouseLeave: props.disabled ? null : this.onMouseLeave, onMouseEnter: props.disabled ? null : this.onMouseEnter }; var style = (0, _extends3['default'])({}, props.style); if (props.mode === 'inline') { style.paddingLeft = props.inlineIndent * props.level; } _util.menuAllProps.forEach(function (key) { return delete props[key]; }); var icon = this.props.itemIcon; if (typeof this.props.itemIcon === 'function') { icon = _react2['default'].createElement(this.props.itemIcon, this.props); } return _react2['default'].createElement( 'li', (0, _extends3['default'])({}, props, attrs, mouseEvent, { style: style }), props.children, icon ); }; return MenuItem; }(_react2['default'].Component); MenuItem.propTypes = { attribute: _propTypes2['default'].object, rootPrefixCls: _propTypes2['default'].string, eventKey: _propTypes2['default'].string, active: _propTypes2['default'].bool, children: _propTypes2['default'].any, selectedKeys: _propTypes2['default'].array, disabled: _propTypes2['default'].bool, title: _propTypes2['default'].string, onItemHover: _propTypes2['default'].func, onSelect: _propTypes2['default'].func, onClick: _propTypes2['default'].func, onDeselect: _propTypes2['default'].func, parentMenu: _propTypes2['default'].object, onDestroy: _propTypes2['default'].func, onMouseEnter: _propTypes2['default'].func, onMouseLeave: _propTypes2['default'].func, multiple: _propTypes2['default'].bool, isSelected: _propTypes2['default'].bool, manualRef: _propTypes2['default'].func, itemIcon: _propTypes2['default'].oneOfType([_propTypes2['default'].func, _propTypes2['default'].node]) }; MenuItem.defaultProps = { onSelect: _util.noop, onMouseEnter: _util.noop, onMouseLeave: _util.noop, manualRef: _util.noop }; MenuItem.isMenuItem = true; var connected = (0, _miniStore.connect)(function (_ref, _ref2) { var activeKey = _ref.activeKey, selectedKeys = _ref.selectedKeys; var eventKey = _ref2.eventKey, subMenuKey = _ref2.subMenuKey; return { active: activeKey[subMenuKey] === eventKey, isSelected: selectedKeys.indexOf(eventKey) !== -1 }; })(MenuItem); exports['default'] = connected; /***/ }), /* 275 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; module.exports = __webpack_require__(276); /***/ }), /* 276 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var util = __webpack_require__(277); function scrollIntoView(elem, container, config) { config = config || {}; // document 归一化到 window if (container.nodeType === 9) { container = util.getWindow(container); } var allowHorizontalScroll = config.allowHorizontalScroll; var onlyScrollIfNeeded = config.onlyScrollIfNeeded; var alignWithTop = config.alignWithTop; var alignWithLeft = config.alignWithLeft; var offsetTop = config.offsetTop || 0; var offsetLeft = config.offsetLeft || 0; var offsetBottom = config.offsetBottom || 0; var offsetRight = config.offsetRight || 0; allowHorizontalScroll = allowHorizontalScroll === undefined ? true : allowHorizontalScroll; var isWin = util.isWindow(container); var elemOffset = util.offset(elem); var eh = util.outerHeight(elem); var ew = util.outerWidth(elem); var containerOffset = undefined; var ch = undefined; var cw = undefined; var containerScroll = undefined; var diffTop = undefined; var diffBottom = undefined; var win = undefined; var winScroll = undefined; var ww = undefined; var wh = undefined; if (isWin) { win = container; wh = util.height(win); ww = util.width(win); winScroll = { left: util.scrollLeft(win), top: util.scrollTop(win) }; // elem 相对 container 可视视窗的距离 diffTop = { left: elemOffset.left - winScroll.left - offsetLeft, top: elemOffset.top - winScroll.top - offsetTop }; diffBottom = { left: elemOffset.left + ew - (winScroll.left + ww) + offsetRight, top: elemOffset.top + eh - (winScroll.top + wh) + offsetBottom }; containerScroll = winScroll; } else { containerOffset = util.offset(container); ch = container.clientHeight; cw = container.clientWidth; containerScroll = { left: container.scrollLeft, top: container.scrollTop }; // elem 相对 container 可视视窗的距离 // 注意边框, offset 是边框到根节点 diffTop = { left: elemOffset.left - (containerOffset.left + (parseFloat(util.css(container, 'borderLeftWidth')) || 0)) - offsetLeft, top: elemOffset.top - (containerOffset.top + (parseFloat(util.css(container, 'borderTopWidth')) || 0)) - offsetTop }; diffBottom = { left: elemOffset.left + ew - (containerOffset.left + cw + (parseFloat(util.css(container, 'borderRightWidth')) || 0)) + offsetRight, top: elemOffset.top + eh - (containerOffset.top + ch + (parseFloat(util.css(container, 'borderBottomWidth')) || 0)) + offsetBottom }; } if (diffTop.top < 0 || diffBottom.top > 0) { // 强制向上 if (alignWithTop === true) { util.scrollTop(container, containerScroll.top + diffTop.top); } else if (alignWithTop === false) { util.scrollTop(container, containerScroll.top + diffBottom.top); } else { // 自动调整 if (diffTop.top < 0) { util.scrollTop(container, containerScroll.top + diffTop.top); } else { util.scrollTop(container, containerScroll.top + diffBottom.top); } } } else { if (!onlyScrollIfNeeded) { alignWithTop = alignWithTop === undefined ? true : !!alignWithTop; if (alignWithTop) { util.scrollTop(container, containerScroll.top + diffTop.top); } else { util.scrollTop(container, containerScroll.top + diffBottom.top); } } } if (allowHorizontalScroll) { if (diffTop.left < 0 || diffBottom.left > 0) { // 强制向上 if (alignWithLeft === true) { util.scrollLeft(container, containerScroll.left + diffTop.left); } else if (alignWithLeft === false) { util.scrollLeft(container, containerScroll.left + diffBottom.left); } else { // 自动调整 if (diffTop.left < 0) { util.scrollLeft(container, containerScroll.left + diffTop.left); } else { util.scrollLeft(container, containerScroll.left + diffBottom.left); } } } else { if (!onlyScrollIfNeeded) { alignWithLeft = alignWithLeft === undefined ? true : !!alignWithLeft; if (alignWithLeft) { util.scrollLeft(container, containerScroll.left + diffTop.left); } else { util.scrollLeft(container, containerScroll.left + diffBottom.left); } } } } } module.exports = scrollIntoView; /***/ }), /* 277 */ /***/ (function(module, exports) { 'use strict'; 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 _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; var RE_NUM = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source; function getClientPosition(elem) { var box = undefined; var x = undefined; var y = undefined; var doc = elem.ownerDocument; var body = doc.body; var docElem = doc && doc.documentElement; // 根据 GBS 最新数据,A-Grade Browsers 都已支持 getBoundingClientRect 方法,不用再考虑传统的实现方式 box = elem.getBoundingClientRect(); // 注:jQuery 还考虑减去 docElem.clientLeft/clientTop // 但测试发现,这样反而会导致当 html 和 body 有边距/边框样式时,获取的值不正确 // 此外,ie6 会忽略 html 的 margin 值,幸运地是没有谁会去设置 html 的 margin x = box.left; y = box.top; // In IE, most of the time, 2 extra pixels are added to the top and left // due to the implicit 2-pixel inset border. In IE6/7 quirks mode and // IE6 standards mode, this border can be overridden by setting the // document element's border to zero -- thus, we cannot rely on the // offset always being 2 pixels. // In quirks mode, the offset can be determined by querying the body's // clientLeft/clientTop, but in standards mode, it is found by querying // the document element's clientLeft/clientTop. Since we already called // getClientBoundingRect we have already forced a reflow, so it is not // too expensive just to query them all. // ie 下应该减去窗口的边框吧,毕竟默认 absolute 都是相对窗口定位的 // 窗口边框标准是设 documentElement ,quirks 时设置 body // 最好禁止在 body 和 html 上边框 ,但 ie < 9 html 默认有 2px ,减去 // 但是非 ie 不可能设置窗口边框,body html 也不是窗口 ,ie 可以通过 html,body 设置 // 标准 ie 下 docElem.clientTop 就是 border-top // ie7 html 即窗口边框改变不了。永远为 2 // 但标准 firefox/chrome/ie9 下 docElem.clientTop 是窗口边框,即使设了 border-top 也为 0 x -= docElem.clientLeft || body.clientLeft || 0; y -= docElem.clientTop || body.clientTop || 0; return { left: x, top: y }; } function getScroll(w, top) { var ret = w['page' + (top ? 'Y' : 'X') + 'Offset']; var method = 'scroll' + (top ? 'Top' : 'Left'); if (typeof ret !== 'number') { var d = w.document; // ie6,7,8 standard mode ret = d.documentElement[method]; if (typeof ret !== 'number') { // quirks mode ret = d.body[method]; } } return ret; } function getScrollLeft(w) { return getScroll(w); } function getScrollTop(w) { return getScroll(w, true); } function getOffset(el) { var pos = getClientPosition(el); var doc = el.ownerDocument; var w = doc.defaultView || doc.parentWindow; pos.left += getScrollLeft(w); pos.top += getScrollTop(w); return pos; } function _getComputedStyle(elem, name, computedStyle_) { var val = ''; var d = elem.ownerDocument; var computedStyle = computedStyle_ || d.defaultView.getComputedStyle(elem, null); // https://github.com/kissyteam/kissy/issues/61 if (computedStyle) { val = computedStyle.getPropertyValue(name) || computedStyle[name]; } return val; } var _RE_NUM_NO_PX = new RegExp('^(' + RE_NUM + ')(?!px)[a-z%]+$', 'i'); var RE_POS = /^(top|right|bottom|left)$/; var CURRENT_STYLE = 'currentStyle'; var RUNTIME_STYLE = 'runtimeStyle'; var LEFT = 'left'; var PX = 'px'; function _getComputedStyleIE(elem, name) { // currentStyle maybe null // http://msdn.microsoft.com/en-us/library/ms535231.aspx var ret = elem[CURRENT_STYLE] && elem[CURRENT_STYLE][name]; // 当 width/height 设置为百分比时,通过 pixelLeft 方式转换的 width/height 值 // 一开始就处理了! CUSTOM_STYLE.height,CUSTOM_STYLE.width ,cssHook 解决@2011-08-19 // 在 ie 下不对,需要直接用 offset 方式 // borderWidth 等值也有问题,但考虑到 borderWidth 设为百分比的概率很小,这里就不考虑了 // From the awesome hack by Dean Edwards // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 // If we're not dealing with a regular pixel number // but a number that has a weird ending, we need to convert it to pixels // exclude left right for relativity if (_RE_NUM_NO_PX.test(ret) && !RE_POS.test(name)) { // Remember the original values var style = elem.style; var left = style[LEFT]; var rsLeft = elem[RUNTIME_STYLE][LEFT]; // prevent flashing of content elem[RUNTIME_STYLE][LEFT] = elem[CURRENT_STYLE][LEFT]; // Put in the new values to get a computed value out style[LEFT] = name === 'fontSize' ? '1em' : ret || 0; ret = style.pixelLeft + PX; // Revert the changed values style[LEFT] = left; elem[RUNTIME_STYLE][LEFT] = rsLeft; } return ret === '' ? 'auto' : ret; } var getComputedStyleX = undefined; if (typeof window !== 'undefined') { getComputedStyleX = window.getComputedStyle ? _getComputedStyle : _getComputedStyleIE; } function each(arr, fn) { for (var i = 0; i < arr.length; i++) { fn(arr[i]); } } function isBorderBoxFn(elem) { return getComputedStyleX(elem, 'boxSizing') === 'border-box'; } var BOX_MODELS = ['margin', 'border', 'padding']; var CONTENT_INDEX = -1; var PADDING_INDEX = 2; var BORDER_INDEX = 1; var MARGIN_INDEX = 0; function swap(elem, options, callback) { var old = {}; var style = elem.style; var name = undefined; // Remember the old values, and insert the new ones for (name in options) { if (options.hasOwnProperty(name)) { old[name] = style[name]; style[name] = options[name]; } } callback.call(elem); // Revert the old values for (name in options) { if (options.hasOwnProperty(name)) { style[name] = old[name]; } } } function getPBMWidth(elem, props, which) { var value = 0; var prop = undefined; var j = undefined; var i = undefined; for (j = 0; j < props.length; j++) { prop = props[j]; if (prop) { for (i = 0; i < which.length; i++) { var cssProp = undefined; if (prop === 'border') { cssProp = prop + which[i] + 'Width'; } else { cssProp = prop + which[i]; } value += parseFloat(getComputedStyleX(elem, cssProp)) || 0; } } } return value; } /** * A crude way of determining if an object is a window * @member util */ function isWindow(obj) { // must use == for ie8 /* eslint eqeqeq:0 */ return obj != null && obj == obj.window; } var domUtils = {}; each(['Width', 'Height'], function (name) { domUtils['doc' + name] = function (refWin) { var d = refWin.document; return Math.max( // firefox chrome documentElement.scrollHeight< body.scrollHeight // ie standard mode : documentElement.scrollHeight> body.scrollHeight d.documentElement['scroll' + name], // quirks : documentElement.scrollHeight 最大等于可视窗口多一点? d.body['scroll' + name], domUtils['viewport' + name](d)); }; domUtils['viewport' + name] = function (win) { // pc browser includes scrollbar in window.innerWidth var prop = 'client' + name; var doc = win.document; var body = doc.body; var documentElement = doc.documentElement; var documentElementProp = documentElement[prop]; // 标准模式取 documentElement // backcompat 取 body return doc.compatMode === 'CSS1Compat' && documentElementProp || body && body[prop] || documentElementProp; }; }); /* 得到元素的大小信息 @param elem @param name @param {String} [extra] 'padding' : (css width) + padding 'border' : (css width) + padding + border 'margin' : (css width) + padding + border + margin */ function getWH(elem, name, extra) { if (isWindow(elem)) { return name === 'width' ? domUtils.viewportWidth(elem) : domUtils.viewportHeight(elem); } else if (elem.nodeType === 9) { return name === 'width' ? domUtils.docWidth(elem) : domUtils.docHeight(elem); } var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom']; var borderBoxValue = name === 'width' ? elem.offsetWidth : elem.offsetHeight; var computedStyle = getComputedStyleX(elem); var isBorderBox = isBorderBoxFn(elem, computedStyle); var cssBoxValue = 0; if (borderBoxValue == null || borderBoxValue <= 0) { borderBoxValue = undefined; // Fall back to computed then un computed css if necessary cssBoxValue = getComputedStyleX(elem, name); if (cssBoxValue == null || Number(cssBoxValue) < 0) { cssBoxValue = elem.style[name] || 0; } // Normalize '', auto, and prepare for extra cssBoxValue = parseFloat(cssBoxValue) || 0; } if (extra === undefined) { extra = isBorderBox ? BORDER_INDEX : CONTENT_INDEX; } var borderBoxValueOrIsBorderBox = borderBoxValue !== undefined || isBorderBox; var val = borderBoxValue || cssBoxValue; if (extra === CONTENT_INDEX) { if (borderBoxValueOrIsBorderBox) { return val - getPBMWidth(elem, ['border', 'padding'], which, computedStyle); } return cssBoxValue; } if (borderBoxValueOrIsBorderBox) { var padding = extra === PADDING_INDEX ? -getPBMWidth(elem, ['border'], which, computedStyle) : getPBMWidth(elem, ['margin'], which, computedStyle); return val + (extra === BORDER_INDEX ? 0 : padding); } return cssBoxValue + getPBMWidth(elem, BOX_MODELS.slice(extra), which, computedStyle); } var cssShow = { position: 'absolute', visibility: 'hidden', display: 'block' }; // fix #119 : https://github.com/kissyteam/kissy/issues/119 function getWHIgnoreDisplay(elem) { var val = undefined; var args = arguments; // in case elem is window // elem.offsetWidth === undefined if (elem.offsetWidth !== 0) { val = getWH.apply(undefined, args); } else { swap(elem, cssShow, function () { val = getWH.apply(undefined, args); }); } return val; } function css(el, name, v) { var value = v; if ((typeof name === 'undefined' ? 'undefined' : _typeof(name)) === 'object') { for (var i in name) { if (name.hasOwnProperty(i)) { css(el, i, name[i]); } } return undefined; } if (typeof value !== 'undefined') { if (typeof value === 'number') { value += 'px'; } el.style[name] = value; return undefined; } return getComputedStyleX(el, name); } each(['width', 'height'], function (name) { var first = name.charAt(0).toUpperCase() + name.slice(1); domUtils['outer' + first] = function (el, includeMargin) { return el && getWHIgnoreDisplay(el, name, includeMargin ? MARGIN_INDEX : BORDER_INDEX); }; var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom']; domUtils[name] = function (elem, val) { if (val !== undefined) { if (elem) { var computedStyle = getComputedStyleX(elem); var isBorderBox = isBorderBoxFn(elem); if (isBorderBox) { val += getPBMWidth(elem, ['padding', 'border'], which, computedStyle); } return css(elem, name, val); } return undefined; } return elem && getWHIgnoreDisplay(elem, name, CONTENT_INDEX); }; }); // 设置 elem 相对 elem.ownerDocument 的坐标 function setOffset(elem, offset) { // set position first, in-case top/left are set even on static elem if (css(elem, 'position') === 'static') { elem.style.position = 'relative'; } var old = getOffset(elem); var ret = {}; var current = undefined; var key = undefined; for (key in offset) { if (offset.hasOwnProperty(key)) { current = parseFloat(css(elem, key)) || 0; ret[key] = current + offset[key] - old[key]; } } css(elem, ret); } module.exports = _extends({ getWindow: function getWindow(node) { var doc = node.ownerDocument || node; return doc.defaultView || doc.parentWindow; }, offset: function offset(el, value) { if (typeof value !== 'undefined') { setOffset(el, value); } else { return getOffset(el); } }, isWindow: isWindow, each: each, css: css, clone: function clone(obj) { var ret = {}; for (var i in obj) { if (obj.hasOwnProperty(i)) { ret[i] = obj[i]; } } var overflow = obj.overflow; if (overflow) { for (var i in obj) { if (obj.hasOwnProperty(i)) { ret.overflow[i] = obj.overflow[i]; } } } return ret; }, scrollLeft: function scrollLeft(w, v) { if (isWindow(w)) { if (v === undefined) { return getScrollLeft(w); } window.scrollTo(v, getScrollTop(w)); } else { if (v === undefined) { return w.scrollLeft; } w.scrollLeft = v; } }, scrollTop: function scrollTop(w, v) { if (isWindow(w)) { if (v === undefined) { return getScrollTop(w); } window.scrollTo(getScrollLeft(w), v); } else { if (v === undefined) { return w.scrollTop; } w.scrollTop = v; } }, viewportWidth: 0, viewportHeight: 0 }, domUtils); /***/ }), /* 278 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; var _extends2 = __webpack_require__(145); var _extends3 = _interopRequireDefault(_extends2); var _objectWithoutProperties2 = __webpack_require__(184); var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2); var _classCallCheck2 = __webpack_require__(185); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _possibleConstructorReturn2 = __webpack_require__(186); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(220); var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _util = __webpack_require__(240); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var MenuItemGroup = function (_React$Component) { (0, _inherits3['default'])(MenuItemGroup, _React$Component); function MenuItemGroup() { var _temp, _this, _ret; (0, _classCallCheck3['default'])(this, MenuItemGroup); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = (0, _possibleConstructorReturn3['default'])(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.renderInnerMenuItem = function (item) { var _this$props = _this.props, renderMenuItem = _this$props.renderMenuItem, index = _this$props.index; return renderMenuItem(item, index, _this.props.subMenuKey); }, _temp), (0, _possibleConstructorReturn3['default'])(_this, _ret); } MenuItemGroup.prototype.render = function render() { var props = (0, _objectWithoutProperties3['default'])(this.props, []); var _props$className = props.className, className = _props$className === undefined ? '' : _props$className, rootPrefixCls = props.rootPrefixCls; var titleClassName = rootPrefixCls + '-item-group-title'; var listClassName = rootPrefixCls + '-item-group-list'; var title = props.title, children = props.children; _util.menuAllProps.forEach(function (key) { return delete props[key]; }); // Set onClick to null, to ignore propagated onClick event delete props.onClick; return _react2['default'].createElement( 'li', (0, _extends3['default'])({}, props, { className: className + ' ' + rootPrefixCls + '-item-group' }), _react2['default'].createElement( 'div', { className: titleClassName, title: typeof title === 'string' ? title : undefined }, title ), _react2['default'].createElement( 'ul', { className: listClassName }, _react2['default'].Children.map(children, this.renderInnerMenuItem) ) ); }; return MenuItemGroup; }(_react2['default'].Component); MenuItemGroup.propTypes = { renderMenuItem: _propTypes2['default'].func, index: _propTypes2['default'].number, className: _propTypes2['default'].string, subMenuKey: _propTypes2['default'].string, rootPrefixCls: _propTypes2['default'].string }; MenuItemGroup.defaultProps = { disabled: true }; MenuItemGroup.isMenuItemGroup = true; exports['default'] = MenuItemGroup; module.exports = exports['default']; /***/ }), /* 279 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; var _classCallCheck2 = __webpack_require__(185); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _possibleConstructorReturn2 = __webpack_require__(186); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(220); var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var Divider = function (_React$Component) { (0, _inherits3['default'])(Divider, _React$Component); function Divider() { (0, _classCallCheck3['default'])(this, Divider); return (0, _possibleConstructorReturn3['default'])(this, _React$Component.apply(this, arguments)); } Divider.prototype.render = function render() { var _props = this.props, className = _props.className, rootPrefixCls = _props.rootPrefixCls, style = _props.style; return _react2['default'].createElement('li', { className: className + ' ' + rootPrefixCls + '-item-divider', style: style }); }; return Divider; }(_react2['default'].Component); Divider.propTypes = { className: _propTypes2['default'].string, rootPrefixCls: _propTypes2['default'].string, style: _propTypes2['default'].object }; Divider.defaultProps = { // To fix keyboard UX. disabled: true, className: '', style: {} }; exports['default'] = Divider; module.exports = exports['default']; /***/ }), /* 280 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); 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); } 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']; /***/ }), /* 281 */ /***/ (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__(4); 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; }; } /***/ }), /* 282 */ /***/ (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 _rcTrigger = __webpack_require__(244); var _rcTrigger2 = _interopRequireDefault(_rcTrigger); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _classnames = __webpack_require__(3); var _classnames2 = _interopRequireDefault(_classnames); var _reactDom = __webpack_require__(12); var _reactDom2 = _interopRequireDefault(_reactDom); var _util = __webpack_require__(281); var _DropdownMenu = __webpack_require__(283); var _DropdownMenu2 = _interopRequireDefault(_DropdownMenu); 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); } _rcTrigger2["default"].displayName = 'Trigger'; var BUILT_IN_PLACEMENTS = { bottomLeft: { points: ['tl', 'bl'], offset: [0, 4], overflow: { adjustX: 0, adjustY: 1 } }, topLeft: { points: ['bl', 'tl'], offset: [0, -4], overflow: { adjustX: 0, adjustY: 1 } } }; var SelectTrigger = function (_React$Component) { _inherits(SelectTrigger, _React$Component); function SelectTrigger(props) { _classCallCheck(this, SelectTrigger); var _this = _possibleConstructorReturn(this, _React$Component.call(this, props)); _initialiseProps.call(_this); _this.saveDropdownMenuRef = (0, _util.saveRef)(_this, 'dropdownMenuRef'); _this.saveTriggerRef = (0, _util.saveRef)(_this, 'triggerRef'); _this.state = { dropdownWidth: null }; return _this; } SelectTrigger.prototype.componentDidMount = function componentDidMount() { if (this.props.open) { //宽度计算时机修改 this.setDropdownWidth(); } }; SelectTrigger.prototype.componentDidUpdate = function componentDidUpdate() { if (this.props.visible) { //宽度计算时机修改 this.setDropdownWidth(); } }; SelectTrigger.prototype.render = function render() { var _popupClassName; var _props = this.props, onPopupFocus = _props.onPopupFocus, props = _objectWithoutProperties(_props, ['onPopupFocus']); var multiple = props.multiple, visible = props.visible, inputValue = props.inputValue, dropdownAlign = props.dropdownAlign, disabled = props.disabled, showSearch = props.showSearch, dropdownClassName = props.dropdownClassName, dropdownStyle = props.dropdownStyle, dropdownMatchSelectWidth = props.dropdownMatchSelectWidth; var dropdownPrefixCls = this.getDropdownPrefixCls(); var popupClassName = (_popupClassName = {}, _defineProperty(_popupClassName, dropdownClassName, !!dropdownClassName), _defineProperty(_popupClassName, dropdownPrefixCls + '--' + (multiple ? 'multiple' : 'single'), 1), _popupClassName); var popupElement = this.getDropdownElement({ menuItems: props.options, onPopupFocus: onPopupFocus, multiple: multiple, inputValue: inputValue, visible: visible }); var hideAction = void 0; if (disabled) { hideAction = []; } else if ((0, _util.isSingleMode)(props) && !showSearch) { hideAction = ['click']; } else { hideAction = ['blur']; } var popupStyle = _extends({}, dropdownStyle); var widthProp = dropdownMatchSelectWidth ? 'width' : 'minWidth'; if (this.state.dropdownWidth) { popupStyle[widthProp] = this.state.dropdownWidth + 'px'; } return _react2["default"].createElement( _rcTrigger2["default"], _extends({}, props, { showAction: disabled ? [] : this.props.showAction, hideAction: hideAction, ref: this.saveTriggerRef, popupPlacement: 'bottomLeft', builtinPlacements: BUILT_IN_PLACEMENTS, prefixCls: dropdownPrefixCls, popupTransitionName: this.getDropdownTransitionName(), onPopupVisibleChange: props.onDropdownVisibleChange, popup: popupElement, popupAlign: dropdownAlign, popupVisible: visible, getPopupContainer: props.getPopupContainer, popupClassName: (0, _classnames2["default"])(popupClassName), popupStyle: popupStyle }), props.children ); }; return SelectTrigger; }(_react2["default"].Component); SelectTrigger.propTypes = { onPopupFocus: _propTypes2["default"].func, onPopupScroll: _propTypes2["default"].func, dropdownMatchSelectWidth: _propTypes2["default"].bool, dropdownAlign: _propTypes2["default"].object, visible: _propTypes2["default"].bool, disabled: _propTypes2["default"].bool, showSearch: _propTypes2["default"].bool, dropdownClassName: _propTypes2["default"].string, multiple: _propTypes2["default"].bool, inputValue: _propTypes2["default"].string, filterOption: _propTypes2["default"].any, options: _propTypes2["default"].any, prefixCls: _propTypes2["default"].string, popupClassName: _propTypes2["default"].string, children: _propTypes2["default"].any, showAction: _propTypes2["default"].arrayOf(_propTypes2["default"].string), menuItemSelectedIcon: _propTypes2["default"].oneOfType([_propTypes2["default"].func, _propTypes2["default"].node]) }; var _initialiseProps = function _initialiseProps() { var _this2 = this; this.setDropdownWidth = function () { if (!_this2.props.dropdownMatchSelectWidth) { return; } var width = _reactDom2["default"].findDOMNode(_this2).offsetWidth; if (width !== _this2.state.dropdownWidth) { _this2.setState({ dropdownWidth: width }); } }; this.getInnerMenu = function () { return _this2.dropdownMenuRef && _this2.dropdownMenuRef.menuRef; }; this.getPopupDOMNode = function () { return _this2.triggerRef.getPopupDomNode(); }; this.getDropdownElement = function (newProps) { var props = _this2.props; return _react2["default"].createElement(_DropdownMenu2["default"], _extends({ ref: _this2.saveDropdownMenuRef }, newProps, { prefixCls: _this2.getDropdownPrefixCls(), onMenuSelect: props.onMenuSelect, onMenuDeselect: props.onMenuDeselect, onPopupScroll: props.onPopupScroll, value: props.value, backfillValue: props.backfillValue, firstActiveValue: props.firstActiveValue, defaultActiveFirstOption: props.defaultActiveFirstOption, dropdownMenuStyle: props.dropdownMenuStyle, menuItemSelectedIcon: props.menuItemSelectedIcon })); }; this.getDropdownTransitionName = function () { var props = _this2.props; var transitionName = props.transitionName; if (!transitionName && props.animation) { transitionName = _this2.getDropdownPrefixCls() + '-' + props.animation; } return transitionName; }; this.getDropdownPrefixCls = function () { return _this2.props.prefixCls + '-dropdown'; }; }; exports["default"] = SelectTrigger; SelectTrigger.displayName = 'SelectTrigger'; module.exports = exports['default']; /***/ }), /* 283 */ /***/ (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__(4); var _react2 = _interopRequireDefault(_react); var _reactDom = __webpack_require__(12); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _toArray = __webpack_require__(142); var _toArray2 = _interopRequireDefault(_toArray); var _rcMenu = __webpack_require__(143); var _rcMenu2 = _interopRequireDefault(_rcMenu); var _domScrollIntoView = __webpack_require__(275); var _domScrollIntoView2 = _interopRequireDefault(_domScrollIntoView); var _raf = __webpack_require__(284); var _raf2 = _interopRequireDefault(_raf); var _util = __webpack_require__(281); 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 DropdownMenu = function (_React$Component) { _inherits(DropdownMenu, _React$Component); function DropdownMenu(props) { _classCallCheck(this, DropdownMenu); var _this = _possibleConstructorReturn(this, _React$Component.call(this, props)); _this.scrollActiveItemToView = function () { // scroll into view var itemComponent = (0, _reactDom.findDOMNode)(_this.firstActiveItem); var _this$props = _this.props, value = _this$props.value, visible = _this$props.visible, firstActiveValue = _this$props.firstActiveValue; if (!itemComponent || !visible) { return; } var scrollIntoViewOpts = { onlyScrollIfNeeded: true }; if ((!value || value.length === 0) && firstActiveValue) { scrollIntoViewOpts.alignWithTop = true; } // Delay to scroll since current frame item position is not ready when pre view is by filter // https://github.com/ant-design/ant-design/issues/11268#issuecomment-406634462 _this.rafInstance = (0, _raf2["default"])(function () { (0, _domScrollIntoView2["default"])(itemComponent, (0, _reactDom.findDOMNode)(_this.menuRef), scrollIntoViewOpts); }); }; _this.lastInputValue = props.inputValue; _this.saveMenuRef = (0, _util.saveRef)(_this, 'menuRef'); return _this; } DropdownMenu.prototype.componentDidMount = function componentDidMount() { this.scrollActiveItemToView(); this.lastVisible = this.props.visible; }; DropdownMenu.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) { if (!nextProps.visible) { this.lastVisible = false; } // freeze when hide return nextProps.visible || nextProps.inputValue !== this.props.inputValue; }; DropdownMenu.prototype.componentDidUpdate = function componentDidUpdate(prevProps) { var props = this.props; if (!prevProps.visible && props.visible) { this.scrollActiveItemToView(); } this.lastVisible = props.visible; this.lastInputValue = props.inputValue; }; DropdownMenu.prototype.componentWillUnmount = function componentWillUnmount() { if (this.rafInstance && this.rafInstance.cancel) { this.rafInstance.cancel(); } }; DropdownMenu.prototype.renderMenu = function renderMenu() { var _this2 = this; var props = this.props; var menuItems = props.menuItems, menuItemSelectedIcon = props.menuItemSelectedIcon, defaultActiveFirstOption = props.defaultActiveFirstOption, value = props.value, prefixCls = props.prefixCls, multiple = props.multiple, onMenuSelect = props.onMenuSelect, inputValue = props.inputValue, firstActiveValue = props.firstActiveValue, backfillValue = props.backfillValue; if (menuItems && menuItems.length) { var menuProps = {}; if (multiple) { menuProps.onDeselect = props.onMenuDeselect; menuProps.onSelect = onMenuSelect; } else { menuProps.onClick = onMenuSelect; } var selectedKeys = (0, _util.getSelectKeys)(menuItems, value); var activeKeyProps = {}; var clonedMenuItems = menuItems; if (selectedKeys.length || firstActiveValue) { if (props.visible && !this.lastVisible) { activeKeyProps.activeKey = selectedKeys[0] || firstActiveValue; } var foundFirst = false; // set firstActiveItem via cloning menus // for scroll into view var clone = function clone(item) { if (!foundFirst && selectedKeys.indexOf(item.key) !== -1 || !foundFirst && !selectedKeys.length && firstActiveValue.indexOf(item.key) !== -1) { foundFirst = true; return (0, _react.cloneElement)(item, { ref: function ref(_ref) { _this2.firstActiveItem = _ref; } }); } return item; }; clonedMenuItems = menuItems.map(function (item) { if (item.type.isMenuItemGroup) { var children = (0, _toArray2["default"])(item.props.children).map(clone); return (0, _react.cloneElement)(item, {}, children); } return clone(item); }); } else { // Clear firstActiveItem when dropdown menu items was empty // Avoid `Unable to find node on an unmounted component` // https://github.com/ant-design/ant-design/issues/10774 this.firstActiveItem = null; } // clear activeKey when inputValue change var lastValue = value && value[value.length - 1]; if (inputValue !== this.lastInputValue && (!lastValue || lastValue !== backfillValue)) { activeKeyProps.activeKey = ''; } return _react2["default"].createElement( _rcMenu2["default"], _extends({ ref: this.saveMenuRef, style: this.props.dropdownMenuStyle, defaultActiveFirst: defaultActiveFirstOption, role: 'listbox', itemIcon: multiple ? menuItemSelectedIcon : null }, activeKeyProps, { multiple: multiple }, menuProps, { selectedKeys: selectedKeys, prefixCls: prefixCls + '-menu' }), clonedMenuItems ); } return null; }; DropdownMenu.prototype.render = function render() { var renderMenu = this.renderMenu(); return renderMenu ? _react2["default"].createElement( 'div', { style: { overflow: 'auto', transform: 'translateZ(0)' }, onFocus: this.props.onPopupFocus, onMouseDown: _util.preventDefaultEvent, onScroll: this.props.onPopupScroll }, renderMenu ) : null; }; return DropdownMenu; }(_react2["default"].Component); DropdownMenu.displayName = 'DropdownMenu'; DropdownMenu.propTypes = { defaultActiveFirstOption: _propTypes2["default"].bool, value: _propTypes2["default"].any, dropdownMenuStyle: _propTypes2["default"].object, multiple: _propTypes2["default"].bool, onPopupFocus: _propTypes2["default"].func, onPopupScroll: _propTypes2["default"].func, onMenuDeSelect: _propTypes2["default"].func, onMenuSelect: _propTypes2["default"].func, prefixCls: _propTypes2["default"].string, menuItems: _propTypes2["default"].any, inputValue: _propTypes2["default"].string, visible: _propTypes2["default"].bool, firstActiveValue: _propTypes2["default"].string, menuItemSelectedIcon: _propTypes2["default"].oneOfType([_propTypes2["default"].func, _propTypes2["default"].node]) }; exports["default"] = DropdownMenu; module.exports = exports['default']; /***/ }), /* 284 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {var now = __webpack_require__(285) , 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; }()))) /***/ }), /* 285 */ /***/ (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))) /***/ }), /* 286 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.SelectPropTypes = undefined; var _propTypes = __webpack_require__(5); 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); } } /* eslint-disable consistent-return, prefer-rest-params, import/prefer-default-export */ // TODO: Fix eslint later 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]) }; /***/ }), /* 287 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); 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']; /***/ }), /* 288 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _InputNumber = __webpack_require__(289); var _InputNumber2 = _interopRequireDefault(_InputNumber); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } exports["default"] = _InputNumber2["default"]; module.exports = exports['default']; /***/ }), /* 289 */ /***/ (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__(4); var _react2 = _interopRequireDefault(_react); var _classnames = __webpack_require__(3); var _classnames2 = _interopRequireDefault(_classnames); var _beeInputGroup = __webpack_require__(290); var _beeInputGroup2 = _interopRequireDefault(_beeInputGroup); var _beeFormControl = __webpack_require__(134); var _beeFormControl2 = _interopRequireDefault(_beeFormControl); var _propTypes = __webpack_require__(5); 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 = { max: _propTypes2["default"].number, min: _propTypes2["default"].number, step: _propTypes2["default"].number, autoWidth: _propTypes2["default"].bool, precision: _propTypes2["default"].number, format: _propTypes2["default"].func, delay: _propTypes2["default"].number, disabled: _propTypes2["default"].bool, toNumber: _propTypes2["default"].bool //回调函数内的值是否转换为数值类型 }; var defaultProps = { value: 0, step: 1, clsPrefix: 'u-input-number', iconStyle: 'double', autoWidth: false, delay: 300, toNumber: true }; /** * 校验value * @param {*} props * @param {原来的值} oldValue */ function judgeValue(props, oldValue) { var currentValue = void 0; var currentMinusDisabled = false; var currentPlusDisabled = false; var value = props.value, min = props.min, max = props.max, precision = props.precision, onChange = props.onChange; if (value) { currentValue = Number(value) || 0; } else if (min) { currentValue = min; } else if (value == 0) { currentValue = 0; } else { //NaN if (oldValue || oldValue == 0) { currentValue = oldValue; } } if (currentValue <= min) { currentMinusDisabled = true; } if (currentValue >= max) { currentPlusDisabled = true; } if (props.hasOwnProperty('precision')) { currentValue = currentValue.toFixed(precision); } return { value: currentValue, minusDisabled: currentMinusDisabled, plusDisabled: currentPlusDisabled }; } var InputNumber = function (_Component) { _inherits(InputNumber, _Component); function InputNumber(props) { _classCallCheck(this, InputNumber); // 初始化状态,加减按钮是否可用,根据当前值判断 var _this = _possibleConstructorReturn(this, _Component.call(this, props)); _this.handleChange = function (value) { var _this$props = _this.props, onChange = _this$props.onChange, toNumber = _this$props.toNumber; if (isNaN(value) && value != '.') return; _this.setState({ value: value }); if (value == '.' || value.indexOf('.') == value.length - 1) { //当输入小数点的时候 onChange && onChange(value); } else { toNumber ? onChange && onChange(Number(value)) : onChange && onChange(value); } }; _this.handleFocus = function (value, e) { _this.focus = true; var _this$props2 = _this.props, onFocus = _this$props2.onFocus, min = _this$props2.min, max = _this$props2.max; onFocus && onFocus(value); }; _this.handleBlur = function (v) { _this.focus = false; var _this$props3 = _this.props, onBlur = _this$props3.onBlur, precision = _this$props3.precision, onChange = _this$props3.onChange, toNumber = _this$props3.toNumber; var value = Number(v); if (precision) { value = value.toFixed(precision); } _this.setState({ value: value }); _this.detailDisable(value); if (toNumber) { onBlur && onBlur(Number(value)); onChange && onChange(Number(value)); } else { onBlur && onBlur(value); onChange && onChange(value); } }; _this.detailDisable = function (value) { var _this$props4 = _this.props, max = _this$props4.max, min = _this$props4.min, step = _this$props4.step; if (value >= max || Number(value) + Number(step) > max) { _this.setState({ plusDisabled: true }); } else { _this.setState({ plusDisabled: false }); } if (value <= min || value - step < min) { _this.setState({ minusDisabled: true }); } else { _this.setState({ minusDisabled: false }); } }; _this.minus = function (value) { var _this$props5 = _this.props, min = _this$props5.min, max = _this$props5.max, step = _this$props5.step, onChange = _this$props5.onChange, toNumber = _this$props5.toNumber; if (typeof min === "undefined") { value = _this.detail(value, step, 'reduce'); } else { if (value < min) { value = min; } else { var reducedValue = _this.detail(value, step, 'reduce'); if (reducedValue >= min) { value = reducedValue; } } } if (value > max) { value = max; } _this.setState({ value: value }); toNumber ? onChange && onChange(Number(value)) : onChange && onChange(value); _this.detailDisable(value); }; _this.plus = function (value) { var _this$props6 = _this.props, max = _this$props6.max, min = _this$props6.min, step = _this$props6.step, onChange = _this$props6.onChange, toNumber = _this$props6.toNumber; if (typeof max === "undefined") { value = _this.detail(value, step, 'add'); } else { if (value > max) { value = max; } else { var addedValue = _this.detail(value, step, 'add'); if (addedValue <= max) { value = addedValue; } } } if (value < min) { value = min; } _this.setState({ value: value }); toNumber ? onChange && onChange(Number(value)) : onChange && onChange(value); _this.detailDisable(value); }; _this.detail = function (value, step, type) { var precision = _this.props.precision; var valueFloat = _this.separate(value); var stepFloat = _this.separate(step); var ans = void 0; var stepFloatLength = stepFloat.toString().length; var valueFloatLength = valueFloat.toString().length; if (typeof precision === 'undefined') { precision = Math.max(stepFloatLength, valueFloatLength); } var coefficient = Math.pow(10, Math.abs(stepFloatLength - valueFloatLength)); if (type === 'add') { ans = (value * coefficient + step * coefficient) / coefficient; } else { ans = (value * coefficient - step * coefficient) / coefficient; } return ans.toFixed(precision); }; _this.separate = function (value) { value = value.toString(); if (value.indexOf('.') > -1) { return value.split('.')[1]; } else { return ""; } }; _this.clear = function () { if (_this.timer) { clearTimeout(_this.timer); } }; _this.handlePlusMouseDown = function (e) { var _this$props7 = _this.props, delay = _this$props7.delay, disabled = _this$props7.disabled; if (disabled) return; var value = _this.state.value; _this.plus(value); _this.clear(); _this.timer = setTimeout(function () { _this.handlePlusMouseDown(); }, delay); }; _this.handleReduceMouseDown = function (e) { var _this$props8 = _this.props, delay = _this$props8.delay, disabled = _this$props8.disabled; if (disabled) return; var value = _this.state.value; _this.minus(value); _this.clear(); _this.timer = setTimeout(function () { _this.handleReduceMouseDown(); }, delay); }; var data = judgeValue(props); _this.state = { value: data.value, minusDisabled: data.minusDisabled, plusDisabled: data.plusDisabled }; _this.timer = null; _this.focus = false; return _this; } InputNumber.prototype.ComponentWillMount = function ComponentWillMount() {}; InputNumber.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { if (this.focus) { this.setState({ value: nextProps.value }); } else { var data = judgeValue(nextProps, this.state.value); this.setState({ value: data.value, minusDisabled: data.minusDisabled, plusDisabled: data.plusDisabled }); } }; InputNumber.prototype.ComponentWillUnMount = function ComponentWillUnMount() { this.clear(); }; /** * 设置增加减少按钮是否可用 */ /** * 减法 */ /** * 加法 */ /** * 分离小数和整数 * @param value * @returns {*} */ InputNumber.prototype.render = function render() { var _classes; var _props = this.props, max = _props.max, min = _props.min, step = _props.step, disabled = _props.disabled, clsPrefix = _props.clsPrefix, className = _props.className, delay = _props.delay, onBlur = _props.onBlur, onFocus = _props.onFocus, iconStyle = _props.iconStyle, autoWidth = _props.autoWidth, onChange = _props.onChange, format = _props.format, precision = _props.precision, toNumber = _props.toNumber, others = _objectWithoutProperties(_props, ['max', 'min', 'step', 'disabled', 'clsPrefix', 'className', 'delay', 'onBlur', 'onFocus', 'iconStyle', 'autoWidth', 'onChange', 'format', 'precision', 'toNumber']); var classes = (_classes = {}, _defineProperty(_classes, clsPrefix + '-auto', autoWidth), _defineProperty(_classes, '' + clsPrefix, true), _classes); var _state = this.state, value = _state.value, minusDisabled = _state.minusDisabled, plusDisabled = _state.plusDisabled; value = format ? format(value) : value; var disabledCursor = disabled ? ' disabled-cursor' : ''; return _react2["default"].createElement( 'div', null, iconStyle === 'double' ? _react2["default"].createElement( _beeInputGroup2["default"], { className: (0, _classnames2["default"])(className, classes) }, _react2["default"].createElement( _beeInputGroup2["default"].Addon, { className: (minusDisabled && 'disabled') + disabledCursor, onMouseDown: this.handleReduceMouseDown, onMouseLeave: this.clear, onMouseUp: this.clear }, '-' ), _react2["default"].createElement(_beeFormControl2["default"], _extends({}, others, { value: value, disabled: disabled, onBlur: this.handleBlur, onFocus: this.handleFocus, onChange: this.handleChange })), _react2["default"].createElement( _beeInputGroup2["default"].Addon, { className: (plusDisabled && 'disabled') + disabledCursor, onMouseDown: this.handlePlusMouseDown, onMouseLeave: this.clear, onMouseUp: this.clear }, '+' ) ) : _react2["default"].createElement( _beeInputGroup2["default"], { className: (0, _classnames2["default"])(className, classes), simple: true }, _react2["default"].createElement(_beeFormControl2["default"], _extends({}, others, { value: value, disabled: disabled, onBlur: this.handleBlur, onFocus: this.handleFocus, onChange: this.handleChange })), _react2["default"].createElement( _beeInputGroup2["default"].Button, null, _react2["default"].createElement( 'div', { className: 'icon-group' }, _react2["default"].createElement( 'span', { onMouseDown: this.handlePlusMouseDown, onMouseLeave: this.clear, onMouseUp: this.clear, className: (0, _classnames2["default"])('plus', { 'disabled': plusDisabled, 'disabled-cursor': disabledCursor }) }, _react2["default"].createElement('span', { className: 'uf uf-arrow-up' }) ), _react2["default"].createElement( 'span', { onMouseDown: this.handleReduceMouseDown, onMouseLeave: this.clear, onMouseUp: this.clear, className: (0, _classnames2["default"])("reduce", { 'disabled': minusDisabled, 'disabled-cursor': disabledCursor }) }, _react2["default"].createElement('span', { className: ' uf uf-arrow-down' }) ) ) ) ) ); }; return InputNumber; }(_react.Component); ; InputNumber.defaultProps = defaultProps; InputNumber.propTypes = propTypes; exports["default"] = InputNumber; module.exports = exports['default']; /***/ }), /* 290 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; module.exports = __webpack_require__(291); /***/ }), /* 291 */ /***/ (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__(4); var _react2 = _interopRequireDefault(_react); var _beeInputGroupAddon = __webpack_require__(292); var _beeInputGroupAddon2 = _interopRequireDefault(_beeInputGroupAddon); var _InputGroupButton = __webpack_require__(294); var _InputGroupButton2 = _interopRequireDefault(_InputGroupButton); 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 defaultProps = { clsPrefix: 'u-input-group', simple: false }; var InputGroup = function (_React$Component) { _inherits(InputGroup, _React$Component); function InputGroup() { _classCallCheck(this, InputGroup); return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); } InputGroup.prototype.render = function render() { var _props = this.props, className = _props.className, clsPrefix = _props.clsPrefix, simple = _props.simple, others = _objectWithoutProperties(_props, ['className', 'clsPrefix', 'simple']); return _react2["default"].createElement('span', _extends({}, others, { className: (0, _classnames2["default"])(className, clsPrefix, simple && 'simple') })); }; return InputGroup; }(_react2["default"].Component); /** * 将InputGroupAddon与InputGroupButton组件作为InputGroup的附属组件 */ InputGroup.Addon = _beeInputGroupAddon2["default"]; InputGroup.Button = _InputGroupButton2["default"]; InputGroup.defaultProps = defaultProps; exports["default"] = InputGroup; module.exports = exports['default']; /***/ }), /* 292 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _InputGroupAddon = __webpack_require__(293); var _InputGroupAddon2 = _interopRequireDefault(_InputGroupAddon); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } exports["default"] = _InputGroupAddon2["default"]; module.exports = exports['default']; /***/ }), /* 293 */ /***/ (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__(4); 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 _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 defaultProps = { clsPrefix: 'u-input-group-addon' }; var InputGroupAddon = function (_React$Component) { _inherits(InputGroupAddon, _React$Component); function InputGroupAddon() { _classCallCheck(this, InputGroupAddon); return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); } InputGroupAddon.prototype.render = function render() { var _props = this.props; var className = _props.className; var clsPrefix = _props.clsPrefix; var others = _objectWithoutProperties(_props, ['className', 'clsPrefix']); return _react2["default"].createElement('span', _extends({}, others, { className: (0, _classnames2["default"])(className, clsPrefix) })); }; return InputGroupAddon; }(_react2["default"].Component); InputGroupAddon.defaultProps = defaultProps; exports["default"] = InputGroupAddon; module.exports = exports['default']; /***/ }), /* 294 */ /***/ (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__(4); 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 _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 defaultProps = { clsPrefix: 'u-input-group-btn' }; var InputGroupButton = function (_React$Component) { _inherits(InputGroupButton, _React$Component); function InputGroupButton() { _classCallCheck(this, InputGroupButton); return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); } InputGroupButton.prototype.render = function render() { 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) })); }; return InputGroupButton; }(_react2["default"].Component); InputGroupButton.defaultProps = defaultProps; exports["default"] = InputGroupButton; module.exports = exports['default']; /***/ }), /* 295 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _DatePicker = __webpack_require__(296); var _DatePicker2 = _interopRequireDefault(_DatePicker); var _MonthPicker = __webpack_require__(451); var _MonthPicker2 = _interopRequireDefault(_MonthPicker); var _RangePicker = __webpack_require__(453); var _RangePicker2 = _interopRequireDefault(_RangePicker); var _WeekPicker = __webpack_require__(473); var _WeekPicker2 = _interopRequireDefault(_WeekPicker); var _YearPicker = __webpack_require__(474); var _YearPicker2 = _interopRequireDefault(_YearPicker); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } _DatePicker2["default"].MonthPicker = _MonthPicker2["default"]; _DatePicker2["default"].RangePicker = _RangePicker2["default"]; _DatePicker2["default"].WeekPicker = _WeekPicker2["default"]; _DatePicker2["default"].YearPicker = _YearPicker2["default"]; exports["default"] = _DatePicker2["default"]; module.exports = exports['default']; /***/ }), /* 296 */ /***/ (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 _rcCalendar = __webpack_require__(297); var _rcCalendar2 = _interopRequireDefault(_rcCalendar); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _tinperBeeCore = __webpack_require__(27); var _Picker = __webpack_require__(445); var _Picker2 = _interopRequireDefault(_Picker); var _beeFormControl = __webpack_require__(134); var _beeFormControl2 = _interopRequireDefault(_beeFormControl); var _Panel = __webpack_require__(447); var _Panel2 = _interopRequireDefault(_Panel); var _moment = __webpack_require__(302); var _moment2 = _interopRequireDefault(_moment); var _beeIcon = __webpack_require__(136); var _beeIcon2 = _interopRequireDefault(_beeIcon); var _beeInputGroup = __webpack_require__(290); var _beeInputGroup2 = _interopRequireDefault(_beeInputGroup); 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); } /** * Created by chief on 17/4/6. */ var timePickerElement = _react2["default"].createElement(_Panel2["default"], { defaultValue: (0, _moment2["default"])("00:00:00", "HH:mm:ss") }); var DatePicker = function (_Component) { _inherits(DatePicker, _Component); function DatePicker(props, context) { _classCallCheck(this, DatePicker); var _this = _possibleConstructorReturn(this, _Component.call(this, props, context)); _initialiseProps.call(_this); _this.state = { type: "month", value: props.value || props.defaultValue || _moment2["default"].Moment, open: props.open || false }; return _this; } DatePicker.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { if ("value" in nextProps) { this.setState({ value: nextProps.value }); } this.setState({ renderIcon: nextProps.renderIcon, open: nextProps.open || false }); }; DatePicker.prototype.render = function render() { var _this2 = this; var state = this.state; var props = this.props; var value = state.value; var pickerChangeHandler = {}; var calendarHandler = {}; var autofocus = this.props.autofocus ? { autofocus: 'autofocus' } : null; if (props.showTime) { calendarHandler = { // fix https://github.com/ant-design/ant-design/issues/1902 onSelect: this.handleChange }; } else { pickerChangeHandler = { onChange: this.handleChange }; } var calendar = _react2["default"].createElement(_rcCalendar2["default"], _extends({ timePicker: props.showTime ? timePickerElement : null }, props, { onChange: this.handleCalendarChange, value: this.state.value })); return _react2["default"].createElement( "div", { className: props.className }, _react2["default"].createElement( _Picker2["default"], _extends({}, props, pickerChangeHandler, { onOpenChange: this.onOpenChange, animation: "slide-up", calendar: calendar, mode: 'year', open: this.state.open, value: state.value }), function () { return _react2["default"].createElement( _beeInputGroup2["default"], { simple: true, className: "datepicker-input-group" }, _react2["default"].createElement(_beeFormControl2["default"], _extends({ disabled: props.disabled, readOnly: true, placeholder: _this2.props.placeholder, value: value && value.format(props.format) || "", onClick: function onClick(event) { _this2.onClick(event); } }, autofocus, { focusSelect: props.defaultSelected })), _react2["default"].createElement( _beeInputGroup2["default"].Button, { shape: "border" }, props.renderIcon() ) ); } ) ); }; return DatePicker; }(_react.Component); var _initialiseProps = function _initialiseProps() { var _this3 = this; this.onChange = function (value) { var props = _this3.props; _this3.setState({ value: value }); }; this.inputFocus = function () { var input = document.querySelector('.rc-calendar-input'); if (input) { if (input.value) { input.select(); } else { input.focus(); } input.onkeydown = function (e) { if (e.keyCode == _tinperBeeCore.KeyCode.DELETE) { input.value = ''; _this3.props.onChange('', ''); } else if (e.keyCode == _tinperBeeCore.KeyCode.ESC) { _this3.setState({ open: false }); var v = _this3.state.value; _this3.props.onOpenChange(false, v, v && v.format(_this3.props.format) || ''); } }; } }; this.onOpenChange = function (open) { var props = _this3.props; var self = _this3; _this3.setState({ open: open }); setTimeout(function () { var value = self.state.value; props.onOpenChange(open, value, value && value.format(props.format) || ''); self.inputFocus(); }, 200); }; this.handleCalendarChange = function (value) { var props = _this3.props; _this3.setState({ value: value }); //props.onChange(value, (value && value.format(props.format)) || ''); }; this.handleChange = function (value) { var props = _this3.props; _this3.setState({ value: value }); props.onChange(value, value && value.format(props.format) || ''); }; this.onClick = function (e) { var props = _this3.props; var value = _this3.state.value; props.onClick && props.onClick(e.nativeEvent, value || null, value && value.format(props.format) || ''); }; }; DatePicker.defaultProps = { renderIcon: function renderIcon() { return _react2["default"].createElement(_beeIcon2["default"], { type: "uf-calendar" }); }, focusOnOpen: true, defultSelect: false, onOpenChange: function onOpenChange() {} }; exports["default"] = DatePicker; module.exports = exports["default"]; /***/ }), /* 297 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _Calendar = __webpack_require__(298); var _Calendar2 = _interopRequireDefault(_Calendar); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } exports['default'] = _Calendar2['default']; module.exports = exports['default']; /***/ }), /* 298 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends2 = __webpack_require__(145); var _extends3 = _interopRequireDefault(_extends2); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _reactDom = __webpack_require__(12); var _reactDom2 = _interopRequireDefault(_reactDom); var _createReactClass = __webpack_require__(245); var _createReactClass2 = _interopRequireDefault(_createReactClass); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _KeyCode = __webpack_require__(238); var _KeyCode2 = _interopRequireDefault(_KeyCode); var _DateTable = __webpack_require__(299); var _DateTable2 = _interopRequireDefault(_DateTable); var _CalendarHeader = __webpack_require__(431); var _CalendarHeader2 = _interopRequireDefault(_CalendarHeader); var _CalendarFooter = __webpack_require__(437); var _CalendarFooter2 = _interopRequireDefault(_CalendarFooter); var _CalendarMixin = __webpack_require__(441); var _CalendarMixin2 = _interopRequireDefault(_CalendarMixin); var _CommonMixin = __webpack_require__(442); var _CommonMixin2 = _interopRequireDefault(_CommonMixin); var _DateInput = __webpack_require__(444); var _DateInput2 = _interopRequireDefault(_DateInput); var _util = __webpack_require__(430); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function noop() {} function goStartMonth() { var next = this.state.value.clone(); next.startOf('month'); this.setValue(next); } function goEndMonth() { var next = this.state.value.clone(); next.endOf('month'); this.setValue(next); } function goTime(direction, unit) { var next = this.state.value.clone(); next.add(direction, unit); this.setValue(next); } function goMonth(direction) { return goTime.call(this, direction, 'months'); } function goYear(direction) { return goTime.call(this, direction, 'years'); } function goWeek(direction) { return goTime.call(this, direction, 'weeks'); } function goDay(direction) { return goTime.call(this, direction, 'days'); } var Calendar = (0, _createReactClass2['default'])({ displayName: 'Calendar', propTypes: { disabledDate: _propTypes2['default'].func, disabledTime: _propTypes2['default'].any, value: _propTypes2['default'].object, selectedValue: _propTypes2['default'].object, defaultValue: _propTypes2['default'].object, className: _propTypes2['default'].string, locale: _propTypes2['default'].object, showWeekNumber: _propTypes2['default'].bool, style: _propTypes2['default'].object, showToday: _propTypes2['default'].bool, showDateInput: _propTypes2['default'].bool, visible: _propTypes2['default'].bool, onSelect: _propTypes2['default'].func, onOk: _propTypes2['default'].func, showOk: _propTypes2['default'].bool, prefixCls: _propTypes2['default'].string, onKeyDown: _propTypes2['default'].func, timePicker: _propTypes2['default'].element, dateInputPlaceholder: _propTypes2['default'].any, onClear: _propTypes2['default'].func, onChange: _propTypes2['default'].func, renderFooter: _propTypes2['default'].func, renderSidebar: _propTypes2['default'].func }, mixins: [_CommonMixin2['default'], _CalendarMixin2['default']], getDefaultProps: function getDefaultProps() { return { showToday: true, showDateInput: true, timePicker: null, onOk: noop }; }, getInitialState: function getInitialState() { return { showTimePicker: false }; }, onKeyDown: function onKeyDown(event) { if (event.target.nodeName.toLowerCase() === 'input') { return undefined; } var keyCode = event.keyCode; // mac var ctrlKey = event.ctrlKey || event.metaKey; var disabledDate = this.props.disabledDate; var value = this.state.value; switch (keyCode) { case _KeyCode2['default'].DOWN: goWeek.call(this, 1); event.preventDefault(); return 1; case _KeyCode2['default'].UP: goWeek.call(this, -1); event.preventDefault(); return 1; case _KeyCode2['default'].LEFT: if (ctrlKey) { goYear.call(this, -1); } else { goDay.call(this, -1); } event.preventDefault(); return 1; case _KeyCode2['default'].RIGHT: if (ctrlKey) { goYear.call(this, 1); } else { goDay.call(this, 1); } event.preventDefault(); return 1; case _KeyCode2['default'].HOME: goStartMonth.call(this); event.preventDefault(); return 1; case _KeyCode2['default'].END: goEndMonth.call(this); event.preventDefault(); return 1; case _KeyCode2['default'].PAGE_DOWN: goMonth.call(this, 1); event.preventDefault(); return 1; case _KeyCode2['default'].PAGE_UP: goMonth.call(this, -1); event.preventDefault(); return 1; case _KeyCode2['default'].ENTER: if (!disabledDate || !disabledDate(value)) { this.onSelect(value, { source: 'keyboard' }); } event.preventDefault(); return 1; default: this.props.onKeyDown(event); return 1; } }, onClear: function onClear() { this.onSelect(null); this.props.onClear(); }, onOk: function onOk() { var selectedValue = this.state.selectedValue; if (this.isAllowedDate(selectedValue)) { this.props.onOk(selectedValue); } }, onDateInputChange: function onDateInputChange(value) { this.onSelect(value, { source: 'dateInput' }); }, onDateTableSelect: function onDateTableSelect(value) { var timePicker = this.props.timePicker; var selectedValue = this.state.selectedValue; if (!selectedValue && timePicker) { var timePickerDefaultValue = timePicker.props.defaultValue; if (timePickerDefaultValue) { (0, _util.syncTime)(timePickerDefaultValue, value); } } this.onSelect(value); }, onToday: function onToday() { var value = this.state.value; var now = (0, _util.getTodayTime)(value); this.onSelect(now, { source: 'todayButton' }); }, getRootDOMNode: function getRootDOMNode() { return _reactDom2['default'].findDOMNode(this); }, openTimePicker: function openTimePicker() { this.setState({ showTimePicker: true }); }, closeTimePicker: function closeTimePicker() { this.setState({ showTimePicker: false }); }, render: function render() { var props = this.props; var locale = props.locale, prefixCls = props.prefixCls, disabledDate = props.disabledDate, dateInputPlaceholder = props.dateInputPlaceholder, timePicker = props.timePicker, disabledTime = props.disabledTime; var state = this.state; var value = state.value, selectedValue = state.selectedValue, showTimePicker = state.showTimePicker; var disabledTimeConfig = showTimePicker && disabledTime && timePicker ? (0, _util.getTimeConfig)(selectedValue, disabledTime) : null; var timePickerEle = timePicker && showTimePicker ? _react2['default'].cloneElement(timePicker, (0, _extends3['default'])({ showHour: true, showSecond: true, showMinute: true }, timePicker.props, disabledTimeConfig, { onChange: this.onDateInputChange, defaultOpenValue: timePicker.props.defaultValue, value: selectedValue, disabledTime: disabledTime })) : null; var dateInputElement = props.showDateInput ? _react2['default'].createElement(_DateInput2['default'], { ref: 'dateInput', format: this.getFormat(), key: 'date-input', value: value, locale: locale, placeholder: dateInputPlaceholder, showClear: true, disabledTime: disabledTime, disabledDate: disabledDate, onClear: this.onClear, prefixCls: prefixCls, selectedValue: selectedValue, onChange: this.onDateInputChange }) : null; var children = [props.renderSidebar(), _react2['default'].createElement( 'div', { className: prefixCls + '-panel', key: 'panel' }, dateInputElement, _react2['default'].createElement( 'div', { className: prefixCls + '-date-panel' }, _react2['default'].createElement(_CalendarHeader2['default'], { locale: locale, onValueChange: this.setValue, value: value, showTimePicker: showTimePicker, prefixCls: prefixCls }), timePicker && showTimePicker ? _react2['default'].createElement( 'div', { className: prefixCls + '-time-picker' }, _react2['default'].createElement( 'div', { className: prefixCls + '-time-picker-panel' }, timePickerEle ) ) : null, _react2['default'].createElement( 'div', { className: prefixCls + '-body' }, _react2['default'].createElement(_DateTable2['default'], { locale: locale, value: value, selectedValue: selectedValue, prefixCls: prefixCls, dateRender: props.dateRender, onSelect: this.onDateTableSelect, disabledDate: disabledDate, showWeekNumber: props.showWeekNumber }) ), _react2['default'].createElement(_CalendarFooter2['default'], { showOk: props.showOk, renderFooter: props.renderFooter, locale: locale, prefixCls: prefixCls, showToday: props.showToday, disabledTime: disabledTime, showTimePicker: showTimePicker, showDateInput: props.showDateInput, timePicker: timePicker, selectedValue: selectedValue, value: value, disabledDate: disabledDate, okDisabled: !this.isAllowedDate(selectedValue), onOk: this.onOk, onSelect: this.onSelect, onToday: this.onToday, onOpenTimePicker: this.openTimePicker, onCloseTimePicker: this.closeTimePicker }) ) )]; return this.renderRoot({ children: children, className: props.showWeekNumber ? prefixCls + '-week-number' : '' }); } }); exports['default'] = Calendar; module.exports = exports['default']; /***/ }), /* 299 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _classCallCheck2 = __webpack_require__(185); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _createClass2 = __webpack_require__(254); var _createClass3 = _interopRequireDefault(_createClass2); var _possibleConstructorReturn2 = __webpack_require__(186); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(220); var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _DateTHead = __webpack_require__(300); var _DateTHead2 = _interopRequireDefault(_DateTHead); var _DateTBody = __webpack_require__(429); var _DateTBody2 = _interopRequireDefault(_DateTBody); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var DateTable = function (_React$Component) { (0, _inherits3['default'])(DateTable, _React$Component); function DateTable() { (0, _classCallCheck3['default'])(this, DateTable); return (0, _possibleConstructorReturn3['default'])(this, (DateTable.__proto__ || Object.getPrototypeOf(DateTable)).apply(this, arguments)); } (0, _createClass3['default'])(DateTable, [{ key: 'render', value: function render() { var props = this.props; var prefixCls = props.prefixCls; return _react2['default'].createElement( 'table', { className: prefixCls + '-table', cellSpacing: '0', role: 'grid' }, _react2['default'].createElement(_DateTHead2['default'], props), _react2['default'].createElement(_DateTBody2['default'], props) ); } }]); return DateTable; }(_react2['default'].Component); exports['default'] = DateTable; module.exports = exports['default']; /***/ }), /* 300 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _classCallCheck2 = __webpack_require__(185); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _createClass2 = __webpack_require__(254); var _createClass3 = _interopRequireDefault(_createClass2); var _possibleConstructorReturn2 = __webpack_require__(186); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(220); var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _DateConstants = __webpack_require__(301); var _DateConstants2 = _interopRequireDefault(_DateConstants); var _moment = __webpack_require__(302); var _moment2 = _interopRequireDefault(_moment); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var DateTHead = function (_React$Component) { (0, _inherits3['default'])(DateTHead, _React$Component); function DateTHead() { (0, _classCallCheck3['default'])(this, DateTHead); return (0, _possibleConstructorReturn3['default'])(this, (DateTHead.__proto__ || Object.getPrototypeOf(DateTHead)).apply(this, arguments)); } (0, _createClass3['default'])(DateTHead, [{ key: 'render', value: function render() { var props = this.props; var value = props.value; var localeData = value.localeData(); var prefixCls = props.prefixCls; var veryShortWeekdays = []; var weekDays = []; var firstDayOfWeek = localeData.firstDayOfWeek(); var showWeekNumberEl = void 0; var now = (0, _moment2['default'])(); for (var dateColIndex = 0; dateColIndex < _DateConstants2['default'].DATE_COL_COUNT; dateColIndex++) { var index = (firstDayOfWeek + dateColIndex) % _DateConstants2['default'].DATE_COL_COUNT; now.day(index); veryShortWeekdays[dateColIndex] = localeData.weekdaysMin(now); weekDays[dateColIndex] = localeData.weekdaysShort(now); } if (props.showWeekNumber) { showWeekNumberEl = _react2['default'].createElement( 'th', { role: 'columnheader', className: prefixCls + '-column-header ' + prefixCls + '-week-number-header' }, _react2['default'].createElement( 'span', { className: prefixCls + '-column-header-inner' }, 'x' ) ); } var weekDaysEls = weekDays.map(function (day, xindex) { return _react2['default'].createElement( 'th', { key: xindex, role: 'columnheader', title: day, className: prefixCls + '-column-header' }, _react2['default'].createElement( 'span', { className: prefixCls + '-column-header-inner' }, veryShortWeekdays[xindex] ) ); }); return _react2['default'].createElement( 'thead', null, _react2['default'].createElement( 'tr', { role: 'row' }, showWeekNumberEl, weekDaysEls ) ); } }]); return DateTHead; }(_react2['default'].Component); exports['default'] = DateTHead; module.exports = exports['default']; /***/ }), /* 301 */ /***/ (function(module, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = { DATE_ROW_COUNT: 6, DATE_COL_COUNT: 7 }; module.exports = exports['default']; /***/ }), /* 302 */ /***/ (function(module, exports, __webpack_require__) { var require;/* WEBPACK VAR INJECTION */(function(module) {//! moment.js ;(function (global, factory) { true ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : global.moment = factory() }(this, (function () { 'use strict'; var hookCallback; function hooks () { return hookCallback.apply(null, arguments); } // This is done to register the method called with moment() // without creating circular dependencies. function setHookCallback (callback) { hookCallback = callback; } function isArray(input) { return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]'; } function isObject(input) { // IE8 will treat undefined and null as object if it wasn't for // input != null return input != null && Object.prototype.toString.call(input) === '[object Object]'; } function isObjectEmpty(obj) { if (Object.getOwnPropertyNames) { return (Object.getOwnPropertyNames(obj).length === 0); } else { var k; for (k in obj) { if (obj.hasOwnProperty(k)) { return false; } } return true; } } function isUndefined(input) { return input === void 0; } function isNumber(input) { return typeof input === 'number' || Object.prototype.toString.call(input) === '[object Number]'; } function isDate(input) { return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]'; } function map(arr, fn) { var res = [], i; for (i = 0; i < arr.length; ++i) { res.push(fn(arr[i], i)); } return res; } function hasOwnProp(a, b) { return Object.prototype.hasOwnProperty.call(a, b); } function extend(a, b) { for (var i in b) { if (hasOwnProp(b, i)) { a[i] = b[i]; } } if (hasOwnProp(b, 'toString')) { a.toString = b.toString; } if (hasOwnProp(b, 'valueOf')) { a.valueOf = b.valueOf; } return a; } function createUTC (input, format, locale, strict) { return createLocalOrUTC(input, format, locale, strict, true).utc(); } function defaultParsingFlags() { // We need to deep clone this object. return { empty : false, unusedTokens : [], unusedInput : [], overflow : -2, charsLeftOver : 0, nullInput : false, invalidMonth : null, invalidFormat : false, userInvalidated : false, iso : false, parsedDateParts : [], meridiem : null, rfc2822 : false, weekdayMismatch : false }; } function getParsingFlags(m) { if (m._pf == null) { m._pf = defaultParsingFlags(); } return m._pf; } var some; if (Array.prototype.some) { some = Array.prototype.some; } else { some = function (fun) { var t = Object(this); var len = t.length >>> 0; for (var i = 0; i < len; i++) { if (i in t && fun.call(this, t[i], i, t)) { return true; } } return false; }; } function isValid(m) { if (m._isValid == null) { var flags = getParsingFlags(m); var parsedParts = some.call(flags.parsedDateParts, function (i) { return i != null; }); var isNowValid = !isNaN(m._d.getTime()) && flags.overflow < 0 && !flags.empty && !flags.invalidMonth && !flags.invalidWeekday && !flags.weekdayMismatch && !flags.nullInput && !flags.invalidFormat && !flags.userInvalidated && (!flags.meridiem || (flags.meridiem && parsedParts)); if (m._strict) { isNowValid = isNowValid && flags.charsLeftOver === 0 && flags.unusedTokens.length === 0 && flags.bigHour === undefined; } if (Object.isFrozen == null || !Object.isFrozen(m)) { m._isValid = isNowValid; } else { return isNowValid; } } return m._isValid; } function createInvalid (flags) { var m = createUTC(NaN); if (flags != null) { extend(getParsingFlags(m), flags); } else { getParsingFlags(m).userInvalidated = true; } return m; } // Plugins that add properties should also add the key here (null value), // so we can properly clone ourselves. var momentProperties = hooks.momentProperties = []; function copyConfig(to, from) { var i, prop, val; if (!isUndefined(from._isAMomentObject)) { to._isAMomentObject = from._isAMomentObject; } if (!isUndefined(from._i)) { to._i = from._i; } if (!isUndefined(from._f)) { to._f = from._f; } if (!isUndefined(from._l)) { to._l = from._l; } if (!isUndefined(from._strict)) { to._strict = from._strict; } if (!isUndefined(from._tzm)) { to._tzm = from._tzm; } if (!isUndefined(from._isUTC)) { to._isUTC = from._isUTC; } if (!isUndefined(from._offset)) { to._offset = from._offset; } if (!isUndefined(from._pf)) { to._pf = getParsingFlags(from); } if (!isUndefined(from._locale)) { to._locale = from._locale; } if (momentProperties.length > 0) { for (i = 0; i < momentProperties.length; i++) { prop = momentProperties[i]; val = from[prop]; if (!isUndefined(val)) { to[prop] = val; } } } return to; } var updateInProgress = false; // Moment prototype object function Moment(config) { copyConfig(this, config); this._d = new Date(config._d != null ? config._d.getTime() : NaN); if (!this.isValid()) { this._d = new Date(NaN); } // Prevent infinite loop in case updateOffset creates new moment // objects. if (updateInProgress === false) { updateInProgress = true; hooks.updateOffset(this); updateInProgress = false; } } function isMoment (obj) { return obj instanceof Moment || (obj != null && obj._isAMomentObject != null); } function absFloor (number) { if (number < 0) { // -0 -> 0 return Math.ceil(number) || 0; } else { return Math.floor(number); } } function toInt(argumentForCoercion) { var coercedNumber = +argumentForCoercion, value = 0; if (coercedNumber !== 0 && isFinite(coercedNumber)) { value = absFloor(coercedNumber); } return value; } // compare two arrays, return the number of differences function compareArrays(array1, array2, dontConvert) { var len = Math.min(array1.length, array2.length), lengthDiff = Math.abs(array1.length - array2.length), diffs = 0, i; for (i = 0; i < len; i++) { if ((dontConvert && array1[i] !== array2[i]) || (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) { diffs++; } } return diffs + lengthDiff; } function warn(msg) { if (hooks.suppressDeprecationWarnings === false && (typeof console !== 'undefined') && console.warn) { console.warn('Deprecation warning: ' + msg); } } function deprecate(msg, fn) { var firstTime = true; return extend(function () { if (hooks.deprecationHandler != null) { hooks.deprecationHandler(null, msg); } if (firstTime) { var args = []; var arg; for (var i = 0; i < arguments.length; i++) { arg = ''; if (typeof arguments[i] === 'object') { arg += '\n[' + i + '] '; for (var key in arguments[0]) { arg += key + ': ' + arguments[0][key] + ', '; } arg = arg.slice(0, -2); // Remove trailing comma and space } else { arg = arguments[i]; } args.push(arg); } warn(msg + '\nArguments: ' + Array.prototype.slice.call(args).join('') + '\n' + (new Error()).stack); firstTime = false; } return fn.apply(this, arguments); }, fn); } var deprecations = {}; function deprecateSimple(name, msg) { if (hooks.deprecationHandler != null) { hooks.deprecationHandler(name, msg); } if (!deprecations[name]) { warn(msg); deprecations[name] = true; } } hooks.suppressDeprecationWarnings = false; hooks.deprecationHandler = null; function isFunction(input) { return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]'; } function set (config) { var prop, i; for (i in config) { prop = config[i]; if (isFunction(prop)) { this[i] = prop; } else { this['_' + i] = prop; } } this._config = config; // Lenient ordinal parsing accepts just a number in addition to // number + (possibly) stuff coming from _dayOfMonthOrdinalParse. // TODO: Remove "ordinalParse" fallback in next major release. this._dayOfMonthOrdinalParseLenient = new RegExp( (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + '|' + (/\d{1,2}/).source); } function mergeConfigs(parentConfig, childConfig) { var res = extend({}, parentConfig), prop; for (prop in childConfig) { if (hasOwnProp(childConfig, prop)) { if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) { res[prop] = {}; extend(res[prop], parentConfig[prop]); extend(res[prop], childConfig[prop]); } else if (childConfig[prop] != null) { res[prop] = childConfig[prop]; } else { delete res[prop]; } } } for (prop in parentConfig) { if (hasOwnProp(parentConfig, prop) && !hasOwnProp(childConfig, prop) && isObject(parentConfig[prop])) { // make sure changes to properties don't modify parent config res[prop] = extend({}, res[prop]); } } return res; } function Locale(config) { if (config != null) { this.set(config); } } var keys; if (Object.keys) { keys = Object.keys; } else { keys = function (obj) { var i, res = []; for (i in obj) { if (hasOwnProp(obj, i)) { res.push(i); } } return res; }; } var defaultCalendar = { sameDay : '[Today at] LT', nextDay : '[Tomorrow at] LT', nextWeek : 'dddd [at] LT', lastDay : '[Yesterday at] LT', lastWeek : '[Last] dddd [at] LT', sameElse : 'L' }; function calendar (key, mom, now) { var output = this._calendar[key] || this._calendar['sameElse']; return isFunction(output) ? output.call(mom, now) : output; } var defaultLongDateFormat = { LTS : 'h:mm:ss A', LT : 'h:mm A', L : 'MM/DD/YYYY', LL : 'MMMM D, YYYY', LLL : 'MMMM D, YYYY h:mm A', LLLL : 'dddd, MMMM D, YYYY h:mm A' }; function longDateFormat (key) { var format = this._longDateFormat[key], formatUpper = this._longDateFormat[key.toUpperCase()]; if (format || !formatUpper) { return format; } this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) { return val.slice(1); }); return this._longDateFormat[key]; } var defaultInvalidDate = 'Invalid date'; function invalidDate () { return this._invalidDate; } var defaultOrdinal = '%d'; var defaultDayOfMonthOrdinalParse = /\d{1,2}/; function ordinal (number) { return this._ordinal.replace('%d', number); } var defaultRelativeTime = { 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' }; function relativeTime (number, withoutSuffix, string, isFuture) { var output = this._relativeTime[string]; return (isFunction(output)) ? output(number, withoutSuffix, string, isFuture) : output.replace(/%d/i, number); } function pastFuture (diff, output) { var format = this._relativeTime[diff > 0 ? 'future' : 'past']; return isFunction(format) ? format(output) : format.replace(/%s/i, output); } var aliases = {}; function addUnitAlias (unit, shorthand) { var lowerCase = unit.toLowerCase(); aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit; } function normalizeUnits(units) { return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined; } function normalizeObjectUnits(inputObject) { var normalizedInput = {}, normalizedProp, prop; for (prop in inputObject) { if (hasOwnProp(inputObject, prop)) { normalizedProp = normalizeUnits(prop); if (normalizedProp) { normalizedInput[normalizedProp] = inputObject[prop]; } } } return normalizedInput; } var priorities = {}; function addUnitPriority(unit, priority) { priorities[unit] = priority; } function getPrioritizedUnits(unitsObj) { var units = []; for (var u in unitsObj) { units.push({unit: u, priority: priorities[u]}); } units.sort(function (a, b) { return a.priority - b.priority; }); return units; } function zeroFill(number, targetLength, forceSign) { var absNumber = '' + Math.abs(number), zerosToFill = targetLength - absNumber.length, sign = number >= 0; return (sign ? (forceSign ? '+' : '') : '-') + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber; } var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g; var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g; var formatFunctions = {}; var formatTokenFunctions = {}; // token: 'M' // padded: ['MM', 2] // ordinal: 'Mo' // callback: function () { this.month() + 1 } function addFormatToken (token, padded, ordinal, callback) { var func = callback; if (typeof callback === 'string') { func = function () { return this[callback](); }; } if (token) { formatTokenFunctions[token] = func; } if (padded) { formatTokenFunctions[padded[0]] = function () { return zeroFill(func.apply(this, arguments), padded[1], padded[2]); }; } if (ordinal) { formatTokenFunctions[ordinal] = function () { return this.localeData().ordinal(func.apply(this, arguments), token); }; } } function removeFormattingTokens(input) { if (input.match(/\[[\s\S]/)) { return input.replace(/^\[|\]$/g, ''); } return input.replace(/\\/g, ''); } function makeFormatFunction(format) { var array = format.match(formattingTokens), i, length; for (i = 0, length = array.length; i < length; i++) { if (formatTokenFunctions[array[i]]) { array[i] = formatTokenFunctions[array[i]]; } else { array[i] = removeFormattingTokens(array[i]); } } return function (mom) { var output = '', i; for (i = 0; i < length; i++) { output += isFunction(array[i]) ? array[i].call(mom, format) : array[i]; } return output; }; } // format date using native date object function formatMoment(m, format) { if (!m.isValid()) { return m.localeData().invalidDate(); } format = expandFormat(format, m.localeData()); formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format); return formatFunctions[format](m); } function expandFormat(format, locale) { var i = 5; function replaceLongDateFormatTokens(input) { return locale.longDateFormat(input) || input; } localFormattingTokens.lastIndex = 0; while (i >= 0 && localFormattingTokens.test(format)) { format = format.replace(localFormattingTokens, replaceLongDateFormatTokens); localFormattingTokens.lastIndex = 0; i -= 1; } return format; } var match1 = /\d/; // 0 - 9 var match2 = /\d\d/; // 00 - 99 var match3 = /\d{3}/; // 000 - 999 var match4 = /\d{4}/; // 0000 - 9999 var match6 = /[+-]?\d{6}/; // -999999 - 999999 var match1to2 = /\d\d?/; // 0 - 99 var match3to4 = /\d\d\d\d?/; // 999 - 9999 var match5to6 = /\d\d\d\d\d\d?/; // 99999 - 999999 var match1to3 = /\d{1,3}/; // 0 - 999 var match1to4 = /\d{1,4}/; // 0 - 9999 var match1to6 = /[+-]?\d{1,6}/; // -999999 - 999999 var matchUnsigned = /\d+/; // 0 - inf var matchSigned = /[+-]?\d+/; // -inf - inf var matchOffset = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123 // any word (or two) characters or numbers including two/three word month in arabic. // includes scottish gaelic two word and hyphenated months var matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i; var regexes = {}; function addRegexToken (token, regex, strictRegex) { regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) { return (isStrict && strictRegex) ? strictRegex : regex; }; } function getParseRegexForToken (token, config) { if (!hasOwnProp(regexes, token)) { return new RegExp(unescapeFormat(token)); } return regexes[token](config._strict, config._locale); } // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript function unescapeFormat(s) { return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) { return p1 || p2 || p3 || p4; })); } function regexEscape(s) { return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); } var tokens = {}; function addParseToken (token, callback) { var i, func = callback; if (typeof token === 'string') { token = [token]; } if (isNumber(callback)) { func = function (input, array) { array[callback] = toInt(input); }; } for (i = 0; i < token.length; i++) { tokens[token[i]] = func; } } function addWeekParseToken (token, callback) { addParseToken(token, function (input, array, config, token) { config._w = config._w || {}; callback(input, config._w, config, token); }); } function addTimeToArrayFromToken(token, input, config) { if (input != null && hasOwnProp(tokens, token)) { tokens[token](input, config._a, config, token); } } var YEAR = 0; var MONTH = 1; var DATE = 2; var HOUR = 3; var MINUTE = 4; var SECOND = 5; var MILLISECOND = 6; var WEEK = 7; var WEEKDAY = 8; // FORMATTING addFormatToken('Y', 0, 0, function () { var y = this.year(); return y <= 9999 ? '' + y : '+' + y; }); addFormatToken(0, ['YY', 2], 0, function () { return this.year() % 100; }); addFormatToken(0, ['YYYY', 4], 0, 'year'); addFormatToken(0, ['YYYYY', 5], 0, 'year'); addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); // ALIASES addUnitAlias('year', 'y'); // PRIORITIES addUnitPriority('year', 1); // PARSING addRegexToken('Y', matchSigned); addRegexToken('YY', match1to2, match2); addRegexToken('YYYY', match1to4, match4); addRegexToken('YYYYY', match1to6, match6); addRegexToken('YYYYYY', match1to6, match6); addParseToken(['YYYYY', 'YYYYYY'], YEAR); addParseToken('YYYY', function (input, array) { array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input); }); addParseToken('YY', function (input, array) { array[YEAR] = hooks.parseTwoDigitYear(input); }); addParseToken('Y', function (input, array) { array[YEAR] = parseInt(input, 10); }); // HELPERS function daysInYear(year) { return isLeapYear(year) ? 366 : 365; } function isLeapYear(year) { return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0; } // HOOKS hooks.parseTwoDigitYear = function (input) { return toInt(input) + (toInt(input) > 68 ? 1900 : 2000); }; // MOMENTS var getSetYear = makeGetSet('FullYear', true); function getIsLeapYear () { return isLeapYear(this.year()); } function makeGetSet (unit, keepTime) { return function (value) { if (value != null) { set$1(this, unit, value); hooks.updateOffset(this, keepTime); return this; } else { return get(this, unit); } }; } function get (mom, unit) { return mom.isValid() ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN; } function set$1 (mom, unit, value) { if (mom.isValid() && !isNaN(value)) { if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) { mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month())); } else { mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value); } } } // MOMENTS function stringGet (units) { units = normalizeUnits(units); if (isFunction(this[units])) { return this[units](); } return this; } function stringSet (units, value) { if (typeof units === 'object') { units = normalizeObjectUnits(units); var prioritized = getPrioritizedUnits(units); for (var i = 0; i < prioritized.length; i++) { this[prioritized[i].unit](units[prioritized[i].unit]); } } else { units = normalizeUnits(units); if (isFunction(this[units])) { return this[units](value); } } return this; } function mod(n, x) { return ((n % x) + x) % x; } var indexOf; if (Array.prototype.indexOf) { indexOf = Array.prototype.indexOf; } else { indexOf = function (o) { // I know var i; for (i = 0; i < this.length; ++i) { if (this[i] === o) { return i; } } return -1; }; } function daysInMonth(year, month) { if (isNaN(year) || isNaN(month)) { return NaN; } var modMonth = mod(month, 12); year += (month - modMonth) / 12; return modMonth === 1 ? (isLeapYear(year) ? 29 : 28) : (31 - modMonth % 7 % 2); } // FORMATTING addFormatToken('M', ['MM', 2], 'Mo', function () { return this.month() + 1; }); addFormatToken('MMM', 0, 0, function (format) { return this.localeData().monthsShort(this, format); }); addFormatToken('MMMM', 0, 0, function (format) { return this.localeData().months(this, format); }); // ALIASES addUnitAlias('month', 'M'); // PRIORITY addUnitPriority('month', 8); // PARSING addRegexToken('M', match1to2); addRegexToken('MM', match1to2, match2); addRegexToken('MMM', function (isStrict, locale) { return locale.monthsShortRegex(isStrict); }); addRegexToken('MMMM', function (isStrict, locale) { return locale.monthsRegex(isStrict); }); addParseToken(['M', 'MM'], function (input, array) { array[MONTH] = toInt(input) - 1; }); addParseToken(['MMM', 'MMMM'], function (input, array, config, token) { var month = config._locale.monthsParse(input, token, config._strict); // if we didn't find a month name, mark the date as invalid. if (month != null) { array[MONTH] = month; } else { getParsingFlags(config).invalidMonth = input; } }); // LOCALES var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/; var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'); function localeMonths (m, format) { if (!m) { return isArray(this._months) ? this._months : this._months['standalone']; } return isArray(this._months) ? this._months[m.month()] : this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()]; } var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'); function localeMonthsShort (m, format) { if (!m) { return isArray(this._monthsShort) ? this._monthsShort : this._monthsShort['standalone']; } return isArray(this._monthsShort) ? this._monthsShort[m.month()] : this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()]; } function handleStrictParse(monthName, format, strict) { var i, ii, mom, llc = monthName.toLocaleLowerCase(); if (!this._monthsParse) { // this is not used this._monthsParse = []; this._longMonthsParse = []; this._shortMonthsParse = []; for (i = 0; i < 12; ++i) { mom = createUTC([2000, i]); this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase(); this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase(); } } if (strict) { if (format === 'MMM') { ii = indexOf.call(this._shortMonthsParse, llc); return ii !== -1 ? ii : null; } else { ii = indexOf.call(this._longMonthsParse, llc); return ii !== -1 ? ii : null; } } else { if (format === 'MMM') { ii = indexOf.call(this._shortMonthsParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._longMonthsParse, llc); return ii !== -1 ? ii : null; } else { ii = indexOf.call(this._longMonthsParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._shortMonthsParse, llc); return ii !== -1 ? ii : null; } } } function localeMonthsParse (monthName, format, strict) { var i, mom, regex; if (this._monthsParseExact) { return handleStrictParse.call(this, monthName, format, strict); } if (!this._monthsParse) { this._monthsParse = []; this._longMonthsParse = []; this._shortMonthsParse = []; } // TODO: add sorting // Sorting makes sure if one month (or abbr) is a prefix of another // see sorting in computeMonthsParse for (i = 0; i < 12; i++) { // make the regex if we don't have it already mom = createUTC([2000, i]); if (strict && !this._longMonthsParse[i]) { this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i'); this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i'); } if (!strict && !this._monthsParse[i]) { regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'); } // test the regex if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) { return i; } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) { return i; } else if (!strict && this._monthsParse[i].test(monthName)) { return i; } } } // MOMENTS function setMonth (mom, value) { var dayOfMonth; if (!mom.isValid()) { // No op return mom; } if (typeof value === 'string') { if (/^\d+$/.test(value)) { value = toInt(value); } else { value = mom.localeData().monthsParse(value); // TODO: Another silent failure? if (!isNumber(value)) { return mom; } } } dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value)); mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth); return mom; } function getSetMonth (value) { if (value != null) { setMonth(this, value); hooks.updateOffset(this, true); return this; } else { return get(this, 'Month'); } } function getDaysInMonth () { return daysInMonth(this.year(), this.month()); } var defaultMonthsShortRegex = matchWord; function monthsShortRegex (isStrict) { if (this._monthsParseExact) { if (!hasOwnProp(this, '_monthsRegex')) { computeMonthsParse.call(this); } if (isStrict) { return this._monthsShortStrictRegex; } else { return this._monthsShortRegex; } } else { if (!hasOwnProp(this, '_monthsShortRegex')) { this._monthsShortRegex = defaultMonthsShortRegex; } return this._monthsShortStrictRegex && isStrict ? this._monthsShortStrictRegex : this._monthsShortRegex; } } var defaultMonthsRegex = matchWord; function monthsRegex (isStrict) { if (this._monthsParseExact) { if (!hasOwnProp(this, '_monthsRegex')) { computeMonthsParse.call(this); } if (isStrict) { return this._monthsStrictRegex; } else { return this._monthsRegex; } } else { if (!hasOwnProp(this, '_monthsRegex')) { this._monthsRegex = defaultMonthsRegex; } return this._monthsStrictRegex && isStrict ? this._monthsStrictRegex : this._monthsRegex; } } function computeMonthsParse () { function cmpLenRev(a, b) { return b.length - a.length; } var shortPieces = [], longPieces = [], mixedPieces = [], i, mom; for (i = 0; i < 12; i++) { // make the regex if we don't have it already mom = createUTC([2000, i]); shortPieces.push(this.monthsShort(mom, '')); longPieces.push(this.months(mom, '')); mixedPieces.push(this.months(mom, '')); mixedPieces.push(this.monthsShort(mom, '')); } // Sorting makes sure if one month (or abbr) is a prefix of another it // will match the longer piece. shortPieces.sort(cmpLenRev); longPieces.sort(cmpLenRev); mixedPieces.sort(cmpLenRev); for (i = 0; i < 12; i++) { shortPieces[i] = regexEscape(shortPieces[i]); longPieces[i] = regexEscape(longPieces[i]); } for (i = 0; i < 24; i++) { mixedPieces[i] = regexEscape(mixedPieces[i]); } this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); this._monthsShortRegex = this._monthsRegex; this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); } function createDate (y, m, d, h, M, s, ms) { // can't just apply() to create a date: // https://stackoverflow.com/q/181348 var date = new Date(y, m, d, h, M, s, ms); // the date constructor remaps years 0-99 to 1900-1999 if (y < 100 && y >= 0 && isFinite(date.getFullYear())) { date.setFullYear(y); } return date; } function createUTCDate (y) { var date = new Date(Date.UTC.apply(null, arguments)); // the Date.UTC function remaps years 0-99 to 1900-1999 if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) { date.setUTCFullYear(y); } return date; } // start-of-first-week - start-of-year function firstWeekOffset(year, dow, doy) { var // first-week day -- which january is always in the first week (4 for iso, 1 for other) fwd = 7 + dow - doy, // first-week day local weekday -- which local weekday is fwd fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7; return -fwdlw + fwd - 1; } // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday function dayOfYearFromWeeks(year, week, weekday, dow, doy) { var localWeekday = (7 + weekday - dow) % 7, weekOffset = firstWeekOffset(year, dow, doy), dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset, resYear, resDayOfYear; if (dayOfYear <= 0) { resYear = year - 1; resDayOfYear = daysInYear(resYear) + dayOfYear; } else if (dayOfYear > daysInYear(year)) { resYear = year + 1; resDayOfYear = dayOfYear - daysInYear(year); } else { resYear = year; resDayOfYear = dayOfYear; } return { year: resYear, dayOfYear: resDayOfYear }; } function weekOfYear(mom, dow, doy) { var weekOffset = firstWeekOffset(mom.year(), dow, doy), week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1, resWeek, resYear; if (week < 1) { resYear = mom.year() - 1; resWeek = week + weeksInYear(resYear, dow, doy); } else if (week > weeksInYear(mom.year(), dow, doy)) { resWeek = week - weeksInYear(mom.year(), dow, doy); resYear = mom.year() + 1; } else { resYear = mom.year(); resWeek = week; } return { week: resWeek, year: resYear }; } function weeksInYear(year, dow, doy) { var weekOffset = firstWeekOffset(year, dow, doy), weekOffsetNext = firstWeekOffset(year + 1, dow, doy); return (daysInYear(year) - weekOffset + weekOffsetNext) / 7; } // FORMATTING addFormatToken('w', ['ww', 2], 'wo', 'week'); addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); // ALIASES addUnitAlias('week', 'w'); addUnitAlias('isoWeek', 'W'); // PRIORITIES addUnitPriority('week', 5); addUnitPriority('isoWeek', 5); // PARSING addRegexToken('w', match1to2); addRegexToken('ww', match1to2, match2); addRegexToken('W', match1to2); addRegexToken('WW', match1to2, match2); addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) { week[token.substr(0, 1)] = toInt(input); }); // HELPERS // LOCALES function localeWeek (mom) { return weekOfYear(mom, this._week.dow, this._week.doy).week; } var defaultLocaleWeek = { dow : 0, // Sunday is the first day of the week. doy : 6 // The week that contains Jan 6th is the first week of the year. }; function localeFirstDayOfWeek () { return this._week.dow; } function localeFirstDayOfYear () { return this._week.doy; } // MOMENTS function getSetWeek (input) { var week = this.localeData().week(this); return input == null ? week : this.add((input - week) * 7, 'd'); } function getSetISOWeek (input) { var week = weekOfYear(this, 1, 4).week; return input == null ? week : this.add((input - week) * 7, 'd'); } // FORMATTING addFormatToken('d', 0, 'do', 'day'); addFormatToken('dd', 0, 0, function (format) { return this.localeData().weekdaysMin(this, format); }); addFormatToken('ddd', 0, 0, function (format) { return this.localeData().weekdaysShort(this, format); }); addFormatToken('dddd', 0, 0, function (format) { return this.localeData().weekdays(this, format); }); addFormatToken('e', 0, 0, 'weekday'); addFormatToken('E', 0, 0, 'isoWeekday'); // ALIASES addUnitAlias('day', 'd'); addUnitAlias('weekday', 'e'); addUnitAlias('isoWeekday', 'E'); // PRIORITY addUnitPriority('day', 11); addUnitPriority('weekday', 11); addUnitPriority('isoWeekday', 11); // PARSING addRegexToken('d', match1to2); addRegexToken('e', match1to2); addRegexToken('E', match1to2); addRegexToken('dd', function (isStrict, locale) { return locale.weekdaysMinRegex(isStrict); }); addRegexToken('ddd', function (isStrict, locale) { return locale.weekdaysShortRegex(isStrict); }); addRegexToken('dddd', function (isStrict, locale) { return locale.weekdaysRegex(isStrict); }); addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) { var weekday = config._locale.weekdaysParse(input, token, config._strict); // if we didn't get a weekday name, mark the date as invalid if (weekday != null) { week.d = weekday; } else { getParsingFlags(config).invalidWeekday = input; } }); addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) { week[token] = toInt(input); }); // HELPERS function parseWeekday(input, locale) { if (typeof input !== 'string') { return input; } if (!isNaN(input)) { return parseInt(input, 10); } input = locale.weekdaysParse(input); if (typeof input === 'number') { return input; } return null; } function parseIsoWeekday(input, locale) { if (typeof input === 'string') { return locale.weekdaysParse(input) % 7 || 7; } return isNaN(input) ? null : input; } // LOCALES var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'); function localeWeekdays (m, format) { if (!m) { return isArray(this._weekdays) ? this._weekdays : this._weekdays['standalone']; } return isArray(this._weekdays) ? this._weekdays[m.day()] : this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()]; } var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'); function localeWeekdaysShort (m) { return (m) ? this._weekdaysShort[m.day()] : this._weekdaysShort; } var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'); function localeWeekdaysMin (m) { return (m) ? this._weekdaysMin[m.day()] : this._weekdaysMin; } function handleStrictParse$1(weekdayName, format, strict) { var i, ii, mom, llc = weekdayName.toLocaleLowerCase(); if (!this._weekdaysParse) { this._weekdaysParse = []; this._shortWeekdaysParse = []; this._minWeekdaysParse = []; for (i = 0; i < 7; ++i) { mom = createUTC([2000, 1]).day(i); this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase(); this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase(); this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase(); } } if (strict) { if (format === 'dddd') { ii = indexOf.call(this._weekdaysParse, llc); return ii !== -1 ? ii : null; } else if (format === 'ddd') { ii = indexOf.call(this._shortWeekdaysParse, llc); return ii !== -1 ? ii : null; } else { ii = indexOf.call(this._minWeekdaysParse, llc); return ii !== -1 ? ii : null; } } else { if (format === 'dddd') { ii = indexOf.call(this._weekdaysParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._shortWeekdaysParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._minWeekdaysParse, llc); return ii !== -1 ? ii : null; } else if (format === 'ddd') { ii = indexOf.call(this._shortWeekdaysParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._weekdaysParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._minWeekdaysParse, llc); return ii !== -1 ? ii : null; } else { ii = indexOf.call(this._minWeekdaysParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._weekdaysParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._shortWeekdaysParse, llc); return ii !== -1 ? ii : null; } } } function localeWeekdaysParse (weekdayName, format, strict) { var i, mom, regex; if (this._weekdaysParseExact) { return handleStrictParse$1.call(this, weekdayName, format, strict); } if (!this._weekdaysParse) { this._weekdaysParse = []; this._minWeekdaysParse = []; this._shortWeekdaysParse = []; this._fullWeekdaysParse = []; } for (i = 0; i < 7; i++) { // make the regex if we don't have it already mom = createUTC([2000, 1]).day(i); if (strict && !this._fullWeekdaysParse[i]) { this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', 'i'); this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', 'i'); this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', 'i'); } if (!this._weekdaysParse[i]) { regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, ''); this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); } // test the regex if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) { return i; } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) { return i; } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) { return i; } else if (!strict && this._weekdaysParse[i].test(weekdayName)) { return i; } } } // MOMENTS function getSetDayOfWeek (input) { if (!this.isValid()) { return input != null ? this : NaN; } var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); if (input != null) { input = parseWeekday(input, this.localeData()); return this.add(input - day, 'd'); } else { return day; } } function getSetLocaleDayOfWeek (input) { if (!this.isValid()) { return input != null ? this : NaN; } var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; return input == null ? weekday : this.add(input - weekday, 'd'); } function getSetISODayOfWeek (input) { if (!this.isValid()) { return input != null ? this : NaN; } // behaves the same as moment#day except // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) // as a setter, sunday should belong to the previous week. if (input != null) { var weekday = parseIsoWeekday(input, this.localeData()); return this.day(this.day() % 7 ? weekday : weekday - 7); } else { return this.day() || 7; } } var defaultWeekdaysRegex = matchWord; function weekdaysRegex (isStrict) { if (this._weekdaysParseExact) { if (!hasOwnProp(this, '_weekdaysRegex')) { computeWeekdaysParse.call(this); } if (isStrict) { return this._weekdaysStrictRegex; } else { return this._weekdaysRegex; } } else { if (!hasOwnProp(this, '_weekdaysRegex')) { this._weekdaysRegex = defaultWeekdaysRegex; } return this._weekdaysStrictRegex && isStrict ? this._weekdaysStrictRegex : this._weekdaysRegex; } } var defaultWeekdaysShortRegex = matchWord; function weekdaysShortRegex (isStrict) { if (this._weekdaysParseExact) { if (!hasOwnProp(this, '_weekdaysRegex')) { computeWeekdaysParse.call(this); } if (isStrict) { return this._weekdaysShortStrictRegex; } else { return this._weekdaysShortRegex; } } else { if (!hasOwnProp(this, '_weekdaysShortRegex')) { this._weekdaysShortRegex = defaultWeekdaysShortRegex; } return this._weekdaysShortStrictRegex && isStrict ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex; } } var defaultWeekdaysMinRegex = matchWord; function weekdaysMinRegex (isStrict) { if (this._weekdaysParseExact) { if (!hasOwnProp(this, '_weekdaysRegex')) { computeWeekdaysParse.call(this); } if (isStrict) { return this._weekdaysMinStrictRegex; } else { return this._weekdaysMinRegex; } } else { if (!hasOwnProp(this, '_weekdaysMinRegex')) { this._weekdaysMinRegex = defaultWeekdaysMinRegex; } return this._weekdaysMinStrictRegex && isStrict ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex; } } function computeWeekdaysParse () { function cmpLenRev(a, b) { return b.length - a.length; } var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [], i, mom, minp, shortp, longp; for (i = 0; i < 7; i++) { // make the regex if we don't have it already mom = createUTC([2000, 1]).day(i); minp = this.weekdaysMin(mom, ''); shortp = this.weekdaysShort(mom, ''); longp = this.weekdays(mom, ''); minPieces.push(minp); shortPieces.push(shortp); longPieces.push(longp); mixedPieces.push(minp); mixedPieces.push(shortp); mixedPieces.push(longp); } // Sorting makes sure if one weekday (or abbr) is a prefix of another it // will match the longer piece. minPieces.sort(cmpLenRev); shortPieces.sort(cmpLenRev); longPieces.sort(cmpLenRev); mixedPieces.sort(cmpLenRev); for (i = 0; i < 7; i++) { shortPieces[i] = regexEscape(shortPieces[i]); longPieces[i] = regexEscape(longPieces[i]); mixedPieces[i] = regexEscape(mixedPieces[i]); } this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); this._weekdaysShortRegex = this._weekdaysRegex; this._weekdaysMinRegex = this._weekdaysRegex; this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i'); } // FORMATTING function hFormat() { return this.hours() % 12 || 12; } function kFormat() { return this.hours() || 24; } addFormatToken('H', ['HH', 2], 0, 'hour'); addFormatToken('h', ['hh', 2], 0, hFormat); addFormatToken('k', ['kk', 2], 0, kFormat); addFormatToken('hmm', 0, 0, function () { return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2); }); addFormatToken('hmmss', 0, 0, function () { return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2); }); addFormatToken('Hmm', 0, 0, function () { return '' + this.hours() + zeroFill(this.minutes(), 2); }); addFormatToken('Hmmss', 0, 0, function () { return '' + this.hours() + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2); }); function meridiem (token, lowercase) { addFormatToken(token, 0, 0, function () { return this.localeData().meridiem(this.hours(), this.minutes(), lowercase); }); } meridiem('a', true); meridiem('A', false); // ALIASES addUnitAlias('hour', 'h'); // PRIORITY addUnitPriority('hour', 13); // PARSING function matchMeridiem (isStrict, locale) { return locale._meridiemParse; } addRegexToken('a', matchMeridiem); addRegexToken('A', matchMeridiem); addRegexToken('H', match1to2); addRegexToken('h', match1to2); addRegexToken('k', match1to2); addRegexToken('HH', match1to2, match2); addRegexToken('hh', match1to2, match2); addRegexToken('kk', match1to2, match2); addRegexToken('hmm', match3to4); addRegexToken('hmmss', match5to6); addRegexToken('Hmm', match3to4); addRegexToken('Hmmss', match5to6); addParseToken(['H', 'HH'], HOUR); addParseToken(['k', 'kk'], function (input, array, config) { var kInput = toInt(input); array[HOUR] = kInput === 24 ? 0 : kInput; }); addParseToken(['a', 'A'], function (input, array, config) { config._isPm = config._locale.isPM(input); config._meridiem = input; }); addParseToken(['h', 'hh'], function (input, array, config) { array[HOUR] = toInt(input); getParsingFlags(config).bigHour = true; }); addParseToken('hmm', function (input, array, config) { var pos = input.length - 2; array[HOUR] = toInt(input.substr(0, pos)); array[MINUTE] = toInt(input.substr(pos)); getParsingFlags(config).bigHour = true; }); addParseToken('hmmss', function (input, array, config) { var pos1 = input.length - 4; var pos2 = input.length - 2; array[HOUR] = toInt(input.substr(0, pos1)); array[MINUTE] = toInt(input.substr(pos1, 2)); array[SECOND] = toInt(input.substr(pos2)); getParsingFlags(config).bigHour = true; }); addParseToken('Hmm', function (input, array, config) { var pos = input.length - 2; array[HOUR] = toInt(input.substr(0, pos)); array[MINUTE] = toInt(input.substr(pos)); }); addParseToken('Hmmss', function (input, array, config) { var pos1 = input.length - 4; var pos2 = input.length - 2; array[HOUR] = toInt(input.substr(0, pos1)); array[MINUTE] = toInt(input.substr(pos1, 2)); array[SECOND] = toInt(input.substr(pos2)); }); // LOCALES function localeIsPM (input) { // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays // Using charAt should be more compatible. return ((input + '').toLowerCase().charAt(0) === 'p'); } var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i; function localeMeridiem (hours, minutes, isLower) { if (hours > 11) { return isLower ? 'pm' : 'PM'; } else { return isLower ? 'am' : 'AM'; } } // MOMENTS // Setting the hour should keep the time, because the user explicitly // specified which hour they want. So trying to maintain the same hour (in // a new timezone) makes sense. Adding/subtracting hours does not follow // this rule. var getSetHour = makeGetSet('Hours', true); var baseConfig = { calendar: defaultCalendar, longDateFormat: defaultLongDateFormat, invalidDate: defaultInvalidDate, ordinal: defaultOrdinal, dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse, relativeTime: defaultRelativeTime, months: defaultLocaleMonths, monthsShort: defaultLocaleMonthsShort, week: defaultLocaleWeek, weekdays: defaultLocaleWeekdays, weekdaysMin: defaultLocaleWeekdaysMin, weekdaysShort: defaultLocaleWeekdaysShort, meridiemParse: defaultLocaleMeridiemParse }; // internal storage for locale config files var locales = {}; var localeFamilies = {}; var globalLocale; function normalizeLocale(key) { return key ? key.toLowerCase().replace('_', '-') : key; } // pick the locale from the array // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root function chooseLocale(names) { var i = 0, j, next, locale, split; while (i < names.length) { split = normalizeLocale(names[i]).split('-'); j = split.length; next = normalizeLocale(names[i + 1]); next = next ? next.split('-') : null; while (j > 0) { locale = loadLocale(split.slice(0, j).join('-')); if (locale) { return locale; } if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) { //the next array item is better than a shallower substring of this one break; } j--; } i++; } return globalLocale; } function loadLocale(name) { var oldLocale = null; // TODO: Find a better way to register and load all the locales in Node if (!locales[name] && (typeof module !== 'undefined') && module && module.exports) { try { oldLocale = globalLocale._abbr; var aliasedRequire = require; __webpack_require__(304)("./" + name); getSetGlobalLocale(oldLocale); } catch (e) {} } return locales[name]; } // This function will load locale and then set the global locale. If // no arguments are passed in, it will simply return the current global // locale key. function getSetGlobalLocale (key, values) { var data; if (key) { if (isUndefined(values)) { data = getLocale(key); } else { data = defineLocale(key, values); } if (data) { // moment.duration._locale = moment._locale = data; globalLocale = data; } else { if ((typeof console !== 'undefined') && console.warn) { //warn user if arguments are passed but the locale could not be set console.warn('Locale ' + key + ' not found. Did you forget to load it?'); } } } return globalLocale._abbr; } function defineLocale (name, config) { if (config !== null) { var locale, parentConfig = baseConfig; config.abbr = name; if (locales[name] != null) { deprecateSimple('defineLocaleOverride', 'use moment.updateLocale(localeName, config) to change ' + 'an existing locale. moment.defineLocale(localeName, ' + 'config) should only be used for creating a new locale ' + 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'); parentConfig = locales[name]._config; } else if (config.parentLocale != null) { if (locales[config.parentLocale] != null) { parentConfig = locales[config.parentLocale]._config; } else { locale = loadLocale(config.parentLocale); if (locale != null) { parentConfig = locale._config; } else { if (!localeFamilies[config.parentLocale]) { localeFamilies[config.parentLocale] = []; } localeFamilies[config.parentLocale].push({ name: name, config: config }); return null; } } } locales[name] = new Locale(mergeConfigs(parentConfig, config)); if (localeFamilies[name]) { localeFamilies[name].forEach(function (x) { defineLocale(x.name, x.config); }); } // backwards compat for now: also set the locale // make sure we set the locale AFTER all child locales have been // created, so we won't end up with the child locale set. getSetGlobalLocale(name); return locales[name]; } else { // useful for testing delete locales[name]; return null; } } function updateLocale(name, config) { if (config != null) { var locale, tmpLocale, parentConfig = baseConfig; // MERGE tmpLocale = loadLocale(name); if (tmpLocale != null) { parentConfig = tmpLocale._config; } config = mergeConfigs(parentConfig, config); locale = new Locale(config); locale.parentLocale = locales[name]; locales[name] = locale; // backwards compat for now: also set the locale getSetGlobalLocale(name); } else { // pass null for config to unupdate, useful for tests if (locales[name] != null) { if (locales[name].parentLocale != null) { locales[name] = locales[name].parentLocale; } else if (locales[name] != null) { delete locales[name]; } } } return locales[name]; } // returns locale data function getLocale (key) { var locale; if (key && key._locale && key._locale._abbr) { key = key._locale._abbr; } if (!key) { return globalLocale; } if (!isArray(key)) { //short-circuit everything else locale = loadLocale(key); if (locale) { return locale; } key = [key]; } return chooseLocale(key); } function listLocales() { return keys(locales); } function checkOverflow (m) { var overflow; var a = m._a; if (a && getParsingFlags(m).overflow === -2) { overflow = a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR : a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : -1; if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) { overflow = DATE; } if (getParsingFlags(m)._overflowWeeks && overflow === -1) { overflow = WEEK; } if (getParsingFlags(m)._overflowWeekday && overflow === -1) { overflow = WEEKDAY; } getParsingFlags(m).overflow = overflow; } return m; } // Pick the first defined of two or three arguments. function defaults(a, b, c) { if (a != null) { return a; } if (b != null) { return b; } return c; } function currentDateArray(config) { // hooks is actually the exported moment object var nowValue = new Date(hooks.now()); if (config._useUTC) { return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()]; } return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()]; } // convert an array to a date. // the array should mirror the parameters below // note: all values past the year are optional and will default to the lowest possible value. // [year, month, day , hour, minute, second, millisecond] function configFromArray (config) { var i, date, input = [], currentDate, expectedWeekday, yearToUse; if (config._d) { return; } currentDate = currentDateArray(config); //compute day of the year from weeks and weekdays if (config._w && config._a[DATE] == null && config._a[MONTH] == null) { dayOfYearFromWeekInfo(config); } //if the day of the year is set, figure out what it is if (config._dayOfYear != null) { yearToUse = defaults(config._a[YEAR], currentDate[YEAR]); if (config._dayOfYear > daysInYear(yearToUse) || config._dayOfYear === 0) { getParsingFlags(config)._overflowDayOfYear = true; } date = createUTCDate(yearToUse, 0, config._dayOfYear); config._a[MONTH] = date.getUTCMonth(); config._a[DATE] = date.getUTCDate(); } // Default to current date. // * if no year, month, day of month are given, default to today // * if day of month is given, default month and year // * if month is given, default only year // * if year is given, don't default anything for (i = 0; i < 3 && config._a[i] == null; ++i) { config._a[i] = input[i] = currentDate[i]; } // Zero out whatever was not defaulted, including time for (; i < 7; i++) { config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i]; } // Check for 24:00:00.000 if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) { config._nextDay = true; config._a[HOUR] = 0; } config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input); expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay(); // Apply timezone offset from input. The actual utcOffset can be changed // with parseZone. if (config._tzm != null) { config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); } if (config._nextDay) { config._a[HOUR] = 24; } // check for mismatching day of week if (config._w && typeof config._w.d !== 'undefined' && config._w.d !== expectedWeekday) { getParsingFlags(config).weekdayMismatch = true; } } function dayOfYearFromWeekInfo(config) { var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow; w = config._w; if (w.GG != null || w.W != null || w.E != null) { dow = 1; doy = 4; // TODO: We need to take the current isoWeekYear, but that depends on // how we interpret now (local, utc, fixed offset). So create // a now version of current config (take local/utc/offset flags, and // create now). weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year); week = defaults(w.W, 1); weekday = defaults(w.E, 1); if (weekday < 1 || weekday > 7) { weekdayOverflow = true; } } else { dow = config._locale._week.dow; doy = config._locale._week.doy; var curWeek = weekOfYear(createLocal(), dow, doy); weekYear = defaults(w.gg, config._a[YEAR], curWeek.year); // Default to current week. week = defaults(w.w, curWeek.week); if (w.d != null) { // weekday -- low day numbers are considered next week weekday = w.d; if (weekday < 0 || weekday > 6) { weekdayOverflow = true; } } else if (w.e != null) { // local weekday -- counting starts from beginning of week weekday = w.e + dow; if (w.e < 0 || w.e > 6) { weekdayOverflow = true; } } else { // default to beginning of week weekday = dow; } } if (week < 1 || week > weeksInYear(weekYear, dow, doy)) { getParsingFlags(config)._overflowWeeks = true; } else if (weekdayOverflow != null) { getParsingFlags(config)._overflowWeekday = true; } else { temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy); config._a[YEAR] = temp.year; config._dayOfYear = temp.dayOfYear; } } // iso 8601 regex // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00) var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/; var basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/; var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/; var isoDates = [ ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/], ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/], ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/], ['GGGG-[W]WW', /\d{4}-W\d\d/, false], ['YYYY-DDD', /\d{4}-\d{3}/], ['YYYY-MM', /\d{4}-\d\d/, false], ['YYYYYYMMDD', /[+-]\d{10}/], ['YYYYMMDD', /\d{8}/], // YYYYMM is NOT allowed by the standard ['GGGG[W]WWE', /\d{4}W\d{3}/], ['GGGG[W]WW', /\d{4}W\d{2}/, false], ['YYYYDDD', /\d{7}/] ]; // iso time formats and regexes var isoTimes = [ ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/], ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/], ['HH:mm:ss', /\d\d:\d\d:\d\d/], ['HH:mm', /\d\d:\d\d/], ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/], ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/], ['HHmmss', /\d\d\d\d\d\d/], ['HHmm', /\d\d\d\d/], ['HH', /\d\d/] ]; var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i; // date from iso format function configFromISO(config) { var i, l, string = config._i, match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), allowTime, dateFormat, timeFormat, tzFormat; if (match) { getParsingFlags(config).iso = true; for (i = 0, l = isoDates.length; i < l; i++) { if (isoDates[i][1].exec(match[1])) { dateFormat = isoDates[i][0]; allowTime = isoDates[i][2] !== false; break; } } if (dateFormat == null) { config._isValid = false; return; } if (match[3]) { for (i = 0, l = isoTimes.length; i < l; i++) { if (isoTimes[i][1].exec(match[3])) { // match[2] should be 'T' or space timeFormat = (match[2] || ' ') + isoTimes[i][0]; break; } } if (timeFormat == null) { config._isValid = false; return; } } if (!allowTime && timeFormat != null) { config._isValid = false; return; } if (match[4]) { if (tzRegex.exec(match[4])) { tzFormat = 'Z'; } else { config._isValid = false; return; } } config._f = dateFormat + (timeFormat || '') + (tzFormat || ''); configFromStringAndFormat(config); } else { config._isValid = false; } } // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3 var rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/; function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) { var result = [ untruncateYear(yearStr), defaultLocaleMonthsShort.indexOf(monthStr), parseInt(dayStr, 10), parseInt(hourStr, 10), parseInt(minuteStr, 10) ]; if (secondStr) { result.push(parseInt(secondStr, 10)); } return result; } function untruncateYear(yearStr) { var year = parseInt(yearStr, 10); if (year <= 49) { return 2000 + year; } else if (year <= 999) { return 1900 + year; } return year; } function preprocessRFC2822(s) { // Remove comments and folding whitespace and replace multiple-spaces with a single space return s.replace(/\([^)]*\)|[\n\t]/g, ' ').replace(/(\s\s+)/g, ' ').replace(/^\s\s*/, '').replace(/\s\s*$/, ''); } function checkWeekday(weekdayStr, parsedInput, config) { if (weekdayStr) { // TODO: Replace the vanilla JS Date object with an indepentent day-of-week check. var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr), weekdayActual = new Date(parsedInput[0], parsedInput[1], parsedInput[2]).getDay(); if (weekdayProvided !== weekdayActual) { getParsingFlags(config).weekdayMismatch = true; config._isValid = false; return false; } } return true; } var obsOffsets = { UT: 0, GMT: 0, EDT: -4 * 60, EST: -5 * 60, CDT: -5 * 60, CST: -6 * 60, MDT: -6 * 60, MST: -7 * 60, PDT: -7 * 60, PST: -8 * 60 }; function calculateOffset(obsOffset, militaryOffset, numOffset) { if (obsOffset) { return obsOffsets[obsOffset]; } else if (militaryOffset) { // the only allowed military tz is Z return 0; } else { var hm = parseInt(numOffset, 10); var m = hm % 100, h = (hm - m) / 100; return h * 60 + m; } } // date and time from ref 2822 format function configFromRFC2822(config) { var match = rfc2822.exec(preprocessRFC2822(config._i)); if (match) { var parsedArray = extractFromRFC2822Strings(match[4], match[3], match[2], match[5], match[6], match[7]); if (!checkWeekday(match[1], parsedArray, config)) { return; } config._a = parsedArray; config._tzm = calculateOffset(match[8], match[9], match[10]); config._d = createUTCDate.apply(null, config._a); config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); getParsingFlags(config).rfc2822 = true; } else { config._isValid = false; } } // date from iso format or fallback function configFromString(config) { var matched = aspNetJsonRegex.exec(config._i); if (matched !== null) { config._d = new Date(+matched[1]); return; } configFromISO(config); if (config._isValid === false) { delete config._isValid; } else { return; } configFromRFC2822(config); if (config._isValid === false) { delete config._isValid; } else { return; } // Final attempt, use Input Fallback hooks.createFromInputFallback(config); } hooks.createFromInputFallback = deprecate( 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' + 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' + 'discouraged and will be removed in an upcoming major release. Please refer to ' + 'http://momentjs.com/guides/#/warnings/js-date/ for more info.', function (config) { config._d = new Date(config._i + (config._useUTC ? ' UTC' : '')); } ); // constant that refers to the ISO standard hooks.ISO_8601 = function () {}; // constant that refers to the RFC 2822 form hooks.RFC_2822 = function () {}; // date from string and format string function configFromStringAndFormat(config) { // TODO: Move this to another part of the creation flow to prevent circular deps if (config._f === hooks.ISO_8601) { configFromISO(config); return; } if (config._f === hooks.RFC_2822) { configFromRFC2822(config); return; } config._a = []; getParsingFlags(config).empty = true; // This array is used to make a Date, either with `new Date` or `Date.UTC` var string = '' + config._i, i, parsedInput, tokens, token, skipped, stringLength = string.length, totalParsedInputLength = 0; tokens = expandFormat(config._f, config._locale).match(formattingTokens) || []; for (i = 0; i < tokens.length; i++) { token = tokens[i]; parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0]; // console.log('token', token, 'parsedInput', parsedInput, // 'regex', getParseRegexForToken(token, config)); if (parsedInput) { skipped = string.substr(0, string.indexOf(parsedInput)); if (skipped.length > 0) { getParsingFlags(config).unusedInput.push(skipped); } string = string.slice(string.indexOf(parsedInput) + parsedInput.length); totalParsedInputLength += parsedInput.length; } // don't parse if it's not a known token if (formatTokenFunctions[token]) { if (parsedInput) { getParsingFlags(config).empty = false; } else { getParsingFlags(config).unusedTokens.push(token); } addTimeToArrayFromToken(token, parsedInput, config); } else if (config._strict && !parsedInput) { getParsingFlags(config).unusedTokens.push(token); } } // add remaining unparsed input length to the string getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength; if (string.length > 0) { getParsingFlags(config).unusedInput.push(string); } // clear _12h flag if hour is <= 12 if (config._a[HOUR] <= 12 && getParsingFlags(config).bigHour === true && config._a[HOUR] > 0) { getParsingFlags(config).bigHour = undefined; } getParsingFlags(config).parsedDateParts = config._a.slice(0); getParsingFlags(config).meridiem = config._meridiem; // handle meridiem config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem); configFromArray(config); checkOverflow(config); } function meridiemFixWrap (locale, hour, meridiem) { var isPm; if (meridiem == null) { // nothing to do return hour; } if (locale.meridiemHour != null) { return locale.meridiemHour(hour, meridiem); } else if (locale.isPM != null) { // Fallback isPm = locale.isPM(meridiem); if (isPm && hour < 12) { hour += 12; } if (!isPm && hour === 12) { hour = 0; } return hour; } else { // this is not supposed to happen return hour; } } // date from string and array of format strings function configFromStringAndArray(config) { var tempConfig, bestMoment, scoreToBeat, i, currentScore; if (config._f.length === 0) { getParsingFlags(config).invalidFormat = true; config._d = new Date(NaN); return; } for (i = 0; i < config._f.length; i++) { currentScore = 0; tempConfig = copyConfig({}, config); if (config._useUTC != null) { tempConfig._useUTC = config._useUTC; } tempConfig._f = config._f[i]; configFromStringAndFormat(tempConfig); if (!isValid(tempConfig)) { continue; } // if there is any input that was not parsed add a penalty for that format currentScore += getParsingFlags(tempConfig).charsLeftOver; //or tokens currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10; getParsingFlags(tempConfig).score = currentScore; if (scoreToBeat == null || currentScore < scoreToBeat) { scoreToBeat = currentScore; bestMoment = tempConfig; } } extend(config, bestMoment || tempConfig); } function configFromObject(config) { if (config._d) { return; } var i = normalizeObjectUnits(config._i); config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) { return obj && parseInt(obj, 10); }); configFromArray(config); } function createFromConfig (config) { var res = new Moment(checkOverflow(prepareConfig(config))); if (res._nextDay) { // Adding is smart enough around DST res.add(1, 'd'); res._nextDay = undefined; } return res; } function prepareConfig (config) { var input = config._i, format = config._f; config._locale = config._locale || getLocale(config._l); if (input === null || (format === undefined && input === '')) { return createInvalid({nullInput: true}); } if (typeof input === 'string') { config._i = input = config._locale.preparse(input); } if (isMoment(input)) { return new Moment(checkOverflow(input)); } else if (isDate(input)) { config._d = input; } else if (isArray(format)) { configFromStringAndArray(config); } else if (format) { configFromStringAndFormat(config); } else { configFromInput(config); } if (!isValid(config)) { config._d = null; } return config; } function configFromInput(config) { var input = config._i; if (isUndefined(input)) { config._d = new Date(hooks.now()); } else if (isDate(input)) { config._d = new Date(input.valueOf()); } else if (typeof input === 'string') { configFromString(config); } else if (isArray(input)) { config._a = map(input.slice(0), function (obj) { return parseInt(obj, 10); }); configFromArray(config); } else if (isObject(input)) { configFromObject(config); } else if (isNumber(input)) { // from milliseconds config._d = new Date(input); } else { hooks.createFromInputFallback(config); } } function createLocalOrUTC (input, format, locale, strict, isUTC) { var c = {}; if (locale === true || locale === false) { strict = locale; locale = undefined; } if ((isObject(input) && isObjectEmpty(input)) || (isArray(input) && input.length === 0)) { input = undefined; } // object construction must be done this way. // https://github.com/moment/moment/issues/1423 c._isAMomentObject = true; c._useUTC = c._isUTC = isUTC; c._l = locale; c._i = input; c._f = format; c._strict = strict; return createFromConfig(c); } function createLocal (input, format, locale, strict) { return createLocalOrUTC(input, format, locale, strict, false); } var prototypeMin = deprecate( 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', function () { var other = createLocal.apply(null, arguments); if (this.isValid() && other.isValid()) { return other < this ? this : other; } else { return createInvalid(); } } ); var prototypeMax = deprecate( 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', function () { var other = createLocal.apply(null, arguments); if (this.isValid() && other.isValid()) { return other > this ? this : other; } else { return createInvalid(); } } ); // Pick a moment m from moments so that m[fn](other) is true for all // other. This relies on the function fn to be transitive. // // moments should either be an array of moment objects or an array, whose // first element is an array of moment objects. function pickBy(fn, moments) { var res, i; if (moments.length === 1 && isArray(moments[0])) { moments = moments[0]; } if (!moments.length) { return createLocal(); } res = moments[0]; for (i = 1; i < moments.length; ++i) { if (!moments[i].isValid() || moments[i][fn](res)) { res = moments[i]; } } return res; } // TODO: Use [].sort instead? function min () { var args = [].slice.call(arguments, 0); return pickBy('isBefore', args); } function max () { var args = [].slice.call(arguments, 0); return pickBy('isAfter', args); } var now = function () { return Date.now ? Date.now() : +(new Date()); }; var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond']; function isDurationValid(m) { for (var key in m) { if (!(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) { return false; } } var unitHasDecimal = false; for (var i = 0; i < ordering.length; ++i) { if (m[ordering[i]]) { if (unitHasDecimal) { return false; // only allow non-integers for smallest unit } if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) { unitHasDecimal = true; } } } return true; } function isValid$1() { return this._isValid; } function createInvalid$1() { return createDuration(NaN); } function Duration (duration) { var normalizedInput = normalizeObjectUnits(duration), years = normalizedInput.year || 0, quarters = normalizedInput.quarter || 0, months = normalizedInput.month || 0, weeks = normalizedInput.week || normalizedInput.isoWeek || 0, days = normalizedInput.day || 0, hours = normalizedInput.hour || 0, minutes = normalizedInput.minute || 0, seconds = normalizedInput.second || 0, milliseconds = normalizedInput.millisecond || 0; this._isValid = isDurationValid(normalizedInput); // representation for dateAddRemove this._milliseconds = +milliseconds + seconds * 1e3 + // 1000 minutes * 6e4 + // 1000 * 60 hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978 // Because of dateAddRemove treats 24 hours as different from a // day when working around DST, we need to store them separately this._days = +days + weeks * 7; // It is impossible to translate months into days without knowing // which months you are are talking about, so we have to store // it separately. this._months = +months + quarters * 3 + years * 12; this._data = {}; this._locale = getLocale(); this._bubble(); } function isDuration (obj) { return obj instanceof Duration; } function absRound (number) { if (number < 0) { return Math.round(-1 * number) * -1; } else { return Math.round(number); } } // FORMATTING function offset (token, separator) { addFormatToken(token, 0, 0, function () { var offset = this.utcOffset(); var sign = '+'; if (offset < 0) { offset = -offset; sign = '-'; } return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2); }); } offset('Z', ':'); offset('ZZ', ''); // PARSING addRegexToken('Z', matchShortOffset); addRegexToken('ZZ', matchShortOffset); addParseToken(['Z', 'ZZ'], function (input, array, config) { config._useUTC = true; config._tzm = offsetFromString(matchShortOffset, input); }); // HELPERS // timezone chunker // '+10:00' > ['10', '00'] // '-1530' > ['-15', '30'] var chunkOffset = /([\+\-]|\d\d)/gi; function offsetFromString(matcher, string) { var matches = (string || '').match(matcher); if (matches === null) { return null; } var chunk = matches[matches.length - 1] || []; var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0]; var minutes = +(parts[1] * 60) + toInt(parts[2]); return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes; } // Return a moment from input, that is local/utc/zone equivalent to model. function cloneWithOffset(input, model) { var res, diff; if (model._isUTC) { res = model.clone(); diff = (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf(); // Use low-level api, because this fn is low-level api. res._d.setTime(res._d.valueOf() + diff); hooks.updateOffset(res, false); return res; } else { return createLocal(input).local(); } } function getDateOffset (m) { // On Firefox.24 Date#getTimezoneOffset returns a floating point. // https://github.com/moment/moment/pull/1871 return -Math.round(m._d.getTimezoneOffset() / 15) * 15; } // HOOKS // This function will be called whenever a moment is mutated. // It is intended to keep the offset in sync with the timezone. hooks.updateOffset = function () {}; // MOMENTS // keepLocalTime = true means only change the timezone, without // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]--> // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset // +0200, so we adjust the time as needed, to be valid. // // Keeping the time actually adds/subtracts (one hour) // from the actual represented time. That is why we call updateOffset // a second time. In case it wants us to change the offset again // _changeInProgress == true case, then we have to adjust, because // there is no such time in the given timezone. function getSetOffset (input, keepLocalTime, keepMinutes) { var offset = this._offset || 0, localAdjust; if (!this.isValid()) { return input != null ? this : NaN; } if (input != null) { if (typeof input === 'string') { input = offsetFromString(matchShortOffset, input); if (input === null) { return this; } } else if (Math.abs(input) < 16 && !keepMinutes) { input = input * 60; } if (!this._isUTC && keepLocalTime) { localAdjust = getDateOffset(this); } this._offset = input; this._isUTC = true; if (localAdjust != null) { this.add(localAdjust, 'm'); } if (offset !== input) { if (!keepLocalTime || this._changeInProgress) { addSubtract(this, createDuration(input - offset, 'm'), 1, false); } else if (!this._changeInProgress) { this._changeInProgress = true; hooks.updateOffset(this, true); this._changeInProgress = null; } } return this; } else { return this._isUTC ? offset : getDateOffset(this); } } function getSetZone (input, keepLocalTime) { if (input != null) { if (typeof input !== 'string') { input = -input; } this.utcOffset(input, keepLocalTime); return this; } else { return -this.utcOffset(); } } function setOffsetToUTC (keepLocalTime) { return this.utcOffset(0, keepLocalTime); } function setOffsetToLocal (keepLocalTime) { if (this._isUTC) { this.utcOffset(0, keepLocalTime); this._isUTC = false; if (keepLocalTime) { this.subtract(getDateOffset(this), 'm'); } } return this; } function setOffsetToParsedOffset () { if (this._tzm != null) { this.utcOffset(this._tzm, false, true); } else if (typeof this._i === 'string') { var tZone = offsetFromString(matchOffset, this._i); if (tZone != null) { this.utcOffset(tZone); } else { this.utcOffset(0, true); } } return this; } function hasAlignedHourOffset (input) { if (!this.isValid()) { return false; } input = input ? createLocal(input).utcOffset() : 0; return (this.utcOffset() - input) % 60 === 0; } function isDaylightSavingTime () { return ( this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset() ); } function isDaylightSavingTimeShifted () { if (!isUndefined(this._isDSTShifted)) { return this._isDSTShifted; } var c = {}; copyConfig(c, this); c = prepareConfig(c); if (c._a) { var other = c._isUTC ? createUTC(c._a) : createLocal(c._a); this._isDSTShifted = this.isValid() && compareArrays(c._a, other.toArray()) > 0; } else { this._isDSTShifted = false; } return this._isDSTShifted; } function isLocal () { return this.isValid() ? !this._isUTC : false; } function isUtcOffset () { return this.isValid() ? this._isUTC : false; } function isUtc () { return this.isValid() ? this._isUTC && this._offset === 0 : false; } // ASP.NET json date format regex var aspNetRegex = /^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/; // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere // and further modified to allow for strings containing both week and day var isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; function createDuration (input, key) { var duration = input, // matching against regexp is expensive, do it on demand match = null, sign, ret, diffRes; if (isDuration(input)) { duration = { ms : input._milliseconds, d : input._days, M : input._months }; } else if (isNumber(input)) { duration = {}; if (key) { duration[key] = input; } else { duration.milliseconds = input; } } else if (!!(match = aspNetRegex.exec(input))) { sign = (match[1] === '-') ? -1 : 1; duration = { y : 0, d : toInt(match[DATE]) * sign, h : toInt(match[HOUR]) * sign, m : toInt(match[MINUTE]) * sign, s : toInt(match[SECOND]) * sign, ms : toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match }; } else if (!!(match = isoRegex.exec(input))) { sign = (match[1] === '-') ? -1 : 1; duration = { y : parseIso(match[2], sign), M : parseIso(match[3], sign), w : parseIso(match[4], sign), d : parseIso(match[5], sign), h : parseIso(match[6], sign), m : parseIso(match[7], sign), s : parseIso(match[8], sign) }; } else if (duration == null) {// checks for null or undefined duration = {}; } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) { diffRes = momentsDifference(createLocal(duration.from), createLocal(duration.to)); duration = {}; duration.ms = diffRes.milliseconds; duration.M = diffRes.months; } ret = new Duration(duration); if (isDuration(input) && hasOwnProp(input, '_locale')) { ret._locale = input._locale; } return ret; } createDuration.fn = Duration.prototype; createDuration.invalid = createInvalid$1; function parseIso (inp, sign) { // We'd normally use ~~inp for this, but unfortunately it also // converts floats to ints. // inp may be undefined, so careful calling replace on it. var res = inp && parseFloat(inp.replace(',', '.')); // apply sign while we're at it return (isNaN(res) ? 0 : res) * sign; } function positiveMomentsDifference(base, other) { var res = {milliseconds: 0, months: 0}; res.months = other.month() - base.month() + (other.year() - base.year()) * 12; if (base.clone().add(res.months, 'M').isAfter(other)) { --res.months; } res.milliseconds = +other - +(base.clone().add(res.months, 'M')); return res; } function momentsDifference(base, other) { var res; if (!(base.isValid() && other.isValid())) { return {milliseconds: 0, months: 0}; } other = cloneWithOffset(other, base); if (base.isBefore(other)) { res = positiveMomentsDifference(base, other); } else { res = positiveMomentsDifference(other, base); res.milliseconds = -res.milliseconds; res.months = -res.months; } return res; } // TODO: remove 'name' arg after deprecation is removed function createAdder(direction, name) { return function (val, period) { var dur, tmp; //invert the arguments, but complain about it if (period !== null && !isNaN(+period)) { deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' + 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'); tmp = val; val = period; period = tmp; } val = typeof val === 'string' ? +val : val; dur = createDuration(val, period); addSubtract(this, dur, direction); return this; }; } function addSubtract (mom, duration, isAdding, updateOffset) { var milliseconds = duration._milliseconds, days = absRound(duration._days), months = absRound(duration._months); if (!mom.isValid()) { // No op return; } updateOffset = updateOffset == null ? true : updateOffset; if (months) { setMonth(mom, get(mom, 'Month') + months * isAdding); } if (days) { set$1(mom, 'Date', get(mom, 'Date') + days * isAdding); } if (milliseconds) { mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding); } if (updateOffset) { hooks.updateOffset(mom, days || months); } } var add = createAdder(1, 'add'); var subtract = createAdder(-1, 'subtract'); function getCalendarFormat(myMoment, now) { var diff = myMoment.diff(now, 'days', true); return diff < -6 ? 'sameElse' : diff < -1 ? 'lastWeek' : diff < 0 ? 'lastDay' : diff < 1 ? 'sameDay' : diff < 2 ? 'nextDay' : diff < 7 ? 'nextWeek' : 'sameElse'; } function calendar$1 (time, formats) { // We want to compare the start of today, vs this. // Getting start-of-today depends on whether we're local/utc/offset or not. var now = time || createLocal(), sod = cloneWithOffset(now, this).startOf('day'), format = hooks.calendarFormat(this, sod) || 'sameElse'; var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]); return this.format(output || this.localeData().calendar(format, this, createLocal(now))); } function clone () { return new Moment(this); } function isAfter (input, units) { var localInput = isMoment(input) ? input : createLocal(input); if (!(this.isValid() && localInput.isValid())) { return false; } units = normalizeUnits(units) || 'millisecond'; if (units === 'millisecond') { return this.valueOf() > localInput.valueOf(); } else { return localInput.valueOf() < this.clone().startOf(units).valueOf(); } } function isBefore (input, units) { var localInput = isMoment(input) ? input : createLocal(input); if (!(this.isValid() && localInput.isValid())) { return false; } units = normalizeUnits(units) || 'millisecond'; if (units === 'millisecond') { return this.valueOf() < localInput.valueOf(); } else { return this.clone().endOf(units).valueOf() < localInput.valueOf(); } } function isBetween (from, to, units, inclusivity) { var localFrom = isMoment(from) ? from : createLocal(from), localTo = isMoment(to) ? to : createLocal(to); if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) { return false; } inclusivity = inclusivity || '()'; return (inclusivity[0] === '(' ? this.isAfter(localFrom, units) : !this.isBefore(localFrom, units)) && (inclusivity[1] === ')' ? this.isBefore(localTo, units) : !this.isAfter(localTo, units)); } function isSame (input, units) { var localInput = isMoment(input) ? input : createLocal(input), inputMs; if (!(this.isValid() && localInput.isValid())) { return false; } units = normalizeUnits(units) || 'millisecond'; if (units === 'millisecond') { return this.valueOf() === localInput.valueOf(); } else { inputMs = localInput.valueOf(); return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf(); } } function isSameOrAfter (input, units) { return this.isSame(input, units) || this.isAfter(input, units); } function isSameOrBefore (input, units) { return this.isSame(input, units) || this.isBefore(input, units); } function diff (input, units, asFloat) { var that, zoneDelta, output; if (!this.isValid()) { return NaN; } that = cloneWithOffset(input, this); if (!that.isValid()) { return NaN; } zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4; units = normalizeUnits(units); switch (units) { case 'year': output = monthDiff(this, that) / 12; break; case 'month': output = monthDiff(this, that); break; case 'quarter': output = monthDiff(this, that) / 3; break; case 'second': output = (this - that) / 1e3; break; // 1000 case 'minute': output = (this - that) / 6e4; break; // 1000 * 60 case 'hour': output = (this - that) / 36e5; break; // 1000 * 60 * 60 case 'day': output = (this - that - zoneDelta) / 864e5; break; // 1000 * 60 * 60 * 24, negate dst case 'week': output = (this - that - zoneDelta) / 6048e5; break; // 1000 * 60 * 60 * 24 * 7, negate dst default: output = this - that; } return asFloat ? output : absFloor(output); } function monthDiff (a, b) { // difference in months var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()), // b is in (anchor - 1 month, anchor + 1 month) anchor = a.clone().add(wholeMonthDiff, 'months'), anchor2, adjust; if (b - anchor < 0) { anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); // linear across the month adjust = (b - anchor) / (anchor - anchor2); } else { anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); // linear across the month adjust = (b - anchor) / (anchor2 - anchor); } //check for negative zero, return zero if negative zero return -(wholeMonthDiff + adjust) || 0; } hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ'; hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]'; function toString () { return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); } function toISOString(keepOffset) { if (!this.isValid()) { return null; } var utc = keepOffset !== true; var m = utc ? this.clone().utc() : this; if (m.year() < 0 || m.year() > 9999) { return formatMoment(m, utc ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'); } if (isFunction(Date.prototype.toISOString)) { // native implementation is ~50x faster, use it when we can if (utc) { return this.toDate().toISOString(); } else { return new Date(this.valueOf() + this.utcOffset() * 60 * 1000).toISOString().replace('Z', formatMoment(m, 'Z')); } } return formatMoment(m, utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'); } /** * Return a human readable representation of a moment that can * also be evaluated to get a new moment which is the same * * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects */ function inspect () { if (!this.isValid()) { return 'moment.invalid(/* ' + this._i + ' */)'; } var func = 'moment'; var zone = ''; if (!this.isLocal()) { func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone'; zone = 'Z'; } var prefix = '[' + func + '("]'; var year = (0 <= this.year() && this.year() <= 9999) ? 'YYYY' : 'YYYYYY'; var datetime = '-MM-DD[T]HH:mm:ss.SSS'; var suffix = zone + '[")]'; return this.format(prefix + year + datetime + suffix); } function format (inputString) { if (!inputString) { inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat; } var output = formatMoment(this, inputString); return this.localeData().postformat(output); } function from (time, withoutSuffix) { if (this.isValid() && ((isMoment(time) && time.isValid()) || createLocal(time).isValid())) { return createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix); } else { return this.localeData().invalidDate(); } } function fromNow (withoutSuffix) { return this.from(createLocal(), withoutSuffix); } function to (time, withoutSuffix) { if (this.isValid() && ((isMoment(time) && time.isValid()) || createLocal(time).isValid())) { return createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix); } else { return this.localeData().invalidDate(); } } function toNow (withoutSuffix) { return this.to(createLocal(), withoutSuffix); } // If passed a locale key, it will set the locale for this // instance. Otherwise, it will return the locale configuration // variables for this instance. function locale (key) { var newLocaleData; if (key === undefined) { return this._locale._abbr; } else { newLocaleData = getLocale(key); if (newLocaleData != null) { this._locale = newLocaleData; } return this; } } var lang = deprecate( 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', function (key) { if (key === undefined) { return this.localeData(); } else { return this.locale(key); } } ); function localeData () { return this._locale; } function startOf (units) { units = normalizeUnits(units); // the following switch intentionally omits break keywords // to utilize falling through the cases. switch (units) { case 'year': this.month(0); /* falls through */ case 'quarter': case 'month': this.date(1); /* falls through */ case 'week': case 'isoWeek': case 'day': case 'date': this.hours(0); /* falls through */ case 'hour': this.minutes(0); /* falls through */ case 'minute': this.seconds(0); /* falls through */ case 'second': this.milliseconds(0); } // weeks are a special case if (units === 'week') { this.weekday(0); } if (units === 'isoWeek') { this.isoWeekday(1); } // quarters are also special if (units === 'quarter') { this.month(Math.floor(this.month() / 3) * 3); } return this; } function endOf (units) { units = normalizeUnits(units); if (units === undefined || units === 'millisecond') { return this; } // 'date' is an alias for 'day', so it should be considered as such. if (units === 'date') { units = 'day'; } return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms'); } function valueOf () { return this._d.valueOf() - ((this._offset || 0) * 60000); } function unix () { return Math.floor(this.valueOf() / 1000); } function toDate () { return new Date(this.valueOf()); } function toArray () { var m = this; return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()]; } function toObject () { var m = this; return { years: m.year(), months: m.month(), date: m.date(), hours: m.hours(), minutes: m.minutes(), seconds: m.seconds(), milliseconds: m.milliseconds() }; } function toJSON () { // new Date(NaN).toJSON() === null return this.isValid() ? this.toISOString() : null; } function isValid$2 () { return isValid(this); } function parsingFlags () { return extend({}, getParsingFlags(this)); } function invalidAt () { return getParsingFlags(this).overflow; } function creationData() { return { input: this._i, format: this._f, locale: this._locale, isUTC: this._isUTC, strict: this._strict }; } // FORMATTING addFormatToken(0, ['gg', 2], 0, function () { return this.weekYear() % 100; }); addFormatToken(0, ['GG', 2], 0, function () { return this.isoWeekYear() % 100; }); function addWeekYearFormatToken (token, getter) { addFormatToken(0, [token, token.length], 0, getter); } addWeekYearFormatToken('gggg', 'weekYear'); addWeekYearFormatToken('ggggg', 'weekYear'); addWeekYearFormatToken('GGGG', 'isoWeekYear'); addWeekYearFormatToken('GGGGG', 'isoWeekYear'); // ALIASES addUnitAlias('weekYear', 'gg'); addUnitAlias('isoWeekYear', 'GG'); // PRIORITY addUnitPriority('weekYear', 1); addUnitPriority('isoWeekYear', 1); // PARSING addRegexToken('G', matchSigned); addRegexToken('g', matchSigned); addRegexToken('GG', match1to2, match2); addRegexToken('gg', match1to2, match2); addRegexToken('GGGG', match1to4, match4); addRegexToken('gggg', match1to4, match4); addRegexToken('GGGGG', match1to6, match6); addRegexToken('ggggg', match1to6, match6); addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) { week[token.substr(0, 2)] = toInt(input); }); addWeekParseToken(['gg', 'GG'], function (input, week, config, token) { week[token] = hooks.parseTwoDigitYear(input); }); // MOMENTS function getSetWeekYear (input) { return getSetWeekYearHelper.call(this, input, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy); } function getSetISOWeekYear (input) { return getSetWeekYearHelper.call(this, input, this.isoWeek(), this.isoWeekday(), 1, 4); } function getISOWeeksInYear () { return weeksInYear(this.year(), 1, 4); } function getWeeksInYear () { var weekInfo = this.localeData()._week; return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); } function getSetWeekYearHelper(input, week, weekday, dow, doy) { var weeksTarget; if (input == null) { return weekOfYear(this, dow, doy).year; } else { weeksTarget = weeksInYear(input, dow, doy); if (week > weeksTarget) { week = weeksTarget; } return setWeekAll.call(this, input, week, weekday, dow, doy); } } function setWeekAll(weekYear, week, weekday, dow, doy) { var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy), date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear); this.year(date.getUTCFullYear()); this.month(date.getUTCMonth()); this.date(date.getUTCDate()); return this; } // FORMATTING addFormatToken('Q', 0, 'Qo', 'quarter'); // ALIASES addUnitAlias('quarter', 'Q'); // PRIORITY addUnitPriority('quarter', 7); // PARSING addRegexToken('Q', match1); addParseToken('Q', function (input, array) { array[MONTH] = (toInt(input) - 1) * 3; }); // MOMENTS function getSetQuarter (input) { return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3); } // FORMATTING addFormatToken('D', ['DD', 2], 'Do', 'date'); // ALIASES addUnitAlias('date', 'D'); // PRIORITY addUnitPriority('date', 9); // PARSING addRegexToken('D', match1to2); addRegexToken('DD', match1to2, match2); addRegexToken('Do', function (isStrict, locale) { // TODO: Remove "ordinalParse" fallback in next major release. return isStrict ? (locale._dayOfMonthOrdinalParse || locale._ordinalParse) : locale._dayOfMonthOrdinalParseLenient; }); addParseToken(['D', 'DD'], DATE); addParseToken('Do', function (input, array) { array[DATE] = toInt(input.match(match1to2)[0]); }); // MOMENTS var getSetDayOfMonth = makeGetSet('Date', true); // FORMATTING addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); // ALIASES addUnitAlias('dayOfYear', 'DDD'); // PRIORITY addUnitPriority('dayOfYear', 4); // PARSING addRegexToken('DDD', match1to3); addRegexToken('DDDD', match3); addParseToken(['DDD', 'DDDD'], function (input, array, config) { config._dayOfYear = toInt(input); }); // HELPERS // MOMENTS function getSetDayOfYear (input) { var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1; return input == null ? dayOfYear : this.add((input - dayOfYear), 'd'); } // FORMATTING addFormatToken('m', ['mm', 2], 0, 'minute'); // ALIASES addUnitAlias('minute', 'm'); // PRIORITY addUnitPriority('minute', 14); // PARSING addRegexToken('m', match1to2); addRegexToken('mm', match1to2, match2); addParseToken(['m', 'mm'], MINUTE); // MOMENTS var getSetMinute = makeGetSet('Minutes', false); // FORMATTING addFormatToken('s', ['ss', 2], 0, 'second'); // ALIASES addUnitAlias('second', 's'); // PRIORITY addUnitPriority('second', 15); // PARSING addRegexToken('s', match1to2); addRegexToken('ss', match1to2, match2); addParseToken(['s', 'ss'], SECOND); // MOMENTS var getSetSecond = makeGetSet('Seconds', false); // FORMATTING addFormatToken('S', 0, 0, function () { return ~~(this.millisecond() / 100); }); addFormatToken(0, ['SS', 2], 0, function () { return ~~(this.millisecond() / 10); }); addFormatToken(0, ['SSS', 3], 0, 'millisecond'); addFormatToken(0, ['SSSS', 4], 0, function () { return this.millisecond() * 10; }); addFormatToken(0, ['SSSSS', 5], 0, function () { return this.millisecond() * 100; }); addFormatToken(0, ['SSSSSS', 6], 0, function () { return this.millisecond() * 1000; }); addFormatToken(0, ['SSSSSSS', 7], 0, function () { return this.millisecond() * 10000; }); addFormatToken(0, ['SSSSSSSS', 8], 0, function () { return this.millisecond() * 100000; }); addFormatToken(0, ['SSSSSSSSS', 9], 0, function () { return this.millisecond() * 1000000; }); // ALIASES addUnitAlias('millisecond', 'ms'); // PRIORITY addUnitPriority('millisecond', 16); // PARSING addRegexToken('S', match1to3, match1); addRegexToken('SS', match1to3, match2); addRegexToken('SSS', match1to3, match3); var token; for (token = 'SSSS'; token.length <= 9; token += 'S') { addRegexToken(token, matchUnsigned); } function parseMs(input, array) { array[MILLISECOND] = toInt(('0.' + input) * 1000); } for (token = 'S'; token.length <= 9; token += 'S') { addParseToken(token, parseMs); } // MOMENTS var getSetMillisecond = makeGetSet('Milliseconds', false); // FORMATTING addFormatToken('z', 0, 0, 'zoneAbbr'); addFormatToken('zz', 0, 0, 'zoneName'); // MOMENTS function getZoneAbbr () { return this._isUTC ? 'UTC' : ''; } function getZoneName () { return this._isUTC ? 'Coordinated Universal Time' : ''; } var proto = Moment.prototype; proto.add = add; proto.calendar = calendar$1; proto.clone = clone; proto.diff = diff; proto.endOf = endOf; proto.format = format; proto.from = from; proto.fromNow = fromNow; proto.to = to; proto.toNow = toNow; proto.get = stringGet; proto.invalidAt = invalidAt; proto.isAfter = isAfter; proto.isBefore = isBefore; proto.isBetween = isBetween; proto.isSame = isSame; proto.isSameOrAfter = isSameOrAfter; proto.isSameOrBefore = isSameOrBefore; proto.isValid = isValid$2; proto.lang = lang; proto.locale = locale; proto.localeData = localeData; proto.max = prototypeMax; proto.min = prototypeMin; proto.parsingFlags = parsingFlags; proto.set = stringSet; proto.startOf = startOf; proto.subtract = subtract; proto.toArray = toArray; proto.toObject = toObject; proto.toDate = toDate; proto.toISOString = toISOString; proto.inspect = inspect; proto.toJSON = toJSON; proto.toString = toString; proto.unix = unix; proto.valueOf = valueOf; proto.creationData = creationData; proto.year = getSetYear; proto.isLeapYear = getIsLeapYear; proto.weekYear = getSetWeekYear; proto.isoWeekYear = getSetISOWeekYear; proto.quarter = proto.quarters = getSetQuarter; proto.month = getSetMonth; proto.daysInMonth = getDaysInMonth; proto.week = proto.weeks = getSetWeek; proto.isoWeek = proto.isoWeeks = getSetISOWeek; proto.weeksInYear = getWeeksInYear; proto.isoWeeksInYear = getISOWeeksInYear; proto.date = getSetDayOfMonth; proto.day = proto.days = getSetDayOfWeek; proto.weekday = getSetLocaleDayOfWeek; proto.isoWeekday = getSetISODayOfWeek; proto.dayOfYear = getSetDayOfYear; proto.hour = proto.hours = getSetHour; proto.minute = proto.minutes = getSetMinute; proto.second = proto.seconds = getSetSecond; proto.millisecond = proto.milliseconds = getSetMillisecond; proto.utcOffset = getSetOffset; proto.utc = setOffsetToUTC; proto.local = setOffsetToLocal; proto.parseZone = setOffsetToParsedOffset; proto.hasAlignedHourOffset = hasAlignedHourOffset; proto.isDST = isDaylightSavingTime; proto.isLocal = isLocal; proto.isUtcOffset = isUtcOffset; proto.isUtc = isUtc; proto.isUTC = isUtc; proto.zoneAbbr = getZoneAbbr; proto.zoneName = getZoneName; proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth); proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth); proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear); proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone); proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted); function createUnix (input) { return createLocal(input * 1000); } function createInZone () { return createLocal.apply(null, arguments).parseZone(); } function preParsePostFormat (string) { return string; } var proto$1 = Locale.prototype; proto$1.calendar = calendar; proto$1.longDateFormat = longDateFormat; proto$1.invalidDate = invalidDate; proto$1.ordinal = ordinal; proto$1.preparse = preParsePostFormat; proto$1.postformat = preParsePostFormat; proto$1.relativeTime = relativeTime; proto$1.pastFuture = pastFuture; proto$1.set = set; proto$1.months = localeMonths; proto$1.monthsShort = localeMonthsShort; proto$1.monthsParse = localeMonthsParse; proto$1.monthsRegex = monthsRegex; proto$1.monthsShortRegex = monthsShortRegex; proto$1.week = localeWeek; proto$1.firstDayOfYear = localeFirstDayOfYear; proto$1.firstDayOfWeek = localeFirstDayOfWeek; proto$1.weekdays = localeWeekdays; proto$1.weekdaysMin = localeWeekdaysMin; proto$1.weekdaysShort = localeWeekdaysShort; proto$1.weekdaysParse = localeWeekdaysParse; proto$1.weekdaysRegex = weekdaysRegex; proto$1.weekdaysShortRegex = weekdaysShortRegex; proto$1.weekdaysMinRegex = weekdaysMinRegex; proto$1.isPM = localeIsPM; proto$1.meridiem = localeMeridiem; function get$1 (format, index, field, setter) { var locale = getLocale(); var utc = createUTC().set(setter, index); return locale[field](utc, format); } function listMonthsImpl (format, index, field) { if (isNumber(format)) { index = format; format = undefined; } format = format || ''; if (index != null) { return get$1(format, index, field, 'month'); } var i; var out = []; for (i = 0; i < 12; i++) { out[i] = get$1(format, i, field, 'month'); } return out; } // () // (5) // (fmt, 5) // (fmt) // (true) // (true, 5) // (true, fmt, 5) // (true, fmt) function listWeekdaysImpl (localeSorted, format, index, field) { if (typeof localeSorted === 'boolean') { if (isNumber(format)) { index = format; format = undefined; } format = format || ''; } else { format = localeSorted; index = format; localeSorted = false; if (isNumber(format)) { index = format; format = undefined; } format = format || ''; } var locale = getLocale(), shift = localeSorted ? locale._week.dow : 0; if (index != null) { return get$1(format, (index + shift) % 7, field, 'day'); } var i; var out = []; for (i = 0; i < 7; i++) { out[i] = get$1(format, (i + shift) % 7, field, 'day'); } return out; } function listMonths (format, index) { return listMonthsImpl(format, index, 'months'); } function listMonthsShort (format, index) { return listMonthsImpl(format, index, 'monthsShort'); } function listWeekdays (localeSorted, format, index) { return listWeekdaysImpl(localeSorted, format, index, 'weekdays'); } function listWeekdaysShort (localeSorted, format, index) { return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort'); } function listWeekdaysMin (localeSorted, format, index) { return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin'); } getSetGlobalLocale('en', { dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, ordinal : function (number) { var b = number % 10, output = (toInt(number % 100 / 10) === 1) ? 'th' : (b === 1) ? 'st' : (b === 2) ? 'nd' : (b === 3) ? 'rd' : 'th'; return number + output; } }); // Side effect imports hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale); hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale); var mathAbs = Math.abs; function abs () { var data = this._data; this._milliseconds = mathAbs(this._milliseconds); this._days = mathAbs(this._days); this._months = mathAbs(this._months); data.milliseconds = mathAbs(data.milliseconds); data.seconds = mathAbs(data.seconds); data.minutes = mathAbs(data.minutes); data.hours = mathAbs(data.hours); data.months = mathAbs(data.months); data.years = mathAbs(data.years); return this; } function addSubtract$1 (duration, input, value, direction) { var other = createDuration(input, value); duration._milliseconds += direction * other._milliseconds; duration._days += direction * other._days; duration._months += direction * other._months; return duration._bubble(); } // supports only 2.0-style add(1, 's') or add(duration) function add$1 (input, value) { return addSubtract$1(this, input, value, 1); } // supports only 2.0-style subtract(1, 's') or subtract(duration) function subtract$1 (input, value) { return addSubtract$1(this, input, value, -1); } function absCeil (number) { if (number < 0) { return Math.floor(number); } else { return Math.ceil(number); } } function bubble () { var milliseconds = this._milliseconds; var days = this._days; var months = this._months; var data = this._data; var seconds, minutes, hours, years, monthsFromDays; // if we have a mix of positive and negative values, bubble down first // check: https://github.com/moment/moment/issues/2166 if (!((milliseconds >= 0 && days >= 0 && months >= 0) || (milliseconds <= 0 && days <= 0 && months <= 0))) { milliseconds += absCeil(monthsToDays(months) + days) * 864e5; days = 0; months = 0; } // The following code bubbles up values, see the tests for // examples of what that means. data.milliseconds = milliseconds % 1000; seconds = absFloor(milliseconds / 1000); data.seconds = seconds % 60; minutes = absFloor(seconds / 60); data.minutes = minutes % 60; hours = absFloor(minutes / 60); data.hours = hours % 24; days += absFloor(hours / 24); // convert days to months monthsFromDays = absFloor(daysToMonths(days)); months += monthsFromDays; days -= absCeil(monthsToDays(monthsFromDays)); // 12 months -> 1 year years = absFloor(months / 12); months %= 12; data.days = days; data.months = months; data.years = years; return this; } function daysToMonths (days) { // 400 years have 146097 days (taking into account leap year rules) // 400 years have 12 months === 4800 return days * 4800 / 146097; } function monthsToDays (months) { // the reverse of daysToMonths return months * 146097 / 4800; } function as (units) { if (!this.isValid()) { return NaN; } var days; var months; var milliseconds = this._milliseconds; units = normalizeUnits(units); if (units === 'month' || units === 'year') { days = this._days + milliseconds / 864e5; months = this._months + daysToMonths(days); return units === 'month' ? months : months / 12; } else { // handle milliseconds separately because of floating point math errors (issue #1867) days = this._days + Math.round(monthsToDays(this._months)); switch (units) { case 'week' : return days / 7 + milliseconds / 6048e5; case 'day' : return days + milliseconds / 864e5; case 'hour' : return days * 24 + milliseconds / 36e5; case 'minute' : return days * 1440 + milliseconds / 6e4; case 'second' : return days * 86400 + milliseconds / 1000; // Math.floor prevents floating point math errors here case 'millisecond': return Math.floor(days * 864e5) + milliseconds; default: throw new Error('Unknown unit ' + units); } } } // TODO: Use this.as('ms')? function valueOf$1 () { if (!this.isValid()) { return NaN; } return ( this._milliseconds + this._days * 864e5 + (this._months % 12) * 2592e6 + toInt(this._months / 12) * 31536e6 ); } function makeAs (alias) { return function () { return this.as(alias); }; } var asMilliseconds = makeAs('ms'); var asSeconds = makeAs('s'); var asMinutes = makeAs('m'); var asHours = makeAs('h'); var asDays = makeAs('d'); var asWeeks = makeAs('w'); var asMonths = makeAs('M'); var asYears = makeAs('y'); function clone$1 () { return createDuration(this); } function get$2 (units) { units = normalizeUnits(units); return this.isValid() ? this[units + 's']() : NaN; } function makeGetter(name) { return function () { return this.isValid() ? this._data[name] : NaN; }; } var milliseconds = makeGetter('milliseconds'); var seconds = makeGetter('seconds'); var minutes = makeGetter('minutes'); var hours = makeGetter('hours'); var days = makeGetter('days'); var months = makeGetter('months'); var years = makeGetter('years'); function weeks () { return absFloor(this.days() / 7); } var round = Math.round; var thresholds = { ss: 44, // a few seconds to seconds s : 45, // seconds to minute m : 45, // minutes to hour h : 22, // hours to day d : 26, // days to month M : 11 // months to year }; // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) { return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture); } function relativeTime$1 (posNegDuration, withoutSuffix, locale) { var duration = createDuration(posNegDuration).abs(); var seconds = round(duration.as('s')); var minutes = round(duration.as('m')); var hours = round(duration.as('h')); var days = round(duration.as('d')); var months = round(duration.as('M')); var years = round(duration.as('y')); var a = seconds <= thresholds.ss && ['s', seconds] || seconds < thresholds.s && ['ss', seconds] || minutes <= 1 && ['m'] || minutes < thresholds.m && ['mm', minutes] || hours <= 1 && ['h'] || hours < thresholds.h && ['hh', hours] || days <= 1 && ['d'] || days < thresholds.d && ['dd', days] || months <= 1 && ['M'] || months < thresholds.M && ['MM', months] || years <= 1 && ['y'] || ['yy', years]; a[2] = withoutSuffix; a[3] = +posNegDuration > 0; a[4] = locale; return substituteTimeAgo.apply(null, a); } // This function allows you to set the rounding function for relative time strings function getSetRelativeTimeRounding (roundingFunction) { if (roundingFunction === undefined) { return round; } if (typeof(roundingFunction) === 'function') { round = roundingFunction; return true; } return false; } // This function allows you to set a threshold for relative time strings function getSetRelativeTimeThreshold (threshold, limit) { if (thresholds[threshold] === undefined) { return false; } if (limit === undefined) { return thresholds[threshold]; } thresholds[threshold] = limit; if (threshold === 's') { thresholds.ss = limit - 1; } return true; } function humanize (withSuffix) { if (!this.isValid()) { return this.localeData().invalidDate(); } var locale = this.localeData(); var output = relativeTime$1(this, !withSuffix, locale); if (withSuffix) { output = locale.pastFuture(+this, output); } return locale.postformat(output); } var abs$1 = Math.abs; function sign(x) { return ((x > 0) - (x < 0)) || +x; } function toISOString$1() { // for ISO strings we do not use the normal bubbling rules: // * milliseconds bubble up until they become hours // * days do not bubble at all // * months bubble up until they become years // This is because there is no context-free conversion between hours and days // (think of clock changes) // and also not between days and months (28-31 days per month) if (!this.isValid()) { return this.localeData().invalidDate(); } var seconds = abs$1(this._milliseconds) / 1000; var days = abs$1(this._days); var months = abs$1(this._months); var minutes, hours, years; // 3600 seconds -> 60 minutes -> 1 hour minutes = absFloor(seconds / 60); hours = absFloor(minutes / 60); seconds %= 60; minutes %= 60; // 12 months -> 1 year years = absFloor(months / 12); months %= 12; // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js var Y = years; var M = months; var D = days; var h = hours; var m = minutes; var s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : ''; var total = this.asSeconds(); if (!total) { // this is the same as C#'s (Noda) and python (isodate)... // but not other JS (goog.date) return 'P0D'; } var totalSign = total < 0 ? '-' : ''; var ymSign = sign(this._months) !== sign(total) ? '-' : ''; var daysSign = sign(this._days) !== sign(total) ? '-' : ''; var hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : ''; return totalSign + 'P' + (Y ? ymSign + Y + 'Y' : '') + (M ? ymSign + M + 'M' : '') + (D ? daysSign + D + 'D' : '') + ((h || m || s) ? 'T' : '') + (h ? hmsSign + h + 'H' : '') + (m ? hmsSign + m + 'M' : '') + (s ? hmsSign + s + 'S' : ''); } var proto$2 = Duration.prototype; proto$2.isValid = isValid$1; proto$2.abs = abs; proto$2.add = add$1; proto$2.subtract = subtract$1; proto$2.as = as; proto$2.asMilliseconds = asMilliseconds; proto$2.asSeconds = asSeconds; proto$2.asMinutes = asMinutes; proto$2.asHours = asHours; proto$2.asDays = asDays; proto$2.asWeeks = asWeeks; proto$2.asMonths = asMonths; proto$2.asYears = asYears; proto$2.valueOf = valueOf$1; proto$2._bubble = bubble; proto$2.clone = clone$1; proto$2.get = get$2; proto$2.milliseconds = milliseconds; proto$2.seconds = seconds; proto$2.minutes = minutes; proto$2.hours = hours; proto$2.days = days; proto$2.weeks = weeks; proto$2.months = months; proto$2.years = years; proto$2.humanize = humanize; proto$2.toISOString = toISOString$1; proto$2.toString = toISOString$1; proto$2.toJSON = toISOString$1; proto$2.locale = locale; proto$2.localeData = localeData; proto$2.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', toISOString$1); proto$2.lang = lang; // Side effect imports // FORMATTING addFormatToken('X', 0, 0, 'unix'); addFormatToken('x', 0, 0, 'valueOf'); // PARSING addRegexToken('x', matchSigned); addRegexToken('X', matchTimestamp); addParseToken('X', function (input, array, config) { config._d = new Date(parseFloat(input, 10) * 1000); }); addParseToken('x', function (input, array, config) { config._d = new Date(toInt(input)); }); // Side effect imports hooks.version = '2.23.0'; setHookCallback(createLocal); hooks.fn = proto; hooks.min = min; hooks.max = max; hooks.now = now; hooks.utc = createUTC; hooks.unix = createUnix; hooks.months = listMonths; hooks.isDate = isDate; hooks.locale = getSetGlobalLocale; hooks.invalid = createInvalid; hooks.duration = createDuration; hooks.isMoment = isMoment; hooks.weekdays = listWeekdays; hooks.parseZone = createInZone; hooks.localeData = getLocale; hooks.isDuration = isDuration; hooks.monthsShort = listMonthsShort; hooks.weekdaysMin = listWeekdaysMin; hooks.defineLocale = defineLocale; hooks.updateLocale = updateLocale; hooks.locales = listLocales; hooks.weekdaysShort = listWeekdaysShort; hooks.normalizeUnits = normalizeUnits; hooks.relativeTimeRounding = getSetRelativeTimeRounding; hooks.relativeTimeThreshold = getSetRelativeTimeThreshold; hooks.calendarFormat = getCalendarFormat; hooks.prototype = proto; // currently HTML5 input type only supports 24-hour formats hooks.HTML5_FMT = { DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // DATE: 'YYYY-MM-DD', // TIME: 'HH:mm', // TIME_SECONDS: 'HH:mm:ss', // TIME_MS: 'HH:mm:ss.SSS', // WEEK: 'GGGG-[W]WW', // MONTH: 'YYYY-MM' // }; return hooks; }))); /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(303)(module))) /***/ }), /* 303 */ /***/ (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; } /***/ }), /* 304 */ /***/ (function(module, exports, __webpack_require__) { var map = { "./af": 305, "./af.js": 305, "./ar": 306, "./ar-dz": 307, "./ar-dz.js": 307, "./ar-kw": 308, "./ar-kw.js": 308, "./ar-ly": 309, "./ar-ly.js": 309, "./ar-ma": 310, "./ar-ma.js": 310, "./ar-sa": 311, "./ar-sa.js": 311, "./ar-tn": 312, "./ar-tn.js": 312, "./ar.js": 306, "./az": 313, "./az.js": 313, "./be": 314, "./be.js": 314, "./bg": 315, "./bg.js": 315, "./bm": 316, "./bm.js": 316, "./bn": 317, "./bn.js": 317, "./bo": 318, "./bo.js": 318, "./br": 319, "./br.js": 319, "./bs": 320, "./bs.js": 320, "./ca": 321, "./ca.js": 321, "./cs": 322, "./cs.js": 322, "./cv": 323, "./cv.js": 323, "./cy": 324, "./cy.js": 324, "./da": 325, "./da.js": 325, "./de": 326, "./de-at": 327, "./de-at.js": 327, "./de-ch": 328, "./de-ch.js": 328, "./de.js": 326, "./dv": 329, "./dv.js": 329, "./el": 330, "./el.js": 330, "./en-au": 331, "./en-au.js": 331, "./en-ca": 332, "./en-ca.js": 332, "./en-gb": 333, "./en-gb.js": 333, "./en-ie": 334, "./en-ie.js": 334, "./en-il": 335, "./en-il.js": 335, "./en-nz": 336, "./en-nz.js": 336, "./eo": 337, "./eo.js": 337, "./es": 338, "./es-do": 339, "./es-do.js": 339, "./es-us": 340, "./es-us.js": 340, "./es.js": 338, "./et": 341, "./et.js": 341, "./eu": 342, "./eu.js": 342, "./fa": 343, "./fa.js": 343, "./fi": 344, "./fi.js": 344, "./fo": 345, "./fo.js": 345, "./fr": 346, "./fr-ca": 347, "./fr-ca.js": 347, "./fr-ch": 348, "./fr-ch.js": 348, "./fr.js": 346, "./fy": 349, "./fy.js": 349, "./gd": 350, "./gd.js": 350, "./gl": 351, "./gl.js": 351, "./gom-latn": 352, "./gom-latn.js": 352, "./gu": 353, "./gu.js": 353, "./he": 354, "./he.js": 354, "./hi": 355, "./hi.js": 355, "./hr": 356, "./hr.js": 356, "./hu": 357, "./hu.js": 357, "./hy-am": 358, "./hy-am.js": 358, "./id": 359, "./id.js": 359, "./is": 360, "./is.js": 360, "./it": 361, "./it.js": 361, "./ja": 362, "./ja.js": 362, "./jv": 363, "./jv.js": 363, "./ka": 364, "./ka.js": 364, "./kk": 365, "./kk.js": 365, "./km": 366, "./km.js": 366, "./kn": 367, "./kn.js": 367, "./ko": 368, "./ko.js": 368, "./ku": 369, "./ku.js": 369, "./ky": 370, "./ky.js": 370, "./lb": 371, "./lb.js": 371, "./lo": 372, "./lo.js": 372, "./lt": 373, "./lt.js": 373, "./lv": 374, "./lv.js": 374, "./me": 375, "./me.js": 375, "./mi": 376, "./mi.js": 376, "./mk": 377, "./mk.js": 377, "./ml": 378, "./ml.js": 378, "./mn": 379, "./mn.js": 379, "./mr": 380, "./mr.js": 380, "./ms": 381, "./ms-my": 382, "./ms-my.js": 382, "./ms.js": 381, "./mt": 383, "./mt.js": 383, "./my": 384, "./my.js": 384, "./nb": 385, "./nb.js": 385, "./ne": 386, "./ne.js": 386, "./nl": 387, "./nl-be": 388, "./nl-be.js": 388, "./nl.js": 387, "./nn": 389, "./nn.js": 389, "./pa-in": 390, "./pa-in.js": 390, "./pl": 391, "./pl.js": 391, "./pt": 392, "./pt-br": 393, "./pt-br.js": 393, "./pt.js": 392, "./ro": 394, "./ro.js": 394, "./ru": 395, "./ru.js": 395, "./sd": 396, "./sd.js": 396, "./se": 397, "./se.js": 397, "./si": 398, "./si.js": 398, "./sk": 399, "./sk.js": 399, "./sl": 400, "./sl.js": 400, "./sq": 401, "./sq.js": 401, "./sr": 402, "./sr-cyrl": 403, "./sr-cyrl.js": 403, "./sr.js": 402, "./ss": 404, "./ss.js": 404, "./sv": 405, "./sv.js": 405, "./sw": 406, "./sw.js": 406, "./ta": 407, "./ta.js": 407, "./te": 408, "./te.js": 408, "./tet": 409, "./tet.js": 409, "./tg": 410, "./tg.js": 410, "./th": 411, "./th.js": 411, "./tl-ph": 412, "./tl-ph.js": 412, "./tlh": 413, "./tlh.js": 413, "./tr": 414, "./tr.js": 414, "./tzl": 415, "./tzl.js": 415, "./tzm": 416, "./tzm-latn": 417, "./tzm-latn.js": 417, "./tzm.js": 416, "./ug-cn": 418, "./ug-cn.js": 418, "./uk": 419, "./uk.js": 419, "./ur": 420, "./ur.js": 420, "./uz": 421, "./uz-latn": 422, "./uz-latn.js": 422, "./uz.js": 421, "./vi": 423, "./vi.js": 423, "./x-pseudo": 424, "./x-pseudo.js": 424, "./yo": 425, "./yo.js": 425, "./zh-cn": 426, "./zh-cn.js": 426, "./zh-hk": 427, "./zh-hk.js": 427, "./zh-tw": 428, "./zh-tw.js": 428 }; function webpackContext(req) { return __webpack_require__(webpackContextResolve(req)); }; function webpackContextResolve(req) { return map[req] || (function() { throw new Error("Cannot find module '" + req + "'.") }()); }; webpackContext.keys = function webpackContextKeys() { return Object.keys(map); }; webpackContext.resolve = webpackContextResolve; module.exports = webpackContext; webpackContext.id = 304; /***/ }), /* 305 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var af = moment.defineLocale('af', { months : 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split('_'), monthsShort : 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'), weekdays : 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split('_'), weekdaysShort : 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'), weekdaysMin : 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'), meridiemParse: /vm|nm/i, isPM : function (input) { return /^nm$/i.test(input); }, meridiem : function (hours, minutes, isLower) { if (hours < 12) { return isLower ? 'vm' : 'VM'; } else { return isLower ? 'nm' : 'NM'; } }, 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 : '[Vandag om] LT', nextDay : '[Môre om] LT', nextWeek : 'dddd [om] LT', lastDay : '[Gister om] LT', lastWeek : '[Laas] dddd [om] LT', sameElse : 'L' }, relativeTime : { future : 'oor %s', past : '%s gelede', s : '\'n paar sekondes', ss : '%d sekondes', m : '\'n minuut', mm : '%d minute', h : '\'n uur', hh : '%d ure', d : '\'n dag', dd : '%d dae', M : '\'n maand', MM : '%d maande', y : '\'n jaar', yy : '%d jaar' }, dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, ordinal : function (number) { return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); // Thanks to Joris Röling : https://github.com/jjupiter }, week : { dow : 1, // Maandag is die eerste dag van die week. doy : 4 // Die week wat die 4de Januarie bevat is die eerste week van die jaar. } }); return af; }))); /***/ }), /* 306 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var symbolMap = { '1': '١', '2': '٢', '3': '٣', '4': '٤', '5': '٥', '6': '٦', '7': '٧', '8': '٨', '9': '٩', '0': '٠' }, numberMap = { '١': '1', '٢': '2', '٣': '3', '٤': '4', '٥': '5', '٦': '6', '٧': '7', '٨': '8', '٩': '9', '٠': '0' }, pluralForm = function (n) { return n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5; }, plurals = { s : ['أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية'], m : ['أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة'], h : ['أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة'], d : ['أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم'], M : ['أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر'], y : ['أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام'] }, pluralize = function (u) { return function (number, withoutSuffix, string, isFuture) { var f = pluralForm(number), str = plurals[u][pluralForm(number)]; if (f === 2) { str = str[withoutSuffix ? 0 : 1]; } return str.replace(/%d/i, number); }; }, months = [ 'يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر' ]; var ar = moment.defineLocale('ar', { months : months, monthsShort : months, weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'), weekdaysParseExact : true, longDateFormat : { LT : 'HH:mm', LTS : 'HH:mm:ss', L : 'D/\u200FM/\u200FYYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY HH:mm', LLLL : 'dddd D MMMM YYYY HH:mm' }, meridiemParse: /ص|م/, isPM : function (input) { return 'م' === input; }, meridiem : function (hour, minute, isLower) { if (hour < 12) { return 'ص'; } else { return 'م'; } }, calendar : { sameDay: '[اليوم عند الساعة] LT', nextDay: '[غدًا عند الساعة] LT', nextWeek: 'dddd [عند الساعة] LT', lastDay: '[أمس عند الساعة] LT', lastWeek: 'dddd [عند الساعة] LT', sameElse: 'L' }, relativeTime : { future : 'بعد %s', past : 'منذ %s', s : pluralize('s'), ss : pluralize('s'), m : pluralize('m'), mm : pluralize('m'), h : pluralize('h'), hh : pluralize('h'), d : pluralize('d'), dd : pluralize('d'), M : pluralize('M'), MM : pluralize('M'), y : pluralize('y'), yy : pluralize('y') }, preparse: function (string) { return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { return numberMap[match]; }).replace(/،/g, ','); }, postformat: function (string) { return string.replace(/\d/g, function (match) { return symbolMap[match]; }).replace(/,/g, '،'); }, week : { dow : 6, // Saturday is the first day of the week. doy : 12 // The week that contains Jan 12th is the first week of the year. } }); return ar; }))); /***/ }), /* 307 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var arDz = moment.defineLocale('ar-dz', { months : 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), monthsShort : 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), weekdaysShort : 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'), weekdaysMin : 'أح_إث_ثلا_أر_خم_جم_سب'.split('_'), weekdaysParseExact : true, 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: '[اليوم على الساعة] LT', nextDay: '[غدا على الساعة] LT', nextWeek: 'dddd [على الساعة] LT', lastDay: '[أمس على الساعة] LT', lastWeek: 'dddd [على الساعة] LT', sameElse: 'L' }, relativeTime : { future : 'في %s', past : 'منذ %s', s : 'ثوان', ss : '%d ثانية', m : 'دقيقة', mm : '%d دقائق', h : 'ساعة', hh : '%d ساعات', d : 'يوم', dd : '%d أيام', M : 'شهر', MM : '%d أشهر', y : 'سنة', yy : '%d سنوات' }, week : { dow : 0, // Sunday is the first day of the week. doy : 4 // The week that contains Jan 4th is the first week of the year. } }); return arDz; }))); /***/ }), /* 308 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var arKw = moment.defineLocale('ar-kw', { months : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'), monthsShort : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'), weekdays : 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), weekdaysShort : 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'), weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'), weekdaysParseExact : true, 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: '[اليوم على الساعة] LT', nextDay: '[غدا على الساعة] LT', nextWeek: 'dddd [على الساعة] LT', lastDay: '[أمس على الساعة] LT', lastWeek: 'dddd [على الساعة] LT', sameElse: 'L' }, relativeTime : { future : 'في %s', past : 'منذ %s', s : 'ثوان', ss : '%d ثانية', m : 'دقيقة', mm : '%d دقائق', h : 'ساعة', hh : '%d ساعات', d : 'يوم', dd : '%d أيام', M : 'شهر', MM : '%d أشهر', y : 'سنة', yy : '%d سنوات' }, week : { dow : 0, // Sunday is the first day of the week. doy : 12 // The week that contains Jan 12th is the first week of the year. } }); return arKw; }))); /***/ }), /* 309 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var symbolMap = { '1': '1', '2': '2', '3': '3', '4': '4', '5': '5', '6': '6', '7': '7', '8': '8', '9': '9', '0': '0' }, pluralForm = function (n) { return n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5; }, plurals = { s : ['أقل من ثانية', 'ثانية واحدة', ['ثانيتان', 'ثانيتين'], '%d ثوان', '%d ثانية', '%d ثانية'], m : ['أقل من دقيقة', 'دقيقة واحدة', ['دقيقتان', 'دقيقتين'], '%d دقائق', '%d دقيقة', '%d دقيقة'], h : ['أقل من ساعة', 'ساعة واحدة', ['ساعتان', 'ساعتين'], '%d ساعات', '%d ساعة', '%d ساعة'], d : ['أقل من يوم', 'يوم واحد', ['يومان', 'يومين'], '%d أيام', '%d يومًا', '%d يوم'], M : ['أقل من شهر', 'شهر واحد', ['شهران', 'شهرين'], '%d أشهر', '%d شهرا', '%d شهر'], y : ['أقل من عام', 'عام واحد', ['عامان', 'عامين'], '%d أعوام', '%d عامًا', '%d عام'] }, pluralize = function (u) { return function (number, withoutSuffix, string, isFuture) { var f = pluralForm(number), str = plurals[u][pluralForm(number)]; if (f === 2) { str = str[withoutSuffix ? 0 : 1]; } return str.replace(/%d/i, number); }; }, months = [ 'يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر' ]; var arLy = moment.defineLocale('ar-ly', { months : months, monthsShort : months, weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'), weekdaysParseExact : true, longDateFormat : { LT : 'HH:mm', LTS : 'HH:mm:ss', L : 'D/\u200FM/\u200FYYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY HH:mm', LLLL : 'dddd D MMMM YYYY HH:mm' }, meridiemParse: /ص|م/, isPM : function (input) { return 'م' === input; }, meridiem : function (hour, minute, isLower) { if (hour < 12) { return 'ص'; } else { return 'م'; } }, calendar : { sameDay: '[اليوم عند الساعة] LT', nextDay: '[غدًا عند الساعة] LT', nextWeek: 'dddd [عند الساعة] LT', lastDay: '[أمس عند الساعة] LT', lastWeek: 'dddd [عند الساعة] LT', sameElse: 'L' }, relativeTime : { future : 'بعد %s', past : 'منذ %s', s : pluralize('s'), ss : pluralize('s'), m : pluralize('m'), mm : pluralize('m'), h : pluralize('h'), hh : pluralize('h'), d : pluralize('d'), dd : pluralize('d'), M : pluralize('M'), MM : pluralize('M'), y : pluralize('y'), yy : pluralize('y') }, preparse: function (string) { return string.replace(/،/g, ','); }, postformat: function (string) { return string.replace(/\d/g, function (match) { return symbolMap[match]; }).replace(/,/g, '،'); }, week : { dow : 6, // Saturday is the first day of the week. doy : 12 // The week that contains Jan 12th is the first week of the year. } }); return arLy; }))); /***/ }), /* 310 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var arMa = moment.defineLocale('ar-ma', { months : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'), monthsShort : 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split('_'), weekdays : 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), weekdaysShort : 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'), weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'), weekdaysParseExact : true, 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: '[اليوم على الساعة] LT', nextDay: '[غدا على الساعة] LT', nextWeek: 'dddd [على الساعة] LT', lastDay: '[أمس على الساعة] LT', lastWeek: 'dddd [على الساعة] LT', sameElse: 'L' }, relativeTime : { future : 'في %s', past : 'منذ %s', s : 'ثوان', ss : '%d ثانية', m : 'دقيقة', mm : '%d دقائق', h : 'ساعة', hh : '%d ساعات', d : 'يوم', dd : '%d أيام', M : 'شهر', MM : '%d أشهر', y : 'سنة', yy : '%d سنوات' }, week : { dow : 6, // Saturday is the first day of the week. doy : 12 // The week that contains Jan 12th is the first week of the year. } }); return arMa; }))); /***/ }), /* 311 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var symbolMap = { '1': '١', '2': '٢', '3': '٣', '4': '٤', '5': '٥', '6': '٦', '7': '٧', '8': '٨', '9': '٩', '0': '٠' }, numberMap = { '١': '1', '٢': '2', '٣': '3', '٤': '4', '٥': '5', '٦': '6', '٧': '7', '٨': '8', '٩': '9', '٠': '0' }; var arSa = moment.defineLocale('ar-sa', { months : 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), monthsShort : 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), weekdays : 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), weekdaysShort : 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), weekdaysMin : 'ح_ن_ث_ر_خ_ج_س'.split('_'), weekdaysParseExact : true, 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' }, meridiemParse: /ص|م/, isPM : function (input) { return 'م' === input; }, meridiem : function (hour, minute, isLower) { if (hour < 12) { return 'ص'; } else { return 'م'; } }, calendar : { sameDay: '[اليوم على الساعة] LT', nextDay: '[غدا على الساعة] LT', nextWeek: 'dddd [على الساعة] LT', lastDay: '[أمس على الساعة] LT', lastWeek: 'dddd [على الساعة] LT', sameElse: 'L' }, relativeTime : { future : 'في %s', past : 'منذ %s', s : 'ثوان', ss : '%d ثانية', m : 'دقيقة', mm : '%d دقائق', h : 'ساعة', hh : '%d ساعات', d : 'يوم', dd : '%d أيام', M : 'شهر', MM : '%d أشهر', y : 'سنة', yy : '%d سنوات' }, preparse: function (string) { return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { return numberMap[match]; }).replace(/،/g, ','); }, postformat: function (string) { return string.replace(/\d/g, function (match) { return symbolMap[match]; }).replace(/,/g, '،'); }, week : { dow : 0, // Sunday is the first day of the week. doy : 6 // The week that contains Jan 6th is the first week of the year. } }); return arSa; }))); /***/ }), /* 312 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var arTn = moment.defineLocale('ar-tn', { months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), monthsShort: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split('_'), weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), weekdaysParseExact : true, 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: '[اليوم على الساعة] LT', nextDay: '[غدا على الساعة] LT', nextWeek: 'dddd [على الساعة] LT', lastDay: '[أمس على الساعة] LT', lastWeek: 'dddd [على الساعة] LT', sameElse: 'L' }, relativeTime: { future: 'في %s', past: 'منذ %s', s: 'ثوان', ss : '%d ثانية', m: 'دقيقة', mm: '%d دقائق', h: 'ساعة', hh: '%d ساعات', d: 'يوم', dd: '%d أيام', M: 'شهر', MM: '%d أشهر', y: 'سنة', yy: '%d سنوات' }, 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 arTn; }))); /***/ }), /* 313 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var suffixes = { 1: '-inci', 5: '-inci', 8: '-inci', 70: '-inci', 80: '-inci', 2: '-nci', 7: '-nci', 20: '-nci', 50: '-nci', 3: '-üncü', 4: '-üncü', 100: '-üncü', 6: '-ncı', 9: '-uncu', 10: '-uncu', 30: '-uncu', 60: '-ıncı', 90: '-ıncı' }; var az = moment.defineLocale('az', { months : 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split('_'), monthsShort : 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'), weekdays : 'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split('_'), weekdaysShort : 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'), weekdaysMin : 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'), weekdaysParseExact : true, 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 : '[bugün saat] LT', nextDay : '[sabah saat] LT', nextWeek : '[gələn həftə] dddd [saat] LT', lastDay : '[dünən] LT', lastWeek : '[keçən həftə] dddd [saat] LT', sameElse : 'L' }, relativeTime : { future : '%s sonra', past : '%s əvvəl', s : 'birneçə saniyə', ss : '%d saniyə', m : 'bir dəqiqə', mm : '%d dəqiqə', h : 'bir saat', hh : '%d saat', d : 'bir gün', dd : '%d gün', M : 'bir ay', MM : '%d ay', y : 'bir il', yy : '%d il' }, meridiemParse: /gecə|səhər|gündüz|axşam/, isPM : function (input) { return /^(gündüz|axşam)$/.test(input); }, meridiem : function (hour, minute, isLower) { if (hour < 4) { return 'gecə'; } else if (hour < 12) { return 'səhər'; } else if (hour < 17) { return 'gündüz'; } else { return 'axşam'; } }, dayOfMonthOrdinalParse: /\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/, ordinal : function (number) { if (number === 0) { // special case for zero return number + '-ıncı'; } var a = number % 10, b = number % 100 - a, c = number >= 100 ? 100 : null; return number + (suffixes[a] || suffixes[b] || suffixes[c]); }, week : { dow : 1, // Monday is the first day of the week. doy : 7 // The week that contains Jan 7th is the first week of the year. } }); return az; }))); /***/ }), /* 314 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; function plural(word, num) { var forms = word.split('_'); return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]); } function relativeTimeWithPlural(number, withoutSuffix, key) { var format = { 'ss': withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд', 'mm': withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін', 'hh': withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін', 'dd': 'дзень_дні_дзён', 'MM': 'месяц_месяцы_месяцаў', 'yy': 'год_гады_гадоў' }; if (key === 'm') { return withoutSuffix ? 'хвіліна' : 'хвіліну'; } else if (key === 'h') { return withoutSuffix ? 'гадзіна' : 'гадзіну'; } else { return number + ' ' + plural(format[key], +number); } } var be = moment.defineLocale('be', { months : { format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split('_'), standalone: 'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split('_') }, monthsShort : 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split('_'), weekdays : { format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split('_'), standalone: 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split('_'), isFormat: /\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/ }, weekdaysShort : 'нд_пн_ат_ср_чц_пт_сб'.split('_'), weekdaysMin : 'нд_пн_ат_ср_чц_пт_сб'.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: '[Сёння ў] LT', nextDay: '[Заўтра ў] LT', lastDay: '[Учора ў] LT', nextWeek: function () { return '[У] dddd [ў] LT'; }, lastWeek: function () { switch (this.day()) { case 0: case 3: case 5: case 6: return '[У мінулую] dddd [ў] LT'; case 1: case 2: case 4: return '[У мінулы] dddd [ў] LT'; } }, sameElse: 'L' }, relativeTime : { future : 'праз %s', past : '%s таму', s : 'некалькі секунд', m : relativeTimeWithPlural, mm : relativeTimeWithPlural, h : relativeTimeWithPlural, hh : relativeTimeWithPlural, d : 'дзень', dd : relativeTimeWithPlural, M : 'месяц', MM : relativeTimeWithPlural, y : 'год', yy : relativeTimeWithPlural }, meridiemParse: /ночы|раніцы|дня|вечара/, isPM : function (input) { return /^(дня|вечара)$/.test(input); }, meridiem : function (hour, minute, isLower) { if (hour < 4) { return 'ночы'; } else if (hour < 12) { return 'раніцы'; } else if (hour < 17) { return 'дня'; } else { return 'вечара'; } }, dayOfMonthOrdinalParse: /\d{1,2}-(і|ы|га)/, ordinal: function (number, period) { switch (period) { case 'M': case 'd': case 'DDD': case 'w': case 'W': return (number % 10 === 2 || number % 10 === 3) && (number % 100 !== 12 && number % 100 !== 13) ? number + '-і' : number + '-ы'; case 'D': return number + '-га'; default: return number; } }, week : { dow : 1, // Monday is the first day of the week. doy : 7 // The week that contains Jan 7th is the first week of the year. } }); return be; }))); /***/ }), /* 315 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var bg = moment.defineLocale('bg', { months : 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split('_'), monthsShort : 'янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'), weekdays : 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split('_'), weekdaysShort : 'нед_пон_вто_сря_чет_пет_съб'.split('_'), weekdaysMin : 'нд_пн_вт_ср_чт_пт_сб'.split('_'), longDateFormat : { LT : 'H:mm', LTS : 'H:mm:ss', L : 'D.MM.YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY H:mm', LLLL : 'dddd, D MMMM YYYY H:mm' }, calendar : { sameDay : '[Днес в] LT', nextDay : '[Утре в] LT', nextWeek : 'dddd [в] LT', lastDay : '[Вчера в] LT', lastWeek : function () { switch (this.day()) { case 0: case 3: case 6: return '[В изминалата] dddd [в] LT'; case 1: case 2: case 4: case 5: return '[В изминалия] dddd [в] LT'; } }, sameElse : 'L' }, relativeTime : { future : 'след %s', past : 'преди %s', s : 'няколко секунди', ss : '%d секунди', m : 'минута', mm : '%d минути', h : 'час', hh : '%d часа', d : 'ден', dd : '%d дни', M : 'месец', MM : '%d месеца', y : 'година', yy : '%d години' }, dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/, ordinal : function (number) { var lastDigit = number % 10, last2Digits = number % 100; if (number === 0) { return number + '-ев'; } else if (last2Digits === 0) { return number + '-ен'; } else if (last2Digits > 10 && last2Digits < 20) { return number + '-ти'; } else if (lastDigit === 1) { return number + '-ви'; } else if (lastDigit === 2) { return number + '-ри'; } else if (lastDigit === 7 || lastDigit === 8) { return number + '-ми'; } else { return number + '-ти'; } }, week : { dow : 1, // Monday is the first day of the week. doy : 7 // The week that contains Jan 7th is the first week of the year. } }); return bg; }))); /***/ }), /* 316 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var bm = moment.defineLocale('bm', { months : 'Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo'.split('_'), monthsShort : 'Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des'.split('_'), weekdays : 'Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri'.split('_'), weekdaysShort : 'Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib'.split('_'), weekdaysMin : 'Ka_Nt_Ta_Ar_Al_Ju_Si'.split('_'), longDateFormat : { LT : 'HH:mm', LTS : 'HH:mm:ss', L : 'DD/MM/YYYY', LL : 'MMMM [tile] D [san] YYYY', LLL : 'MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm', LLLL : 'dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm' }, calendar : { sameDay : '[Bi lɛrɛ] LT', nextDay : '[Sini lɛrɛ] LT', nextWeek : 'dddd [don lɛrɛ] LT', lastDay : '[Kunu lɛrɛ] LT', lastWeek : 'dddd [tɛmɛnen lɛrɛ] LT', sameElse : 'L' }, relativeTime : { future : '%s kɔnɔ', past : 'a bɛ %s bɔ', s : 'sanga dama dama', ss : 'sekondi %d', m : 'miniti kelen', mm : 'miniti %d', h : 'lɛrɛ kelen', hh : 'lɛrɛ %d', d : 'tile kelen', dd : 'tile %d', M : 'kalo kelen', MM : 'kalo %d', y : 'san kelen', yy : 'san %d' }, 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 bm; }))); /***/ }), /* 317 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var symbolMap = { '1': '১', '2': '২', '3': '৩', '4': '৪', '5': '৫', '6': '৬', '7': '৭', '8': '৮', '9': '৯', '0': '০' }, numberMap = { '১': '1', '২': '2', '৩': '3', '৪': '4', '৫': '5', '৬': '6', '৭': '7', '৮': '8', '৯': '9', '০': '0' }; var bn = moment.defineLocale('bn', { months : 'জানুয়ারী_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split('_'), monthsShort : 'জানু_ফেব_মার্চ_এপ্র_মে_জুন_জুল_আগ_সেপ্ট_অক্টো_নভে_ডিসে'.split('_'), weekdays : 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split('_'), weekdaysShort : 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'), weekdaysMin : 'রবি_সোম_মঙ্গ_বুধ_বৃহঃ_শুক্র_শনি'.split('_'), longDateFormat : { LT : 'A h:mm সময়', LTS : 'A h:mm:ss সময়', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY, A h:mm সময়', LLLL : 'dddd, D MMMM YYYY, A h:mm সময়' }, calendar : { sameDay : '[আজ] LT', nextDay : '[আগামীকাল] LT', nextWeek : 'dddd, LT', lastDay : '[গতকাল] LT', lastWeek : '[গত] dddd, LT', sameElse : 'L' }, relativeTime : { future : '%s পরে', past : '%s আগে', s : 'কয়েক সেকেন্ড', ss : '%d সেকেন্ড', m : 'এক মিনিট', mm : '%d মিনিট', h : 'এক ঘন্টা', hh : '%d ঘন্টা', d : 'এক দিন', dd : '%d দিন', M : 'এক মাস', MM : '%d মাস', y : 'এক বছর', yy : '%d বছর' }, preparse: function (string) { return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) { return numberMap[match]; }); }, postformat: function (string) { return string.replace(/\d/g, function (match) { return symbolMap[match]; }); }, meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/, meridiemHour : function (hour, meridiem) { if (hour === 12) { hour = 0; } if ((meridiem === 'রাত' && hour >= 4) || (meridiem === 'দুপুর' && hour < 5) || meridiem === 'বিকাল') { return hour + 12; } else { return hour; } }, meridiem : function (hour, minute, isLower) { if (hour < 4) { return 'রাত'; } else if (hour < 10) { return 'সকাল'; } else if (hour < 17) { return 'দুপুর'; } else if (hour < 20) { return 'বিকাল'; } else { return 'রাত'; } }, week : { dow : 0, // Sunday is the first day of the week. doy : 6 // The week that contains Jan 6th is the first week of the year. } }); return bn; }))); /***/ }), /* 318 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var symbolMap = { '1': '༡', '2': '༢', '3': '༣', '4': '༤', '5': '༥', '6': '༦', '7': '༧', '8': '༨', '9': '༩', '0': '༠' }, numberMap = { '༡': '1', '༢': '2', '༣': '3', '༤': '4', '༥': '5', '༦': '6', '༧': '7', '༨': '8', '༩': '9', '༠': '0' }; var bo = moment.defineLocale('bo', { months : 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split('_'), monthsShort : 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split('_'), weekdays : 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split('_'), weekdaysShort : 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split('_'), weekdaysMin : 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split('_'), longDateFormat : { LT : 'A h:mm', LTS : 'A h:mm:ss', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY, A h:mm', LLLL : 'dddd, D MMMM YYYY, A h:mm' }, calendar : { sameDay : '[དི་རིང] LT', nextDay : '[སང་ཉིན] LT', nextWeek : '[བདུན་ཕྲག་རྗེས་མ], LT', lastDay : '[ཁ་སང] LT', lastWeek : '[བདུན་ཕྲག་མཐའ་མ] dddd, LT', sameElse : 'L' }, relativeTime : { future : '%s ལ་', past : '%s སྔན་ལ', s : 'ལམ་སང', ss : '%d སྐར་ཆ།', m : 'སྐར་མ་གཅིག', mm : '%d སྐར་མ', h : 'ཆུ་ཚོད་གཅིག', hh : '%d ཆུ་ཚོད', d : 'ཉིན་གཅིག', dd : '%d ཉིན་', M : 'ཟླ་བ་གཅིག', MM : '%d ཟླ་བ', y : 'ལོ་གཅིག', yy : '%d ལོ' }, preparse: function (string) { return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) { return numberMap[match]; }); }, postformat: function (string) { return string.replace(/\d/g, function (match) { return symbolMap[match]; }); }, meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/, meridiemHour : function (hour, meridiem) { if (hour === 12) { hour = 0; } if ((meridiem === 'མཚན་མོ' && hour >= 4) || (meridiem === 'ཉིན་གུང' && hour < 5) || meridiem === 'དགོང་དག') { return hour + 12; } else { return hour; } }, meridiem : function (hour, minute, isLower) { if (hour < 4) { return 'མཚན་མོ'; } else if (hour < 10) { return 'ཞོགས་ཀས'; } else if (hour < 17) { return 'ཉིན་གུང'; } else if (hour < 20) { return 'དགོང་དག'; } else { return 'མཚན་མོ'; } }, week : { dow : 0, // Sunday is the first day of the week. doy : 6 // The week that contains Jan 6th is the first week of the year. } }); return bo; }))); /***/ }), /* 319 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; function relativeTimeWithMutation(number, withoutSuffix, key) { var format = { 'mm': 'munutenn', 'MM': 'miz', 'dd': 'devezh' }; return number + ' ' + mutation(format[key], number); } function specialMutationForYears(number) { switch (lastNumber(number)) { case 1: case 3: case 4: case 5: case 9: return number + ' bloaz'; default: return number + ' vloaz'; } } function lastNumber(number) { if (number > 9) { return lastNumber(number % 10); } return number; } function mutation(text, number) { if (number === 2) { return softMutation(text); } return text; } function softMutation(text) { var mutationTable = { 'm': 'v', 'b': 'v', 'd': 'z' }; if (mutationTable[text.charAt(0)] === undefined) { return text; } return mutationTable[text.charAt(0)] + text.substring(1); } var br = moment.defineLocale('br', { months : 'Genver_C\'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split('_'), monthsShort : 'Gen_C\'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'), weekdays : 'Sul_Lun_Meurzh_Merc\'her_Yaou_Gwener_Sadorn'.split('_'), weekdaysShort : 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'), weekdaysMin : 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'), weekdaysParseExact : true, longDateFormat : { LT : 'h[e]mm A', LTS : 'h[e]mm:ss A', L : 'DD/MM/YYYY', LL : 'D [a viz] MMMM YYYY', LLL : 'D [a viz] MMMM YYYY h[e]mm A', LLLL : 'dddd, D [a viz] MMMM YYYY h[e]mm A' }, calendar : { sameDay : '[Hiziv da] LT', nextDay : '[Warc\'hoazh da] LT', nextWeek : 'dddd [da] LT', lastDay : '[Dec\'h da] LT', lastWeek : 'dddd [paset da] LT', sameElse : 'L' }, relativeTime : { future : 'a-benn %s', past : '%s \'zo', s : 'un nebeud segondennoù', ss : '%d eilenn', m : 'ur vunutenn', mm : relativeTimeWithMutation, h : 'un eur', hh : '%d eur', d : 'un devezh', dd : relativeTimeWithMutation, M : 'ur miz', MM : relativeTimeWithMutation, y : 'ur bloaz', yy : specialMutationForYears }, dayOfMonthOrdinalParse: /\d{1,2}(añ|vet)/, ordinal : function (number) { var output = (number === 1) ? 'añ' : 'vet'; 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 br; }))); /***/ }), /* 320 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; function translate(number, withoutSuffix, key) { var result = number + ' '; switch (key) { case 'ss': if (number === 1) { result += 'sekunda'; } else if (number === 2 || number === 3 || number === 4) { result += 'sekunde'; } else { result += 'sekundi'; } return result; case 'm': return withoutSuffix ? 'jedna minuta' : 'jedne minute'; case 'mm': if (number === 1) { result += 'minuta'; } else if (number === 2 || number === 3 || number === 4) { result += 'minute'; } else { result += 'minuta'; } return result; case 'h': return withoutSuffix ? 'jedan sat' : 'jednog sata'; case 'hh': if (number === 1) { result += 'sat'; } else if (number === 2 || number === 3 || number === 4) { result += 'sata'; } else { result += 'sati'; } return result; case 'dd': if (number === 1) { result += 'dan'; } else { result += 'dana'; } return result; case 'MM': if (number === 1) { result += 'mjesec'; } else if (number === 2 || number === 3 || number === 4) { result += 'mjeseca'; } else { result += 'mjeseci'; } return result; case 'yy': if (number === 1) { result += 'godina'; } else if (number === 2 || number === 3 || number === 4) { result += 'godine'; } else { result += 'godina'; } return result; } } var bs = moment.defineLocale('bs', { months : 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split('_'), monthsShort : 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split('_'), monthsParseExact: true, weekdays : 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'), weekdaysShort : 'ned._pon._uto._sri._čet._pet._sub.'.split('_'), weekdaysMin : 'ne_po_ut_sr_če_pe_su'.split('_'), weekdaysParseExact : true, longDateFormat : { LT : 'H:mm', LTS : 'H:mm:ss', L : 'DD.MM.YYYY', LL : 'D. MMMM YYYY', LLL : 'D. MMMM YYYY H:mm', LLLL : 'dddd, D. MMMM YYYY H:mm' }, calendar : { sameDay : '[danas u] LT', nextDay : '[sutra u] LT', nextWeek : function () { switch (this.day()) { case 0: return '[u] [nedjelju] [u] LT'; case 3: return '[u] [srijedu] [u] LT'; case 6: return '[u] [subotu] [u] LT'; case 1: case 2: case 4: case 5: return '[u] dddd [u] LT'; } }, lastDay : '[jučer u] LT', lastWeek : function () { switch (this.day()) { case 0: case 3: return '[prošlu] dddd [u] LT'; case 6: return '[prošle] [subote] [u] LT'; case 1: case 2: case 4: case 5: return '[prošli] dddd [u] LT'; } }, sameElse : 'L' }, relativeTime : { future : 'za %s', past : 'prije %s', s : 'par sekundi', ss : translate, m : translate, mm : translate, h : translate, hh : translate, d : 'dan', dd : translate, M : 'mjesec', MM : translate, y : 'godinu', yy : translate }, dayOfMonthOrdinalParse: /\d{1,2}\./, ordinal : '%d.', week : { dow : 1, // Monday is the first day of the week. doy : 7 // The week that contains Jan 7th is the first week of the year. } }); return bs; }))); /***/ }), /* 321 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var ca = moment.defineLocale('ca', { months : { standalone: 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split('_'), format: 'de gener_de febrer_de març_d\'abril_de maig_de juny_de juliol_d\'agost_de setembre_d\'octubre_de novembre_de desembre'.split('_'), isFormat: /D[oD]?(\s)+MMMM/ }, monthsShort : 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split('_'), monthsParseExact : true, weekdays : 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split('_'), weekdaysShort : 'dg._dl._dt._dc._dj._dv._ds.'.split('_'), weekdaysMin : 'dg_dl_dt_dc_dj_dv_ds'.split('_'), weekdaysParseExact : true, longDateFormat : { LT : 'H:mm', LTS : 'H:mm:ss', L : 'DD/MM/YYYY', LL : 'D MMMM [de] YYYY', ll : 'D MMM YYYY', LLL : 'D MMMM [de] YYYY [a les] H:mm', lll : 'D MMM YYYY, H:mm', LLLL : 'dddd D MMMM [de] YYYY [a les] H:mm', llll : 'ddd D MMM YYYY, H:mm' }, calendar : { sameDay : function () { return '[avui a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; }, nextDay : function () { return '[demà a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; }, nextWeek : function () { return 'dddd [a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; }, lastDay : function () { return '[ahir a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; }, lastWeek : function () { return '[el] dddd [passat a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT'; }, sameElse : 'L' }, relativeTime : { future : 'd\'aquí %s', past : 'fa %s', s : 'uns segons', ss : '%d segons', m : 'un minut', mm : '%d minuts', h : 'una hora', hh : '%d hores', d : 'un dia', dd : '%d dies', M : 'un mes', MM : '%d mesos', y : 'un any', yy : '%d anys' }, dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/, ordinal : function (number, period) { var output = (number === 1) ? 'r' : (number === 2) ? 'n' : (number === 3) ? 'r' : (number === 4) ? 't' : 'è'; if (period === 'w' || period === 'W') { output = 'a'; } 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 ca; }))); /***/ }), /* 322 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var months = 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split('_'), monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_'); function plural(n) { return (n > 1) && (n < 5) && (~~(n / 10) !== 1); } function translate(number, withoutSuffix, key, isFuture) { var result = number + ' '; switch (key) { case 's': // a few seconds / in a few seconds / a few seconds ago return (withoutSuffix || isFuture) ? 'pár sekund' : 'pár sekundami'; case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago if (withoutSuffix || isFuture) { return result + (plural(number) ? 'sekundy' : 'sekund'); } else { return result + 'sekundami'; } break; case 'm': // a minute / in a minute / a minute ago return withoutSuffix ? 'minuta' : (isFuture ? 'minutu' : 'minutou'); case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago if (withoutSuffix || isFuture) { return result + (plural(number) ? 'minuty' : 'minut'); } else { return result + 'minutami'; } break; case 'h': // an hour / in an hour / an hour ago return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou'); case 'hh': // 9 hours / in 9 hours / 9 hours ago if (withoutSuffix || isFuture) { return result + (plural(number) ? 'hodiny' : 'hodin'); } else { return result + 'hodinami'; } break; case 'd': // a day / in a day / a day ago return (withoutSuffix || isFuture) ? 'den' : 'dnem'; case 'dd': // 9 days / in 9 days / 9 days ago if (withoutSuffix || isFuture) { return result + (plural(number) ? 'dny' : 'dní'); } else { return result + 'dny'; } break; case 'M': // a month / in a month / a month ago return (withoutSuffix || isFuture) ? 'měsíc' : 'měsícem'; case 'MM': // 9 months / in 9 months / 9 months ago if (withoutSuffix || isFuture) { return result + (plural(number) ? 'měsíce' : 'měsíců'); } else { return result + 'měsíci'; } break; case 'y': // a year / in a year / a year ago return (withoutSuffix || isFuture) ? 'rok' : 'rokem'; case 'yy': // 9 years / in 9 years / 9 years ago if (withoutSuffix || isFuture) { return result + (plural(number) ? 'roky' : 'let'); } else { return result + 'lety'; } break; } } var cs = moment.defineLocale('cs', { months : months, monthsShort : monthsShort, monthsParse : (function (months, monthsShort) { var i, _monthsParse = []; for (i = 0; i < 12; i++) { // use custom parser to solve problem with July (červenec) _monthsParse[i] = new RegExp('^' + months[i] + '$|^' + monthsShort[i] + '$', 'i'); } return _monthsParse; }(months, monthsShort)), shortMonthsParse : (function (monthsShort) { var i, _shortMonthsParse = []; for (i = 0; i < 12; i++) { _shortMonthsParse[i] = new RegExp('^' + monthsShort[i] + '$', 'i'); } return _shortMonthsParse; }(monthsShort)), longMonthsParse : (function (months) { var i, _longMonthsParse = []; for (i = 0; i < 12; i++) { _longMonthsParse[i] = new RegExp('^' + months[i] + '$', 'i'); } return _longMonthsParse; }(months)), weekdays : 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'), weekdaysShort : 'ne_po_út_st_čt_pá_so'.split('_'), weekdaysMin : 'ne_po_út_st_čt_pá_so'.split('_'), longDateFormat : { LT: 'H:mm', LTS : 'H:mm:ss', L : 'DD.MM.YYYY', LL : 'D. MMMM YYYY', LLL : 'D. MMMM YYYY H:mm', LLLL : 'dddd D. MMMM YYYY H:mm', l : 'D. M. YYYY' }, calendar : { sameDay: '[dnes v] LT', nextDay: '[zítra v] LT', nextWeek: function () { switch (this.day()) { case 0: return '[v neděli v] LT'; case 1: case 2: return '[v] dddd [v] LT'; case 3: return '[ve středu v] LT'; case 4: return '[ve čtvrtek v] LT'; case 5: return '[v pátek v] LT'; case 6: return '[v sobotu v] LT'; } }, lastDay: '[včera v] LT', lastWeek: function () { switch (this.day()) { case 0: return '[minulou neděli v] LT'; case 1: case 2: return '[minulé] dddd [v] LT'; case 3: return '[minulou středu v] LT'; case 4: case 5: return '[minulý] dddd [v] LT'; case 6: return '[minulou sobotu v] LT'; } }, sameElse: 'L' }, relativeTime : { future : 'za %s', past : 'před %s', s : translate, ss : translate, m : translate, mm : translate, h : translate, hh : translate, d : translate, dd : translate, M : translate, MM : translate, y : translate, yy : translate }, dayOfMonthOrdinalParse : /\d{1,2}\./, ordinal : '%d.', 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 cs; }))); /***/ }), /* 323 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var cv = moment.defineLocale('cv', { months : 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split('_'), monthsShort : 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'), weekdays : 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split('_'), weekdaysShort : 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'), weekdaysMin : 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'), longDateFormat : { LT : 'HH:mm', LTS : 'HH:mm:ss', L : 'DD-MM-YYYY', LL : 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]', LLL : 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm', LLLL : 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm' }, calendar : { sameDay: '[Паян] LT [сехетре]', nextDay: '[Ыран] LT [сехетре]', lastDay: '[Ӗнер] LT [сехетре]', nextWeek: '[Ҫитес] dddd LT [сехетре]', lastWeek: '[Иртнӗ] dddd LT [сехетре]', sameElse: 'L' }, relativeTime : { future : function (output) { var affix = /сехет$/i.exec(output) ? 'рен' : /ҫул$/i.exec(output) ? 'тан' : 'ран'; return output + affix; }, past : '%s каялла', s : 'пӗр-ик ҫеккунт', ss : '%d ҫеккунт', m : 'пӗр минут', mm : '%d минут', h : 'пӗр сехет', hh : '%d сехет', d : 'пӗр кун', dd : '%d кун', M : 'пӗр уйӑх', MM : '%d уйӑх', y : 'пӗр ҫул', yy : '%d ҫул' }, dayOfMonthOrdinalParse: /\d{1,2}-мӗш/, ordinal : '%d-мӗш', week : { dow : 1, // Monday is the first day of the week. doy : 7 // The week that contains Jan 7th is the first week of the year. } }); return cv; }))); /***/ }), /* 324 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var cy = moment.defineLocale('cy', { months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split('_'), monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split('_'), weekdays: 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split('_'), weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'), weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'), weekdaysParseExact : true, // time formats are the same as en-gb 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: '[Heddiw am] LT', nextDay: '[Yfory am] LT', nextWeek: 'dddd [am] LT', lastDay: '[Ddoe am] LT', lastWeek: 'dddd [diwethaf am] LT', sameElse: 'L' }, relativeTime: { future: 'mewn %s', past: '%s yn ôl', s: 'ychydig eiliadau', ss: '%d eiliad', m: 'munud', mm: '%d munud', h: 'awr', hh: '%d awr', d: 'diwrnod', dd: '%d diwrnod', M: 'mis', MM: '%d mis', y: 'blwyddyn', yy: '%d flynedd' }, dayOfMonthOrdinalParse: /\d{1,2}(fed|ain|af|il|ydd|ed|eg)/, // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh ordinal: function (number) { var b = number, output = '', lookup = [ '', 'af', 'il', 'ydd', 'ydd', 'ed', 'ed', 'ed', 'fed', 'fed', 'fed', // 1af to 10fed 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'fed' // 11eg to 20fed ]; if (b > 20) { if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) { output = 'fed'; // not 30ain, 70ain or 90ain } else { output = 'ain'; } } else if (b > 0) { output = lookup[b]; } 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 cy; }))); /***/ }), /* 325 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var da = moment.defineLocale('da', { months : 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split('_'), monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'), weekdays : 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'), weekdaysShort : 'søn_man_tir_ons_tor_fre_lør'.split('_'), weekdaysMin : 'sø_ma_ti_on_to_fr_lø'.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.] D. MMMM YYYY [kl.] HH:mm' }, calendar : { sameDay : '[i dag kl.] LT', nextDay : '[i morgen kl.] LT', nextWeek : 'på dddd [kl.] LT', lastDay : '[i går kl.] LT', lastWeek : '[i] dddd[s kl.] LT', sameElse : 'L' }, relativeTime : { future : 'om %s', past : '%s siden', s : 'få sekunder', ss : '%d sekunder', m : 'et minut', mm : '%d minutter', h : 'en time', hh : '%d timer', d : 'en dag', dd : '%d dage', M : 'en måned', MM : '%d måneder', y : 'et år', yy : '%d år' }, dayOfMonthOrdinalParse: /\d{1,2}\./, ordinal : '%d.', 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 da; }))); /***/ }), /* 326 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; function processRelativeTime(number, withoutSuffix, key, isFuture) { var format = { 'm': ['eine Minute', 'einer Minute'], 'h': ['eine Stunde', 'einer Stunde'], 'd': ['ein Tag', 'einem Tag'], 'dd': [number + ' Tage', number + ' Tagen'], 'M': ['ein Monat', 'einem Monat'], 'MM': [number + ' Monate', number + ' Monaten'], 'y': ['ein Jahr', 'einem Jahr'], 'yy': [number + ' Jahre', number + ' Jahren'] }; return withoutSuffix ? format[key][0] : format[key][1]; } var de = moment.defineLocale('de', { months : 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'), monthsShort : 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'), monthsParseExact : true, weekdays : 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'), weekdaysShort : 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'), weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), weekdaysParseExact : true, 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: '[heute um] LT [Uhr]', sameElse: 'L', nextDay: '[morgen um] LT [Uhr]', nextWeek: 'dddd [um] LT [Uhr]', lastDay: '[gestern um] LT [Uhr]', lastWeek: '[letzten] dddd [um] LT [Uhr]' }, relativeTime : { future : 'in %s', past : 'vor %s', s : 'ein paar Sekunden', ss : '%d Sekunden', m : processRelativeTime, mm : '%d Minuten', h : processRelativeTime, hh : '%d Stunden', d : processRelativeTime, dd : processRelativeTime, M : processRelativeTime, MM : processRelativeTime, y : processRelativeTime, yy : processRelativeTime }, dayOfMonthOrdinalParse: /\d{1,2}\./, ordinal : '%d.', 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 de; }))); /***/ }), /* 327 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; function processRelativeTime(number, withoutSuffix, key, isFuture) { var format = { 'm': ['eine Minute', 'einer Minute'], 'h': ['eine Stunde', 'einer Stunde'], 'd': ['ein Tag', 'einem Tag'], 'dd': [number + ' Tage', number + ' Tagen'], 'M': ['ein Monat', 'einem Monat'], 'MM': [number + ' Monate', number + ' Monaten'], 'y': ['ein Jahr', 'einem Jahr'], 'yy': [number + ' Jahre', number + ' Jahren'] }; return withoutSuffix ? format[key][0] : format[key][1]; } var deAt = moment.defineLocale('de-at', { months : 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'), monthsShort : 'Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'), monthsParseExact : true, weekdays : 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'), weekdaysShort : 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'), weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), weekdaysParseExact : true, 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: '[heute um] LT [Uhr]', sameElse: 'L', nextDay: '[morgen um] LT [Uhr]', nextWeek: 'dddd [um] LT [Uhr]', lastDay: '[gestern um] LT [Uhr]', lastWeek: '[letzten] dddd [um] LT [Uhr]' }, relativeTime : { future : 'in %s', past : 'vor %s', s : 'ein paar Sekunden', ss : '%d Sekunden', m : processRelativeTime, mm : '%d Minuten', h : processRelativeTime, hh : '%d Stunden', d : processRelativeTime, dd : processRelativeTime, M : processRelativeTime, MM : processRelativeTime, y : processRelativeTime, yy : processRelativeTime }, dayOfMonthOrdinalParse: /\d{1,2}\./, ordinal : '%d.', 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 deAt; }))); /***/ }), /* 328 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; function processRelativeTime(number, withoutSuffix, key, isFuture) { var format = { 'm': ['eine Minute', 'einer Minute'], 'h': ['eine Stunde', 'einer Stunde'], 'd': ['ein Tag', 'einem Tag'], 'dd': [number + ' Tage', number + ' Tagen'], 'M': ['ein Monat', 'einem Monat'], 'MM': [number + ' Monate', number + ' Monaten'], 'y': ['ein Jahr', 'einem Jahr'], 'yy': [number + ' Jahre', number + ' Jahren'] }; return withoutSuffix ? format[key][0] : format[key][1]; } var deCh = moment.defineLocale('de-ch', { months : 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'), monthsShort : 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'), monthsParseExact : true, weekdays : 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split('_'), weekdaysShort : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), weekdaysMin : 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), weekdaysParseExact : true, 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: '[heute um] LT [Uhr]', sameElse: 'L', nextDay: '[morgen um] LT [Uhr]', nextWeek: 'dddd [um] LT [Uhr]', lastDay: '[gestern um] LT [Uhr]', lastWeek: '[letzten] dddd [um] LT [Uhr]' }, relativeTime : { future : 'in %s', past : 'vor %s', s : 'ein paar Sekunden', ss : '%d Sekunden', m : processRelativeTime, mm : '%d Minuten', h : processRelativeTime, hh : '%d Stunden', d : processRelativeTime, dd : processRelativeTime, M : processRelativeTime, MM : processRelativeTime, y : processRelativeTime, yy : processRelativeTime }, dayOfMonthOrdinalParse: /\d{1,2}\./, ordinal : '%d.', 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 deCh; }))); /***/ }), /* 329 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var months = [ 'ޖެނުއަރީ', 'ފެބްރުއަރީ', 'މާރިޗު', 'އޭޕްރީލު', 'މޭ', 'ޖޫން', 'ޖުލައި', 'އޯގަސްޓު', 'ސެޕްޓެމްބަރު', 'އޮކްޓޯބަރު', 'ނޮވެމްބަރު', 'ޑިސެމްބަރު' ], weekdays = [ 'އާދިއްތަ', 'ހޯމަ', 'އަންގާރަ', 'ބުދަ', 'ބުރާސްފަތި', 'ހުކުރު', 'ހޮނިހިރު' ]; var dv = moment.defineLocale('dv', { months : months, monthsShort : months, weekdays : weekdays, weekdaysShort : weekdays, weekdaysMin : 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'), longDateFormat : { LT : 'HH:mm', LTS : 'HH:mm:ss', L : 'D/M/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY HH:mm', LLLL : 'dddd D MMMM YYYY HH:mm' }, meridiemParse: /މކ|މފ/, isPM : function (input) { return 'މފ' === input; }, meridiem : function (hour, minute, isLower) { if (hour < 12) { return 'މކ'; } else { return 'މފ'; } }, calendar : { sameDay : '[މިއަދު] LT', nextDay : '[މާދަމާ] LT', nextWeek : 'dddd LT', lastDay : '[އިއްޔެ] LT', lastWeek : '[ފާއިތުވި] dddd LT', sameElse : 'L' }, relativeTime : { future : 'ތެރޭގައި %s', past : 'ކުރިން %s', s : 'ސިކުންތުކޮޅެއް', ss : 'd% ސިކުންތު', m : 'މިނިޓެއް', mm : 'މިނިޓު %d', h : 'ގަޑިއިރެއް', hh : 'ގަޑިއިރު %d', d : 'ދުވަހެއް', dd : 'ދުވަސް %d', M : 'މަހެއް', MM : 'މަސް %d', y : 'އަހަރެއް', yy : 'އަހަރު %d' }, preparse: function (string) { return string.replace(/،/g, ','); }, postformat: function (string) { return string.replace(/,/g, '،'); }, week : { dow : 7, // Sunday is the first day of the week. doy : 12 // The week that contains Jan 12th is the first week of the year. } }); return dv; }))); /***/ }), /* 330 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; function isFunction(input) { return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]'; } var el = moment.defineLocale('el', { monthsNominativeEl : 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split('_'), monthsGenitiveEl : 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split('_'), months : function (momentToFormat, format) { if (!momentToFormat) { return this._monthsNominativeEl; } else if (typeof format === 'string' && /D/.test(format.substring(0, format.indexOf('MMMM')))) { // if there is a day number before 'MMMM' return this._monthsGenitiveEl[momentToFormat.month()]; } else { return this._monthsNominativeEl[momentToFormat.month()]; } }, monthsShort : 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'), weekdays : 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split('_'), weekdaysShort : 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'), weekdaysMin : 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'), meridiem : function (hours, minutes, isLower) { if (hours > 11) { return isLower ? 'μμ' : 'ΜΜ'; } else { return isLower ? 'πμ' : 'ΠΜ'; } }, isPM : function (input) { return ((input + '').toLowerCase()[0] === 'μ'); }, meridiemParse : /[ΠΜ]\.?Μ?\.?/i, longDateFormat : { LT : 'h:mm A', LTS : 'h:mm:ss A', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY h:mm A', LLLL : 'dddd, D MMMM YYYY h:mm A' }, calendarEl : { sameDay : '[Σήμερα {}] LT', nextDay : '[Αύριο {}] LT', nextWeek : 'dddd [{}] LT', lastDay : '[Χθες {}] LT', lastWeek : function () { switch (this.day()) { case 6: return '[το προηγούμενο] dddd [{}] LT'; default: return '[την προηγούμενη] dddd [{}] LT'; } }, sameElse : 'L' }, calendar : function (key, mom) { var output = this._calendarEl[key], hours = mom && mom.hours(); if (isFunction(output)) { output = output.apply(mom); } return output.replace('{}', (hours % 12 === 1 ? 'στη' : 'στις')); }, relativeTime : { future : 'σε %s', past : '%s πριν', s : 'λίγα δευτερόλεπτα', ss : '%d δευτερόλεπτα', m : 'ένα λεπτό', mm : '%d λεπτά', h : 'μία ώρα', hh : '%d ώρες', d : 'μία μέρα', dd : '%d μέρες', M : 'ένας μήνας', MM : '%d μήνες', y : 'ένας χρόνος', yy : '%d χρόνια' }, dayOfMonthOrdinalParse: /\d{1,2}η/, ordinal: '%dη', week : { dow : 1, // Monday is the first day of the week. doy : 4 // The week that contains Jan 4st is the first week of the year. } }); return el; }))); /***/ }), /* 331 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var enAu = moment.defineLocale('en-au', { 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 : 'h:mm A', LTS : 'h:mm:ss A', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY h:mm A', LLLL : 'dddd, D MMMM YYYY h:mm A' }, 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 enAu; }))); /***/ }), /* 332 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var enCa = moment.defineLocale('en-ca', { 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 : 'h:mm A', LTS : 'h:mm:ss A', L : 'YYYY-MM-DD', LL : 'MMMM D, YYYY', LLL : 'MMMM D, YYYY h:mm A', LLLL : 'dddd, MMMM D, YYYY h:mm A' }, 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; } }); return enCa; }))); /***/ }), /* 333 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : 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; }))); /***/ }), /* 334 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var enIe = moment.defineLocale('en-ie', { 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 enIe; }))); /***/ }), /* 335 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var enIl = moment.defineLocale('en-il', { 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', 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; } }); return enIl; }))); /***/ }), /* 336 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var enNz = moment.defineLocale('en-nz', { 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 : 'h:mm A', LTS : 'h:mm:ss A', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY h:mm A', LLLL : 'dddd, D MMMM YYYY h:mm A' }, 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 enNz; }))); /***/ }), /* 337 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var eo = moment.defineLocale('eo', { months : 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split('_'), monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec'.split('_'), weekdays : 'dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato'.split('_'), weekdaysShort : 'dim_lun_mard_merk_ĵaŭ_ven_sab'.split('_'), weekdaysMin : 'di_lu_ma_me_ĵa_ve_sa'.split('_'), longDateFormat : { LT : 'HH:mm', LTS : 'HH:mm:ss', L : 'YYYY-MM-DD', LL : 'D[-a de] MMMM, YYYY', LLL : 'D[-a de] MMMM, YYYY HH:mm', LLLL : 'dddd, [la] D[-a de] MMMM, YYYY HH:mm' }, meridiemParse: /[ap]\.t\.m/i, isPM: function (input) { return input.charAt(0).toLowerCase() === 'p'; }, meridiem : function (hours, minutes, isLower) { if (hours > 11) { return isLower ? 'p.t.m.' : 'P.T.M.'; } else { return isLower ? 'a.t.m.' : 'A.T.M.'; } }, calendar : { sameDay : '[Hodiaŭ je] LT', nextDay : '[Morgaŭ je] LT', nextWeek : 'dddd [je] LT', lastDay : '[Hieraŭ je] LT', lastWeek : '[pasinta] dddd [je] LT', sameElse : 'L' }, relativeTime : { future : 'post %s', past : 'antaŭ %s', s : 'sekundoj', ss : '%d sekundoj', m : 'minuto', mm : '%d minutoj', h : 'horo', hh : '%d horoj', d : 'tago',//ne 'diurno', ĉar estas uzita por proksimumo dd : '%d tagoj', M : 'monato', MM : '%d monatoj', y : 'jaro', yy : '%d jaroj' }, dayOfMonthOrdinalParse: /\d{1,2}a/, ordinal : '%da', week : { dow : 1, // Monday is the first day of the week. doy : 7 // The week that contains Jan 7th is the first week of the year. } }); return eo; }))); /***/ }), /* 338 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'), monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'); var monthsParse = [/^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i]; var monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i; var es = moment.defineLocale('es', { months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'), monthsShort : function (m, format) { if (!m) { return monthsShortDot; } else if (/-MMM-/.test(format)) { return monthsShort[m.month()]; } else { return monthsShortDot[m.month()]; } }, monthsRegex : monthsRegex, monthsShortRegex : monthsRegex, monthsStrictRegex : /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i, monthsShortStrictRegex : /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i, monthsParse : monthsParse, longMonthsParse : monthsParse, shortMonthsParse : monthsParse, weekdays : 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), weekdaysShort : 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), weekdaysMin : 'do_lu_ma_mi_ju_vi_sá'.split('_'), weekdaysParseExact : true, longDateFormat : { LT : 'H:mm', LTS : 'H:mm:ss', L : 'DD/MM/YYYY', LL : 'D [de] MMMM [de] YYYY', LLL : 'D [de] MMMM [de] YYYY H:mm', LLLL : 'dddd, D [de] MMMM [de] YYYY H:mm' }, calendar : { sameDay : function () { return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; }, nextDay : function () { return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; }, nextWeek : function () { return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; }, lastDay : function () { return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; }, lastWeek : function () { return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; }, sameElse : 'L' }, relativeTime : { future : 'en %s', past : 'hace %s', s : 'unos segundos', ss : '%d segundos', m : 'un minuto', mm : '%d minutos', h : 'una hora', hh : '%d horas', d : 'un día', dd : '%d días', M : 'un mes', MM : '%d meses', y : 'un año', yy : '%d años' }, dayOfMonthOrdinalParse : /\d{1,2}º/, ordinal : '%dº', 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 es; }))); /***/ }), /* 339 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'), monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'); var monthsParse = [/^ene/i, /^feb/i, /^mar/i, /^abr/i, /^may/i, /^jun/i, /^jul/i, /^ago/i, /^sep/i, /^oct/i, /^nov/i, /^dic/i]; var monthsRegex = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i; var esDo = moment.defineLocale('es-do', { months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'), monthsShort : function (m, format) { if (!m) { return monthsShortDot; } else if (/-MMM-/.test(format)) { return monthsShort[m.month()]; } else { return monthsShortDot[m.month()]; } }, monthsRegex: monthsRegex, monthsShortRegex: monthsRegex, monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i, monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i, monthsParse: monthsParse, longMonthsParse: monthsParse, shortMonthsParse: monthsParse, weekdays : 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), weekdaysShort : 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), weekdaysMin : 'do_lu_ma_mi_ju_vi_sá'.split('_'), weekdaysParseExact : true, longDateFormat : { LT : 'h:mm A', LTS : 'h:mm:ss A', L : 'DD/MM/YYYY', LL : 'D [de] MMMM [de] YYYY', LLL : 'D [de] MMMM [de] YYYY h:mm A', LLLL : 'dddd, D [de] MMMM [de] YYYY h:mm A' }, calendar : { sameDay : function () { return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; }, nextDay : function () { return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; }, nextWeek : function () { return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; }, lastDay : function () { return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; }, lastWeek : function () { return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; }, sameElse : 'L' }, relativeTime : { future : 'en %s', past : 'hace %s', s : 'unos segundos', ss : '%d segundos', m : 'un minuto', mm : '%d minutos', h : 'una hora', hh : '%d horas', d : 'un día', dd : '%d días', M : 'un mes', MM : '%d meses', y : 'un año', yy : '%d años' }, dayOfMonthOrdinalParse : /\d{1,2}º/, ordinal : '%dº', 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 esDo; }))); /***/ }), /* 340 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split('_'), monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'); var esUs = moment.defineLocale('es-us', { months : 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'), monthsShort : function (m, format) { if (!m) { return monthsShortDot; } else if (/-MMM-/.test(format)) { return monthsShort[m.month()]; } else { return monthsShortDot[m.month()]; } }, monthsParseExact : true, weekdays : 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), weekdaysShort : 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), weekdaysMin : 'do_lu_ma_mi_ju_vi_sá'.split('_'), weekdaysParseExact : true, longDateFormat : { LT : 'h:mm A', LTS : 'h:mm:ss A', L : 'MM/DD/YYYY', LL : 'MMMM [de] D [de] YYYY', LLL : 'MMMM [de] D [de] YYYY h:mm A', LLLL : 'dddd, MMMM [de] D [de] YYYY h:mm A' }, calendar : { sameDay : function () { return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; }, nextDay : function () { return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; }, nextWeek : function () { return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; }, lastDay : function () { return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; }, lastWeek : function () { return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT'; }, sameElse : 'L' }, relativeTime : { future : 'en %s', past : 'hace %s', s : 'unos segundos', ss : '%d segundos', m : 'un minuto', mm : '%d minutos', h : 'una hora', hh : '%d horas', d : 'un día', dd : '%d días', M : 'un mes', MM : '%d meses', y : 'un año', yy : '%d años' }, dayOfMonthOrdinalParse : /\d{1,2}º/, ordinal : '%dº', week : { dow : 0, // Sunday is the first day of the week. doy : 6 // The week that contains Jan 6th is the first week of the year. } }); return esUs; }))); /***/ }), /* 341 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; function processRelativeTime(number, withoutSuffix, key, isFuture) { var format = { 's' : ['mõne sekundi', 'mõni sekund', 'paar sekundit'], 'ss': [number + 'sekundi', number + 'sekundit'], 'm' : ['ühe minuti', 'üks minut'], 'mm': [number + ' minuti', number + ' minutit'], 'h' : ['ühe tunni', 'tund aega', 'üks tund'], 'hh': [number + ' tunni', number + ' tundi'], 'd' : ['ühe päeva', 'üks päev'], 'M' : ['kuu aja', 'kuu aega', 'üks kuu'], 'MM': [number + ' kuu', number + ' kuud'], 'y' : ['ühe aasta', 'aasta', 'üks aasta'], 'yy': [number + ' aasta', number + ' aastat'] }; if (withoutSuffix) { return format[key][2] ? format[key][2] : format[key][1]; } return isFuture ? format[key][0] : format[key][1]; } var et = moment.defineLocale('et', { months : 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split('_'), monthsShort : 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'), weekdays : 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split('_'), weekdaysShort : 'P_E_T_K_N_R_L'.split('_'), weekdaysMin : 'P_E_T_K_N_R_L'.split('_'), longDateFormat : { LT : 'H:mm', LTS : 'H:mm:ss', L : 'DD.MM.YYYY', LL : 'D. MMMM YYYY', LLL : 'D. MMMM YYYY H:mm', LLLL : 'dddd, D. MMMM YYYY H:mm' }, calendar : { sameDay : '[Täna,] LT', nextDay : '[Homme,] LT', nextWeek : '[Järgmine] dddd LT', lastDay : '[Eile,] LT', lastWeek : '[Eelmine] dddd LT', sameElse : 'L' }, relativeTime : { future : '%s pärast', past : '%s tagasi', s : processRelativeTime, ss : processRelativeTime, m : processRelativeTime, mm : processRelativeTime, h : processRelativeTime, hh : processRelativeTime, d : processRelativeTime, dd : '%d päeva', M : processRelativeTime, MM : processRelativeTime, y : processRelativeTime, yy : processRelativeTime }, dayOfMonthOrdinalParse: /\d{1,2}\./, ordinal : '%d.', 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 et; }))); /***/ }), /* 342 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var eu = moment.defineLocale('eu', { months : 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split('_'), monthsShort : 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split('_'), monthsParseExact : true, weekdays : 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split('_'), weekdaysShort : 'ig._al._ar._az._og._ol._lr.'.split('_'), weekdaysMin : 'ig_al_ar_az_og_ol_lr'.split('_'), weekdaysParseExact : true, longDateFormat : { LT : 'HH:mm', LTS : 'HH:mm:ss', L : 'YYYY-MM-DD', LL : 'YYYY[ko] MMMM[ren] D[a]', LLL : 'YYYY[ko] MMMM[ren] D[a] HH:mm', LLLL : 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm', l : 'YYYY-M-D', ll : 'YYYY[ko] MMM D[a]', lll : 'YYYY[ko] MMM D[a] HH:mm', llll : 'ddd, YYYY[ko] MMM D[a] HH:mm' }, calendar : { sameDay : '[gaur] LT[etan]', nextDay : '[bihar] LT[etan]', nextWeek : 'dddd LT[etan]', lastDay : '[atzo] LT[etan]', lastWeek : '[aurreko] dddd LT[etan]', sameElse : 'L' }, relativeTime : { future : '%s barru', past : 'duela %s', s : 'segundo batzuk', ss : '%d segundo', m : 'minutu bat', mm : '%d minutu', h : 'ordu bat', hh : '%d ordu', d : 'egun bat', dd : '%d egun', M : 'hilabete bat', MM : '%d hilabete', y : 'urte bat', yy : '%d urte' }, dayOfMonthOrdinalParse: /\d{1,2}\./, ordinal : '%d.', week : { dow : 1, // Monday is the first day of the week. doy : 7 // The week that contains Jan 7th is the first week of the year. } }); return eu; }))); /***/ }), /* 343 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var symbolMap = { '1': '۱', '2': '۲', '3': '۳', '4': '۴', '5': '۵', '6': '۶', '7': '۷', '8': '۸', '9': '۹', '0': '۰' }, numberMap = { '۱': '1', '۲': '2', '۳': '3', '۴': '4', '۵': '5', '۶': '6', '۷': '7', '۸': '8', '۹': '9', '۰': '0' }; var fa = moment.defineLocale('fa', { months : 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'), monthsShort : 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'), weekdays : 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split('_'), weekdaysShort : 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split('_'), weekdaysMin : 'ی_د_س_چ_پ_ج_ش'.split('_'), weekdaysParseExact : true, 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' }, meridiemParse: /قبل از ظهر|بعد از ظهر/, isPM: function (input) { return /بعد از ظهر/.test(input); }, meridiem : function (hour, minute, isLower) { if (hour < 12) { return 'قبل از ظهر'; } else { return 'بعد از ظهر'; } }, calendar : { sameDay : '[امروز ساعت] LT', nextDay : '[فردا ساعت] LT', nextWeek : 'dddd [ساعت] LT', lastDay : '[دیروز ساعت] LT', lastWeek : 'dddd [پیش] [ساعت] LT', sameElse : 'L' }, relativeTime : { future : 'در %s', past : '%s پیش', s : 'چند ثانیه', ss : 'ثانیه d%', m : 'یک دقیقه', mm : '%d دقیقه', h : 'یک ساعت', hh : '%d ساعت', d : 'یک روز', dd : '%d روز', M : 'یک ماه', MM : '%d ماه', y : 'یک سال', yy : '%d سال' }, preparse: function (string) { return string.replace(/[۰-۹]/g, function (match) { return numberMap[match]; }).replace(/،/g, ','); }, postformat: function (string) { return string.replace(/\d/g, function (match) { return symbolMap[match]; }).replace(/,/g, '،'); }, dayOfMonthOrdinalParse: /\d{1,2}م/, ordinal : '%dم', week : { dow : 6, // Saturday is the first day of the week. doy : 12 // The week that contains Jan 12th is the first week of the year. } }); return fa; }))); /***/ }), /* 344 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var numbersPast = 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(' '), numbersFuture = [ 'nolla', 'yhden', 'kahden', 'kolmen', 'neljän', 'viiden', 'kuuden', numbersPast[7], numbersPast[8], numbersPast[9] ]; function translate(number, withoutSuffix, key, isFuture) { var result = ''; switch (key) { case 's': return isFuture ? 'muutaman sekunnin' : 'muutama sekunti'; case 'ss': return isFuture ? 'sekunnin' : 'sekuntia'; case 'm': return isFuture ? 'minuutin' : 'minuutti'; case 'mm': result = isFuture ? 'minuutin' : 'minuuttia'; break; case 'h': return isFuture ? 'tunnin' : 'tunti'; case 'hh': result = isFuture ? 'tunnin' : 'tuntia'; break; case 'd': return isFuture ? 'päivän' : 'päivä'; case 'dd': result = isFuture ? 'päivän' : 'päivää'; break; case 'M': return isFuture ? 'kuukauden' : 'kuukausi'; case 'MM': result = isFuture ? 'kuukauden' : 'kuukautta'; break; case 'y': return isFuture ? 'vuoden' : 'vuosi'; case 'yy': result = isFuture ? 'vuoden' : 'vuotta'; break; } result = verbalNumber(number, isFuture) + ' ' + result; return result; } function verbalNumber(number, isFuture) { return number < 10 ? (isFuture ? numbersFuture[number] : numbersPast[number]) : number; } var fi = moment.defineLocale('fi', { months : 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split('_'), monthsShort : 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split('_'), weekdays : 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split('_'), weekdaysShort : 'su_ma_ti_ke_to_pe_la'.split('_'), weekdaysMin : 'su_ma_ti_ke_to_pe_la'.split('_'), longDateFormat : { LT : 'HH.mm', LTS : 'HH.mm.ss', L : 'DD.MM.YYYY', LL : 'Do MMMM[ta] YYYY', LLL : 'Do MMMM[ta] YYYY, [klo] HH.mm', LLLL : 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm', l : 'D.M.YYYY', ll : 'Do MMM YYYY', lll : 'Do MMM YYYY, [klo] HH.mm', llll : 'ddd, Do MMM YYYY, [klo] HH.mm' }, calendar : { sameDay : '[tänään] [klo] LT', nextDay : '[huomenna] [klo] LT', nextWeek : 'dddd [klo] LT', lastDay : '[eilen] [klo] LT', lastWeek : '[viime] dddd[na] [klo] LT', sameElse : 'L' }, relativeTime : { future : '%s päästä', past : '%s sitten', s : translate, ss : translate, m : translate, mm : translate, h : translate, hh : translate, d : translate, dd : translate, M : translate, MM : translate, y : translate, yy : translate }, dayOfMonthOrdinalParse: /\d{1,2}\./, ordinal : '%d.', 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 fi; }))); /***/ }), /* 345 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var fo = moment.defineLocale('fo', { months : 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split('_'), monthsShort : 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'), weekdays : 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split('_'), weekdaysShort : 'sun_mán_týs_mik_hós_frí_ley'.split('_'), weekdaysMin : 'su_má_tý_mi_hó_fr_le'.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 : '[Í dag kl.] LT', nextDay : '[Í morgin kl.] LT', nextWeek : 'dddd [kl.] LT', lastDay : '[Í gjár kl.] LT', lastWeek : '[síðstu] dddd [kl] LT', sameElse : 'L' }, relativeTime : { future : 'um %s', past : '%s síðani', s : 'fá sekund', ss : '%d sekundir', m : 'ein minutt', mm : '%d minuttir', h : 'ein tími', hh : '%d tímar', d : 'ein dagur', dd : '%d dagar', M : 'ein mánaði', MM : '%d mánaðir', y : 'eitt ár', yy : '%d ár' }, dayOfMonthOrdinalParse: /\d{1,2}\./, ordinal : '%d.', 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 fo; }))); /***/ }), /* 346 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var fr = moment.defineLocale('fr', { months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'), monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'), monthsParseExact : true, weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), weekdaysMin : 'di_lu_ma_me_je_ve_sa'.split('_'), weekdaysParseExact : true, 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 : '[Aujourd’hui à] LT', nextDay : '[Demain à] LT', nextWeek : 'dddd [à] LT', lastDay : '[Hier à] LT', lastWeek : 'dddd [dernier à] LT', sameElse : 'L' }, relativeTime : { future : 'dans %s', past : 'il y a %s', s : 'quelques secondes', ss : '%d secondes', m : 'une minute', mm : '%d minutes', h : 'une heure', hh : '%d heures', d : 'un jour', dd : '%d jours', M : 'un mois', MM : '%d mois', y : 'un an', yy : '%d ans' }, dayOfMonthOrdinalParse: /\d{1,2}(er|)/, ordinal : function (number, period) { switch (period) { // TODO: Return 'e' when day of month > 1. Move this case inside // block for masculine words below. // See https://github.com/moment/moment/issues/3375 case 'D': return number + (number === 1 ? 'er' : ''); // Words with masculine grammatical gender: mois, trimestre, jour default: case 'M': case 'Q': case 'DDD': case 'd': return number + (number === 1 ? 'er' : 'e'); // Words with feminine grammatical gender: semaine case 'w': case 'W': return number + (number === 1 ? 're' : 'e'); } }, 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 fr; }))); /***/ }), /* 347 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var frCa = moment.defineLocale('fr-ca', { months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'), monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'), monthsParseExact : true, weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), weekdaysMin : 'di_lu_ma_me_je_ve_sa'.split('_'), weekdaysParseExact : true, longDateFormat : { LT : 'HH:mm', LTS : 'HH:mm:ss', L : 'YYYY-MM-DD', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY HH:mm', LLLL : 'dddd D MMMM YYYY HH:mm' }, calendar : { sameDay : '[Aujourd’hui à] LT', nextDay : '[Demain à] LT', nextWeek : 'dddd [à] LT', lastDay : '[Hier à] LT', lastWeek : 'dddd [dernier à] LT', sameElse : 'L' }, relativeTime : { future : 'dans %s', past : 'il y a %s', s : 'quelques secondes', ss : '%d secondes', m : 'une minute', mm : '%d minutes', h : 'une heure', hh : '%d heures', d : 'un jour', dd : '%d jours', M : 'un mois', MM : '%d mois', y : 'un an', yy : '%d ans' }, dayOfMonthOrdinalParse: /\d{1,2}(er|e)/, ordinal : function (number, period) { switch (period) { // Words with masculine grammatical gender: mois, trimestre, jour default: case 'M': case 'Q': case 'D': case 'DDD': case 'd': return number + (number === 1 ? 'er' : 'e'); // Words with feminine grammatical gender: semaine case 'w': case 'W': return number + (number === 1 ? 're' : 'e'); } } }); return frCa; }))); /***/ }), /* 348 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var frCh = moment.defineLocale('fr-ch', { months : 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split('_'), monthsShort : 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split('_'), monthsParseExact : true, weekdays : 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), weekdaysShort : 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), weekdaysMin : 'di_lu_ma_me_je_ve_sa'.split('_'), weekdaysParseExact : true, 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 : '[Aujourd’hui à] LT', nextDay : '[Demain à] LT', nextWeek : 'dddd [à] LT', lastDay : '[Hier à] LT', lastWeek : 'dddd [dernier à] LT', sameElse : 'L' }, relativeTime : { future : 'dans %s', past : 'il y a %s', s : 'quelques secondes', ss : '%d secondes', m : 'une minute', mm : '%d minutes', h : 'une heure', hh : '%d heures', d : 'un jour', dd : '%d jours', M : 'un mois', MM : '%d mois', y : 'un an', yy : '%d ans' }, dayOfMonthOrdinalParse: /\d{1,2}(er|e)/, ordinal : function (number, period) { switch (period) { // Words with masculine grammatical gender: mois, trimestre, jour default: case 'M': case 'Q': case 'D': case 'DDD': case 'd': return number + (number === 1 ? 'er' : 'e'); // Words with feminine grammatical gender: semaine case 'w': case 'W': return number + (number === 1 ? 're' : 'e'); } }, 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 frCh; }))); /***/ }), /* 349 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var monthsShortWithDots = 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split('_'), monthsShortWithoutDots = 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'); var fy = moment.defineLocale('fy', { months : 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split('_'), monthsShort : function (m, format) { if (!m) { return monthsShortWithDots; } else if (/-MMM-/.test(format)) { return monthsShortWithoutDots[m.month()]; } else { return monthsShortWithDots[m.month()]; } }, monthsParseExact : true, weekdays : 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split('_'), weekdaysShort : 'si._mo._ti._wo._to._fr._so.'.split('_'), weekdaysMin : 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'), weekdaysParseExact : true, 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: '[hjoed om] LT', nextDay: '[moarn om] LT', nextWeek: 'dddd [om] LT', lastDay: '[juster om] LT', lastWeek: '[ôfrûne] dddd [om] LT', sameElse: 'L' }, relativeTime : { future : 'oer %s', past : '%s lyn', s : 'in pear sekonden', ss : '%d sekonden', m : 'ien minút', mm : '%d minuten', h : 'ien oere', hh : '%d oeren', d : 'ien dei', dd : '%d dagen', M : 'ien moanne', MM : '%d moannen', y : 'ien jier', yy : '%d jierren' }, dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, ordinal : function (number) { return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); }, 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 fy; }))); /***/ }), /* 350 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var months = [ 'Am Faoilleach', 'An Gearran', 'Am Màrt', 'An Giblean', 'An Cèitean', 'An t-Ògmhios', 'An t-Iuchar', 'An Lùnastal', 'An t-Sultain', 'An Dàmhair', 'An t-Samhain', 'An Dùbhlachd' ]; var monthsShort = ['Faoi', 'Gear', 'Màrt', 'Gibl', 'Cèit', 'Ògmh', 'Iuch', 'Lùn', 'Sult', 'Dàmh', 'Samh', 'Dùbh']; var weekdays = ['Didòmhnaich', 'Diluain', 'Dimàirt', 'Diciadain', 'Diardaoin', 'Dihaoine', 'Disathairne']; var weekdaysShort = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis']; var weekdaysMin = ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa']; var gd = moment.defineLocale('gd', { months : months, monthsShort : monthsShort, monthsParseExact : true, weekdays : weekdays, weekdaysShort : weekdaysShort, weekdaysMin : weekdaysMin, 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 : '[An-diugh aig] LT', nextDay : '[A-màireach aig] LT', nextWeek : 'dddd [aig] LT', lastDay : '[An-dè aig] LT', lastWeek : 'dddd [seo chaidh] [aig] LT', sameElse : 'L' }, relativeTime : { future : 'ann an %s', past : 'bho chionn %s', s : 'beagan diogan', ss : '%d diogan', m : 'mionaid', mm : '%d mionaidean', h : 'uair', hh : '%d uairean', d : 'latha', dd : '%d latha', M : 'mìos', MM : '%d mìosan', y : 'bliadhna', yy : '%d bliadhna' }, dayOfMonthOrdinalParse : /\d{1,2}(d|na|mh)/, ordinal : function (number) { var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh'; 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 gd; }))); /***/ }), /* 351 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var gl = moment.defineLocale('gl', { months : 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split('_'), monthsShort : 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split('_'), monthsParseExact: true, weekdays : 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'), weekdaysShort : 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'), weekdaysMin : 'do_lu_ma_mé_xo_ve_sá'.split('_'), weekdaysParseExact : true, longDateFormat : { LT : 'H:mm', LTS : 'H:mm:ss', L : 'DD/MM/YYYY', LL : 'D [de] MMMM [de] YYYY', LLL : 'D [de] MMMM [de] YYYY H:mm', LLLL : 'dddd, D [de] MMMM [de] YYYY H:mm' }, calendar : { sameDay : function () { return '[hoxe ' + ((this.hours() !== 1) ? 'ás' : 'á') + '] LT'; }, nextDay : function () { return '[mañá ' + ((this.hours() !== 1) ? 'ás' : 'á') + '] LT'; }, nextWeek : function () { return 'dddd [' + ((this.hours() !== 1) ? 'ás' : 'a') + '] LT'; }, lastDay : function () { return '[onte ' + ((this.hours() !== 1) ? 'á' : 'a') + '] LT'; }, lastWeek : function () { return '[o] dddd [pasado ' + ((this.hours() !== 1) ? 'ás' : 'a') + '] LT'; }, sameElse : 'L' }, relativeTime : { future : function (str) { if (str.indexOf('un') === 0) { return 'n' + str; } return 'en ' + str; }, past : 'hai %s', s : 'uns segundos', ss : '%d segundos', m : 'un minuto', mm : '%d minutos', h : 'unha hora', hh : '%d horas', d : 'un día', dd : '%d días', M : 'un mes', MM : '%d meses', y : 'un ano', yy : '%d anos' }, dayOfMonthOrdinalParse : /\d{1,2}º/, ordinal : '%dº', 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 gl; }))); /***/ }), /* 352 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; function processRelativeTime(number, withoutSuffix, key, isFuture) { var format = { 's': ['thodde secondanim', 'thodde second'], 'ss': [number + ' secondanim', number + ' second'], 'm': ['eka mintan', 'ek minute'], 'mm': [number + ' mintanim', number + ' mintam'], 'h': ['eka horan', 'ek hor'], 'hh': [number + ' horanim', number + ' horam'], 'd': ['eka disan', 'ek dis'], 'dd': [number + ' disanim', number + ' dis'], 'M': ['eka mhoinean', 'ek mhoino'], 'MM': [number + ' mhoineanim', number + ' mhoine'], 'y': ['eka vorsan', 'ek voros'], 'yy': [number + ' vorsanim', number + ' vorsam'] }; return withoutSuffix ? format[key][0] : format[key][1]; } var gomLatn = moment.defineLocale('gom-latn', { months : 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split('_'), monthsShort : 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split('_'), monthsParseExact : true, weekdays : 'Aitar_Somar_Mongllar_Budvar_Brestar_Sukrar_Son\'var'.split('_'), weekdaysShort : 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'), weekdaysMin : 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'), weekdaysParseExact : true, longDateFormat : { LT : 'A h:mm [vazta]', LTS : 'A h:mm:ss [vazta]', L : 'DD-MM-YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY A h:mm [vazta]', LLLL : 'dddd, MMMM[achea] Do, YYYY, A h:mm [vazta]', llll: 'ddd, D MMM YYYY, A h:mm [vazta]' }, calendar : { sameDay: '[Aiz] LT', nextDay: '[Faleam] LT', nextWeek: '[Ieta to] dddd[,] LT', lastDay: '[Kal] LT', lastWeek: '[Fatlo] dddd[,] LT', sameElse: 'L' }, relativeTime : { future : '%s', past : '%s adim', s : processRelativeTime, ss : processRelativeTime, m : processRelativeTime, mm : processRelativeTime, h : processRelativeTime, hh : processRelativeTime, d : processRelativeTime, dd : processRelativeTime, M : processRelativeTime, MM : processRelativeTime, y : processRelativeTime, yy : processRelativeTime }, dayOfMonthOrdinalParse : /\d{1,2}(er)/, ordinal : function (number, period) { switch (period) { // the ordinal 'er' only applies to day of the month case 'D': return number + 'er'; default: case 'M': case 'Q': case 'DDD': case 'd': case 'w': case 'W': return number; } }, 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. }, meridiemParse: /rati|sokalli|donparam|sanje/, meridiemHour : function (hour, meridiem) { if (hour === 12) { hour = 0; } if (meridiem === 'rati') { return hour < 4 ? hour : hour + 12; } else if (meridiem === 'sokalli') { return hour; } else if (meridiem === 'donparam') { return hour > 12 ? hour : hour + 12; } else if (meridiem === 'sanje') { return hour + 12; } }, meridiem : function (hour, minute, isLower) { if (hour < 4) { return 'rati'; } else if (hour < 12) { return 'sokalli'; } else if (hour < 16) { return 'donparam'; } else if (hour < 20) { return 'sanje'; } else { return 'rati'; } } }); return gomLatn; }))); /***/ }), /* 353 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var symbolMap = { '1': '૧', '2': '૨', '3': '૩', '4': '૪', '5': '૫', '6': '૬', '7': '૭', '8': '૮', '9': '૯', '0': '૦' }, numberMap = { '૧': '1', '૨': '2', '૩': '3', '૪': '4', '૫': '5', '૬': '6', '૭': '7', '૮': '8', '૯': '9', '૦': '0' }; var gu = moment.defineLocale('gu', { months: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split('_'), monthsShort: 'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split('_'), monthsParseExact: true, weekdays: 'રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર'.split('_'), weekdaysShort: 'રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ'.split('_'), weekdaysMin: 'ર_સો_મં_બુ_ગુ_શુ_શ'.split('_'), longDateFormat: { LT: 'A h:mm વાગ્યે', LTS: 'A h:mm:ss વાગ્યે', L: 'DD/MM/YYYY', LL: 'D MMMM YYYY', LLL: 'D MMMM YYYY, A h:mm વાગ્યે', LLLL: 'dddd, D MMMM YYYY, A h:mm વાગ્યે' }, calendar: { sameDay: '[આજ] LT', nextDay: '[કાલે] LT', nextWeek: 'dddd, LT', lastDay: '[ગઇકાલે] LT', lastWeek: '[પાછલા] dddd, LT', sameElse: 'L' }, relativeTime: { future: '%s મા', past: '%s પેહલા', s: 'અમુક પળો', ss: '%d સેકંડ', m: 'એક મિનિટ', mm: '%d મિનિટ', h: 'એક કલાક', hh: '%d કલાક', d: 'એક દિવસ', dd: '%d દિવસ', M: 'એક મહિનો', MM: '%d મહિનો', y: 'એક વર્ષ', yy: '%d વર્ષ' }, preparse: function (string) { return string.replace(/[૧૨૩૪૫૬૭૮૯૦]/g, function (match) { return numberMap[match]; }); }, postformat: function (string) { return string.replace(/\d/g, function (match) { return symbolMap[match]; }); }, // Gujarati notation for meridiems are quite fuzzy in practice. While there exists // a rigid notion of a 'Pahar' it is not used as rigidly in modern Gujarati. meridiemParse: /રાત|બપોર|સવાર|સાંજ/, meridiemHour: function (hour, meridiem) { if (hour === 12) { hour = 0; } if (meridiem === 'રાત') { return hour < 4 ? hour : hour + 12; } else if (meridiem === 'સવાર') { return hour; } else if (meridiem === 'બપોર') { return hour >= 10 ? hour : hour + 12; } else if (meridiem === 'સાંજ') { return hour + 12; } }, meridiem: function (hour, minute, isLower) { if (hour < 4) { return 'રાત'; } else if (hour < 10) { return 'સવાર'; } else if (hour < 17) { return 'બપોર'; } else if (hour < 20) { return 'સાંજ'; } else { return 'રાત'; } }, week: { dow: 0, // Sunday is the first day of the week. doy: 6 // The week that contains Jan 6th is the first week of the year. } }); return gu; }))); /***/ }), /* 354 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var he = moment.defineLocale('he', { months : 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split('_'), monthsShort : 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split('_'), weekdays : 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'), weekdaysShort : 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'), weekdaysMin : 'א_ב_ג_ד_ה_ו_ש'.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', l : 'D/M/YYYY', ll : 'D MMM YYYY', lll : 'D MMM YYYY HH:mm', llll : 'ddd, D MMM YYYY HH:mm' }, calendar : { sameDay : '[היום ב־]LT', nextDay : '[מחר ב־]LT', nextWeek : 'dddd [בשעה] LT', lastDay : '[אתמול ב־]LT', lastWeek : '[ביום] dddd [האחרון בשעה] LT', sameElse : 'L' }, relativeTime : { future : 'בעוד %s', past : 'לפני %s', s : 'מספר שניות', ss : '%d שניות', m : 'דקה', mm : '%d דקות', h : 'שעה', hh : function (number) { if (number === 2) { return 'שעתיים'; } return number + ' שעות'; }, d : 'יום', dd : function (number) { if (number === 2) { return 'יומיים'; } return number + ' ימים'; }, M : 'חודש', MM : function (number) { if (number === 2) { return 'חודשיים'; } return number + ' חודשים'; }, y : 'שנה', yy : function (number) { if (number === 2) { return 'שנתיים'; } else if (number % 10 === 0 && number !== 10) { return number + ' שנה'; } return number + ' שנים'; } }, meridiemParse: /אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i, isPM : function (input) { return /^(אחה"צ|אחרי הצהריים|בערב)$/.test(input); }, meridiem : function (hour, minute, isLower) { if (hour < 5) { return 'לפנות בוקר'; } else if (hour < 10) { return 'בבוקר'; } else if (hour < 12) { return isLower ? 'לפנה"צ' : 'לפני הצהריים'; } else if (hour < 18) { return isLower ? 'אחה"צ' : 'אחרי הצהריים'; } else { return 'בערב'; } } }); return he; }))); /***/ }), /* 355 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var symbolMap = { '1': '१', '2': '२', '3': '३', '4': '४', '5': '५', '6': '६', '7': '७', '8': '८', '9': '९', '0': '०' }, numberMap = { '१': '1', '२': '2', '३': '3', '४': '4', '५': '5', '६': '6', '७': '7', '८': '8', '९': '9', '०': '0' }; var hi = moment.defineLocale('hi', { months : 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split('_'), monthsShort : 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'), monthsParseExact: true, weekdays : 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'), weekdaysShort : 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'), weekdaysMin : 'र_सो_मं_बु_गु_शु_श'.split('_'), longDateFormat : { LT : 'A h:mm बजे', LTS : 'A h:mm:ss बजे', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY, A h:mm बजे', LLLL : 'dddd, D MMMM YYYY, A h:mm बजे' }, calendar : { sameDay : '[आज] LT', nextDay : '[कल] LT', nextWeek : 'dddd, LT', lastDay : '[कल] LT', lastWeek : '[पिछले] dddd, LT', sameElse : 'L' }, relativeTime : { future : '%s में', past : '%s पहले', s : 'कुछ ही क्षण', ss : '%d सेकंड', m : 'एक मिनट', mm : '%d मिनट', h : 'एक घंटा', hh : '%d घंटे', d : 'एक दिन', dd : '%d दिन', M : 'एक महीने', MM : '%d महीने', y : 'एक वर्ष', yy : '%d वर्ष' }, preparse: function (string) { return string.replace(/[१२३४५६७८९०]/g, function (match) { return numberMap[match]; }); }, postformat: function (string) { return string.replace(/\d/g, function (match) { return symbolMap[match]; }); }, // Hindi notation for meridiems are quite fuzzy in practice. While there exists // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi. meridiemParse: /रात|सुबह|दोपहर|शाम/, meridiemHour : function (hour, meridiem) { if (hour === 12) { hour = 0; } if (meridiem === 'रात') { return hour < 4 ? hour : hour + 12; } else if (meridiem === 'सुबह') { return hour; } else if (meridiem === 'दोपहर') { return hour >= 10 ? hour : hour + 12; } else if (meridiem === 'शाम') { return hour + 12; } }, meridiem : function (hour, minute, isLower) { if (hour < 4) { return 'रात'; } else if (hour < 10) { return 'सुबह'; } else if (hour < 17) { return 'दोपहर'; } else if (hour < 20) { return 'शाम'; } else { return 'रात'; } }, week : { dow : 0, // Sunday is the first day of the week. doy : 6 // The week that contains Jan 6th is the first week of the year. } }); return hi; }))); /***/ }), /* 356 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; function translate(number, withoutSuffix, key) { var result = number + ' '; switch (key) { case 'ss': if (number === 1) { result += 'sekunda'; } else if (number === 2 || number === 3 || number === 4) { result += 'sekunde'; } else { result += 'sekundi'; } return result; case 'm': return withoutSuffix ? 'jedna minuta' : 'jedne minute'; case 'mm': if (number === 1) { result += 'minuta'; } else if (number === 2 || number === 3 || number === 4) { result += 'minute'; } else { result += 'minuta'; } return result; case 'h': return withoutSuffix ? 'jedan sat' : 'jednog sata'; case 'hh': if (number === 1) { result += 'sat'; } else if (number === 2 || number === 3 || number === 4) { result += 'sata'; } else { result += 'sati'; } return result; case 'dd': if (number === 1) { result += 'dan'; } else { result += 'dana'; } return result; case 'MM': if (number === 1) { result += 'mjesec'; } else if (number === 2 || number === 3 || number === 4) { result += 'mjeseca'; } else { result += 'mjeseci'; } return result; case 'yy': if (number === 1) { result += 'godina'; } else if (number === 2 || number === 3 || number === 4) { result += 'godine'; } else { result += 'godina'; } return result; } } var hr = moment.defineLocale('hr', { months : { format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split('_'), standalone: 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split('_') }, monthsShort : 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split('_'), monthsParseExact: true, weekdays : 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'), weekdaysShort : 'ned._pon._uto._sri._čet._pet._sub.'.split('_'), weekdaysMin : 'ne_po_ut_sr_če_pe_su'.split('_'), weekdaysParseExact : true, longDateFormat : { LT : 'H:mm', LTS : 'H:mm:ss', L : 'DD.MM.YYYY', LL : 'D. MMMM YYYY', LLL : 'D. MMMM YYYY H:mm', LLLL : 'dddd, D. MMMM YYYY H:mm' }, calendar : { sameDay : '[danas u] LT', nextDay : '[sutra u] LT', nextWeek : function () { switch (this.day()) { case 0: return '[u] [nedjelju] [u] LT'; case 3: return '[u] [srijedu] [u] LT'; case 6: return '[u] [subotu] [u] LT'; case 1: case 2: case 4: case 5: return '[u] dddd [u] LT'; } }, lastDay : '[jučer u] LT', lastWeek : function () { switch (this.day()) { case 0: case 3: return '[prošlu] dddd [u] LT'; case 6: return '[prošle] [subote] [u] LT'; case 1: case 2: case 4: case 5: return '[prošli] dddd [u] LT'; } }, sameElse : 'L' }, relativeTime : { future : 'za %s', past : 'prije %s', s : 'par sekundi', ss : translate, m : translate, mm : translate, h : translate, hh : translate, d : 'dan', dd : translate, M : 'mjesec', MM : translate, y : 'godinu', yy : translate }, dayOfMonthOrdinalParse: /\d{1,2}\./, ordinal : '%d.', week : { dow : 1, // Monday is the first day of the week. doy : 7 // The week that contains Jan 7th is the first week of the year. } }); return hr; }))); /***/ }), /* 357 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' '); function translate(number, withoutSuffix, key, isFuture) { var num = number; switch (key) { case 's': return (isFuture || withoutSuffix) ? 'néhány másodperc' : 'néhány másodperce'; case 'ss': return num + (isFuture || withoutSuffix) ? ' másodperc' : ' másodperce'; case 'm': return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce'); case 'mm': return num + (isFuture || withoutSuffix ? ' perc' : ' perce'); case 'h': return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája'); case 'hh': return num + (isFuture || withoutSuffix ? ' óra' : ' órája'); case 'd': return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja'); case 'dd': return num + (isFuture || withoutSuffix ? ' nap' : ' napja'); case 'M': return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja'); case 'MM': return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja'); case 'y': return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve'); case 'yy': return num + (isFuture || withoutSuffix ? ' év' : ' éve'); } return ''; } function week(isFuture) { return (isFuture ? '' : '[múlt] ') + '[' + weekEndings[this.day()] + '] LT[-kor]'; } var hu = moment.defineLocale('hu', { months : 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split('_'), monthsShort : 'jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec'.split('_'), weekdays : 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'), weekdaysShort : 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'), weekdaysMin : 'v_h_k_sze_cs_p_szo'.split('_'), longDateFormat : { LT : 'H:mm', LTS : 'H:mm:ss', L : 'YYYY.MM.DD.', LL : 'YYYY. MMMM D.', LLL : 'YYYY. MMMM D. H:mm', LLLL : 'YYYY. MMMM D., dddd H:mm' }, meridiemParse: /de|du/i, isPM: function (input) { return input.charAt(1).toLowerCase() === 'u'; }, meridiem : function (hours, minutes, isLower) { if (hours < 12) { return isLower === true ? 'de' : 'DE'; } else { return isLower === true ? 'du' : 'DU'; } }, calendar : { sameDay : '[ma] LT[-kor]', nextDay : '[holnap] LT[-kor]', nextWeek : function () { return week.call(this, true); }, lastDay : '[tegnap] LT[-kor]', lastWeek : function () { return week.call(this, false); }, sameElse : 'L' }, relativeTime : { future : '%s múlva', past : '%s', s : translate, ss : translate, m : translate, mm : translate, h : translate, hh : translate, d : translate, dd : translate, M : translate, MM : translate, y : translate, yy : translate }, dayOfMonthOrdinalParse: /\d{1,2}\./, ordinal : '%d.', 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 hu; }))); /***/ }), /* 358 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var hyAm = moment.defineLocale('hy-am', { months : { format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split('_'), standalone: 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split('_') }, monthsShort : 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'), weekdays : 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split('_'), weekdaysShort : 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'), weekdaysMin : 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.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: '[այսօր] LT', nextDay: '[վաղը] LT', lastDay: '[երեկ] LT', nextWeek: function () { return 'dddd [օրը ժամը] LT'; }, lastWeek: function () { return '[անցած] dddd [օրը ժամը] LT'; }, sameElse: 'L' }, relativeTime : { future : '%s հետո', past : '%s առաջ', s : 'մի քանի վայրկյան', ss : '%d վայրկյան', m : 'րոպե', mm : '%d րոպե', h : 'ժամ', hh : '%d ժամ', d : 'օր', dd : '%d օր', M : 'ամիս', MM : '%d ամիս', y : 'տարի', yy : '%d տարի' }, meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/, isPM: function (input) { return /^(ցերեկվա|երեկոյան)$/.test(input); }, meridiem : function (hour) { if (hour < 4) { return 'գիշերվա'; } else if (hour < 12) { return 'առավոտվա'; } else if (hour < 17) { return 'ցերեկվա'; } else { return 'երեկոյան'; } }, dayOfMonthOrdinalParse: /\d{1,2}|\d{1,2}-(ին|րդ)/, ordinal: function (number, period) { switch (period) { case 'DDD': case 'w': case 'W': case 'DDDo': if (number === 1) { return number + '-ին'; } return number + '-րդ'; default: return number; } }, week : { dow : 1, // Monday is the first day of the week. doy : 7 // The week that contains Jan 7th is the first week of the year. } }); return hyAm; }))); /***/ }), /* 359 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var id = moment.defineLocale('id', { months : 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split('_'), monthsShort : 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des'.split('_'), weekdays : 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'), weekdaysShort : 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'), weekdaysMin : 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'), longDateFormat : { LT : 'HH.mm', LTS : 'HH.mm.ss', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY [pukul] HH.mm', LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm' }, meridiemParse: /pagi|siang|sore|malam/, meridiemHour : function (hour, meridiem) { if (hour === 12) { hour = 0; } if (meridiem === 'pagi') { return hour; } else if (meridiem === 'siang') { return hour >= 11 ? hour : hour + 12; } else if (meridiem === 'sore' || meridiem === 'malam') { return hour + 12; } }, meridiem : function (hours, minutes, isLower) { if (hours < 11) { return 'pagi'; } else if (hours < 15) { return 'siang'; } else if (hours < 19) { return 'sore'; } else { return 'malam'; } }, calendar : { sameDay : '[Hari ini pukul] LT', nextDay : '[Besok pukul] LT', nextWeek : 'dddd [pukul] LT', lastDay : '[Kemarin pukul] LT', lastWeek : 'dddd [lalu pukul] LT', sameElse : 'L' }, relativeTime : { future : 'dalam %s', past : '%s yang lalu', s : 'beberapa detik', ss : '%d detik', m : 'semenit', mm : '%d menit', h : 'sejam', hh : '%d jam', d : 'sehari', dd : '%d hari', M : 'sebulan', MM : '%d bulan', y : 'setahun', yy : '%d tahun' }, week : { dow : 1, // Monday is the first day of the week. doy : 7 // The week that contains Jan 7th is the first week of the year. } }); return id; }))); /***/ }), /* 360 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; function plural(n) { if (n % 100 === 11) { return true; } else if (n % 10 === 1) { return false; } return true; } function translate(number, withoutSuffix, key, isFuture) { var result = number + ' '; switch (key) { case 's': return withoutSuffix || isFuture ? 'nokkrar sekúndur' : 'nokkrum sekúndum'; case 'ss': if (plural(number)) { return result + (withoutSuffix || isFuture ? 'sekúndur' : 'sekúndum'); } return result + 'sekúnda'; case 'm': return withoutSuffix ? 'mínúta' : 'mínútu'; case 'mm': if (plural(number)) { return result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum'); } else if (withoutSuffix) { return result + 'mínúta'; } return result + 'mínútu'; case 'hh': if (plural(number)) { return result + (withoutSuffix || isFuture ? 'klukkustundir' : 'klukkustundum'); } return result + 'klukkustund'; case 'd': if (withoutSuffix) { return 'dagur'; } return isFuture ? 'dag' : 'degi'; case 'dd': if (plural(number)) { if (withoutSuffix) { return result + 'dagar'; } return result + (isFuture ? 'daga' : 'dögum'); } else if (withoutSuffix) { return result + 'dagur'; } return result + (isFuture ? 'dag' : 'degi'); case 'M': if (withoutSuffix) { return 'mánuður'; } return isFuture ? 'mánuð' : 'mánuði'; case 'MM': if (plural(number)) { if (withoutSuffix) { return result + 'mánuðir'; } return result + (isFuture ? 'mánuði' : 'mánuðum'); } else if (withoutSuffix) { return result + 'mánuður'; } return result + (isFuture ? 'mánuð' : 'mánuði'); case 'y': return withoutSuffix || isFuture ? 'ár' : 'ári'; case 'yy': if (plural(number)) { return result + (withoutSuffix || isFuture ? 'ár' : 'árum'); } return result + (withoutSuffix || isFuture ? 'ár' : 'ári'); } } var is = moment.defineLocale('is', { months : 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split('_'), monthsShort : 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'), weekdays : 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split('_'), weekdaysShort : 'sun_mán_þri_mið_fim_fös_lau'.split('_'), weekdaysMin : 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'), longDateFormat : { LT : 'H:mm', LTS : 'H:mm:ss', L : 'DD.MM.YYYY', LL : 'D. MMMM YYYY', LLL : 'D. MMMM YYYY [kl.] H:mm', LLLL : 'dddd, D. MMMM YYYY [kl.] H:mm' }, calendar : { sameDay : '[í dag kl.] LT', nextDay : '[á morgun kl.] LT', nextWeek : 'dddd [kl.] LT', lastDay : '[í gær kl.] LT', lastWeek : '[síðasta] dddd [kl.] LT', sameElse : 'L' }, relativeTime : { future : 'eftir %s', past : 'fyrir %s síðan', s : translate, ss : translate, m : translate, mm : translate, h : 'klukkustund', hh : translate, d : translate, dd : translate, M : translate, MM : translate, y : translate, yy : translate }, dayOfMonthOrdinalParse: /\d{1,2}\./, ordinal : '%d.', 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 is; }))); /***/ }), /* 361 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var it = moment.defineLocale('it', { months : 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split('_'), monthsShort : 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'), weekdays : 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split('_'), weekdaysShort : 'dom_lun_mar_mer_gio_ven_sab'.split('_'), weekdaysMin : 'do_lu_ma_me_gi_ve_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: '[Oggi alle] LT', nextDay: '[Domani alle] LT', nextWeek: 'dddd [alle] LT', lastDay: '[Ieri alle] LT', lastWeek: function () { switch (this.day()) { case 0: return '[la scorsa] dddd [alle] LT'; default: return '[lo scorso] dddd [alle] LT'; } }, sameElse: 'L' }, relativeTime : { future : function (s) { return ((/^[0-9].+$/).test(s) ? 'tra' : 'in') + ' ' + s; }, past : '%s fa', s : 'alcuni secondi', ss : '%d secondi', m : 'un minuto', mm : '%d minuti', h : 'un\'ora', hh : '%d ore', d : 'un giorno', dd : '%d giorni', M : 'un mese', MM : '%d mesi', y : 'un anno', yy : '%d anni' }, dayOfMonthOrdinalParse : /\d{1,2}º/, ordinal: '%dº', 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 it; }))); /***/ }), /* 362 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var ja = moment.defineLocale('ja', { months : '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.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日 HH:mm', LLLL : 'YYYY年M月D日 dddd HH:mm', l : 'YYYY/MM/DD', ll : 'YYYY年M月D日', lll : 'YYYY年M月D日 HH:mm', llll : 'YYYY年M月D日(ddd) HH:mm' }, meridiemParse: /午前|午後/i, isPM : function (input) { return input === '午後'; }, meridiem : function (hour, minute, isLower) { if (hour < 12) { return '午前'; } else { return '午後'; } }, calendar : { sameDay : '[今日] LT', nextDay : '[明日] LT', nextWeek : function (now) { if (now.week() < this.week()) { return '[来週]dddd LT'; } else { return 'dddd LT'; } }, lastDay : '[昨日] LT', lastWeek : function (now) { if (this.week() < now.week()) { return '[先週]dddd LT'; } else { return 'dddd LT'; } }, sameElse : 'L' }, dayOfMonthOrdinalParse : /\d{1,2}日/, ordinal : function (number, period) { switch (period) { case 'd': case 'D': case 'DDD': 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年' } }); return ja; }))); /***/ }), /* 363 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var jv = moment.defineLocale('jv', { months : 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split('_'), monthsShort : 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'), weekdays : 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'), weekdaysShort : 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'), weekdaysMin : 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'), longDateFormat : { LT : 'HH.mm', LTS : 'HH.mm.ss', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY [pukul] HH.mm', LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm' }, meridiemParse: /enjing|siyang|sonten|ndalu/, meridiemHour : function (hour, meridiem) { if (hour === 12) { hour = 0; } if (meridiem === 'enjing') { return hour; } else if (meridiem === 'siyang') { return hour >= 11 ? hour : hour + 12; } else if (meridiem === 'sonten' || meridiem === 'ndalu') { return hour + 12; } }, meridiem : function (hours, minutes, isLower) { if (hours < 11) { return 'enjing'; } else if (hours < 15) { return 'siyang'; } else if (hours < 19) { return 'sonten'; } else { return 'ndalu'; } }, calendar : { sameDay : '[Dinten puniko pukul] LT', nextDay : '[Mbenjang pukul] LT', nextWeek : 'dddd [pukul] LT', lastDay : '[Kala wingi pukul] LT', lastWeek : 'dddd [kepengker pukul] LT', sameElse : 'L' }, relativeTime : { future : 'wonten ing %s', past : '%s ingkang kepengker', s : 'sawetawis detik', ss : '%d detik', m : 'setunggal menit', mm : '%d menit', h : 'setunggal jam', hh : '%d jam', d : 'sedinten', dd : '%d dinten', M : 'sewulan', MM : '%d wulan', y : 'setaun', yy : '%d taun' }, week : { dow : 1, // Monday is the first day of the week. doy : 7 // The week that contains Jan 7th is the first week of the year. } }); return jv; }))); /***/ }), /* 364 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var ka = moment.defineLocale('ka', { months : { standalone: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split('_'), format: 'იანვარს_თებერვალს_მარტს_აპრილის_მაისს_ივნისს_ივლისს_აგვისტს_სექტემბერს_ოქტომბერს_ნოემბერს_დეკემბერს'.split('_') }, monthsShort : 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'), weekdays : { standalone: 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split('_'), format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split('_'), isFormat: /(წინა|შემდეგ)/ }, weekdaysShort : 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'), weekdaysMin : 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'), longDateFormat : { LT : 'h:mm A', LTS : 'h:mm:ss A', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY h:mm A', LLLL : 'dddd, D MMMM YYYY h:mm A' }, calendar : { sameDay : '[დღეს] LT[-ზე]', nextDay : '[ხვალ] LT[-ზე]', lastDay : '[გუშინ] LT[-ზე]', nextWeek : '[შემდეგ] dddd LT[-ზე]', lastWeek : '[წინა] dddd LT-ზე', sameElse : 'L' }, relativeTime : { future : function (s) { return (/(წამი|წუთი|საათი|წელი)/).test(s) ? s.replace(/ი$/, 'ში') : s + 'ში'; }, past : function (s) { if ((/(წამი|წუთი|საათი|დღე|თვე)/).test(s)) { return s.replace(/(ი|ე)$/, 'ის წინ'); } if ((/წელი/).test(s)) { return s.replace(/წელი$/, 'წლის წინ'); } }, s : 'რამდენიმე წამი', ss : '%d წამი', m : 'წუთი', mm : '%d წუთი', h : 'საათი', hh : '%d საათი', d : 'დღე', dd : '%d დღე', M : 'თვე', MM : '%d თვე', y : 'წელი', yy : '%d წელი' }, dayOfMonthOrdinalParse: /0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/, ordinal : function (number) { if (number === 0) { return number; } if (number === 1) { return number + '-ლი'; } if ((number < 20) || (number <= 100 && (number % 20 === 0)) || (number % 100 === 0)) { return 'მე-' + number; } return number + '-ე'; }, week : { dow : 1, doy : 7 } }); return ka; }))); /***/ }), /* 365 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var suffixes = { 0: '-ші', 1: '-ші', 2: '-ші', 3: '-ші', 4: '-ші', 5: '-ші', 6: '-шы', 7: '-ші', 8: '-ші', 9: '-шы', 10: '-шы', 20: '-шы', 30: '-шы', 40: '-шы', 50: '-ші', 60: '-шы', 70: '-ші', 80: '-ші', 90: '-шы', 100: '-ші' }; var kk = moment.defineLocale('kk', { months : 'қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан'.split('_'), monthsShort : 'қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел'.split('_'), weekdays : 'жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі'.split('_'), weekdaysShort : 'жек_дүй_сей_сәр_бей_жұм_сен'.split('_'), weekdaysMin : 'жк_дй_сй_ср_бй_жм_сн'.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 : '[Бүгін сағат] LT', nextDay : '[Ертең сағат] LT', nextWeek : 'dddd [сағат] LT', lastDay : '[Кеше сағат] LT', lastWeek : '[Өткен аптаның] dddd [сағат] LT', sameElse : 'L' }, relativeTime : { future : '%s ішінде', past : '%s бұрын', s : 'бірнеше секунд', ss : '%d секунд', m : 'бір минут', mm : '%d минут', h : 'бір сағат', hh : '%d сағат', d : 'бір күн', dd : '%d күн', M : 'бір ай', MM : '%d ай', y : 'бір жыл', yy : '%d жыл' }, dayOfMonthOrdinalParse: /\d{1,2}-(ші|шы)/, ordinal : function (number) { var a = number % 10, b = number >= 100 ? 100 : null; return number + (suffixes[number] || suffixes[a] || suffixes[b]); }, week : { dow : 1, // Monday is the first day of the week. doy : 7 // The week that contains Jan 7th is the first week of the year. } }); return kk; }))); /***/ }), /* 366 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var symbolMap = { '1': '១', '2': '២', '3': '៣', '4': '៤', '5': '៥', '6': '៦', '7': '៧', '8': '៨', '9': '៩', '0': '០' }, numberMap = { '១': '1', '២': '2', '៣': '3', '៤': '4', '៥': '5', '៦': '6', '៧': '7', '៨': '8', '៩': '9', '០': '0' }; var km = moment.defineLocale('km', { months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split( '_' ), monthsShort: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split( '_' ), weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'), weekdaysShort: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'), weekdaysMin: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'), weekdaysParseExact: true, 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' }, meridiemParse: /ព្រឹក|ល្ងាច/, isPM: function (input) { return input === 'ល្ងាច'; }, meridiem: function (hour, minute, isLower) { if (hour < 12) { return 'ព្រឹក'; } else { return 'ល្ងាច'; } }, calendar: { sameDay: '[ថ្ងៃនេះ ម៉ោង] LT', nextDay: '[ស្អែក ម៉ោង] LT', nextWeek: 'dddd [ម៉ោង] LT', lastDay: '[ម្សិលមិញ ម៉ោង] LT', lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT', sameElse: 'L' }, relativeTime: { future: '%sទៀត', past: '%sមុន', s: 'ប៉ុន្មានវិនាទី', ss: '%d វិនាទី', m: 'មួយនាទី', mm: '%d នាទី', h: 'មួយម៉ោង', hh: '%d ម៉ោង', d: 'មួយថ្ងៃ', dd: '%d ថ្ងៃ', M: 'មួយខែ', MM: '%d ខែ', y: 'មួយឆ្នាំ', yy: '%d ឆ្នាំ' }, dayOfMonthOrdinalParse : /ទី\d{1,2}/, ordinal : 'ទី%d', preparse: function (string) { return string.replace(/[១២៣៤៥៦៧៨៩០]/g, function (match) { return numberMap[match]; }); }, postformat: function (string) { return string.replace(/\d/g, function (match) { return symbolMap[match]; }); }, 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 km; }))); /***/ }), /* 367 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var symbolMap = { '1': '೧', '2': '೨', '3': '೩', '4': '೪', '5': '೫', '6': '೬', '7': '೭', '8': '೮', '9': '೯', '0': '೦' }, numberMap = { '೧': '1', '೨': '2', '೩': '3', '೪': '4', '೫': '5', '೬': '6', '೭': '7', '೮': '8', '೯': '9', '೦': '0' }; var kn = moment.defineLocale('kn', { months : 'ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್'.split('_'), monthsShort : 'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ'.split('_'), monthsParseExact: true, weekdays : 'ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ'.split('_'), weekdaysShort : 'ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ'.split('_'), weekdaysMin : 'ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ'.split('_'), longDateFormat : { LT : 'A h:mm', LTS : 'A h:mm:ss', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY, A h:mm', LLLL : 'dddd, D MMMM YYYY, A h:mm' }, calendar : { sameDay : '[ಇಂದು] LT', nextDay : '[ನಾಳೆ] LT', nextWeek : 'dddd, LT', lastDay : '[ನಿನ್ನೆ] LT', lastWeek : '[ಕೊನೆಯ] dddd, LT', sameElse : 'L' }, relativeTime : { future : '%s ನಂತರ', past : '%s ಹಿಂದೆ', s : 'ಕೆಲವು ಕ್ಷಣಗಳು', ss : '%d ಸೆಕೆಂಡುಗಳು', m : 'ಒಂದು ನಿಮಿಷ', mm : '%d ನಿಮಿಷ', h : 'ಒಂದು ಗಂಟೆ', hh : '%d ಗಂಟೆ', d : 'ಒಂದು ದಿನ', dd : '%d ದಿನ', M : 'ಒಂದು ತಿಂಗಳು', MM : '%d ತಿಂಗಳು', y : 'ಒಂದು ವರ್ಷ', yy : '%d ವರ್ಷ' }, preparse: function (string) { return string.replace(/[೧೨೩೪೫೬೭೮೯೦]/g, function (match) { return numberMap[match]; }); }, postformat: function (string) { return string.replace(/\d/g, function (match) { return symbolMap[match]; }); }, meridiemParse: /ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/, meridiemHour : function (hour, meridiem) { if (hour === 12) { hour = 0; } if (meridiem === 'ರಾತ್ರಿ') { return hour < 4 ? hour : hour + 12; } else if (meridiem === 'ಬೆಳಿಗ್ಗೆ') { return hour; } else if (meridiem === 'ಮಧ್ಯಾಹ್ನ') { return hour >= 10 ? hour : hour + 12; } else if (meridiem === 'ಸಂಜೆ') { return hour + 12; } }, meridiem : function (hour, minute, isLower) { if (hour < 4) { return 'ರಾತ್ರಿ'; } else if (hour < 10) { return 'ಬೆಳಿಗ್ಗೆ'; } else if (hour < 17) { return 'ಮಧ್ಯಾಹ್ನ'; } else if (hour < 20) { return 'ಸಂಜೆ'; } else { return 'ರಾತ್ರಿ'; } }, dayOfMonthOrdinalParse: /\d{1,2}(ನೇ)/, ordinal : function (number) { return number + 'ನೇ'; }, week : { dow : 0, // Sunday is the first day of the week. doy : 6 // The week that contains Jan 6th is the first week of the year. } }); return kn; }))); /***/ }), /* 368 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var ko = moment.defineLocale('ko', { months : '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'), monthsShort : '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'), weekdays : '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'), weekdaysShort : '일_월_화_수_목_금_토'.split('_'), weekdaysMin : '일_월_화_수_목_금_토'.split('_'), longDateFormat : { LT : 'A h:mm', LTS : 'A h:mm:ss', L : 'YYYY.MM.DD.', LL : 'YYYY년 MMMM D일', LLL : 'YYYY년 MMMM D일 A h:mm', LLLL : 'YYYY년 MMMM D일 dddd A h:mm', l : 'YYYY.MM.DD.', ll : 'YYYY년 MMMM D일', lll : 'YYYY년 MMMM D일 A h:mm', llll : 'YYYY년 MMMM D일 dddd A h:mm' }, calendar : { sameDay : '오늘 LT', nextDay : '내일 LT', nextWeek : 'dddd LT', lastDay : '어제 LT', lastWeek : '지난주 dddd LT', sameElse : 'L' }, relativeTime : { future : '%s 후', past : '%s 전', s : '몇 초', ss : '%d초', m : '1분', mm : '%d분', h : '한 시간', hh : '%d시간', d : '하루', dd : '%d일', M : '한 달', MM : '%d달', y : '일 년', yy : '%d년' }, 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; } }, meridiemParse : /오전|오후/, isPM : function (token) { return token === '오후'; }, meridiem : function (hour, minute, isUpper) { return hour < 12 ? '오전' : '오후'; } }); return ko; }))); /***/ }), /* 369 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var symbolMap = { '1': '١', '2': '٢', '3': '٣', '4': '٤', '5': '٥', '6': '٦', '7': '٧', '8': '٨', '9': '٩', '0': '٠' }, numberMap = { '١': '1', '٢': '2', '٣': '3', '٤': '4', '٥': '5', '٦': '6', '٧': '7', '٨': '8', '٩': '9', '٠': '0' }, months = [ 'کانونی دووەم', 'شوبات', 'ئازار', 'نیسان', 'ئایار', 'حوزەیران', 'تەمموز', 'ئاب', 'ئەیلوول', 'تشرینی یەكەم', 'تشرینی دووەم', 'كانونی یەکەم' ]; var ku = moment.defineLocale('ku', { months : months, monthsShort : months, weekdays : 'یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌'.split('_'), weekdaysShort : 'یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌'.split('_'), weekdaysMin : 'ی_د_س_چ_پ_ه_ش'.split('_'), weekdaysParseExact : true, 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' }, meridiemParse: /ئێواره‌|به‌یانی/, isPM: function (input) { return /ئێواره‌/.test(input); }, meridiem : function (hour, minute, isLower) { if (hour < 12) { return 'به‌یانی'; } else { return 'ئێواره‌'; } }, calendar : { sameDay : '[ئه‌مرۆ كاتژمێر] LT', nextDay : '[به‌یانی كاتژمێر] LT', nextWeek : 'dddd [كاتژمێر] LT', lastDay : '[دوێنێ كاتژمێر] LT', lastWeek : 'dddd [كاتژمێر] LT', sameElse : 'L' }, relativeTime : { future : 'له‌ %s', past : '%s', s : 'چه‌ند چركه‌یه‌ك', ss : 'چركه‌ %d', m : 'یه‌ك خوله‌ك', mm : '%d خوله‌ك', h : 'یه‌ك كاتژمێر', hh : '%d كاتژمێر', d : 'یه‌ك ڕۆژ', dd : '%d ڕۆژ', M : 'یه‌ك مانگ', MM : '%d مانگ', y : 'یه‌ك ساڵ', yy : '%d ساڵ' }, preparse: function (string) { return string.replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { return numberMap[match]; }).replace(/،/g, ','); }, postformat: function (string) { return string.replace(/\d/g, function (match) { return symbolMap[match]; }).replace(/,/g, '،'); }, week : { dow : 6, // Saturday is the first day of the week. doy : 12 // The week that contains Jan 12th is the first week of the year. } }); return ku; }))); /***/ }), /* 370 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var suffixes = { 0: '-чү', 1: '-чи', 2: '-чи', 3: '-чү', 4: '-чү', 5: '-чи', 6: '-чы', 7: '-чи', 8: '-чи', 9: '-чу', 10: '-чу', 20: '-чы', 30: '-чу', 40: '-чы', 50: '-чү', 60: '-чы', 70: '-чи', 80: '-чи', 90: '-чу', 100: '-чү' }; var ky = moment.defineLocale('ky', { months : 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_'), monthsShort : 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split('_'), weekdays : 'Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби'.split('_'), weekdaysShort : 'Жек_Дүй_Шей_Шар_Бей_Жум_Ише'.split('_'), weekdaysMin : 'Жк_Дй_Шй_Шр_Бй_Жм_Иш'.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 : '[Бүгүн саат] LT', nextDay : '[Эртең саат] LT', nextWeek : 'dddd [саат] LT', lastDay : '[Кечээ саат] LT', lastWeek : '[Өткөн аптанын] dddd [күнү] [саат] LT', sameElse : 'L' }, relativeTime : { future : '%s ичинде', past : '%s мурун', s : 'бирнече секунд', ss : '%d секунд', m : 'бир мүнөт', mm : '%d мүнөт', h : 'бир саат', hh : '%d саат', d : 'бир күн', dd : '%d күн', M : 'бир ай', MM : '%d ай', y : 'бир жыл', yy : '%d жыл' }, dayOfMonthOrdinalParse: /\d{1,2}-(чи|чы|чү|чу)/, ordinal : function (number) { var a = number % 10, b = number >= 100 ? 100 : null; return number + (suffixes[number] || suffixes[a] || suffixes[b]); }, week : { dow : 1, // Monday is the first day of the week. doy : 7 // The week that contains Jan 7th is the first week of the year. } }); return ky; }))); /***/ }), /* 371 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; function processRelativeTime(number, withoutSuffix, key, isFuture) { var format = { 'm': ['eng Minutt', 'enger Minutt'], 'h': ['eng Stonn', 'enger Stonn'], 'd': ['een Dag', 'engem Dag'], 'M': ['ee Mount', 'engem Mount'], 'y': ['ee Joer', 'engem Joer'] }; return withoutSuffix ? format[key][0] : format[key][1]; } function processFutureTime(string) { var number = string.substr(0, string.indexOf(' ')); if (eifelerRegelAppliesToNumber(number)) { return 'a ' + string; } return 'an ' + string; } function processPastTime(string) { var number = string.substr(0, string.indexOf(' ')); if (eifelerRegelAppliesToNumber(number)) { return 'viru ' + string; } return 'virun ' + string; } /** * Returns true if the word before the given number loses the '-n' ending. * e.g. 'an 10 Deeg' but 'a 5 Deeg' * * @param number {integer} * @returns {boolean} */ function eifelerRegelAppliesToNumber(number) { number = parseInt(number, 10); if (isNaN(number)) { return false; } if (number < 0) { // Negative Number --> always true return true; } else if (number < 10) { // Only 1 digit if (4 <= number && number <= 7) { return true; } return false; } else if (number < 100) { // 2 digits var lastDigit = number % 10, firstDigit = number / 10; if (lastDigit === 0) { return eifelerRegelAppliesToNumber(firstDigit); } return eifelerRegelAppliesToNumber(lastDigit); } else if (number < 10000) { // 3 or 4 digits --> recursively check first digit while (number >= 10) { number = number / 10; } return eifelerRegelAppliesToNumber(number); } else { // Anything larger than 4 digits: recursively check first n-3 digits number = number / 1000; return eifelerRegelAppliesToNumber(number); } } var lb = moment.defineLocale('lb', { months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split('_'), monthsShort: 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split('_'), monthsParseExact : true, weekdays: 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split('_'), weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'), weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'), weekdaysParseExact : true, longDateFormat: { LT: 'H:mm [Auer]', LTS: 'H:mm:ss [Auer]', L: 'DD.MM.YYYY', LL: 'D. MMMM YYYY', LLL: 'D. MMMM YYYY H:mm [Auer]', LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]' }, calendar: { sameDay: '[Haut um] LT', sameElse: 'L', nextDay: '[Muer um] LT', nextWeek: 'dddd [um] LT', lastDay: '[Gëschter um] LT', lastWeek: function () { // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule switch (this.day()) { case 2: case 4: return '[Leschten] dddd [um] LT'; default: return '[Leschte] dddd [um] LT'; } } }, relativeTime : { future : processFutureTime, past : processPastTime, s : 'e puer Sekonnen', ss : '%d Sekonnen', m : processRelativeTime, mm : '%d Minutten', h : processRelativeTime, hh : '%d Stonnen', d : processRelativeTime, dd : '%d Deeg', M : processRelativeTime, MM : '%d Méint', y : processRelativeTime, yy : '%d Joer' }, dayOfMonthOrdinalParse: /\d{1,2}\./, ordinal: '%d.', 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 lb; }))); /***/ }), /* 372 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var lo = moment.defineLocale('lo', { months : 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split('_'), monthsShort : 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split('_'), weekdays : 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'), weekdaysShort : 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'), weekdaysMin : 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'), weekdaysParseExact : true, 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' }, meridiemParse: /ຕອນເຊົ້າ|ຕອນແລງ/, isPM: function (input) { return input === 'ຕອນແລງ'; }, meridiem : function (hour, minute, isLower) { if (hour < 12) { return 'ຕອນເຊົ້າ'; } else { return 'ຕອນແລງ'; } }, calendar : { sameDay : '[ມື້ນີ້ເວລາ] LT', nextDay : '[ມື້ອື່ນເວລາ] LT', nextWeek : '[ວັນ]dddd[ໜ້າເວລາ] LT', lastDay : '[ມື້ວານນີ້ເວລາ] LT', lastWeek : '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT', sameElse : 'L' }, 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 ປີ' }, dayOfMonthOrdinalParse: /(ທີ່)\d{1,2}/, ordinal : function (number) { return 'ທີ່' + number; } }); return lo; }))); /***/ }), /* 373 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var units = { 'ss' : 'sekundė_sekundžių_sekundes', 'm' : 'minutė_minutės_minutę', 'mm': 'minutės_minučių_minutes', 'h' : 'valanda_valandos_valandą', 'hh': 'valandos_valandų_valandas', 'd' : 'diena_dienos_dieną', 'dd': 'dienos_dienų_dienas', 'M' : 'mėnuo_mėnesio_mėnesį', 'MM': 'mėnesiai_mėnesių_mėnesius', 'y' : 'metai_metų_metus', 'yy': 'metai_metų_metus' }; function translateSeconds(number, withoutSuffix, key, isFuture) { if (withoutSuffix) { return 'kelios sekundės'; } else { return isFuture ? 'kelių sekundžių' : 'kelias sekundes'; } } function translateSingular(number, withoutSuffix, key, isFuture) { return withoutSuffix ? forms(key)[0] : (isFuture ? forms(key)[1] : forms(key)[2]); } function special(number) { return number % 10 === 0 || (number > 10 && number < 20); } function forms(key) { return units[key].split('_'); } function translate(number, withoutSuffix, key, isFuture) { var result = number + ' '; if (number === 1) { return result + translateSingular(number, withoutSuffix, key[0], isFuture); } else if (withoutSuffix) { return result + (special(number) ? forms(key)[1] : forms(key)[0]); } else { if (isFuture) { return result + forms(key)[1]; } else { return result + (special(number) ? forms(key)[1] : forms(key)[2]); } } } var lt = moment.defineLocale('lt', { months : { format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split('_'), standalone: 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split('_'), isFormat: /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/ }, monthsShort : 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'), weekdays : { format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split('_'), standalone: 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split('_'), isFormat: /dddd HH:mm/ }, weekdaysShort : 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'), weekdaysMin : 'S_P_A_T_K_Pn_Š'.split('_'), weekdaysParseExact : true, longDateFormat : { LT : 'HH:mm', LTS : 'HH:mm:ss', L : 'YYYY-MM-DD', LL : 'YYYY [m.] MMMM D [d.]', LLL : 'YYYY [m.] MMMM D [d.], HH:mm [val.]', LLLL : 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]', l : 'YYYY-MM-DD', ll : 'YYYY [m.] MMMM D [d.]', lll : 'YYYY [m.] MMMM D [d.], HH:mm [val.]', llll : 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]' }, calendar : { sameDay : '[Šiandien] LT', nextDay : '[Rytoj] LT', nextWeek : 'dddd LT', lastDay : '[Vakar] LT', lastWeek : '[Praėjusį] dddd LT', sameElse : 'L' }, relativeTime : { future : 'po %s', past : 'prieš %s', s : translateSeconds, ss : translate, m : translateSingular, mm : translate, h : translateSingular, hh : translate, d : translateSingular, dd : translate, M : translateSingular, MM : translate, y : translateSingular, yy : translate }, dayOfMonthOrdinalParse: /\d{1,2}-oji/, ordinal : function (number) { return number + '-oji'; }, 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 lt; }))); /***/ }), /* 374 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var units = { 'ss': 'sekundes_sekundēm_sekunde_sekundes'.split('_'), 'm': 'minūtes_minūtēm_minūte_minūtes'.split('_'), 'mm': 'minūtes_minūtēm_minūte_minūtes'.split('_'), 'h': 'stundas_stundām_stunda_stundas'.split('_'), 'hh': 'stundas_stundām_stunda_stundas'.split('_'), 'd': 'dienas_dienām_diena_dienas'.split('_'), 'dd': 'dienas_dienām_diena_dienas'.split('_'), 'M': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'), 'MM': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'), 'y': 'gada_gadiem_gads_gadi'.split('_'), 'yy': 'gada_gadiem_gads_gadi'.split('_') }; /** * @param withoutSuffix boolean true = a length of time; false = before/after a period of time. */ function format(forms, number, withoutSuffix) { if (withoutSuffix) { // E.g. "21 minūte", "3 minūtes". return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3]; } else { // E.g. "21 minūtes" as in "pēc 21 minūtes". // E.g. "3 minūtēm" as in "pēc 3 minūtēm". return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1]; } } function relativeTimeWithPlural(number, withoutSuffix, key) { return number + ' ' + format(units[key], number, withoutSuffix); } function relativeTimeWithSingular(number, withoutSuffix, key) { return format(units[key], number, withoutSuffix); } function relativeSeconds(number, withoutSuffix) { return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm'; } var lv = moment.defineLocale('lv', { months : 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split('_'), monthsShort : 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'), weekdays : 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split('_'), weekdaysShort : 'Sv_P_O_T_C_Pk_S'.split('_'), weekdaysMin : 'Sv_P_O_T_C_Pk_S'.split('_'), weekdaysParseExact : true, longDateFormat : { LT : 'HH:mm', LTS : 'HH:mm:ss', L : 'DD.MM.YYYY.', LL : 'YYYY. [gada] D. MMMM', LLL : 'YYYY. [gada] D. MMMM, HH:mm', LLLL : 'YYYY. [gada] D. MMMM, dddd, HH:mm' }, calendar : { sameDay : '[Šodien pulksten] LT', nextDay : '[Rīt pulksten] LT', nextWeek : 'dddd [pulksten] LT', lastDay : '[Vakar pulksten] LT', lastWeek : '[Pagājušā] dddd [pulksten] LT', sameElse : 'L' }, relativeTime : { future : 'pēc %s', past : 'pirms %s', s : relativeSeconds, ss : relativeTimeWithPlural, m : relativeTimeWithSingular, mm : relativeTimeWithPlural, h : relativeTimeWithSingular, hh : relativeTimeWithPlural, d : relativeTimeWithSingular, dd : relativeTimeWithPlural, M : relativeTimeWithSingular, MM : relativeTimeWithPlural, y : relativeTimeWithSingular, yy : relativeTimeWithPlural }, dayOfMonthOrdinalParse: /\d{1,2}\./, ordinal : '%d.', 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 lv; }))); /***/ }), /* 375 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var translator = { words: { //Different grammatical cases ss: ['sekund', 'sekunda', 'sekundi'], m: ['jedan minut', 'jednog minuta'], mm: ['minut', 'minuta', 'minuta'], h: ['jedan sat', 'jednog sata'], hh: ['sat', 'sata', 'sati'], dd: ['dan', 'dana', 'dana'], MM: ['mjesec', 'mjeseca', 'mjeseci'], yy: ['godina', 'godine', 'godina'] }, correctGrammaticalCase: function (number, wordKey) { return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]); }, translate: function (number, withoutSuffix, key) { var wordKey = translator.words[key]; if (key.length === 1) { return withoutSuffix ? wordKey[0] : wordKey[1]; } else { return number + ' ' + translator.correctGrammaticalCase(number, wordKey); } } }; var me = moment.defineLocale('me', { months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split('_'), monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'), monthsParseExact : true, weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split('_'), weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'), weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'), weekdaysParseExact : true, longDateFormat: { LT: 'H:mm', LTS : 'H:mm:ss', L: 'DD.MM.YYYY', LL: 'D. MMMM YYYY', LLL: 'D. MMMM YYYY H:mm', LLLL: 'dddd, D. MMMM YYYY H:mm' }, calendar: { sameDay: '[danas u] LT', nextDay: '[sjutra u] LT', nextWeek: function () { switch (this.day()) { case 0: return '[u] [nedjelju] [u] LT'; case 3: return '[u] [srijedu] [u] LT'; case 6: return '[u] [subotu] [u] LT'; case 1: case 2: case 4: case 5: return '[u] dddd [u] LT'; } }, lastDay : '[juče u] LT', lastWeek : function () { var lastWeekDays = [ '[prošle] [nedjelje] [u] LT', '[prošlog] [ponedjeljka] [u] LT', '[prošlog] [utorka] [u] LT', '[prošle] [srijede] [u] LT', '[prošlog] [četvrtka] [u] LT', '[prošlog] [petka] [u] LT', '[prošle] [subote] [u] LT' ]; return lastWeekDays[this.day()]; }, sameElse : 'L' }, relativeTime : { future : 'za %s', past : 'prije %s', s : 'nekoliko sekundi', ss : translator.translate, m : translator.translate, mm : translator.translate, h : translator.translate, hh : translator.translate, d : 'dan', dd : translator.translate, M : 'mjesec', MM : translator.translate, y : 'godinu', yy : translator.translate }, dayOfMonthOrdinalParse: /\d{1,2}\./, ordinal : '%d.', week : { dow : 1, // Monday is the first day of the week. doy : 7 // The week that contains Jan 7th is the first week of the year. } }); return me; }))); /***/ }), /* 376 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var mi = moment.defineLocale('mi', { months: 'Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea'.split('_'), monthsShort: 'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split('_'), monthsRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i, monthsStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i, monthsShortRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i, monthsShortStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i, weekdays: 'Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei'.split('_'), weekdaysShort: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'), weekdaysMin: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'), longDateFormat: { LT: 'HH:mm', LTS: 'HH:mm:ss', L: 'DD/MM/YYYY', LL: 'D MMMM YYYY', LLL: 'D MMMM YYYY [i] HH:mm', LLLL: 'dddd, D MMMM YYYY [i] HH:mm' }, calendar: { sameDay: '[i teie mahana, i] LT', nextDay: '[apopo i] LT', nextWeek: 'dddd [i] LT', lastDay: '[inanahi i] LT', lastWeek: 'dddd [whakamutunga i] LT', sameElse: 'L' }, relativeTime: { future: 'i roto i %s', past: '%s i mua', s: 'te hēkona ruarua', ss: '%d hēkona', m: 'he meneti', mm: '%d meneti', h: 'te haora', hh: '%d haora', d: 'he ra', dd: '%d ra', M: 'he marama', MM: '%d marama', y: 'he tau', yy: '%d tau' }, dayOfMonthOrdinalParse: /\d{1,2}º/, ordinal: '%dº', 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 mi; }))); /***/ }), /* 377 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var mk = moment.defineLocale('mk', { months : 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split('_'), monthsShort : 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'), weekdays : 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split('_'), weekdaysShort : 'нед_пон_вто_сре_чет_пет_саб'.split('_'), weekdaysMin : 'нe_пo_вт_ср_че_пе_сa'.split('_'), longDateFormat : { LT : 'H:mm', LTS : 'H:mm:ss', L : 'D.MM.YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY H:mm', LLLL : 'dddd, D MMMM YYYY H:mm' }, calendar : { sameDay : '[Денес во] LT', nextDay : '[Утре во] LT', nextWeek : '[Во] dddd [во] LT', lastDay : '[Вчера во] LT', lastWeek : function () { switch (this.day()) { case 0: case 3: case 6: return '[Изминатата] dddd [во] LT'; case 1: case 2: case 4: case 5: return '[Изминатиот] dddd [во] LT'; } }, sameElse : 'L' }, relativeTime : { future : 'после %s', past : 'пред %s', s : 'неколку секунди', ss : '%d секунди', m : 'минута', mm : '%d минути', h : 'час', hh : '%d часа', d : 'ден', dd : '%d дена', M : 'месец', MM : '%d месеци', y : 'година', yy : '%d години' }, dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/, ordinal : function (number) { var lastDigit = number % 10, last2Digits = number % 100; if (number === 0) { return number + '-ев'; } else if (last2Digits === 0) { return number + '-ен'; } else if (last2Digits > 10 && last2Digits < 20) { return number + '-ти'; } else if (lastDigit === 1) { return number + '-ви'; } else if (lastDigit === 2) { return number + '-ри'; } else if (lastDigit === 7 || lastDigit === 8) { return number + '-ми'; } else { return number + '-ти'; } }, week : { dow : 1, // Monday is the first day of the week. doy : 7 // The week that contains Jan 7th is the first week of the year. } }); return mk; }))); /***/ }), /* 378 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var ml = moment.defineLocale('ml', { months : 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split('_'), monthsShort : 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split('_'), monthsParseExact : true, weekdays : 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split('_'), weekdaysShort : 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'), weekdaysMin : 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'), longDateFormat : { LT : 'A h:mm -നു', LTS : 'A h:mm:ss -നു', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY, A h:mm -നു', LLLL : 'dddd, D MMMM YYYY, A h:mm -നു' }, calendar : { sameDay : '[ഇന്ന്] LT', nextDay : '[നാളെ] LT', nextWeek : 'dddd, LT', lastDay : '[ഇന്നലെ] LT', lastWeek : '[കഴിഞ്ഞ] dddd, LT', sameElse : 'L' }, relativeTime : { future : '%s കഴിഞ്ഞ്', past : '%s മുൻപ്', s : 'അൽപ നിമിഷങ്ങൾ', ss : '%d സെക്കൻഡ്', m : 'ഒരു മിനിറ്റ്', mm : '%d മിനിറ്റ്', h : 'ഒരു മണിക്കൂർ', hh : '%d മണിക്കൂർ', d : 'ഒരു ദിവസം', dd : '%d ദിവസം', M : 'ഒരു മാസം', MM : '%d മാസം', y : 'ഒരു വർഷം', yy : '%d വർഷം' }, meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i, meridiemHour : function (hour, meridiem) { if (hour === 12) { hour = 0; } if ((meridiem === 'രാത്രി' && hour >= 4) || meridiem === 'ഉച്ച കഴിഞ്ഞ്' || meridiem === 'വൈകുന്നേരം') { return hour + 12; } else { return hour; } }, meridiem : function (hour, minute, isLower) { if (hour < 4) { return 'രാത്രി'; } else if (hour < 12) { return 'രാവിലെ'; } else if (hour < 17) { return 'ഉച്ച കഴിഞ്ഞ്'; } else if (hour < 20) { return 'വൈകുന്നേരം'; } else { return 'രാത്രി'; } } }); return ml; }))); /***/ }), /* 379 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; function translate(number, withoutSuffix, key, isFuture) { switch (key) { case 's': return withoutSuffix ? 'хэдхэн секунд' : 'хэдхэн секундын'; case 'ss': return number + (withoutSuffix ? ' секунд' : ' секундын'); case 'm': case 'mm': return number + (withoutSuffix ? ' минут' : ' минутын'); case 'h': case 'hh': return number + (withoutSuffix ? ' цаг' : ' цагийн'); case 'd': case 'dd': return number + (withoutSuffix ? ' өдөр' : ' өдрийн'); case 'M': case 'MM': return number + (withoutSuffix ? ' сар' : ' сарын'); case 'y': case 'yy': return number + (withoutSuffix ? ' жил' : ' жилийн'); default: return number; } } var mn = moment.defineLocale('mn', { months : 'Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар'.split('_'), monthsShort : '1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар'.split('_'), monthsParseExact : true, weekdays : 'Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба'.split('_'), weekdaysShort : 'Ням_Дав_Мяг_Лха_Пүр_Баа_Бям'.split('_'), weekdaysMin : 'Ня_Да_Мя_Лх_Пү_Ба_Бя'.split('_'), weekdaysParseExact : true, longDateFormat : { LT : 'HH:mm', LTS : 'HH:mm:ss', L : 'YYYY-MM-DD', LL : 'YYYY оны MMMMын D', LLL : 'YYYY оны MMMMын D HH:mm', LLLL : 'dddd, YYYY оны MMMMын D HH:mm' }, meridiemParse: /ҮӨ|ҮХ/i, isPM : function (input) { return input === 'ҮХ'; }, meridiem : function (hour, minute, isLower) { if (hour < 12) { return 'ҮӨ'; } else { return 'ҮХ'; } }, calendar : { sameDay : '[Өнөөдөр] LT', nextDay : '[Маргааш] LT', nextWeek : '[Ирэх] dddd LT', lastDay : '[Өчигдөр] LT', lastWeek : '[Өнгөрсөн] dddd LT', sameElse : 'L' }, relativeTime : { future : '%s дараа', past : '%s өмнө', s : translate, ss : translate, m : translate, mm : translate, h : translate, hh : translate, d : translate, dd : translate, M : translate, MM : translate, y : translate, yy : translate }, dayOfMonthOrdinalParse: /\d{1,2} өдөр/, ordinal : function (number, period) { switch (period) { case 'd': case 'D': case 'DDD': return number + ' өдөр'; default: return number; } } }); return mn; }))); /***/ }), /* 380 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var symbolMap = { '1': '१', '2': '२', '3': '३', '4': '४', '5': '५', '6': '६', '7': '७', '8': '८', '9': '९', '0': '०' }, numberMap = { '१': '1', '२': '2', '३': '3', '४': '4', '५': '5', '६': '6', '७': '7', '८': '8', '९': '9', '०': '0' }; function relativeTimeMr(number, withoutSuffix, string, isFuture) { var output = ''; if (withoutSuffix) { switch (string) { case 's': output = 'काही सेकंद'; break; case 'ss': output = '%d सेकंद'; break; case 'm': output = 'एक मिनिट'; break; case 'mm': output = '%d मिनिटे'; break; case 'h': output = 'एक तास'; break; case 'hh': output = '%d तास'; break; case 'd': output = 'एक दिवस'; break; case 'dd': output = '%d दिवस'; break; case 'M': output = 'एक महिना'; break; case 'MM': output = '%d महिने'; break; case 'y': output = 'एक वर्ष'; break; case 'yy': output = '%d वर्षे'; break; } } else { switch (string) { case 's': output = 'काही सेकंदां'; break; case 'ss': output = '%d सेकंदां'; break; case 'm': output = 'एका मिनिटा'; break; case 'mm': output = '%d मिनिटां'; break; case 'h': output = 'एका तासा'; break; case 'hh': output = '%d तासां'; break; case 'd': output = 'एका दिवसा'; break; case 'dd': output = '%d दिवसां'; break; case 'M': output = 'एका महिन्या'; break; case 'MM': output = '%d महिन्यां'; break; case 'y': output = 'एका वर्षा'; break; case 'yy': output = '%d वर्षां'; break; } } return output.replace(/%d/i, number); } var mr = moment.defineLocale('mr', { months : 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split('_'), monthsShort: 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split('_'), monthsParseExact : true, weekdays : 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'), weekdaysShort : 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'), weekdaysMin : 'र_सो_मं_बु_गु_शु_श'.split('_'), longDateFormat : { LT : 'A h:mm वाजता', LTS : 'A h:mm:ss वाजता', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY, A h:mm वाजता', LLLL : 'dddd, D MMMM YYYY, A h:mm वाजता' }, calendar : { sameDay : '[आज] LT', nextDay : '[उद्या] LT', nextWeek : 'dddd, LT', lastDay : '[काल] LT', lastWeek: '[मागील] dddd, LT', sameElse : 'L' }, relativeTime : { future: '%sमध्ये', past: '%sपूर्वी', s: relativeTimeMr, ss: relativeTimeMr, m: relativeTimeMr, mm: relativeTimeMr, h: relativeTimeMr, hh: relativeTimeMr, d: relativeTimeMr, dd: relativeTimeMr, M: relativeTimeMr, MM: relativeTimeMr, y: relativeTimeMr, yy: relativeTimeMr }, preparse: function (string) { return string.replace(/[१२३४५६७८९०]/g, function (match) { return numberMap[match]; }); }, postformat: function (string) { return string.replace(/\d/g, function (match) { return symbolMap[match]; }); }, meridiemParse: /रात्री|सकाळी|दुपारी|सायंकाळी/, meridiemHour : function (hour, meridiem) { if (hour === 12) { hour = 0; } if (meridiem === 'रात्री') { return hour < 4 ? hour : hour + 12; } else if (meridiem === 'सकाळी') { return hour; } else if (meridiem === 'दुपारी') { return hour >= 10 ? hour : hour + 12; } else if (meridiem === 'सायंकाळी') { return hour + 12; } }, meridiem: function (hour, minute, isLower) { if (hour < 4) { return 'रात्री'; } else if (hour < 10) { return 'सकाळी'; } else if (hour < 17) { return 'दुपारी'; } else if (hour < 20) { return 'सायंकाळी'; } else { return 'रात्री'; } }, week : { dow : 0, // Sunday is the first day of the week. doy : 6 // The week that contains Jan 6th is the first week of the year. } }); return mr; }))); /***/ }), /* 381 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var ms = moment.defineLocale('ms', { months : 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split('_'), monthsShort : 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'), weekdays : 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'), weekdaysShort : 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'), weekdaysMin : 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'), longDateFormat : { LT : 'HH.mm', LTS : 'HH.mm.ss', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY [pukul] HH.mm', LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm' }, meridiemParse: /pagi|tengahari|petang|malam/, meridiemHour: function (hour, meridiem) { if (hour === 12) { hour = 0; } if (meridiem === 'pagi') { return hour; } else if (meridiem === 'tengahari') { return hour >= 11 ? hour : hour + 12; } else if (meridiem === 'petang' || meridiem === 'malam') { return hour + 12; } }, meridiem : function (hours, minutes, isLower) { if (hours < 11) { return 'pagi'; } else if (hours < 15) { return 'tengahari'; } else if (hours < 19) { return 'petang'; } else { return 'malam'; } }, calendar : { sameDay : '[Hari ini pukul] LT', nextDay : '[Esok pukul] LT', nextWeek : 'dddd [pukul] LT', lastDay : '[Kelmarin pukul] LT', lastWeek : 'dddd [lepas pukul] LT', sameElse : 'L' }, relativeTime : { future : 'dalam %s', past : '%s yang lepas', s : 'beberapa saat', ss : '%d saat', m : 'seminit', mm : '%d minit', h : 'sejam', hh : '%d jam', d : 'sehari', dd : '%d hari', M : 'sebulan', MM : '%d bulan', y : 'setahun', yy : '%d tahun' }, week : { dow : 1, // Monday is the first day of the week. doy : 7 // The week that contains Jan 7th is the first week of the year. } }); return ms; }))); /***/ }), /* 382 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var msMy = moment.defineLocale('ms-my', { months : 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split('_'), monthsShort : 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'), weekdays : 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'), weekdaysShort : 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'), weekdaysMin : 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'), longDateFormat : { LT : 'HH.mm', LTS : 'HH.mm.ss', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY [pukul] HH.mm', LLLL : 'dddd, D MMMM YYYY [pukul] HH.mm' }, meridiemParse: /pagi|tengahari|petang|malam/, meridiemHour: function (hour, meridiem) { if (hour === 12) { hour = 0; } if (meridiem === 'pagi') { return hour; } else if (meridiem === 'tengahari') { return hour >= 11 ? hour : hour + 12; } else if (meridiem === 'petang' || meridiem === 'malam') { return hour + 12; } }, meridiem : function (hours, minutes, isLower) { if (hours < 11) { return 'pagi'; } else if (hours < 15) { return 'tengahari'; } else if (hours < 19) { return 'petang'; } else { return 'malam'; } }, calendar : { sameDay : '[Hari ini pukul] LT', nextDay : '[Esok pukul] LT', nextWeek : 'dddd [pukul] LT', lastDay : '[Kelmarin pukul] LT', lastWeek : 'dddd [lepas pukul] LT', sameElse : 'L' }, relativeTime : { future : 'dalam %s', past : '%s yang lepas', s : 'beberapa saat', ss : '%d saat', m : 'seminit', mm : '%d minit', h : 'sejam', hh : '%d jam', d : 'sehari', dd : '%d hari', M : 'sebulan', MM : '%d bulan', y : 'setahun', yy : '%d tahun' }, week : { dow : 1, // Monday is the first day of the week. doy : 7 // The week that contains Jan 7th is the first week of the year. } }); return msMy; }))); /***/ }), /* 383 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var mt = moment.defineLocale('mt', { months : 'Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru'.split('_'), monthsShort : 'Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ'.split('_'), weekdays : 'Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt'.split('_'), weekdaysShort : 'Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib'.split('_'), weekdaysMin : 'Ħa_Tn_Tl_Er_Ħa_Ġi_Si'.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 : '[Illum fil-]LT', nextDay : '[Għada fil-]LT', nextWeek : 'dddd [fil-]LT', lastDay : '[Il-bieraħ fil-]LT', lastWeek : 'dddd [li għadda] [fil-]LT', sameElse : 'L' }, relativeTime : { future : 'f’ %s', past : '%s ilu', s : 'ftit sekondi', ss : '%d sekondi', m : 'minuta', mm : '%d minuti', h : 'siegħa', hh : '%d siegħat', d : 'ġurnata', dd : '%d ġranet', M : 'xahar', MM : '%d xhur', y : 'sena', yy : '%d sni' }, dayOfMonthOrdinalParse : /\d{1,2}º/, ordinal: '%dº', 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 mt; }))); /***/ }), /* 384 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var symbolMap = { '1': '၁', '2': '၂', '3': '၃', '4': '၄', '5': '၅', '6': '၆', '7': '၇', '8': '၈', '9': '၉', '0': '၀' }, numberMap = { '၁': '1', '၂': '2', '၃': '3', '၄': '4', '၅': '5', '၆': '6', '၇': '7', '၈': '8', '၉': '9', '၀': '0' }; var my = moment.defineLocale('my', { months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split('_'), monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'), weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split('_'), weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'), weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.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: '[ယနေ.] LT [မှာ]', nextDay: '[မနက်ဖြန်] LT [မှာ]', nextWeek: 'dddd LT [မှာ]', lastDay: '[မနေ.က] LT [မှာ]', lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]', sameElse: 'L' }, relativeTime: { future: 'လာမည့် %s မှာ', past: 'လွန်ခဲ့သော %s က', s: 'စက္ကန်.အနည်းငယ်', ss : '%d စက္ကန့်', m: 'တစ်မိနစ်', mm: '%d မိနစ်', h: 'တစ်နာရီ', hh: '%d နာရီ', d: 'တစ်ရက်', dd: '%d ရက်', M: 'တစ်လ', MM: '%d လ', y: 'တစ်နှစ်', yy: '%d နှစ်' }, preparse: function (string) { return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) { return numberMap[match]; }); }, postformat: function (string) { return string.replace(/\d/g, function (match) { return symbolMap[match]; }); }, 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 my; }))); /***/ }), /* 385 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var nb = moment.defineLocale('nb', { months : 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'), monthsShort : 'jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.'.split('_'), monthsParseExact : true, weekdays : 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'), weekdaysShort : 'sø._ma._ti._on._to._fr._lø.'.split('_'), weekdaysMin : 'sø_ma_ti_on_to_fr_lø'.split('_'), weekdaysParseExact : true, longDateFormat : { LT : 'HH:mm', LTS : 'HH:mm:ss', L : 'DD.MM.YYYY', LL : 'D. MMMM YYYY', LLL : 'D. MMMM YYYY [kl.] HH:mm', LLLL : 'dddd D. MMMM YYYY [kl.] HH:mm' }, calendar : { sameDay: '[i dag kl.] LT', nextDay: '[i morgen kl.] LT', nextWeek: 'dddd [kl.] LT', lastDay: '[i går kl.] LT', lastWeek: '[forrige] dddd [kl.] LT', sameElse: 'L' }, relativeTime : { future : 'om %s', past : '%s siden', s : 'noen sekunder', ss : '%d sekunder', m : 'ett minutt', mm : '%d minutter', h : 'en time', hh : '%d timer', d : 'en dag', dd : '%d dager', M : 'en måned', MM : '%d måneder', y : 'ett år', yy : '%d år' }, dayOfMonthOrdinalParse: /\d{1,2}\./, ordinal : '%d.', 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 nb; }))); /***/ }), /* 386 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var symbolMap = { '1': '१', '2': '२', '3': '३', '4': '४', '5': '५', '6': '६', '7': '७', '8': '८', '9': '९', '0': '०' }, numberMap = { '१': '1', '२': '2', '३': '3', '४': '4', '५': '5', '६': '6', '७': '7', '८': '8', '९': '9', '०': '0' }; var ne = moment.defineLocale('ne', { months : 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split('_'), monthsShort : 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split('_'), monthsParseExact : true, weekdays : 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split('_'), weekdaysShort : 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'), weekdaysMin : 'आ._सो._मं._बु._बि._शु._श.'.split('_'), weekdaysParseExact : true, longDateFormat : { LT : 'Aको h:mm बजे', LTS : 'Aको h:mm:ss बजे', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY, Aको h:mm बजे', LLLL : 'dddd, D MMMM YYYY, Aको h:mm बजे' }, preparse: function (string) { return string.replace(/[१२३४५६७८९०]/g, function (match) { return numberMap[match]; }); }, postformat: function (string) { return string.replace(/\d/g, function (match) { return symbolMap[match]; }); }, meridiemParse: /राति|बिहान|दिउँसो|साँझ/, meridiemHour : function (hour, meridiem) { if (hour === 12) { hour = 0; } if (meridiem === 'राति') { return hour < 4 ? hour : hour + 12; } else if (meridiem === 'बिहान') { return hour; } else if (meridiem === 'दिउँसो') { return hour >= 10 ? hour : hour + 12; } else if (meridiem === 'साँझ') { return hour + 12; } }, meridiem : function (hour, minute, isLower) { if (hour < 3) { return 'राति'; } else if (hour < 12) { return 'बिहान'; } else if (hour < 16) { return 'दिउँसो'; } else if (hour < 20) { return 'साँझ'; } else { return 'राति'; } }, calendar : { sameDay : '[आज] LT', nextDay : '[भोलि] LT', nextWeek : '[आउँदो] dddd[,] LT', lastDay : '[हिजो] LT', lastWeek : '[गएको] dddd[,] LT', sameElse : 'L' }, relativeTime : { future : '%sमा', past : '%s अगाडि', s : 'केही क्षण', ss : '%d सेकेण्ड', m : 'एक मिनेट', mm : '%d मिनेट', h : 'एक घण्टा', hh : '%d घण्टा', d : 'एक दिन', dd : '%d दिन', M : 'एक महिना', MM : '%d महिना', y : 'एक बर्ष', yy : '%d बर्ष' }, week : { dow : 0, // Sunday is the first day of the week. doy : 6 // The week that contains Jan 6th is the first week of the year. } }); return ne; }))); /***/ }), /* 387 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'), monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'); var monthsParse = [/^jan/i, /^feb/i, /^maart|mrt.?$/i, /^apr/i, /^mei$/i, /^jun[i.]?$/i, /^jul[i.]?$/i, /^aug/i, /^sep/i, /^okt/i, /^nov/i, /^dec/i]; var monthsRegex = /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i; var nl = moment.defineLocale('nl', { months : 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'), monthsShort : function (m, format) { if (!m) { return monthsShortWithDots; } else if (/-MMM-/.test(format)) { return monthsShortWithoutDots[m.month()]; } else { return monthsShortWithDots[m.month()]; } }, monthsRegex: monthsRegex, monthsShortRegex: monthsRegex, monthsStrictRegex: /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i, monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i, monthsParse : monthsParse, longMonthsParse : monthsParse, shortMonthsParse : monthsParse, weekdays : 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'), weekdaysShort : 'zo._ma._di._wo._do._vr._za.'.split('_'), weekdaysMin : 'zo_ma_di_wo_do_vr_za'.split('_'), weekdaysParseExact : true, 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: '[vandaag om] LT', nextDay: '[morgen om] LT', nextWeek: 'dddd [om] LT', lastDay: '[gisteren om] LT', lastWeek: '[afgelopen] dddd [om] LT', sameElse: 'L' }, relativeTime : { future : 'over %s', past : '%s geleden', s : 'een paar seconden', ss : '%d seconden', m : 'één minuut', mm : '%d minuten', h : 'één uur', hh : '%d uur', d : 'één dag', dd : '%d dagen', M : 'één maand', MM : '%d maanden', y : 'één jaar', yy : '%d jaar' }, dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, ordinal : function (number) { return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); }, 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 nl; }))); /***/ }), /* 388 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var monthsShortWithDots = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'), monthsShortWithoutDots = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'); var monthsParse = [/^jan/i, /^feb/i, /^maart|mrt.?$/i, /^apr/i, /^mei$/i, /^jun[i.]?$/i, /^jul[i.]?$/i, /^aug/i, /^sep/i, /^okt/i, /^nov/i, /^dec/i]; var monthsRegex = /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i; var nlBe = moment.defineLocale('nl-be', { months : 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'), monthsShort : function (m, format) { if (!m) { return monthsShortWithDots; } else if (/-MMM-/.test(format)) { return monthsShortWithoutDots[m.month()]; } else { return monthsShortWithDots[m.month()]; } }, monthsRegex: monthsRegex, monthsShortRegex: monthsRegex, monthsStrictRegex: /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i, monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i, monthsParse : monthsParse, longMonthsParse : monthsParse, shortMonthsParse : monthsParse, weekdays : 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'), weekdaysShort : 'zo._ma._di._wo._do._vr._za.'.split('_'), weekdaysMin : 'zo_ma_di_wo_do_vr_za'.split('_'), weekdaysParseExact : true, 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: '[vandaag om] LT', nextDay: '[morgen om] LT', nextWeek: 'dddd [om] LT', lastDay: '[gisteren om] LT', lastWeek: '[afgelopen] dddd [om] LT', sameElse: 'L' }, relativeTime : { future : 'over %s', past : '%s geleden', s : 'een paar seconden', ss : '%d seconden', m : 'één minuut', mm : '%d minuten', h : 'één uur', hh : '%d uur', d : 'één dag', dd : '%d dagen', M : 'één maand', MM : '%d maanden', y : 'één jaar', yy : '%d jaar' }, dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, ordinal : function (number) { return number + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de'); }, 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 nlBe; }))); /***/ }), /* 389 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var nn = moment.defineLocale('nn', { months : 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split('_'), monthsShort : 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'), weekdays : 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'), weekdaysShort : 'sun_mån_tys_ons_tor_fre_lau'.split('_'), weekdaysMin : 'su_må_ty_on_to_fr_lø'.split('_'), longDateFormat : { LT : 'HH:mm', LTS : 'HH:mm:ss', L : 'DD.MM.YYYY', LL : 'D. MMMM YYYY', LLL : 'D. MMMM YYYY [kl.] H:mm', LLLL : 'dddd D. MMMM YYYY [kl.] HH:mm' }, calendar : { sameDay: '[I dag klokka] LT', nextDay: '[I morgon klokka] LT', nextWeek: 'dddd [klokka] LT', lastDay: '[I går klokka] LT', lastWeek: '[Føregåande] dddd [klokka] LT', sameElse: 'L' }, relativeTime : { future : 'om %s', past : '%s sidan', s : 'nokre sekund', ss : '%d sekund', m : 'eit minutt', mm : '%d minutt', h : 'ein time', hh : '%d timar', d : 'ein dag', dd : '%d dagar', M : 'ein månad', MM : '%d månader', y : 'eit år', yy : '%d år' }, dayOfMonthOrdinalParse: /\d{1,2}\./, ordinal : '%d.', 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 nn; }))); /***/ }), /* 390 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var symbolMap = { '1': '੧', '2': '੨', '3': '੩', '4': '੪', '5': '੫', '6': '੬', '7': '੭', '8': '੮', '9': '੯', '0': '੦' }, numberMap = { '੧': '1', '੨': '2', '੩': '3', '੪': '4', '੫': '5', '੬': '6', '੭': '7', '੮': '8', '੯': '9', '੦': '0' }; var paIn = moment.defineLocale('pa-in', { // There are months name as per Nanakshahi Calendar but they are not used as rigidly in modern Punjabi. months : 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split('_'), monthsShort : 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split('_'), weekdays : 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split('_'), weekdaysShort : 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'), weekdaysMin : 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'), longDateFormat : { LT : 'A h:mm ਵਜੇ', LTS : 'A h:mm:ss ਵਜੇ', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY, A h:mm ਵਜੇ', LLLL : 'dddd, D MMMM YYYY, A h:mm ਵਜੇ' }, calendar : { sameDay : '[ਅਜ] LT', nextDay : '[ਕਲ] LT', nextWeek : '[ਅਗਲਾ] dddd, LT', lastDay : '[ਕਲ] LT', lastWeek : '[ਪਿਛਲੇ] dddd, LT', sameElse : 'L' }, relativeTime : { future : '%s ਵਿੱਚ', past : '%s ਪਿਛਲੇ', s : 'ਕੁਝ ਸਕਿੰਟ', ss : '%d ਸਕਿੰਟ', m : 'ਇਕ ਮਿੰਟ', mm : '%d ਮਿੰਟ', h : 'ਇੱਕ ਘੰਟਾ', hh : '%d ਘੰਟੇ', d : 'ਇੱਕ ਦਿਨ', dd : '%d ਦਿਨ', M : 'ਇੱਕ ਮਹੀਨਾ', MM : '%d ਮਹੀਨੇ', y : 'ਇੱਕ ਸਾਲ', yy : '%d ਸਾਲ' }, preparse: function (string) { return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) { return numberMap[match]; }); }, postformat: function (string) { return string.replace(/\d/g, function (match) { return symbolMap[match]; }); }, // Punjabi notation for meridiems are quite fuzzy in practice. While there exists // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi. meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/, meridiemHour : function (hour, meridiem) { if (hour === 12) { hour = 0; } if (meridiem === 'ਰਾਤ') { return hour < 4 ? hour : hour + 12; } else if (meridiem === 'ਸਵੇਰ') { return hour; } else if (meridiem === 'ਦੁਪਹਿਰ') { return hour >= 10 ? hour : hour + 12; } else if (meridiem === 'ਸ਼ਾਮ') { return hour + 12; } }, meridiem : function (hour, minute, isLower) { if (hour < 4) { return 'ਰਾਤ'; } else if (hour < 10) { return 'ਸਵੇਰ'; } else if (hour < 17) { return 'ਦੁਪਹਿਰ'; } else if (hour < 20) { return 'ਸ਼ਾਮ'; } else { return 'ਰਾਤ'; } }, week : { dow : 0, // Sunday is the first day of the week. doy : 6 // The week that contains Jan 6th is the first week of the year. } }); return paIn; }))); /***/ }), /* 391 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var monthsNominative = 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split('_'), monthsSubjective = 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split('_'); function plural(n) { return (n % 10 < 5) && (n % 10 > 1) && ((~~(n / 10) % 10) !== 1); } function translate(number, withoutSuffix, key) { var result = number + ' '; switch (key) { case 'ss': return result + (plural(number) ? 'sekundy' : 'sekund'); case 'm': return withoutSuffix ? 'minuta' : 'minutę'; case 'mm': return result + (plural(number) ? 'minuty' : 'minut'); case 'h': return withoutSuffix ? 'godzina' : 'godzinę'; case 'hh': return result + (plural(number) ? 'godziny' : 'godzin'); case 'MM': return result + (plural(number) ? 'miesiące' : 'miesięcy'); case 'yy': return result + (plural(number) ? 'lata' : 'lat'); } } var pl = moment.defineLocale('pl', { months : function (momentToFormat, format) { if (!momentToFormat) { return monthsNominative; } else if (format === '') { // Hack: if format empty we know this is used to generate // RegExp by moment. Give then back both valid forms of months // in RegExp ready format. return '(' + monthsSubjective[momentToFormat.month()] + '|' + monthsNominative[momentToFormat.month()] + ')'; } else if (/D MMMM/.test(format)) { return monthsSubjective[momentToFormat.month()]; } else { return monthsNominative[momentToFormat.month()]; } }, monthsShort : 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'), weekdays : 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'), weekdaysShort : 'ndz_pon_wt_śr_czw_pt_sob'.split('_'), weekdaysMin : 'Nd_Pn_Wt_Śr_Cz_Pt_So'.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: '[Dziś o] LT', nextDay: '[Jutro o] LT', nextWeek: function () { switch (this.day()) { case 0: return '[W niedzielę o] LT'; case 2: return '[We wtorek o] LT'; case 3: return '[W środę o] LT'; case 6: return '[W sobotę o] LT'; default: return '[W] dddd [o] LT'; } }, lastDay: '[Wczoraj o] LT', lastWeek: function () { switch (this.day()) { case 0: return '[W zeszłą niedzielę o] LT'; case 3: return '[W zeszłą środę o] LT'; case 6: return '[W zeszłą sobotę o] LT'; default: return '[W zeszły] dddd [o] LT'; } }, sameElse: 'L' }, relativeTime : { future : 'za %s', past : '%s temu', s : 'kilka sekund', ss : translate, m : translate, mm : translate, h : translate, hh : translate, d : '1 dzień', dd : '%d dni', M : 'miesiąc', MM : translate, y : 'rok', yy : translate }, dayOfMonthOrdinalParse: /\d{1,2}\./, ordinal : '%d.', 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 pl; }))); /***/ }), /* 392 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var pt = moment.defineLocale('pt', { months : 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split('_'), monthsShort : 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'), weekdays : 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split('_'), weekdaysShort : 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'), weekdaysMin : 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'), weekdaysParseExact : true, longDateFormat : { LT : 'HH:mm', LTS : 'HH:mm:ss', L : 'DD/MM/YYYY', LL : 'D [de] MMMM [de] YYYY', LLL : 'D [de] MMMM [de] YYYY HH:mm', LLLL : 'dddd, D [de] MMMM [de] YYYY HH:mm' }, calendar : { sameDay: '[Hoje às] LT', nextDay: '[Amanhã às] LT', nextWeek: 'dddd [às] LT', lastDay: '[Ontem às] LT', lastWeek: function () { return (this.day() === 0 || this.day() === 6) ? '[Último] dddd [às] LT' : // Saturday + Sunday '[Última] dddd [às] LT'; // Monday - Friday }, sameElse: 'L' }, relativeTime : { future : 'em %s', past : 'há %s', s : 'segundos', ss : '%d segundos', m : 'um minuto', mm : '%d minutos', h : 'uma hora', hh : '%d horas', d : 'um dia', dd : '%d dias', M : 'um mês', MM : '%d meses', y : 'um ano', yy : '%d anos' }, dayOfMonthOrdinalParse: /\d{1,2}º/, ordinal : '%dº', 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 pt; }))); /***/ }), /* 393 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var ptBr = moment.defineLocale('pt-br', { months : 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split('_'), monthsShort : 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'), weekdays : 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split('_'), weekdaysShort : 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'), weekdaysMin : 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'), weekdaysParseExact : true, longDateFormat : { LT : 'HH:mm', LTS : 'HH:mm:ss', L : 'DD/MM/YYYY', LL : 'D [de] MMMM [de] YYYY', LLL : 'D [de] MMMM [de] YYYY [às] HH:mm', LLLL : 'dddd, D [de] MMMM [de] YYYY [às] HH:mm' }, calendar : { sameDay: '[Hoje às] LT', nextDay: '[Amanhã às] LT', nextWeek: 'dddd [às] LT', lastDay: '[Ontem às] LT', lastWeek: function () { return (this.day() === 0 || this.day() === 6) ? '[Último] dddd [às] LT' : // Saturday + Sunday '[Última] dddd [às] LT'; // Monday - Friday }, sameElse: 'L' }, relativeTime : { future : 'em %s', past : 'há %s', s : 'poucos segundos', ss : '%d segundos', m : 'um minuto', mm : '%d minutos', h : 'uma hora', hh : '%d horas', d : 'um dia', dd : '%d dias', M : 'um mês', MM : '%d meses', y : 'um ano', yy : '%d anos' }, dayOfMonthOrdinalParse: /\d{1,2}º/, ordinal : '%dº' }); return ptBr; }))); /***/ }), /* 394 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; function relativeTimeWithPlural(number, withoutSuffix, key) { var format = { 'ss': 'secunde', 'mm': 'minute', 'hh': 'ore', 'dd': 'zile', 'MM': 'luni', 'yy': 'ani' }, separator = ' '; if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) { separator = ' de '; } return number + separator + format[key]; } var ro = moment.defineLocale('ro', { months : 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split('_'), monthsShort : 'ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split('_'), monthsParseExact: true, weekdays : 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'), weekdaysShort : 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'), weekdaysMin : 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'), longDateFormat : { LT : 'H:mm', LTS : 'H:mm:ss', L : 'DD.MM.YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY H:mm', LLLL : 'dddd, D MMMM YYYY H:mm' }, calendar : { sameDay: '[azi la] LT', nextDay: '[mâine la] LT', nextWeek: 'dddd [la] LT', lastDay: '[ieri la] LT', lastWeek: '[fosta] dddd [la] LT', sameElse: 'L' }, relativeTime : { future : 'peste %s', past : '%s în urmă', s : 'câteva secunde', ss : relativeTimeWithPlural, m : 'un minut', mm : relativeTimeWithPlural, h : 'o oră', hh : relativeTimeWithPlural, d : 'o zi', dd : relativeTimeWithPlural, M : 'o lună', MM : relativeTimeWithPlural, y : 'un an', yy : relativeTimeWithPlural }, week : { dow : 1, // Monday is the first day of the week. doy : 7 // The week that contains Jan 7th is the first week of the year. } }); return ro; }))); /***/ }), /* 395 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; function plural(word, num) { var forms = word.split('_'); return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]); } function relativeTimeWithPlural(number, withoutSuffix, key) { var format = { 'ss': withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд', 'mm': withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут', 'hh': 'час_часа_часов', 'dd': 'день_дня_дней', 'MM': 'месяц_месяца_месяцев', 'yy': 'год_года_лет' }; if (key === 'm') { return withoutSuffix ? 'минута' : 'минуту'; } else { return number + ' ' + plural(format[key], +number); } } var monthsParse = [/^янв/i, /^фев/i, /^мар/i, /^апр/i, /^ма[йя]/i, /^июн/i, /^июл/i, /^авг/i, /^сен/i, /^окт/i, /^ноя/i, /^дек/i]; // http://new.gramota.ru/spravka/rules/139-prop : § 103 // Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637 // CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753 var ru = moment.defineLocale('ru', { months : { format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split('_'), standalone: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_') }, monthsShort : { // по CLDR именно "июл." и "июн.", но какой смысл менять букву на точку ? format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split('_'), standalone: 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split('_') }, weekdays : { standalone: 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split('_'), format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split('_'), isFormat: /\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/ }, weekdaysShort : 'вс_пн_вт_ср_чт_пт_сб'.split('_'), weekdaysMin : 'вс_пн_вт_ср_чт_пт_сб'.split('_'), monthsParse : monthsParse, longMonthsParse : monthsParse, shortMonthsParse : monthsParse, // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки monthsRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i, // копия предыдущего monthsShortRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i, // полные названия с падежами monthsStrictRegex: /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i, // Выражение, которое соотвествует только сокращённым формам monthsShortStrictRegex: /^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i, longDateFormat : { LT : 'H:mm', LTS : 'H:mm:ss', L : 'DD.MM.YYYY', LL : 'D MMMM YYYY г.', LLL : 'D MMMM YYYY г., H:mm', LLLL : 'dddd, D MMMM YYYY г., H:mm' }, calendar : { sameDay: '[Сегодня, в] LT', nextDay: '[Завтра, в] LT', lastDay: '[Вчера, в] LT', nextWeek: function (now) { if (now.week() !== this.week()) { switch (this.day()) { case 0: return '[В следующее] dddd, [в] LT'; case 1: case 2: case 4: return '[В следующий] dddd, [в] LT'; case 3: case 5: case 6: return '[В следующую] dddd, [в] LT'; } } else { if (this.day() === 2) { return '[Во] dddd, [в] LT'; } else { return '[В] dddd, [в] LT'; } } }, lastWeek: function (now) { if (now.week() !== this.week()) { switch (this.day()) { case 0: return '[В прошлое] dddd, [в] LT'; case 1: case 2: case 4: return '[В прошлый] dddd, [в] LT'; case 3: case 5: case 6: return '[В прошлую] dddd, [в] LT'; } } else { if (this.day() === 2) { return '[Во] dddd, [в] LT'; } else { return '[В] dddd, [в] LT'; } } }, sameElse: 'L' }, relativeTime : { future : 'через %s', past : '%s назад', s : 'несколько секунд', ss : relativeTimeWithPlural, m : relativeTimeWithPlural, mm : relativeTimeWithPlural, h : 'час', hh : relativeTimeWithPlural, d : 'день', dd : relativeTimeWithPlural, M : 'месяц', MM : relativeTimeWithPlural, y : 'год', yy : relativeTimeWithPlural }, meridiemParse: /ночи|утра|дня|вечера/i, isPM : function (input) { return /^(дня|вечера)$/.test(input); }, meridiem : function (hour, minute, isLower) { if (hour < 4) { return 'ночи'; } else if (hour < 12) { return 'утра'; } else if (hour < 17) { return 'дня'; } else { return 'вечера'; } }, dayOfMonthOrdinalParse: /\d{1,2}-(й|го|я)/, ordinal: function (number, period) { switch (period) { case 'M': case 'd': case 'DDD': return number + '-й'; case 'D': return number + '-го'; case 'w': case 'W': return number + '-я'; default: return number; } }, 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 ru; }))); /***/ }), /* 396 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var months = [ 'جنوري', 'فيبروري', 'مارچ', 'اپريل', 'مئي', 'جون', 'جولاءِ', 'آگسٽ', 'سيپٽمبر', 'آڪٽوبر', 'نومبر', 'ڊسمبر' ]; var days = [ 'آچر', 'سومر', 'اڱارو', 'اربع', 'خميس', 'جمع', 'ڇنڇر' ]; var sd = moment.defineLocale('sd', { months : months, monthsShort : months, weekdays : days, weekdaysShort : days, weekdaysMin : days, 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' }, meridiemParse: /صبح|شام/, isPM : function (input) { return 'شام' === input; }, meridiem : function (hour, minute, isLower) { if (hour < 12) { return 'صبح'; } return 'شام'; }, calendar : { sameDay : '[اڄ] LT', nextDay : '[سڀاڻي] LT', nextWeek : 'dddd [اڳين هفتي تي] LT', lastDay : '[ڪالهه] LT', lastWeek : '[گزريل هفتي] dddd [تي] LT', sameElse : 'L' }, relativeTime : { future : '%s پوء', past : '%s اڳ', s : 'چند سيڪنڊ', ss : '%d سيڪنڊ', m : 'هڪ منٽ', mm : '%d منٽ', h : 'هڪ ڪلاڪ', hh : '%d ڪلاڪ', d : 'هڪ ڏينهن', dd : '%d ڏينهن', M : 'هڪ مهينو', MM : '%d مهينا', y : 'هڪ سال', yy : '%d سال' }, preparse: function (string) { return string.replace(/،/g, ','); }, postformat: function (string) { return string.replace(/,/g, '،'); }, 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 sd; }))); /***/ }), /* 397 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var se = moment.defineLocale('se', { months : 'ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split('_'), monthsShort : 'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split('_'), weekdays : 'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split('_'), weekdaysShort : 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'), weekdaysMin : 's_v_m_g_d_b_L'.split('_'), longDateFormat : { LT : 'HH:mm', LTS : 'HH:mm:ss', L : 'DD.MM.YYYY', LL : 'MMMM D. [b.] YYYY', LLL : 'MMMM D. [b.] YYYY [ti.] HH:mm', LLLL : 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm' }, calendar : { sameDay: '[otne ti] LT', nextDay: '[ihttin ti] LT', nextWeek: 'dddd [ti] LT', lastDay: '[ikte ti] LT', lastWeek: '[ovddit] dddd [ti] LT', sameElse: 'L' }, relativeTime : { future : '%s geažes', past : 'maŋit %s', s : 'moadde sekunddat', ss: '%d sekunddat', m : 'okta minuhta', mm : '%d minuhtat', h : 'okta diimmu', hh : '%d diimmut', d : 'okta beaivi', dd : '%d beaivvit', M : 'okta mánnu', MM : '%d mánut', y : 'okta jahki', yy : '%d jagit' }, dayOfMonthOrdinalParse: /\d{1,2}\./, ordinal : '%d.', 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 se; }))); /***/ }), /* 398 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; /*jshint -W100*/ var si = moment.defineLocale('si', { months : 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split('_'), monthsShort : 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split('_'), weekdays : 'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split('_'), weekdaysShort : 'ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන'.split('_'), weekdaysMin : 'ඉ_ස_අ_බ_බ්‍ර_සි_සෙ'.split('_'), weekdaysParseExact : true, longDateFormat : { LT : 'a h:mm', LTS : 'a h:mm:ss', L : 'YYYY/MM/DD', LL : 'YYYY MMMM D', LLL : 'YYYY MMMM D, a h:mm', LLLL : 'YYYY MMMM D [වැනි] dddd, a h:mm:ss' }, calendar : { sameDay : '[අද] LT[ට]', nextDay : '[හෙට] LT[ට]', nextWeek : 'dddd LT[ට]', lastDay : '[ඊයේ] LT[ට]', lastWeek : '[පසුගිය] dddd LT[ට]', sameElse : 'L' }, relativeTime : { future : '%sකින්', past : '%sකට පෙර', s : 'තත්පර කිහිපය', ss : 'තත්පර %d', m : 'මිනිත්තුව', mm : 'මිනිත්තු %d', h : 'පැය', hh : 'පැය %d', d : 'දිනය', dd : 'දින %d', M : 'මාසය', MM : 'මාස %d', y : 'වසර', yy : 'වසර %d' }, dayOfMonthOrdinalParse: /\d{1,2} වැනි/, ordinal : function (number) { return number + ' වැනි'; }, meridiemParse : /පෙර වරු|පස් වරු|පෙ.ව|ප.ව./, isPM : function (input) { return input === 'ප.ව.' || input === 'පස් වරු'; }, meridiem : function (hours, minutes, isLower) { if (hours > 11) { return isLower ? 'ප.ව.' : 'පස් වරු'; } else { return isLower ? 'පෙ.ව.' : 'පෙර වරු'; } } }); return si; }))); /***/ }), /* 399 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var months = 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split('_'), monthsShort = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_'); function plural(n) { return (n > 1) && (n < 5); } function translate(number, withoutSuffix, key, isFuture) { var result = number + ' '; switch (key) { case 's': // a few seconds / in a few seconds / a few seconds ago return (withoutSuffix || isFuture) ? 'pár sekúnd' : 'pár sekundami'; case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago if (withoutSuffix || isFuture) { return result + (plural(number) ? 'sekundy' : 'sekúnd'); } else { return result + 'sekundami'; } break; case 'm': // a minute / in a minute / a minute ago return withoutSuffix ? 'minúta' : (isFuture ? 'minútu' : 'minútou'); case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago if (withoutSuffix || isFuture) { return result + (plural(number) ? 'minúty' : 'minút'); } else { return result + 'minútami'; } break; case 'h': // an hour / in an hour / an hour ago return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou'); case 'hh': // 9 hours / in 9 hours / 9 hours ago if (withoutSuffix || isFuture) { return result + (plural(number) ? 'hodiny' : 'hodín'); } else { return result + 'hodinami'; } break; case 'd': // a day / in a day / a day ago return (withoutSuffix || isFuture) ? 'deň' : 'dňom'; case 'dd': // 9 days / in 9 days / 9 days ago if (withoutSuffix || isFuture) { return result + (plural(number) ? 'dni' : 'dní'); } else { return result + 'dňami'; } break; case 'M': // a month / in a month / a month ago return (withoutSuffix || isFuture) ? 'mesiac' : 'mesiacom'; case 'MM': // 9 months / in 9 months / 9 months ago if (withoutSuffix || isFuture) { return result + (plural(number) ? 'mesiace' : 'mesiacov'); } else { return result + 'mesiacmi'; } break; case 'y': // a year / in a year / a year ago return (withoutSuffix || isFuture) ? 'rok' : 'rokom'; case 'yy': // 9 years / in 9 years / 9 years ago if (withoutSuffix || isFuture) { return result + (plural(number) ? 'roky' : 'rokov'); } else { return result + 'rokmi'; } break; } } var sk = moment.defineLocale('sk', { months : months, monthsShort : monthsShort, weekdays : 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'), weekdaysShort : 'ne_po_ut_st_št_pi_so'.split('_'), weekdaysMin : 'ne_po_ut_st_št_pi_so'.split('_'), longDateFormat : { LT: 'H:mm', LTS : 'H:mm:ss', L : 'DD.MM.YYYY', LL : 'D. MMMM YYYY', LLL : 'D. MMMM YYYY H:mm', LLLL : 'dddd D. MMMM YYYY H:mm' }, calendar : { sameDay: '[dnes o] LT', nextDay: '[zajtra o] LT', nextWeek: function () { switch (this.day()) { case 0: return '[v nedeľu o] LT'; case 1: case 2: return '[v] dddd [o] LT'; case 3: return '[v stredu o] LT'; case 4: return '[vo štvrtok o] LT'; case 5: return '[v piatok o] LT'; case 6: return '[v sobotu o] LT'; } }, lastDay: '[včera o] LT', lastWeek: function () { switch (this.day()) { case 0: return '[minulú nedeľu o] LT'; case 1: case 2: return '[minulý] dddd [o] LT'; case 3: return '[minulú stredu o] LT'; case 4: case 5: return '[minulý] dddd [o] LT'; case 6: return '[minulú sobotu o] LT'; } }, sameElse: 'L' }, relativeTime : { future : 'za %s', past : 'pred %s', s : translate, ss : translate, m : translate, mm : translate, h : translate, hh : translate, d : translate, dd : translate, M : translate, MM : translate, y : translate, yy : translate }, dayOfMonthOrdinalParse: /\d{1,2}\./, ordinal : '%d.', 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 sk; }))); /***/ }), /* 400 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; function processRelativeTime(number, withoutSuffix, key, isFuture) { var result = number + ' '; switch (key) { case 's': return withoutSuffix || isFuture ? 'nekaj sekund' : 'nekaj sekundami'; case 'ss': if (number === 1) { result += withoutSuffix ? 'sekundo' : 'sekundi'; } else if (number === 2) { result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah'; } else if (number < 5) { result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah'; } else { result += 'sekund'; } return result; case 'm': return withoutSuffix ? 'ena minuta' : 'eno minuto'; case 'mm': if (number === 1) { result += withoutSuffix ? 'minuta' : 'minuto'; } else if (number === 2) { result += withoutSuffix || isFuture ? 'minuti' : 'minutama'; } else if (number < 5) { result += withoutSuffix || isFuture ? 'minute' : 'minutami'; } else { result += withoutSuffix || isFuture ? 'minut' : 'minutami'; } return result; case 'h': return withoutSuffix ? 'ena ura' : 'eno uro'; case 'hh': if (number === 1) { result += withoutSuffix ? 'ura' : 'uro'; } else if (number === 2) { result += withoutSuffix || isFuture ? 'uri' : 'urama'; } else if (number < 5) { result += withoutSuffix || isFuture ? 'ure' : 'urami'; } else { result += withoutSuffix || isFuture ? 'ur' : 'urami'; } return result; case 'd': return withoutSuffix || isFuture ? 'en dan' : 'enim dnem'; case 'dd': if (number === 1) { result += withoutSuffix || isFuture ? 'dan' : 'dnem'; } else if (number === 2) { result += withoutSuffix || isFuture ? 'dni' : 'dnevoma'; } else { result += withoutSuffix || isFuture ? 'dni' : 'dnevi'; } return result; case 'M': return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem'; case 'MM': if (number === 1) { result += withoutSuffix || isFuture ? 'mesec' : 'mesecem'; } else if (number === 2) { result += withoutSuffix || isFuture ? 'meseca' : 'mesecema'; } else if (number < 5) { result += withoutSuffix || isFuture ? 'mesece' : 'meseci'; } else { result += withoutSuffix || isFuture ? 'mesecev' : 'meseci'; } return result; case 'y': return withoutSuffix || isFuture ? 'eno leto' : 'enim letom'; case 'yy': if (number === 1) { result += withoutSuffix || isFuture ? 'leto' : 'letom'; } else if (number === 2) { result += withoutSuffix || isFuture ? 'leti' : 'letoma'; } else if (number < 5) { result += withoutSuffix || isFuture ? 'leta' : 'leti'; } else { result += withoutSuffix || isFuture ? 'let' : 'leti'; } return result; } } var sl = moment.defineLocale('sl', { months : 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split('_'), monthsShort : 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split('_'), monthsParseExact: true, weekdays : 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'), weekdaysShort : 'ned._pon._tor._sre._čet._pet._sob.'.split('_'), weekdaysMin : 'ne_po_to_sr_če_pe_so'.split('_'), weekdaysParseExact : true, longDateFormat : { LT : 'H:mm', LTS : 'H:mm:ss', L : 'DD.MM.YYYY', LL : 'D. MMMM YYYY', LLL : 'D. MMMM YYYY H:mm', LLLL : 'dddd, D. MMMM YYYY H:mm' }, calendar : { sameDay : '[danes ob] LT', nextDay : '[jutri ob] LT', nextWeek : function () { switch (this.day()) { case 0: return '[v] [nedeljo] [ob] LT'; case 3: return '[v] [sredo] [ob] LT'; case 6: return '[v] [soboto] [ob] LT'; case 1: case 2: case 4: case 5: return '[v] dddd [ob] LT'; } }, lastDay : '[včeraj ob] LT', lastWeek : function () { switch (this.day()) { case 0: return '[prejšnjo] [nedeljo] [ob] LT'; case 3: return '[prejšnjo] [sredo] [ob] LT'; case 6: return '[prejšnjo] [soboto] [ob] LT'; case 1: case 2: case 4: case 5: return '[prejšnji] dddd [ob] LT'; } }, sameElse : 'L' }, relativeTime : { future : 'čez %s', past : 'pred %s', s : processRelativeTime, ss : processRelativeTime, m : processRelativeTime, mm : processRelativeTime, h : processRelativeTime, hh : processRelativeTime, d : processRelativeTime, dd : processRelativeTime, M : processRelativeTime, MM : processRelativeTime, y : processRelativeTime, yy : processRelativeTime }, dayOfMonthOrdinalParse: /\d{1,2}\./, ordinal : '%d.', week : { dow : 1, // Monday is the first day of the week. doy : 7 // The week that contains Jan 7th is the first week of the year. } }); return sl; }))); /***/ }), /* 401 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var sq = moment.defineLocale('sq', { months : 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split('_'), monthsShort : 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'), weekdays : 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split('_'), weekdaysShort : 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'), weekdaysMin : 'D_H_Ma_Më_E_P_Sh'.split('_'), weekdaysParseExact : true, meridiemParse: /PD|MD/, isPM: function (input) { return input.charAt(0) === 'M'; }, meridiem : function (hours, minutes, isLower) { return hours < 12 ? 'PD' : 'MD'; }, 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 : '[Sot në] LT', nextDay : '[Nesër në] LT', nextWeek : 'dddd [në] LT', lastDay : '[Dje në] LT', lastWeek : 'dddd [e kaluar në] LT', sameElse : 'L' }, relativeTime : { future : 'në %s', past : '%s më parë', s : 'disa sekonda', ss : '%d sekonda', m : 'një minutë', mm : '%d minuta', h : 'një orë', hh : '%d orë', d : 'një ditë', dd : '%d ditë', M : 'një muaj', MM : '%d muaj', y : 'një vit', yy : '%d vite' }, dayOfMonthOrdinalParse: /\d{1,2}\./, ordinal : '%d.', 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 sq; }))); /***/ }), /* 402 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var translator = { words: { //Different grammatical cases ss: ['sekunda', 'sekunde', 'sekundi'], m: ['jedan minut', 'jedne minute'], mm: ['minut', 'minute', 'minuta'], h: ['jedan sat', 'jednog sata'], hh: ['sat', 'sata', 'sati'], dd: ['dan', 'dana', 'dana'], MM: ['mesec', 'meseca', 'meseci'], yy: ['godina', 'godine', 'godina'] }, correctGrammaticalCase: function (number, wordKey) { return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]); }, translate: function (number, withoutSuffix, key) { var wordKey = translator.words[key]; if (key.length === 1) { return withoutSuffix ? wordKey[0] : wordKey[1]; } else { return number + ' ' + translator.correctGrammaticalCase(number, wordKey); } } }; var sr = moment.defineLocale('sr', { months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split('_'), monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'), monthsParseExact: true, weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split('_'), weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'), weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'), weekdaysParseExact : true, longDateFormat: { LT: 'H:mm', LTS : 'H:mm:ss', L: 'DD.MM.YYYY', LL: 'D. MMMM YYYY', LLL: 'D. MMMM YYYY H:mm', LLLL: 'dddd, D. MMMM YYYY H:mm' }, calendar: { sameDay: '[danas u] LT', nextDay: '[sutra u] LT', nextWeek: function () { switch (this.day()) { case 0: return '[u] [nedelju] [u] LT'; case 3: return '[u] [sredu] [u] LT'; case 6: return '[u] [subotu] [u] LT'; case 1: case 2: case 4: case 5: return '[u] dddd [u] LT'; } }, lastDay : '[juče u] LT', lastWeek : function () { var lastWeekDays = [ '[prošle] [nedelje] [u] LT', '[prošlog] [ponedeljka] [u] LT', '[prošlog] [utorka] [u] LT', '[prošle] [srede] [u] LT', '[prošlog] [četvrtka] [u] LT', '[prošlog] [petka] [u] LT', '[prošle] [subote] [u] LT' ]; return lastWeekDays[this.day()]; }, sameElse : 'L' }, relativeTime : { future : 'za %s', past : 'pre %s', s : 'nekoliko sekundi', ss : translator.translate, m : translator.translate, mm : translator.translate, h : translator.translate, hh : translator.translate, d : 'dan', dd : translator.translate, M : 'mesec', MM : translator.translate, y : 'godinu', yy : translator.translate }, dayOfMonthOrdinalParse: /\d{1,2}\./, ordinal : '%d.', week : { dow : 1, // Monday is the first day of the week. doy : 7 // The week that contains Jan 7th is the first week of the year. } }); return sr; }))); /***/ }), /* 403 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var translator = { words: { //Different grammatical cases ss: ['секунда', 'секунде', 'секунди'], m: ['један минут', 'једне минуте'], mm: ['минут', 'минуте', 'минута'], h: ['један сат', 'једног сата'], hh: ['сат', 'сата', 'сати'], dd: ['дан', 'дана', 'дана'], MM: ['месец', 'месеца', 'месеци'], yy: ['година', 'године', 'година'] }, correctGrammaticalCase: function (number, wordKey) { return number === 1 ? wordKey[0] : (number >= 2 && number <= 4 ? wordKey[1] : wordKey[2]); }, translate: function (number, withoutSuffix, key) { var wordKey = translator.words[key]; if (key.length === 1) { return withoutSuffix ? wordKey[0] : wordKey[1]; } else { return number + ' ' + translator.correctGrammaticalCase(number, wordKey); } } }; var srCyrl = moment.defineLocale('sr-cyrl', { months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split('_'), monthsShort: 'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split('_'), monthsParseExact: true, weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'), weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'), weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'), weekdaysParseExact : true, longDateFormat: { LT: 'H:mm', LTS : 'H:mm:ss', L: 'DD.MM.YYYY', LL: 'D. MMMM YYYY', LLL: 'D. MMMM YYYY H:mm', LLLL: 'dddd, D. MMMM YYYY H:mm' }, calendar: { sameDay: '[данас у] LT', nextDay: '[сутра у] LT', nextWeek: function () { switch (this.day()) { case 0: return '[у] [недељу] [у] LT'; case 3: return '[у] [среду] [у] LT'; case 6: return '[у] [суботу] [у] LT'; case 1: case 2: case 4: case 5: return '[у] dddd [у] LT'; } }, lastDay : '[јуче у] LT', lastWeek : function () { var lastWeekDays = [ '[прошле] [недеље] [у] LT', '[прошлог] [понедељка] [у] LT', '[прошлог] [уторка] [у] LT', '[прошле] [среде] [у] LT', '[прошлог] [четвртка] [у] LT', '[прошлог] [петка] [у] LT', '[прошле] [суботе] [у] LT' ]; return lastWeekDays[this.day()]; }, sameElse : 'L' }, relativeTime : { future : 'за %s', past : 'пре %s', s : 'неколико секунди', ss : translator.translate, m : translator.translate, mm : translator.translate, h : translator.translate, hh : translator.translate, d : 'дан', dd : translator.translate, M : 'месец', MM : translator.translate, y : 'годину', yy : translator.translate }, dayOfMonthOrdinalParse: /\d{1,2}\./, ordinal : '%d.', week : { dow : 1, // Monday is the first day of the week. doy : 7 // The week that contains Jan 7th is the first week of the year. } }); return srCyrl; }))); /***/ }), /* 404 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var ss = moment.defineLocale('ss', { months : "Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split('_'), monthsShort : 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'), weekdays : 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split('_'), weekdaysShort : 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'), weekdaysMin : 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'), weekdaysParseExact : true, longDateFormat : { LT : 'h:mm A', LTS : 'h:mm:ss A', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY h:mm A', LLLL : 'dddd, D MMMM YYYY h:mm A' }, calendar : { sameDay : '[Namuhla nga] LT', nextDay : '[Kusasa nga] LT', nextWeek : 'dddd [nga] LT', lastDay : '[Itolo nga] LT', lastWeek : 'dddd [leliphelile] [nga] LT', sameElse : 'L' }, relativeTime : { future : 'nga %s', past : 'wenteka nga %s', s : 'emizuzwana lomcane', ss : '%d mzuzwana', m : 'umzuzu', mm : '%d emizuzu', h : 'lihora', hh : '%d emahora', d : 'lilanga', dd : '%d emalanga', M : 'inyanga', MM : '%d tinyanga', y : 'umnyaka', yy : '%d iminyaka' }, meridiemParse: /ekuseni|emini|entsambama|ebusuku/, meridiem : function (hours, minutes, isLower) { if (hours < 11) { return 'ekuseni'; } else if (hours < 15) { return 'emini'; } else if (hours < 19) { return 'entsambama'; } else { return 'ebusuku'; } }, meridiemHour : function (hour, meridiem) { if (hour === 12) { hour = 0; } if (meridiem === 'ekuseni') { return hour; } else if (meridiem === 'emini') { return hour >= 11 ? hour : hour + 12; } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') { if (hour === 0) { return 0; } return hour + 12; } }, dayOfMonthOrdinalParse: /\d{1,2}/, ordinal : '%d', 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 ss; }))); /***/ }), /* 405 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var sv = moment.defineLocale('sv', { months : 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split('_'), monthsShort : 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'), weekdays : 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'), weekdaysShort : 'sön_mån_tis_ons_tor_fre_lör'.split('_'), weekdaysMin : 'sö_må_ti_on_to_fr_lö'.split('_'), longDateFormat : { LT : 'HH:mm', LTS : 'HH:mm:ss', L : 'YYYY-MM-DD', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY [kl.] HH:mm', LLLL : 'dddd D MMMM YYYY [kl.] HH:mm', lll : 'D MMM YYYY HH:mm', llll : 'ddd D MMM YYYY HH:mm' }, calendar : { sameDay: '[Idag] LT', nextDay: '[Imorgon] LT', lastDay: '[Igår] LT', nextWeek: '[På] dddd LT', lastWeek: '[I] dddd[s] LT', sameElse: 'L' }, relativeTime : { future : 'om %s', past : 'för %s sedan', s : 'några sekunder', ss : '%d sekunder', m : 'en minut', mm : '%d minuter', h : 'en timme', hh : '%d timmar', d : 'en dag', dd : '%d dagar', M : 'en månad', MM : '%d månader', y : 'ett år', yy : '%d år' }, dayOfMonthOrdinalParse: /\d{1,2}(e|a)/, ordinal : function (number) { var b = number % 10, output = (~~(number % 100 / 10) === 1) ? 'e' : (b === 1) ? 'a' : (b === 2) ? 'a' : (b === 3) ? 'e' : 'e'; 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 sv; }))); /***/ }), /* 406 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var sw = moment.defineLocale('sw', { months : 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split('_'), monthsShort : 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'), weekdays : 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split('_'), weekdaysShort : 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'), weekdaysMin : 'J2_J3_J4_J5_Al_Ij_J1'.split('_'), weekdaysParseExact : true, 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 : '[leo saa] LT', nextDay : '[kesho saa] LT', nextWeek : '[wiki ijayo] dddd [saat] LT', lastDay : '[jana] LT', lastWeek : '[wiki iliyopita] dddd [saat] LT', sameElse : 'L' }, relativeTime : { future : '%s baadaye', past : 'tokea %s', s : 'hivi punde', ss : 'sekunde %d', m : 'dakika moja', mm : 'dakika %d', h : 'saa limoja', hh : 'masaa %d', d : 'siku moja', dd : 'masiku %d', M : 'mwezi mmoja', MM : 'miezi %d', y : 'mwaka mmoja', yy : 'miaka %d' }, week : { dow : 1, // Monday is the first day of the week. doy : 7 // The week that contains Jan 7th is the first week of the year. } }); return sw; }))); /***/ }), /* 407 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var symbolMap = { '1': '௧', '2': '௨', '3': '௩', '4': '௪', '5': '௫', '6': '௬', '7': '௭', '8': '௮', '9': '௯', '0': '௦' }, numberMap = { '௧': '1', '௨': '2', '௩': '3', '௪': '4', '௫': '5', '௬': '6', '௭': '7', '௮': '8', '௯': '9', '௦': '0' }; var ta = moment.defineLocale('ta', { months : 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split('_'), monthsShort : 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split('_'), weekdays : 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split('_'), weekdaysShort : 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split('_'), weekdaysMin : 'ஞா_தி_செ_பு_வி_வெ_ச'.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 : '[இன்று] LT', nextDay : '[நாளை] LT', nextWeek : 'dddd, LT', lastDay : '[நேற்று] LT', lastWeek : '[கடந்த வாரம்] dddd, LT', sameElse : 'L' }, relativeTime : { future : '%s இல்', past : '%s முன்', s : 'ஒரு சில விநாடிகள்', ss : '%d விநாடிகள்', m : 'ஒரு நிமிடம்', mm : '%d நிமிடங்கள்', h : 'ஒரு மணி நேரம்', hh : '%d மணி நேரம்', d : 'ஒரு நாள்', dd : '%d நாட்கள்', M : 'ஒரு மாதம்', MM : '%d மாதங்கள்', y : 'ஒரு வருடம்', yy : '%d ஆண்டுகள்' }, dayOfMonthOrdinalParse: /\d{1,2}வது/, ordinal : function (number) { return number + 'வது'; }, preparse: function (string) { return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) { return numberMap[match]; }); }, postformat: function (string) { return string.replace(/\d/g, function (match) { return symbolMap[match]; }); }, // refer http://ta.wikipedia.org/s/1er1 meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/, meridiem : function (hour, minute, isLower) { if (hour < 2) { return ' யாமம்'; } else if (hour < 6) { return ' வைகறை'; // வைகறை } else if (hour < 10) { return ' காலை'; // காலை } else if (hour < 14) { return ' நண்பகல்'; // நண்பகல் } else if (hour < 18) { return ' எற்பாடு'; // எற்பாடு } else if (hour < 22) { return ' மாலை'; // மாலை } else { return ' யாமம்'; } }, meridiemHour : function (hour, meridiem) { if (hour === 12) { hour = 0; } if (meridiem === 'யாமம்') { return hour < 2 ? hour : hour + 12; } else if (meridiem === 'வைகறை' || meridiem === 'காலை') { return hour; } else if (meridiem === 'நண்பகல்') { return hour >= 10 ? hour : hour + 12; } else { return hour + 12; } }, week : { dow : 0, // Sunday is the first day of the week. doy : 6 // The week that contains Jan 6th is the first week of the year. } }); return ta; }))); /***/ }), /* 408 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var te = moment.defineLocale('te', { months : 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జూలై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split('_'), monthsShort : 'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జూలై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split('_'), monthsParseExact : true, weekdays : 'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split('_'), weekdaysShort : 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'), weekdaysMin : 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'), longDateFormat : { LT : 'A h:mm', LTS : 'A h:mm:ss', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY, A h:mm', LLLL : 'dddd, D MMMM YYYY, A h:mm' }, calendar : { sameDay : '[నేడు] LT', nextDay : '[రేపు] LT', nextWeek : 'dddd, LT', lastDay : '[నిన్న] LT', lastWeek : '[గత] dddd, LT', sameElse : 'L' }, relativeTime : { future : '%s లో', past : '%s క్రితం', s : 'కొన్ని క్షణాలు', ss : '%d సెకన్లు', m : 'ఒక నిమిషం', mm : '%d నిమిషాలు', h : 'ఒక గంట', hh : '%d గంటలు', d : 'ఒక రోజు', dd : '%d రోజులు', M : 'ఒక నెల', MM : '%d నెలలు', y : 'ఒక సంవత్సరం', yy : '%d సంవత్సరాలు' }, dayOfMonthOrdinalParse : /\d{1,2}వ/, ordinal : '%dవ', meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/, meridiemHour : function (hour, meridiem) { if (hour === 12) { hour = 0; } if (meridiem === 'రాత్రి') { return hour < 4 ? hour : hour + 12; } else if (meridiem === 'ఉదయం') { return hour; } else if (meridiem === 'మధ్యాహ్నం') { return hour >= 10 ? hour : hour + 12; } else if (meridiem === 'సాయంత్రం') { return hour + 12; } }, meridiem : function (hour, minute, isLower) { if (hour < 4) { return 'రాత్రి'; } else if (hour < 10) { return 'ఉదయం'; } else if (hour < 17) { return 'మధ్యాహ్నం'; } else if (hour < 20) { return 'సాయంత్రం'; } else { return 'రాత్రి'; } }, week : { dow : 0, // Sunday is the first day of the week. doy : 6 // The week that contains Jan 6th is the first week of the year. } }); return te; }))); /***/ }), /* 409 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var tet = moment.defineLocale('tet', { months : 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru'.split('_'), monthsShort : 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'), weekdays : 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu'.split('_'), weekdaysShort : 'Dom_Seg_Ters_Kua_Kint_Sest_Sab'.split('_'), weekdaysMin : 'Do_Seg_Te_Ku_Ki_Ses_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: '[Ohin iha] LT', nextDay: '[Aban iha] LT', nextWeek: 'dddd [iha] LT', lastDay: '[Horiseik iha] LT', lastWeek: 'dddd [semana kotuk] [iha] LT', sameElse: 'L' }, relativeTime : { future : 'iha %s', past : '%s liuba', s : 'minutu balun', ss : 'minutu %d', m : 'minutu ida', mm : 'minutu %d', h : 'oras ida', hh : 'oras %d', d : 'loron ida', dd : 'loron %d', M : 'fulan ida', MM : 'fulan %d', y : 'tinan ida', yy : 'tinan %d' }, 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 tet; }))); /***/ }), /* 410 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var suffixes = { 0: '-ум', 1: '-ум', 2: '-юм', 3: '-юм', 4: '-ум', 5: '-ум', 6: '-ум', 7: '-ум', 8: '-ум', 9: '-ум', 10: '-ум', 12: '-ум', 13: '-ум', 20: '-ум', 30: '-юм', 40: '-ум', 50: '-ум', 60: '-ум', 70: '-ум', 80: '-ум', 90: '-ум', 100: '-ум' }; var tg = moment.defineLocale('tg', { months : 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split('_'), monthsShort : 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'), weekdays : 'якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе'.split('_'), weekdaysShort : 'яшб_дшб_сшб_чшб_пшб_ҷум_шнб'.split('_'), weekdaysMin : 'яш_дш_сш_чш_пш_ҷм_шб'.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 : '[Имрӯз соати] LT', nextDay : '[Пагоҳ соати] LT', lastDay : '[Дирӯз соати] LT', nextWeek : 'dddd[и] [ҳафтаи оянда соати] LT', lastWeek : 'dddd[и] [ҳафтаи гузашта соати] LT', sameElse : 'L' }, relativeTime : { future : 'баъди %s', past : '%s пеш', s : 'якчанд сония', m : 'як дақиқа', mm : '%d дақиқа', h : 'як соат', hh : '%d соат', d : 'як рӯз', dd : '%d рӯз', M : 'як моҳ', MM : '%d моҳ', y : 'як сол', yy : '%d сол' }, meridiemParse: /шаб|субҳ|рӯз|бегоҳ/, meridiemHour: function (hour, meridiem) { if (hour === 12) { hour = 0; } if (meridiem === 'шаб') { return hour < 4 ? hour : hour + 12; } else if (meridiem === 'субҳ') { return hour; } else if (meridiem === 'рӯз') { return hour >= 11 ? hour : hour + 12; } else if (meridiem === 'бегоҳ') { return hour + 12; } }, meridiem: function (hour, minute, isLower) { if (hour < 4) { return 'шаб'; } else if (hour < 11) { return 'субҳ'; } else if (hour < 16) { return 'рӯз'; } else if (hour < 19) { return 'бегоҳ'; } else { return 'шаб'; } }, dayOfMonthOrdinalParse: /\d{1,2}-(ум|юм)/, ordinal: function (number) { var a = number % 10, b = number >= 100 ? 100 : null; return number + (suffixes[number] || suffixes[a] || suffixes[b]); }, week : { dow : 1, // Monday is the first day of the week. doy : 7 // The week that contains Jan 1th is the first week of the year. } }); return tg; }))); /***/ }), /* 411 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var th = moment.defineLocale('th', { months : 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split('_'), monthsShort : 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split('_'), monthsParseExact: true, weekdays : 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'), weekdaysShort : 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'), // yes, three characters difference weekdaysMin : 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'), weekdaysParseExact : true, longDateFormat : { LT : 'H:mm', LTS : 'H:mm:ss', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY เวลา H:mm', LLLL : 'วันddddที่ D MMMM YYYY เวลา H:mm' }, meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/, isPM: function (input) { return input === 'หลังเที่ยง'; }, meridiem : function (hour, minute, isLower) { if (hour < 12) { return 'ก่อนเที่ยง'; } else { return 'หลังเที่ยง'; } }, calendar : { sameDay : '[วันนี้ เวลา] LT', nextDay : '[พรุ่งนี้ เวลา] LT', nextWeek : 'dddd[หน้า เวลา] LT', lastDay : '[เมื่อวานนี้ เวลา] LT', lastWeek : '[วัน]dddd[ที่แล้ว เวลา] LT', sameElse : 'L' }, 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 ปี' } }); return th; }))); /***/ }), /* 412 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var tlPh = moment.defineLocale('tl-ph', { months : 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split('_'), monthsShort : 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'), weekdays : 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split('_'), weekdaysShort : 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'), weekdaysMin : 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'), longDateFormat : { LT : 'HH:mm', LTS : 'HH:mm:ss', L : 'MM/D/YYYY', LL : 'MMMM D, YYYY', LLL : 'MMMM D, YYYY HH:mm', LLLL : 'dddd, MMMM DD, YYYY HH:mm' }, calendar : { sameDay: 'LT [ngayong araw]', nextDay: '[Bukas ng] LT', nextWeek: 'LT [sa susunod na] dddd', lastDay: 'LT [kahapon]', lastWeek: 'LT [noong nakaraang] dddd', sameElse: 'L' }, relativeTime : { future : 'sa loob ng %s', past : '%s ang nakalipas', s : 'ilang segundo', ss : '%d segundo', m : 'isang minuto', mm : '%d minuto', h : 'isang oras', hh : '%d oras', d : 'isang araw', dd : '%d araw', M : 'isang buwan', MM : '%d buwan', y : 'isang taon', yy : '%d taon' }, dayOfMonthOrdinalParse: /\d{1,2}/, ordinal : function (number) { return number; }, 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 tlPh; }))); /***/ }), /* 413 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_'); function translateFuture(output) { var time = output; time = (output.indexOf('jaj') !== -1) ? time.slice(0, -3) + 'leS' : (output.indexOf('jar') !== -1) ? time.slice(0, -3) + 'waQ' : (output.indexOf('DIS') !== -1) ? time.slice(0, -3) + 'nem' : time + ' pIq'; return time; } function translatePast(output) { var time = output; time = (output.indexOf('jaj') !== -1) ? time.slice(0, -3) + 'Hu’' : (output.indexOf('jar') !== -1) ? time.slice(0, -3) + 'wen' : (output.indexOf('DIS') !== -1) ? time.slice(0, -3) + 'ben' : time + ' ret'; return time; } function translate(number, withoutSuffix, string, isFuture) { var numberNoun = numberAsNoun(number); switch (string) { case 'ss': return numberNoun + ' lup'; case 'mm': return numberNoun + ' tup'; case 'hh': return numberNoun + ' rep'; case 'dd': return numberNoun + ' jaj'; case 'MM': return numberNoun + ' jar'; case 'yy': return numberNoun + ' DIS'; } } function numberAsNoun(number) { var hundred = Math.floor((number % 1000) / 100), ten = Math.floor((number % 100) / 10), one = number % 10, word = ''; if (hundred > 0) { word += numbersNouns[hundred] + 'vatlh'; } if (ten > 0) { word += ((word !== '') ? ' ' : '') + numbersNouns[ten] + 'maH'; } if (one > 0) { word += ((word !== '') ? ' ' : '') + numbersNouns[one]; } return (word === '') ? 'pagh' : word; } var tlh = moment.defineLocale('tlh', { months : 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split('_'), monthsShort : 'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split('_'), monthsParseExact : true, weekdays : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'), weekdaysShort : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'), weekdaysMin : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.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: '[DaHjaj] LT', nextDay: '[wa’leS] LT', nextWeek: 'LLL', lastDay: '[wa’Hu’] LT', lastWeek: 'LLL', sameElse: 'L' }, relativeTime : { future : translateFuture, past : translatePast, s : 'puS lup', ss : translate, m : 'wa’ tup', mm : translate, h : 'wa’ rep', hh : translate, d : 'wa’ jaj', dd : translate, M : 'wa’ jar', MM : translate, y : 'wa’ DIS', yy : translate }, dayOfMonthOrdinalParse: /\d{1,2}\./, ordinal : '%d.', 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 tlh; }))); /***/ }), /* 414 */ /***/ (function(module, exports, __webpack_require__) { ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var suffixes = { 1: '\'inci', 5: '\'inci', 8: '\'inci', 70: '\'inci', 80: '\'inci', 2: '\'nci', 7: '\'nci', 20: '\'nci', 50: '\'nci', 3: '\'üncü', 4: '\'üncü', 100: '\'üncü', 6: '\'ncı', 9: '\'uncu', 10: '\'uncu', 30: '\'uncu', 60: '\'ıncı', 90: '\'ıncı' }; var tr = moment.defineLocale('tr', { months : 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split('_'), monthsShort : 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'), weekdays : 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split('_'), weekdaysShort : 'Paz_Pts_Sal_Çar_Per_Cum_Cts'.split('_'), weekdaysMin : 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.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 : '[bugün saat] LT', nextDay : '[yarın saat] LT', nextWeek : '[gelecek] dddd [saat] LT', lastDay : '[dün] LT', lastWeek : '[geçen] dddd [saat] LT', sameElse : 'L' }, relativeTime : { future : '%s sonra', past : '%s önce', s : 'birkaç saniye', ss : '%d saniye', m : 'bir dakika', mm : '%d dakika', h : 'bir saat', hh : '%d saat', d : 'bir gün', dd : '%d gün', M : 'bir ay', MM : '%d ay', y : 'bir yıl', yy : '%d yıl' }, ordinal: function (number, period) { switch (period) { case 'd': case 'D': case 'Do': case 'DD': return number; default: if (number === 0) { // special case for zero return number + '\'ıncı'; } var a = number % 10, b = number % 100 - a, c = number >= 100 ? 100 : null; return number + (suffixes[a] || suffixes[b] || suffixes[c]); } }, week : { dow : 1, // Monday is the first day of the week. doy : 7 // The week that contains Jan 7th is the first week of the year. } }); return tr; }))); /***/ }), /* 415 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; // After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals. // This is currently too difficult (maybe even impossible) to add. var tzl = moment.defineLocale('tzl', { months : 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split('_'), monthsShort : 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'), weekdays : 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'), weekdaysShort : 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'), weekdaysMin : 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'), longDateFormat : { LT : 'HH.mm', LTS : 'HH.mm.ss', L : 'DD.MM.YYYY', LL : 'D. MMMM [dallas] YYYY', LLL : 'D. MMMM [dallas] YYYY HH.mm', LLLL : 'dddd, [li] D. MMMM [dallas] YYYY HH.mm' }, meridiemParse: /d\'o|d\'a/i, isPM : function (input) { return 'd\'o' === input.toLowerCase(); }, meridiem : function (hours, minutes, isLower) { if (hours > 11) { return isLower ? 'd\'o' : 'D\'O'; } else { return isLower ? 'd\'a' : 'D\'A'; } }, calendar : { sameDay : '[oxhi à] LT', nextDay : '[demà à] LT', nextWeek : 'dddd [à] LT', lastDay : '[ieiri à] LT', lastWeek : '[sür el] dddd [lasteu à] LT', sameElse : 'L' }, relativeTime : { future : 'osprei %s', past : 'ja%s', s : processRelativeTime, ss : processRelativeTime, m : processRelativeTime, mm : processRelativeTime, h : processRelativeTime, hh : processRelativeTime, d : processRelativeTime, dd : processRelativeTime, M : processRelativeTime, MM : processRelativeTime, y : processRelativeTime, yy : processRelativeTime }, dayOfMonthOrdinalParse: /\d{1,2}\./, ordinal : '%d.', 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. } }); function processRelativeTime(number, withoutSuffix, key, isFuture) { var format = { 's': ['viensas secunds', '\'iensas secunds'], 'ss': [number + ' secunds', '' + number + ' secunds'], 'm': ['\'n míut', '\'iens míut'], 'mm': [number + ' míuts', '' + number + ' míuts'], 'h': ['\'n þora', '\'iensa þora'], 'hh': [number + ' þoras', '' + number + ' þoras'], 'd': ['\'n ziua', '\'iensa ziua'], 'dd': [number + ' ziuas', '' + number + ' ziuas'], 'M': ['\'n mes', '\'iens mes'], 'MM': [number + ' mesen', '' + number + ' mesen'], 'y': ['\'n ar', '\'iens ar'], 'yy': [number + ' ars', '' + number + ' ars'] }; return isFuture ? format[key][0] : (withoutSuffix ? format[key][0] : format[key][1]); } return tzl; }))); /***/ }), /* 416 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var tzm = moment.defineLocale('tzm', { months : 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'), monthsShort : 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split('_'), weekdays : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'), weekdaysShort : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'), weekdaysMin : 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.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: '[ⴰⵙⴷⵅ ⴴ] LT', nextDay: '[ⴰⵙⴽⴰ ⴴ] LT', nextWeek: 'dddd [ⴴ] LT', lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT', lastWeek: 'dddd [ⴴ] LT', sameElse: 'L' }, relativeTime : { future : 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s', past : 'ⵢⴰⵏ %s', s : 'ⵉⵎⵉⴽ', ss : '%d ⵉⵎⵉⴽ', m : 'ⵎⵉⵏⵓⴺ', mm : '%d ⵎⵉⵏⵓⴺ', h : 'ⵙⴰⵄⴰ', hh : '%d ⵜⴰⵙⵙⴰⵄⵉⵏ', d : 'ⴰⵙⵙ', dd : '%d oⵙⵙⴰⵏ', M : 'ⴰⵢoⵓⵔ', MM : '%d ⵉⵢⵢⵉⵔⵏ', y : 'ⴰⵙⴳⴰⵙ', yy : '%d ⵉⵙⴳⴰⵙⵏ' }, week : { dow : 6, // Saturday is the first day of the week. doy : 12 // The week that contains Jan 12th is the first week of the year. } }); return tzm; }))); /***/ }), /* 417 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var tzmLatn = moment.defineLocale('tzm-latn', { months : 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'), monthsShort : 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'), weekdays : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'), weekdaysShort : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'), weekdaysMin : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.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: '[asdkh g] LT', nextDay: '[aska g] LT', nextWeek: 'dddd [g] LT', lastDay: '[assant g] LT', lastWeek: 'dddd [g] LT', sameElse: 'L' }, relativeTime : { future : 'dadkh s yan %s', past : 'yan %s', s : 'imik', ss : '%d imik', m : 'minuḍ', mm : '%d minuḍ', h : 'saɛa', hh : '%d tassaɛin', d : 'ass', dd : '%d ossan', M : 'ayowr', MM : '%d iyyirn', y : 'asgas', yy : '%d isgasn' }, week : { dow : 6, // Saturday is the first day of the week. doy : 12 // The week that contains Jan 12th is the first week of the year. } }); return tzmLatn; }))); /***/ }), /* 418 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js language configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var ugCn = moment.defineLocale('ug-cn', { months: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split( '_' ), monthsShort: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.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-كۈنى، HH:mm', LLLL: 'dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، 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: '[كېلەركى] dddd [سائەت] LT', lastDay: '[تۆنۈگۈن] LT', lastWeek: '[ئالدىنقى] dddd [سائەت] LT', sameElse: 'L' }, relativeTime: { future: '%s كېيىن', past: '%s بۇرۇن', s: 'نەچچە سېكونت', ss: '%d سېكونت', m: 'بىر مىنۇت', mm: '%d مىنۇت', h: 'بىر سائەت', hh: '%d سائەت', d: 'بىر كۈن', dd: '%d كۈن', M: 'بىر ئاي', MM: '%d ئاي', y: 'بىر يىل', yy: '%d يىل' }, dayOfMonthOrdinalParse: /\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/, ordinal: function (number, period) { switch (period) { case 'd': case 'D': case 'DDD': return number + '-كۈنى'; case 'w': case 'W': return number + '-ھەپتە'; default: return number; } }, preparse: function (string) { return string.replace(/،/g, ','); }, postformat: function (string) { return string.replace(/,/g, '،'); }, week: { // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效 dow: 1, // Monday is the first day of the week. doy: 7 // The week that contains Jan 1st is the first week of the year. } }); return ugCn; }))); /***/ }), /* 419 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; function plural(word, num) { var forms = word.split('_'); return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]); } function relativeTimeWithPlural(number, withoutSuffix, key) { var format = { 'ss': withoutSuffix ? 'секунда_секунди_секунд' : 'секунду_секунди_секунд', 'mm': withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин', 'hh': withoutSuffix ? 'година_години_годин' : 'годину_години_годин', 'dd': 'день_дні_днів', 'MM': 'місяць_місяці_місяців', 'yy': 'рік_роки_років' }; if (key === 'm') { return withoutSuffix ? 'хвилина' : 'хвилину'; } else if (key === 'h') { return withoutSuffix ? 'година' : 'годину'; } else { return number + ' ' + plural(format[key], +number); } } function weekdaysCaseReplace(m, format) { var weekdays = { 'nominative': 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split('_'), 'accusative': 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split('_'), 'genitive': 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split('_') }; if (!m) { return weekdays['nominative']; } var nounCase = (/(\[[ВвУу]\]) ?dddd/).test(format) ? 'accusative' : ((/\[?(?:минулої|наступної)? ?\] ?dddd/).test(format) ? 'genitive' : 'nominative'); return weekdays[nounCase][m.day()]; } function processHoursFunction(str) { return function () { return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT'; }; } var uk = moment.defineLocale('uk', { months : { 'format': 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split('_'), 'standalone': 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split('_') }, monthsShort : 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split('_'), weekdays : weekdaysCaseReplace, weekdaysShort : 'нд_пн_вт_ср_чт_пт_сб'.split('_'), weekdaysMin : 'нд_пн_вт_ср_чт_пт_сб'.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: processHoursFunction('[Сьогодні '), nextDay: processHoursFunction('[Завтра '), lastDay: processHoursFunction('[Вчора '), nextWeek: processHoursFunction('[У] dddd ['), lastWeek: function () { switch (this.day()) { case 0: case 3: case 5: case 6: return processHoursFunction('[Минулої] dddd [').call(this); case 1: case 2: case 4: return processHoursFunction('[Минулого] dddd [').call(this); } }, sameElse: 'L' }, relativeTime : { future : 'за %s', past : '%s тому', s : 'декілька секунд', ss : relativeTimeWithPlural, m : relativeTimeWithPlural, mm : relativeTimeWithPlural, h : 'годину', hh : relativeTimeWithPlural, d : 'день', dd : relativeTimeWithPlural, M : 'місяць', MM : relativeTimeWithPlural, y : 'рік', yy : relativeTimeWithPlural }, // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason meridiemParse: /ночі|ранку|дня|вечора/, isPM: function (input) { return /^(дня|вечора)$/.test(input); }, meridiem : function (hour, minute, isLower) { if (hour < 4) { return 'ночі'; } else if (hour < 12) { return 'ранку'; } else if (hour < 17) { return 'дня'; } else { return 'вечора'; } }, dayOfMonthOrdinalParse: /\d{1,2}-(й|го)/, ordinal: function (number, period) { switch (period) { case 'M': case 'd': case 'DDD': case 'w': case 'W': return number + '-й'; case 'D': return number + '-го'; default: return number; } }, week : { dow : 1, // Monday is the first day of the week. doy : 7 // The week that contains Jan 7th is the first week of the year. } }); return uk; }))); /***/ }), /* 420 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var months = [ 'جنوری', 'فروری', 'مارچ', 'اپریل', 'مئی', 'جون', 'جولائی', 'اگست', 'ستمبر', 'اکتوبر', 'نومبر', 'دسمبر' ]; var days = [ 'اتوار', 'پیر', 'منگل', 'بدھ', 'جمعرات', 'جمعہ', 'ہفتہ' ]; var ur = moment.defineLocale('ur', { months : months, monthsShort : months, weekdays : days, weekdaysShort : days, weekdaysMin : days, 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' }, meridiemParse: /صبح|شام/, isPM : function (input) { return 'شام' === input; }, meridiem : function (hour, minute, isLower) { if (hour < 12) { return 'صبح'; } return 'شام'; }, calendar : { sameDay : '[آج بوقت] LT', nextDay : '[کل بوقت] LT', nextWeek : 'dddd [بوقت] LT', lastDay : '[گذشتہ روز بوقت] LT', lastWeek : '[گذشتہ] dddd [بوقت] LT', sameElse : 'L' }, relativeTime : { future : '%s بعد', past : '%s قبل', s : 'چند سیکنڈ', ss : '%d سیکنڈ', m : 'ایک منٹ', mm : '%d منٹ', h : 'ایک گھنٹہ', hh : '%d گھنٹے', d : 'ایک دن', dd : '%d دن', M : 'ایک ماہ', MM : '%d ماہ', y : 'ایک سال', yy : '%d سال' }, preparse: function (string) { return string.replace(/،/g, ','); }, postformat: function (string) { return string.replace(/,/g, '،'); }, 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 ur; }))); /***/ }), /* 421 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var uz = moment.defineLocale('uz', { months : 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split('_'), monthsShort : 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'), weekdays : 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'), weekdaysShort : 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'), weekdaysMin : 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'), longDateFormat : { LT : 'HH:mm', LTS : 'HH:mm:ss', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY HH:mm', LLLL : 'D MMMM YYYY, dddd HH:mm' }, calendar : { sameDay : '[Бугун соат] LT [да]', nextDay : '[Эртага] LT [да]', nextWeek : 'dddd [куни соат] LT [да]', lastDay : '[Кеча соат] LT [да]', lastWeek : '[Утган] dddd [куни соат] LT [да]', sameElse : 'L' }, relativeTime : { future : 'Якин %s ичида', past : 'Бир неча %s олдин', s : 'фурсат', ss : '%d фурсат', m : 'бир дакика', mm : '%d дакика', h : 'бир соат', hh : '%d соат', d : 'бир кун', dd : '%d кун', M : 'бир ой', MM : '%d ой', y : 'бир йил', yy : '%d йил' }, week : { dow : 1, // Monday is the first day of the week. doy : 7 // The week that contains Jan 4th is the first week of the year. } }); return uz; }))); /***/ }), /* 422 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var uzLatn = moment.defineLocale('uz-latn', { months : 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split('_'), monthsShort : 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'), weekdays : 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split('_'), weekdaysShort : 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'), weekdaysMin : 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'), longDateFormat : { LT : 'HH:mm', LTS : 'HH:mm:ss', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY HH:mm', LLLL : 'D MMMM YYYY, dddd HH:mm' }, calendar : { sameDay : '[Bugun soat] LT [da]', nextDay : '[Ertaga] LT [da]', nextWeek : 'dddd [kuni soat] LT [da]', lastDay : '[Kecha soat] LT [da]', lastWeek : '[O\'tgan] dddd [kuni soat] LT [da]', sameElse : 'L' }, relativeTime : { future : 'Yaqin %s ichida', past : 'Bir necha %s oldin', s : 'soniya', ss : '%d soniya', m : 'bir daqiqa', mm : '%d daqiqa', h : 'bir soat', hh : '%d soat', d : 'bir kun', dd : '%d kun', M : 'bir oy', MM : '%d oy', y : 'bir yil', yy : '%d yil' }, week : { dow : 1, // Monday is the first day of the week. doy : 7 // The week that contains Jan 7th is the first week of the year. } }); return uzLatn; }))); /***/ }), /* 423 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var vi = moment.defineLocale('vi', { months : 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split('_'), monthsShort : 'Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12'.split('_'), monthsParseExact : true, weekdays : 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split('_'), weekdaysShort : 'CN_T2_T3_T4_T5_T6_T7'.split('_'), weekdaysMin : 'CN_T2_T3_T4_T5_T6_T7'.split('_'), weekdaysParseExact : true, meridiemParse: /sa|ch/i, isPM : function (input) { return /^ch$/i.test(input); }, meridiem : function (hours, minutes, isLower) { if (hours < 12) { return isLower ? 'sa' : 'SA'; } else { return isLower ? 'ch' : 'CH'; } }, longDateFormat : { LT : 'HH:mm', LTS : 'HH:mm:ss', L : 'DD/MM/YYYY', LL : 'D MMMM [năm] YYYY', LLL : 'D MMMM [năm] YYYY HH:mm', LLLL : 'dddd, D MMMM [năm] YYYY HH:mm', l : 'DD/M/YYYY', ll : 'D MMM YYYY', lll : 'D MMM YYYY HH:mm', llll : 'ddd, D MMM YYYY HH:mm' }, calendar : { sameDay: '[Hôm nay lúc] LT', nextDay: '[Ngày mai lúc] LT', nextWeek: 'dddd [tuần tới lúc] LT', lastDay: '[Hôm qua lúc] LT', lastWeek: 'dddd [tuần rồi lúc] LT', sameElse: 'L' }, relativeTime : { future : '%s tới', past : '%s trước', s : 'vài giây', ss : '%d giây' , m : 'một phút', mm : '%d phút', h : 'một giờ', hh : '%d giờ', d : 'một ngày', dd : '%d ngày', M : 'một tháng', MM : '%d tháng', y : 'một năm', yy : '%d năm' }, dayOfMonthOrdinalParse: /\d{1,2}/, ordinal : function (number) { return number; }, 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 vi; }))); /***/ }), /* 424 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var xPseudo = moment.defineLocale('x-pseudo', { months : 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split('_'), monthsShort : 'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split('_'), monthsParseExact : true, weekdays : 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split('_'), weekdaysShort : 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'), weekdaysMin : 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'), weekdaysParseExact : true, longDateFormat : { LT : 'HH:mm', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY HH:mm', LLLL : 'dddd, D MMMM YYYY HH:mm' }, calendar : { sameDay : '[T~ódá~ý át] LT', nextDay : '[T~ómó~rró~w át] LT', nextWeek : 'dddd [át] LT', lastDay : '[Ý~ést~érdá~ý át] LT', lastWeek : '[L~ást] dddd [át] LT', sameElse : 'L' }, relativeTime : { future : 'í~ñ %s', past : '%s á~gó', s : 'á ~féw ~sécó~ñds', ss : '%d s~écóñ~ds', m : 'á ~míñ~úté', mm : '%d m~íñú~tés', h : 'á~ñ hó~úr', hh : '%d h~óúrs', d : 'á ~dáý', dd : '%d d~áýs', M : 'á ~móñ~th', MM : '%d m~óñt~hs', y : 'á ~ýéár', yy : '%d ý~éárs' }, dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, 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 xPseudo; }))); /***/ }), /* 425 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var yo = moment.defineLocale('yo', { months : 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split('_'), monthsShort : 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'), weekdays : 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'), weekdaysShort : 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'), weekdaysMin : 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'), longDateFormat : { LT : 'h:mm A', LTS : 'h:mm:ss A', L : 'DD/MM/YYYY', LL : 'D MMMM YYYY', LLL : 'D MMMM YYYY h:mm A', LLLL : 'dddd, D MMMM YYYY h:mm A' }, calendar : { sameDay : '[Ònì ni] LT', nextDay : '[Ọ̀la ni] LT', nextWeek : 'dddd [Ọsẹ̀ tón\'bọ] [ni] LT', lastDay : '[Àna ni] LT', lastWeek : 'dddd [Ọsẹ̀ tólọ́] [ni] LT', sameElse : 'L' }, relativeTime : { future : 'ní %s', past : '%s kọjá', s : 'ìsẹjú aayá die', ss :'aayá %d', m : 'ìsẹjú kan', mm : 'ìsẹjú %d', h : 'wákati kan', hh : 'wákati %d', d : 'ọjọ́ kan', dd : 'ọjọ́ %d', M : 'osù kan', MM : 'osù %d', y : 'ọdún kan', yy : 'ọdún %d' }, dayOfMonthOrdinalParse : /ọjọ́\s\d{1,2}/, ordinal : 'ọjọ́ %d', 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 yo; }))); /***/ }), /* 426 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : 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; }))); /***/ }), /* 427 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var zhHk = moment.defineLocale('zh-hk', { 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日 HH:mm', LLLL : 'YYYY年M月D日dddd HH: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 === '中午') { return hour >= 11 ? hour : hour + 12; } else if (meridiem === '下午' || meridiem === '晚上') { return 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 年' } }); return zhHk; }))); /***/ }), /* 428 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration ;(function (global, factory) { true ? factory(__webpack_require__(302)) : typeof define === 'function' && define.amd ? define(['../moment'], factory) : factory(global.moment) }(this, (function (moment) { 'use strict'; var zhTw = moment.defineLocale('zh-tw', { 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日 HH:mm', LLLL : 'YYYY年M月D日dddd HH: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 === '中午') { return hour >= 11 ? hour : hour + 12; } else if (meridiem === '下午' || meridiem === '晚上') { return 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 : '[下]dddd LT', lastDay : '[昨天] LT', lastWeek : '[上]dddd LT', 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 年' } }); return zhTw; }))); /***/ }), /* 429 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _defineProperty2 = __webpack_require__(262); var _defineProperty3 = _interopRequireDefault(_defineProperty2); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _createReactClass = __webpack_require__(245); var _createReactClass2 = _interopRequireDefault(_createReactClass); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _classnames = __webpack_require__(3); var _classnames2 = _interopRequireDefault(_classnames); var _DateConstants = __webpack_require__(301); var _DateConstants2 = _interopRequireDefault(_DateConstants); var _util = __webpack_require__(430); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function isSameDay(one, two) { return one && two && one.isSame(two, 'day'); } function beforeCurrentMonthYear(current, today) { if (current.year() < today.year()) { return 1; } return current.year() === today.year() && current.month() < today.month(); } function afterCurrentMonthYear(current, today) { if (current.year() > today.year()) { return 1; } return current.year() === today.year() && current.month() > today.month(); } function getIdFromDate(date) { return 'rc-calendar-' + date.year() + '-' + date.month() + '-' + date.date(); } var DateTBody = (0, _createReactClass2['default'])({ displayName: 'DateTBody', propTypes: { contentRender: _propTypes2['default'].func, dateRender: _propTypes2['default'].func, disabledDate: _propTypes2['default'].func, prefixCls: _propTypes2['default'].string, selectedValue: _propTypes2['default'].oneOfType([_propTypes2['default'].object, _propTypes2['default'].arrayOf(_propTypes2['default'].object)]), value: _propTypes2['default'].object, hoverValue: _propTypes2['default'].any, showWeekNumber: _propTypes2['default'].bool }, getDefaultProps: function getDefaultProps() { return { hoverValue: [] }; }, render: function render() { var props = this.props; var contentRender = props.contentRender, prefixCls = props.prefixCls, selectedValue = props.selectedValue, value = props.value, showWeekNumber = props.showWeekNumber, dateRender = props.dateRender, disabledDate = props.disabledDate, hoverValue = props.hoverValue; var iIndex = void 0; var jIndex = void 0; var current = void 0; var dateTable = []; var today = (0, _util.getTodayTime)(value); var cellClass = prefixCls + '-cell'; var weekNumberCellClass = prefixCls + '-week-number-cell'; var dateClass = prefixCls + '-date'; var todayClass = prefixCls + '-today'; var selectedClass = prefixCls + '-selected-day'; var selectedDateClass = prefixCls + '-selected-date'; // do not move with mouse operation var inRangeClass = prefixCls + '-in-range-cell'; var lastMonthDayClass = prefixCls + '-last-month-cell'; var nextMonthDayClass = prefixCls + '-next-month-btn-day'; var disabledClass = prefixCls + '-disabled-cell'; var firstDisableClass = prefixCls + '-disabled-cell-first-of-row'; var lastDisableClass = prefixCls + '-disabled-cell-last-of-row'; var month1 = value.clone(); month1.date(1); var day = month1.day(); var lastMonthDiffDay = (day + 7 - value.localeData().firstDayOfWeek()) % 7; // calculate last month var lastMonth1 = month1.clone(); lastMonth1.add(0 - lastMonthDiffDay, 'days'); var passed = 0; for (iIndex = 0; iIndex < _DateConstants2['default'].DATE_ROW_COUNT; iIndex++) { for (jIndex = 0; jIndex < _DateConstants2['default'].DATE_COL_COUNT; jIndex++) { current = lastMonth1; if (passed) { current = current.clone(); current.add(passed, 'days'); } dateTable.push(current); passed++; } } var tableHtml = []; passed = 0; for (iIndex = 0; iIndex < _DateConstants2['default'].DATE_ROW_COUNT; iIndex++) { var _cx; var isCurrentWeek = void 0; var weekNumberCell = void 0; var isActiveWeek = false; var dateCells = []; if (showWeekNumber) { weekNumberCell = _react2['default'].createElement( 'td', { key: dateTable[passed].week(), role: 'gridcell', className: weekNumberCellClass }, dateTable[passed].week() ); } for (jIndex = 0; jIndex < _DateConstants2['default'].DATE_COL_COUNT; jIndex++) { var next = null; var last = null; current = dateTable[passed]; if (jIndex < _DateConstants2['default'].DATE_COL_COUNT - 1) { next = dateTable[passed + 1]; } if (jIndex > 0) { last = dateTable[passed - 1]; } var cls = cellClass; var disabled = false; var selected = false; if (isSameDay(current, today)) { cls += ' ' + todayClass; isCurrentWeek = true; } var isBeforeCurrentMonthYear = beforeCurrentMonthYear(current, value); var isAfterCurrentMonthYear = afterCurrentMonthYear(current, value); if (selectedValue && Array.isArray(selectedValue)) { var rangeValue = hoverValue.length ? hoverValue : selectedValue; if (!isBeforeCurrentMonthYear && !isAfterCurrentMonthYear) { var startValue = rangeValue[0]; var endValue = rangeValue[1]; if (startValue) { if (isSameDay(current, startValue)) { selected = true; isActiveWeek = true; } } if (startValue && endValue) { if (isSameDay(current, endValue)) { selected = true; isActiveWeek = true; } else if (current.isAfter(startValue, 'day') && current.isBefore(endValue, 'day')) { cls += ' ' + inRangeClass; } } } } else if (isSameDay(current, value)) { // keyboard change value, highlight works selected = true; isActiveWeek = true; } if (isSameDay(current, selectedValue)) { cls += ' ' + selectedDateClass; } if (isBeforeCurrentMonthYear) { cls += ' ' + lastMonthDayClass; } if (isAfterCurrentMonthYear) { cls += ' ' + nextMonthDayClass; } if (disabledDate) { if (disabledDate(current, value)) { disabled = true; if (!last || !disabledDate(last, value)) { cls += ' ' + firstDisableClass; } if (!next || !disabledDate(next, value)) { cls += ' ' + lastDisableClass; } } } if (selected) { cls += ' ' + selectedClass; } if (disabled) { cls += ' ' + disabledClass; } var dateHtml = void 0; if (dateRender) { dateHtml = dateRender(current, value); } else { var content = contentRender ? contentRender(current, value) : current.date(); dateHtml = _react2['default'].createElement( 'div', { key: getIdFromDate(current), className: dateClass, 'aria-selected': selected, 'aria-disabled': disabled }, content ); } dateCells.push(_react2['default'].createElement( 'td', { key: passed, onClick: disabled ? undefined : props.onSelect.bind(null, current), onMouseEnter: disabled ? undefined : props.onDayHover && props.onDayHover.bind(null, current) || undefined, role: 'gridcell', title: (0, _util.getTitleString)(current), className: cls }, dateHtml )); passed++; } tableHtml.push(_react2['default'].createElement( 'tr', { key: iIndex, role: 'row', className: (0, _classnames2['default'])((_cx = {}, (0, _defineProperty3['default'])(_cx, prefixCls + '-current-week', isCurrentWeek), (0, _defineProperty3['default'])(_cx, prefixCls + '-active-week', isActiveWeek), _cx)) }, weekNumberCell, dateCells )); } return _react2['default'].createElement( 'tbody', { className: prefixCls + '-tbody' }, tableHtml ); } }); exports['default'] = DateTBody; module.exports = exports['default']; /***/ }), /* 430 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends2 = __webpack_require__(145); var _extends3 = _interopRequireDefault(_extends2); exports.getTodayTime = getTodayTime; exports.getTitleString = getTitleString; exports.getTodayTimeStr = getTodayTimeStr; exports.getMonthName = getMonthName; exports.syncTime = syncTime; exports.getTimeConfig = getTimeConfig; exports.isTimeValidByConfig = isTimeValidByConfig; exports.isTimeValid = isTimeValid; exports.isAllowedDate = isAllowedDate; var _moment = __webpack_require__(302); var _moment2 = _interopRequireDefault(_moment); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var defaultDisabledTime = { disabledHours: function disabledHours() { return []; }, disabledMinutes: function disabledMinutes() { return []; }, disabledSeconds: function disabledSeconds() { return []; } }; function getTodayTime(value) { var today = (0, _moment2['default'])(); today.locale(value.locale()).utcOffset(value.utcOffset()); return today; } function getTitleString(value) { return value.format('L'); } function getTodayTimeStr(value) { var today = getTodayTime(value); return getTitleString(today); } function getMonthName(month) { var locale = month.locale(); var localeData = month.localeData(); return localeData[locale === 'zh-cn' ? 'months' : 'monthsShort'](month); } function syncTime(from, to) { if (!_moment2['default'].isMoment(from) || !_moment2['default'].isMoment(to)) return; to.hour(from.hour()); to.minute(from.minute()); to.second(from.second()); } function getTimeConfig(value, disabledTime) { var disabledTimeConfig = disabledTime ? disabledTime(value) : {}; disabledTimeConfig = (0, _extends3['default'])({}, defaultDisabledTime, disabledTimeConfig); return disabledTimeConfig; } function isTimeValidByConfig(value, disabledTimeConfig) { var invalidTime = false; if (value) { var hour = value.hour(); var minutes = value.minute(); var seconds = value.second(); var disabledHours = disabledTimeConfig.disabledHours(); if (disabledHours.indexOf(hour) === -1) { var disabledMinutes = disabledTimeConfig.disabledMinutes(hour); if (disabledMinutes.indexOf(minutes) === -1) { var disabledSeconds = disabledTimeConfig.disabledSeconds(hour, minutes); invalidTime = disabledSeconds.indexOf(seconds) !== -1; } else { invalidTime = true; } } else { invalidTime = true; } } return !invalidTime; } function isTimeValid(value, disabledTime) { var disabledTimeConfig = getTimeConfig(value, disabledTime); return isTimeValidByConfig(value, disabledTimeConfig); } function isAllowedDate(value, disabledDate, disabledTime) { if (disabledDate) { if (disabledDate(value)) { return false; } } if (disabledTime) { if (!isTimeValid(value, disabledTime)) { return false; } } return true; } /***/ }), /* 431 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _createReactClass = __webpack_require__(245); var _createReactClass2 = _interopRequireDefault(_createReactClass); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _MonthPanel = __webpack_require__(432); var _MonthPanel2 = _interopRequireDefault(_MonthPanel); var _YearPanel = __webpack_require__(433); var _YearPanel2 = _interopRequireDefault(_YearPanel); var _mapSelf = __webpack_require__(436); var _mapSelf2 = _interopRequireDefault(_mapSelf); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } 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 = (0, _createReactClass2['default'])({ displayName: 'CalendarHeader', propTypes: { prefixCls: _propTypes2['default'].string, value: _propTypes2['default'].object, onValueChange: _propTypes2['default'].func, showTimePicker: _propTypes2['default'].bool, showMonthPanel: _propTypes2['default'].bool, showYearPanel: _propTypes2['default'].bool, onPanelChange: _propTypes2['default'].func, locale: _propTypes2['default'].object, enablePrev: _propTypes2['default'].any, enableNext: _propTypes2['default'].any, disabledMonth: _propTypes2['default'].func }, getDefaultProps: function getDefaultProps() { return { enableNext: 1, enablePrev: 1, onPanelChange: function onPanelChange() {}, onValueChange: function onValueChange() {} }; }, getInitialState: function getInitialState() { this.nextMonth = goMonth.bind(this, 1); this.previousMonth = goMonth.bind(this, -1); this.nextYear = goYear.bind(this, 1); this.previousYear = goYear.bind(this, -1); var _props = this.props, showMonthPanel = _props.showMonthPanel, showYearPanel = _props.showYearPanel; return { showMonthPanel: showMonthPanel, showYearPanel: showYearPanel }; }, componentWillReceiveProps: function componentWillReceiveProps() { var props = this.props; if ('showMonthpanel' in props) { this.setState({ showMonthPanel: props.showMonthPanel }); } if ('showYearpanel' in props) { this.setState({ showYearPanel: props.showYearPanel }); } }, onSelect: function onSelect(value) { this.triggerPanelChange({ showMonthPanel: 0, showYearPanel: 0 }); this.props.onValueChange(value); }, triggerPanelChange: function triggerPanelChange(panelStatus) { if (!('showMonthPanel' in this.props)) { this.setState({ showMonthPanel: panelStatus.showMonthPanel }); } if (!('showYearPanel' in this.props)) { this.setState({ showYearPanel: panelStatus.showYearPanel }); } this.props.onPanelChange(panelStatus); }, monthYearElement: function monthYearElement(showTimePicker) { var props = this.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 year = _react2['default'].createElement( 'a', { className: prefixCls + '-year-select', role: 'button', onClick: showTimePicker ? null : this.showYearPanel, title: locale.yearSelect }, value.format(locale.yearFormat) ); var month = _react2['default'].createElement( 'a', { className: prefixCls + '-month-select', role: 'button', onClick: showTimePicker ? null : this.showMonthPanel, title: locale.monthSelect }, localeData.monthsShort(value) ); var day = void 0; if (showTimePicker) { day = _react2['default'].createElement( 'a', { className: prefixCls + '-day-select', 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) ); }, showMonthPanel: function showMonthPanel() { this.triggerPanelChange({ showMonthPanel: 1, showYearPanel: 0 }); }, showYearPanel: function showYearPanel() { this.triggerPanelChange({ showMonthPanel: 0, showYearPanel: 1 }); }, render: function render() { var props = this.props, state = this.state; var prefixCls = props.prefixCls, locale = props.locale, value = props.value, showTimePicker = props.showTimePicker, enableNext = props.enableNext, enablePrev = props.enablePrev, disabledMonth = props.disabledMonth; var panel = null; if (state.showMonthPanel) { panel = _react2['default'].createElement(_MonthPanel2['default'], { locale: locale, defaultValue: value, rootPrefixCls: prefixCls, onSelect: this.onSelect, disabledDate: disabledMonth }); } else if (state.showYearPanel) { panel = _react2['default'].createElement(_YearPanel2['default'], { locale: locale, defaultValue: value, rootPrefixCls: prefixCls, onSelect: this.onSelect }); } return _react2['default'].createElement( 'div', { className: prefixCls + '-header' }, _react2['default'].createElement( 'div', { style: { position: 'relative' } }, 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 ); } }); exports['default'] = CalendarHeader; module.exports = exports['default']; /***/ }), /* 432 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _createReactClass = __webpack_require__(245); var _createReactClass2 = _interopRequireDefault(_createReactClass); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _YearPanel = __webpack_require__(433); var _YearPanel2 = _interopRequireDefault(_YearPanel); var _MonthTable = __webpack_require__(435); var _MonthTable2 = _interopRequireDefault(_MonthTable); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function goYear(direction) { var next = this.state.value.clone(); next.add(direction, 'year'); this.setAndChangeValue(next); } function noop() {} var MonthPanel = (0, _createReactClass2['default'])({ displayName: 'MonthPanel', propTypes: { onChange: _propTypes2['default'].func, disabledDate: _propTypes2['default'].func, onSelect: _propTypes2['default'].func }, getDefaultProps: function getDefaultProps() { return { onChange: noop, onSelect: noop }; }, getInitialState: function getInitialState() { var props = this.props; // bind methods this.nextYear = goYear.bind(this, 1); this.previousYear = goYear.bind(this, -1); this.prefixCls = props.rootPrefixCls + '-month-panel'; return { value: props.value || props.defaultValue }; }, componentWillReceiveProps: function componentWillReceiveProps(nextProps) { if ('value' in nextProps) { this.setState({ value: nextProps.value }); } }, onYearPanelSelect: function onYearPanelSelect(current) { this.setState({ showYearPanel: 0 }); this.setAndChangeValue(current); }, setAndChangeValue: function setAndChangeValue(value) { this.setValue(value); this.props.onChange(value); }, setAndSelectValue: function setAndSelectValue(value) { this.setValue(value); this.props.onSelect(value); }, setValue: function setValue(value) { if (!('value' in this.props)) { this.setState({ value: value }); } }, showYearPanel: function showYearPanel() { this.setState({ showYearPanel: 1 }); }, render: function render() { var props = this.props; var value = this.state.value; var cellRender = props.cellRender; var contentRender = props.contentRender; var locale = props.locale; var year = value.year(); var prefixCls = this.prefixCls; var yearPanel = void 0; if (this.state.showYearPanel) { yearPanel = _react2['default'].createElement(_YearPanel2['default'], { locale: locale, value: value, rootPrefixCls: props.rootPrefixCls, onSelect: this.onYearPanelSelect }); } return _react2['default'].createElement( 'div', { className: prefixCls, style: props.style }, _react2['default'].createElement( 'div', null, _react2['default'].createElement( 'div', { className: prefixCls + '-header' }, _react2['default'].createElement('a', { className: prefixCls + '-prev-year-btn', role: 'button', onClick: this.previousYear, title: locale.previousYear }), _react2['default'].createElement( 'a', { className: prefixCls + '-year-select', role: 'button', onClick: this.showYearPanel, title: locale.yearSelect }, _react2['default'].createElement( 'span', { className: prefixCls + '-year-select-content' }, year ), _react2['default'].createElement( 'span', { className: prefixCls + '-year-select-arrow' }, 'x' ) ), _react2['default'].createElement('a', { className: prefixCls + '-next-year-btn', role: 'button', onClick: this.nextYear, title: locale.nextYear }) ), _react2['default'].createElement( 'div', { className: prefixCls + '-body' }, _react2['default'].createElement(_MonthTable2['default'], { disabledDate: props.disabledDate, onSelect: this.setAndSelectValue, locale: locale, value: value, cellRender: cellRender, contentRender: contentRender, prefixCls: prefixCls }) ) ), yearPanel ); } }); exports['default'] = MonthPanel; module.exports = exports['default']; /***/ }), /* 433 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _defineProperty2 = __webpack_require__(262); var _defineProperty3 = _interopRequireDefault(_defineProperty2); var _classCallCheck2 = __webpack_require__(185); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _createClass2 = __webpack_require__(254); var _createClass3 = _interopRequireDefault(_createClass2); var _possibleConstructorReturn2 = __webpack_require__(186); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(220); var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _classnames = __webpack_require__(3); var _classnames2 = _interopRequireDefault(_classnames); var _DecadePanel = __webpack_require__(434); var _DecadePanel2 = _interopRequireDefault(_DecadePanel); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var ROW = 4; var COL = 3; function goYear(direction) { var value = this.state.value.clone(); value.add(direction, 'year'); this.setState({ value: value }); } function chooseYear(year) { var value = this.state.value.clone(); value.year(year); value.month(this.state.value.month()); this.props.onSelect(value); } var YearPanel = function (_React$Component) { (0, _inherits3['default'])(YearPanel, _React$Component); function YearPanel(props) { (0, _classCallCheck3['default'])(this, YearPanel); var _this = (0, _possibleConstructorReturn3['default'])(this, (YearPanel.__proto__ || Object.getPrototypeOf(YearPanel)).call(this, props)); _this.prefixCls = props.rootPrefixCls + '-year-panel'; _this.state = { value: props.value || props.defaultValue }; _this.nextDecade = goYear.bind(_this, 10); _this.previousDecade = goYear.bind(_this, -10); ['showDecadePanel', 'onDecadePanelSelect'].forEach(function (method) { _this[method] = _this[method].bind(_this); }); return _this; } (0, _createClass3['default'])(YearPanel, [{ key: 'onDecadePanelSelect', value: function onDecadePanelSelect(current) { this.setState({ value: current, showDecadePanel: 0 }); } }, { key: 'years', value: function years() { var value = this.state.value; var currentYear = value.year(); var startYear = parseInt(currentYear / 10, 10) * 10; var previousYear = startYear - 1; var years = []; var index = 0; for (var rowIndex = 0; rowIndex < ROW; rowIndex++) { years[rowIndex] = []; for (var colIndex = 0; colIndex < COL; colIndex++) { var year = previousYear + index; var content = String(year); years[rowIndex][colIndex] = { content: content, year: year, title: content }; index++; } } return years; } }, { key: 'showDecadePanel', value: function showDecadePanel() { this.setState({ showDecadePanel: 1 }); } }, { key: 'render', value: function render() { var _this2 = this; var props = this.props; var value = this.state.value; var locale = props.locale; var years = this.years(); var currentYear = value.year(); var startYear = parseInt(currentYear / 10, 10) * 10; var endYear = startYear + 9; var prefixCls = this.prefixCls; var yeasEls = years.map(function (row, index) { var tds = row.map(function (yearData) { var _classNameMap; var classNameMap = (_classNameMap = {}, (0, _defineProperty3['default'])(_classNameMap, prefixCls + '-cell', 1), (0, _defineProperty3['default'])(_classNameMap, prefixCls + '-selected-cell', yearData.year === currentYear), (0, _defineProperty3['default'])(_classNameMap, prefixCls + '-last-decade-cell', yearData.year < startYear), (0, _defineProperty3['default'])(_classNameMap, prefixCls + '-next-decade-cell', yearData.year > endYear), _classNameMap); var clickHandler = void 0; if (yearData.year < startYear) { clickHandler = _this2.previousDecade; } else if (yearData.year > endYear) { clickHandler = _this2.nextDecade; } else { clickHandler = chooseYear.bind(_this2, yearData.year); } return _react2['default'].createElement( 'td', { role: 'gridcell', title: yearData.title, key: yearData.content, onClick: clickHandler, className: (0, _classnames2['default'])(classNameMap) }, _react2['default'].createElement( 'a', { className: prefixCls + '-year' }, yearData.content ) ); }); return _react2['default'].createElement( 'tr', { key: index, role: 'row' }, tds ); }); var decadePanel = void 0; if (this.state.showDecadePanel) { decadePanel = _react2['default'].createElement(_DecadePanel2['default'], { locale: locale, value: value, rootPrefixCls: props.rootPrefixCls, onSelect: this.onDecadePanelSelect }); } return _react2['default'].createElement( 'div', { className: this.prefixCls }, _react2['default'].createElement( 'div', null, _react2['default'].createElement( 'div', { className: prefixCls + '-header' }, _react2['default'].createElement('a', { className: prefixCls + '-prev-decade-btn', role: 'button', onClick: this.previousDecade, title: locale.previousDecade }), _react2['default'].createElement( 'a', { className: prefixCls + '-decade-select', role: 'button', onClick: this.showDecadePanel, title: locale.decadeSelect }, _react2['default'].createElement( 'span', { className: prefixCls + '-decade-select-content' }, startYear, '-', endYear ), _react2['default'].createElement( 'span', { className: prefixCls + '-decade-select-arrow' }, 'x' ) ), _react2['default'].createElement('a', { className: prefixCls + '-next-decade-btn', role: 'button', onClick: this.nextDecade, title: locale.nextDecade }) ), _react2['default'].createElement( 'div', { className: prefixCls + '-body' }, _react2['default'].createElement( 'table', { className: prefixCls + '-table', cellSpacing: '0', role: 'grid' }, _react2['default'].createElement( 'tbody', { className: prefixCls + '-tbody' }, yeasEls ) ) ) ), decadePanel ); } }]); return YearPanel; }(_react2['default'].Component); exports['default'] = YearPanel; YearPanel.propTypes = { rootPrefixCls: _propTypes2['default'].string, value: _propTypes2['default'].object, defaultValue: _propTypes2['default'].object }; YearPanel.defaultProps = { onSelect: function onSelect() {} }; module.exports = exports['default']; /***/ }), /* 434 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _defineProperty2 = __webpack_require__(262); var _defineProperty3 = _interopRequireDefault(_defineProperty2); var _classCallCheck2 = __webpack_require__(185); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _createClass2 = __webpack_require__(254); var _createClass3 = _interopRequireDefault(_createClass2); var _possibleConstructorReturn2 = __webpack_require__(186); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(220); var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _classnames = __webpack_require__(3); var _classnames2 = _interopRequireDefault(_classnames); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var ROW = 4; var COL = 3; function goYear(direction) { var next = this.state.value.clone(); next.add(direction, 'years'); this.setState({ value: next }); } function chooseDecade(year, event) { var next = this.state.value.clone(); next.year(year); next.month(this.state.value.month()); this.props.onSelect(next); event.preventDefault(); } var DecadePanel = function (_React$Component) { (0, _inherits3['default'])(DecadePanel, _React$Component); function DecadePanel(props) { (0, _classCallCheck3['default'])(this, DecadePanel); var _this = (0, _possibleConstructorReturn3['default'])(this, (DecadePanel.__proto__ || Object.getPrototypeOf(DecadePanel)).call(this, props)); _this.state = { value: props.value || props.defaultValue }; // bind methods _this.prefixCls = props.rootPrefixCls + '-decade-panel'; _this.nextCentury = goYear.bind(_this, 100); _this.previousCentury = goYear.bind(_this, -100); return _this; } (0, _createClass3['default'])(DecadePanel, [{ key: 'render', value: function render() { var _this2 = this; var value = this.state.value; var locale = this.props.locale; var currentYear = value.year(); var startYear = parseInt(currentYear / 100, 10) * 100; var preYear = startYear - 10; var endYear = startYear + 99; var decades = []; var index = 0; var prefixCls = this.prefixCls; for (var rowIndex = 0; rowIndex < ROW; rowIndex++) { decades[rowIndex] = []; for (var colIndex = 0; colIndex < COL; colIndex++) { var startDecade = preYear + index * 10; var endDecade = preYear + index * 10 + 9; decades[rowIndex][colIndex] = { startDecade: startDecade, endDecade: endDecade }; index++; } } var decadesEls = decades.map(function (row, decadeIndex) { var tds = row.map(function (decadeData) { var _classNameMap; var dStartDecade = decadeData.startDecade; var dEndDecade = decadeData.endDecade; var isLast = dStartDecade < startYear; var isNext = dEndDecade > endYear; var classNameMap = (_classNameMap = {}, (0, _defineProperty3['default'])(_classNameMap, prefixCls + '-cell', 1), (0, _defineProperty3['default'])(_classNameMap, prefixCls + '-selected-cell', dStartDecade <= currentYear && currentYear <= dEndDecade), (0, _defineProperty3['default'])(_classNameMap, prefixCls + '-last-century-cell', isLast), (0, _defineProperty3['default'])(_classNameMap, prefixCls + '-next-century-cell', isNext), _classNameMap); var content = dStartDecade + '-' + dEndDecade; var clickHandler = void 0; if (isLast) { clickHandler = _this2.previousCentury; } else if (isNext) { clickHandler = _this2.nextCentury; } else { clickHandler = chooseDecade.bind(_this2, dStartDecade); } return _react2['default'].createElement( 'td', { key: dStartDecade, onClick: clickHandler, role: 'gridcell', className: (0, _classnames2['default'])(classNameMap) }, _react2['default'].createElement( 'a', { className: prefixCls + '-decade' }, content ) ); }); return _react2['default'].createElement( 'tr', { key: decadeIndex, role: 'row' }, tds ); }); return _react2['default'].createElement( 'div', { className: this.prefixCls }, _react2['default'].createElement( 'div', { className: prefixCls + '-header' }, _react2['default'].createElement('a', { className: prefixCls + '-prev-century-btn', role: 'button', onClick: this.previousCentury, title: locale.previousCentury }), _react2['default'].createElement( 'div', { className: prefixCls + '-century' }, startYear, '-', endYear ), _react2['default'].createElement('a', { className: prefixCls + '-next-century-btn', role: 'button', onClick: this.nextCentury, title: locale.nextCentury }) ), _react2['default'].createElement( 'div', { className: prefixCls + '-body' }, _react2['default'].createElement( 'table', { className: prefixCls + '-table', cellSpacing: '0', role: 'grid' }, _react2['default'].createElement( 'tbody', { className: prefixCls + '-tbody' }, decadesEls ) ) ) ); } }]); return DecadePanel; }(_react2['default'].Component); exports['default'] = DecadePanel; DecadePanel.propTypes = { locale: _propTypes2['default'].object, value: _propTypes2['default'].object, defaultValue: _propTypes2['default'].object, rootPrefixCls: _propTypes2['default'].string }; DecadePanel.defaultProps = { onSelect: function onSelect() {} }; module.exports = exports['default']; /***/ }), /* 435 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _defineProperty2 = __webpack_require__(262); var _defineProperty3 = _interopRequireDefault(_defineProperty2); var _classCallCheck2 = __webpack_require__(185); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _createClass2 = __webpack_require__(254); var _createClass3 = _interopRequireDefault(_createClass2); var _possibleConstructorReturn2 = __webpack_require__(186); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(220); var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _classnames = __webpack_require__(3); var _classnames2 = _interopRequireDefault(_classnames); var _index = __webpack_require__(430); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var ROW = 4; var COL = 3; function chooseMonth(month) { var next = this.state.value.clone(); next.month(month); this.setAndSelectValue(next); } function noop() {} var MonthTable = function (_Component) { (0, _inherits3['default'])(MonthTable, _Component); function MonthTable(props) { (0, _classCallCheck3['default'])(this, MonthTable); var _this = (0, _possibleConstructorReturn3['default'])(this, (MonthTable.__proto__ || Object.getPrototypeOf(MonthTable)).call(this, props)); _this.state = { value: props.value }; return _this; } (0, _createClass3['default'])(MonthTable, [{ key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { if ('value' in nextProps) { this.setState({ value: nextProps.value }); } } }, { key: 'setAndSelectValue', value: function setAndSelectValue(value) { this.setState({ value: value }); this.props.onSelect(value); } }, { key: 'months', value: function months() { var value = this.state.value; var current = value.clone(); var months = []; var index = 0; for (var rowIndex = 0; rowIndex < ROW; rowIndex++) { months[rowIndex] = []; for (var colIndex = 0; colIndex < COL; colIndex++) { current.month(index); var content = (0, _index.getMonthName)(current); months[rowIndex][colIndex] = { value: index, content: content, title: content }; index++; } } return months; } }, { key: 'render', value: function render() { var _this2 = this; var props = this.props; var value = this.state.value; var today = (0, _index.getTodayTime)(value); var months = this.months(); var currentMonth = value.month(); var prefixCls = props.prefixCls, locale = props.locale, contentRender = props.contentRender, cellRender = props.cellRender; var monthsEls = months.map(function (month, index) { var tds = month.map(function (monthData) { var _classNameMap; var disabled = false; if (props.disabledDate) { var testValue = value.clone(); testValue.month(monthData.value); disabled = props.disabledDate(testValue); } var classNameMap = (_classNameMap = {}, (0, _defineProperty3['default'])(_classNameMap, prefixCls + '-cell', 1), (0, _defineProperty3['default'])(_classNameMap, prefixCls + '-cell-disabled', disabled), (0, _defineProperty3['default'])(_classNameMap, prefixCls + '-selected-cell', monthData.value === currentMonth), (0, _defineProperty3['default'])(_classNameMap, prefixCls + '-current-cell', today.year() === value.year() && monthData.value === today.month()), _classNameMap); var cellEl = void 0; if (cellRender) { var currentValue = value.clone(); currentValue.month(monthData.value); cellEl = cellRender(currentValue, locale); } else { var content = void 0; if (contentRender) { var _currentValue = value.clone(); _currentValue.month(monthData.value); content = contentRender(_currentValue, locale); } else { content = monthData.content; } cellEl = _react2['default'].createElement( 'a', { className: prefixCls + '-month' }, content ); } return _react2['default'].createElement( 'td', { role: 'gridcell', key: monthData.value, onClick: disabled ? null : chooseMonth.bind(_this2, monthData.value), title: monthData.title, className: (0, _classnames2['default'])(classNameMap) }, cellEl ); }); return _react2['default'].createElement( 'tr', { key: index, role: 'row' }, tds ); }); return _react2['default'].createElement( 'table', { className: prefixCls + '-table', cellSpacing: '0', role: 'grid' }, _react2['default'].createElement( 'tbody', { className: prefixCls + '-tbody' }, monthsEls ) ); } }]); return MonthTable; }(_react.Component); MonthTable.defaultProps = { onSelect: noop }; MonthTable.propTypes = { onSelect: _propTypes2['default'].func, cellRender: _propTypes2['default'].func, prefixCls: _propTypes2['default'].string, value: _propTypes2['default'].object }; exports['default'] = MonthTable; module.exports = exports['default']; /***/ }), /* 436 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports['default'] = mapSelf; var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function mirror(o) { return o; } function mapSelf(children) { // return ReactFragment return _react2['default'].Children.map(children, mirror); } module.exports = exports['default']; /***/ }), /* 437 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _defineProperty2 = __webpack_require__(262); var _defineProperty3 = _interopRequireDefault(_defineProperty2); var _extends2 = __webpack_require__(145); var _extends3 = _interopRequireDefault(_extends2); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _reactDom = __webpack_require__(12); var _reactDom2 = _interopRequireDefault(_reactDom); var _createReactClass = __webpack_require__(245); var _createReactClass2 = _interopRequireDefault(_createReactClass); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _mapSelf = __webpack_require__(436); var _mapSelf2 = _interopRequireDefault(_mapSelf); var _classnames = __webpack_require__(3); var _classnames2 = _interopRequireDefault(_classnames); var _TodayButton = __webpack_require__(438); var _TodayButton2 = _interopRequireDefault(_TodayButton); var _OkButton = __webpack_require__(439); var _OkButton2 = _interopRequireDefault(_OkButton); var _TimePickerButton = __webpack_require__(440); var _TimePickerButton2 = _interopRequireDefault(_TimePickerButton); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var CalendarFooter = (0, _createReactClass2['default'])({ displayName: 'CalendarFooter', propTypes: { prefixCls: _propTypes2['default'].string, showDateInput: _propTypes2['default'].bool, disabledTime: _propTypes2['default'].any, timePicker: _propTypes2['default'].element, selectedValue: _propTypes2['default'].any, showOk: _propTypes2['default'].bool, onSelect: _propTypes2['default'].func, value: _propTypes2['default'].object, renderFooter: _propTypes2['default'].func, defaultValue: _propTypes2['default'].object }, onSelect: function onSelect(value) { this.props.onSelect(value); }, getRootDOMNode: function getRootDOMNode() { return _reactDom2['default'].findDOMNode(this); }, render: function render() { var props = this.props; var value = props.value, prefixCls = props.prefixCls, showOk = props.showOk, timePicker = props.timePicker, renderFooter = props.renderFooter; var footerEl = null; var extraFooter = renderFooter(); if (props.showToday || timePicker || extraFooter) { var _cx; var nowEl = void 0; if (props.showToday) { nowEl = _react2['default'].createElement(_TodayButton2['default'], (0, _extends3['default'])({}, props, { value: value })); } var okBtn = void 0; if (showOk === true || showOk !== false && !!props.timePicker) { okBtn = _react2['default'].createElement(_OkButton2['default'], props); } var timePickerBtn = void 0; if (!!props.timePicker) { timePickerBtn = _react2['default'].createElement(_TimePickerButton2['default'], props); } var footerBtn = void 0; if (nowEl || timePickerBtn || okBtn) { footerBtn = _react2['default'].createElement( 'span', { className: prefixCls + '-footer-btn' }, (0, _mapSelf2['default'])([nowEl, timePickerBtn, okBtn]) ); } var cls = (0, _classnames2['default'])((_cx = {}, (0, _defineProperty3['default'])(_cx, prefixCls + '-footer', true), (0, _defineProperty3['default'])(_cx, prefixCls + '-footer-show-ok', okBtn), _cx)); footerEl = _react2['default'].createElement( 'div', { className: cls }, extraFooter, footerBtn ); } return footerEl; } }); exports['default'] = CalendarFooter; module.exports = exports['default']; /***/ }), /* 438 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports['default'] = TodayButton; var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _util = __webpack_require__(430); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function TodayButton(_ref) { var prefixCls = _ref.prefixCls, locale = _ref.locale, value = _ref.value, timePicker = _ref.timePicker, disabled = _ref.disabled, disabledDate = _ref.disabledDate, onToday = _ref.onToday, text = _ref.text; var localeNow = (!text && timePicker ? locale.now : text) || locale.today; var disabledToday = disabledDate && !(0, _util.isAllowedDate)((0, _util.getTodayTime)(value), disabledDate); var isDisabled = disabledToday || disabled; var disabledTodayClass = isDisabled ? prefixCls + '-today-btn-disabled' : ''; return _react2['default'].createElement( 'a', { className: prefixCls + '-today-btn ' + disabledTodayClass, role: 'button', onClick: isDisabled ? null : onToday, title: (0, _util.getTodayTimeStr)(value) }, localeNow ); } module.exports = exports['default']; /***/ }), /* 439 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = OkButton; var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } function OkButton(_ref) { var prefixCls = _ref.prefixCls, locale = _ref.locale, okDisabled = _ref.okDisabled, onOk = _ref.onOk; var className = prefixCls + "-ok-btn"; if (okDisabled) { className += " " + prefixCls + "-ok-btn-disabled"; } return _react2["default"].createElement( "a", { className: className, role: "button", onClick: okDisabled ? null : onOk }, locale.ok ); } module.exports = exports['default']; /***/ }), /* 440 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _defineProperty2 = __webpack_require__(262); var _defineProperty3 = _interopRequireDefault(_defineProperty2); exports['default'] = TimePickerButton; var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _classnames2 = __webpack_require__(3); var _classnames3 = _interopRequireDefault(_classnames2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function TimePickerButton(_ref) { var _classnames; var prefixCls = _ref.prefixCls, locale = _ref.locale, showTimePicker = _ref.showTimePicker, onOpenTimePicker = _ref.onOpenTimePicker, onCloseTimePicker = _ref.onCloseTimePicker, timePickerDisabled = _ref.timePickerDisabled; var className = (0, _classnames3['default'])((_classnames = {}, (0, _defineProperty3['default'])(_classnames, prefixCls + '-time-picker-btn', true), (0, _defineProperty3['default'])(_classnames, prefixCls + '-time-picker-btn-disabled', timePickerDisabled), _classnames)); var onClick = null; if (!timePickerDisabled) { onClick = showTimePicker ? onCloseTimePicker : onOpenTimePicker; } return _react2['default'].createElement( 'a', { className: className, role: 'button', onClick: onClick }, showTimePicker ? locale.dateSelect : locale.timeSelect ); } module.exports = exports['default']; /***/ }), /* 441 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _defineProperty2 = __webpack_require__(262); var _defineProperty3 = _interopRequireDefault(_defineProperty2); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _classnames = __webpack_require__(3); var _classnames2 = _interopRequireDefault(_classnames); var _moment = __webpack_require__(302); var _moment2 = _interopRequireDefault(_moment); var _index = __webpack_require__(430); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function noop() {} function getNow() { return (0, _moment2['default'])(); } function getNowByCurrentStateValue(value) { var ret = void 0; if (value) { ret = (0, _index.getTodayTime)(value); } else { ret = getNow(); } return ret; } var CalendarMixin = { propTypes: { value: _propTypes2['default'].object, defaultValue: _propTypes2['default'].object, onKeyDown: _propTypes2['default'].func }, getDefaultProps: function getDefaultProps() { return { onKeyDown: noop }; }, getInitialState: function getInitialState() { var props = this.props; var value = props.value || props.defaultValue || getNow(); return { value: value, selectedValue: props.selectedValue || props.defaultSelectedValue }; }, componentWillReceiveProps: function componentWillReceiveProps(nextProps) { var value = nextProps.value; var selectedValue = nextProps.selectedValue; if ('value' in nextProps) { value = value || nextProps.defaultValue || getNowByCurrentStateValue(this.state.value); this.setState({ value: value }); } if ('selectedValue' in nextProps) { this.setState({ selectedValue: selectedValue }); } }, onSelect: function onSelect(value, cause) { if (value) { this.setValue(value); } this.setSelectedValue(value, cause); }, renderRoot: function renderRoot(newProps) { var _className; var props = this.props; var prefixCls = props.prefixCls; var className = (_className = {}, (0, _defineProperty3['default'])(_className, prefixCls, 1), (0, _defineProperty3['default'])(_className, prefixCls + '-hidden', !props.visible), (0, _defineProperty3['default'])(_className, props.className, !!props.className), (0, _defineProperty3['default'])(_className, newProps.className, !!newProps.className), _className); return _react2['default'].createElement( 'div', { ref: 'root', className: '' + (0, _classnames2['default'])(className), style: this.props.style, tabIndex: '0', onKeyDown: this.onKeyDown }, newProps.children ); }, setSelectedValue: function setSelectedValue(selectedValue, cause) { // if (this.isAllowedDate(selectedValue)) { if (!('selectedValue' in this.props)) { this.setState({ selectedValue: selectedValue }); } this.props.onSelect(selectedValue, cause); // } }, setValue: function setValue(value) { var originalValue = this.state.value; if (!('value' in this.props)) { this.setState({ value: value }); } if (originalValue && value && !originalValue.isSame(value) || !originalValue && value || originalValue && !value) { this.props.onChange(value); } }, isAllowedDate: function isAllowedDate(value) { var disabledDate = this.props.disabledDate; var disabledTime = this.props.disabledTime; return (0, _index.isAllowedDate)(value, disabledDate, disabledTime); } }; exports['default'] = CalendarMixin; module.exports = exports['default']; /***/ }), /* 442 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _en_US = __webpack_require__(443); var _en_US2 = _interopRequireDefault(_en_US); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function noop() {} exports['default'] = { propTypes: { 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 }, getDefaultProps: function getDefaultProps() { return { 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; } }; }, shouldComponentUpdate: function shouldComponentUpdate(nextProps) { return this.props.visible || nextProps.visible; }, getFormat: function getFormat() { var format = this.props.format; var _props = this.props, locale = _props.locale, timePicker = _props.timePicker; if (!format) { if (timePicker) { format = locale.dateTimeFormat; } else { format = locale.dateFormat; } } return format; }, focus: function focus() { if (this.refs.root) { this.refs.root.focus(); } } }; module.exports = exports['default']; /***/ }), /* 443 */ /***/ (function(module, exports) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports['default'] = { today: 'Today', now: 'Now', backToToday: 'Back to today', ok: 'Ok', clear: 'Clear', month: 'Month', year: 'Year', timeSelect: 'Select time', dateSelect: 'Select date', monthSelect: 'Choose a month', yearSelect: 'Choose a year', decadeSelect: 'Choose a decade', yearFormat: 'YYYY', dateFormat: 'M/D/YYYY', dayFormat: 'D', dateTimeFormat: 'M/D/YYYY HH:mm:ss', monthBeforeYear: true, previousMonth: 'Previous month (PageUp)', nextMonth: 'Next month (PageDown)', previousYear: 'Last year (Control + left)', nextYear: 'Next year (Control + right)', previousDecade: 'Last decade', nextDecade: 'Next decade', previousCentury: 'Last century', nextCentury: 'Next century' }; module.exports = exports['default']; /***/ }), /* 444 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _reactDom = __webpack_require__(12); var _reactDom2 = _interopRequireDefault(_reactDom); var _createReactClass = __webpack_require__(245); var _createReactClass2 = _interopRequireDefault(_createReactClass); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _moment = __webpack_require__(302); var _moment2 = _interopRequireDefault(_moment); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var DateInput = (0, _createReactClass2['default'])({ displayName: 'DateInput', propTypes: { prefixCls: _propTypes2['default'].string, timePicker: _propTypes2['default'].object, value: _propTypes2['default'].object, disabledTime: _propTypes2['default'].any, format: _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 }, getInitialState: function getInitialState() { var selectedValue = this.props.selectedValue; return { str: selectedValue && selectedValue.format(this.props.format) || '', invalid: false }; }, componentWillReceiveProps: function componentWillReceiveProps(nextProps) { // when popup show, click body will call this, bug! var selectedValue = nextProps.selectedValue; this.setState({ str: selectedValue && selectedValue.format(nextProps.format) || '', invalid: false }); }, onInputChange: function onInputChange(event) { var str = event.target.value; this.setState({ str: str }); var value = void 0; var _props = this.props, disabledDate = _props.disabledDate, format = _props.format, onChange = _props.onChange; if (str) { var parsed = (0, _moment2['default'])(str, format, true); if (!parsed.isValid()) { this.setState({ invalid: true }); return; } value = this.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))) { var originalValue = this.props.selectedValue; if (originalValue && value) { if (!originalValue.isSame(value)) { onChange(value); } } else if (originalValue !== value) { onChange(value); } } else { this.setState({ invalid: true }); return; } } else { onChange(null); } this.setState({ invalid: false }); }, onClear: function onClear() { this.setState({ str: '' }); this.props.onClear(null); }, getRootDOMNode: function getRootDOMNode() { return _reactDom2['default'].findDOMNode(this); }, focus: function focus() { this.refs.dateInput.focus(); }, 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; 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: 'dateInput', className: prefixCls + '-input ' + invalidClass, value: str, disabled: props.disabled, placeholder: placeholder, onChange: this.onInputChange }) ), props.showClear ? _react2['default'].createElement('a', { className: prefixCls + '-clear-btn', role: 'button', title: locale.clear, onClick: this.onClear }) : null ); } }); exports['default'] = DateInput; module.exports = exports['default']; /***/ }), /* 445 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _reactDom = __webpack_require__(12); var _reactDom2 = _interopRequireDefault(_reactDom); var _createReactClass = __webpack_require__(245); var _createReactClass2 = _interopRequireDefault(_createReactClass); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _createChainedFunction = __webpack_require__(239); var _createChainedFunction2 = _interopRequireDefault(_createChainedFunction); var _KeyCode = __webpack_require__(238); var _KeyCode2 = _interopRequireDefault(_KeyCode); var _placements = __webpack_require__(446); var _placements2 = _interopRequireDefault(_placements); var _rcTrigger = __webpack_require__(244); var _rcTrigger2 = _interopRequireDefault(_rcTrigger); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function noop() {} function refFn(field, component) { this[field] = component; } var Picker = (0, _createReactClass2['default'])({ displayName: '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 }, getDefaultProps: function getDefaultProps() { return { prefixCls: 'rc-calendar-picker', style: {}, align: {}, placement: 'bottomLeft', defaultOpen: false, onChange: noop, onOpenChange: noop }; }, getInitialState: function getInitialState() { var props = this.props; 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'); return { open: open, value: value }; }, componentWillReceiveProps: function componentWillReceiveProps(nextProps) { var value = nextProps.value, open = nextProps.open; if ('value' in nextProps) { this.setState({ value: value }); } if (open !== undefined) { this.setState({ open: open }); } }, 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); } }, componentWillUnmount: function componentWillUnmount() { clearTimeout(this.focusTimeout); }, onCalendarKeyDown: function onCalendarKeyDown(event) { if (event.keyCode === _KeyCode2['default'].ESC) { event.stopPropagation(); this.close(this.focus); } }, onCalendarSelect: function onCalendarSelect(value) { var cause = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var props = this.props; if (!('value' in props)) { this.setState({ value: value }); } if (cause.source === 'keyboard' || !props.calendar.props.timePicker && cause.source !== 'dateInput' || cause.source === 'todayButton') { this.close(this.focus); } props.onChange(value); }, onKeyDown: function onKeyDown(event) { if (event.keyCode === _KeyCode2['default'].DOWN && !this.state.open) { this.open(); event.preventDefault(); } }, onCalendarOk: function onCalendarOk() { this.close(this.focus); }, onCalendarClear: function onCalendarClear() { this.close(this.focus); }, onVisibleChange: function onVisibleChange(open) { this.setOpen(open); }, getCalendarElement: function getCalendarElement() { var props = this.props; var state = this.state; var calendarProps = props.calendar.props; var value = state.value; var defaultValue = value; var extraProps = { ref: this.saveCalendarRef, defaultValue: defaultValue || calendarProps.defaultValue, selectedValue: value, onKeyDown: this.onCalendarKeyDown, onOk: (0, _createChainedFunction2['default'])(calendarProps.onOk, this.onCalendarOk), onSelect: (0, _createChainedFunction2['default'])(calendarProps.onSelect, this.onCalendarSelect), onClear: (0, _createChainedFunction2['default'])(calendarProps.onClear, this.onCalendarClear) }; return _react2['default'].cloneElement(props.calendar, extraProps); }, setOpen: function setOpen(open, callback) { var onOpenChange = this.props.onOpenChange; if (this.state.open !== open) { if (!('open' in this.props)) { this.setState({ open: open }, callback); } onOpenChange(open); } }, open: function open(callback) { this.setOpen(true, callback); }, close: function close(callback) { this.setOpen(false, callback); }, focus: function focus() { if (!this.state.open) { _reactDom2['default'].findDOMNode(this).focus(); } }, focusCalendar: function focusCalendar() { if (this.state.open && this.calendarInstance !== null) { this.calendarInstance.focus(); } }, 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, 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 }, _react2['default'].cloneElement(children(state, props), { onKeyDown: this.onKeyDown }) ); } }); exports['default'] = Picker; module.exports = exports['default']; /***/ }), /* 446 */ /***/ (function(module, exports) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var autoAdjustOverflow = { adjustX: 1, adjustY: 1 }; var targetOffset = [0, 0]; var placements = { bottomLeft: { points: ['tl', 'tl'], overflow: autoAdjustOverflow, offset: [0, -3], targetOffset: targetOffset }, bottomRight: { points: ['tr', 'tr'], overflow: autoAdjustOverflow, offset: [0, -3], targetOffset: targetOffset }, topRight: { points: ['br', 'br'], overflow: autoAdjustOverflow, offset: [0, 3], targetOffset: targetOffset }, topLeft: { points: ['bl', 'bl'], overflow: autoAdjustOverflow, offset: [0, 3], targetOffset: targetOffset } }; exports['default'] = placements; module.exports = exports['default']; /***/ }), /* 447 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _defineProperty2 = __webpack_require__(262); var _defineProperty3 = _interopRequireDefault(_defineProperty2); var _classCallCheck2 = __webpack_require__(185); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _createClass2 = __webpack_require__(254); var _createClass3 = _interopRequireDefault(_createClass2); var _possibleConstructorReturn2 = __webpack_require__(186); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(220); var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _Header = __webpack_require__(448); var _Header2 = _interopRequireDefault(_Header); var _Combobox = __webpack_require__(449); var _Combobox2 = _interopRequireDefault(_Combobox); var _moment = __webpack_require__(302); var _moment2 = _interopRequireDefault(_moment); var _classnames = __webpack_require__(3); var _classnames2 = _interopRequireDefault(_classnames); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function noop() {} function generateOptions(length, disabledOptions, hideDisabledOptions) { var step = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1; var arr = []; for (var value = 0; value < length; value += step) { if (!disabledOptions || disabledOptions.indexOf(value) < 0 || !hideDisabledOptions) { arr.push(value); } } return arr; } var Panel = function (_Component) { (0, _inherits3['default'])(Panel, _Component); function Panel(props) { (0, _classCallCheck3['default'])(this, Panel); var _this = (0, _possibleConstructorReturn3['default'])(this, (Panel.__proto__ || Object.getPrototypeOf(Panel)).call(this, props)); _this.onChange = function (newValue) { _this.setState({ value: newValue }); _this.props.onChange(newValue); }; _this.onCurrentSelectPanelChange = function (currentSelectPanel) { _this.setState({ currentSelectPanel: currentSelectPanel }); }; _this.disabledHours = function () { var _this$props = _this.props, use12Hours = _this$props.use12Hours, disabledHours = _this$props.disabledHours; var disabledOptions = disabledHours(); if (use12Hours && Array.isArray(disabledOptions)) { if (_this.isAM()) { disabledOptions = disabledOptions.filter(function (h) { return h < 12; }).map(function (h) { return h === 0 ? 12 : h; }); } else { disabledOptions = disabledOptions.map(function (h) { return h === 12 ? 12 : h - 12; }); } } return disabledOptions; }; _this.state = { value: props.value, selectionRange: [] }; return _this; } (0, _createClass3['default'])(Panel, [{ key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { var value = nextProps.value; if (value) { this.setState({ value: value }); } } }, { key: 'close', // https://github.com/ant-design/ant-design/issues/5829 value: function close() { this.props.onEsc(); } }, { key: 'isAM', value: function isAM() { var value = this.state.value || this.props.defaultOpenValue; return value.hour() >= 0 && value.hour() < 12; } }, { key: 'render', value: function render() { var _classNames; var _props = this.props, prefixCls = _props.prefixCls, className = _props.className, placeholder = _props.placeholder, disabledMinutes = _props.disabledMinutes, disabledSeconds = _props.disabledSeconds, hideDisabledOptions = _props.hideDisabledOptions, allowEmpty = _props.allowEmpty, showHour = _props.showHour, showMinute = _props.showMinute, showSecond = _props.showSecond, format = _props.format, defaultOpenValue = _props.defaultOpenValue, clearText = _props.clearText, onEsc = _props.onEsc, addon = _props.addon, use12Hours = _props.use12Hours, onClear = _props.onClear, focusOnOpen = _props.focusOnOpen, onKeyDown = _props.onKeyDown, hourStep = _props.hourStep, minuteStep = _props.minuteStep, secondStep = _props.secondStep, inputReadOnly = _props.inputReadOnly, clearIcon = _props.clearIcon; var _state = this.state, value = _state.value, currentSelectPanel = _state.currentSelectPanel; var disabledHourOptions = this.disabledHours(); var disabledMinuteOptions = disabledMinutes(value ? value.hour() : null); var disabledSecondOptions = disabledSeconds(value ? value.hour() : null, value ? value.minute() : null); var hourOptions = generateOptions(24, disabledHourOptions, hideDisabledOptions, hourStep); var minuteOptions = generateOptions(60, disabledMinuteOptions, hideDisabledOptions, minuteStep); var secondOptions = generateOptions(60, disabledSecondOptions, hideDisabledOptions, secondStep); return _react2['default'].createElement( 'div', { className: (0, _classnames2['default'])((_classNames = {}, (0, _defineProperty3['default'])(_classNames, prefixCls + '-inner', true), (0, _defineProperty3['default'])(_classNames, className, !!className), _classNames)) }, _react2['default'].createElement(_Header2['default'], { clearText: clearText, prefixCls: prefixCls, defaultOpenValue: defaultOpenValue, value: value, currentSelectPanel: currentSelectPanel, onEsc: onEsc, format: format, placeholder: placeholder, hourOptions: hourOptions, minuteOptions: minuteOptions, secondOptions: secondOptions, disabledHours: this.disabledHours, disabledMinutes: disabledMinutes, disabledSeconds: disabledSeconds, onChange: this.onChange, onClear: onClear, allowEmpty: allowEmpty, focusOnOpen: focusOnOpen, onKeyDown: onKeyDown, inputReadOnly: inputReadOnly, clearIcon: clearIcon }), _react2['default'].createElement(_Combobox2['default'], { prefixCls: prefixCls, value: value, defaultOpenValue: defaultOpenValue, format: format, onChange: this.onChange, showHour: showHour, showMinute: showMinute, showSecond: showSecond, hourOptions: hourOptions, minuteOptions: minuteOptions, secondOptions: secondOptions, disabledHours: this.disabledHours, disabledMinutes: disabledMinutes, disabledSeconds: disabledSeconds, onCurrentSelectPanelChange: this.onCurrentSelectPanelChange, use12Hours: use12Hours, isAM: this.isAM() }), addon(this) ); } }]); return Panel; }(_react.Component); Panel.propTypes = { clearText: _propTypes2['default'].string, prefixCls: _propTypes2['default'].string, className: _propTypes2['default'].string, defaultOpenValue: _propTypes2['default'].object, value: _propTypes2['default'].object, placeholder: _propTypes2['default'].string, format: _propTypes2['default'].string, inputReadOnly: _propTypes2['default'].bool, disabledHours: _propTypes2['default'].func, disabledMinutes: _propTypes2['default'].func, disabledSeconds: _propTypes2['default'].func, hideDisabledOptions: _propTypes2['default'].bool, onChange: _propTypes2['default'].func, onEsc: _propTypes2['default'].func, allowEmpty: _propTypes2['default'].bool, showHour: _propTypes2['default'].bool, showMinute: _propTypes2['default'].bool, showSecond: _propTypes2['default'].bool, onClear: _propTypes2['default'].func, use12Hours: _propTypes2['default'].bool, hourStep: _propTypes2['default'].number, minuteStep: _propTypes2['default'].number, secondStep: _propTypes2['default'].number, addon: _propTypes2['default'].func, focusOnOpen: _propTypes2['default'].bool, onKeyDown: _propTypes2['default'].func, clearIcon: _propTypes2['default'].node }; Panel.defaultProps = { prefixCls: 'rc-time-picker-panel', onChange: noop, onClear: noop, disabledHours: noop, disabledMinutes: noop, disabledSeconds: noop, defaultOpenValue: (0, _moment2['default'])(), use12Hours: false, addon: noop, onKeyDown: noop, inputReadOnly: false }; exports['default'] = Panel; module.exports = exports['default']; /***/ }), /* 448 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _classCallCheck2 = __webpack_require__(185); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _createClass2 = __webpack_require__(254); var _createClass3 = _interopRequireDefault(_createClass2); var _possibleConstructorReturn2 = __webpack_require__(186); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(220); var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _moment = __webpack_require__(302); var _moment2 = _interopRequireDefault(_moment); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var Header = function (_Component) { (0, _inherits3['default'])(Header, _Component); function Header(props) { (0, _classCallCheck3['default'])(this, Header); var _this = (0, _possibleConstructorReturn3['default'])(this, (Header.__proto__ || Object.getPrototypeOf(Header)).call(this, props)); _initialiseProps.call(_this); var value = props.value, format = props.format; _this.state = { str: value && value.format(format) || '', invalid: false }; return _this; } (0, _createClass3['default'])(Header, [{ key: 'componentDidMount', value: function componentDidMount() { var _this2 = this; if (this.props.focusOnOpen) { // Wait one frame for the panel to be positioned before focusing var requestAnimationFrame = window.requestAnimationFrame || window.setTimeout; requestAnimationFrame(function () { _this2.refs.input.focus(); _this2.refs.input.select(); }); } } }, { key: 'componentWillReceiveProps', value: function componentWillReceiveProps(nextProps) { var value = nextProps.value, format = nextProps.format; this.setState({ str: value && value.format(format) || '', invalid: false }); } }, { key: 'getClearButton', value: function getClearButton() { var _props = this.props, prefixCls = _props.prefixCls, allowEmpty = _props.allowEmpty, clearIcon = _props.clearIcon; if (!allowEmpty) { return null; } return _react2['default'].createElement( 'a', { role: 'button', className: prefixCls + '-clear-btn', title: this.props.clearText, onMouseDown: this.onClear }, clearIcon || _react2['default'].createElement('i', { className: prefixCls + '-clear-btn-icon' }) ); } }, { key: 'getProtoValue', value: function getProtoValue() { return this.props.value || this.props.defaultOpenValue; } }, { key: 'getInput', value: function getInput() { var _props2 = this.props, prefixCls = _props2.prefixCls, placeholder = _props2.placeholder, inputReadOnly = _props2.inputReadOnly; var _state = this.state, invalid = _state.invalid, str = _state.str; var invalidClass = invalid ? prefixCls + '-input-invalid' : ''; return _react2['default'].createElement('input', { className: prefixCls + '-input ' + invalidClass, ref: 'input', onKeyDown: this.onKeyDown, value: str, placeholder: placeholder, onChange: this.onInputChange, readOnly: !!inputReadOnly }); } }, { key: 'render', value: function render() { var prefixCls = this.props.prefixCls; return _react2['default'].createElement( 'div', { className: prefixCls + '-input-wrap' }, this.getInput(), this.getClearButton() ); } }]); return Header; }(_react.Component); Header.propTypes = { format: _propTypes2['default'].string, prefixCls: _propTypes2['default'].string, disabledDate: _propTypes2['default'].func, placeholder: _propTypes2['default'].string, clearText: _propTypes2['default'].string, value: _propTypes2['default'].object, inputReadOnly: _propTypes2['default'].bool, hourOptions: _propTypes2['default'].array, minuteOptions: _propTypes2['default'].array, secondOptions: _propTypes2['default'].array, disabledHours: _propTypes2['default'].func, disabledMinutes: _propTypes2['default'].func, disabledSeconds: _propTypes2['default'].func, onChange: _propTypes2['default'].func, onClear: _propTypes2['default'].func, onEsc: _propTypes2['default'].func, allowEmpty: _propTypes2['default'].bool, defaultOpenValue: _propTypes2['default'].object, currentSelectPanel: _propTypes2['default'].string, focusOnOpen: _propTypes2['default'].bool, onKeyDown: _propTypes2['default'].func, clearIcon: _propTypes2['default'].node }; Header.defaultProps = { inputReadOnly: false }; var _initialiseProps = function _initialiseProps() { var _this3 = this; this.onInputChange = function (event) { var str = event.target.value; _this3.setState({ str: str }); var _props3 = _this3.props, format = _props3.format, hourOptions = _props3.hourOptions, minuteOptions = _props3.minuteOptions, secondOptions = _props3.secondOptions, disabledHours = _props3.disabledHours, disabledMinutes = _props3.disabledMinutes, disabledSeconds = _props3.disabledSeconds, onChange = _props3.onChange, allowEmpty = _props3.allowEmpty; if (str) { var originalValue = _this3.props.value; var value = _this3.getProtoValue().clone(); var parsed = (0, _moment2['default'])(str, format, true); if (!parsed.isValid()) { _this3.setState({ invalid: true }); return; } value.hour(parsed.hour()).minute(parsed.minute()).second(parsed.second()); // if time value not allowed, response warning. if (hourOptions.indexOf(value.hour()) < 0 || minuteOptions.indexOf(value.minute()) < 0 || secondOptions.indexOf(value.second()) < 0) { _this3.setState({ invalid: true }); return; } // if time value is disabled, response warning. var disabledHourOptions = disabledHours(); var disabledMinuteOptions = disabledMinutes(value.hour()); var disabledSecondOptions = disabledSeconds(value.hour(), value.minute()); if (disabledHourOptions && disabledHourOptions.indexOf(value.hour()) >= 0 || disabledMinuteOptions && disabledMinuteOptions.indexOf(value.minute()) >= 0 || disabledSecondOptions && disabledSecondOptions.indexOf(value.second()) >= 0) { _this3.setState({ invalid: true }); return; } if (originalValue) { if (originalValue.hour() !== value.hour() || originalValue.minute() !== value.minute() || originalValue.second() !== value.second()) { // keep other fields for rc-calendar var changedValue = originalValue.clone(); changedValue.hour(value.hour()); changedValue.minute(value.minute()); changedValue.second(value.second()); onChange(changedValue); } } else if (originalValue !== value) { onChange(value); } } else if (allowEmpty) { onChange(null); } else { _this3.setState({ invalid: true }); return; } _this3.setState({ invalid: false }); }; this.onKeyDown = function (e) { var _props4 = _this3.props, onEsc = _props4.onEsc, onKeyDown = _props4.onKeyDown; if (e.keyCode === 27) { onEsc(); } onKeyDown(e); }; this.onClear = function () { _this3.setState({ str: '' }); _this3.props.onClear(); }; }; exports['default'] = Header; module.exports = exports['default']; /***/ }), /* 449 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _classCallCheck2 = __webpack_require__(185); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _createClass2 = __webpack_require__(254); var _createClass3 = _interopRequireDefault(_createClass2); var _possibleConstructorReturn2 = __webpack_require__(186); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(220); var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _Select = __webpack_require__(450); var _Select2 = _interopRequireDefault(_Select); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var formatOption = function formatOption(option, disabledOptions) { var value = '' + option; if (option < 10) { value = '0' + option; } var disabled = false; if (disabledOptions && disabledOptions.indexOf(option) >= 0) { disabled = true; } return { value: value, disabled: disabled }; }; var Combobox = function (_Component) { (0, _inherits3['default'])(Combobox, _Component); function Combobox() { var _ref; var _temp, _this, _ret; (0, _classCallCheck3['default'])(this, Combobox); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = (0, _possibleConstructorReturn3['default'])(this, (_ref = Combobox.__proto__ || Object.getPrototypeOf(Combobox)).call.apply(_ref, [this].concat(args))), _this), _this.onItemChange = function (type, itemValue) { var _this$props = _this.props, onChange = _this$props.onChange, defaultOpenValue = _this$props.defaultOpenValue, use12Hours = _this$props.use12Hours; var value = (_this.props.value || defaultOpenValue).clone(); if (type === 'hour') { if (use12Hours) { if (_this.props.isAM) { value.hour(+itemValue % 12); } else { value.hour(+itemValue % 12 + 12); } } else { value.hour(+itemValue); } } else if (type === 'minute') { value.minute(+itemValue); } else if (type === 'ampm') { var ampm = itemValue.toUpperCase(); if (use12Hours) { if (ampm === 'PM' && value.hour() < 12) { value.hour(value.hour() % 12 + 12); } if (ampm === 'AM') { if (value.hour() >= 12) { value.hour(value.hour() - 12); } } } } else { value.second(+itemValue); } onChange(value); }, _this.onEnterSelectPanel = function (range) { _this.props.onCurrentSelectPanelChange(range); }, _temp), (0, _possibleConstructorReturn3['default'])(_this, _ret); } (0, _createClass3['default'])(Combobox, [{ key: 'getHourSelect', value: function getHourSelect(hour) { var _props = this.props, prefixCls = _props.prefixCls, hourOptions = _props.hourOptions, disabledHours = _props.disabledHours, showHour = _props.showHour, use12Hours = _props.use12Hours; if (!showHour) { return null; } var disabledOptions = disabledHours(); var hourOptionsAdj = void 0; var hourAdj = void 0; if (use12Hours) { hourOptionsAdj = [12].concat(hourOptions.filter(function (h) { return h < 12 && h > 0; })); hourAdj = hour % 12 || 12; } else { hourOptionsAdj = hourOptions; hourAdj = hour; } return _react2['default'].createElement(_Select2['default'], { prefixCls: prefixCls, options: hourOptionsAdj.map(function (option) { return formatOption(option, disabledOptions); }), selectedIndex: hourOptionsAdj.indexOf(hourAdj), type: 'hour', onSelect: this.onItemChange, onMouseEnter: this.onEnterSelectPanel.bind(this, 'hour') }); } }, { key: 'getMinuteSelect', value: function getMinuteSelect(minute) { var _props2 = this.props, prefixCls = _props2.prefixCls, minuteOptions = _props2.minuteOptions, disabledMinutes = _props2.disabledMinutes, defaultOpenValue = _props2.defaultOpenValue, showMinute = _props2.showMinute; if (!showMinute) { return null; } var value = this.props.value || defaultOpenValue; var disabledOptions = disabledMinutes(value.hour()); return _react2['default'].createElement(_Select2['default'], { prefixCls: prefixCls, options: minuteOptions.map(function (option) { return formatOption(option, disabledOptions); }), selectedIndex: minuteOptions.indexOf(minute), type: 'minute', onSelect: this.onItemChange, onMouseEnter: this.onEnterSelectPanel.bind(this, 'minute') }); } }, { key: 'getSecondSelect', value: function getSecondSelect(second) { var _props3 = this.props, prefixCls = _props3.prefixCls, secondOptions = _props3.secondOptions, disabledSeconds = _props3.disabledSeconds, showSecond = _props3.showSecond, defaultOpenValue = _props3.defaultOpenValue; if (!showSecond) { return null; } var value = this.props.value || defaultOpenValue; var disabledOptions = disabledSeconds(value.hour(), value.minute()); return _react2['default'].createElement(_Select2['default'], { prefixCls: prefixCls, options: secondOptions.map(function (option) { return formatOption(option, disabledOptions); }), selectedIndex: secondOptions.indexOf(second), type: 'second', onSelect: this.onItemChange, onMouseEnter: this.onEnterSelectPanel.bind(this, 'second') }); } }, { key: 'getAMPMSelect', value: function getAMPMSelect() { var _props4 = this.props, prefixCls = _props4.prefixCls, use12Hours = _props4.use12Hours, format = _props4.format; if (!use12Hours) { return null; } var AMPMOptions = ['am', 'pm'] // If format has A char, then we should uppercase AM/PM .map(function (c) { return format.match(/\sA/) ? c.toUpperCase() : c; }).map(function (c) { return { value: c }; }); var selected = this.props.isAM ? 0 : 1; return _react2['default'].createElement(_Select2['default'], { prefixCls: prefixCls, options: AMPMOptions, selectedIndex: selected, type: 'ampm', onSelect: this.onItemChange, onMouseEnter: this.onEnterSelectPanel.bind(this, 'ampm') }); } }, { key: 'render', value: function render() { var _props5 = this.props, prefixCls = _props5.prefixCls, defaultOpenValue = _props5.defaultOpenValue; var value = this.props.value || defaultOpenValue; return _react2['default'].createElement( 'div', { className: prefixCls + '-combobox' }, this.getHourSelect(value.hour()), this.getMinuteSelect(value.minute()), this.getSecondSelect(value.second()), this.getAMPMSelect(value.hour()) ); } }]); return Combobox; }(_react.Component); Combobox.propTypes = { format: _propTypes2['default'].string, defaultOpenValue: _propTypes2['default'].object, prefixCls: _propTypes2['default'].string, value: _propTypes2['default'].object, onChange: _propTypes2['default'].func, showHour: _propTypes2['default'].bool, showMinute: _propTypes2['default'].bool, showSecond: _propTypes2['default'].bool, hourOptions: _propTypes2['default'].array, minuteOptions: _propTypes2['default'].array, secondOptions: _propTypes2['default'].array, disabledHours: _propTypes2['default'].func, disabledMinutes: _propTypes2['default'].func, disabledSeconds: _propTypes2['default'].func, onCurrentSelectPanelChange: _propTypes2['default'].func, use12Hours: _propTypes2['default'].bool, isAM: _propTypes2['default'].bool }; exports['default'] = Combobox; module.exports = exports['default']; /***/ }), /* 450 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _defineProperty2 = __webpack_require__(262); var _defineProperty3 = _interopRequireDefault(_defineProperty2); var _classCallCheck2 = __webpack_require__(185); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _createClass2 = __webpack_require__(254); var _createClass3 = _interopRequireDefault(_createClass2); var _possibleConstructorReturn2 = __webpack_require__(186); var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2); var _inherits2 = __webpack_require__(220); var _inherits3 = _interopRequireDefault(_inherits2); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _reactDom = __webpack_require__(12); var _reactDom2 = _interopRequireDefault(_reactDom); var _classnames3 = __webpack_require__(3); var _classnames4 = _interopRequireDefault(_classnames3); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var scrollTo = function scrollTo(element, to, duration) { var requestAnimationFrame = window.requestAnimationFrame || function requestAnimationFrameTimeout() { return setTimeout(arguments[0], 10); }; // jump to target if duration zero if (duration <= 0) { element.scrollTop = to; return; } var difference = to - element.scrollTop; var perTick = difference / duration * 10; requestAnimationFrame(function () { element.scrollTop = element.scrollTop + perTick; if (element.scrollTop === to) return; scrollTo(element, to, duration - 10); }); }; var Select = function (_Component) { (0, _inherits3['default'])(Select, _Component); function Select() { var _ref; var _temp, _this, _ret; (0, _classCallCheck3['default'])(this, Select); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = (0, _possibleConstructorReturn3['default'])(this, (_ref = Select.__proto__ || Object.getPrototypeOf(Select)).call.apply(_ref, [this].concat(args))), _this), _this.state = { active: false }, _this.onSelect = function (value) { var _this$props = _this.props, onSelect = _this$props.onSelect, type = _this$props.type; onSelect(type, value); }, _this.handleMouseEnter = function (e) { _this.setState({ active: true }); _this.props.onMouseEnter(e); }, _this.handleMouseLeave = function () { _this.setState({ active: false }); }, _this.saveList = function (node) { _this.list = node; }, _temp), (0, _possibleConstructorReturn3['default'])(_this, _ret); } (0, _createClass3['default'])(Select, [{ key: 'componentDidMount', value: function componentDidMount() { // jump to selected option this.scrollToSelected(0); } }, { key: 'componentDidUpdate', value: function componentDidUpdate(prevProps) { // smooth scroll to selected option if (prevProps.selectedIndex !== this.props.selectedIndex) { this.scrollToSelected(120); } } }, { key: 'getOptions', value: function getOptions() { var _this2 = this; var _props = this.props, options = _props.options, selectedIndex = _props.selectedIndex, prefixCls = _props.prefixCls; return options.map(function (item, index) { var _classnames; var cls = (0, _classnames4['default'])((_classnames = {}, (0, _defineProperty3['default'])(_classnames, prefixCls + '-select-option-selected', selectedIndex === index), (0, _defineProperty3['default'])(_classnames, prefixCls + '-select-option-disabled', item.disabled), _classnames)); var onclick = null; if (!item.disabled) { onclick = _this2.onSelect.bind(_this2, item.value); } return _react2['default'].createElement( 'li', { className: cls, key: index, onClick: onclick, disabled: item.disabled }, item.value ); }); } }, { key: 'scrollToSelected', value: function scrollToSelected(duration) { // move to selected item var select = _reactDom2['default'].findDOMNode(this); var list = _reactDom2['default'].findDOMNode(this.list); if (!list) { return; } var index = this.props.selectedIndex; if (index < 0) { index = 0; } var topOption = list.children[index]; var to = topOption.offsetTop; scrollTo(select, to, duration); } }, { key: 'render', value: function render() { var _classnames2; if (this.props.options.length === 0) { return null; } var prefixCls = this.props.prefixCls; var cls = (0, _classnames4['default'])((_classnames2 = {}, (0, _defineProperty3['default'])(_classnames2, prefixCls + '-select', 1), (0, _defineProperty3['default'])(_classnames2, prefixCls + '-select-active', this.state.active), _classnames2)); return _react2['default'].createElement( 'div', { className: cls, onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave }, _react2['default'].createElement( 'ul', { ref: this.saveList }, this.getOptions() ) ); } }]); return Select; }(_react.Component); Select.propTypes = { prefixCls: _propTypes2['default'].string, options: _propTypes2['default'].array, selectedIndex: _propTypes2['default'].number, type: _propTypes2['default'].string, onSelect: _propTypes2['default'].func, onMouseEnter: _propTypes2['default'].func }; exports['default'] = Select; module.exports = exports['default']; /***/ }), /* 451 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _MonthCalendar = __webpack_require__(452); var _MonthCalendar2 = _interopRequireDefault(_MonthCalendar); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _Picker = __webpack_require__(445); var _Picker2 = _interopRequireDefault(_Picker); var _beeFormControl = __webpack_require__(134); var _beeFormControl2 = _interopRequireDefault(_beeFormControl); var _beeIcon = __webpack_require__(136); var _beeIcon2 = _interopRequireDefault(_beeIcon); var _beeInputGroup = __webpack_require__(290); var _beeInputGroup2 = _interopRequireDefault(_beeInputGroup); 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); } /** * Created by chief on 17/4/6. */ var MonthPicker = function (_Component) { _inherits(MonthPicker, _Component); function MonthPicker(props, context) { _classCallCheck(this, MonthPicker); var _this = _possibleConstructorReturn(this, _Component.call(this, props, context)); _this.onChange = function (value) { _this.setState({ value: value }); }; _this.onOpenChange = function (open) { _this.setState({ open: open }); }; _this.onTypeChange = function (type) { _this.setState({ type: type }); }; _this.state = { type: "month", value: props.value || props.defaultValue, open: false }; return _this; } MonthPicker.prototype.render = function render() { var _this2 = this; var state = this.state; var props = this.props; var monthCalendar = _react2["default"].createElement(_MonthCalendar2["default"], props); return _react2["default"].createElement( "div", null, _react2["default"].createElement( _Picker2["default"], { onOpenChange: this.onOpenChange, animation: "slide-up", calendar: monthCalendar, open: this.state.open, value: state.value, onChange: this.onChange }, function (_ref) { var value = _ref.value; return _react2["default"].createElement( _beeInputGroup2["default"], { simple: true, className: "datepicker-input-group" }, _react2["default"].createElement(_beeFormControl2["default"], { placeholder: _this2.props.placeholder, className: _this2.props.className, value: value && value.format(props.format) || "" }), _react2["default"].createElement( _beeInputGroup2["default"].Button, { shape: "border" }, props.renderIcon() ) ); } ) ); }; return MonthPicker; }(_react.Component); MonthPicker.defaultProps = { renderIcon: function renderIcon() { return _react2["default"].createElement(_beeIcon2["default"], { type: "uf-calendar" }); } }; exports["default"] = MonthPicker; module.exports = exports["default"]; /***/ }), /* 452 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _createReactClass = __webpack_require__(245); var _createReactClass2 = _interopRequireDefault(_createReactClass); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _KeyCode = __webpack_require__(238); var _KeyCode2 = _interopRequireDefault(_KeyCode); var _MonthPanel = __webpack_require__(432); var _MonthPanel2 = _interopRequireDefault(_MonthPanel); var _CalendarMixin = __webpack_require__(441); var _CalendarMixin2 = _interopRequireDefault(_CalendarMixin); var _CommonMixin = __webpack_require__(442); var _CommonMixin2 = _interopRequireDefault(_CommonMixin); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var MonthCalendar = (0, _createReactClass2['default'])({ displayName: 'MonthCalendar', propTypes: { monthCellRender: _propTypes2['default'].func, dateCellRender: _propTypes2['default'].func }, mixins: [_CommonMixin2['default'], _CalendarMixin2['default']], onKeyDown: function onKeyDown(event) { var keyCode = event.keyCode; var ctrlKey = event.ctrlKey || event.metaKey; var stateValue = this.state.value; var disabledDate = this.props.disabledDate; var value = stateValue; switch (keyCode) { case _KeyCode2['default'].DOWN: value = stateValue.clone(); value.add(3, 'months'); break; case _KeyCode2['default'].UP: value = stateValue.clone(); value.add(-3, 'months'); break; case _KeyCode2['default'].LEFT: value = stateValue.clone(); if (ctrlKey) { value.add(-1, 'years'); } else { value.add(-1, 'months'); } break; case _KeyCode2['default'].RIGHT: value = stateValue.clone(); if (ctrlKey) { value.add(1, 'years'); } else { value.add(1, 'months'); } break; case _KeyCode2['default'].ENTER: if (!disabledDate || !disabledDate(stateValue)) { this.onSelect(stateValue); } event.preventDefault(); return 1; default: return undefined; } if (value !== stateValue) { this.setValue(value); event.preventDefault(); return 1; } }, render: function render() { var props = this.props; var children = _react2['default'].createElement(_MonthPanel2['default'], { locale: props.locale, disabledDate: props.disabledDate, style: { position: 'relative' }, value: this.state.value, cellRender: props.monthCellRender, contentRender: props.monthCellContentRender, rootPrefixCls: props.prefixCls, onChange: this.setValue, onSelect: this.onSelect }); return this.renderRoot({ children: children }); } }); exports['default'] = MonthCalendar; module.exports = exports['default']; /***/ }), /* 453 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _RangeCalendar = __webpack_require__(454); var _RangeCalendar2 = _interopRequireDefault(_RangeCalendar); var _beeFormControl = __webpack_require__(134); var _beeFormControl2 = _interopRequireDefault(_beeFormControl); var _Picker = __webpack_require__(445); var _Picker2 = _interopRequireDefault(_Picker); var _beeInputGroup = __webpack_require__(290); var _beeInputGroup2 = _interopRequireDefault(_beeInputGroup); var _beeIcon = __webpack_require__(136); var _beeIcon2 = _interopRequireDefault(_beeIcon); var _zh_CN = __webpack_require__(133); var _zh_CN2 = _interopRequireDefault(_zh_CN); var _en_US = __webpack_require__(443); var _en_US2 = _interopRequireDefault(_en_US); var _moment = __webpack_require__(302); var _moment2 = _interopRequireDefault(_moment); __webpack_require__(426); 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 _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure undefined"); } 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); } /** * Created by chief on 17/4/6. */ var classNames = __webpack_require__(3); function format(v, f) { return v ? v.format && v.format(f) : ''; } var fullFormat = "YYYY-MM-DD"; var cn = location.search.indexOf("cn") !== -1; var now = (0, _moment2["default"])(); function isValidRange(v) { return v && v[0] && v[1]; } if (cn) { now.locale("zh-cn").utcOffset(8); } else { now.locale("en-gb").utcOffset(0); } var Picker = function (_Component) { _inherits(Picker, _Component); function Picker(props, context) { _classCallCheck(this, Picker); var _this = _possibleConstructorReturn(this, _Component.call(this, props, context)); _initialiseProps.call(_this); _this.state = { hoverValue: [], value: props.value || props.defaultValue || [] }; return _this; } Picker.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { if ("value" in nextProps) { this.setState({ value: nextProps.value }); } this.setState({ renderIcon: nextProps.renderIcon }); }; Picker.prototype.render = function render() { var _this2 = this; var props = this.props; var showValue = props.showValue; var value = this.state.value; var formatStr = props.format || 'YYYY-MM-DD'; var calendar = _react2["default"].createElement(_RangeCalendar2["default"], { hoverValue: this.state.hoverValue, onHoverChange: this.onHoverChange, showWeekNumber: false, format: formatStr, dateInputPlaceholder: props.dateInputPlaceholder || ['start', 'end'], locale: props.locale || _zh_CN2["default"], onChange: this.onChange, disabledDate: props.disabledDate, showClear: props.showClear || false, showOk: props.showOk || true, renderFooter: props.renderFooter }); return _react2["default"].createElement( _Picker2["default"], { value: this.state.value, animation: "slide-up", calendar: calendar }, function (_ref) { _objectDestructuringEmpty(_ref); return _react2["default"].createElement( "div", { className: classNames('calendar-picker', 'u-input-group', 'simple', props.className) }, _react2["default"].createElement(_beeFormControl2["default"], { placeholder: _this2.props.placeholder ? _this2.props.placeholder : 'start ~ end', value: isValidRange(value) && format(value[0], formatStr) + " ~ " + format(value[1], formatStr) || '' }), _react2["default"].createElement( _beeInputGroup2["default"].Button, { shape: "border" }, props.renderIcon() ) ); } ); }; return Picker; }(_react.Component); var _initialiseProps = function _initialiseProps() { var _this3 = this; this.onChange = function (value) { //console.log('onChange', value); var props = _this3.props; var formatStr = props.format || 'YYYY-MM-DD'; _this3.setState({ value: value }); //传入value和dateString if (props.onChange && isValidRange(value) || value.length == 0) { if (value.length > 0) { props.onChange(value, "[\"" + format(value[0], formatStr) + "\" , \"" + format(value[1], formatStr) + "\"]"); } else { props.onChange(null); } } }; this.onHoverChange = function (hoverValue) { _this3.setState({ hoverValue: hoverValue }); }; this.remove = function (e) { console.log(e); _this3.setState({ value: '' }); }; this.handleCalendarChange = function (value) {}; }; Picker.defaultProps = { renderIcon: function renderIcon() { return _react2["default"].createElement(_beeIcon2["default"], { type: "uf-calendar" }); } }; exports["default"] = Picker; module.exports = exports["default"]; /***/ }), /* 454 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends2 = __webpack_require__(145); var _extends3 = _interopRequireDefault(_extends2); var _defineProperty2 = __webpack_require__(262); var _defineProperty3 = _interopRequireDefault(_defineProperty2); var _toConsumableArray2 = __webpack_require__(455); var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2); var _slicedToArray2 = __webpack_require__(465); var _slicedToArray3 = _interopRequireDefault(_slicedToArray2); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _createReactClass = __webpack_require__(245); var _createReactClass2 = _interopRequireDefault(_createReactClass); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _moment = __webpack_require__(302); var _moment2 = _interopRequireDefault(_moment); var _classnames2 = __webpack_require__(3); var _classnames3 = _interopRequireDefault(_classnames2); var _CalendarPart = __webpack_require__(472); var _CalendarPart2 = _interopRequireDefault(_CalendarPart); var _TodayButton = __webpack_require__(438); var _TodayButton2 = _interopRequireDefault(_TodayButton); var _OkButton = __webpack_require__(439); var _OkButton2 = _interopRequireDefault(_OkButton); var _TimePickerButton = __webpack_require__(440); var _TimePickerButton2 = _interopRequireDefault(_TimePickerButton); var _CommonMixin = __webpack_require__(442); var _CommonMixin2 = _interopRequireDefault(_CommonMixin); var _util = __webpack_require__(430); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } function noop() {} function isEmptyArray(arr) { return Array.isArray(arr) && (arr.length === 0 || arr.every(function (i) { return !i; })); } function getValueFromSelectedValue(selectedValue) { var _selectedValue = (0, _slicedToArray3['default'])(selectedValue, 2), start = _selectedValue[0], end = _selectedValue[1]; var newEnd = end && end.isSame(start, 'month') ? end.clone().add(1, 'month') : end; return [start, newEnd]; } function normalizeAnchor(props, init) { var selectedValue = props.selectedValue || init && props.defaultSelectedValue; var value = props.value || init && props.defaultValue; var normalizedValue = value ? getValueFromSelectedValue(value) : getValueFromSelectedValue(selectedValue); return !isEmptyArray(normalizedValue) ? normalizedValue : init && [(0, _moment2['default'])(), (0, _moment2['default'])().add(1, 'months')]; } function generateOptions(length) { var arr = []; for (var value = 0; value < length; value++) { arr.push(value); } return arr; } function onInputSelect(direction, value) { if (!value) { return; } var originalValue = this.state.selectedValue; var selectedValue = originalValue.concat(); var index = direction === 'left' ? 0 : 1; selectedValue[index] = value; if (selectedValue[0] && this.compare(selectedValue[0], selectedValue[1]) > 0) { selectedValue[1 - index] = this.state.showTimePicker ? selectedValue[index] : undefined; } this.fireSelectValueChange(selectedValue); } var RangeCalendar = (0, _createReactClass2['default'])({ displayName: 'RangeCalendar', propTypes: { prefixCls: _propTypes2['default'].string, dateInputPlaceholder: _propTypes2['default'].any, defaultValue: _propTypes2['default'].any, value: _propTypes2['default'].any, hoverValue: _propTypes2['default'].any, timePicker: _propTypes2['default'].any, showOk: _propTypes2['default'].bool, showToday: _propTypes2['default'].bool, defaultSelectedValue: _propTypes2['default'].array, selectedValue: _propTypes2['default'].array, onOk: _propTypes2['default'].func, showClear: _propTypes2['default'].bool, locale: _propTypes2['default'].object, onChange: _propTypes2['default'].func, onSelect: _propTypes2['default'].func, onValueChange: _propTypes2['default'].func, onHoverChange: _propTypes2['default'].func, format: _propTypes2['default'].oneOfType([_propTypes2['default'].object, _propTypes2['default'].string]), onClear: _propTypes2['default'].func, type: _propTypes2['default'].any, disabledDate: _propTypes2['default'].func, disabledTime: _propTypes2['default'].func }, mixins: [_CommonMixin2['default']], getDefaultProps: function getDefaultProps() { return { type: 'both', defaultSelectedValue: [], onValueChange: noop, onHoverChange: noop, disabledTime: noop, showToday: true }; }, getInitialState: function getInitialState() { var props = this.props; var selectedValue = props.selectedValue || props.defaultSelectedValue; var value = normalizeAnchor(props, 1); return { selectedValue: selectedValue, prevSelectedValue: selectedValue, firstSelectedValue: null, hoverValue: props.hoverValue || [], value: value, showTimePicker: false, isStartMonthYearPanelShow: false, isEndMonthYearPanelShow: false }; }, componentWillReceiveProps: function componentWillReceiveProps(nextProps) { var newState = {}; if ('value' in nextProps) { if (nextProps.value) { newState.value = nextProps.value; } else { newState.value = normalizeAnchor(nextProps, 0); } this.setState(newState); } if ('hoverValue' in nextProps) { this.setState({ hoverValue: nextProps.hoverValue }); } if ('selectedValue' in nextProps) { newState.selectedValue = nextProps.selectedValue; newState.prevSelectedValue = nextProps.selectedValue; this.setState(newState); } }, onDatePanelEnter: function onDatePanelEnter() { if (this.hasSelectedValue()) { this.fireHoverValueChange(this.state.selectedValue.concat()); } }, onDatePanelLeave: function onDatePanelLeave() { if (this.hasSelectedValue()) { this.fireHoverValueChange([]); } }, onSelect: function onSelect(value) { var type = this.props.type; var _state = this.state, selectedValue = _state.selectedValue, prevSelectedValue = _state.prevSelectedValue, firstSelectedValue = _state.firstSelectedValue; var nextSelectedValue = void 0; if (type === 'both') { if (!firstSelectedValue) { (0, _util.syncTime)(prevSelectedValue[0], value); nextSelectedValue = [value]; } else if (this.compare(firstSelectedValue, value) < 0) { (0, _util.syncTime)(prevSelectedValue[1], value); nextSelectedValue = [firstSelectedValue, value]; } else { (0, _util.syncTime)(prevSelectedValue[0], value); (0, _util.syncTime)(prevSelectedValue[1], firstSelectedValue); nextSelectedValue = [value, firstSelectedValue]; } } else if (type === 'start') { (0, _util.syncTime)(prevSelectedValue[0], value); var endValue = selectedValue[1]; nextSelectedValue = endValue && this.compare(endValue, value) > 0 ? [value, endValue] : [value]; } else { // type === 'end' var startValue = selectedValue[0]; if (startValue && this.compare(startValue, value) <= 0) { (0, _util.syncTime)(prevSelectedValue[1], value); nextSelectedValue = [startValue, value]; } else { (0, _util.syncTime)(prevSelectedValue[0], value); nextSelectedValue = [value]; } } this.fireSelectValueChange(nextSelectedValue); }, onDayHover: function onDayHover(value) { var hoverValue = []; var _state2 = this.state, selectedValue = _state2.selectedValue, firstSelectedValue = _state2.firstSelectedValue; var type = this.props.type; if (type === 'start' && selectedValue[1]) { hoverValue = this.compare(value, selectedValue[1]) < 0 ? [value, selectedValue[1]] : [value]; } else if (type === 'end' && selectedValue[0]) { hoverValue = this.compare(value, selectedValue[0]) > 0 ? [selectedValue[0], value] : []; } else { if (!firstSelectedValue) { return; } hoverValue = this.compare(value, firstSelectedValue) < 0 ? [value, firstSelectedValue] : [firstSelectedValue, value]; } this.fireHoverValueChange(hoverValue); }, onToday: function onToday() { var startValue = (0, _util.getTodayTime)(this.state.value[0]); var endValue = startValue.clone().add(1, 'months'); this.setState({ value: [startValue, endValue] }); }, onOpenTimePicker: function onOpenTimePicker() { this.setState({ showTimePicker: true }); }, onCloseTimePicker: function onCloseTimePicker() { this.setState({ showTimePicker: false }); }, onOk: function onOk() { var selectedValue = this.state.selectedValue; if (this.isAllowedDateAndTime(selectedValue)) { this.props.onOk(this.state.selectedValue); } }, onStartInputSelect: function onStartInputSelect() { for (var _len = arguments.length, oargs = Array(_len), _key = 0; _key < _len; _key++) { oargs[_key] = arguments[_key]; } var args = ['left'].concat(oargs); return onInputSelect.apply(this, args); }, onEndInputSelect: function onEndInputSelect() { for (var _len2 = arguments.length, oargs = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { oargs[_key2] = arguments[_key2]; } var args = ['right'].concat(oargs); return onInputSelect.apply(this, args); }, onStartValueChange: function onStartValueChange(leftValue) { var value = [].concat((0, _toConsumableArray3['default'])(this.state.value)); value[0] = leftValue; return this.fireValueChange(value); }, onEndValueChange: function onEndValueChange(rightValue) { var value = [].concat((0, _toConsumableArray3['default'])(this.state.value)); value[1] = rightValue; return this.fireValueChange(value); }, onStartPanelChange: function onStartPanelChange(_ref) { var showMonthPanel = _ref.showMonthPanel, showYearPanel = _ref.showYearPanel; this.setState({ isStartMonthYearPanelShow: showMonthPanel || showYearPanel }); }, onEndPanelChange: function onEndPanelChange(_ref2) { var showMonthPanel = _ref2.showMonthPanel, showYearPanel = _ref2.showYearPanel; this.setState({ isEndMonthYearPanelShow: showMonthPanel || showYearPanel }); }, getStartValue: function getStartValue() { var value = this.state.value[0]; var selectedValue = this.state.selectedValue; // keep selectedTime when select date if (selectedValue[0] && this.props.timePicker) { value = value.clone(); (0, _util.syncTime)(selectedValue[0], value); } if (this.state.showTimePicker && selectedValue[0]) { return selectedValue[0]; } return value; }, getEndValue: function getEndValue() { var _state3 = this.state, value = _state3.value, selectedValue = _state3.selectedValue, showTimePicker = _state3.showTimePicker; var endValue = value[1] ? value[1].clone() : value[0].clone().add(1, 'month'); // keep selectedTime when select date if (selectedValue[1] && this.props.timePicker) { (0, _util.syncTime)(selectedValue[1], endValue); } if (showTimePicker) { return selectedValue[1] ? selectedValue[1] : this.getStartValue(); } return endValue; }, // get disabled hours for second picker getEndDisableTime: function getEndDisableTime() { var _state4 = this.state, selectedValue = _state4.selectedValue, value = _state4.value; var startValue = selectedValue && selectedValue[0] || value[0].clone(); // if startTime and endTime is same day.. // the second time picker will not able to pick time before first time picker if (!selectedValue[1] || startValue.isSame(selectedValue[1], 'day')) { var hours = startValue.hour(); var minutes = startValue.minute(); var second = startValue.second(); var _disabledHours = generateOptions(hours); var _disabledMinutes = generateOptions(minutes); var _disabledSeconds = generateOptions(second); return { disabledHours: function disabledHours() { return _disabledHours; }, disabledMinutes: function disabledMinutes(hour) { if (hour === hours) { return _disabledMinutes; } return []; }, disabledSeconds: function disabledSeconds(hour, minute) { if (hour === hours && minute === minutes) { return _disabledSeconds; } return []; } }; } return null; }, isAllowedDateAndTime: function isAllowedDateAndTime(selectedValue) { return (0, _util.isAllowedDate)(selectedValue[0], this.props.disabledDate, this.disabledStartTime) && (0, _util.isAllowedDate)(selectedValue[1], this.props.disabledDate, this.disabledEndTime); }, hasSelectedValue: function hasSelectedValue() { var selectedValue = this.state.selectedValue; return !!selectedValue[1] && !!selectedValue[0]; }, compare: function compare(v1, v2) { if (this.props.timePicker) { return v1.diff(v2); } return v1.diff(v2, 'days'); }, fireSelectValueChange: function fireSelectValueChange(selectedValue, direct) { var timePicker = this.props.timePicker; var prevSelectedValue = this.state.prevSelectedValue; if (timePicker && timePicker.props.defaultValue) { var timePickerDefaultValue = timePicker.props.defaultValue; if (!prevSelectedValue[0] && selectedValue[0]) { (0, _util.syncTime)(timePickerDefaultValue[0], selectedValue[0]); } if (!prevSelectedValue[1] && selectedValue[1]) { (0, _util.syncTime)(timePickerDefaultValue[1], selectedValue[1]); } } if (!('selectedValue' in this.props)) { this.setState({ selectedValue: selectedValue }); } // 尚未选择过时间,直接输入的话 if (!this.state.selectedValue[0] || !this.state.selectedValue[1]) { var startValue = selectedValue[0] || (0, _moment2['default'])(); var endValue = selectedValue[1] || startValue.clone().add(1, 'months'); this.setState({ selectedValue: selectedValue, value: getValueFromSelectedValue([startValue, endValue]) }); } if (selectedValue[0] && !selectedValue[1]) { this.setState({ firstSelectedValue: selectedValue[0] }); this.fireHoverValueChange(selectedValue.concat()); } this.props.onChange(selectedValue); if (direct || selectedValue[0] && selectedValue[1]) { this.setState({ prevSelectedValue: selectedValue, firstSelectedValue: null }); this.fireHoverValueChange([]); this.props.onSelect(selectedValue); } }, fireValueChange: function fireValueChange(value) { var props = this.props; if (!('value' in props)) { this.setState({ value: value }); } props.onValueChange(value); }, fireHoverValueChange: function fireHoverValueChange(hoverValue) { var props = this.props; if (!('hoverValue' in props)) { this.setState({ hoverValue: hoverValue }); } props.onHoverChange(hoverValue); }, clear: function clear() { this.fireSelectValueChange([], true); this.props.onClear(); }, disabledStartTime: function disabledStartTime(time) { return this.props.disabledTime(time, 'start'); }, disabledEndTime: function disabledEndTime(time) { return this.props.disabledTime(time, 'end'); }, disabledStartMonth: function disabledStartMonth(month) { var value = this.state.value; return month.isSameOrAfter(value[1], 'month'); }, disabledEndMonth: function disabledEndMonth(month) { var value = this.state.value; return month.isSameOrBefore(value[0], 'month'); }, render: function render() { var _className, _classnames; var props = this.props; var state = this.state; var showTimePicker = state.showTimePicker, isStartMonthYearPanelShow = state.isStartMonthYearPanelShow, isEndMonthYearPanelShow = state.isEndMonthYearPanelShow; var prefixCls = props.prefixCls, dateInputPlaceholder = props.dateInputPlaceholder, timePicker = props.timePicker, showOk = props.showOk, locale = props.locale, showClear = props.showClear, showToday = props.showToday, type = props.type; var hoverValue = state.hoverValue, selectedValue = state.selectedValue; var className = (_className = {}, (0, _defineProperty3['default'])(_className, props.className, !!props.className), (0, _defineProperty3['default'])(_className, prefixCls, 1), (0, _defineProperty3['default'])(_className, prefixCls + '-hidden', !props.visible), (0, _defineProperty3['default'])(_className, prefixCls + '-range', 1), (0, _defineProperty3['default'])(_className, prefixCls + '-show-time-picker', showTimePicker), (0, _defineProperty3['default'])(_className, prefixCls + '-week-number', props.showWeekNumber), _className); var classes = (0, _classnames3['default'])(className); var newProps = { selectedValue: state.selectedValue, onSelect: this.onSelect, onDayHover: type === 'start' && selectedValue[1] || type === 'end' && selectedValue[0] || !!hoverValue.length ? this.onDayHover : undefined }; var placeholder1 = void 0; var placeholder2 = void 0; if (dateInputPlaceholder) { if (Array.isArray(dateInputPlaceholder)) { var _dateInputPlaceholder = (0, _slicedToArray3['default'])(dateInputPlaceholder, 2); placeholder1 = _dateInputPlaceholder[0]; placeholder2 = _dateInputPlaceholder[1]; } else { placeholder1 = placeholder2 = dateInputPlaceholder; } } var showOkButton = showOk === true || showOk !== false && !!timePicker; var cls = (0, _classnames3['default'])((_classnames = {}, (0, _defineProperty3['default'])(_classnames, prefixCls + '-footer', true), (0, _defineProperty3['default'])(_classnames, prefixCls + '-range-bottom', true), (0, _defineProperty3['default'])(_classnames, prefixCls + '-footer-show-ok', showOkButton), _classnames)); var startValue = this.getStartValue(); var endValue = this.getEndValue(); var todayTime = (0, _util.getTodayTime)(startValue); var thisMonth = todayTime.month(); var thisYear = todayTime.year(); var isTodayInView = startValue.year() === thisYear && startValue.month() === thisMonth || endValue.year() === thisYear && endValue.month() === thisMonth; var nextMonthOfStart = startValue.clone().add(1, 'months'); var isClosestMonths = nextMonthOfStart.year() === endValue.year() && nextMonthOfStart.month() === endValue.month(); return _react2['default'].createElement( 'div', { ref: 'root', className: classes, style: props.style, tabIndex: '0' }, props.renderSidebar(), _react2['default'].createElement( 'div', { className: prefixCls + '-panel' }, showClear && selectedValue[0] && selectedValue[1] ? _react2['default'].createElement('a', { className: prefixCls + '-clear-btn', role: 'button', title: locale.clear, onClick: this.clear }) : null, _react2['default'].createElement( 'div', { className: prefixCls + '-date-panel', onMouseLeave: type !== 'both' ? this.onDatePanelLeave : undefined, onMouseEnter: type !== 'both' ? this.onDatePanelEnter : undefined }, _react2['default'].createElement(_CalendarPart2['default'], (0, _extends3['default'])({}, props, newProps, { hoverValue: hoverValue, direction: 'left', disabledTime: this.disabledStartTime, disabledMonth: this.disabledStartMonth, format: this.getFormat(), value: startValue, placeholder: placeholder1, onInputSelect: this.onStartInputSelect, onValueChange: this.onStartValueChange, onPanelChange: this.onStartPanelChange, timePicker: timePicker, showTimePicker: showTimePicker, enablePrev: true, enableNext: !isClosestMonths || isEndMonthYearPanelShow })), _react2['default'].createElement( 'span', { className: prefixCls + '-range-middle' }, '~' ), _react2['default'].createElement(_CalendarPart2['default'], (0, _extends3['default'])({}, props, newProps, { hoverValue: hoverValue, direction: 'right', format: this.getFormat(), timePickerDisabledTime: this.getEndDisableTime(), placeholder: placeholder2, value: endValue, onInputSelect: this.onEndInputSelect, onValueChange: this.onEndValueChange, onPanelChange: this.onEndPanelChange, timePicker: timePicker, showTimePicker: showTimePicker, disabledTime: this.disabledEndTime, disabledMonth: this.disabledEndMonth, enablePrev: !isClosestMonths || isStartMonthYearPanelShow, enableNext: true })) ), _react2['default'].createElement( 'div', { className: cls }, props.renderFooter(), showToday || props.timePicker || showOkButton ? _react2['default'].createElement( 'div', { className: prefixCls + '-footer-btn' }, showToday ? _react2['default'].createElement(_TodayButton2['default'], (0, _extends3['default'])({}, props, { disabled: isTodayInView, value: state.value[0], onToday: this.onToday, text: locale.backToToday })) : null, props.timePicker ? _react2['default'].createElement(_TimePickerButton2['default'], (0, _extends3['default'])({}, props, { showTimePicker: showTimePicker, onOpenTimePicker: this.onOpenTimePicker, onCloseTimePicker: this.onCloseTimePicker, timePickerDisabled: !this.hasSelectedValue() || hoverValue.length })) : null, showOkButton ? _react2['default'].createElement(_OkButton2['default'], (0, _extends3['default'])({}, props, { onOk: this.onOk, okDisabled: !this.isAllowedDateAndTime(selectedValue) || !this.hasSelectedValue() || hoverValue.length })) : null ) : null ) ) ); } }); exports['default'] = RangeCalendar; module.exports = exports['default']; /***/ }), /* 455 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _from = __webpack_require__(456); var _from2 = _interopRequireDefault(_from); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function (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 (0, _from2.default)(arr); } }; /***/ }), /* 456 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(457), __esModule: true }; /***/ }), /* 457 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(190); __webpack_require__(458); module.exports = __webpack_require__(151).Array.from; /***/ }), /* 458 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var ctx = __webpack_require__(152); var $export = __webpack_require__(149); var toObject = __webpack_require__(183); var call = __webpack_require__(459); var isArrayIter = __webpack_require__(460); var toLength = __webpack_require__(173); var createProperty = __webpack_require__(461); var getIterFn = __webpack_require__(462); $export($export.S + $export.F * !__webpack_require__(464)(function (iter) { Array.from(iter); }), 'Array', { // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { var O = toObject(arrayLike); var C = typeof this == 'function' ? this : Array; var aLen = arguments.length; var mapfn = aLen > 1 ? arguments[1] : undefined; var mapping = mapfn !== undefined; var index = 0; var iterFn = getIterFn(O); var length, result, step, iterator; if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); // if object isn't iterable or it's array with default iterator - use simple case if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) { for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) { createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); } } else { length = toLength(O.length); for (result = new C(length); length > index; index++) { createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); } } result.length = index; return result; } }); /***/ }), /* 459 */ /***/ (function(module, exports, __webpack_require__) { // call something on iterator step with safe closing on error var anObject = __webpack_require__(156); module.exports = function (iterator, fn, value, entries) { try { return entries ? fn(anObject(value)[0], value[1]) : fn(value); // 7.4.6 IteratorClose(iterator, completion) } catch (e) { var ret = iterator['return']; if (ret !== undefined) anObject(ret.call(iterator)); throw e; } }; /***/ }), /* 460 */ /***/ (function(module, exports, __webpack_require__) { // check on default Array iterator var Iterators = __webpack_require__(194); var ITERATOR = __webpack_require__(200)('iterator'); var ArrayProto = Array.prototype; module.exports = function (it) { return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); }; /***/ }), /* 461 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; var $defineProperty = __webpack_require__(155); var createDesc = __webpack_require__(163); module.exports = function (object, index, value) { if (index in object) $defineProperty.f(object, index, createDesc(0, value)); else object[index] = value; }; /***/ }), /* 462 */ /***/ (function(module, exports, __webpack_require__) { var classof = __webpack_require__(463); var ITERATOR = __webpack_require__(200)('iterator'); var Iterators = __webpack_require__(194); module.exports = __webpack_require__(151).getIteratorMethod = function (it) { if (it != undefined) return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; }; /***/ }), /* 463 */ /***/ (function(module, exports, __webpack_require__) { // getting tag from 19.1.3.6 Object.prototype.toString() var cof = __webpack_require__(170); var TAG = __webpack_require__(200)('toStringTag'); // ES3 wrong here var ARG = cof(function () { return arguments; }()) == 'Arguments'; // fallback for IE11 Script Access Denied error var tryGet = function (it, key) { try { return it[key]; } catch (e) { /* empty */ } }; module.exports = function (it) { var O, T, B; return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T // builtinTag case : ARG ? cof(O) // ES3 arguments fallback : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; }; /***/ }), /* 464 */ /***/ (function(module, exports, __webpack_require__) { var ITERATOR = __webpack_require__(200)('iterator'); var SAFE_CLOSING = false; try { var riter = [7][ITERATOR](); riter['return'] = function () { SAFE_CLOSING = true; }; // eslint-disable-next-line no-throw-literal Array.from(riter, function () { throw 2; }); } catch (e) { /* empty */ } module.exports = function (exec, skipClosing) { if (!skipClosing && !SAFE_CLOSING) return false; var safe = false; try { var arr = [7]; var iter = arr[ITERATOR](); iter.next = function () { return { done: safe = true }; }; arr[ITERATOR] = function () { return iter; }; exec(arr); } catch (e) { /* empty */ } return safe; }; /***/ }), /* 465 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; var _isIterable2 = __webpack_require__(466); var _isIterable3 = _interopRequireDefault(_isIterable2); var _getIterator2 = __webpack_require__(469); var _getIterator3 = _interopRequireDefault(_getIterator2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } exports.default = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = (0, _getIterator3.default)(arr), _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 ((0, _isIterable3.default)(Object(arr))) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); /***/ }), /* 466 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(467), __esModule: true }; /***/ }), /* 467 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(202); __webpack_require__(190); module.exports = __webpack_require__(468); /***/ }), /* 468 */ /***/ (function(module, exports, __webpack_require__) { var classof = __webpack_require__(463); var ITERATOR = __webpack_require__(200)('iterator'); var Iterators = __webpack_require__(194); module.exports = __webpack_require__(151).isIterable = function (it) { var O = Object(it); return O[ITERATOR] !== undefined || '@@iterator' in O // eslint-disable-next-line no-prototype-builtins || Iterators.hasOwnProperty(classof(O)); }; /***/ }), /* 469 */ /***/ (function(module, exports, __webpack_require__) { module.exports = { "default": __webpack_require__(470), __esModule: true }; /***/ }), /* 470 */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(202); __webpack_require__(190); module.exports = __webpack_require__(471); /***/ }), /* 471 */ /***/ (function(module, exports, __webpack_require__) { var anObject = __webpack_require__(156); var get = __webpack_require__(462); module.exports = __webpack_require__(151).getIterator = function (it) { var iterFn = get(it); if (typeof iterFn != 'function') throw TypeError(it + ' is not iterable!'); return anObject(iterFn.call(it)); }; /***/ }), /* 472 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends2 = __webpack_require__(145); var _extends3 = _interopRequireDefault(_extends2); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _createReactClass = __webpack_require__(245); var _createReactClass2 = _interopRequireDefault(_createReactClass); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _CalendarHeader = __webpack_require__(431); var _CalendarHeader2 = _interopRequireDefault(_CalendarHeader); var _DateTable = __webpack_require__(299); var _DateTable2 = _interopRequireDefault(_DateTable); var _DateInput = __webpack_require__(444); var _DateInput2 = _interopRequireDefault(_DateInput); var _index = __webpack_require__(430); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } var CalendarPart = (0, _createReactClass2['default'])({ displayName: 'CalendarPart', propTypes: { prefixCls: _propTypes2['default'].string, value: _propTypes2['default'].any, hoverValue: _propTypes2['default'].any, selectedValue: _propTypes2['default'].any, direction: _propTypes2['default'].any, locale: _propTypes2['default'].any, showTimePicker: _propTypes2['default'].bool, format: _propTypes2['default'].any, placeholder: _propTypes2['default'].any, disabledDate: _propTypes2['default'].any, timePicker: _propTypes2['default'].any, disabledTime: _propTypes2['default'].any, onInputSelect: _propTypes2['default'].func, timePickerDisabledTime: _propTypes2['default'].object, enableNext: _propTypes2['default'].any, enablePrev: _propTypes2['default'].any }, render: function render() { var props = this.props; var prefixCls = props.prefixCls, value = props.value, hoverValue = props.hoverValue, selectedValue = props.selectedValue, direction = props.direction, locale = props.locale, format = props.format, placeholder = props.placeholder, disabledDate = props.disabledDate, timePicker = props.timePicker, disabledTime = props.disabledTime, timePickerDisabledTime = props.timePickerDisabledTime, showTimePicker = props.showTimePicker, onInputSelect = props.onInputSelect, enablePrev = props.enablePrev, enableNext = props.enableNext; var shouldShowTimePicker = showTimePicker && timePicker; var disabledTimeConfig = shouldShowTimePicker && disabledTime ? (0, _index.getTimeConfig)(selectedValue, disabledTime) : null; var rangeClassName = prefixCls + '-range'; var newProps = { locale: locale, value: value, prefixCls: prefixCls, showTimePicker: showTimePicker }; var index = direction === 'left' ? 0 : 1; var timePickerEle = shouldShowTimePicker && _react2['default'].cloneElement(timePicker, (0, _extends3['default'])({ showHour: true, showMinute: true, showSecond: true }, timePicker.props, disabledTimeConfig, timePickerDisabledTime, { onChange: onInputSelect, defaultOpenValue: value, value: selectedValue[index] })); return _react2['default'].createElement( 'div', { className: rangeClassName + '-part ' + rangeClassName + '-' + direction }, _react2['default'].createElement(_DateInput2['default'], { format: format, locale: locale, prefixCls: prefixCls, timePicker: timePicker, disabledDate: disabledDate, placeholder: placeholder, disabledTime: disabledTime, value: value, showClear: false, selectedValue: selectedValue[index], onChange: onInputSelect }), _react2['default'].createElement( 'div', { style: { outline: 'none' } }, _react2['default'].createElement(_CalendarHeader2['default'], (0, _extends3['default'])({}, newProps, { enableNext: enableNext, enablePrev: enablePrev, onValueChange: props.onValueChange, onPanelChange: props.onPanelChange, disabledMonth: props.disabledMonth })), showTimePicker ? _react2['default'].createElement( 'div', { className: prefixCls + '-time-picker' }, _react2['default'].createElement( 'div', { className: prefixCls + '-time-picker-panel' }, timePickerEle ) ) : null, _react2['default'].createElement( 'div', { className: prefixCls + '-body' }, _react2['default'].createElement(_DateTable2['default'], (0, _extends3['default'])({}, newProps, { hoverValue: hoverValue, selectedValue: selectedValue, dateRender: props.dateRender, onSelect: props.onSelect, onDayHover: props.onDayHover, disabledDate: disabledDate, showWeekNumber: props.showWeekNumber })) ) ) ); } }); exports['default'] = CalendarPart; module.exports = exports['default']; /***/ }), /* 473 */ /***/ (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 _rcCalendar = __webpack_require__(297); var _rcCalendar2 = _interopRequireDefault(_rcCalendar); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _Picker = __webpack_require__(445); var _Picker2 = _interopRequireDefault(_Picker); var _beeFormControl = __webpack_require__(134); var _beeFormControl2 = _interopRequireDefault(_beeFormControl); var _zh_CN = __webpack_require__(133); var _zh_CN2 = _interopRequireDefault(_zh_CN); var _en_US = __webpack_require__(443); var _en_US2 = _interopRequireDefault(_en_US); var _beeIcon = __webpack_require__(136); var _beeIcon2 = _interopRequireDefault(_beeIcon); var _beeInputGroup = __webpack_require__(290); var _beeInputGroup2 = _interopRequireDefault(_beeInputGroup); var _moment = __webpack_require__(302); var _moment2 = _interopRequireDefault(_moment); __webpack_require__(426); __webpack_require__(333); var _YearPicker = __webpack_require__(474); var _YearPicker2 = _interopRequireDefault(_YearPicker); 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 _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure undefined"); } 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); } /** * Created by chief on 17/4/6. */ var cn = location.search.indexOf("cn") !== -1; var now = (0, _moment2["default"])(); if (cn) { now.locale("zh-cn").utcOffset(8); } else { now.locale("en-gb").utcOffset(0); } var format = "YYYY-Wo"; var style = "\n.week-calendar {\n width: 386px;\n}\n.week-calendar .rc-calendar-tbody > tr:hover\n.rc-calendar-date {\n background: #ebfaff;\n}\n\n.week-calendar .rc-calendar-tbody > tr:hover\n.rc-calendar-selected-day .rc-calendar-date {\n background: #3fc7fa;\n}\n\n.week-calendar .week-calendar-sidebar {\n position:absolute;\n top:0;\n left:0;\n bottom:0;\n width:100px;\n border-right: 1px solid #ccc;\n}\n.week-calendar .rc-calendar-panel {\n margin-left: 100px;\n}\n"; var WeekPicker = function (_Component) { _inherits(WeekPicker, _Component); function WeekPicker(props, context) { _classCallCheck(this, WeekPicker); var _this = _possibleConstructorReturn(this, _Component.call(this, props, context)); _this.onChange = function (value) { _this.setState({ value: value }); }; _this.onOpenChange = function (open) { _this.setState({ open: open }); }; _this.dateRender = function (current) { var selectedValue = _this.state.value; if (selectedValue && current.year() === selectedValue.year() && current.week() === selectedValue.week()) { return _react2["default"].createElement( "div", { className: "rc-calendar-selected-day" }, _react2["default"].createElement( "div", { className: "rc-calendar-date" }, current.date() ) ); } return _react2["default"].createElement( "div", { className: "rc-calendar-date" }, current.date() ); }; _this.lastWeek = function () { var value = _this.props.value || now; value.add(-1, "weeks"); _this.setState({ value: value, open: false }); }; _this.nextWeek = function () { var value = _this.props.value || now; value.add(+1, "weeks"); _this.setState({ value: value, open: false }); }; _this.renderSidebar = function () { return _react2["default"].createElement( "div", { className: "week-calendar-sidebar", key: "sidebar" }, _react2["default"].createElement( "button", { className: "week-calendar-sidebar-button", onClick: _this.lastWeek.bind(_this), style: { margin: 8 } }, "\u4E0A\u4E00\u5468" ), _react2["default"].createElement( "button", { className: "week-calendar-sidebar-button", onClick: _this.nextWeek.bind(_this), style: { margin: 8 } }, "\u4E0B\u4E00\u5468" ) ); }; _this.onTypeChange = function (type) { _this.setState({ type: type }); }; _this.handleCalendarChange = function (value) { _this.setState({ value: value }); }; _this.state = { value: props.value || props.defaultValue, open: false }; return _this; } WeekPicker.prototype.render = function render() { var _this2 = this; var state = this.state; var props = this.props; var value = state.value; var calendar = _react2["default"].createElement(_rcCalendar2["default"], { className: "week-calendar", showWeekNumber: true, renderSidebar: this.renderSidebar, dateRender: this.dateRender, locale: cn ? _zh_CN2["default"] : _en_US2["default"], format: format, dateInputPlaceholder: this.props.placeholder, defaultValue: now, showDateInput: true, onChange: this.handleCalendarChange }); return _react2["default"].createElement( "div", null, _react2["default"].createElement("style", { dangerouslySetInnerHTML: { __html: style } }), _react2["default"].createElement( _Picker2["default"], _extends({}, props, { onOpenChange: this.onOpenChange, open: this.state.open, animation: "slide-up", calendar: calendar, value: state.value }), function (_ref) { _objectDestructuringEmpty(_ref); return _react2["default"].createElement( _beeInputGroup2["default"], { simple: true, className: "datepicker-input-group" }, _react2["default"].createElement(_beeFormControl2["default"], { placeholder: _this2.props.placeholder, disabled: state.disabled, readOnly: true, tabIndex: "-1", className: _this2.props.className, value: value && value.format(format) || "" }), _react2["default"].createElement( _beeInputGroup2["default"].Button, { shape: "border" }, props.renderIcon() ) ); } ) ); }; return WeekPicker; }(_react.Component); WeekPicker.defaultProps = { renderIcon: function renderIcon() { return _react2["default"].createElement(_beeIcon2["default"], { type: "uf-calendar" }); } }; exports["default"] = WeekPicker; module.exports = exports["default"]; /***/ }), /* 474 */ /***/ (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 _YearPanel = __webpack_require__(433); var _YearPanel2 = _interopRequireDefault(_YearPanel); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _Picker = __webpack_require__(445); var _Picker2 = _interopRequireDefault(_Picker); var _beeFormControl = __webpack_require__(134); var _beeFormControl2 = _interopRequireDefault(_beeFormControl); var _beeInputGroup = __webpack_require__(290); var _beeInputGroup2 = _interopRequireDefault(_beeInputGroup); var _beeIcon = __webpack_require__(136); var _beeIcon2 = _interopRequireDefault(_beeIcon); var _moment = __webpack_require__(302); var _moment2 = _interopRequireDefault(_moment); 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 _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure undefined"); } 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); } /** * Created by chief on 17/4/6. */ var YearPicker = function (_Component) { _inherits(YearPicker, _Component); function YearPicker(props, context) { _classCallCheck(this, YearPicker); var _this = _possibleConstructorReturn(this, _Component.call(this, props, context)); _initialiseProps.call(_this); _this.state = { type: "year", value: props.value || props.defaultValue || '', open: props.open || false }; return _this; } YearPicker.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { if ("value" in nextProps) { this.setState({ value: nextProps.value }); } this.setState({ renderIcon: nextProps.renderIcon, open: nextProps.open }); }; YearPicker.prototype.render = function render() { var _this2 = this; var state = this.state; var props = this.props; var value = state.value; var Calendar = _react2["default"].createElement(_YearPanel2["default"], _extends({ prefixCls: 'rc-calendar-picker', rootPrefixCls: 'rc-calendar' }, props)); return _react2["default"].createElement( "div", null, _react2["default"].createElement( _Picker2["default"], _extends({}, props, { onOpenChange: this.onOpenChange, onChange: this.handleChange, animation: "slide-up", calendar: Calendar, prefixCls: 'rc-calendar', value: state.value || (0, _moment2["default"])() }), function (_ref) { _objectDestructuringEmpty(_ref); return _react2["default"].createElement( _beeInputGroup2["default"], { simple: true, className: "datepicker-input-group" }, _react2["default"].createElement(_beeFormControl2["default"], { placeholder: _this2.props.placeholder, className: _this2.props.className, disabled: props.disabled, readOnly: true, value: value && value.format(props.format) || "" }), _react2["default"].createElement( _beeInputGroup2["default"].Button, { shape: "border" }, props.renderIcon() ) ); } ) ); }; return YearPicker; }(_react.Component); var _initialiseProps = function _initialiseProps() { var _this3 = this; this.onChange = function (value) { _this3.setState({ value: value }); }; this.onOpenChange = function (open) { _this3.setState({ open: open }); }; this.onTypeChange = function (type) { _this3.setState({ type: type }); }; this.handleChange = function (value) { var props = _this3.props; _this3.setState({ value: value }); props.onChange(value, value && value.format(props.format) || ''); }; }; YearPicker.defaultProps = { renderIcon: function renderIcon() { return _react2["default"].createElement(_beeIcon2["default"], { type: "uf-calendar" }); }, disabled: false }; exports["default"] = YearPicker; module.exports = exports["default"]; /***/ }), /* 475 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _beeDropdown = __webpack_require__(476); var _beeDropdown2 = _interopRequireDefault(_beeDropdown); var _beeMenus = __webpack_require__(485); var _beeMenus2 = _interopRequireDefault(_beeMenus); var _beeButton = __webpack_require__(82); var _beeButton2 = _interopRequireDefault(_beeButton); var _beeIcon = __webpack_require__(136); var _beeIcon2 = _interopRequireDefault(_beeIcon); var _i18n = __webpack_require__(500); var _i18n2 = _interopRequireDefault(_i18n); var _tool = __webpack_require__(501); 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 Item = _beeMenus2['default'].Item; var FilterDropDown = function (_Component) { _inherits(FilterDropDown, _Component); function FilterDropDown() { _classCallCheck(this, FilterDropDown); var _this = _possibleConstructorReturn(this, _Component.call(this)); _this.onSelectDropdown = function (item) { var _this$props = _this.props, onSelectDropdown = _this$props.onSelectDropdown, filterDropdownType = _this$props.filterDropdownType; if (onSelectDropdown) { if (filterDropdownType == 'string') { _this.setState({ selectValue: [item.key] }, function () { onSelectDropdown(item); }); } if (filterDropdownType == 'number') { _this.setState({ selectNumberValue: [item.key] }, function () { onSelectDropdown(item); }); } } }; _this.onClickClear = function () { var onClickClear = _this.props.onClickClear; if (onClickClear) { _this.setState({ // selectValue: [], // selectNumberValue: [] }, function () { onClickClear(); }); } }; _this.getMenu = function () { var _this$state = _this.state, selectValue = _this$state.selectValue, selectNumberValue = _this$state.selectNumberValue; var _this$props2 = _this.props, filterDropdownType = _this$props2.filterDropdownType, filterDropdownIncludeKeys = _this$props2.filterDropdownIncludeKeys; var locale = (0, _tool.getComponentLocale)(_this.props, _this.context, 'Table', function () { return _i18n2['default']; }); var stringEnum = { LIKE: 'include', ULIKE: 'exclusive', EQ: 'equal', UEQ: 'unequal', START: 'begin', END: 'end' }; var numberEnum = { GT: 'greater_than', GTEQ: 'great_than_equal_to', LT: 'less_than', LTEQ: 'less_than_equal_to', EQ: 'be_equal_to', UEQ: 'not_equal_to' }; if (filterDropdownIncludeKeys != undefined) { switch (filterDropdownType) { case 'string': return _react2['default'].createElement( _beeMenus2['default'], { onSelect: _this.onSelectDropdown, selectedKeys: selectValue }, filterDropdownIncludeKeys.map(function (item) { return _react2['default'].createElement( Item, { key: item }, locale[stringEnum[item]] ); }) ); case 'number': return _react2['default'].createElement( _beeMenus2['default'], { onSelect: _this.onSelectDropdown, selectedKeys: selectNumberValue }, filterDropdownIncludeKeys.map(function (item) { return _react2['default'].createElement( Item, { key: item }, locale[numberEnum[item]] ); }) ); default: return _react2['default'].createElement('div', null); } } else { switch (filterDropdownType) { case 'string': return _react2['default'].createElement( _beeMenus2['default'], { onSelect: _this.onSelectDropdown, selectedKeys: selectValue }, _react2['default'].createElement( Item, { key: 'LIKE' }, locale['include'] ), _react2['default'].createElement( Item, { key: 'ULIKE' }, locale['exclusive'] ), _react2['default'].createElement( Item, { key: 'EQ' }, locale['equal'] ), _react2['default'].createElement( Item, { key: 'UEQ' }, locale['unequal'] ), _react2['default'].createElement( Item, { key: 'RLIKE' }, locale['begin'] ), _react2['default'].createElement( Item, { key: 'LLIKE' }, locale['end'] ) ); case 'number': return _react2['default'].createElement( _beeMenus2['default'], { onSelect: _this.onSelectDropdown, selectedKeys: selectNumberValue }, _react2['default'].createElement( Item, { key: 'GT' }, locale['greater_than'] ), _react2['default'].createElement( Item, { key: 'GTEQ' }, locale['great_than_equal_to'] ), _react2['default'].createElement( Item, { key: 'LT' }, locale['less_than'] ), _react2['default'].createElement( Item, { key: 'LTEQ' }, locale['less_than_equal_to'] ), _react2['default'].createElement( Item, { key: 'EQ' }, locale['be_equal_to'] ), _react2['default'].createElement( Item, { key: 'UEQ' }, locale['not_equal_to'] ) ); default: return _react2['default'].createElement('div', null); } } }; _this.state = { selectValue: ['LIKE'], selectNumberValue: ['EQ'] }; return _this; } /** * 点击下拉菜单 * * @param {*} s 选中的selectRecord */ /** * 清除事件 * */ /** * 根据props来获得指定的Menu,分为String和Number * * @returns JSX Menu */ FilterDropDown.prototype.render = function render() { var isShowCondition = this.props.isShowCondition; return _react2['default'].createElement( 'div', { className: 'filter-btns' }, isShowCondition == 'show' && _react2['default'].createElement( _beeDropdown2['default'], { overlayClassName: 'u-filter-dropdown-menu-wrap', trigger: ['click'], overlay: this.getMenu(), animation: 'slide-up' }, _react2['default'].createElement( _beeButton2['default'], { shape: 'border', style: { marginLeft: "3px", minWidth: "0px", width: "24px", padding: 0 } }, _react2['default'].createElement(_beeIcon2['default'], { style: { padding: 0, color: '#585858' }, type: 'uf-filter' }) ) ), _react2['default'].createElement( _beeButton2['default'], { onClick: this.onClickClear, shape: 'border', style: { marginLeft: "1px", minWidth: "0px", width: "24px", padding: 0, "visibility": this.props.isShowClear || this.state.selectValue.length > 0 ? "visible" : "hidden" } }, _react2['default'].createElement(_beeIcon2['default'], { style: { padding: 0, color: '#585858', "visibility": this.props.isShowClear || this.state.selectValue.length > 0 ? "visible" : "hidden" }, type: 'uf-filterno' }) ) ); }; return FilterDropDown; }(_react.Component); FilterDropDown.propTypes = { isShowCondition: _propTypes2['default'].string, filterDropdownType: _propTypes2['default'].oneOf(['string', 'number']) }; FilterDropDown.defaultProps = { isShowCondition: 'show', filterDropdownType: 'string' }; exports['default'] = FilterDropDown; module.exports = exports['default']; /***/ }), /* 476 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _Dropdown = __webpack_require__(477); var _Dropdown2 = _interopRequireDefault(_Dropdown); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } exports["default"] = _Dropdown2["default"]; module.exports = exports['default']; /***/ }), /* 477 */ /***/ (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__(4); var _react2 = _interopRequireDefault(_react); var _reactDom = __webpack_require__(12); var _reactDom2 = _interopRequireDefault(_reactDom); var _trigger = __webpack_require__(478); var _trigger2 = _interopRequireDefault(_trigger); var _placement = __webpack_require__(484); var _placement2 = _interopRequireDefault(_placement); var _propTypes = __webpack_require__(5); 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 = { minOverlayWidthMatchTrigger: _propTypes2["default"].bool, onVisibleChange: _propTypes2["default"].func, clsPrefix: _propTypes2["default"].string, children: _propTypes2["default"].any, transitionName: _propTypes2["default"].string, overlayClassName: _propTypes2["default"].string, animation: _propTypes2["default"].any, align: _propTypes2["default"].object, overlayStyle: _propTypes2["default"].object, placement: _propTypes2["default"].string, trigger: _propTypes2["default"].array, showAction: _propTypes2["default"].array, hideAction: _propTypes2["default"].array, getPopupContainer: _propTypes2["default"].func }; var defaultProps = { minOverlayWidthMatchTrigger: true, clsPrefix: 'u-dropdown', trigger: ['hover'], showAction: [], hideAction: [], overlayClassName: '', overlayStyle: {}, defaultVisible: false, onVisibleChange: function onVisibleChange() {}, placement: 'bottomLeft' }; var jadgeState = function jadgeState(props) { if ('visible' in props) { return props.visible; } return props.defaultVisible; }; var Dropdown = function (_React$Component) { _inherits(Dropdown, _React$Component); function Dropdown(props) { _classCallCheck(this, Dropdown); var _this = _possibleConstructorReturn(this, _React$Component.call(this, props)); _this.state = { visible: jadgeState(_this.props) }; _this.onClick = _this.onClick.bind(_this); _this.onVisibleChange = _this.onVisibleChange.bind(_this); _this.getMenuElement = _this.getMenuElement.bind(_this); _this.getPopupDomNode = _this.getPopupDomNode.bind(_this); _this.afterVisibleChange = _this.afterVisibleChange.bind(_this); return _this; } Dropdown.prototype.componentWillReceiveProps = function componentWillReceiveProps(_ref) { var visible = _ref.visible; if (visible !== undefined) { this.setState({ visible: visible }); } }; Dropdown.prototype.onClick = function onClick(e) { var props = this.props; var overlayProps = props.overlay.props; // do no call onVisibleChange, if you need click to hide, use onClick and control visible if (!('visible' in props)) { this.setState({ visible: false }); } if (overlayProps.onClick) { overlayProps.onClick(e); } }; Dropdown.prototype.onVisibleChange = function onVisibleChange(visible) { var props = this.props; if (!('visible' in props)) { this.setState({ visible: visible }); } props.onVisibleChange(visible); }; Dropdown.prototype.getMenuElement = function getMenuElement() { var _props = this.props, overlay = _props.overlay, clsPrefix = _props.clsPrefix; return _react2["default"].cloneElement(overlay, { clsPrefix: clsPrefix + '-menu', onClick: this.onClick }); }; Dropdown.prototype.getPopupDomNode = function getPopupDomNode() { return this.refs.trigger.getPopupDomNode(); }; Dropdown.prototype.afterVisibleChange = function afterVisibleChange(visible) { if (visible && this.props.minOverlayWidthMatchTrigger) { var overlayNode = this.getPopupDomNode(); var rootNode = _reactDom2["default"].findDOMNode(this); if (rootNode.offsetWidth > overlayNode.offsetWidth) { overlayNode.style.width = rootNode.offsetWidth + 'px'; } } }; Dropdown.prototype.render = function render() { var _props2 = this.props, clsPrefix = _props2.clsPrefix, children = _props2.children, transitionName = _props2.transitionName, animation = _props2.animation, align = _props2.align, placement = _props2.placement, getPopupContainer = _props2.getPopupContainer, showAction = _props2.showAction, hideAction = _props2.hideAction, overlayClassName = _props2.overlayClassName, overlayStyle = _props2.overlayStyle, trigger = _props2.trigger, props = _objectWithoutProperties(_props2, ['clsPrefix', 'children', 'transitionName', 'animation', 'align', 'placement', 'getPopupContainer', 'showAction', 'hideAction', 'overlayClassName', 'overlayStyle', 'trigger']); return _react2["default"].createElement( _trigger2["default"], _extends({}, props, { clsPrefix: clsPrefix, ref: 'trigger', popupClassName: overlayClassName, popupStyle: overlayStyle, builtinPlacements: _placement2["default"], action: trigger, showAction: showAction, hideAction: hideAction, popupPlacement: placement, popupAlign: align, popupTransitionName: transitionName, popupAnimation: animation, popupVisible: this.state.visible, afterPopupVisibleChange: this.afterVisibleChange, popup: this.getMenuElement(), onPopupVisibleChange: this.onVisibleChange, getPopupContainer: getPopupContainer }), children ); }; return Dropdown; }(_react2["default"].Component); ; Dropdown.propTypes = propTypes; Dropdown.defaultProps = defaultProps; exports["default"] = Dropdown; module.exports = exports['default']; /***/ }), /* 478 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; module.exports = __webpack_require__(479); /***/ }), /* 479 */ /***/ (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__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _reactDom = __webpack_require__(12); var _reactDom2 = _interopRequireDefault(_reactDom); var _contains = __webpack_require__(88); var _contains2 = _interopRequireDefault(_contains); var _tinperBeeCore = __webpack_require__(27); var _Popup = __webpack_require__(480); var _Popup2 = _interopRequireDefault(_Popup); var _utils = __webpack_require__(483); 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); } //import getContainerRenderMixin from './getContainerRenderMixin'; function noop() {} function returnEmptyString() { return ''; } var ALL_HANDLERS = ['onClick', 'onMouseDown', 'onTouchStart', 'onMouseEnter', 'onMouseLeave', 'onFocus', 'onBlur']; var propTypes = { children: _propTypes2["default"].any, action: _propTypes2["default"].oneOfType([_propTypes2["default"].string, _propTypes2["default"].arrayOf(_propTypes2["default"].string)]), showAction: _propTypes2["default"].any, hideAction: _propTypes2["default"].any, getPopupClassNameFromAlign: _propTypes2["default"].any, onPopupVisibleChange: _propTypes2["default"].func, afterPopupVisibleChange: _propTypes2["default"].func, popup: _propTypes2["default"].oneOfType([_propTypes2["default"].node, _propTypes2["default"].func]).isRequired, popupStyle: _propTypes2["default"].object, clsPrefix: _propTypes2["default"].string, popupClassName: _propTypes2["default"].string, popupPlacement: _propTypes2["default"].string, builtinPlacements: _propTypes2["default"].object, popupTransitionName: _propTypes2["default"].string, popupAnimation: _propTypes2["default"].any, mouseEnterDelay: _propTypes2["default"].number, mouseLeaveDelay: _propTypes2["default"].number, zIndex: _propTypes2["default"].number, focusDelay: _propTypes2["default"].number, blurDelay: _propTypes2["default"].number, getPopupContainer: _propTypes2["default"].func, destroyPopupOnHide: _propTypes2["default"].bool, mask: _propTypes2["default"].bool, maskClosable: _propTypes2["default"].bool, onPopupAlign: _propTypes2["default"].func, popupAlign: _propTypes2["default"].object, popupVisible: _propTypes2["default"].bool, maskTransitionName: _propTypes2["default"].string, maskAnimation: _propTypes2["default"].string }; var defaultProps = { clsPrefix: 'rc-trigger-popup', getPopupClassNameFromAlign: returnEmptyString, onPopupVisibleChange: noop, afterPopupVisibleChange: noop, onPopupAlign: noop, popupClassName: '', mouseEnterDelay: 0, mouseLeaveDelay: 0.1, focusDelay: 0, blurDelay: 0.15, popupStyle: {}, destroyPopupOnHide: false, popupAlign: {}, defaultPopupVisible: false, mask: false, maskClosable: true, action: [], showAction: [], hideAction: [] }; var Trigger = function (_Component) { _inherits(Trigger, _Component); function Trigger(props) { _classCallCheck(this, Trigger); var _this = _possibleConstructorReturn(this, _Component.call(this, props)); _this.state = { popupVisible: !!_this.props.popupVisible || _this.props.defaultPopupVisible //this.removeContainer = this.removeContainer.bind(this); };_this.getContainer = _this.getContainer.bind(_this); _this.renderComponent = _this.renderComponent.bind(_this); _this.isVisible = _this.isVisible.bind(_this); _this.onMouseEnter = _this.onMouseEnter.bind(_this); _this.onMouseLeave = _this.onMouseLeave.bind(_this); _this.onPopupMouseEnter = _this.onPopupMouseEnter.bind(_this); _this.onPopupMouseLeave = _this.onPopupMouseLeave.bind(_this); _this.onFocus = _this.onFocus.bind(_this); _this.onMouseDown = _this.onMouseDown.bind(_this); _this.onTouchStart = _this.onTouchStart.bind(_this); _this.onBlur = _this.onBlur.bind(_this); _this.onDocumentClick = _this.onDocumentClick.bind(_this); _this.getPopupDomNode = _this.getPopupDomNode.bind(_this); _this.getRootDomNode = _this.getRootDomNode.bind(_this); _this.getPopupClassNameFromAlign = _this.getPopupClassNameFromAlign.bind(_this); _this.getPopupAlign = _this.getPopupAlign.bind(_this); _this.getComponent = _this.getComponent.bind(_this); _this.setPopupVisible = _this.setPopupVisible.bind(_this); _this.delaySetPopupVisible = _this.delaySetPopupVisible.bind(_this); _this.clearDelayTimer = _this.clearDelayTimer.bind(_this); _this.createTwoChains = _this.createTwoChains.bind(_this); _this.isClickToShow = _this.isClickToShow.bind(_this); _this.isClickToHide = _this.isClickToHide.bind(_this); _this.isMouseEnterToShow = _this.isMouseEnterToShow.bind(_this); _this.isMouseLeaveToHide = _this.isMouseLeaveToHide.bind(_this); _this.isFocusToShow = _this.isFocusToShow.bind(_this); _this.isBlurToHide = _this.isBlurToHide.bind(_this); _this.forcePopupAlign = _this.forcePopupAlign.bind(_this); _this.fireEvents = _this.fireEvents.bind(_this); _this.close = _this.close.bind(_this); _this.onClick = _this.onClick.bind(_this); return _this; } Trigger.prototype.isVisible = function isVisible(instance) { return instance.state.popupVisible; }; Trigger.prototype.getContainer = function getContainer(instance) { var popupContainer = document.createElement('div'); var mountNode = instance.props.getPopupContainer ? instance.props.getPopupContainer((0, _reactDom.findDOMNode)(instance)) : document.body; mountNode.appendChild(popupContainer); return popupContainer; }; Trigger.prototype.renderComponent = function renderComponent(instance, componentArg, ready) { if (instance._component || this.isVisible(instance)) { if (!instance._container) { instance._container = this.getContainer(instance); } var component = instance.getComponent(componentArg); _reactDom2["default"].unstable_renderSubtreeIntoContainer(instance, component, instance._container, function callback() { instance._component = this; if (ready) { ready.call(this); } }); } }; Trigger.prototype.componentWillMount = function componentWillMount() { var _this2 = this; this.mounted = false; ALL_HANDLERS.forEach(function (h) { _this2['fire' + h] = function (e) { _this2.fireEvents(h, e); }; }); }; Trigger.prototype.componentDidMount = function componentDidMount() { this.mounted = true; this.componentDidUpdate({}, { popupVisible: this.state.popupVisible }); }; Trigger.prototype.componentWillReceiveProps = function componentWillReceiveProps(_ref) { var popupVisible = _ref.popupVisible; if (popupVisible !== undefined) { this.setState({ popupVisible: popupVisible }); } }; Trigger.prototype.componentDidUpdate = function componentDidUpdate(_, prevState) { var props = this.props; var state = this.state; this.renderComponent(this, null, function () { if (prevState.popupVisible !== state.popupVisible) { props.afterPopupVisibleChange(state.popupVisible); } }); if (this.isClickToHide()) { if (state.popupVisible) { if (!this.clickOutsideHandler) { this.clickOutsideHandler = (0, _tinperBeeCore.addEventListener)(document, 'mousedown', this.onDocumentClick); this.touchOutsideHandler = (0, _tinperBeeCore.addEventListener)(document, 'touchstart', this.onDocumentClick); this.mouseWheelOutsideHandler = (0, _tinperBeeCore.addEventListener)(document, 'mousewheel', this.onDocumentClick); } return; } } if (this.clickOutsideHandler) { this.clickOutsideHandler.remove(); this.touchOutsideHandler.remove(); this.mouseWheelOutsideHandler.remove(); this.clickOutsideHandler = null; this.touchOutsideHandler = null; this.mouseWheelOutsideHandler = null; } }; Trigger.prototype.componentWillUnmount = function componentWillUnmount() { this.clearDelayTimer(); if (this.clickOutsideHandler) { this.clickOutsideHandler.remove(); this.touchOutsideHandler.remove(); this.mouseWheelOutsideHandler.remove(); this.clickOutsideHandler = null; this.touchOutsideHandler = null; this.mouseWheelOutsideHandler = null; } if (this._container) { _reactDom2["default"].unmountComponentAtNode(this._container); } //this.removeContainer(); }; Trigger.prototype.onMouseEnter = function onMouseEnter(e) { this.fireEvents('onMouseEnter', e); this.delaySetPopupVisible(true, this.props.mouseEnterDelay); }; Trigger.prototype.onMouseLeave = function onMouseLeave(e) { this.fireEvents('onMouseLeave', e); this.delaySetPopupVisible(false, this.props.mouseLeaveDelay); }; Trigger.prototype.onPopupMouseEnter = function onPopupMouseEnter() { this.clearDelayTimer(); }; Trigger.prototype.onPopupMouseLeave = function onPopupMouseLeave(e) { // https://github.com/react-component/trigger/pull/13 // react bug? if (e.relatedTarget && !e.relatedTarget.setTimeout && this._component && (0, _contains2["default"])(this._component.getPopupDomNode(), e.relatedTarget)) { return; } this.delaySetPopupVisible(false, this.props.mouseLeaveDelay); }; Trigger.prototype.onFocus = function onFocus(e) { this.fireEvents('onFocus', e); // incase focusin and focusout this.clearDelayTimer(); if (this.isFocusToShow()) { this.focusTime = Date.now(); this.delaySetPopupVisible(true, this.props.focusDelay); } }; Trigger.prototype.onMouseDown = function onMouseDown(e) { this.fireEvents('onMouseDown', e); this.preClickTime = Date.now(); }; Trigger.prototype.onTouchStart = function onTouchStart(e) { this.fireEvents('onTouchStart', e); this.preTouchTime = Date.now(); }; Trigger.prototype.onBlur = function onBlur(e) { this.fireEvents('onBlur', e); this.clearDelayTimer(); if (this.isBlurToHide()) { this.delaySetPopupVisible(false, this.props.blurDelay); } }; Trigger.prototype.onClick = function onClick(event) { this.fireEvents('onClick', event); // focus will trigger click if (this.focusTime) { var preTime = void 0; if (this.preClickTime && this.preTouchTime) { preTime = Math.min(this.preClickTime, this.preTouchTime); } else if (this.preClickTime) { preTime = this.preClickTime; } else if (this.preTouchTime) { preTime = this.preTouchTime; } if (Math.abs(preTime - this.focusTime) < 20) { return; } this.focusTime = 0; } this.preClickTime = 0; this.preTouchTime = 0; event.preventDefault(); var nextVisible = !this.state.popupVisible; if (this.isClickToHide() && !nextVisible || nextVisible && this.isClickToShow()) { this.setPopupVisible(!this.state.popupVisible); } }; Trigger.prototype.onDocumentClick = function onDocumentClick(event) { if (this.props.mask && !this.props.maskClosable) { return; } var target = event.target; var root = (0, _reactDom.findDOMNode)(this); var popupNode = this.getPopupDomNode(); if (!(0, _contains2["default"])(root, target) && !(0, _contains2["default"])(popupNode, target)) { this.close(); } }; Trigger.prototype.getPopupDomNode = function getPopupDomNode() { // for test if (this._component) { return this.mounted ? this._component.getPopupDomNode() : null; } return null; }; Trigger.prototype.getRootDomNode = function getRootDomNode() { return _reactDom2["default"].findDOMNode(this); }; Trigger.prototype.getPopupClassNameFromAlign = function getPopupClassNameFromAlign(align) { var className = []; var props = this.props; var popupPlacement = props.popupPlacement, builtinPlacements = props.builtinPlacements, clsPrefix = props.clsPrefix; if (popupPlacement && builtinPlacements) { className.push((0, _utils.getPopupClassNameFromAlign)(builtinPlacements, clsPrefix, align)); } if (props.getPopupClassNameFromAlign) { className.push(props.getPopupClassNameFromAlign(align)); } return className.join(' '); }; Trigger.prototype.getPopupAlign = function getPopupAlign() { var props = this.props; var popupPlacement = props.popupPlacement, popupAlign = props.popupAlign, builtinPlacements = props.builtinPlacements; if (popupPlacement && builtinPlacements) { return (0, _utils.getAlignFromPlacement)(builtinPlacements, popupPlacement, popupAlign); } return popupAlign; }; Trigger.prototype.getComponent = function getComponent() { var props = this.props, state = this.state; var mouseProps = {}; if (this.isMouseEnterToShow()) { mouseProps.onMouseEnter = this.onPopupMouseEnter; } if (this.isMouseLeaveToHide()) { mouseProps.onMouseLeave = this.onPopupMouseLeave; } return _react2["default"].createElement( _Popup2["default"], _extends({ clsPrefix: props.clsPrefix, destroyPopupOnHide: props.destroyPopupOnHide, visible: state.popupVisible, className: props.popupClassName, action: props.action, align: this.getPopupAlign(), onAlign: props.onPopupAlign, animation: props.popupAnimation, getClassNameFromAlign: this.getPopupClassNameFromAlign }, mouseProps, { getRootDomNode: this.getRootDomNode, style: props.popupStyle, mask: props.mask, zIndex: props.zIndex, transitionName: props.popupTransitionName, maskAnimation: props.maskAnimation, maskTransitionName: props.maskTransitionName }), typeof props.popup === 'function' ? props.popup() : props.popup ); }; Trigger.prototype.setPopupVisible = function setPopupVisible(popupVisible) { this.clearDelayTimer(); if (this.state.popupVisible !== popupVisible) { if (!('popupVisible' in this.props)) { this.setState({ popupVisible: popupVisible }); } this.props.onPopupVisibleChange(popupVisible); } }; Trigger.prototype.delaySetPopupVisible = function delaySetPopupVisible(visible, delayS) { var _this3 = this; var delay = delayS * 1000; this.clearDelayTimer(); if (delay) { this.delayTimer = setTimeout(function () { _this3.setPopupVisible(visible); _this3.clearDelayTimer(); }, delay); } else { this.setPopupVisible(visible); } }; Trigger.prototype.clearDelayTimer = function clearDelayTimer() { if (this.delayTimer) { clearTimeout(this.delayTimer); this.delayTimer = null; } }; Trigger.prototype.createTwoChains = function createTwoChains(event) { var childPros = this.props.children.props; var props = this.props; if (childPros[event] && props[event]) { return this['fire' + event]; } return childPros[event] || props[event]; }; Trigger.prototype.isClickToShow = function isClickToShow() { var _props = this.props, action = _props.action, showAction = _props.showAction; return action.indexOf('click') !== -1 || showAction.indexOf('click') !== -1; }; Trigger.prototype.isClickToHide = function isClickToHide() { var _props2 = this.props, action = _props2.action, hideAction = _props2.hideAction; return action.indexOf('click') !== -1 || hideAction.indexOf('click') !== -1; }; Trigger.prototype.isMouseEnterToShow = function isMouseEnterToShow() { var _props3 = this.props, action = _props3.action, showAction = _props3.showAction; return action.indexOf('hover') !== -1 || showAction.indexOf('mouseEnter') !== -1; }; Trigger.prototype.isMouseLeaveToHide = function isMouseLeaveToHide() { var _props4 = this.props, action = _props4.action, hideAction = _props4.hideAction; return action.indexOf('hover') !== -1 || hideAction.indexOf('mouseLeave') !== -1; }; Trigger.prototype.isFocusToShow = function isFocusToShow() { var _props5 = this.props, action = _props5.action, showAction = _props5.showAction; return action.indexOf('focus') !== -1 || showAction.indexOf('focus') !== -1; }; Trigger.prototype.isBlurToHide = function isBlurToHide() { var _props6 = this.props, action = _props6.action, hideAction = _props6.hideAction; return action.indexOf('focus') !== -1 || hideAction.indexOf('blur') !== -1; }; Trigger.prototype.forcePopupAlign = function forcePopupAlign() { if (this.state.popupVisible && this.popupInstance && this.popupInstance.alignInstance) { this.popupInstance.alignInstance.forceAlign(); } }; Trigger.prototype.fireEvents = function fireEvents(type, e) { var childCallback = this.props.children.props[type]; if (childCallback) { childCallback(e); } var callback = this.props[type]; if (callback) { callback(e); } }; Trigger.prototype.close = function close() { this.setPopupVisible(false); }; Trigger.prototype.render = function render() { var props = this.props; var children = props.children; var child = _react2["default"].Children.only(children); var newChildProps = {}; if (this.isClickToHide() || this.isClickToShow()) { newChildProps.onClick = this.onClick; newChildProps.onMouseDown = this.onMouseDown; newChildProps.onTouchStart = this.onTouchStart; } else { newChildProps.onClick = this.createTwoChains('onClick'); newChildProps.onMouseDown = this.createTwoChains('onMouseDown'); newChildProps.onTouchStart = this.createTwoChains('onTouchStart'); } if (this.isMouseEnterToShow()) { newChildProps.onMouseEnter = this.onMouseEnter; } else { newChildProps.onMouseEnter = this.createTwoChains('onMouseEnter'); } if (this.isMouseLeaveToHide()) { newChildProps.onMouseLeave = this.onMouseLeave; } else { newChildProps.onMouseLeave = this.createTwoChains('onMouseLeave'); } if (this.isFocusToShow() || this.isBlurToHide()) { newChildProps.onFocus = this.onFocus; newChildProps.onBlur = this.onBlur; } else { newChildProps.onFocus = this.createTwoChains('onFocus'); newChildProps.onBlur = this.createTwoChains('onBlur'); } return _react2["default"].cloneElement(child, newChildProps); }; return Trigger; }(_react.Component); ; Trigger.propTypes = propTypes; Trigger.defaultProps = defaultProps; exports["default"] = Trigger; module.exports = exports['default']; /***/ }), /* 480 */ /***/ (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__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _reactDom = __webpack_require__(12); var _reactDom2 = _interopRequireDefault(_reactDom); var _Align = __webpack_require__(50); var _Align2 = _interopRequireDefault(_Align); var _beeAnimate = __webpack_require__(69); var _beeAnimate2 = _interopRequireDefault(_beeAnimate); var _PopupInner = __webpack_require__(481); var _PopupInner2 = _interopRequireDefault(_PopupInner); var _LazyRenderBox = __webpack_require__(482); var _LazyRenderBox2 = _interopRequireDefault(_LazyRenderBox); 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 = { visible: _propTypes2["default"].bool, style: _propTypes2["default"].object, getClassNameFromAlign: _propTypes2["default"].func, onAlign: _propTypes2["default"].func, getRootDomNode: _propTypes2["default"].func, onMouseEnter: _propTypes2["default"].func, align: _propTypes2["default"].any, destroyPopupOnHide: _propTypes2["default"].bool, className: _propTypes2["default"].string, clsPrefix: _propTypes2["default"].string, onMouseLeave: _propTypes2["default"].func }; var Popup = function (_Component) { _inherits(Popup, _Component); function Popup() { _classCallCheck(this, Popup); var _this = _possibleConstructorReturn(this, _Component.call(this)); _this.onAlign = _this.onAlign.bind(_this); _this.getPopupDomNode = _this.getPopupDomNode.bind(_this); _this.getTarget = _this.getTarget.bind(_this); _this.getMaskTransitionName = _this.getMaskTransitionName.bind(_this); _this.getTransitionName = _this.getTransitionName.bind(_this); _this.getClassName = _this.getClassName.bind(_this); _this.getPopupElement = _this.getPopupElement.bind(_this); _this.getZIndexStyle = _this.getZIndexStyle.bind(_this); _this.getMaskElement = _this.getMaskElement.bind(_this); _this.saveAlign = _this.saveAlign.bind(_this); return _this; } Popup.prototype.componentDidMount = function componentDidMount() { this.rootNode = this.getPopupDomNode(); }; Popup.prototype.onAlign = function onAlign(popupDomNode, align) { var props = this.props; var alignClassName = props.getClassNameFromAlign(props.align); var currentAlignClassName = props.getClassNameFromAlign(align); if (alignClassName !== currentAlignClassName) { this.currentAlignClassName = currentAlignClassName; popupDomNode.className = this.getClassName(currentAlignClassName); } props.onAlign(popupDomNode, align); }; Popup.prototype.getPopupDomNode = function getPopupDomNode() { return _reactDom2["default"].findDOMNode(this.refs.popup); }; Popup.prototype.getTarget = function getTarget() { return this.props.getRootDomNode(); }; Popup.prototype.getMaskTransitionName = function getMaskTransitionName() { var props = this.props; var transitionName = props.maskTransitionName; var animation = props.maskAnimation; if (!transitionName && animation) { transitionName = props.clsPrefix + '-' + animation; } return transitionName; }; Popup.prototype.getTransitionName = function getTransitionName() { var props = this.props; var transitionName = props.transitionName; if (!transitionName && props.animation) { transitionName = props.clsPrefix + '-' + props.animation; } return transitionName; }; Popup.prototype.getClassName = function getClassName(currentAlignClassName) { return this.props.clsPrefix + ' ' + this.props.className + ' ' + currentAlignClassName; }; Popup.prototype.getPopupElement = function getPopupElement() { var props = this.props; var align = props.align, style = props.style, visible = props.visible, clsPrefix = props.clsPrefix, destroyPopupOnHide = props.destroyPopupOnHide; var className = this.getClassName(this.currentAlignClassName || props.getClassNameFromAlign(align)); var hiddenClassName = clsPrefix + '-hidden'; if (!visible) { this.currentAlignClassName = null; } var newStyle = _extends({}, style, this.getZIndexStyle()); var popupInnerProps = { className: className, clsPrefix: clsPrefix, ref: 'popup', onMouseEnter: props.onMouseEnter, onMouseLeave: props.onMouseLeave, style: newStyle }; if (destroyPopupOnHide) { return _react2["default"].createElement( _beeAnimate2["default"], { component: '', exclusive: true, transitionAppear: true, transitionName: this.getTransitionName() }, visible ? _react2["default"].createElement( _Align2["default"], { target: this.getTarget, key: 'popup', ref: this.saveAlign, monitorWindowResize: true, align: align, onAlign: this.onAlign }, _react2["default"].createElement( _PopupInner2["default"], _extends({ visible: true }, popupInnerProps), props.children ) ) : null ); } return _react2["default"].createElement( _beeAnimate2["default"], { component: '', exclusive: true, transitionAppear: true, transitionName: this.getTransitionName(), showProp: 'xVisible' }, _react2["default"].createElement( _Align2["default"], { target: this.getTarget, key: 'popup', ref: this.saveAlign, monitorWindowResize: true, xVisible: visible, childrenProps: { visible: 'xVisible' }, disabled: !visible, align: align, onAlign: this.onAlign }, _react2["default"].createElement( _PopupInner2["default"], _extends({ hiddenClassName: hiddenClassName }, popupInnerProps), props.children ) ) ); }; Popup.prototype.getZIndexStyle = function getZIndexStyle() { var style = {}; var props = this.props; if (props.zIndex !== undefined) { style.zIndex = props.zIndex; } return style; }; Popup.prototype.getMaskElement = function getMaskElement() { var props = this.props; var maskElement = void 0; if (props.mask) { var maskTransition = this.getMaskTransitionName(); maskElement = _react2["default"].createElement(_LazyRenderBox2["default"], { style: this.getZIndexStyle(), key: 'mask', className: props.clsPrefix + '-mask', hiddenClassName: props.clsPrefix + '-mask-hidden', visible: props.visible }); if (maskTransition) { maskElement = _react2["default"].createElement( _beeAnimate2["default"], { key: 'mask', showProp: 'visible', transitionAppear: true, component: '', transitionName: maskTransition }, maskElement ); } } return maskElement; }; Popup.prototype.saveAlign = function saveAlign(align) { this.alignInstance = align; }; Popup.prototype.render = function render() { return _react2["default"].createElement( 'div', null, this.getMaskElement(), this.getPopupElement() ); }; return Popup; }(_react.Component); ; Popup.propTypes = propTypes; exports["default"] = Popup; module.exports = exports['default']; /***/ }), /* 481 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _LazyRenderBox = __webpack_require__(482); var _LazyRenderBox2 = _interopRequireDefault(_LazyRenderBox); 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 = { hiddenClassName: _propTypes2["default"].string, className: _propTypes2["default"].string, clsPrefix: _propTypes2["default"].string, onMouseEnter: _propTypes2["default"].func, onMouseLeave: _propTypes2["default"].func, children: _propTypes2["default"].any }; var PopupInner = function (_Component) { _inherits(PopupInner, _Component); function PopupInner() { _classCallCheck(this, PopupInner); return _possibleConstructorReturn(this, _Component.apply(this, arguments)); } PopupInner.prototype.render = function render() { var props = this.props; var className = props.className; if (!props.visible) { className += ' ' + props.hiddenClassName; } return _react2["default"].createElement( 'div', { className: className, onMouseEnter: props.onMouseEnter, onMouseLeave: props.onMouseLeave, style: props.style }, _react2["default"].createElement( _LazyRenderBox2["default"], { className: props.clsPrefix + '-content', visible: props.visible }, props.children ) ); }; return PopupInner; }(_react.Component); ; PopupInner.propTypes = propTypes; exports["default"] = PopupInner; module.exports = exports['default']; /***/ }), /* 482 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); 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 = { children: _propTypes2["default"].any, className: _propTypes2["default"].string, visible: _propTypes2["default"].bool, hiddenClassName: _propTypes2["default"].string }; var LazyRenderBox = function (_Component) { _inherits(LazyRenderBox, _Component); function LazyRenderBox() { _classCallCheck(this, LazyRenderBox); return _possibleConstructorReturn(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 = _objectWithoutProperties(_props, ['hiddenClassName', 'visible']); if (hiddenClassName || _react2["default"].Children.count(props.children) > 1) { if (!visible && hiddenClassName) { props.className += ' ' + hiddenClassName; } return _react2["default"].createElement('div', props); } return _react2["default"].Children.only(props.children); }; return LazyRenderBox; }(_react.Component); ; LazyRenderBox.propTypes = propTypes; exports["default"] = LazyRenderBox; module.exports = exports['default']; /***/ }), /* 483 */ /***/ (function(module, exports) { '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; }; exports.getAlignFromPlacement = getAlignFromPlacement; exports.getPopupClassNameFromAlign = getPopupClassNameFromAlign; function isPointsEq(a1, a2) { return a1[0] === a2[0] && a1[1] === a2[1]; } function getAlignFromPlacement(builtinPlacements, placementStr, align) { var baseAlign = builtinPlacements[placementStr] || {}; return _extends({}, baseAlign, align); } function getPopupClassNameFromAlign(builtinPlacements, clsPrefix, align) { var points = align.points; for (var placement in builtinPlacements) { if (builtinPlacements.hasOwnProperty(placement)) { if (isPointsEq(builtinPlacements[placement].points, points)) { return clsPrefix + '-placement-' + placement; } } } return ''; } /***/ }), /* 484 */ /***/ (function(module, exports) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var autoAdjustOverflow = { adjustX: 1, adjustY: 1 }; var targetOffset = [0, 0]; var placements = exports.placements = { topLeft: { points: ['bl', 'tl'], overflow: autoAdjustOverflow, offset: [0, -4], targetOffset: targetOffset }, topCenter: { points: ['bc', 'tc'], overflow: autoAdjustOverflow, offset: [0, -4], targetOffset: targetOffset }, topRight: { points: ['br', 'tr'], overflow: autoAdjustOverflow, offset: [0, -4], targetOffset: targetOffset }, bottomLeft: { points: ['tl', 'bl'], overflow: autoAdjustOverflow, offset: [0, 4], targetOffset: targetOffset }, bottomCenter: { points: ['tc', 'bc'], overflow: autoAdjustOverflow, offset: [0, 4], targetOffset: targetOffset }, bottomRight: { points: ['tr', 'br'], overflow: autoAdjustOverflow, offset: [0, 4], targetOffset: targetOffset } }; exports["default"] = placements; /***/ }), /* 485 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _VerticalMenu = __webpack_require__(486); var _VerticalMenu2 = _interopRequireDefault(_VerticalMenu); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } exports["default"] = _VerticalMenu2["default"]; module.exports = exports['default']; /***/ }), /* 486 */ /***/ (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__(4); var _react2 = _interopRequireDefault(_react); var _ExportMenu = __webpack_require__(487); var _ExportMenu2 = _interopRequireDefault(_ExportMenu); var _openAnimation = __webpack_require__(498); var _openAnimation2 = _interopRequireDefault(_openAnimation); var _warning = __webpack_require__(499); var _warning2 = _interopRequireDefault(_warning); 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 Menu = function (_React$Component) { _inherits(Menu, _React$Component); function Menu(props) { _classCallCheck(this, Menu); var _this = _possibleConstructorReturn(this, _React$Component.call(this, props)); _this.handleClick = function (e) { _this.setOpenKeys([]); var onClick = _this.props.onClick; if (onClick) { onClick(e); } }; _this.handleOpenChange = function (openKeys) { _this.setOpenKeys(openKeys); var onOpenChange = _this.props.onOpenChange; if (onOpenChange) { onOpenChange(openKeys); } }; (0, _warning2["default"])(!('onOpen' in props || 'onClose' in props), '`onOpen` and `onClose` are removed, please use `onOpenChange` instead.'); _this.state = { openKeys: [] }; _this.rcMenu = {}; return _this; } Menu.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { if (this.props.mode === 'inline' && nextProps.mode !== 'inline') { this.switchModeFromInline = true; } if ('openKeys' in nextProps) { this.setOpenKeys(nextProps.openKeys); } }; Menu.prototype.setOpenKeys = function setOpenKeys(openKeys) { if (!('openKeys' in this.props)) { this.setState({ openKeys: openKeys }); } }; Menu.prototype.render = function render() { var _this2 = this; var openAnimation = this.props.openAnimation || this.props.openTransitionName; if (!openAnimation) { switch (this.props.mode) { case 'horizontal': openAnimation = 'slide-up'; break; case 'vertical': // When mode switch from inline // submenu should hide without animation if (this.switchModeFromInline) { openAnimation = ''; this.switchModeFromInline = false; } else { openAnimation = 'zoom-big'; } break; case 'inline': openAnimation = _openAnimation2["default"]; break; default: } } var props = {}; var className = this.props.className + ' ' + this.props.prefixCls + '-' + this.props.theme; if (this.props.mode !== 'inline') { // 这组属性的目的是 // 弹出型的菜单需要点击后立即关闭 // 另外,弹出型的菜单的受控模式没有使用场景 props = { openKeys: this.state.openKeys, onClick: this.handleClick, onOpenChange: this.handleOpenChange, openTransitionName: openAnimation, className: className }; } else { props = { openAnimation: openAnimation, className: className }; } return _react2["default"].createElement(_ExportMenu2["default"], _extends({ ref: function ref(el) { return _this2.rcMenu = el; } }, this.props, props)); }; return Menu; }(_react2["default"].Component); Menu.defaultProps = { prefixCls: 'u-menu', className: '', theme: 'light' // or dark }; Menu.Divider = _ExportMenu.Divider; Menu.Item = _ExportMenu.Item; Menu.SubMenu = _ExportMenu.SubMenu; Menu.ItemGroup = _ExportMenu.ItemGroup; Menu.MenuToggle = _ExportMenu.MenuToggle; Menu.SideContainer = _ExportMenu.SideContainer; exports["default"] = Menu; module.exports = exports['default']; /***/ }), /* 487 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.MenuToggle = exports.SideContainer = exports.Divider = exports.ItemGroup = exports.MenuItemGroup = exports.MenuItem = exports.Item = exports.SubMenu = undefined; var _Menu = __webpack_require__(488); var _Menu2 = _interopRequireDefault(_Menu); var _SubMenu = __webpack_require__(491); var _SubMenu2 = _interopRequireDefault(_SubMenu); var _MenuItem = __webpack_require__(493); var _MenuItem2 = _interopRequireDefault(_MenuItem); var _MenuItemGroup = __webpack_require__(494); var _MenuItemGroup2 = _interopRequireDefault(_MenuItemGroup); var _Divider = __webpack_require__(495); var _Divider2 = _interopRequireDefault(_Divider); var _SideContainer = __webpack_require__(496); var _SideContainer2 = _interopRequireDefault(_SideContainer); var _MenuToggle = __webpack_require__(497); var _MenuToggle2 = _interopRequireDefault(_MenuToggle); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } exports.SubMenu = _SubMenu2["default"]; exports.Item = _MenuItem2["default"]; exports.MenuItem = _MenuItem2["default"]; exports.MenuItemGroup = _MenuItemGroup2["default"]; exports.ItemGroup = _MenuItemGroup2["default"]; exports.Divider = _Divider2["default"]; exports.SideContainer = _SideContainer2["default"]; exports.MenuToggle = _MenuToggle2["default"]; exports["default"] = _Menu2["default"]; /***/ }), /* 488 */ /***/ (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__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _util = __webpack_require__(489); var _domScrollIntoView = __webpack_require__(275); var _domScrollIntoView2 = _interopRequireDefault(_domScrollIntoView); var _classnames = __webpack_require__(3); var _classnames2 = _interopRequireDefault(_classnames); var _DOMWrap = __webpack_require__(490); var _DOMWrap2 = _interopRequireDefault(_DOMWrap); var _tinperBeeCore = __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 _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 _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 saveRef(index, subIndex, c) { if (c) { if (subIndex !== undefined) { this.instanceArray[index] = this.instanceArray[index] || []; this.instanceArray[index][subIndex] = c; } else { this.instanceArray[index] = c; } } } function allDisabled(arr) { if (!arr.length) { return true; } return arr.every(function (c) { return !!c.props.disabled; }); } function getActiveKey(props, originalActiveKey) { var activeKey = originalActiveKey; var children = props.children, eventKey = props.eventKey; 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)) { found = true; } }); if (found) { return activeKey; } } activeKey = null; if (props.defaultActiveFirst) { (0, _util.loopMenuItem)(children, function (c, i) { if (!activeKey && c && !c.props.disabled) { activeKey = (0, _util.getKeyFromChildrenIndex)(c, eventKey, i); } }); return activeKey; } return activeKey; } var propTypes = { openSubMenuOnMouseEnter: _propTypes2["default"].bool, closeSubMenuOnMouseLeave: _propTypes2["default"].bool, selectedKeys: _propTypes2["default"].oneOfType([_propTypes2["default"].array, _propTypes2["default"].string]), defaultSelectedKeys: _propTypes2["default"].arrayOf(_propTypes2["default"].string), defaultOpenKeys: _propTypes2["default"].arrayOf(_propTypes2["default"].string), openKeys: _propTypes2["default"].arrayOf(_propTypes2["default"].string), mode: _propTypes2["default"].string, onClick: _propTypes2["default"].func, onSelect: _propTypes2["default"].func, onDeselect: _propTypes2["default"].func, onDestroy: _propTypes2["default"].func, openTransitionName: _propTypes2["default"].string, openAnimation: _propTypes2["default"].oneOfType([_propTypes2["default"].string, _propTypes2["default"].object]), level: _propTypes2["default"].number, eventKey: _propTypes2["default"].string, selectable: _propTypes2["default"].bool, children: _propTypes2["default"].any, focusable: _propTypes2["default"].bool, multiple: _propTypes2["default"].bool, style: _propTypes2["default"].object, defaultActiveFirst: _propTypes2["default"].bool, visible: _propTypes2["default"].bool, activeKey: _propTypes2["default"].string }; var defaultProps = { openSubMenuOnMouseEnter: true, closeSubMenuOnMouseLeave: true, selectable: true, onClick: _util.noop, onSelect: _util.noop, onOpenChange: _util.noop, onDeselect: _util.noop, defaultSelectedKeys: [], defaultOpenKeys: [], clsPrefix: 'u-menu', className: '', mode: 'vertical', level: 1, inlineIndent: 24, visible: true, focusable: true, style: {} }; var Menu = function (_Component) { _inherits(Menu, _Component); function Menu(props) { _classCallCheck(this, Menu); var _this = _possibleConstructorReturn(this, _Component.call(this, props)); var selectedKeys = _this.props.defaultSelectedKeys; var openKeys = _this.props.defaultOpenKeys; if ('selectedKeys' in _this.props) { selectedKeys = _this.props.selectedKeys || []; } if ('openKeys' in props) { openKeys = _this.props.openKeys || []; } _this.state = { selectedKeys: selectedKeys, openKeys: openKeys, activeKey: getActiveKey(_this.props, _this.props.activeKey) //activeKey: getActiveKey(this.props, this.props.activeKey), }; _this.renderMenuItem = _this.renderMenuItem.bind(_this); _this.onDestroy = _this.onDestroy.bind(_this); _this.onItemHover = _this.onItemHover.bind(_this); _this.onSelect = _this.onSelect.bind(_this); _this.onOpenChange = _this.onOpenChange.bind(_this); _this.onClick = _this.onClick.bind(_this); _this.onDeselect = _this.onDeselect.bind(_this); _this.getOpenTransitionName = _this.getOpenTransitionName.bind(_this); _this.isInlineMode = _this.isInlineMode.bind(_this); _this.lastOpenSubMenu = _this.lastOpenSubMenu.bind(_this); _this.renderMenuItem = _this.renderMenuItem.bind(_this); _this.renderCommonMenuItem = _this.renderCommonMenuItem.bind(_this); _this.renderRoot = _this.renderRoot.bind(_this); _this.getOpenChangesOnItemHover = _this.getOpenChangesOnItemHover.bind(_this); _this.getFlatInstanceArray = _this.getFlatInstanceArray.bind(_this); _this.onKeyDown = _this.onKeyDown.bind(_this); _this.step = _this.step.bind(_this); return _this; } Menu.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { var props = {}; if ('selectedKeys' in nextProps) { props.selectedKeys = nextProps.selectedKeys; } if ('openKeys' in nextProps) { props.openKeys = nextProps.openKeys; } if ('activeKey' in nextProps) { props.activeKey = getActiveKey(nextProps, nextProps.activeKey); } else { var originalActiveKey = this.state.activeKey; var activeKey = getActiveKey(nextProps, originalActiveKey); // fix: this.setState(), parent.render(), if (activeKey !== originalActiveKey) { props.activeKey = activeKey; } } this.setState(props); }; Menu.prototype.componentWillMount = function componentWillMount() { this.instanceArray = []; }; Menu.prototype.onDestroy = function onDestroy(key) { var state = this.state; var props = this.props; var selectedKeys = state.selectedKeys; var openKeys = state.openKeys; var index = selectedKeys.indexOf(key); if (!('selectedKeys' in props) && index !== -1) { selectedKeys.splice(index, 1); } index = openKeys.indexOf(key); if (!('openKeys' in props) && index !== -1) { openKeys.splice(index, 1); } }; Menu.prototype.onItemHover = function onItemHover(e) { var item = e.item; var _props = this.props, mode = _props.mode, closeSubMenuOnMouseLeave = _props.closeSubMenuOnMouseLeave; var _e$openChanges = e.openChanges, openChanges = _e$openChanges === undefined ? [] : _e$openChanges; // special for top sub menu if (mode !== 'inline' && !closeSubMenuOnMouseLeave && item.isSubMenu) { var activeKey = this.state.activeKey; var activeItem = this.getFlatInstanceArray().filter(function (c) { return c && c.props.eventKey === activeKey; })[0]; if (activeItem && activeItem.props.open) { openChanges = openChanges.concat({ key: item.props.eventKey, item: item, originalEvent: e, open: true }); } } openChanges = openChanges.concat(this.getOpenChangesOnItemHover(e)); if (openChanges.length) { this.onOpenChange(openChanges); } }; Menu.prototype.onSelect = function onSelect(selectInfo) { var props = this.props; if (props.selectable) { // root menu var selectedKeys = this.state.selectedKeys; var selectedKey = selectInfo.key; if (props.multiple) { selectedKeys = selectedKeys.concat([selectedKey]); } else { selectedKeys = [selectedKey]; } if (!('selectedKeys' in props)) { this.setState({ selectedKeys: selectedKeys }); } props.onSelect(_extends({}, selectInfo, { selectedKeys: selectedKeys })); } }; Menu.prototype.onClick = function onClick(e) { this.props.onClick(e); }; Menu.prototype.onOpenChange = function onOpenChange(e_) { var props = this.props; var openKeys = this.state.openKeys.concat(); var changed = false; var processSingle = function processSingle(e) { var oneChanged = false; if (e.open) { oneChanged = openKeys.indexOf(e.key) === -1; if (oneChanged) { openKeys.push(e.key); } } else { var index = openKeys.indexOf(e.key); oneChanged = index !== -1; if (oneChanged) { openKeys.splice(index, 1); } } changed = changed || oneChanged; }; if (Array.isArray(e_)) { // batch change call e_.forEach(processSingle); } else { processSingle(e_); } if (changed) { if (!('openKeys' in this.props)) { this.setState({ openKeys: openKeys }); } props.onOpenChange(openKeys); } }; Menu.prototype.onDeselect = function onDeselect(selectInfo) { var props = this.props; if (props.selectable) { var selectedKeys = this.state.selectedKeys.concat(); var selectedKey = selectInfo.key; var index = selectedKeys.indexOf(selectedKey); if (index !== -1) { selectedKeys.splice(index, 1); } if (!('selectedKeys' in props)) { this.setState({ selectedKeys: selectedKeys }); } props.onDeselect(_extends({}, selectInfo, { selectedKeys: selectedKeys })); } }; Menu.prototype.getOpenTransitionName = function getOpenTransitionName() { var props = this.props; var transitionName = props.openTransitionName; var animationName = props.openAnimation; if (!transitionName && typeof animationName === 'string') { transitionName = props.clsPrefix + '-open-' + animationName; } return transitionName; }; Menu.prototype.isInlineMode = function isInlineMode() { return this.props.mode === 'inline'; }; Menu.prototype.lastOpenSubMenu = function lastOpenSubMenu() { var lastOpen = []; var openKeys = this.state.openKeys; if (openKeys.length) { lastOpen = this.getFlatInstanceArray().filter(function (c) { return c && openKeys.indexOf(c.props.eventKey) !== -1; }); } return lastOpen[0]; }; Menu.prototype.renderMenuItem = function renderMenuItem(c, i, subIndex) { if (!c) { return null; } var state = this.state; var extraProps = { openKeys: state.openKeys, selectedKeys: state.selectedKeys, openSubMenuOnMouseEnter: this.props.openSubMenuOnMouseEnter }; return this.renderCommonMenuItem(c, i, subIndex, extraProps); }; Menu.prototype.renderCommonMenuItem = function renderCommonMenuItem(child, i, subIndex, extraProps) { var state = this.state; var props = this.props; var key = (0, _util.getKeyFromChildrenIndex)(child, props.eventKey, i); var childProps = child.props; var isActive = key === state.activeKey; var newChildProps = _extends({ mode: props.mode, level: props.level, inlineIndent: props.inlineIndent, renderMenuItem: this.renderMenuItem, rootPrefixCls: props.clsPrefix, index: i, parentMenu: this, ref: childProps.disabled ? undefined : (0, _tinperBeeCore.createChainedFunction)(child.ref, saveRef.bind(this, i, subIndex)), eventKey: key, closeSubMenuOnMouseLeave: props.closeSubMenuOnMouseLeave, onItemHover: this.onItemHover, active: !childProps.disabled && isActive, multiple: props.multiple, onClick: this.onClick, openTransitionName: this.getOpenTransitionName(), openAnimation: props.openAnimation, onOpenChange: this.onOpenChange, onDeselect: this.onDeselect, onDestroy: this.onDestroy, onSelect: this.onSelect }, extraProps); if (props.mode === 'inline') { newChildProps.closeSubMenuOnMouseLeave = newChildProps.openSubMenuOnMouseEnter = false; } return _react2["default"].cloneElement(child, newChildProps); }; Menu.prototype.getOpenChangesOnItemHover = function getOpenChangesOnItemHover(e) { var mode = this.props.mode; var key = e.key, hover = e.hover, trigger = e.trigger; var activeKey = this.state.activeKey; if (!trigger || hover || this.props.closeSubMenuOnMouseLeave || !e.item.isSubMenu || mode === 'inline') { this.setState({ activeKey: hover ? key : null }); } else {} // keep active for sub menu for click active // empty // clear last open status if (hover && mode !== 'inline') { var activeItem = this.getFlatInstanceArray().filter(function (c) { return c && c.props.eventKey === activeKey; })[0]; if (activeItem && activeItem.isSubMenu && activeItem.props.eventKey !== key) { return { item: activeItem, originalEvent: e, key: activeItem.props.eventKey, open: false }; } } return []; }; Menu.prototype.getFlatInstanceArray = function getFlatInstanceArray() { var instanceArray = this.instanceArray; var hasInnerArray = instanceArray.some(function (a) { return Array.isArray(a); }); if (hasInnerArray) { instanceArray = []; this.instanceArray.forEach(function (a) { if (Array.isArray(a)) { instanceArray.push.apply(instanceArray, a); } else { instanceArray.push(a); } }); this.instanceArray = instanceArray; } return instanceArray; }; Menu.prototype.step = function step(direction) { var children = this.getFlatInstanceArray(); var activeKey = this.state.activeKey; 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 (!this.props.defaultActiveFirst && activeIndex !== -1) { if (allDisabled(children.slice(activeIndex, len - 1))) { return undefined; } } var start = (activeIndex + 1) % len; var i = start; for (;;) { var child = children[i]; if (!child || child.props.disabled) { i = (i + 1 + len) % len; // complete a loop if (i === start) { return null; } } else { return child; } } }; Menu.prototype.onKeyDown = function onKeyDown(e) { var _this2 = this; var keyCode = e.keyCode; var handled = void 0; this.getFlatInstanceArray().forEach(function (obj) { if (obj && obj.props.active) { handled = obj.onKeyDown(e); } }); if (handled) { return 1; } var activeItem = null; if (keyCode === _tinperBeeCore.KeyCode.UP || keyCode === _tinperBeeCore.KeyCode.DOWN) { activeItem = this.step(keyCode === _tinperBeeCore.KeyCode.UP ? -1 : 1); } if (activeItem) { e.preventDefault(); this.setState({ activeKey: activeItem.props.eventKey }, function () { (0, _domScrollIntoView2["default"])(ReactDOM.findDOMNode(activeItem), ReactDOM.findDOMNode(_this2), { onlyScrollIfNeeded: true }); }); return 1; } else if (activeItem === undefined) { e.preventDefault(); this.setState({ activeKey: null }); return 1; } }; Menu.prototype.renderRoot = function renderRoot(props) { var _classes; this.instanceArray = []; var classes = (_classes = {}, _defineProperty(_classes, props.clsPrefix, 1), _defineProperty(_classes, props.clsPrefix + '-' + props.mode, 1), _defineProperty(_classes, props.className, !!props.className), _classes); var domProps = { className: (0, _classnames2["default"])(classes), role: 'menu', 'aria-activedescendant': '' }; if (props.id) { domProps.id = props.id; } if (props.focusable) { domProps.tabIndex = '0'; domProps.onKeyDown = this.onKeyDown; } return ( // ESLint is not smart enough to know that the type of `children` was checked. /* eslint-disable */ _react2["default"].createElement( _DOMWrap2["default"], _extends({ style: props.style, tag: 'ul', hiddenClassName: props.clsPrefix + '-hidden', visible: props.visible }, domProps), _react2["default"].Children.map(props.children, this.renderMenuItem.bind(this)) ) /*eslint-enable */ ); }; Menu.prototype.render = function render() { var props = _extends({}, this.props); props.className += ' ' + props.clsPrefix + '-root'; return this.renderRoot(props); }; return Menu; }(_react.Component); ; Menu.propTypes = propTypes; Menu.defaultProps = defaultProps; exports["default"] = Menu; module.exports = exports['default']; /***/ }), /* 489 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.noop = noop; exports.getKeyFromChildrenIndex = getKeyFromChildrenIndex; exports.loopMenuItem = loopMenuItem; exports.loopMenuItemRecusively = loopMenuItemRecusively; var _react = __webpack_require__(4); 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 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 loopMenuItemRecusively(children, keys, ret) { if (!children || ret.find) { return; } _react2["default"].Children.forEach(children, function (c) { if (ret.find) { return; } if (c) { var construt = c.type; if (!construt || !(construt.isSubMenu || construt.isMenuItem || construt.isMenuItemGroup)) { return; } if (keys.indexOf(c.key) !== -1) { ret.find = true; } else if (c.props.children) { loopMenuItemRecusively(c.props.children, keys, ret); } } }); } /***/ }), /* 490 */ /***/ (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__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); 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); } var propTypes = { tag: _propTypes2["default"].string, hiddenClassName: _propTypes2["default"].string, visible: _propTypes2["default"].bool }; var defaultProps = { tag: 'div' }; var DOMWrap = function (_Component) { _inherits(DOMWrap, _Component); function DOMWrap() { _classCallCheck(this, DOMWrap); return _possibleConstructorReturn(this, _Component.apply(this, arguments)); } DOMWrap.prototype.render = function render() { var props = _extends({}, this.props); if (!props.visible) { props.className = props.className || ''; props.className += ' ' + props.hiddenClassName; } var Tag = props.tag; delete props.tag; delete props.hiddenClassName; delete props.visible; return _react2["default"].createElement(Tag, props); }; return DOMWrap; }(_react.Component); ; DOMWrap.propTypes = propTypes; DOMWrap.defaultProps = defaultProps; exports["default"] = DOMWrap; module.exports = exports['default']; /***/ }), /* 491 */ /***/ (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 _SubPopupMenu = __webpack_require__(492); var _SubPopupMenu2 = _interopRequireDefault(_SubPopupMenu); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _keyCode = __webpack_require__(38); var _keyCode2 = _interopRequireDefault(_keyCode); var _classnames = __webpack_require__(3); var _classnames2 = _interopRequireDefault(_classnames); var _util = __webpack_require__(489); 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 _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 guid = 0; var propTypes = { parentMenu: _propTypes2["default"].object, title: _propTypes2["default"].oneOfType([_propTypes2["default"].string, _propTypes2["default"].node]), children: _propTypes2["default"].any, selectedKeys: _propTypes2["default"].array, openKeys: _propTypes2["default"].array, onClick: _propTypes2["default"].func, onOpenChange: _propTypes2["default"].func, rootPrefixCls: _propTypes2["default"].string, eventKey: _propTypes2["default"].string, multiple: _propTypes2["default"].bool, active: _propTypes2["default"].bool, onSelect: _propTypes2["default"].func, closeSubMenuOnMouseLeave: _propTypes2["default"].bool, openSubMenuOnMouseEnter: _propTypes2["default"].bool, onDeselect: _propTypes2["default"].func, onDestroy: _propTypes2["default"].func, onItemHover: _propTypes2["default"].func, onMouseEnter: _propTypes2["default"].func, onMouseLeave: _propTypes2["default"].func, onTitleMouseEnter: _propTypes2["default"].func, onTitleMouseLeave: _propTypes2["default"].func, onTitleClick: _propTypes2["default"].func }; var defaultProps = { onMouseEnter: _util.noop, onMouseLeave: _util.noop, onTitleMouseEnter: _util.noop, onTitleMouseLeave: _util.noop, onTitleClick: _util.noop, title: '' }; var SubMenu = function (_Component) { _inherits(SubMenu, _Component); function SubMenu(props) { _classCallCheck(this, SubMenu); var _this = _possibleConstructorReturn(this, _Component.call(this, props)); _this.isSubMenu = 1; _this.state = { defaultActiveFirst: false }; _this.onDestroy = _this.onDestroy.bind(_this); _this.onKeyDown = _this.onKeyDown.bind(_this); _this.onOpenChange = _this.onOpenChange.bind(_this); _this.onMouseEnter = _this.onMouseEnter.bind(_this); _this.onTitleMouseEnter = _this.onTitleMouseEnter.bind(_this); _this.onTitleMouseLeave = _this.onTitleMouseLeave.bind(_this); _this.onMouseLeave = _this.onMouseLeave.bind(_this); _this.onTitleClick = _this.onTitleClick.bind(_this); _this.onSubMenuClick = _this.onSubMenuClick.bind(_this); _this.onSelect = _this.onSelect.bind(_this); _this.onDeselect = _this.onDeselect.bind(_this); _this.getPrefixCls = _this.getPrefixCls.bind(_this); _this.getActiveClassName = _this.getActiveClassName.bind(_this); _this.getSelectedClassName = _this.getSelectedClassName.bind(_this); _this.getDisabledClassName = _this.getDisabledClassName.bind(_this); _this.getOpenClassName = _this.getOpenClassName.bind(_this); _this.saveMenuInstance = _this.saveMenuInstance.bind(_this); _this.addKeyPath = _this.addKeyPath.bind(_this); _this.triggerOpenChange = _this.triggerOpenChange.bind(_this); _this.clearSubMenuTimers = _this.clearSubMenuTimers.bind(_this); _this.clearSubMenuLeaveTimer = _this.clearSubMenuLeaveTimer.bind(_this); _this.clearSubMenuTitleLeaveTimer = _this.clearSubMenuTitleLeaveTimer.bind(_this); _this.isChildrenSelected = _this.isChildrenSelected.bind(_this); _this.isOpen = _this.isOpen.bind(_this); _this.renderChildren = _this.renderChildren.bind(_this); return _this; } SubMenu.prototype.componentWillUnmount = function componentWillUnmount() { var _props = this.props, onDestroy = _props.onDestroy, eventKey = _props.eventKey, parentMenu = _props.parentMenu; this.mounted = true; if (onDestroy) { onDestroy(eventKey); } if (parentMenu.subMenuInstance === this) { this.clearSubMenuTimers(); } }; SubMenu.prototype.componentDidMount = function componentDidMount() { this.mounted = true; }; SubMenu.prototype.onDestroy = function onDestroy(key) { this.props.onDestroy(key); }; SubMenu.prototype.onKeyDown = function onKeyDown(e) { var keyCode = e.keyCode; var menu = this.menuInstance; var isOpen = this.isOpen(); if (keyCode === _keyCode2["default"].ENTER) { this.onTitleClick(e); this.setState({ defaultActiveFirst: true }); return true; } if (keyCode === _keyCode2["default"].RIGHT) { if (isOpen) { menu.onKeyDown(e); } else { this.triggerOpenChange(true); this.setState({ defaultActiveFirst: true }); } return true; } if (keyCode === _keyCode2["default"].LEFT) { var handled = void 0; if (isOpen) { handled = menu.onKeyDown(e); } else { return undefined; } if (!handled) { this.triggerOpenChange(false); handled = true; } return handled; } if (isOpen && (keyCode === _keyCode2["default"].UP || keyCode === _keyCode2["default"].DOWN)) { return menu.onKeyDown(e); } }; SubMenu.prototype.onOpenChange = function onOpenChange(e) { this.props.onOpenChange(e); }; SubMenu.prototype.onMouseEnter = function onMouseEnter(e) { var props = this.props; this.clearSubMenuLeaveTimer(props.parentMenu.subMenuInstance !== this); props.onMouseEnter({ key: props.eventKey, domEvent: e }); }; SubMenu.prototype.onTitleMouseEnter = function onTitleMouseEnter(domEvent) { var props = this.props; var parentMenu = props.parentMenu, key = props.eventKey; var item = this; this.clearSubMenuTitleLeaveTimer(parentMenu.subMenuInstance !== item); if (parentMenu.menuItemInstance) { parentMenu.menuItemInstance.clearMenuItemMouseLeaveTimer(true); } var openChanges = []; if (props.openSubMenuOnMouseEnter) { openChanges.push({ key: key, item: item, trigger: 'mouseenter', open: true }); } props.onItemHover({ key: key, item: item, hover: true, trigger: 'mouseenter', openChanges: openChanges }); this.setState({ defaultActiveFirst: false }); props.onTitleMouseEnter({ key: key, domEvent: domEvent }); }; SubMenu.prototype.onTitleMouseLeave = function onTitleMouseLeave(e) { var _this2 = this; var props = this.props; var parentMenu = props.parentMenu, eventKey = props.eventKey; parentMenu.subMenuInstance = this; parentMenu.subMenuTitleLeaveFn = function () { if (_this2.mounted) { // leave whole sub tree // still active if (props.mode === 'inline' && props.active) { props.onItemHover({ key: eventKey, item: _this2, hover: false, trigger: 'mouseleave' }); } props.onTitleMouseLeave({ key: props.eventKey, domEvent: e }); } }; parentMenu.subMenuTitleLeaveTimer = setTimeout(parentMenu.subMenuTitleLeaveFn, 100); }; SubMenu.prototype.onMouseLeave = function onMouseLeave(e) { var _this3 = this; var props = this.props; var parentMenu = props.parentMenu, eventKey = props.eventKey; parentMenu.subMenuInstance = this; parentMenu.subMenuLeaveFn = function () { if (_this3.mounted) { // leave whole sub tree // still active if (props.mode !== 'inline') { var isOpen = _this3.isOpen(); if (isOpen && props.closeSubMenuOnMouseLeave && props.active) { props.onItemHover({ key: eventKey, item: _this3, hover: false, trigger: 'mouseleave', openChanges: [{ key: eventKey, item: _this3, trigger: 'mouseleave', open: false }] }); } else { if (props.active) { props.onItemHover({ key: eventKey, item: _this3, hover: false, trigger: 'mouseleave' }); } if (isOpen && props.closeSubMenuOnMouseLeave) { _this3.triggerOpenChange(false); } } } // trigger mouseleave props.onMouseLeave({ key: eventKey, domEvent: e }); } }; // prevent popup menu and submenu gap parentMenu.subMenuLeaveTimer = setTimeout(parentMenu.subMenuLeaveFn, 100); }; SubMenu.prototype.onTitleClick = function onTitleClick(e) { var props = this.props; props.onTitleClick({ key: props.eventKey, domEvent: e }); if (props.openSubMenuOnMouseEnter) { return; } this.triggerOpenChange(!this.isOpen(), 'click'); this.setState({ defaultActiveFirst: false }); }; SubMenu.prototype.onSubMenuClick = function onSubMenuClick(info) { this.props.onClick(this.addKeyPath(info)); }; SubMenu.prototype.onSelect = function onSelect(info) { this.props.onSelect(info); }; SubMenu.prototype.onDeselect = function onDeselect(info) { this.props.onDeselect(info); }; SubMenu.prototype.getPrefixCls = function getPrefixCls() { return this.props.rootPrefixCls + '-submenu'; }; SubMenu.prototype.getActiveClassName = function getActiveClassName() { return this.getPrefixCls() + '-active'; }; SubMenu.prototype.getDisabledClassName = function getDisabledClassName() { return this.getPrefixCls() + '-disabled'; }; SubMenu.prototype.getSelectedClassName = function getSelectedClassName() { return this.getPrefixCls() + '-selected'; }; SubMenu.prototype.getOpenClassName = function getOpenClassName() { return this.props.rootPrefixCls + '-submenu-open'; }; SubMenu.prototype.saveMenuInstance = function saveMenuInstance(c) { this.menuInstance = c; }; SubMenu.prototype.addKeyPath = function addKeyPath(info) { return _extends({}, info, { keyPath: (info.keyPath || []).concat(this.props.eventKey) }); }; SubMenu.prototype.triggerOpenChange = function triggerOpenChange(open, type) { var key = this.props.eventKey; this.onOpenChange({ key: key, item: this, trigger: type, open: open }); }; SubMenu.prototype.clearSubMenuTimers = function clearSubMenuTimers() { var callFn = void 0; this.clearSubMenuLeaveTimer(callFn); this.clearSubMenuTitleLeaveTimer(callFn); }; SubMenu.prototype.clearSubMenuTitleLeaveTimer = function clearSubMenuTitleLeaveTimer() { var callFn = void 0; var parentMenu = this.props.parentMenu; if (parentMenu.subMenuTitleLeaveTimer) { clearTimeout(parentMenu.subMenuTitleLeaveTimer); parentMenu.subMenuTitleLeaveTimer = null; if (callFn && parentMenu.subMenuTitleLeaveFn) { parentMenu.subMenuTitleLeaveFn(); } parentMenu.subMenuTitleLeaveFn = null; } }; SubMenu.prototype.clearSubMenuLeaveTimer = function clearSubMenuLeaveTimer() { var callFn = void 0; var parentMenu = this.props.parentMenu; if (parentMenu.subMenuLeaveTimer) { clearTimeout(parentMenu.subMenuLeaveTimer); parentMenu.subMenuLeaveTimer = null; if (callFn && parentMenu.subMenuLeaveFn) { parentMenu.subMenuLeaveFn(); } parentMenu.subMenuLeaveFn = null; } }; SubMenu.prototype.isChildrenSelected = function isChildrenSelected() { var ret = { find: false }; (0, _util.loopMenuItemRecusively)(this.props.children, this.props.selectedKeys, ret); return ret.find; }; SubMenu.prototype.isOpen = function isOpen() { return this.props.openKeys.indexOf(this.props.eventKey) !== -1; }; SubMenu.prototype.renderChildren = function renderChildren(children) { var props = this.props; var baseProps = { mode: props.mode === 'horizontal' ? 'vertical' : props.mode, visible: this.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, closeSubMenuOnMouseLeave: props.closeSubMenuOnMouseLeave, defaultActiveFirst: this.state.defaultActiveFirst, multiple: props.multiple, prefixCls: props.rootPrefixCls, id: this._menuId, ref: this.saveMenuInstance }; return _react2["default"].createElement( _SubPopupMenu2["default"], baseProps, children ); }; SubMenu.prototype.render = function render() { var _classes; var isOpen = this.isOpen(); this.haveOpen = this.haveOpen || isOpen; var props = this.props; var prefixCls = this.getPrefixCls(); var classes = (_classes = {}, _defineProperty(_classes, props.className, !!props.className), _defineProperty(_classes, prefixCls + '-' + props.mode, 1), _classes); classes[this.getOpenClassName()] = isOpen; classes[this.getActiveClassName()] = props.active; classes[this.getDisabledClassName()] = props.disabled; classes[this.getSelectedClassName()] = this.isChildrenSelected(); if (!this._menuId) { if (props.eventKey) { this._menuId = props.eventKey + '$Menu'; } else { this._menuId = '$__$' + ++guid + '$Menu'; } } classes[prefixCls] = true; classes[prefixCls + '-' + props.mode] = 1; var titleClickEvents = {}; var mouseEvents = {}; var titleMouseEvents = {}; if (!props.disabled) { titleClickEvents = { onClick: this.onTitleClick }; mouseEvents = { onMouseLeave: this.onMouseLeave, onMouseEnter: this.onMouseEnter }; // only works in title, not outer li titleMouseEvents = { onMouseEnter: this.onTitleMouseEnter, onMouseLeave: this.onTitleMouseLeave }; } var style = {}; if (props.mode === 'inline') { style.paddingLeft = props.inlineIndent * props.level; } return _react2["default"].createElement( 'li', _extends({ className: (0, _classnames2["default"])(classes) }, mouseEvents), _react2["default"].createElement( 'div', _extends({ style: style, className: prefixCls + '-title' }, titleMouseEvents, titleClickEvents, { 'aria-expanded': isOpen, 'aria-owns': this._menuId, 'aria-haspopup': 'true' }), props.title ), this.renderChildren(props.children) ); }; return SubMenu; }(_react.Component); ; SubMenu.propTypes = propTypes; SubMenu.defaultProps = defaultProps; SubMenu.isSubMenu = 1; exports["default"] = SubMenu; module.exports = exports['default']; /***/ }), /* 492 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: 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; }; 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__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _beeAnimate = __webpack_require__(69); var _beeAnimate2 = _interopRequireDefault(_beeAnimate); var _classnames = __webpack_require__(3); var _classnames2 = _interopRequireDefault(_classnames); var _createChainedFunction = __webpack_require__(37); var _createChainedFunction2 = _interopRequireDefault(_createChainedFunction); var _util = __webpack_require__(489); var _DOMWrap = __webpack_require__(490); var _DOMWrap2 = _interopRequireDefault(_DOMWrap); 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 _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 allDisabled(arr) { if (!arr.length) { return true; } return arr.every(function (c) { return !!c.props.disabled; }); } function getActiveKey(props, originalActiveKey) { var activeKey = originalActiveKey; var children = props.children, eventKey = props.eventKey; 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)) { found = true; } }); if (found) { return activeKey; } } activeKey = null; if (props.defaultActiveFirst) { (0, _util.loopMenuItem)(children, function (c, i) { if (!activeKey && c && !c.props.disabled) { activeKey = (0, _util.getKeyFromChildrenIndex)(c, eventKey, i); } }); return activeKey; } return activeKey; } function saveRef(index, subIndex, c) { if (c) { if (subIndex !== undefined) { this.instanceArray[index] = this.instanceArray[index] || []; this.instanceArray[index][subIndex] = c; } else { this.instanceArray[index] = c; } } } var propTypes = { onSelect: _propTypes2["default"].func, onClick: _propTypes2["default"].func, onDeselect: _propTypes2["default"].func, onOpenChange: _propTypes2["default"].func, onDestroy: _propTypes2["default"].func, openTransitionName: _propTypes2["default"].string, openAnimation: _propTypes2["default"].oneOfType([_propTypes2["default"].string, _propTypes2["default"].object]), openKeys: _propTypes2["default"].array, closeSubMenuOnMouseLeave: _propTypes2["default"].bool, visible: _propTypes2["default"].bool, children: _propTypes2["default"].any }; var SubPopupMenu = function (_Component) { _inherits(SubPopupMenu, _Component); function SubPopupMenu(props) { _classCallCheck(this, SubPopupMenu); var _this = _possibleConstructorReturn(this, _Component.call(this, props)); _this.state = { activeKey: getActiveKey(_this.props, _this.props.activeKey) }; _this.getOpenChangesOnItemHover = _this.getOpenChangesOnItemHover.bind(_this); _this.onDeselect = _this.onDeselect.bind(_this); _this.onClick = _this.onClick.bind(_this); _this.onOpenChange = _this.onOpenChange.bind(_this); _this.onDestroy = _this.onDestroy.bind(_this); _this.onSelect = _this.onSelect.bind(_this); _this.onItemHover = _this.onItemHover.bind(_this); _this.getOpenTransitionName = _this.getOpenTransitionName.bind(_this); _this.renderMenuItem = _this.renderMenuItem.bind(_this); _this.getFlatInstanceArray = _this.getFlatInstanceArray.bind(_this); _this.renderCommonMenuItem = _this.renderCommonMenuItem.bind(_this); _this.renderRoot = _this.renderRoot.bind(_this); return _this; } SubPopupMenu.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { var props = void 0; if ('activeKey' in nextProps) { props = { activeKey: getActiveKey(nextProps, nextProps.activeKey) }; } else { var originalActiveKey = this.state.activeKey; var activeKey = getActiveKey(nextProps, originalActiveKey); // fix: this.setState(), parent.render(), if (activeKey !== originalActiveKey) { props = { activeKey: activeKey }; } } if (props) { this.setState(props); } }; SubPopupMenu.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) { return this.props.visible || nextProps.visible; }; SubPopupMenu.prototype.onDeselect = function onDeselect(selectInfo) { this.props.onDeselect(selectInfo); }; SubPopupMenu.prototype.onSelect = function onSelect(selectInfo) { this.props.onSelect(selectInfo); }; SubPopupMenu.prototype.onClick = function onClick(e) { this.props.onClick(e); }; SubPopupMenu.prototype.onOpenChange = function onOpenChange(e) { this.props.onOpenChange(e); }; SubPopupMenu.prototype.onDestroy = function onDestroy(key) { this.props.onDestroy(key); }; SubPopupMenu.prototype.onItemHover = function onItemHover(e) { var _e$openChanges = e.openChanges, openChanges = _e$openChanges === undefined ? [] : _e$openChanges; openChanges = openChanges.concat(this.getOpenChangesOnItemHover(e)); if (openChanges.length) { this.onOpenChange(openChanges); } }; SubPopupMenu.prototype.getOpenTransitionName = function getOpenTransitionName() { return this.props.openTransitionName; }; SubPopupMenu.prototype.renderMenuItem = function renderMenuItem(c, i, subIndex) { var props = this.props; var extraProps = { openKeys: props.openKeys, selectedKeys: props.selectedKeys, openSubMenuOnMouseEnter: true }; return this.renderCommonMenuItem(c, i, subIndex, extraProps); }; SubPopupMenu.prototype.getOpenChangesOnItemHover = function getOpenChangesOnItemHover(e) { var mode = this.props.mode; var key = e.key, hover = e.hover, trigger = e.trigger; var activeKey = this.state.activeKey; if (!trigger || hover || this.props.closeSubMenuOnMouseLeave || !e.item.isSubMenu || mode === 'inline') { this.setState({ activeKey: hover ? key : null }); } else {} // keep active for sub menu for click active // empty // clear last open status if (hover && mode !== 'inline') { var activeItem = this.getFlatInstanceArray().filter(function (c) { return c && c.props.eventKey === activeKey; })[0]; if (activeItem && activeItem.isSubMenu && activeItem.props.eventKey !== key) { return { item: activeItem, originalEvent: e, key: activeItem.props.eventKey, open: false }; } } return []; }; SubPopupMenu.prototype.renderCommonMenuItem = function renderCommonMenuItem(child, i, subIndex, extraProps) { var state = this.state; var props = this.props; var key = (0, _util.getKeyFromChildrenIndex)(child, props.eventKey, i); var childProps = child.props; var isActive = key === state.activeKey; var newChildProps = _extends({ mode: props.mode, level: props.level, inlineIndent: props.inlineIndent, renderMenuItem: this.renderMenuItem, rootPrefixCls: props.prefixCls, index: i, parentMenu: this, ref: childProps.disabled ? undefined : (0, _createChainedFunction2["default"])(child.ref, saveRef.bind(this, i, subIndex)), eventKey: key, closeSubMenuOnMouseLeave: props.closeSubMenuOnMouseLeave, onItemHover: this.onItemHover, active: !childProps.disabled && isActive, multiple: props.multiple, onClick: this.onClick, openTransitionName: this.getOpenTransitionName(), openAnimation: props.openAnimation, onOpenChange: this.onOpenChange, onDeselect: this.onDeselect, onDestroy: this.onDestroy, onSelect: this.onSelect }, extraProps); if (props.mode === 'inline') { newChildProps.closeSubMenuOnMouseLeave = newChildProps.openSubMenuOnMouseEnter = false; } return _react2["default"].cloneElement(child, newChildProps); }; SubPopupMenu.prototype.getFlatInstanceArray = function getFlatInstanceArray() { var instanceArray = this.instanceArray; var hasInnerArray = instanceArray.some(function (a) { return Array.isArray(a); }); if (hasInnerArray) { instanceArray = []; this.instanceArray.forEach(function (a) { if (Array.isArray(a)) { instanceArray.push.apply(instanceArray, a); } else { instanceArray.push(a); } }); this.instanceArray = instanceArray; } return instanceArray; }; SubPopupMenu.prototype.renderRoot = function renderRoot(props) { var _classes; this.instanceArray = []; var classes = (_classes = {}, _defineProperty(_classes, props.prefixCls, 1), _defineProperty(_classes, props.prefixCls + '-' + props.mode, 1), _defineProperty(_classes, props.className, !!props.className), _classes); var domProps = { className: (0, _classnames2["default"])(classes), role: 'menu', 'aria-activedescendant': '' }; if (props.id) { domProps.id = props.id; } if (props.focusable) { domProps.tabIndex = '0'; domProps.onKeyDown = this.onKeyDown; } return ( // ESLint is not smart enough to know that the type of `children` was checked. /* eslint-disable */ _react2["default"].createElement( _DOMWrap2["default"], _extends({ style: props.style, tag: 'ul', hiddenClassName: props.prefixCls + '-hidden', visible: props.visible }, domProps), _react2["default"].Children.map(props.children, this.renderMenuItem.bind(this)) ) /*eslint-enable */ ); }; SubPopupMenu.prototype.render = function render() { var renderFirst = this.renderFirst; this.renderFirst = 1; this.haveOpened = this.haveOpened || this.props.visible; if (!this.haveOpened) { return null; } var transitionAppear = true; if (!renderFirst && this.props.visible) { transitionAppear = false; } var props = _extends({}, this.props); props.className += ' ' + props.prefixCls + '-sub'; var animProps = {}; if (props.openTransitionName) { animProps.transitionName = props.openTransitionName; } else if (_typeof(props.openAnimation) === 'object') { animProps.animation = _extends({}, props.openAnimation); if (!transitionAppear) { delete animProps.animation.appear; } } return _react2["default"].createElement( _beeAnimate2["default"], _extends({}, animProps, { showProp: 'visible', component: '', transitionAppear: transitionAppear }), this.renderRoot(props) ); }; return SubPopupMenu; }(_react.Component); ; SubPopupMenu.propTypes = propTypes; exports["default"] = SubPopupMenu; module.exports = exports['default']; /***/ }), /* 493 */ /***/ (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__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _keyCode = __webpack_require__(38); var _keyCode2 = _interopRequireDefault(_keyCode); var _classnames = __webpack_require__(3); var _classnames2 = _interopRequireDefault(_classnames); var _util = __webpack_require__(489); 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); } /* eslint react/no-is-mounted:0 */ var propTypes = { rootPrefixCls: _propTypes2["default"].string, eventKey: _propTypes2["default"].string, active: _propTypes2["default"].bool, children: _propTypes2["default"].any, selectedKeys: _propTypes2["default"].array, disabled: _propTypes2["default"].bool, title: _propTypes2["default"].string, onSelect: _propTypes2["default"].func, onClick: _propTypes2["default"].func, onDeselect: _propTypes2["default"].func, parentMenu: _propTypes2["default"].object, onItemHover: _propTypes2["default"].func, onDestroy: _propTypes2["default"].func, onMouseEnter: _propTypes2["default"].func, onMouseLeave: _propTypes2["default"].func }; var defaultProps = { onSelect: _util.noop, onMouseEnter: _util.noop, onMouseLeave: _util.noop }; var MenuItem = function (_Component) { _inherits(MenuItem, _Component); function MenuItem(props) { _classCallCheck(this, MenuItem); var _this = _possibleConstructorReturn(this, _Component.call(this, props)); _this.onMouseLeave = _this.onMouseLeave.bind(_this); _this.onMouseEnter = _this.onMouseEnter.bind(_this); _this.onKeyDown = _this.onKeyDown.bind(_this); _this.onClick = _this.onClick.bind(_this); _this.getPrefixCls = _this.getPrefixCls.bind(_this); _this.getActiveClassName = _this.getActiveClassName.bind(_this); _this.getDisabledClassName = _this.getDisabledClassName.bind(_this); _this.getSelectedClassName = _this.getSelectedClassName.bind(_this); _this.clearMenuItemMouseLeaveTimer = _this.clearMenuItemMouseLeaveTimer.bind(_this); _this.isSelected = _this.isSelected.bind(_this); return _this; } MenuItem.prototype.componentWillUnmount = function componentWillUnmount() { var props = this.props; this.mounted = false; if (props.onDestroy) { props.onDestroy(props.eventKey); } if (props.parentMenu.menuItemInstance === this) { this.clearMenuItemMouseLeaveTimer(); } }; MenuItem.prototype.componentDidMount = function componentDidMount() { this.mounted = true; }; MenuItem.prototype.onKeyDown = function onKeyDown(e) { var keyCode = e.keyCode; if (keyCode === _keyCode2["default"].ENTER) { this.onClick(e); return true; } }; MenuItem.prototype.onMouseLeave = function onMouseLeave(e) { var _this2 = this; var props = this.props; var eventKey = props.eventKey, parentMenu = props.parentMenu; parentMenu.menuItemInstance = this; parentMenu.menuItemMouseLeaveFn = function () { if (_this2.mounted && props.active) { props.onItemHover({ key: eventKey, item: _this2, hover: false, domEvent: e, trigger: 'mouseleave' }); } }; parentMenu.menuItemMouseLeaveTimer = setTimeout(parentMenu.menuItemMouseLeaveFn, 30); props.onMouseLeave({ key: eventKey, domEvent: e }); }; MenuItem.prototype.onMouseEnter = function onMouseEnter(e) { var props = this.props; var eventKey = props.eventKey, parentMenu = props.parentMenu; this.clearMenuItemMouseLeaveTimer(parentMenu.menuItemInstance !== this); if (parentMenu.subMenuInstance) { parentMenu.subMenuInstance.clearSubMenuTimers(); } props.onItemHover({ key: eventKey, item: this, hover: true, domEvent: e, trigger: 'mouseenter' }); props.onMouseEnter({ key: eventKey, domEvent: e }); }; MenuItem.prototype.onClick = function onClick(e) { var props = this.props; var selected = this.isSelected(); var eventKey = props.eventKey; var info = { key: eventKey, keyPath: [eventKey], item: this, domEvent: e }; props.onClick(info); if (props.multiple) { if (selected) { props.onDeselect(info); } else { props.onSelect(info); } } else if (!selected) { props.onSelect(info); } }; MenuItem.prototype.getPrefixCls = function getPrefixCls() { return this.props.rootPrefixCls + '-item'; }; MenuItem.prototype.getActiveClassName = function getActiveClassName() { return this.getPrefixCls() + '-active'; }; MenuItem.prototype.getSelectedClassName = function getSelectedClassName() { return this.getPrefixCls() + '-selected'; }; MenuItem.prototype.getDisabledClassName = function getDisabledClassName() { return this.getPrefixCls() + '-disabled'; }; MenuItem.prototype.clearMenuItemMouseLeaveTimer = function clearMenuItemMouseLeaveTimer() { var props = this.props; var callFn = void 0; var parentMenu = props.parentMenu; if (parentMenu.menuItemMouseLeaveTimer) { clearTimeout(parentMenu.menuItemMouseLeaveTimer); parentMenu.menuItemMouseLeaveTimer = null; if (callFn && parentMenu.menuItemMouseLeaveFn) { parentMenu.menuItemMouseLeaveFn(); } parentMenu.menuItemMouseLeaveFn = null; } }; MenuItem.prototype.isSelected = function isSelected() { return this.props.selectedKeys.indexOf(this.props.eventKey) !== -1; }; MenuItem.prototype.render = function render() { var props = this.props; var selected = this.isSelected(); var classes = {}; classes[this.getActiveClassName()] = !props.disabled && props.active; classes[this.getSelectedClassName()] = selected; classes[this.getDisabledClassName()] = props.disabled; classes[this.getPrefixCls()] = true; classes[props.className] = !!props.className; var attrs = _extends({}, props.attribute, { title: props.title ? props.title : typeof props.children === 'string' ? props.children : "", className: (0, _classnames2["default"])(classes), role: 'menuitem', 'aria-selected': selected, 'aria-disabled': props.disabled }); var mouseEvent = {}; if (!props.disabled) { mouseEvent = { onClick: this.onClick, onMouseLeave: this.onMouseLeave, onMouseEnter: this.onMouseEnter }; } var style = _extends({}, props.style); if (props.mode === 'inline') { style.paddingLeft = props.inlineIndent * props.level; } return _react2["default"].createElement( 'li', _extends({ style: style }, attrs, mouseEvent), props.children ); }; return MenuItem; }(_react.Component); ; MenuItem.isMenuItem = 1; MenuItem.defaultProps = defaultProps; MenuItem.propTypes = propTypes; exports["default"] = MenuItem; module.exports = exports['default']; /***/ }), /* 494 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); 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); } var propTypes = { renderMenuItem: _propTypes2["default"].func, index: _propTypes2["default"].number, className: _propTypes2["default"].string, rootPrefixCls: _propTypes2["default"].string, title: _propTypes2["default"].oneOfType([_propTypes2["default"].string, _propTypes2["default"].node]), children: _propTypes2["default"].oneOfType([_propTypes2["default"].string, _propTypes2["default"].node]) }; var defaultProps = { disabled: true }; var MenuItemGroup = function (_Component) { _inherits(MenuItemGroup, _Component); function MenuItemGroup() { _classCallCheck(this, MenuItemGroup); return _possibleConstructorReturn(this, _Component.apply(this, arguments)); } MenuItemGroup.prototype.renderInnerMenuItem = function renderInnerMenuItem(item, subIndex) { var _props = this.props, renderMenuItem = _props.renderMenuItem, index = _props.index; return renderMenuItem(item, index, subIndex); }; MenuItemGroup.prototype.render = function render() { var _props2 = this.props, _props2$className = _props2.className, className = _props2$className === undefined ? '' : _props2$className, title = _props2.title, children = _props2.children, rootPrefixCls = _props2.rootPrefixCls; var titleClassName = rootPrefixCls + '-item-group-title'; var listClassName = rootPrefixCls + '-item-group-list'; return _react2["default"].createElement( 'li', { className: className + ' ' + rootPrefixCls + '-item-group' }, _react2["default"].createElement( 'div', { className: titleClassName }, title ), _react2["default"].createElement( 'ul', { className: listClassName }, _react2["default"].Children.map(children, this.renderInnerMenuItem.bind(this)) ) ); }; return MenuItemGroup; }(_react.Component); ; MenuItemGroup.isMenuItemGroup = true; MenuItemGroup.propTypes = propTypes; MenuItemGroup.defaultProps = defaultProps; exports["default"] = MenuItemGroup; module.exports = exports['default']; /***/ }), /* 495 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); 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); } var propTypes = { className: _propTypes2["default"].string, rootPrefixCls: _propTypes2["default"].string }; var Divider = function (_Component) { _inherits(Divider, _Component); function Divider() { _classCallCheck(this, Divider); return _possibleConstructorReturn(this, _Component.apply(this, arguments)); } Divider.prototype.render = function render() { var _props = this.props, className = _props.className, rootPrefixCls = _props.rootPrefixCls; return _react2["default"].createElement('li', { className: className + ' ' + rootPrefixCls + '-item-divider' }); }; return Divider; }(_react.Component); ; Divider.propTypes = propTypes; exports["default"] = Divider; module.exports = exports['default']; /***/ }), /* 496 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _classnames = __webpack_require__(3); var _classnames2 = _interopRequireDefault(_classnames); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); 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 defaultProps = { clsPrefix: "u-navbar-side-container", sideActive: false }; var NavSideContainer = function (_React$Component) { _inherits(NavSideContainer, _React$Component); function NavSideContainer() { _classCallCheck(this, NavSideContainer); return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); } NavSideContainer.prototype.render = function render() { var _props = this.props, className = _props.className, children = _props.children, clsPrefix = _props.clsPrefix, sideActive = _props.sideActive, expanded = _props.expanded, props = _objectWithoutProperties(_props, ['className', 'children', 'clsPrefix', 'sideActive', 'expanded']); //const navbarProps = this.context.u_navbar; return _react2["default"].createElement( 'div', { className: (0, _classnames2["default"])(className, clsPrefix, expanded && 'expanded') }, children ); }; return NavSideContainer; }(_react2["default"].Component); NavSideContainer.defaultProps = defaultProps; exports["default"] = NavSideContainer; module.exports = exports['default']; /***/ }), /* 497 */ /***/ (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__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _createChainedFunction = __webpack_require__(37); 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 propTypes = { onClick: _propTypes2["default"].func, /** * The toggle content, if left empty it will render the default toggle (seen above). */ show: _propTypes2["default"].bool, children: _propTypes2["default"].node }; var contextTypes = { u_navbar: _propTypes2["default"].shape({ expanded: _propTypes2["default"].bool, onToggle: _propTypes2["default"].func }) }; var defaultProps = { clsPrefix: 'u-navbar-toggle', show: false }; var MenuToggle = function (_React$Component) { _inherits(MenuToggle, _React$Component); function MenuToggle(props) { _classCallCheck(this, MenuToggle); var _this = _possibleConstructorReturn(this, _React$Component.call(this, props)); _this.state = { toggleState: false //this.handleRender = this.handleRender.bind(this); };return _this; } MenuToggle.prototype.handleClick = function handleClick() { var _context$u_navbar = this.context.u_navbar, expanded = _context$u_navbar.expanded, onToggle = _context$u_navbar.onToggle; this.setState({ toggleState: !this.state.toggleState }); if (onToggle) { onToggle(!expanded); } }; MenuToggle.prototype.render = function render() { var _props = this.props, onClick = _props.onClick, className = _props.className, children = _props.children, clsPrefix = _props.clsPrefix, show = _props.show, props = _objectWithoutProperties(_props, ['onClick', 'className', 'children', 'clsPrefix', 'show']); //const navbarProps = this.context.u_navbar || { bsClass: 'navbar' }; //console.log(navbarProps.onToggle, navbarProps.expanded); var buttonProps = _extends({ type: 'button' }, props, { onClick: (0, _createChainedFunction2["default"])(onClick, this.handleClick.bind(this)), className: (0, _classnames2["default"])(className, clsPrefix, show && 'show') //!this.context.u_navbar.expanded && 'collapsed', }); if (children) { return _react2["default"].createElement( 'button', buttonProps, children ); } //当show存在时,渲染左侧静态面包按钮 return _react2["default"].createElement( 'div', null, show && this.state.toggleState && _react2["default"].createElement( 'button', buttonProps, _react2["default"].createElement( 'span', { className: 'sr-only' }, 'Toggle navigation' ), _react2["default"].createElement('span', { className: 'icon-bar' }), _react2["default"].createElement('span', { className: 'icon-bar' }), _react2["default"].createElement('span', { className: 'icon-bar' }) ), show && !this.state.toggleState && _react2["default"].createElement( 'button', buttonProps, _react2["default"].createElement('span', { className: 'uf uf-arrow-left' }) ), !show && !this.state.toggleState && _react2["default"].createElement( 'button', buttonProps, _react2["default"].createElement( 'span', { className: 'sr-only' }, 'Toggle navigation' ), _react2["default"].createElement('span', { className: 'icon-bar' }), _react2["default"].createElement('span', { className: 'icon-bar' }), _react2["default"].createElement('span', { className: 'icon-bar' }) ) ); }; return MenuToggle; }(_react2["default"].Component); MenuToggle.propTypes = propTypes; MenuToggle.defaultProps = defaultProps; MenuToggle.contextTypes = contextTypes; exports["default"] = MenuToggle; module.exports = exports['default']; /***/ }), /* 498 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _tinperBeeCore = __webpack_require__(27); function animate(node, show, done) { var height = void 0; return (0, _tinperBeeCore.cssAnimation)(node, 'u-motion-collapse', { start: function start() { if (!show) { node.style.height = node.offsetHeight + 'px'; } else { height = node.offsetHeight; node.style.height = 0; } }, active: function active() { node.style.height = (show ? height : 0) + 'px'; }, end: function end() { node.style.height = ''; done(); } }); } var animation = { enter: function enter(node, done) { return animate(node, true, done); }, leave: function leave(node, done) { return animate(node, false, done); }, appear: function appear(node, done) { return animate(node, true, done); } }; exports["default"] = animation; module.exports = exports['default']; /***/ }), /* 499 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _warning = __webpack_require__(32); var _warning2 = _interopRequireDefault(_warning); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } var warned = {}; exports["default"] = function (valid, message) { if (!valid && !warned[message]) { (0, _warning2["default"])(false, message); warned[message] = true; } }; module.exports = exports['default']; /***/ }), /* 500 */ /***/ (function(module, exports) { 'use strict'; module.exports = { 'lang': 'zh-cn', 'resetSettings': '还原设置', 'include': '包含', 'exclusive': '不包含', 'equal': '等于', 'unequal': '不等于', 'begin': '以开始', 'end': '以结尾', 'greater_than': '大于', 'great_than_equal_to': '大于等于', 'less_than': '小于', 'less_than_equal_to': '小于等于', 'be_equal_to': '等于', 'not_equal_to': '不等于', 'en-us': { 'resetSettings': 'reset settings', 'include': 'include', 'exclusive': 'exclusive', 'equal': 'equal', 'unequal': 'unequal', 'begin': 'begin', 'end': 'end', 'greater_than': 'greater than', 'great_than_equal_to': 'great than equal to', 'less_than': 'less than', 'less_than_equal_to': 'less than equal to', 'be_equal_to': 'be equal to', 'not_equal_to': 'not equal to' }, 'zh-tw': { 'resetSettings': '還原設置', 'include': '包含', 'exclusive': '不包含', 'equal': '等於', 'unequal': '不等於', 'begin': '以開始', 'end': '以結尾', 'greater_than': '大於', 'great_than_equal_to': '大於等於', 'less_than': '小於', 'less_than_equal to': '小於等於', 'be_equal_to': '等於', 'not_equal_to': '不等於' } }; /***/ }), /* 501 */ /***/ (function(module, exports) { '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; }; exports.getComponentLocale = getComponentLocale; exports.getLocaleCode = getLocaleCode; function getComponentLocale(props, context, componentName, getDefaultLocale) { var locale = {}; if (context && context.beeLocale && context.beeLocale[componentName]) { locale = context.beeLocale[componentName]; } else { var defaultLocale = getDefaultLocale(); locale = defaultLocale["default"] || defaultLocale; } var result = _extends({}, locale, props.locale); if (props.locale) { result.lang = _extends({}, locale.lang, props.locale.lang); } else { result.lang = _extends({}, locale.lang); } return result; } function getLocaleCode(context) { var localeCode = context.beeLocale && context.beeLocale.lang; // Had use LocaleProvide but didn't set locale if (context.beeLocale && context.beeLocale.exist && !localeCode) { return 'zh-cn'; } return localeCode; } /***/ }), /* 502 */ /***/ (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__(4); var _react2 = _interopRequireDefault(_react); var _Column = __webpack_require__(503); var _Column2 = _interopRequireDefault(_Column); var _ColumnGroup = __webpack_require__(504); var _ColumnGroup2 = _interopRequireDefault(_ColumnGroup); 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); } } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } //行控制管理 var ColumnManager = function () { function ColumnManager(columns, elements, originWidth) { _classCallCheck(this, ColumnManager); this._cached = {}; this.columns = columns || this.normalize(elements); this.originWidth = originWidth; } ColumnManager.prototype.isAnyColumnsFixed = function isAnyColumnsFixed() { var _this = this; return this._cache('isAnyColumnsFixed', function () { return _this.columns.some(function (column) { return !!column.fixed; }); }); }; ColumnManager.prototype.isAnyColumnsLeftFixed = function isAnyColumnsLeftFixed() { var _this2 = this; return this._cache('isAnyColumnsLeftFixed', function () { return _this2.columns.some(function (column) { return column.fixed === 'left' || column.fixed === true; }); }); }; ColumnManager.prototype.isAnyColumnsRightFixed = function isAnyColumnsRightFixed() { var _this3 = this; return this._cache('isAnyColumnsRightFixed', function () { return _this3.columns.some(function (column) { return column.fixed === 'right'; }); }); }; ColumnManager.prototype.leftColumns = function leftColumns() { var _this4 = this; return this._cache('leftColumns', function () { return _this4.groupedColumns().filter(function (column) { return column.fixed === 'left' || column.fixed === true; }); }); }; ColumnManager.prototype.rightColumns = function rightColumns() { var _this5 = this; return this._cache('rightColumns', function () { return _this5.groupedColumns().filter(function (column) { return column.fixed === 'right'; }); }); }; ColumnManager.prototype.centerColumns = function centerColumns() { var _this6 = this; return this._cache('centerColumns', function () { return _this6.groupedColumns().filter(function (column) { return !column.fixed; }); }); }; ColumnManager.prototype.leafColumns = function leafColumns() { var _this7 = this; return this._cache('leafColumns', function () { return _this7._leafColumns(_this7.columns); }); }; ColumnManager.prototype.leftLeafColumns = function leftLeafColumns() { var _this8 = this; return this._cache('leftLeafColumns', function () { return _this8._leafColumns(_this8.leftColumns()); }); }; ColumnManager.prototype.rightLeafColumns = function rightLeafColumns() { var _this9 = this; return this._cache('rightLeafColumns', function () { return _this9._leafColumns(_this9.rightColumns()); }); }; ColumnManager.prototype.centerLeafColumns = function centerLeafColumns() { var _this10 = this; return this._cache('centerLeafColumns', function () { return _this10._leafColumns(_this10.centerColumns()); }); }; // add appropriate rowspan and colspan to column ColumnManager.prototype.groupedColumns = function groupedColumns(type) { var _this11 = this; return this._cache('groupedColumns', function () { var _groupColumns = function _groupColumns(columns) { var currentRow = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; var parentColumn = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; var rows = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : []; // track how many rows we got rows[currentRow] = rows[currentRow] || []; var grouped = []; var setRowSpan = function setRowSpan(column) { var rowSpan = rows.length - currentRow; if (column && !column.children && // parent columns are supposed to be one row rowSpan > 1 && (!column.rowSpan || column.rowSpan < rowSpan)) { column.rowSpan = rowSpan; } }; columns.forEach(function (column, index) { var defaultOpt = { ifshow: true }; if (!_this11.originWidth) { defaultOpt.width = 200; } //获取非固定列 if (type == 'nofixed' && column.fixed) { return false; } var newColumn = _extends({}, defaultOpt, column); rows[currentRow].push(newColumn); parentColumn.colSpan = parentColumn.colSpan || 0; if (newColumn.children && newColumn.children.length > 0) { newColumn.children = _groupColumns(newColumn.children, currentRow + 1, newColumn, rows); parentColumn.colSpan = parentColumn.colSpan + newColumn.colSpan; } else { parentColumn.colSpan++; } // update rowspan to all same row columns for (var i = 0; i < rows[currentRow].length - 1; ++i) { setRowSpan(rows[currentRow][i]); } // last column, update rowspan immediately if (index + 1 === columns.length) { setRowSpan(newColumn); } grouped.push(newColumn); }); return grouped; }; return _groupColumns(_this11.columns); }); }; ColumnManager.prototype.normalize = function normalize(elements) { var _this12 = this; var columns = []; _react2['default'].Children.forEach(elements, function (element) { if (!_this12.isColumnElement(element)) return; var column = _extends({}, element.props); if (element.key) { column.key = element.key; } if (element.type === _ColumnGroup2['default']) { column.children = _this12.normalize(column.children); } columns.push(column); }); return columns; }; ColumnManager.prototype.isColumnElement = function isColumnElement(element) { return element && (element.type === _Column2['default'] || element.type === _ColumnGroup2['default']); }; ColumnManager.prototype.reset = function reset(columns, elements) { this.columns = columns || this.normalize(elements); this._cached = {}; }; ColumnManager.prototype.getColumnWidth = function getColumnWidth(contentWidth) { var columns = this.leafColumns(); var res = { computeWidth: 0, lastShowIndex: -1 }; columns.forEach(function (col, index) { //如果列显示 if (col.ifshow) { var width = col.width; if (typeof width == 'string' && width.includes('%')) { width = contentWidth * parseInt(col.width) / 100; } res.computeWidth += parseInt(width); if (!col.fixed) { res.lastShowIndex = index; } } }); return res; }; ColumnManager.prototype.getLeftColumnsWidth = function getLeftColumnsWidth() { var _this13 = this; var contentWidth = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; return this._cache('leftColumnsWidth', function () { var leftColumnsWidth = 0; _this13.groupedColumns().forEach(function (column) { if (column.fixed === 'left' || column.fixed === true) { var width = column.width; if (typeof width == 'string' && width.includes('%')) { width = contentWidth * parseInt(col.width) / 100; } leftColumnsWidth += parseInt(width); } }); return leftColumnsWidth; }); }; ColumnManager.prototype.getRightColumnsWidth = function getRightColumnsWidth() { var _this14 = this; var contentWidth = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; return this._cache('rightColumnsWidth', function () { var rightColumnsWidth = 0; _this14.groupedColumns().forEach(function (column) { if (column.fixed === 'right') { var width = column.width; if (typeof width == 'string' && width.includes('%')) { width = contentWidth * parseInt(col.width) / 100; } rightColumnsWidth += parseInt(width); } }); return rightColumnsWidth; }); }; ColumnManager.prototype._cache = function _cache(name, fn) { if (name in this._cached) { return this._cached[name]; } this._cached[name] = fn(); return this._cached[name]; }; //todo 含有children的宽度计算 ColumnManager.prototype._leafColumns = function _leafColumns(columns) { var _this15 = this; var leafColumns = []; columns.forEach(function (column) { if (!column.children) { var defaultOpt = { ifshow: true }; if (!_this15.originWidth) { defaultOpt.width = 200; } var newColumn = _extends({}, defaultOpt, column); leafColumns.push(newColumn); } else { leafColumns.push.apply(leafColumns, _toConsumableArray(_this15._leafColumns(column.children))); } }); return leafColumns; }; return ColumnManager; }(); exports['default'] = ColumnManager; module.exports = exports['default']; /***/ }), /* 503 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _propTypes = __webpack_require__(5); 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); } var propTypes = { className: _propTypes2['default'].string, colSpan: _propTypes2['default'].number, title: _propTypes2['default'].node, dataIndex: _propTypes2['default'].string, width: _propTypes2['default'].oneOfType([_propTypes2['default'].number, _propTypes2['default'].string]), fixed: _propTypes2['default'].oneOf([true, 'left', 'right']), render: _propTypes2['default'].func, onCellClick: _propTypes2['default'].func, ifshow: _propTypes2['default'].bool }; var Column = function (_Component) { _inherits(Column, _Component); function Column() { _classCallCheck(this, Column); return _possibleConstructorReturn(this, _Component.apply(this, arguments)); } return Column; }(_react.Component); Column.defaultProps = { ifshow: true }; Column.propTypes = propTypes; exports['default'] = Column; module.exports = exports['default']; /***/ }), /* 504 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _propTypes = __webpack_require__(5); 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); } var ColumnGroup = function (_Component) { _inherits(ColumnGroup, _Component); function ColumnGroup() { _classCallCheck(this, ColumnGroup); return _possibleConstructorReturn(this, _Component.apply(this, arguments)); } return ColumnGroup; }(_react.Component); ColumnGroup.propTypes = { title: _propTypes2['default'].node }; exports['default'] = ColumnGroup; module.exports = exports['default']; /***/ }), /* 505 */ /***/ (function(module, exports) { "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; }; exports["default"] = createStore; function createStore(initialState) { var state = initialState; var listeners = []; function setState(partial) { state = _extends({}, state, partial); for (var i = 0; i < listeners.length; i++) { listeners[i](); } } function getState() { return state; } function subscribe(listener) { listeners.push(listener); return function unsubscribe() { var index = listeners.indexOf(listener); listeners.splice(index, 1); }; } return { setState: setState, getState: getState, subscribe: subscribe }; } module.exports = exports["default"]; /***/ }), /* 506 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _Loading = __webpack_require__(507); var _Loading2 = _interopRequireDefault(_Loading); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } exports["default"] = _Loading2["default"]; module.exports = exports['default']; /***/ }), /* 507 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _classnames = __webpack_require__(3); var _classnames2 = _interopRequireDefault(_classnames); var _Portal = __webpack_require__(89); var _Portal2 = _interopRequireDefault(_Portal); 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 = { /** * @title 默认的公共类׺ */ clsPrefix: _propTypes2["default"].string, clsLoadBack: _propTypes2["default"].string, /** * @title 不同loading样式 */ loadingType: _propTypes2["default"].oneOf(["rotate", "line"]), /** * @title 不同尺寸 */ size: _propTypes2["default"].oneOf(["sm", "lg"]), /** * @title 不同颜色 */ color: _propTypes2["default"].oneOf(["primary", "success", "warning", ""]), /** * @title 是否全屏loading */ fullScreen: _propTypes2["default"].bool, wrapperClassName: _propTypes2["default"].string }; var defaultProps = { clsPrefix: "u-loading", clsLoadBack: "u-loading-back", loadingType: "rotate", color: "", showBackDrop: true, fullScreen: false, wrapperClassName: "" }; var sizeMap = { sm: "sm", lg: "lg" }, colorsMap = { primary: "primary", success: "success", warning: "warning" }; var Loading = function (_Component) { _inherits(Loading, _Component); function Loading(props) { _classCallCheck(this, Loading); return _possibleConstructorReturn(this, _Component.call(this, props)); } Loading.prototype.render = function render() { var _backClassObj; var _props = this.props, clsPrefix = _props.clsPrefix, loadingType = _props.loadingType, size = _props.size, color = _props.color, show = _props.show, showBackDrop = _props.showBackDrop, container = _props.container, children = _props.children, fullScreen = _props.fullScreen, wrapperClassName = _props.wrapperClassName, others = _objectWithoutProperties(_props, ["clsPrefix", "loadingType", "size", "color", "show", "showBackDrop", "container", "children", "fullScreen", "wrapperClassName"]); var clsObj = {}; if (!show) return null; clsObj[clsPrefix + "-" + loadingType] = true; if (sizeMap[size]) { clsObj[clsPrefix + "-" + loadingType + "-" + sizeMap[size]] = true; } if (colorsMap[color]) { clsObj[clsPrefix + "-" + loadingType + "-" + colorsMap[color]] = true; } var classes = (0, _classnames2["default"])(clsPrefix, clsObj); var dom = ""; if (wrapperClassName) { classes += " " + wrapperClassName; } if (loadingType === "rotate") { dom = _react2["default"].createElement( "div", null, _react2["default"].createElement( "div", { className: classes }, _react2["default"].createElement("div", null) ), children && _react2["default"].createElement( "div", { className: clsPrefix + "-desc" }, children ) ); } else if (loadingType === "line") { dom = _react2["default"].createElement( "div", null, _react2["default"].createElement( "div", { className: classes }, _react2["default"].createElement("div", null), _react2["default"].createElement("div", null), _react2["default"].createElement("div", null), _react2["default"].createElement("div", null), _react2["default"].createElement("div", null) ), children && _react2["default"].createElement( "div", { className: clsPrefix + "-desc" }, children ) ); } var backClassObj = (_backClassObj = {}, _defineProperty(_backClassObj, clsPrefix + "-backdrop", true), _defineProperty(_backClassObj, "full-screen", fullScreen), _backClassObj); if (showBackDrop) { dom = _react2["default"].createElement( "div", { className: (0, _classnames2["default"])(backClassObj) }, dom ); } //console.log(container); return _react2["default"].createElement( _Portal2["default"], { container: container }, dom ); }; return Loading; }(_react.Component); Loading.propTypes = propTypes; Loading.defaultProps = defaultProps; exports["default"] = Loading; module.exports = exports["default"]; /***/ }), /* 508 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _src = __webpack_require__(109); var _src2 = _interopRequireDefault(_src); 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); } /** * * @title 无数据时显示 * @description 无数据时显示效果展示(可自定义) * * import {Table} from 'tinper-bee'; */ var columns10 = [{ title: "Name", dataIndex: "name", key: "name", width: "40%" }, { title: "Age", dataIndex: "age", key: "age", width: "30%" }, { title: "Address", dataIndex: "address", key: "address" }]; var data10 = []; var emptyFunc = function emptyFunc() { return _react2['default'].createElement( 'span', null, '\u8FD9\u91CC\u6CA1\u6709\u6570\u636E\uFF01' ); }; var Demo10 = function (_Component) { _inherits(Demo10, _Component); function Demo10() { _classCallCheck(this, Demo10); return _possibleConstructorReturn(this, _Component.apply(this, arguments)); } Demo10.prototype.render = function render() { return _react2['default'].createElement(_src2['default'], { columns: columns10, data: data10, emptyText: emptyFunc }); }; return Demo10; }(_react.Component); exports['default'] = Demo10; module.exports = exports['default']; /***/ }), /* 509 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _src = __webpack_require__(109); var _src2 = _interopRequireDefault(_src); var _beeIcon = __webpack_require__(136); var _beeIcon2 = _interopRequireDefault(_beeIcon); var _sort = __webpack_require__(510); var _sort2 = _interopRequireDefault(_sort); 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); } /** * * @title 列排序 * */ var ComplexTable = (0, _sort2['default'])(_src2['default'], _beeIcon2['default']); var columns11 = [{ title: "名字", dataIndex: "a", key: "a", width: 100 }, { title: "性别", dataIndex: "b", key: "b", width: 100 }, { title: "年龄", dataIndex: "c", key: "c", width: 200, sorter: function sorter(a, b) { return a.c - b.c; } }, { title: "武功级别", dataIndex: "d", key: "d" }]; var data11 = [{ a: "杨过", b: "男", c: 30, d: '内行', key: "2" }, { a: "令狐冲", b: "男", c: 41, d: '大侠', key: "1" }, { a: "郭靖", b: "男", c: 25, d: '大侠', key: "3" }]; var defaultProps11 = { prefixCls: "bee-table" }; var Demo11 = function (_Component) { _inherits(Demo11, _Component); function Demo11(props) { _classCallCheck(this, Demo11); var _this = _possibleConstructorReturn(this, _Component.call(this, props)); _this.state = { sortOrder: "", data: data11 }; return _this; } Demo11.prototype.render = function render() { return _react2['default'].createElement(ComplexTable, { columns: columns11, data: this.state.data }); }; return Demo11; }(_react.Component); Demo11.defaultProps = defaultProps11; exports['default'] = Demo11; module.exports = exports['default']; /***/ }), /* 510 */ /***/ (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; }; exports['default'] = sort; var _react = __webpack_require__(4); 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); } /** * 参数:prefixCls,默认bee-table,用于设置图标的样式 * @param {*} Table * @param {*} Icon */ function sort(Table, Icon) { var _class, _temp; var IconType = [{ 'type': 'flat', 'icon': 'uf-symlist', 'order': 'flatscend' }, { 'type': 'up', 'icon': 'uf-sortup', 'order': 'ascend' }, { 'type': 'down', 'icon': 'uf-sortdown', 'order': 'descend' }]; return _temp = _class = function (_Component) { _inherits(SortTable, _Component); function SortTable(props) { _classCallCheck(this, SortTable); var _this = _possibleConstructorReturn(this, _Component.call(this, props)); _this.getOrderNum = function () { var orderNum = 0; _this.state.columns.forEach(function (item, index) { if (item.order == 'ascend' || item.order == 'descend') { orderNum++; } }); return orderNum ? orderNum : 1; }; _this.changeOrderNum = function (column) { var columns = _this.state.columns; columns.forEach(function (col) { if (col.orderNum > column.orderNum) { col.orderNum--; } if (column.key == col.key) { col.orderNum = ''; } }); _this.setState({ columns: columns }); }; _this.getOrderCols = function (columns) { var orderCols = []; columns.forEach(function (item) { if (item.order == 'ascend' || item.order == 'descend') { orderCols.push({ order: item.order, field: item.dataIndex, orderNum: item.orderNum }); } }); return orderCols; }; _this._sortBy = function (pre, after, orderCols, orderColslen, currentIndex) { var preKey = pre[orderCols[currentIndex].key]; var afterKey = after[orderCols[currentIndex].key]; if (preKey == afterKey && currentIndex + 1 <= orderColslen) { return _this._sortBy(pre, after, orderCols, orderColslen, currentIndex + 1); } if (orderCols[currentIndex].order == 'ascend') { return preKey - afterKey; } else { return afterKey - preKey; } }; _this.multiSort = function (columns) { var _this$state = _this.state, data = _this$state.data, oldData = _this$state.oldData; var self = _this; var orderCols = {}, orderColslen = 0; columns.forEach(function (item) { if (item.orderNum) { orderColslen++; orderCols[item.orderNum] = item; } }); if (orderColslen > 0) { data = data.sort(function (a, b) { return self._sortBy(a, b, orderCols, orderColslen, 1); }); } else { data = oldData.concat(); } return data; }; _this.toggleSortOrder = function (order, column) { var _this$state2 = _this.state, data = _this$state2.data, oldData = _this$state2.oldData, columns = _this$state2.columns; var sort = _this.props.sort; var seleObj = void 0; if (!oldData) { oldData = data.concat(); } //单列排序,清空其他列的排序 if (sort.mode == 'single') { columns.forEach(function (da) { if (da.key == column.key) { seleObj = da; } else { if (da.order) { da.order = 'flatscend'; } } }); seleObj.order = order; //通过后端请求 if (sort.backSource && typeof sort.sortFun === "function") { //获取排序的字段和方式 sort.sortFun([{ order: order, field: seleObj.dataIndex }]); } else { if (order === "ascend") { data = data.sort(function (a, b) { return column.sorter(a, b); }); } else if (order === "descend") { data = data.sort(function (a, b) { return column.sorter(b, a); }); } else { data = oldData.concat(); } } } else { seleObj = columns.find(function (da) { return da.key == column.key; }); seleObj.order = order; if (order === "flatscend") { _this.changeOrderNum(column); } if (!seleObj.orderNum && (order == 'ascend' || order == 'descend')) { seleObj.orderNum = _this.getOrderNum(); } if (sort.backSource && typeof sort.sortFun === "function") { sort.sortFun(_this.getOrderCols(columns)); } else { data = _this.multiSort(columns); } } _this.setState({ data: data, oldData: oldData, columns: columns }); }; _this.renderColumnsDropdown = function (columns) { var prefixCls = "bee-table"; var mode = _this.props.sort.mode; return columns.map(function (originColumn) { var iconTypeIndex = 0; var column = _extends({}, originColumn); var sorterClass = 'flat'; if (column.order === "ascend") { iconTypeIndex = 1; sorterClass = 'up'; } else if (column.order === "descend") { iconTypeIndex = 2; sorterClass = 'down'; } var sortButton = void 0; if (column.sorter) { //大于0说明不是升序就是降序,判断orderNum有没有值,没有值赋值 if (iconTypeIndex > 0 && !column.orderNum && mode == 'multiple') { column.orderNum = _this.getOrderNum(); } sortButton = _react2['default'].createElement( 'div', { className: prefixCls + '-column-sorter' }, _react2['default'].createElement( 'span', { className: prefixCls + '-column-sorter-' + sorterClass, onClick: function onClick() { _this.toggleSortOrder(IconType[iconTypeIndex == 2 ? 0 : iconTypeIndex + 1].order, column); if (column.sorterClick) { column.sorterClick(column, IconType[iconTypeIndex].type); } } }, _react2['default'].createElement(Icon, { type: IconType[iconTypeIndex].icon }), _react2['default'].createElement( 'span', null, column.orderNum ) ) ); } column.title = _react2['default'].createElement( 'span', null, column.title, sortButton ); return column; }); }; _this.state = { data: _this.props.data, columns: props.columns }; return _this; } SortTable.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { if (nextProps.data !== this.props.data) { this.setState({ data: nextProps.data, oldData: nextProps.data.concat() }); } if (nextProps.columns !== this.props.columns) { this.setState({ columns: nextProps.columns }); } }; /** * column 当前的排序的列 * 当有的列不排序时,将该列的orderNum置为‘’,并动态的修改其他列的orderNum。 */ /** * 获取排序字段 */ /** * pre:前一条数据 * after:后一条数据 * orderType:升序、降序 */ /** * 多列排序 先排order为1的,其他的基于已排序的数据排 */ //每个column上添加orderNum属性,不排序时为“”。 //点击时orderNum有值则不重新赋值,如果没有值,则取当前column下的有oderNum的length值。并排序 //点击置为“”时,动态的设置相关column的orderNum值。并排序 SortTable.prototype.render = function render() { var columns = this.renderColumnsDropdown(this.state.columns.concat()); return _react2['default'].createElement(Table, _extends({}, this.props, { columns: columns, data: this.state.data })); }; return SortTable; }(_react.Component), _class.defaultProps = { sort: { mode: 'single', backSource: false //默认是前端排序,值为true为后端排序 } }, _temp; } module.exports = exports['default']; /***/ }), /* 511 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _src = __webpack_require__(109); var _src2 = _interopRequireDefault(_src); var _multiSelect = __webpack_require__(512); var _multiSelect2 = _interopRequireDefault(_multiSelect); var _beeCheckbox = __webpack_require__(513); var _beeCheckbox2 = _interopRequireDefault(_beeCheckbox); 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); } /** * * @title 全选功能 * @description 点击表格左列按钮即可选中,并且在选中的回调函数中能获取到选中的数据(未使用封装好的全选功能) * */ var columns12 = [{ title: "名字", dataIndex: "a", key: "a", width: 100 }, { title: "性别", dataIndex: "b", key: "b", width: 100 }, { title: "年龄", dataIndex: "c", key: "c", width: 200, sorter: function sorter(a, b) { return a.c - b.c; } }, { title: "武功级别", dataIndex: "d", key: "d" }]; var data12 = [{ a: "杨过", b: "男", c: 30, d: '内行', key: "2", _checked: true }, { a: "令狐冲", b: "男", c: 41, d: '大侠', key: "1", _checked: true }, { a: "郭靖", b: "男", c: 25, d: '大侠', key: "3", _checked: true }]; //拼接成复杂功能的table组件不能在render中定义,需要像此例子声明在组件的外侧,不然操作state会导致功能出现异常 var MultiSelectTable = (0, _multiSelect2['default'])(_src2['default'], _beeCheckbox2['default']); var Demo12 = function (_Component) { _inherits(Demo12, _Component); function Demo12(props) { _classCallCheck(this, Demo12); var _this = _possibleConstructorReturn(this, _Component.call(this, props)); _this.getSelectedDataFunc = function (data) { console.log(data); }; _this.state = { data: data12 }; return _this; } Demo12.prototype.render = function render() { var multiObj = { type: "checkbox" }; return _react2['default'].createElement(MultiSelectTable, { columns: columns12, data: data12, multiSelect: multiObj, getSelectedDataFunc: this.getSelectedDataFunc }); }; return Demo12; }(_react.Component); exports['default'] = Demo12; module.exports = exports['default']; /***/ }), /* 512 */ /***/ (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; }; exports['default'] = multiSelect; var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _beeCheckbox = __webpack_require__(513); var _beeCheckbox2 = _interopRequireDefault(_beeCheckbox); var _util = __webpack_require__(517); 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); } /** * 参数: 过滤表头 * @param {*} Table * @param {*} Checkbox * @param {*} Popover * @param {*} Icon */ function multiSelect(Table, Checkbox) { var _class, _temp, _initialiseProps; return _temp = _class = function (_Component) { _inherits(NewMultiSelect, _Component); function NewMultiSelect(props) { _classCallCheck(this, NewMultiSelect); var _this = _possibleConstructorReturn(this, _Component.call(this, props)); _initialiseProps.call(_this); var obj = _this.getCheckedOrIndeter(props.data); _this.state = _extends({}, obj, { data: (0, _util.ObjectAssign)(props.data) }); return _this; } NewMultiSelect.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { if (this.props.data != nextProps.data) { var obj = this.getCheckedOrIndeter(nextProps.data); this.setState(_extends({}, obj, { data: (0, _util.ObjectAssign)(nextProps.data) })); } }; /** * @param {*} data */ NewMultiSelect.prototype.getCheckedOrIndeter = function getCheckedOrIndeter(data) { var obj = {}; var checkStatus = this.setChecked(data); if (!checkStatus) { obj.checkedAll = false; obj.indeterminate = false; return obj; } if (checkStatus == 'indeter') { obj.indeterminate = true; obj.checkedAll = false; } else if (checkStatus == 'all') { obj.checkedAll = true; obj.indeterminate = false; } return obj; }; /** * 判断数据是否全部选中 * @param {*} data * reutnr string all(全选)、indeter(半选) */ NewMultiSelect.prototype.setChecked = function setChecked(data) { if (!this.isArray(data)) return false; if (data.length == 0) return false; var count = 0; var disabledCount = 0; data.forEach(function (da) { if (da._checked) { count++; } if (da._disabled) { disabledCount++; } }); if (data.length == count + disabledCount) { return "all"; } return count == 0 ? false : "indeter"; }; /** * 判断是否是数组 * @param {*} o */ NewMultiSelect.prototype.isArray = function isArray(o) { return Object.prototype.toString.call(o) == '[object Array]'; }; NewMultiSelect.prototype.render = function render() { var columns = this.props.columns; var data = this.state.data; return _react2['default'].createElement(Table, _extends({}, this.props, { columns: this.getDefaultColumns(columns), data: data })); }; return NewMultiSelect; }(_react.Component), _class.defaultProps = { prefixCls: "u-table-mult-select" }, _initialiseProps = function _initialiseProps() { var _this2 = this; this.onAllCheckChange = function () { var _state = _this2.state, data = _state.data, checkedAll = _state.checkedAll, indeterminate = _state.indeterminate; var check = false; if (checkedAll) { check = false; } else { // if(indeterminate){ // check = true; // }else{ // check = true; // } check = true; } var selectList = []; data.forEach(function (item) { if (!item._disabled) { item._checked = check; } if (item._checked) { selectList.push(item); } }); if (selectList.length > 0) { indeterminate = true; } else { indeterminate = false; } _this2.setState({ indeterminate: indeterminate, checkedAll: check }); _this2.props.getSelectedDataFunc(selectList); }; this.handleClick = function () {}; this.onCheckboxChange = function (text, record, index) { return function () { var data = _this2.state.data; var selectList = []; record._checked = record._checked ? false : true; var obj = _this2.getCheckedOrIndeter(data); _this2.setState(_extends({ data: data }, obj)); data.forEach(function (da) { if (da._checked) { selectList.push(da); } }); _this2.props.getSelectedDataFunc(selectList, record, index); }; }; this.getDefaultColumns = function (columns) { var _state2 = _this2.state, checkedAll = _state2.checkedAll, indeterminate = _state2.indeterminate; var checkAttr = { checked: checkedAll ? true : false }; var data = _this2.props.data; var dataLength = data.length; var disabledCount = 0; indeterminate ? checkAttr.indeterminate = true : ""; //设置表头Checkbox是否可以点击 data.forEach(function (item, index, arr) { if (item._disabled) { disabledCount++; } }); var _defaultColumns = [{ title: _react2['default'].createElement(Checkbox, _extends({ className: 'table-checkbox' }, checkAttr, { disabled: disabledCount == dataLength ? true : false, onChange: _this2.onAllCheckChange })), key: "checkbox", dataIndex: "checkbox", fixed: "left", width: 50, render: function render(text, record, index) { var attr = {}; record._disabled ? attr.disabled = record._disabled : ""; return _react2['default'].createElement(Checkbox, _extends({ key: index, className: 'table-checkbox' }, attr, { checked: record._checked, onClick: _this2.handleClick, onChange: _this2.onCheckboxChange(text, record, index) })); } }]; return _defaultColumns.concat(columns); }; }, _temp; } module.exports = exports['default']; /***/ }), /* 513 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _Checkbox = __webpack_require__(514); var _Checkbox2 = _interopRequireDefault(_Checkbox); var _CheckboxGroup = __webpack_require__(515); var _CheckboxGroup2 = _interopRequireDefault(_CheckboxGroup); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } _Checkbox2["default"].CheckboxGroup = _CheckboxGroup2["default"]; exports["default"] = _Checkbox2["default"]; module.exports = exports['default']; /***/ }), /* 514 */ /***/ (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__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); 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 }; var defaultProps = { disabled: 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, 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', '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 (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']; /***/ }), /* 515 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _classnames = __webpack_require__(3); var _classnames2 = _interopRequireDefault(_classnames); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _Checkbox = __webpack_require__(514); var _Checkbox2 = _interopRequireDefault(_Checkbox); var _lodash = __webpack_require__(516); 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 propTypes = { clsPrefix: _propTypes2["default"].string, value: _propTypes2["default"].array, onChange: _propTypes2["default"].func }; var defaultProps = { clsPrefix: 'u-checkbox-group', value: [], onChange: function onChange() {} }; var CheckboxGroup = function (_React$Component) { _inherits(CheckboxGroup, _React$Component); function CheckboxGroup(props) { _classCallCheck(this, CheckboxGroup); var _this = _possibleConstructorReturn(this, _React$Component.call(this, props)); _this.changeHandle = function (v) { var values = _this.state.values; if (values.indexOf(v) != -1) { values.splice(values.indexOf(v), 1); } else { values.push(v); } _this.setState({ values: values }); _this.props.onChange(values); }; _this.state = { values: props.value }; return _this; } CheckboxGroup.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { if (!(0, _lodash2["default"])(nextProps.value, this.state.values)) { this.setState({ values: nextProps.value }); } }; CheckboxGroup.prototype.render = function render() { var _this2 = this; var _props = this.props, clsPrefix = _props.clsPrefix, className = _props.className; var classes = clsPrefix; if (className) classes += ' ' + className; return _react2["default"].createElement( 'div', { className: classes }, _react2["default"].Children.map(this.props.children, function (child) { return _react2["default"].cloneElement(child, { onChange: function onChange() { _this2.changeHandle(child.props.value); }, checked: _this2.state.values.indexOf(child.props.value) != -1 }); }) ); }; return CheckboxGroup; }(_react2["default"].Component); CheckboxGroup.propTypes = propTypes; CheckboxGroup.defaultProps = defaultProps; exports["default"] = CheckboxGroup; module.exports = exports['default']; /***/ }), /* 516 */ /***/ (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__(303)(module))) /***/ }), /* 517 */ /***/ (function(module, exports) { '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; }; exports.sortBy = sortBy; exports.compare = compare; exports.ObjectAssign = ObjectAssign; /* * 快速排序,按某个属性,或按“获取排序依据的函数”,来排序. * @method soryBy * @static * @param {array} arr 待处理数组 * @param {string|function} prop 排序依据属性,获取 * @param {boolean} desc 降序 * @return {array} 返回排序后的新数组 */ function sortBy(arr, prop, desc) { var props = [], ret = [], i = 0, len = arr.length; if (typeof prop == 'string') { for (; i < len; i++) { var oI = arr[i]; (props[i] = new String(oI && oI[prop] || ''))._obj = oI; } } else if (typeof prop == 'function') { for (; i < len; i++) { var _oI = arr[i]; (props[i] = new String(_oI && prop(_oI) || ''))._obj = _oI; } } else { throw '参数类型错误'; } props.sort(); for (i = 0; i < len; i++) { ret[i] = props[i]._obj; } if (desc) ret.reverse(); return ret; }; /** * 数组对象排序 * console.log(arr.sort(compare('age'))) * @param {} property */ function compare(property) { return function (a, b) { var value1 = a[property]; var value2 = b[property]; return value1 - value2; }; } /** * 简单数组数据对象拷贝 * @param {*} obj 要拷贝的对象 */ function ObjectAssign(obj) { var b = obj instanceof Array; var tagObj = b ? [] : {}; if (b) { //数组 obj.forEach(function (da) { var _da = {}; _extends(_da, da); tagObj.push(_da); }); } else { _extends(tagObj, obj); } return tagObj; } /***/ }), /* 518 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _src = __webpack_require__(109); var _src2 = _interopRequireDefault(_src); var _beeCheckbox = __webpack_require__(513); var _beeCheckbox2 = _interopRequireDefault(_beeCheckbox); var _beeButton = __webpack_require__(82); var _beeButton2 = _interopRequireDefault(_beeButton); var _beeIcon = __webpack_require__(136); var _beeIcon2 = _interopRequireDefault(_beeIcon); var _multiSelect = __webpack_require__(512); var _multiSelect2 = _interopRequireDefault(_multiSelect); var _sort = __webpack_require__(510); var _sort2 = _interopRequireDefault(_sort); var _sum = __webpack_require__(519); var _sum2 = _interopRequireDefault(_sum); 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); } /** * * @title 多列排序、全选功能、合计 * @description 多列排序、全选功能、合计(通过使用的封装好的功能方法实现复杂功能,简单易用!)新增回调函数(sorterClick) * */ var columns13 = [{ title: "名字", dataIndex: "a", key: "a", className: 'dfasd', width: 200 }, { title: "功力指数", dataIndex: "b", key: "b", width: 200, sumCol: true, sorter: function sorter(a, b) { return a.c - b.c; }, sorterClick: function sorterClick(data, type) { //排序的回调函数 //type value is up or down console.log("data", data); } }, { title: "年龄", dataIndex: "c", key: "c", width: 200, sumCol: true, sorter: function sorter(a, b) { return a.c - b.c; }, sorterClick: function sorterClick(data, type) { //排序的回调函数 //type value is up or down console.log("data", data); } }, { title: "成绩", dataIndex: "e", key: "e", width: 200, sumCol: true, sorter: function sorter(a, b) { return a.c - b.c; } }, { title: "武功级别", dataIndex: "d", key: "d", width: 200 }]; var data13 = [{ a: "杨过", b: 675, c: 30, d: "内行", e: 100, key: "2" }, { a: "令狐冲", b: 43, c: 41, d: "大侠", e: 90, key: "1" }, { a: "令狐冲1", b: 43, c: 81, d: "大侠", e: 120, key: "4" }, { a: "令狐冲2", b: 43, c: 81, d: "大侠", e: 130, key: "5" }, { a: "郭靖", b: 153, c: 25, d: "大侠", e: 90, key: "3" }]; //拼接成复杂功能的table组件不能在render中定义,需要像此例子声明在组件的外侧,不然操作state会导致功能出现异常 var ComplexTable = (0, _multiSelect2["default"])((0, _sum2["default"])((0, _sort2["default"])(_src2["default"], _beeIcon2["default"])), _beeCheckbox2["default"]); var Demo13 = function (_Component) { _inherits(Demo13, _Component); function Demo13(props) { _classCallCheck(this, Demo13); var _this = _possibleConstructorReturn(this, _Component.call(this, props)); _this.getSelectedDataFunc = function (data) { console.log(data); }; _this.selectDisabled = function (record, index) { // console.log(record); if (index === 1) { return true; } return false; }; _this.selectedRow = function (record, index) { // console.log(record); if (index === 0) { return true; } return false; }; _this.onClick = function () { _this.setState({ selectedRow: function selectedRow() {} }); }; _this.state = { data13: data13, selectedRow: _this.selectedRow, selectDisabled: _this.selectDisabled }; return _this; } Demo13.prototype.render = function render() { var multiObj = { type: "checkbox" }; var sortObj = { mode: 'multiple' }; return _react2["default"].createElement( "div", null, _react2["default"].createElement( _beeButton2["default"], { className: "editable-add-btn", onClick: this.onClick }, "change selectedRow" ), _react2["default"].createElement(ComplexTable, { selectDisabled: this.state.selectDisabled, selectedRow: this.state.selectedRow, columns: columns13, data: this.state.data13, multiSelect: multiObj, sort: sortObj, getSelectedDataFunc: this.getSelectedDataFunc }) ); }; return Demo13; }(_react.Component); exports["default"] = Demo13; module.exports = exports["default"]; /***/ }), /* 519 */ /***/ (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; }; exports["default"] = sum; var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _utils = __webpack_require__(118); 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 sum(Table) { return function (_React$Component) { _inherits(SumTable, _React$Component); //无状态 function SumTable(props) { _classCallCheck(this, SumTable); //array , tree var _this = _possibleConstructorReturn(this, _React$Component.call(this, props)); _this.getNodeItem = function (array, newArray) { array.forEach(function (da, i) { if (da.children) { _this.getNodeItem(da.children, newArray); } else { newArray.push(da); } }); }; _this.getTableType = function () { var columns = _this.props.columns; var type = "array"; columns.find(function (da, i) { if (da.children) { type = "tree"; return type; } }); return type; }; _this.addSumData = function () { var _this$props = _this.props, _this$props$data = _this$props.data, data = _this$props$data === undefined ? [] : _this$props$data, _this$props$columns = _this$props.columns, columns = _this$props$columns === undefined ? [] : _this$props$columns; var sumdata = {}, newColumns = [], newData = []; if (!Array.isArray(columns)) { console.log("columns type is error !");return; } var type = _this.getTableType(); if (type == 'tree') { _this.getNodeItem(columns, newColumns); } else { newColumns = columns; } //返回一个新的数据 newData = data.slice(); newColumns.forEach(function (column, index) { sumdata[column.dataIndex] = ""; if (column.sumCol) { var count = 0; data.forEach(function (da, i) { var _num = parseFloat(da[column.key]); //排查字段值为NAN情况 if (_num == _num) { count += _num; } }); sumdata[column.dataIndex] = (0, _utils.DicimalFormater)(count, 2); } if (index == 0) { sumdata[column.dataIndex] = "合计 " + sumdata[column.dataIndex]; } }); newData.push(sumdata); return newData; }; _this.tableType = "array"; return _this; } /** * 获取当前的表格类型。 * */ SumTable.prototype.render = function render() { return _react2["default"].createElement(Table, _extends({}, this.props, { columns: this.props.columns, showSum: true, data: this.addSumData() })); }; return SumTable; }(_react2["default"].Component); } module.exports = exports["default"]; /***/ }), /* 520 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _src = __webpack_require__(109); var _src2 = _interopRequireDefault(_src); var _beeAnimate = __webpack_require__(69); var _beeAnimate2 = _interopRequireDefault(_beeAnimate); var _beeTooltip = __webpack_require__(85); var _beeTooltip2 = _interopRequireDefault(_beeTooltip); var _beeButton = __webpack_require__(82); var _beeButton2 = _interopRequireDefault(_beeButton); var _beeForm = __webpack_require__(521); var _beeForm2 = _interopRequireDefault(_beeForm); var _beeIcon = __webpack_require__(136); var _beeIcon2 = _interopRequireDefault(_beeIcon); var _beeFormControl = __webpack_require__(134); var _beeFormControl2 = _interopRequireDefault(_beeFormControl); var _beeCheckbox = __webpack_require__(513); var _beeCheckbox2 = _interopRequireDefault(_beeCheckbox); var _beeDatepicker = __webpack_require__(295); var _beeDatepicker2 = _interopRequireDefault(_beeDatepicker); var _beeSelect = __webpack_require__(138); var _beeSelect2 = _interopRequireDefault(_beeSelect); var _InputRender = __webpack_require__(526); var _InputRender2 = _interopRequireDefault(_InputRender); var _DateRender = __webpack_require__(527); var _DateRender2 = _interopRequireDefault(_DateRender); var _SelectRender = __webpack_require__(528); var _SelectRender2 = _interopRequireDefault(_SelectRender); 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 _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); } } 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); } /** * * @title 编辑态表格 * @description 这是带有多种不同格式的编辑态表格(编辑态是通过使用不同的render来达到不同编辑格式) * */ var InputRender = (0, _InputRender2["default"])(_beeForm2["default"], _beeFormControl2["default"], _beeIcon2["default"]); var DateRender = (0, _DateRender2["default"])(_beeDatepicker2["default"], _beeIcon2["default"]); var SelectRender = (0, _SelectRender2["default"])(_beeSelect2["default"], _beeIcon2["default"]); var format = "YYYY-MM-DD"; var format2 = "YYYY-MM"; var format3 = "YYYY-MM-DD HH:mm:ss"; var dateInputPlaceholder = "选择日期"; var dateInputPlaceholder2 = "选择年月"; var dataSource = [{ key: "boyuzhou", value: "jack" }, { key: "renhualiu", value: "lucy" }, { key: "yuzhao", value: "yiminghe" }]; var Demo14 = function (_React$Component) { _inherits(Demo14, _React$Component); function Demo14(props) { _classCallCheck(this, Demo14); var _this = _possibleConstructorReturn(this, _React$Component.call(this, props)); _this.check = function (flag, obj) { console.log(flag); console.log(obj); }; _this.onInputChange = function (index, key) { return function (value) { var dataSource = [].concat(_toConsumableArray(_this.state.dataSource)); dataSource[index][key] = value; _this.setState({ dataSource: dataSource }); }; }; _this.onCheckChange = function (index, key) { return function (value) { var dataSource = [].concat(_toConsumableArray(_this.state.dataSource)); dataSource[index][key] = value; _this.setState({ dataSource: dataSource }); }; }; _this.onSelectChange = function (index, key) { return function (value) { console.log("selected " + value); var dataSource = [].concat(_toConsumableArray(_this.state.dataSource)); dataSource[index][key] = value; _this.setState({ dataSource: dataSource }); }; }; _this.onDateChange = function (d) { console.log(d); }; _this.onDateSelect = function (d) { console.log(d); }; _this.onDelete = function (index) { return function () { var dataSource = [].concat(_toConsumableArray(_this.state.dataSource)); dataSource.splice(index, 1); _this.setState({ dataSource: dataSource }); }; }; _this.handleAdd = function () { var _this$state = _this.state, count = _this$state.count, dataSource = _this$state.dataSource; var newData = { key: count, name: "\u51E4\u59D0 " + count, age: 32, address: "jack", datepicker: "2017-06-12", MonthPicker: "2017-02" }; _this.setState({ dataSource: [].concat(_toConsumableArray(dataSource), [newData]), count: count + 1 }); }; _this.getBodyWrapper = function (body) { return _react2["default"].createElement( _beeAnimate2["default"], { transitionName: "move", component: "tbody", className: body.props.className }, body.props.children ); }; _this.getData = function () { console.log(_this.state.dataSource); }; _this.state = { dataSource: [{ key: "0", name: "沉鱼", number: "10", age: "y", address: "jack", datepicker: "2017-06-12", MonthPicker: "2017-02" }, { key: "1", name: "落雁", number: "100", age: "y", address: "lucy", datepicker: "2017-06-12", MonthPicker: "2017-02" }, { key: "2", name: "闭月", number: "1000", age: "n", address: "lucy", datepicker: "2017-06-12", MonthPicker: "2017-02" }, { key: "3", name: "羞花", number: "9999", age: "y", address: "lucy", datepicker: "2017-06-12", MonthPicker: "2017-02" }], count: 4 }; _this.columns = [{ title: "普通输入", dataIndex: "name", key: "name", width: "150px", render: function render(text, record, index) { return _react2["default"].createElement(InputRender, { name: "name", placeholder: "\u8BF7\u8F93\u5165\u59D3\u540D", value: text, isclickTrigger: true, check: _this.check, onChange: _this.onInputChange(index, "name"), isRequire: true, method: "blur", errorMessage: _react2["default"].createElement( _beeTooltip2["default"], { overlay: "错误提示" }, _react2["default"].createElement(_beeIcon2["default"], { type: "uf-exc-c", className: "" }) ) }); } }, { title: "货币输入", dataIndex: "number", key: "number", width: "150px", render: function render(text, record, index) { return _react2["default"].createElement(InputRender, { format: "Currency", name: "number", placeholder: "\u8BF7\u8F93\u5165\u8D27\u5E01", value: text, isclickTrigger: true, check: _this.check, onChange: _this.onInputChange(index, "number"), isRequire: true, method: "blur", errorMessage: _react2["default"].createElement( _beeTooltip2["default"], { overlay: "错误提示" }, _react2["default"].createElement(_beeIcon2["default"], { type: "uf-exc-c", className: "" }) ), reg: /^[0-9]+$/ }); } }, { title: "复选", dataIndex: "age", key: "age", width: "100px", render: function render(text, record, index) { return _react2["default"].createElement(_beeCheckbox2["default"], { checked: record.age, onChange: _this.onCheckChange(index, "age") }); } }, { title: "下拉框", dataIndex: "address", key: "address", width: "200px", render: function render(text, record, index) { return _react2["default"].createElement( SelectRender, { dataSource: dataSource, isclickTrigger: true, value: text, onChange: _this.onSelectChange(index, "address") }, _react2["default"].createElement( Option, { value: "jack" }, "boyuzhou" ), _react2["default"].createElement( Option, { value: "lucy" }, "renhualiu" ), _react2["default"].createElement( Option, { value: "disabled", disabled: true }, "Disabled" ), _react2["default"].createElement( Option, { value: "yiminghe" }, "yuzhao" ) ); } }, { title: "年月日", dataIndex: "datepicker", key: "datepicker", width: "200px", render: function render(text, record, index) { return _react2["default"].createElement(DateRender, { value: text, isclickTrigger: true, format: format, onSelect: _this.onDateSelect, onChange: _this.onDateChange, placeholder: dateInputPlaceholder }); } }, { title: "年月", dataIndex: "MonthPicker", key: "MonthPicker", width: "200px", render: function render(text, record, index) { return _react2["default"].createElement(DateRender, { value: text, type: "MonthPicker", isclickTrigger: true, format: format2, onSelect: _this.onSelect, onChange: _this.onChange, placeholder: dateInputPlaceholder2 }); } }]; return _this; } Demo14.prototype.render = function render() { var dataSource = this.state.dataSource; var columns = this.columns; return _react2["default"].createElement( "div", null, _react2["default"].createElement( _beeButton2["default"], { className: "editable-add-btn", type: "ghost", onClick: this.handleAdd }, "\u6DFB\u52A0\u4E00\u884C" ), _react2["default"].createElement( _beeButton2["default"], { style: { marginLeft: "5px" }, className: "editable-add-btn", type: "ghost", onClick: this.getData }, "\u83B7\u53D6\u6570\u636E" ), _react2["default"].createElement(_src2["default"], { data: dataSource, columns: columns, getBodyWrapper: this.getBodyWrapper }) ); }; return Demo14; }(_react2["default"].Component); exports["default"] = Demo14; module.exports = exports["default"]; /***/ }), /* 521 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _Form = __webpack_require__(522); var _Form2 = _interopRequireDefault(_Form); var _FormItem = __webpack_require__(525); var _FormItem2 = _interopRequireDefault(_FormItem); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } _Form2["default"].FormItem = _FormItem2["default"]; exports["default"] = _Form2["default"]; module.exports = exports['default']; /***/ }), /* 522 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _beeButton = __webpack_require__(82); var _beeButton2 = _interopRequireDefault(_beeButton); var _beeLayout = __webpack_require__(1); var _beeLabel = __webpack_require__(523); var _beeLabel2 = _interopRequireDefault(_beeLabel); 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 = { clsPrefix: _propTypes2["default"].string, className: _propTypes2["default"].string, submitCallBack: _propTypes2["default"].func, //form验证的回调 submitAreaClassName: _propTypes2["default"].string, //提交区域className submitBtnClassName: _propTypes2["default"].string, //提交按钮className beforeSubmitBtn: _propTypes2["default"].node, //提交按钮之前的dom afterSubmitBtn: _propTypes2["default"].node, //提交按钮之后的dom useRow: _propTypes2["default"].bool, //是否使用栅格布局 checkFormNow: _propTypes2["default"].bool, //现在就校验(主动校验参数) showSubmit: _propTypes2["default"].bool //是否显示提交按钮 }; var defaultProps = { clsPrefix: 'u-form', className: '', submitCallBack: function submitCallBack() {}, //form验证的回调 submitAreaClassName: '', submitBtnClassName: '', beforeSubmitBtn: '', afterSubmitBtn: '', useRow: false, checkFormNow: false, showSubmit: true }; var Form = function (_Component) { _inherits(Form, _Component); function Form(props) { _classCallCheck(this, Form); var _this = _possibleConstructorReturn(this, _Component.call(this, props)); _this.checkItem = function (obj, flag) { var items = _this.state.items; items.forEach(function (item) { if (item.name === obj.name) { item.verify = obj.verify; item.value = obj.value === undefined ? '' : obj.value; } }); _this.setState({ items: items }); if (flag && items[items.length - 1] && items[items.length - 1].name === obj.name) { _this.submit(items); } }; _this.getFormItems = function () { var items = []; if (_this.props.children.length) { _this.props.children.map(function (item) { if (item.props.isFormItem) { items.push({ 'name': item.props.children.props.name, 'verify': true, 'value': '' }); } }); } else { var item = _this.props.children; if (item.props.isFormItem) { items.push({ 'name': item.props.children.props.name, 'verify': true, 'value': '' }); } } _this.setState({ items: items }); }; _this.checkNow = function (onClickFn) { _this.setState({ checkNow: true }); typeof onClickFn === 'function' ? onClickFn() : ''; }; _this.btnCheck = function (onClickFn) { var self = _this; return function () { self.checkNow(onClickFn); }; }; _this.submit = function (items) { var flag = true; items.forEach(function (item) { if (!item.verify) { flag = false; } }); _this.setState({ checkNow: false }); _this.props.submitCallBack(flag, _this.state.items); }; _this.state = { items: [], //验证结果对象 checkNow: false //是否立刻验证,提交按钮 }; return _this; } Form.prototype.componentDidMount = function componentDidMount() { this.getFormItems(); }; Form.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { if (nextProps.checkFormNow) { this.checkNow(); } }; Form.prototype.render = function render() { var _this2 = this; var _props = this.props, className = _props.className, showSubmit = _props.showSubmit, useRow = _props.useRow, submitAreaClassName = _props.submitAreaClassName, submitBtnClassName = _props.submitBtnClassName, beforeSubmitBtn = _props.beforeSubmitBtn, afterSubmitBtn = _props.afterSubmitBtn, clsPrefix = _props.clsPrefix; var childs = []; _react2["default"].Children.map(this.props.children, function (child, index) { var _child$props = child.props, labelName = _child$props.labelName, labelClassName = _child$props.labelClassName, xs = _child$props.xs, sm = _child$props.sm, md = _child$props.md, lg = _child$props.lg, xsOffset = _child$props.xsOffset, smOffset = _child$props.smOffset, mdOffset = _child$props.mdOffset, lgOffset = _child$props.lgOffset, xsPush = _child$props.xsPush, smPush = _child$props.smPush, mdPush = _child$props.mdPush, lgPush = _child$props.lgPush, xsPull = _child$props.xsPull, smPull = _child$props.smPull, mdPull = _child$props.mdPull, lgPull = _child$props.lgPull, labelXs = _child$props.labelXs, labelSm = _child$props.labelSm, labelMd = _child$props.labelMd, labelLg = _child$props.labelLg, labelXsOffset = _child$props.labelXsOffset, labelSmOffset = _child$props.labelSmOffset, labelMdOffset = _child$props.labelMdOffset, labelLgOffset = _child$props.labelLgOffset, labelXsPush = _child$props.labelXsPush, labelSmPush = _child$props.labelSmPush, labelMdPush = _child$props.labelMdPush, labelLgPush = _child$props.labelLgPush, labelXsPull = _child$props.labelXsPull, labelSmPull = _child$props.labelSmPull, labelMdPull = _child$props.labelMdPull, labelLgPull = _child$props.labelLgPull, showMast = _child$props.showMast, isSubmit = _child$props.isSubmit; if (child.props.isFormItem) { if (useRow) { childs.push(_react2["default"].createElement( 'span', { className: child.props.className, key: index, style: child.props.style }, _react2["default"].createElement( _beeLayout.Col, { key: 'label' + index, xs: labelXs, sm: labelSm, md: labelMd, lg: labelLg, xsOffset: labelXsOffset, smOffset: labelSmOffset, mdOffset: labelMdOffset, lgOffset: labelLgOffset, xsPush: labelXsPush, smPush: labelSmPush, mdPush: labelMdPush, lgPush: labelLgPush, xsPull: labelXsPull, smPull: labelSmPull, mdPull: labelMdPull, lgPull: labelLgPull }, _react2["default"].createElement( _beeLabel2["default"], { className: labelClassName ? labelClassName : '' }, showMast ? _react2["default"].createElement( 'span', { className: 'u-mast' }, '*' ) : '', labelName ) ), _react2["default"].createElement( _beeLayout.Col, { key: 'fromGroup' + index, xs: xs, sm: sm, md: md, lg: lg, xsOffset: xsOffset, smOffset: smOffset, mdOffset: mdOffset, lgOffset: lgOffset, xsPush: xsPush, smPush: smPush, mdPush: mdPush, lgPush: lgPush, xsPull: xsPull, smPull: smPull, mdPull: mdPull, lgPull: lgPull }, _react2["default"].cloneElement(child, { useRow: useRow, checkItem: _this2.checkItem, checkNow: _this2.state.checkNow, className: child.props.className ? child.props.className + '-item' : '', style: child.props.style }) ) )); } else { childs.push(_react2["default"].createElement( 'span', { key: index, className: child.props.className }, _react2["default"].cloneElement(child, { useRow: useRow, checkItem: _this2.checkItem, checkNow: _this2.state.checkNow, className: child.props.className ? child.props.className + '-item' : '', style: child.props.style }) )); } } else if (child.props.isSubmit) { childs.push(_react2["default"].createElement( 'span', { key: index }, _react2["default"].cloneElement(child, { onClick: _this2.btnCheck(child.props.onClick) }) )); } else { childs.push(_react2["default"].cloneElement(child)); } }); return _react2["default"].createElement( 'form', { className: clsPrefix + ' ' + className, onSubmit: this.checkNow }, useRow ? _react2["default"].createElement( _beeLayout.Row, null, childs ) : childs, showSubmit ? _react2["default"].createElement( 'div', { className: clsPrefix + '-submit ' + submitAreaClassName }, beforeSubmitBtn, _react2["default"].createElement( _beeButton2["default"], { onClick: this.checkNow, colors: 'primary', className: clsPrefix + '-submit-btn ' + submitBtnClassName }, '\u63D0\u4EA4' ), afterSubmitBtn ) : '' ); }; return Form; }(_react.Component); ; Form.propTypes = propTypes; Form.defaultProps = defaultProps; exports["default"] = Form; module.exports = exports['default']; /***/ }), /* 523 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _Label = __webpack_require__(524); var _Label2 = _interopRequireDefault(_Label); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } exports["default"] = _Label2["default"]; module.exports = exports['default']; /***/ }), /* 524 */ /***/ (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__(4); var _react2 = _interopRequireDefault(_react); var _reactDom = __webpack_require__(12); var _reactDom2 = _interopRequireDefault(_reactDom); var _classnames = __webpack_require__(3); var _classnames2 = _interopRequireDefault(_classnames); var _propTypes = __webpack_require__(5); 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 defaultProps = { clsPrefix: 'u-label' }; var Label = function (_Component) { _inherits(Label, _Component); function Label() { _classCallCheck(this, Label); return _possibleConstructorReturn(this, _Component.apply(this, arguments)); } Label.prototype.render = function render() { var _props = this.props, className = _props.className, children = _props.children, clsPrefix = _props.clsPrefix, others = _objectWithoutProperties(_props, ['className', 'children', 'clsPrefix']); var classNames = (0, _classnames2["default"])(clsPrefix, className); return _react2["default"].createElement( 'label', _extends({}, others, { className: classNames }), children ); }; return Label; }(_react.Component); Label.defaultProps = defaultProps; exports["default"] = Label; module.exports = exports['default']; /***/ }), /* 525 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _reactDom = __webpack_require__(12); var _reactDom2 = _interopRequireDefault(_reactDom); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _classnames = __webpack_require__(3); var _classnames2 = _interopRequireDefault(_classnames); var _beeInputGroup = __webpack_require__(290); var _beeInputGroup2 = _interopRequireDefault(_beeInputGroup); var _beeLabel = __webpack_require__(523); var _beeLabel2 = _interopRequireDefault(_beeLabel); var _lodash = __webpack_require__(516); 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 regs = { email: /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/, tel: /^1\d{10}$/, IDCard: /^(\d{15}$|^\d{18}$|^\d{17}(\d|X|x))$/, //身份证 chinese: /^[\u4e00-\u9fa5]+?$/, //中文校验 password: /^[0-9a-zA-Z,.!?`~#$%^&*()-=_+<>'"\[\]\{\}\\\|]{6,15}$/, //6-15位数字英文符号 number: /^\d*$/ }; var propTypes = { clsPrefix: _propTypes2["default"].string, className: _propTypes2["default"].string, isRequire: _propTypes2["default"].bool, //是否必填 errorMessage: _propTypes2["default"].oneOfType([_propTypes2["default"].node, _propTypes2["default"].array]), //错误信息 htmlType: _propTypes2["default"].oneOf(['email', 'tel', 'IDCard', 'chinese', 'password', null]), //htmlType有值的时候 reg不生效 reg: _propTypes2["default"].oneOfType([_propTypes2["default"].instanceOf(RegExp), _propTypes2["default"].array]), //校验正则,可传字符串或者数组,如果是数组,需要和errorMessage数组一一对应 method: _propTypes2["default"].oneOf(['change', 'blur', null]), //校验方式 blur: _propTypes2["default"].func, //失去焦点的回调,参数为value change: _propTypes2["default"].func, //值改变的回调,参数为value当地售后地址 check: _propTypes2["default"].func, //验证的回调 checkItem: _propTypes2["default"].func, useRow: _propTypes2["default"].bool, inline: _propTypes2["default"].bool, //formItem是否行内 labelName: _propTypes2["default"].node, //label标签文字或dom labelClassName: _propTypes2["default"].string, //label样式名 inputBefore: _propTypes2["default"].node, //input之前的 inputAfter: _propTypes2["default"].node, //input之后的 // inputBeforeSimple:PropTypes.node,//input之前的(参考输入框组的inputGroup.Button,和inputBefore不能同时使用) // inputAfterSimple:PropTypes.node,//input之后的(参考输入框组的inputGroup.Button,和inputAfter不能同时使用) mesClassName: _propTypes2["default"].string, //提示信息样式名 checkInitialValue: _propTypes2["default"].bool, //是否校验初始值,未开放 ...col.propTypes showMast: _propTypes2["default"].bool, //是否显示必填项的 * asyncCheck: _propTypes2["default"].func, //自定义校验,返回true则校验成功,false或无返回值则校验失败。参数为{name:xxx,value:xxx} valuePropsName: _propTypes2["default"].string, //默认值的props属性key。默认为'defaultValue' // valuePropsName: PropTypes.string,//当前值的props属性key。默认为'value' xs: _propTypes2["default"].number, //xs显示列数 sm: _propTypes2["default"].number, //sm显示列数 md: _propTypes2["default"].number, //md显示列数 lg: _propTypes2["default"].number, //lg显示列数 xsOffset: _propTypes2["default"].number, //xs偏移列数 smOffset: _propTypes2["default"].number, //sm偏移列数 mdOffset: _propTypes2["default"].number, //md偏移列数 lgOffset: _propTypes2["default"].number, //lg偏移列数 xsPush: _propTypes2["default"].number, //xs右偏移列数 smPush: _propTypes2["default"].number, //sm右偏移列数 mdPush: _propTypes2["default"].number, //md右偏移列数 lgPush: _propTypes2["default"].number, //lg右偏移列数 xsPull: _propTypes2["default"].number, //xs左偏移列数 smPull: _propTypes2["default"].number, //sm左偏移列数` mdPull: _propTypes2["default"].number, //md左偏移列数 lgPull: _propTypes2["default"].number, //lg左偏移列数 labelXs: _propTypes2["default"].number, labelSm: _propTypes2["default"].number, labelMd: _propTypes2["default"].number, labelLg: _propTypes2["default"].number, labelXsOffset: _propTypes2["default"].number, labelSmOffset: _propTypes2["default"].number, labelMdOffset: _propTypes2["default"].number, labelLgOffset: _propTypes2["default"].number, labelXsPush: _propTypes2["default"].number, labelSmPush: _propTypes2["default"].number, labelMdPush: _propTypes2["default"].number, labelLgPush: _propTypes2["default"].number, labelXsPull: _propTypes2["default"].number, labelSmPull: _propTypes2["default"].number, labelMdPull: _propTypes2["default"].number, labelLgPull: _propTypes2["default"].number }; var defaultProps = { clsPrefix: 'u-form', isRequire: false, //是否必填 errorMessage: '校验失败', //错误信息 reg: /[/w/W]*/, method: 'change', blur: function blur() {}, change: function change() {}, isFormItem: true, check: function check() {}, checkItem: function checkItem() {}, inline: false, labelName: '', labelClassName: '', inputBefore: '', inputAfter: '', // inputBeforeSimple:'', // inputAfterSimple:'', mesClassName: '', checkInitialValue: false, useRow: false, showMast: false, valuePropsName: 'defaultValue' }; var FormItem = function (_Component) { _inherits(FormItem, _Component); function FormItem(props) { _classCallCheck(this, FormItem); var _this = _possibleConstructorReturn(this, _Component.call(this, props)); _this.getNowValueName = function (item) { return { value: _this.state.valueNow, name: item.props.name //item.localName 例如textarea原生元素 }; }; _this.getWidth = function (key) { return _reactDom2["default"].findDOMNode(_this.refs[key]) ? _reactDom2["default"].findDOMNode(_this.refs[key]).clientWidth || _reactDom2["default"].findDOMNode(_this.refs[key]).offsetWidth : 0; }; _this.setWidth = function () { var outerWidth = _this.getWidth('outer'); var width = _this.getWidth('label'); var maxWidth = outerWidth ? outerWidth - width - 10 : '100%'; if (_this.props.inline) { _this.setState({ width: width, maxWidth: maxWidth }); } var before = _this.getWidth('before'); var after = _this.getWidth('after'); _this.setState({ childrenWidth: maxWidth - before - after - 2 }); }; _this.handleBlur = function () { var _this$getNowValueName = _this.getNowValueName(_this.props.children), value = _this$getNowValueName.value, name = _this$getNowValueName.name; if (_this.props.method === 'blur') { var flag = _this.itemCheck(value, name); _this.setState({ hasError: !flag }); _this.props.checkItem({ "verify": flag, "name": name, "value": value }); } _this.props.blur(value); _this.props.children.props.onBlur && _this.props.children.props.onBlur(value); }; _this.handleChange = function (selectV) { var value = selectV; _this.setState({ valueNow: selectV }); var name = _this.getNowValueName(_this.props.children).name; if (_this.props.method === 'change') { var flag = _this.itemCheck(value, name); _this.setState({ hasError: !flag, value: value }); _this.props.checkItem({ "verify": flag, "name": name, "value": value }); } _this.props.change(value); _this.props.children.props.onChange && _this.props.children.props.onChange(value); }; _this.itemCheck = function (value, name) { var _this$props = _this.props, isRequire = _this$props.isRequire, htmlType = _this$props.htmlType, check = _this$props.check, asyncCheck = _this$props.asyncCheck, errorMessage = _this$props.errorMessage; var reg = htmlType ? regs[htmlType] : _this.props.reg; var obj = { "name": name, "value": value === undefined ? '' : value }; if (typeof asyncCheck == 'function') { var flag = !!asyncCheck(obj); obj.verify = flag; check(flag, obj); return flag; } else { if (reg.length) { var _flag = true; for (var i = 0; i < reg.length; i++) { if (!reg[i].test(value)) { _this.setState({ errorMessage: errorMessage[i] }); _flag = false; break; } } obj.verify = _flag; if (isRequire) { if (value != undefined && value !== '') { check(_flag, obj); return _flag; } else { check(false, obj); return false; } } else { if (value != undefined && value !== '') { check(_flag, obj); return _flag; } else { check(true, obj); return true; } } } else { var _flag2 = reg.test(value); obj.verify = _flag2; if (isRequire) { if (value != undefined && value !== '') { check(_flag2, obj); return _flag2; } else { check(false, obj); return false; } } else { if (value != undefined && value !== '') { check(_flag2, obj); return _flag2; } else { check(true, obj); return true; } } } } }; _this.checkSelf = function (v, checkFlag) { var value = v == undefined ? _this.getNowValueName(_this.props.children).value : v; var name = _this.getNowValueName(_this.props.children).name; var flag = _this.itemCheck(value, name); _this.props.checkItem({ "verify": flag, "name": name, "value": value }, checkFlag ? false : true); _this.setState({ hasError: !flag }); }; _this.state = { hasError: false, width: 0, valueNow: props.children.props[props.valuePropsName], maxWidth: '100%', errorMessage: typeof props.errorMessage == 'string' ? props.errorMessage : props.errorMessage[0], childrenWidth: '100%' }; return _this; } FormItem.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps, nextState) { if ((0, _lodash2["default"])(this.props, nextProps) && (0, _lodash2["default"])(this.state, nextState)) { return false; } else { return true; } }; FormItem.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { var thisValue = this.props.children.props[this.props.valuePropsName]; var nextValue = nextProps.children.props[this.props.valuePropsName]; if (!(0, _lodash2["default"])(thisValue, nextValue)) { this.checkSelf(nextValue, true); this.setState({ valueNow: nextValue }); } if (nextProps.checkNow && !this.props.checkNow) { this.checkSelf(); } }; FormItem.prototype.componentDidMount = function componentDidMount() { this.setWidth(); window.addEventListener('resize', this.setWidth); }; FormItem.prototype.componentWillUnmount = function componentWillUnmount() { window.removeEventListener('resize', this.setWidth); }; /** * 校验方法 * @param value * @returns {boolean} */ /** * 触发校验 */ FormItem.prototype.render = function render() { var _this2 = this; var _props = this.props, showMast = _props.showMast, useRow = _props.useRow, children = _props.children, inline = _props.inline, className = _props.className, clsPrefix = _props.clsPrefix, inputBefore = _props.inputBefore, inputAfter = _props.inputAfter, mesClassName = _props.mesClassName, labelName = _props.labelName, labelClassName = _props.labelClassName; var clsObj = {}; clsObj[clsPrefix + '-item'] = true; className ? clsObj[className] = true : ''; var clsErrObj = {}; clsErrObj[clsPrefix + '-error'] = true; if (inline) { clsObj[clsPrefix + '-inline'] = true; clsErrObj[clsPrefix + '-error-inline'] = true; } mesClassName ? clsErrObj[mesClassName] = true : ''; if (this.state.hasError) clsErrObj['show'] = true; var childs = []; var childrenStyles = this.props.children.props.style ? this.props.children.props.style : {}; var appendObj = { onBlur: this.handleBlur, onChange: this.handleChange }; if (this.props.children.props.clsPrefix && this.props.children.props.clsPrefix.indexOf('u-form-control') != -1) { appendObj.style = childrenStyles; if (this.state.childrenWidth) { appendObj.style.width = this.state.childrenWidth; } } _react2["default"].Children.map(this.props.children, function (child, index) { childs.push(_react2["default"].createElement( 'div', { ref: 'outer', key: index }, useRow ? '' : _react2["default"].createElement( _beeLabel2["default"], { ref: 'label', className: labelClassName ? labelClassName : '' }, showMast ? _react2["default"].createElement( 'span', { className: 'u-mast' }, '*' ) : '', labelName ), _react2["default"].createElement( 'span', { className: 'u-input-group-outer', style: { 'maxWidth': _this2.state.maxWidth } }, _react2["default"].createElement( _beeInputGroup2["default"], { key: index }, inputBefore ? _react2["default"].createElement( 'span', { className: 'u-input-before', ref: 'before' }, inputBefore ) : '', _react2["default"].createElement( 'span', { className: 'u-input-inner' }, _react2["default"].cloneElement(children, appendObj) ), inputAfter ? _react2["default"].createElement( 'span', { className: 'u-input-after', ref: 'after' }, inputAfter ) : '' ) ) )); }); return _react2["default"].createElement( 'div', { className: (0, _classnames2["default"])(clsObj) }, childs, _react2["default"].createElement( 'div', { className: (0, _classnames2["default"])(clsErrObj), style: { 'marginLeft': this.state.width } }, this.state.errorMessage ) ); }; return FormItem; }(_react.Component); ; FormItem.propTypes = propTypes; FormItem.defaultProps = defaultProps; exports["default"] = FormItem; module.exports = exports['default']; /***/ }), /* 526 */ /***/ (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; }; exports["default"] = renderInput; var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); 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); } /** * 渲染输入框 * @param Form * @param Input * @param Icon * @returns {InputRender} */ function renderInput(Form, Input, Icon) { var _class, _temp2; return _temp2 = _class = function (_Component) { _inherits(InputRender, _Component); function InputRender() { var _temp, _this, _ret; _classCallCheck(this, InputRender); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.state = { value: _this.props.value, editable: false }, _this.handleChange = function (e) { var value = e; _this.setState({ value: value }); }, _this.check = function () { if (typeof _this.flag === "undefined" || _this.flag) { _this.props.check(_this.flag, _this.obj); _this.setState({ editable: false }); if (_this.props.onChange) { _this.props.onChange(_this.state.value); } _this.flag = undefined; } }, _this.checkValidate = function (flag, obj) { _this.flag = flag; _this.obj = obj; }, _this.edit = function () { _this.setState({ editable: true }); }, _this.handleKeydown = function (event) { if (event.keyCode == 13) { _this.check(); } else if (event.keyCode == 9) {} }, _this.formatCurrency = function (money) { if (money && money != null && !!Number(money)) { money = String(money); var left = money.split(".")[0], right = money.split(".")[1]; right = right ? right.length >= 2 ? "." + right.substr(0, 2) : "." + right + "0" : ".00"; var temp = left.split("").reverse().join("").match(/(\d{1,3})/g); return (Number(money) < 0 ? "-" : "") + temp.join(",").split("").reverse().join("") + right; } else if (money === 0) { //注意===在这里的使用,如果传入的money为0,if中会将其判定为boolean类型,故而要另外做===判断 return "0.00"; } else { return ""; } }, _temp), _possibleConstructorReturn(_this, _ret); } //货币的格式化方法 InputRender.prototype.render = function render() { var _state = this.state, value = _state.value, editable = _state.editable; var _props = this.props, name = _props.name, placeholder = _props.placeholder, isclickTrigger = _props.isclickTrigger, format = _props.format, formItemClassName = _props.formItemClassName, mesClassName = _props.mesClassName, check = _props.check, other = _objectWithoutProperties(_props, ["name", "placeholder", "isclickTrigger", "format", "formItemClassName", "mesClassName", "check"]); var cellContent = ""; if (editable) { cellContent = isclickTrigger ? _react2["default"].createElement( "div", { className: "editable-cell-input-wrapper" }, _react2["default"].createElement( Form.FormItem, _extends({ className: "formItem-style " + formItemClassName, mesClassName: "errMessage-style " + mesClassName, change: this.handleChange, blur: this.check, check: this.checkValidate }, other), _react2["default"].createElement(Input, { name: name, placeholder: placeholder, onKeyDown: this.handleKeydown, autoFocus: true, value: value }) ) ) : _react2["default"].createElement( "div", { className: "editable-cell-input-wrapper" }, _react2["default"].createElement( Form.FormItem, _extends({ className: "formItem-style " + formItemClassName, mesClassName: "errMessage-style " + mesClassName, change: this.handleChange, blur: this.check, check: this.checkValidate }, other), _react2["default"].createElement(Input, { name: name, placeholder: placeholder, onKeyDown: this.handleKeydown, autoFocus: true, value: value }) ), _react2["default"].createElement(Icon, { type: "uf-correct", className: "editable-cell-icon-check", onClick: this.check }) ); } else { if (format && format === "Currency") { value = this.formatCurrency(value); } cellContent = isclickTrigger ? _react2["default"].createElement( "div", { className: "editable-cell-text-wrapper", onClick: this.edit }, value || " " ) : _react2["default"].createElement( "div", { className: "editable-cell-text-wrapper" }, value || " ", _react2["default"].createElement(Icon, { type: "uf-pencil", className: "editable-cell-icon", onClick: this.edit }) ); } return _react2["default"].createElement( "div", { className: "editable-cell" }, cellContent ); }; return InputRender; }(_react.Component), _class.propTypes = { check: _propTypes2["default"].func }, _class.defaultProps = { check: function check() { return ""; } }, _temp2; } module.exports = exports["default"]; /***/ }), /* 527 */ /***/ (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; }; exports["default"] = renderDate; var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _moment = __webpack_require__(302); var _moment2 = _interopRequireDefault(_moment); 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 renderDate(DatePicker, Icon) { var _class, _temp2; var MonthPicker = DatePicker.MonthPicker, RangePicker = DatePicker.RangePicker, WeekPicker = DatePicker.WeekPicker; return _temp2 = _class = function (_Component) { _inherits(DateRender, _Component); function DateRender() { var _temp, _this, _ret; _classCallCheck(this, DateRender); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.state = { value: _this.props.value, editable: false }, _this.handleChange = function (e) { var _ref = _this.props || "YYYY-MM-DD", format = _ref.format; var value = e ? e.format(format) : ""; _this.setState({ value: value, editable: false }); if (_this.props.onChange) { _this.props.onChange(value); } }, _this.check = function () { _this.setState({ editable: false }); if (_this.props.onChange) { _this.props.onChange(_this.state.value); } }, _this.edit = function () { _this.setState({ editable: true }); }, _this.handleKeydown = function (event) { if (event.keyCode == 13) { _this.check(); } }, _temp), _possibleConstructorReturn(_this, _ret); } DateRender.prototype.render = function render() { var _state = this.state, value = _state.value, editable = _state.editable; var _props = this.props, isclickTrigger = _props.isclickTrigger, type = _props.type; var cellContent = ""; var TComponent = void 0; switch (type.toLowerCase()) { case "monthpicker": TComponent = MonthPicker; break; // case "rangepicker": // TComponent = RangePicker; // break; case "weekpicker": TComponent = WeekPicker; break; default: TComponent = DatePicker; break; } var date_value = value ? (0, _moment2["default"])(value) : value; if (editable) { cellContent = isclickTrigger ? _react2["default"].createElement( "div", { className: "editable-cell-input-wrapper" }, _react2["default"].createElement(TComponent, _extends({}, this.props, { value: date_value, onChange: this.handleChange })), _react2["default"].createElement(Icon, { type: "uf-correct", className: "editable-cell-icon-check", onClick: this.check }) ) : _react2["default"].createElement( "div", { className: "editable-cell-input-wrapper" }, _react2["default"].createElement(TComponent, _extends({}, this.props, { value: date_value, onChange: this.handleChange })), _react2["default"].createElement(Icon, { type: "uf-correct", className: "editable-cell-icon-check", onClick: this.check }) ); } else { cellContent = isclickTrigger ? _react2["default"].createElement( "div", { className: "editable-cell-text-wrapper", onClick: this.edit }, value || " " ) : _react2["default"].createElement( "div", { className: "editable-cell-text-wrapper" }, value || " ", _react2["default"].createElement(Icon, { type: "uf-pencil", className: "editable-cell-icon", onClick: this.edit }) ); } return _react2["default"].createElement( "div", { className: "editable-cell" }, cellContent ); }; return DateRender; }(_react.Component), _class.defaultProps = { type: "DatePicker" }, _temp2; } module.exports = exports["default"]; /***/ }), /* 528 */ /***/ (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; }; exports["default"] = renderSelect; var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); 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); } /** * 渲染下拉框 * @param Select * @param Icon * @returns {SelectRender} */ function renderSelect(Select, Icon) { var _class, _temp2; return _temp2 = _class = function (_Component) { _inherits(SelectRender, _Component); function SelectRender() { var _temp, _this, _ret; _classCallCheck(this, SelectRender); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.state = { value: _this.props.value, editable: false }, _this.handleChange = function (e) { var value = e; if (_this.props.onChange) { _this.props.onChange(value); } _this.setState({ value: value }); setTimeout(function () { _this.setState({ editable: false }); }, 0); }, _this.check = function () { _this.setState({ editable: false }); if (_this.props.onChange) { _this.props.onChange(_this.state.value); } }, _this.edit = function () { _this.setState({ editable: true }); }, _temp), _possibleConstructorReturn(_this, _ret); } SelectRender.prototype.render = function render() { var _this2 = this; var _state = this.state, value = _state.value, editable = _state.editable; var _props = this.props, isclickTrigger = _props.isclickTrigger, dataSource = _props.dataSource; var cellContent = ""; if (editable) { cellContent = isclickTrigger ? _react2["default"].createElement( "div", { className: "editable-cell-input-wrapper" }, _react2["default"].createElement( Select, _extends({}, this.props, { value: this.state.value, onBlur: function onBlur(value) { console.log(value); // this.props.onBlur(); }, onFocus: function onFocus(value) { console.log(value); // this.props.onBlur(); }, onChange: this.handleChange }), this.props.children ), _react2["default"].createElement(Icon, { type: "uf-correct", className: "editable-cell-icon-check", onClick: this.check }) ) : _react2["default"].createElement( "div", { className: "editable-cell-input-wrapper" }, _react2["default"].createElement( Select, _extends({}, this.props, { value: this.state.value, onBlur: function onBlur() { _this2.setState({ editable: true }); _this2.props.onBlur(); }, onChange: this.handleChange }), this.props.children ), _react2["default"].createElement(Icon, { type: "uf-correct", className: "editable-cell-icon-check", onClick: this.check }) ); } else { if (dataSource && dataSource.length > 0) { for (var index = 0; index < dataSource.length; index++) { var element = dataSource[index]; if (element.value === value) { value = element.key; break; } } } cellContent = isclickTrigger ? _react2["default"].createElement( "div", { className: "editable-cell-text-wrapper", onClick: this.edit }, value || " " ) : _react2["default"].createElement( "div", { className: "editable-cell-text-wrapper" }, value || " ", _react2["default"].createElement(Icon, { type: "uf-pencil", className: "editable-cell-icon", onClick: this.edit }) ); } return _react2["default"].createElement( "div", { className: "editable-cell" }, cellContent ); }; return SelectRender; }(_react.Component), _class.propTypes = { dataSource: _propTypes2["default"].array }, _temp2; } module.exports = exports["default"]; /***/ }), /* 529 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _src = __webpack_require__(109); var _src2 = _interopRequireDefault(_src); 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); } /** * * @title 表格行/列合并 * @description 表头只支持列合并,使用 column 里的 colSpan 进行设置。表格支持行/列合并,使用 render 里的单元格属性 colSpan 或者 rowSpan 设值为 0 时,设置的表格不会渲染。 * */ var renderContent = function renderContent(value, row, index) { var obj = { children: value, props: {} }; if (index === 4) { obj.props.colSpan = 0; } return obj; }; var columns = [{ title: 'Name', key: "name", dataIndex: 'name', render: function render(text, row, index) { if (index < 4) { return _react2["default"].createElement( "a", { href: "#" }, text ); } return { children: _react2["default"].createElement( "a", { href: "#" }, text ), props: { colSpan: 5 } }; } }, { title: 'Age', key: "Age", dataIndex: 'age', render: renderContent }, { title: 'Home phone', colSpan: 2, key: "tel", dataIndex: 'tel', render: function render(value, row, index) { var obj = { children: value, props: {} }; if (index === 2) { obj.props.rowSpan = 2; } if (index === 3) { obj.props.rowSpan = 0; } if (index === 4) { obj.props.colSpan = 0; } return obj; } }, { title: 'Phone', colSpan: 0, key: "phone", dataIndex: 'phone', render: renderContent }, { title: 'Address', key: "address", dataIndex: 'address', render: renderContent }]; var data = [{ key: '1', name: 'John Brown', age: 32, tel: '0571-22098909', phone: 18889898989, address: 'New York No. 1 Lake Park' }, { key: '2', name: 'Jim Green', tel: '0571-22098333', phone: 18889898888, age: 42, address: 'London No. 1 Lake Park' }, { key: '3', name: 'Joe Black', age: 32, tel: '0575-22098909', phone: 18900010002, address: 'Sidney No. 1 Lake Park' }, { key: '4', name: 'Jim Red', age: 18, tel: '0575-22098909', phone: 18900010002, address: 'London No. 2 Lake Park' }, { key: '5', name: 'Jake White', age: 18, tel: '0575-22098909', phone: 18900010002, address: 'Dublin No. 2 Lake Park' }]; var Demo15 = function (_Component) { _inherits(Demo15, _Component); function Demo15() { _classCallCheck(this, Demo15); return _possibleConstructorReturn(this, _Component.apply(this, arguments)); } Demo15.prototype.render = function render() { return _react2["default"].createElement(_src2["default"], { columns: columns, data: data }); }; return Demo15; }(_react.Component); exports["default"] = Demo15; module.exports = exports["default"]; /***/ }), /* 530 */ /***/ (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__(4); var _react2 = _interopRequireDefault(_react); var _src = __webpack_require__(109); var _src2 = _interopRequireDefault(_src); 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); } /** * * @title 嵌套子表格 * @description 通过expandedRowRender参数来实现子表格 * */ var columns16 = [{ title: "操作", dataIndex: "d", key: "d", width: 200, render: function render(text, record, index) { return _react2["default"].createElement( "a", { href: "#", onClick: function onClick() { alert("这是第" + index + "列,内容为:" + text); } }, "\u4E00\u4E9B\u64CD\u4F5C" ); } }, { title: "用户名", dataIndex: "a", key: "a", width: 250 }, { id: "123", title: "性别", dataIndex: "b", key: "b", width: 100 }, { title: "年龄", dataIndex: "c", key: "c", width: 200 }]; var columns17 = [{ title: "操作", dataIndex: "d", key: "d", width: 200, render: function render(text, record, index) { return _react2["default"].createElement( "a", { href: "#", onClick: function onClick() { alert("这是第" + index + "列,内容为:" + text); } }, "\u4E00\u4E9B\u64CD\u4F5C" ); } }, { title: "用户名", dataIndex: "a", key: "a", width: 100 }, { id: "123", title: "性别", dataIndex: "b", key: "b", width: 100 }, { title: "年龄", dataIndex: "c", key: "c", width: 200 }]; var data16 = [{ a: "令狐冲", b: "男", c: 41, d: "操作", key: "1" }, { a: "杨过", b: "男", c: 67, d: "操作", key: "2" }, { a: "郭靖", b: "男", c: 25, d: "操作", key: "3" }]; var Demo16 = function (_Component) { _inherits(Demo16, _Component); function Demo16(props) { _classCallCheck(this, Demo16); var _this = _possibleConstructorReturn(this, _Component.call(this, props)); _this.expandedRowRender = function (record, index, indent) { var height = 42 * (_this.state.data_obj[record.key].length + 2); return _react2["default"].createElement(_src2["default"], { columns: columns17, style: { height: height }, data: _this.state.data_obj[record.key] }); }; _this.getData = function (expanded, record) { //当点击展开的时候才去请求数据 var new_obj = _extends({}, _this.state.data_obj); if (expanded) { if (record.key === '1') { new_obj[record.key] = [{ a: "令狐冲", b: "男", c: 41, d: "操作", key: "1" }, { a: "杨过", b: "男", c: 67, d: "操作", key: "2" }]; _this.setState({ data_obj: new_obj }); } else { new_obj[record.key] = [{ a: "令狐冲", b: "男", c: 41, d: "操作", key: "1" }]; _this.setState({ data_obj: new_obj }); } } }; _this.haveExpandIcon = function (record, index) { //控制是否显示行展开icon,该参数只有在和expandedRowRender同时使用才生效 if (index == 0) { return true; } return false; }; _this.state = { data_obj: {} }; return _this; } Demo16.prototype.render = function render() { return _react2["default"].createElement(_src2["default"], { columns: columns16, data: data16, onExpand: this.getData, expandedRowRender: this.expandedRowRender, scroll: { x: true }, title: function title(currentData) { return _react2["default"].createElement( "div", null, "\u6807\u9898: \u8FD9\u662F\u4E00\u4E2A\u6807\u9898" ); }, footer: function footer(currentData) { return _react2["default"].createElement( "div", null, "\u8868\u5C3E: \u6211\u662F\u5C0F\u5C3E\u5DF4" ); } }); }; return Demo16; }(_react.Component); exports["default"] = Demo16; module.exports = exports["default"]; /***/ }), /* 531 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _src = __webpack_require__(109); var _src2 = _interopRequireDefault(_src); var _beeButton = __webpack_require__(82); var _beeButton2 = _interopRequireDefault(_beeButton); 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); } /** * * @title loading属性指定表格是否加载中 * @description loading可以传boolean或者obj对象,obj为bee-loading组件的参数类型 * */ var 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: "d", key: "d", render: function render(text, record, index) { return _react2["default"].createElement( "a", { href: "#", onClick: function onClick() { alert('这是第' + index + '列,内容为:' + text); } }, "\u4E00\u4E9B\u64CD\u4F5C" ); } }]; var data17 = [{ a: "令狐冲", b: "男", c: 41, d: "操作", key: "1" }, { a: "杨过", b: "男", c: 67, d: "操作", key: "2" }, { a: "郭靖", b: "男", c: 25, d: "操作", key: "3" }]; var Demo17 = function (_Component) { _inherits(Demo17, _Component); function Demo17(props) { _classCallCheck(this, Demo17); var _this = _possibleConstructorReturn(this, _Component.call(this, props)); _this.changeLoading = function () { _this.setState({ loading: !_this.state.loading }); }; _this.state = { loading: true }; return _this; } Demo17.prototype.render = function render() { return _react2["default"].createElement( "div", null, _react2["default"].createElement( _beeButton2["default"], { className: "editable-add-btn", type: "ghost", onClick: this.changeLoading }, "\u5207\u6362loading" ), _react2["default"].createElement(_src2["default"], { columns: columns17, data: data17, title: function title(currentData) { return _react2["default"].createElement( "div", null, "\u6807\u9898: \u8FD9\u662F\u4E00\u4E2A\u6807\u9898" ); }, footer: function footer(currentData) { return _react2["default"].createElement( "div", null, "\u8868\u5C3E: \u6211\u662F\u5C0F\u5C3E\u5DF4" ); } // loading={this.state.loading}或者是boolean , loading: { show: this.state.loading, loadingType: "line" } }) ); }; return Demo17; }(_react.Component); exports["default"] = Demo17; module.exports = exports["default"]; /***/ }), /* 532 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _beeButton = __webpack_require__(82); var _beeButton2 = _interopRequireDefault(_beeButton); var _src = __webpack_require__(109); var _src2 = _interopRequireDefault(_src); var _sum = __webpack_require__(519); var _sum2 = _interopRequireDefault(_sum); 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); } /** * * @title 合并标题后的合计,且支持多字段统计 * @description 合计(通过使用的封装好的功能方法实现复杂功能,简单易用!) * */ var ComplexTable = (0, _sum2["default"])(_src2["default"]); var columns = [{ title: "Name", dataIndex: "name", key: "name", width: 100, fixed: "left" }, { title: "Other", children: [{ title: "Age", dataIndex: "age", key: "age", width: 200, sumCol: true }, { title: "Address", children: [{ title: "Street", dataIndex: "street", key: "street", width: 200 }, { title: "Block", children: [{ title: "Building", dataIndex: "building", key: "building", width: 100 }, { title: "Door No.", dataIndex: "number", key: "number", // width: 100, sumCol: true }] }] }] }, // { // title: "Company", // children: [ // { // title: "Company Address", // dataIndex: "companyAddress", // key: "companyAddress", // width: 100, // }, // { // title: "Company Name", // dataIndex: "companyName", // key: "companyName", // width: 100, // } // ] // }, { title: "Gender", dataIndex: "gender", key: "gender", width: 80, fixed: "right" }]; function getData() { var data = []; for (var i = 0; i < 5; i++) { data.push({ key: i, name: "John Brown" + i, age: i + Math.floor(Math.random() * 10), street: "Lake Park", building: "C", number: 20 * Math.floor(Math.random() * 10), companyAddress: "Lake Street 42", companyName: "SoftLake Co", gender: "M" }); } return data; } var Demo18 = function (_Component) { _inherits(Demo18, _Component); function Demo18(props) { _classCallCheck(this, Demo18); var _this = _possibleConstructorReturn(this, _Component.call(this, props)); _this.changeData = function () { _this.setState({ data: getData() }); }; _this.state = { data: getData() }; return _this; } Demo18.prototype.render = function render() { var data = this.state.data; return _react2["default"].createElement( "div", null, _react2["default"].createElement( _beeButton2["default"], { className: "editable-add-btn", type: "ghost", onClick: this.changeData }, "\u52A8\u6001\u8BBE\u7F6E\u6570\u636E\u6E90" ), _react2["default"].createElement(ComplexTable, { columns: columns, data: data, bordered: true // scroll={{ x: "130%", y: 140 }} }) ); }; return Demo18; }(_react.Component); exports["default"] = Demo18; module.exports = exports["default"]; /***/ }), /* 533 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _beeButton = __webpack_require__(82); var _beeButton2 = _interopRequireDefault(_beeButton); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _src = __webpack_require__(109); var _src2 = _interopRequireDefault(_src); var _beeAnimate = __webpack_require__(69); var _beeAnimate2 = _interopRequireDefault(_beeAnimate); var _beeTooltip = __webpack_require__(85); var _beeTooltip2 = _interopRequireDefault(_beeTooltip); var _beeIcon = __webpack_require__(136); var _beeIcon2 = _interopRequireDefault(_beeIcon); var _beeFormControl = __webpack_require__(134); var _beeFormControl2 = _interopRequireDefault(_beeFormControl); var _beeForm = __webpack_require__(521); var _beeForm2 = _interopRequireDefault(_beeForm); var _beeSelect = __webpack_require__(138); var _beeSelect2 = _interopRequireDefault(_beeSelect); var _InputRender = __webpack_require__(526); var _InputRender2 = _interopRequireDefault(_InputRender); var _SelectRender = __webpack_require__(528); var _SelectRender2 = _interopRequireDefault(_SelectRender); 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 _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); } } 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); } /** * * @title 编辑态表格 * @description 这是带有多种不同格式的编辑态表格(编辑态是通过使用不同的render来达到不同编辑格式) * */ var InputRender = (0, _InputRender2["default"])(_beeForm2["default"], _beeFormControl2["default"], _beeIcon2["default"]); var SelectRender = (0, _SelectRender2["default"])(_beeSelect2["default"], _beeIcon2["default"]); var Option = _beeSelect2["default"].Option; var dataSource = [{ key: "boyuzhou", value: "jack" }, { key: "renhualiu", value: "lucy" }, { key: "yuzhao", value: "yiminghe" }]; var Demo19 = function (_React$Component) { _inherits(Demo19, _React$Component); function Demo19(props) { _classCallCheck(this, Demo19); var _this = _possibleConstructorReturn(this, _React$Component.call(this, props)); _this.check = function (flag, obj) { console.log(flag); console.log(obj); }; _this.handFocus = function (value, e) { console.log(value + " \u83B7\u53D6\u7126\u70B9\u4E8B\u4EF6"); }; _this.onBlur = function (value, e) { console.log(value + " onBlur"); }; _this.onInputChange = function (index, key) { return function (value) { var dataSource = [].concat(_toConsumableArray(_this.state.dataSource)); dataSource[index][key] = value; _this.setState({ dataSource: dataSource }); }; }; _this.onSelectChange = function (index, key) { return function (value) { console.log("selected " + value); var dataSource = [].concat(_toConsumableArray(_this.state.dataSource)); dataSource[index][key] = value; _this.setState({ dataSource: dataSource }); }; }; _this.handleAdd = function () { var _this$state = _this.state, count = _this$state.count, dataSource = _this$state.dataSource; var newData = { key: count, name: "\u51E4\u59D0 " + count, age: 32, address: "jack", datepicker: "2017-06-12", MonthPicker: "2017-02" }; _this.setState({ dataSource: [].concat(_toConsumableArray(dataSource), [newData]), count: count + 1 }); }; _this.getBodyWrapper = function (body) { return _react2["default"].createElement( _beeAnimate2["default"], { transitionName: "move", component: "tbody", className: body.props.className }, body.props.children ); }; _this.getData = function () { console.log(_this.state.dataSource); }; _this.state = { dataSource: [{ key: "0", name: "沉鱼", number: "10", age: "y", address: "jack", datepicker: "2017-06-12", MonthPicker: "2017-02" }, { key: "1", name: "落雁", number: "100", age: "y", address: "lucy", datepicker: "2017-06-12", MonthPicker: "2017-02" }, { key: "2", name: "闭月", number: "1000", age: "n", address: "lucy", datepicker: "2017-06-12", MonthPicker: "2017-02" }, { key: "3", name: "羞花", number: "9999", age: "y", address: "lucy", datepicker: "2017-06-12", MonthPicker: "2017-02" }], count: 4 }; _this.columns = [{ title: "货币输入", dataIndex: "number", key: "number", width: "150px", render: function render(text, record, index) { return _react2["default"].createElement(InputRender, { format: "Currency", name: "name", placeholder: "\u8BF7\u8F93\u5165\u59D3\u540D", value: text, isclickTrigger: true, check: _this.check, onChange: _this.onInputChange(index, "name"), isRequire: true, method: "blur", errorMessage: _react2["default"].createElement( _beeTooltip2["default"], { overlay: "错误提示" }, _react2["default"].createElement(_beeIcon2["default"], { type: "uf-exc-c", className: "" }) ), reg: /^[0-9]+$/ }); } }, { title: _react2["default"].createElement( "div", null, "\u4E0B\u62C9\u6846\u7684div" ), dataIndex: "address", key: "address", width: "200px", render: function render(text, record, index) { return _react2["default"].createElement( SelectRender, { dataSource: dataSource, isclickTrigger: true, value: text, onChange: _this.onSelectChange(index, "address"), onFocus: _this.handFocus, onBlur: _this.onBlur, autofocus: true }, _react2["default"].createElement( Option, { value: "jack" }, "boyuzhou" ), _react2["default"].createElement( Option, { value: "lucy" }, "renhualiu" ), _react2["default"].createElement( Option, { value: "disabled", disabled: true }, "Disabled" ), _react2["default"].createElement( Option, { value: "yiminghe" }, "yuzhao" ) ); } }]; return _this; } Demo19.prototype.render = function render() { var dataSource = this.state.dataSource; var columns = this.columns; return _react2["default"].createElement( "div", null, _react2["default"].createElement( _beeButton2["default"], { className: "editable-add-btn", type: "ghost", onClick: this.handleAdd }, "\u6DFB\u52A0\u4E00\u884C" ), _react2["default"].createElement( _beeButton2["default"], { style: { marginLeft: "5px" }, className: "editable-add-btn", type: "ghost", onClick: this.getData }, "\u83B7\u53D6\u6570\u636E" ), _react2["default"].createElement(_src2["default"], { data: dataSource, columns: columns, getBodyWrapper: this.getBodyWrapper }) ); }; return Demo19; }(_react2["default"].Component); exports["default"] = Demo19; module.exports = exports["default"]; /***/ }), /* 534 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _beeButton = __webpack_require__(82); var _beeButton2 = _interopRequireDefault(_beeButton); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _src = __webpack_require__(109); var _src2 = _interopRequireDefault(_src); var _beeAnimate = __webpack_require__(69); var _beeAnimate2 = _interopRequireDefault(_beeAnimate); var _beeIcon = __webpack_require__(136); var _beeIcon2 = _interopRequireDefault(_beeIcon); var _beeFormControl = __webpack_require__(134); var _beeFormControl2 = _interopRequireDefault(_beeFormControl); var _beePopconfirm = __webpack_require__(535); var _beePopconfirm2 = _interopRequireDefault(_beePopconfirm); 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); } } 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); } /** * * @title 增删改表格 * @description 这是带有增删改功能的表格(此编辑功能未使用render组件) * */ var EditableCell = function (_React$Component) { _inherits(EditableCell, _React$Component); function EditableCell() { var _temp, _this, _ret; _classCallCheck(this, EditableCell); 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.state = { value: _this.props.value, editable: false }, _this.handleChange = function (e) { var value = e; _this.setState({ value: value }); }, _this.check = function () { _this.setState({ editable: false }); if (_this.props.onChange) { _this.props.onChange(_this.state.value); } }, _this.edit = function () { _this.setState({ editable: true }); }, _this.handleKeydown = function (event) { if (event.keyCode == 13) { _this.check(); } }, _temp), _possibleConstructorReturn(_this, _ret); } EditableCell.prototype.render = function render() { var _state = this.state, value = _state.value, editable = _state.editable; return _react2["default"].createElement( "div", { className: "editable-cell" }, editable ? _react2["default"].createElement( "div", { className: "editable-cell-input-wrapper" }, _react2["default"].createElement(_beeFormControl2["default"], { value: value, onChange: this.handleChange, onKeyDown: this.handleKeydown }), _react2["default"].createElement(_beeIcon2["default"], { type: "uf-correct", className: "editable-cell-icon-check", onClick: this.check }) ) : _react2["default"].createElement( "div", { className: "editable-cell-text-wrapper" }, value || " ", _react2["default"].createElement(_beeIcon2["default"], { type: "uf-pencil", className: "editable-cell-icon", onClick: this.edit }) ) ); }; return EditableCell; }(_react2["default"].Component); var Demo2 = function (_React$Component2) { _inherits(Demo2, _React$Component2); function Demo2(props) { _classCallCheck(this, Demo2); var _this2 = _possibleConstructorReturn(this, _React$Component2.call(this, props)); _this2.onCellChange = function (index, key) { return function (value) { var dataSource = [].concat(_toConsumableArray(_this2.state.dataSource)); dataSource[index][key] = value; _this2.setState({ dataSource: dataSource }); }; }; _this2.onDelete = function (index) { return function () { var dataSource = [].concat(_toConsumableArray(_this2.state.dataSource)); dataSource.splice(index, 1); _this2.setState({ dataSource: dataSource }); }; }; _this2.handleAdd = function () { var _this2$state = _this2.state, count = _this2$state.count, dataSource = _this2$state.dataSource; var newData = { key: count, name: "\u51E4\u59D0 " + count, age: 32, address: "100 100 100" }; _this2.setState({ dataSource: [].concat(_toConsumableArray(dataSource), [newData]), count: count + 1 }); }; _this2.getBodyWrapper = function (body) { return _react2["default"].createElement( _beeAnimate2["default"], { transitionName: "move", component: "tbody", className: body.props.className }, body.props.children ); }; _this2.columns = [{ title: "姓名", dataIndex: "name", key: "name", width: "30%", render: function render(text, record, index) { return _react2["default"].createElement(EditableCell, { value: text, onChange: _this2.onCellChange(index, "name") }); } }, { title: "年龄", dataIndex: "age", key: "age" }, { title: "你懂的", dataIndex: "address", key: "address" }, { title: "操作", dataIndex: "operation", key: "operation", render: function render(text, record, index) { return _this2.state.dataSource.length > 1 ? _react2["default"].createElement( _beePopconfirm2["default"], { content: "\u786E\u8BA4\u5220\u9664?", id: "aa", onClose: _this2.onDelete(index) }, _react2["default"].createElement(_beeIcon2["default"], { type: "uf-del" }) ) : null; } }]; _this2.state = { dataSource: [{ key: "0", name: "沉鱼", age: "18", address: "96, 77, 89" }, { key: "1", name: "落雁", age: "16", address: "90, 70, 80" }, { key: "2", name: "闭月", age: "17", address: "80, 60, 80" }, { key: "3", name: "羞花", age: "20", address: "120, 60, 90" }], count: 4 }; return _this2; } Demo2.prototype.render = function render() { var dataSource = this.state.dataSource; var columns = this.columns; return _react2["default"].createElement( "div", null, _react2["default"].createElement( _beeButton2["default"], { className: "editable-add-btn", type: "ghost", onClick: this.handleAdd }, "\u6DFB\u52A0" ), _react2["default"].createElement(_src2["default"], { data: dataSource, columns: columns, getBodyWrapper: this.getBodyWrapper }) ); }; return Demo2; }(_react2["default"].Component); exports["default"] = Demo2; module.exports = exports["default"]; /***/ }), /* 535 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _Popconfirm = __webpack_require__(536); var _Popconfirm2 = _interopRequireDefault(_Popconfirm); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } exports["default"] = _Popconfirm2["default"]; module.exports = exports['default']; /***/ }), /* 536 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); 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 _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__(4); var _react2 = _interopRequireDefault(_react); var _reactDom = __webpack_require__(12); var _reactDom2 = _interopRequireDefault(_reactDom); var _createChainedFunction = __webpack_require__(37); var _createChainedFunction2 = _interopRequireDefault(_createChainedFunction); var _splitComponent = __webpack_require__(36); var _splitComponent2 = _interopRequireDefault(_splitComponent); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _Overlay = __webpack_require__(91); var _Overlay2 = _interopRequireDefault(_Overlay); var _Portal = __webpack_require__(89); var _Portal2 = _interopRequireDefault(_Portal); var _Confirm = __webpack_require__(537); var _Confirm2 = _interopRequireDefault(_Confirm); 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 propTypes = _extends({}, _Overlay2["default"].propTypes, { // FIXME: This should be `defaultShow`. /** * 覆盖的初始可见性状态。对于更细微的可见性控制,请考虑直接使用覆盖组件。 */ defaultOverlayShown: _propTypes2["default"].bool, /** * 要覆盖在目标旁边的元素或文本。 */ content: _propTypes2["default"].node.isRequired, /** * @private */ onClick: _propTypes2["default"].func, onClose: _propTypes2["default"].func, onCancel: _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 }; var Popconfirm = function (_Component) { _inherits(Popconfirm, _Component); function Popconfirm(props, context) { _classCallCheck(this, Popconfirm); var _this = _possibleConstructorReturn(this, _Component.call(this, props, context)); _this.handleToggle = _this.handleToggle.bind(_this); _this.handleHide = _this.handleHide.bind(_this); _this.makeOverlay = _this.makeOverlay.bind(_this); _this.handleClose = _this.handleClose.bind(_this); _this.handleCancel = _this.handleCancel.bind(_this); _this._mountNode = null; _this.state = { show: props.defaultOverlayShown }; return _this; } Popconfirm.prototype.componentDidMount = function componentDidMount() { this._mountNode = document.createElement('div'); !isReact16 && this.renderOverlay(); }; Popconfirm.prototype.componentDidUpdate = function componentDidUpdate() { !isReact16 && this.renderOverlay(); }; Popconfirm.prototype.componentWillUnmount = function componentWillUnmount() { !isReact16 && _reactDom2["default"].unmountComponentAtNode(this._mountNode); this._mountNode = null; }; Popconfirm.prototype.handleToggle = function handleToggle() { if (!this.state.show) { this.show(); } }; Popconfirm.prototype.handleClose = function handleClose(e) { var onClose = this.props.onClose; this.hide(); onClose && onClose(e); }; Popconfirm.prototype.handleCancel = function handleCancel(e) { var onCancel = this.props.onCancel; this.hide(); onCancel && onCancel(e); }; Popconfirm.prototype.handleHide = function handleHide() { this.hide(); }; Popconfirm.prototype.show = function show() { this.setState({ show: true }); }; Popconfirm.prototype.hide = function hide() { this.setState({ show: false }); }; Popconfirm.prototype.makeOverlay = function makeOverlay(overlay, props) { return _react2["default"].createElement( _Overlay2["default"], _extends({}, props, { show: this.state.show, onHide: this.handleHide, target: this }), overlay ); }; Popconfirm.prototype.renderOverlay = function renderOverlay() { _reactDom2["default"].unstable_renderSubtreeIntoContainer(this, this._overlay, this._mountNode); }; Popconfirm.prototype.render = function render() { var _props = this.props, content = _props.content, children = _props.children, onClick = _props.onClick, stopbubble = _props.stopbubble, props = _objectWithoutProperties(_props, ['content', 'children', 'onClick', 'stopbubble']); delete props.defaultOverlayShown; var _splitComponentProps = (0, _splitComponent2["default"])(props, _Overlay2["default"]), _splitComponentProps2 = _slicedToArray(_splitComponentProps, 2), overlayProps = _splitComponentProps2[0], confirmProps = _splitComponentProps2[1]; var child = _react2["default"].Children.only(children); var childProps = child.props; var overlay = _react2["default"].createElement( _Confirm2["default"], _extends({}, confirmProps, { onClose: this.handleClose, onCancel: this.handleCancel, stopbubble: stopbubble, placement: props.placement }), content ); var triggerProps = { 'aria-describedby': overlay.props.id }; // FIXME: 这里用于传递这个组件上的处理程序的逻辑是不一致的。我们不应该通过任何这些道具。 triggerProps.onClick = (0, _createChainedFunction2["default"])(childProps.onClick, onClick); triggerProps.onClick = (0, _createChainedFunction2["default"])(triggerProps.onClick, this.handleToggle); this._overlay = this.makeOverlay(overlay, overlayProps); 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 Popconfirm; }(_react.Component); Popconfirm.propTypes = propTypes; Popconfirm.defaultProps = defaultProps; exports["default"] = Popconfirm; module.exports = exports['default']; /***/ }), /* 537 */ /***/ (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__(4); var _react2 = _interopRequireDefault(_react); var _classnames = __webpack_require__(3); var _classnames2 = _interopRequireDefault(_classnames); var _i18n = __webpack_require__(538); var _i18n2 = _interopRequireDefault(_i18n); var _beeButton = __webpack_require__(82); var _beeButton2 = _interopRequireDefault(_beeButton); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _tool = __webpack_require__(501); 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 = { /** * Sets the direction the Popover is positioned towards. */ placement: _propTypes2["default"].oneOf(['top', 'right', 'bottom', 'left']), /** * The "top" position value for the Popover. */ positionTop: _propTypes2["default"].oneOfType([_propTypes2["default"].number, _propTypes2["default"].string]), /** * The "left" position value for the Popover. */ positionLeft: _propTypes2["default"].oneOfType([_propTypes2["default"].number, _propTypes2["default"].string]), /** * The "top" position value for the Popover arrow. */ arrowOffsetTop: _propTypes2["default"].oneOfType([_propTypes2["default"].number, _propTypes2["default"].string]), /** * The "left" position value for the Popover arrow. */ arrowOffsetLeft: _propTypes2["default"].oneOfType([_propTypes2["default"].number, _propTypes2["default"].string]), /** * 阻止冒泡 */ stopbubble: _propTypes2["default"].number, /** * Title content */ title: _propTypes2["default"].node, onClose: _propTypes2["default"].func, onCancel: _propTypes2["default"].func, color: _propTypes2["default"].oneOf(['dark']) }; var defaultProps = { stopbubble: 0, placement: 'right', clsPrefix: 'u-popconfirm', locale: {} }; var Confirm = function (_React$Component) { _inherits(Confirm, _React$Component); function Confirm(props) { _classCallCheck(this, Confirm); var _this = _possibleConstructorReturn(this, _React$Component.call(this, props)); _this.cancel = function (e) { var _this$props = _this.props, stopbubble = _this$props.stopbubble, onCancel = _this$props.onCancel; stopbubble && e.stopPropagation(); onCancel(e); }; _this.close = function (e) { var _this$props2 = _this.props, stopbubble = _this$props2.stopbubble, onClose = _this$props2.onClose; stopbubble && e.stopPropagation(); onClose(e); }; return _this; } Confirm.prototype.render = function render() { var _classes; var _props = this.props, placement = _props.placement, positionTop = _props.positionTop, positionLeft = _props.positionLeft, arrowOffsetTop = _props.arrowOffsetTop, arrowOffsetLeft = _props.arrowOffsetLeft, clsPrefix = _props.clsPrefix, trigger = _props.trigger, title = _props.title, className = _props.className, style = _props.style, children = _props.children, locale = _props.locale, onClose = _props.onClose, color = _props.color, onCancel = _props.onCancel, stopbubble = _props.stopbubble, props = _objectWithoutProperties(_props, ['placement', 'positionTop', 'positionLeft', 'arrowOffsetTop', 'arrowOffsetLeft', 'clsPrefix', 'trigger', 'title', 'className', 'style', 'children', 'locale', 'onClose', 'color', 'onCancel', 'stopbubble']); var local = (0, _tool.getComponentLocale)(this.props, this.context, 'Popconfirm', function () { return _i18n2["default"]; }); //const [bsProps, elementProps] = splitBsProps(props); var inversePlacement = null; if (className.includes('inverse-arrow')) { switch (placement) { case 'top': inversePlacement = 'bottom'; break; case 'left': inversePlacement = 'right'; break; case 'right': inversePlacement = 'left'; break; case 'bottom': inversePlacement = 'top'; break; } } var resPlacement = inversePlacement ? inversePlacement : placement; var classes = (_classes = {}, _defineProperty(_classes, '' + clsPrefix, true), _defineProperty(_classes, resPlacement, true), _defineProperty(_classes, clsPrefix + '-' + color, color), _classes); var outerStyle = _extends({ display: 'block', top: positionTop, left: positionLeft }, style); var arrowStyle = { top: arrowOffsetTop, left: arrowOffsetLeft }; return _react2["default"].createElement( 'div', _extends({}, props, { role: 'tooltip', className: (0, _classnames2["default"])(className, classes), style: outerStyle, onClick: function onClick(e) { return stopbubble && e.stopPropagation(); } }), _react2["default"].createElement('div', { className: 'arrow', style: arrowStyle }), _react2["default"].createElement( 'div', { className: (0, _classnames2["default"])(clsPrefix + '-content') }, children ), _react2["default"].createElement( 'div', { className: (0, _classnames2["default"])(clsPrefix + '-confirm') }, _react2["default"].createElement( _beeButton2["default"], { onClick: this.cancel, size: 'sm', style: { minWidth: 50 }, shape: 'border' }, local['cancel'] ), _react2["default"].createElement( _beeButton2["default"], { onClick: this.close, size: 'sm', style: { minWidth: 50 }, colors: 'primary' }, local['ok'] ) ) ); }; return Confirm; }(_react2["default"].Component); Confirm.propTypes = propTypes; Confirm.defaultProps = defaultProps; Confirm.contextTypes = { beeLocale: _propTypes2["default"].object }; exports["default"] = Confirm; module.exports = exports['default']; /***/ }), /* 538 */ /***/ (function(module, exports) { 'use strict'; module.exports = { 'lang': 'zh-cn', 'ok': '确定', 'cancel': '取消', 'en-us': { 'ok': 'ok', 'cancel': 'cancel' } }; /***/ }), /* 539 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _beeButton = __webpack_require__(82); var _beeButton2 = _interopRequireDefault(_beeButton); var _beeTooltip = __webpack_require__(85); var _beeTooltip2 = _interopRequireDefault(_beeTooltip); var _src = __webpack_require__(109); var _src2 = _interopRequireDefault(_src); 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); } /** * * @title 简单表格选中行的背景色、表头表尾 * @description */ var columns = [{ title: "用户名", dataIndex: "a", key: "a", width: 80, className: "rowClassName" }, { id: "123", title: "性别", dataIndex: "b", key: "b", width: 100 }, { title: "年龄", dataIndex: "c", key: "c", width: 200 }]; var data = [{ a: "令狐冲", b: "男", c: 41, key: "1" }, { a: "杨过叔叔的女儿黄蓉", b: "男", c: 67, key: "2" }, { a: "郭靖", b: "男", c: 25, key: "3" }]; var Demo26 = function (_Component) { _inherits(Demo26, _Component); function Demo26(props) { _classCallCheck(this, Demo26); var _this = _possibleConstructorReturn(this, _Component.call(this, props)); _this.state = { data: data, selectedRowIndex: 0 }; return _this; } Demo26.prototype.render = function render() { var _this2 = this; return _react2["default"].createElement(_src2["default"], { columns: columns, data: data, rowClassName: function rowClassName(record, index, indent) { if (_this2.state.selectedRowIndex == index) { return 'selected'; } else { return ''; } }, onRowClick: function onRowClick(record, index, indent) { _this2.setState({ selectedRowIndex: index }); }, title: function title(currentData) { return _react2["default"].createElement( "div", null, "\u6807\u9898: \u8FD9\u662F\u4E00\u4E2A\u6807\u9898" ); }, footer: function footer(currentData) { return _react2["default"].createElement( "div", null, "\u8868\u5C3E: \u6211\u662F\u5C0F\u5C3E\u5DF4" ); } }); }; return Demo26; }(_react.Component); exports["default"] = Demo26; module.exports = exports["default"]; /***/ }), /* 540 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _src = __webpack_require__(109); var _src2 = _interopRequireDefault(_src); var _filterColumn = __webpack_require__(541); var _filterColumn2 = _interopRequireDefault(_filterColumn); var _sum = __webpack_require__(519); var _sum2 = _interopRequireDefault(_sum); var _beeIcon = __webpack_require__(136); var _beeIcon2 = _interopRequireDefault(_beeIcon); var _beeCheckbox = __webpack_require__(513); var _beeCheckbox2 = _interopRequireDefault(_beeCheckbox); var _beePopover = __webpack_require__(542); var _beePopover2 = _interopRequireDefault(_beePopover); 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); } /** * * @title 根据列进行过滤 * @description 点击表格右侧按钮,进行表格列的数据过滤。可以自定义设置显示某列,通过ifshow属性控制,默认为true都显示。afterFilter为过滤之后的回调函数 * */ var data21 = [{ a: "杨过", b: "男", c: 30, d: '内行', e: "操作", key: "2" }, { a: "令狐冲", b: "男", c: 41, d: '大侠', e: "操作", key: "1" }, { a: "郭靖", b: "男", c: 25, d: '大侠', e: "操作", key: "3" }]; var FilterColumnTable = (0, _filterColumn2['default'])(_src2['default'], _beePopover2['default'], _beeIcon2['default']); var defaultProps21 = { prefixCls: "bee-table" }; var Demo21 = function (_Component) { _inherits(Demo21, _Component); function Demo21(props) { _classCallCheck(this, Demo21); var _this = _possibleConstructorReturn(this, _Component.call(this, props)); _this.afterFilter = function (optData, columns) { if (optData.key == 'b') { if (optData.ifshow) { columns[2].ifshow = false; } else { columns[2].ifshow = true; } _this.setState({ columns21: columns, showFilterPopover: true }); } }; _this.state = { columns21: [{ title: "名字", dataIndex: "a", key: "a" // width: 100 }, { title: "性别", dataIndex: "b", key: "b" // width: 100 }, { title: "年龄", dataIndex: "c", key: "c", ifshow: false, // width: 200, // sumCol: true, sorter: function sorter(a, b) { return a.c - b.c; } }, { title: "武功级别", dataIndex: "d", key: "d" }, { title: "操作", dataIndex: "e", key: "e", render: function render(text, record, index) { return _react2['default'].createElement( 'div', { title: text }, _react2['default'].createElement( 'a', { href: '#', tooltip: text, onClick: function onClick() { alert('这是第' + index + '列,内容为:' + text); } // style={{ // position: 'absolute', // top: 5, // left: 0 // }} }, '\u4E00\u4E9B\u64CD\u4F5C' ) ); } }] }; return _this; } Demo21.prototype.render = function render() { return _react2['default'].createElement(FilterColumnTable, { columns: this.state.columns21, data: data21, afterFilter: this.afterFilter, showFilterPopover: this.state.showFilterPopover }); }; return Demo21; }(_react.Component); Demo21.defaultProps = defaultProps21; exports['default'] = Demo21; module.exports = exports['default']; /***/ }), /* 541 */ /***/ (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; }; exports["default"] = filterColumn; var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _beeCheckbox = __webpack_require__(513); var _beeCheckbox2 = _interopRequireDefault(_beeCheckbox); var _beeIcon = __webpack_require__(136); var _beeIcon2 = _interopRequireDefault(_beeIcon); var _util = __webpack_require__(517); var _i18n = __webpack_require__(500); var _i18n2 = _interopRequireDefault(_i18n); var _tool = __webpack_require__(501); 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() {} /** * 参数: 过滤表头 * @param {*} Table * @param {*} Popover * @param {*} Icon */ function filterColumn(Table, Popover) { var _class, _temp, _initialiseProps; return _temp = _class = function (_Component) { _inherits(FilterColumn, _Component); function FilterColumn(props) { _classCallCheck(this, FilterColumn); var _this = _possibleConstructorReturn(this, _Component.call(this, props)); _initialiseProps.call(_this); var columns = props.columns; _this.state = { columns: _this.setColumOrderByIndex((0, _util.ObjectAssign)(columns)), showModal: false, screenY: 0 }; return _this; } FilterColumn.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { if (nextProps.columns != this.props.columns) { this.setState({ columns: this.setColumOrderByIndex((0, _util.ObjectAssign)(nextProps.columns)) }); } this.setState({ showModal: nextProps.showFilterPopover ? true : false }); }; FilterColumn.prototype.render = function render() { var _props = this.props, data = _props.data, prefixCls = _props.prefixCls, scrollPro = _props.scroll; var _state = this.state, columns = _state.columns, showModal = _state.showModal; var locale = (0, _tool.getComponentLocale)(this.props, this.context, "Table", function () { return _i18n2["default"]; }); var _columns = [], widthState = 0, scroll = scrollPro; columns.forEach(function (da) { if (da.ifshow) { _columns.push(da); if (da.width) { widthState++; } } }); // if(_columns.length == widthState){ // scroll.x = this.getCloumnsScroll(columns); // } var content = _react2["default"].createElement( "div", { className: prefixCls + "-pop-cont" }, _react2["default"].createElement( "span", { className: prefixCls + "-clear-setting", onClick: this.clear }, locale["resetSettings"] ), _react2["default"].createElement( "div", null, this.getCloumItem() ) ); return _react2["default"].createElement( "div", { className: prefixCls + "-cont" }, _react2["default"].createElement(Table, _extends({}, this.props, { columns: _columns, data: data // scroll={scroll} // scroll={{x:this.getCloumnsScroll(columns)}} })), this.props.columnFilterAble == false ? "" : _react2["default"].createElement( "div", { className: prefixCls + "-filter-icon" }, _react2["default"].createElement( Popover, { id: "filter_column_popover", placement: "left", content: content, show: showModal }, _react2["default"].createElement( "div", { className: prefixCls + "-pop-column-filter-cont" }, _react2["default"].createElement(_beeIcon2["default"], { type: "uf-grid", onClick: this.openCloumList }) ) ) ) ); }; return FilterColumn; }(_react.Component), _class.defaultProps = { prefixCls: "u-table-filter-column", afterFilter: noop, columnFilterAble: true, scroll: {} }, _initialiseProps = function _initialiseProps() { var _this2 = this; this.setColumOrderByIndex = function (_column) { _column.forEach(function (da) { //默认所有的列都显示,如果传递ifshow属性,根据ifshow属性值来判断是否显示某列 if (da.hasOwnProperty("ifshow")) { da.checked = da.ifshow ? true : false; da.ifshow = da.checked; } else { da.checked = true; da.ifshow = true; } }); return _column; }; this.checkedColumItemClick = function (da) { var _props2 = _this2.props, checkMinSize = _props2.checkMinSize, afterFilter = _props2.afterFilter; // if(checkMinSize) var sum = 0, leng = 0; _this2.state.columns.forEach(function (da) { da.fixed ? "" : leng++; !da.fixed && da.checked ? sum++ : ""; }); if (sum < checkMinSize && da.checked) { return; } else { if (sum <= 1 && da.checked) return; } da.checked = da.checked ? false : true; da.ifshow = da.checked ? true : false; _this2.setState(_extends({}, _this2.state)); afterFilter(da, _this2.state.columns); }; this.openCloumList = function () { _this2.setState({ showModal: true }); }; this.getCloumItem = function () { var prefixCls = _this2.props.prefixCls; var columns = _this2.state.columns; return columns.map(function (da, i) { var paramObj = { id: da.key, checked: da.checked }; if (da.fixed) { paramObj.disabled = true; } else { paramObj.onClick = function () { _this2.checkedColumItemClick(da); }; } return _react2["default"].createElement( "div", { key: da.key + "_" + i, className: prefixCls + "-pop-cont-item" }, _react2["default"].createElement(_beeCheckbox2["default"], paramObj), _react2["default"].createElement( "span", null, da.title ) ); }); }; this.clear = function () { var columns = _this2.state.columns; columns.forEach(function (da) { da.checked = true; da.ifshow = true; }); _this2.setState({ columns: columns }); _this2.props.afterFilter(_this2.state.columns, _this2.state.columns); }; this.getCloumnsScroll = function (columns) { var sum = 0; columns.forEach(function (da) { if (da.checked) { sum += da.width; } }); // console.log("sum",sum); return sum; }; }, _temp; } module.exports = exports["default"]; /***/ }), /* 542 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _Popover = __webpack_require__(543); var _Popover2 = _interopRequireDefault(_Popover); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } exports["default"] = _Popover2["default"]; module.exports = exports['default']; /***/ }), /* 543 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); 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 _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__(4); var _react2 = _interopRequireDefault(_react); var _reactDom = __webpack_require__(12); var _reactDom2 = _interopRequireDefault(_reactDom); var _createChainedFunction = __webpack_require__(37); var _createChainedFunction2 = _interopRequireDefault(_createChainedFunction); var _splitComponent = __webpack_require__(36); var _splitComponent2 = _interopRequireDefault(_splitComponent); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _Overlay = __webpack_require__(91); var _Overlay2 = _interopRequireDefault(_Overlay); var _Portal = __webpack_require__(89); var _Portal2 = _interopRequireDefault(_Portal); var _Content = __webpack_require__(544); var _Content2 = _interopRequireDefault(_Content); var _contains = __webpack_require__(88); var _contains2 = _interopRequireDefault(_contains); 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); } //TODO: 当多个Popover在一个组件内时,显示一个会触发多个渲染。见demo1. var isReact16 = _reactDom2["default"].createPortal !== undefined; var triggerType = _propTypes2["default"].oneOf(['click', 'hover', 'focus']); /** * 检查值是属于这个值,还是等于这个值 * * @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 propTypes = _extends({}, _Overlay2["default"].propTypes, { // FIXME: This should be `defaultShow`. /** * 覆盖的初始可见性状态。对于更细微的可见性控制,请考虑直接使用覆盖组件。 */ defaultOverlayShown: _propTypes2["default"].bool, /** * 要覆盖在目标旁边的元素或文本。 */ content: _propTypes2["default"].node.isRequired, /** * 显示和隐藏覆盖一旦触发的毫秒延迟量 */ delay: _propTypes2["default"].number, /** * 触发后显示叠加层之前的延迟毫秒 */ delayShow: _propTypes2["default"].number, /** * 触发后隐藏叠加层的延迟毫秒 */ delayHide: _propTypes2["default"].number, /** * @private */ onClick: _propTypes2["default"].func, onClose: _propTypes2["default"].func, onCancel: _propTypes2["default"].func, // Overridden props from ``. /** * @private */ target: _propTypes2["default"].oneOf([null]), /** * @private */ onHide: _propTypes2["default"].oneOf([null]), /** * @private */ show: _propTypes2["default"].bool, trigger: _propTypes2["default"].oneOfType([triggerType, _propTypes2["default"].arrayOf(triggerType)]), /** * @private */ onBlur: _propTypes2["default"].func, /** * @private */ onFocus: _propTypes2["default"].func, /** * @private */ onMouseOut: _propTypes2["default"].func, /** * @private */ onMouseOver: _propTypes2["default"].func }); var defaultProps = { placement: 'right', clsPrefix: 'u-popover', rootClose: true, defaultOverlayShown: false }; var Popover = function (_Component) { _inherits(Popover, _Component); function Popover(props, context) { _classCallCheck(this, Popover); var _this = _possibleConstructorReturn(this, _Component.call(this, props, context)); _initialiseProps.call(_this); _this._mountNode = null; _this.state = { show: props.defaultOverlayShown }; _this.handleMouseOver = function (e) { return _this.handleMouseOverOut(_this.handleDelayedShow, e); }; _this.handleMouseOut = function (e) { return _this.handleMouseOverOut(_this.handleDelayedHide, e); }; return _this; } Popover.prototype.componentDidMount = function componentDidMount() { this._mountNode = document.createElement('div'); !isReact16 && this.renderOverlay(); }; Popover.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { if (nextProps.hasOwnProperty('show')) { if (nextProps.show) { this.handleShow(); } else { this.handleHide(); } } }; Popover.prototype.componentDidUpdate = function componentDidUpdate() { !isReact16 && this.renderOverlay(); }; Popover.prototype.componentWillUnmount = function componentWillUnmount() { !isReact16 && _reactDom2["default"].unmountComponentAtNode(this._mountNode); this._mountNode = null; }; // 简单实现mouseEnter和mouseLeave。 // React的内置版本是有问题的:https://github.com/facebook/react/issues/4251 //在触发器被禁用的情况下,mouseOut / Over可能导致闪烁 //从一个子元素移动到另一个子元素。 Popover.prototype.render = function render() { var _props = this.props, content = _props.content, children = _props.children, onClick = _props.onClick, trigger = _props.trigger, onBlur = _props.onBlur, onFocus = _props.onFocus, onMouseOut = _props.onMouseOut, onMouseOver = _props.onMouseOver, props = _objectWithoutProperties(_props, ['content', 'children', 'onClick', 'trigger', 'onBlur', 'onFocus', 'onMouseOut', 'onMouseOver']); delete props.delay; delete props.delayShow; delete props.delayHide; delete props.defaultOverlayShown; var _splitComponentProps = (0, _splitComponent2["default"])(props, _Overlay2["default"]), _splitComponentProps2 = _slicedToArray(_splitComponentProps, 2), overlayProps = _splitComponentProps2[0], confirmProps = _splitComponentProps2[1]; var child = _react2["default"].Children.only(children); var childProps = child.props; var overlay = _react2["default"].createElement( _Content2["default"], _extends({ placement: props.placement }, confirmProps), content ); var triggerProps = { 'aria-describedby': overlay.props.id }; // FIXME: 这里用于传递这个组件上的处理程序的逻辑是不一致的。我们不应该通过任何这些道具。 triggerProps.onClick = (0, _createChainedFunction2["default"])(childProps.onClick, onClick); if (isOneOf('click', trigger)) { triggerProps.onClick = (0, _createChainedFunction2["default"])(triggerProps.onClick, this.handleToggle); } if (isOneOf('hover', trigger)) { triggerProps.onMouseOver = (0, _createChainedFunction2["default"])(childProps.onMouseOver, onMouseOver, this.handleMouseOver); triggerProps.onMouseOut = (0, _createChainedFunction2["default"])(childProps.onMouseOut, onMouseOut, this.handleMouseOut); } if (isOneOf('focus', trigger)) { 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, overlayProps); 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 Popover; }(_react.Component); var _initialiseProps = function _initialiseProps() { var _this2 = this; this.handleToggle = function () { if (!_this2.state.show) { _this2.show(); } else { _this2.hide(); } }; this.handleDelayedShow = function () { if (_this2._hoverHideDelay != null) { clearTimeout(_this2._hoverHideDelay); _this2._hoverHideDelay = null; return; } if (_this2.state.show || _this2._hoverShowDelay != null) { return; } var delay = _this2.props.delayShow != null ? _this2.props.delayShow : _this2.props.delay; if (!delay) { _this2.show(); return; } _this2._hoverShowDelay = setTimeout(function () { _this2._hoverShowDelay = null; _this2.show(); }, delay); }; this.handleDelayedHide = function () { if (_this2._hoverShowDelay != null) { clearTimeout(_this2._hoverShowDelay); _this2._hoverShowDelay = null; return; } if (!_this2.state.show || _this2._hoverHideDelay != null) { return; } var delay = _this2.props.delayHide != null ? _this2.props.delayHide : _this2.props.delay; if (!delay) { _this2.hide(); return; } _this2._hoverHideDelay = setTimeout(function () { _this2._hoverHideDelay = null; _this2.hide(); }, delay); }; this.handleMouseOverOut = function (handler, e) { var target = e.currentTarget; var related = e.relatedTarget || e.nativeEvent.toElement; if (!related || related !== target && !(0, _contains2["default"])(target, related)) { handler(e); } }; this.handleHide = function () { if (_this2.state.show) { _this2.hide(); } }; this.handleShow = function () { if (!_this2.state.show) { _this2.show(); } }; this.show = function () { _this2.setState({ show: true }); }; this.hide = function () { _this2.setState({ show: false }); }; this.makeOverlay = function (overlay, props) { return _react2["default"].createElement( _Overlay2["default"], _extends({}, props, { show: _this2.state.show, onHide: _this2.handleHide, target: _this2 }), overlay ); }; this.renderOverlay = function () { _reactDom2["default"].unstable_renderSubtreeIntoContainer(_this2, _this2._overlay, _this2._mountNode); }; }; Popover.propTypes = propTypes; Popover.defaultProps = defaultProps; exports["default"] = Popover; module.exports = exports['default']; /***/ }), /* 544 */ /***/ (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__(4); var _react2 = _interopRequireDefault(_react); var _isRequiredForA11y = __webpack_require__(35); var _isRequiredForA11y2 = _interopRequireDefault(_isRequiredForA11y); var _classnames = __webpack_require__(3); var _classnames2 = _interopRequireDefault(_classnames); var _propTypes = __webpack_require__(5); 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 = { /** * An html id attribute, necessary for accessibility * @type {string} * @required */ id: (0, _isRequiredForA11y2["default"])(_propTypes2["default"].oneOfType([_propTypes2["default"].string, _propTypes2["default"].number])), /** * Sets the direction the Popover is positioned towards. */ placement: _propTypes2["default"].oneOf(['top', 'right', 'bottom', 'left', 'topLeft', 'rightTop', 'bottomLeft', 'leftTop', 'topRight', 'rightBottom', 'bottomRight', 'leftBottom']), /** * The "top" position value for the Popover. */ positionTop: _propTypes2["default"].oneOfType([_propTypes2["default"].number, _propTypes2["default"].string]), /** * The "left" position value for the Popover. */ positionLeft: _propTypes2["default"].oneOfType([_propTypes2["default"].number, _propTypes2["default"].string]), /** * The "top" position value for the Popover arrow. */ arrowOffsetTop: _propTypes2["default"].oneOfType([_propTypes2["default"].number, _propTypes2["default"].string]), /** * The "left" position value for the Popover arrow. */ arrowOffsetLeft: _propTypes2["default"].oneOfType([_propTypes2["default"].number, _propTypes2["default"].string]) }; var defaultProps = { placement: 'right', clsPrefix: 'u-popover' }; var PLACECLASS = { right: 'right', top: 'top', bottom: 'bottom', left: 'left', rightTop: 'right-top', rightBottom: 'right-bottom', leftTop: 'left-top', leftBottom: 'left-bottom', topRight: 'top-right', topLeft: 'top-left', bottomLeft: 'bottom-left', bottomRight: 'bottom-right' }; var Content = function (_React$Component) { _inherits(Content, _React$Component); function Content() { _classCallCheck(this, Content); return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); } Content.prototype.getInversePlacement = function getInversePlacement(className, placement) { if (placement && className && className.includes('inverse-arrow')) { var inversePlacement = null; if (placement.startsWith('left')) { placement = placement.replace('left', 'right'); } else if (placement.startsWith('right')) { placement = placement.replace('right', 'left'); } else if (placement.startsWith('top')) { placement = placement.replace('top', 'bottom'); } else if (placement.startsWith('bottom')) { placement = placement.replace('bottom', 'top'); } return inversePlacement ? inversePlacement : placement; } else { return placement; } }; Content.prototype.render = function render() { var _classes; var _props = this.props, placement = _props.placement, positionTop = _props.positionTop, positionLeft = _props.positionLeft, arrowOffsetTop = _props.arrowOffsetTop, arrowOffsetLeft = _props.arrowOffsetLeft, clsPrefix = _props.clsPrefix, className = _props.className, style = _props.style, id = _props.id, children = _props.children, trigger = _props.trigger, others = _objectWithoutProperties(_props, ['placement', 'positionTop', 'positionLeft', 'arrowOffsetTop', 'arrowOffsetLeft', 'clsPrefix', 'className', 'style', 'id', 'children', 'trigger']); var resPlacement = this.getInversePlacement(className, placement); var classes = (_classes = {}, _defineProperty(_classes, '' + clsPrefix, true), _defineProperty(_classes, PLACECLASS[resPlacement], true), _classes); var outerStyle = _extends({ display: 'block', top: positionTop, left: positionLeft }, style); /* const arrowStyle = { top: arrowOffsetTop, left: arrowOffsetLeft, }; */ return _react2["default"].createElement( 'div', _extends({ role: 'tooltip', id: id, className: (0, _classnames2["default"])(className, classes), style: outerStyle }, others), _react2["default"].createElement('div', { className: 'arrow' }), _react2["default"].createElement( 'div', { className: (0, _classnames2["default"])(clsPrefix + '-content') }, children ) ); }; return Content; }(_react2["default"].Component); Content.propTypes = propTypes; Content.defaultProps = defaultProps; exports["default"] = Content; module.exports = exports['default']; /***/ }), /* 545 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _src = __webpack_require__(109); var _src2 = _interopRequireDefault(_src); var _dragColumn = __webpack_require__(546); var _dragColumn2 = _interopRequireDefault(_dragColumn); var _beeIcon = __webpack_require__(136); var _beeIcon2 = _interopRequireDefault(_beeIcon); 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); } /** * * @title 列的拖拽,交换表头的顺序 * @description 点击列的表头,进行左右拖拽 */ var columns22 = [{ title: "名字", dataIndex: "a", key: "a", width: 100 }, { title: "性别", dataIndex: "b", key: "b", width: 200 }, { title: "年龄", dataIndex: "c", key: "c", width: 200, sumCol: true, sorter: function sorter(a, b) { return a.c - b.c; } }, { title: "武功级别", dataIndex: "d", key: "d", width: 200 }]; var data22 = [{ a: "杨过", b: "男", c: 30, d: '内行', key: "2" }, { a: "令狐冲", b: "男", c: 41, d: '大侠', key: "1" }, { a: "郭靖", b: "男", c: 25, d: '大侠', key: "3" }]; var DragColumnTable = (0, _dragColumn2['default'])(_src2['default']); var defaultProps22 = { prefixCls: "bee-table" }; var Demo22 = function (_Component) { _inherits(Demo22, _Component); function Demo22(props) { _classCallCheck(this, Demo22); return _possibleConstructorReturn(this, _Component.call(this, props)); } Demo22.prototype.render = function render() { return _react2['default'].createElement(DragColumnTable, { columns: columns22, data: data22, bordered: true, draggable: true }); }; return Demo22; }(_react.Component); Demo22.defaultProps = defaultProps22; exports['default'] = Demo22; module.exports = exports['default']; /***/ }), /* 546 */ /***/ (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 _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['default'] = dragColumn; var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _util = __webpack_require__(517); 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 cloneDeep = __webpack_require__(547); /** * 参数: 列拖拽 * @param {*} Table */ function dragColumn(Table) { return function (_Component) { _inherits(DragColumn, _Component); function DragColumn(props) { _classCallCheck(this, DragColumn); var _this = _possibleConstructorReturn(this, _Component.call(this, props)); _this.setColumOrderByIndex = function (_column) { _column.forEach(function (da, i) { da.dragIndex = i; da.drgHover = false; }); return _column; }; _this.onDrop = function (event, data) { var dragSource = data.dragSource, dragTarg = data.dragTarg; var columns = _this.state.columns; var dragSourceColum = columns.find(function (da, i) { return da.key == dragSource.key; }); var dragTargColum = columns.find(function (da, i) { return da.key == dragTarg.key; }); for (var index = 0; index < columns.length; index++) { var da = columns[index]; if (da.key === dragSource.key) { columns[index] = dragTargColum; } if (da.key === dragTarg.key) { columns[index] = dragSourceColum; } } _this.setState({ columns: cloneDeep(columns) }); if (_this.props.onDrop) { _this.props.onDrop(event, data, columns); } }; _this.getTarget = function (evt) { return evt.target || evt.srcElement; }; _this.state = { columns: _this.setColumOrderByIndex(props.columns) }; return _this; } DragColumn.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { if (nextProps.columns != this.props.columns) { this.setState({ columns: this.setColumOrderByIndex(nextProps.columns) }); } }; DragColumn.prototype.cloneDeep = function cloneDeep(obj) { if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== 'object' || Object.keys(obj).length === 0) { return obj; } var resultData = {}; return this.recursion(obj, resultData); }; DragColumn.prototype.recursion = function (_recursion) { function recursion(_x) { return _recursion.apply(this, arguments); } recursion.toString = function () { return _recursion.toString(); }; return recursion; }(function (obj) { var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; for (key in obj) { if (_typeof(obj[key]) == 'object' && Object.keys(obj[key].length > 0)) { data[key] = recursion(obj[key]); } else { data[key] = obj[key]; } } return data; }); DragColumn.prototype.render = function render() { var _props = this.props, data = _props.data, dragborder = _props.dragborder, draggable = _props.draggable, className = _props.className, columns = _props.columns, onDragStart = _props.onDragStart, onDragEnter = _props.onDragEnter, onDragOver = _props.onDragOver, onDrop = _props.onDrop, others = _objectWithoutProperties(_props, ['data', 'dragborder', 'draggable', 'className', 'columns', 'onDragStart', 'onDragEnter', 'onDragOver', 'onDrop']); var key = new Date().getTime(); return _react2['default'].createElement(Table, _extends({}, others, { columns: this.state.columns, data: data, className: className + ' u-table-drag-border', onDragStart: this.onDragStart, onDragOver: this.onDragOver, onDrop: this.onDrop, onDragEnter: this.onDragEnter, draggable: draggable, dragborder: dragborder // dragborder={false} , dragborderKey: key })); }; return DragColumn; }(_react.Component); } module.exports = exports['default']; /***/ }), /* 547 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global, module) {/** * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright jQuery 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 as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', funcTag = '[object Function]', genTag = '[object GeneratorFunction]', mapTag = '[object Map]', numberTag = '[object Number]', objectTag = '[object Object]', promiseTag = '[object Promise]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', symbolTag = '[object Symbol]', 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 match `RegExp` flags from their coerced string values. */ var reFlags = /\w*$/; /** 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 supported by `_.clone`. */ var cloneableTags = {}; cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[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; /** * Adds the key-value `pair` to `map`. * * @private * @param {Object} map The map to modify. * @param {Array} pair The key-value pair to add. * @returns {Object} Returns `map`. */ function addMapEntry(map, pair) { // Don't return `map.set` because it's not chainable in IE 11. map.set(pair[0], pair[1]); return map; } /** * Adds `value` to `set`. * * @private * @param {Object} set The set to modify. * @param {*} value The value to add. * @returns {Object} Returns `set`. */ function addSetEntry(set, value) { // Don't return `set.add` because it's not chainable in IE 11. set.add(value); return set; } /** * A specialized version of `_.forEach` for arrays without support for * iteratee shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns `array`. */ function arrayEach(array, iteratee) { var index = -1, length = array ? array.length : 0; while (++index < length) { if (iteratee(array[index], index, array) === false) { break; } } return array; } /** * 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 `_.reduce` for arrays without support for * iteratee shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {*} [accumulator] The initial value. * @param {boolean} [initAccum] Specify using the first element of `array` as * the initial value. * @returns {*} Returns the accumulated value. */ function arrayReduce(array, iteratee, accumulator, initAccum) { var index = -1, length = array ? array.length : 0; if (initAccum && length) { accumulator = array[++index]; } while (++index < length) { accumulator = iteratee(accumulator, array[index], index, array); } return accumulator; } /** * 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; } /** * 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]; } /** * Checks if `value` is a host object in IE < 9. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a host object, else `false`. */ function isHostObject(value) { // Many host objects are `Object` objects that can coerce to strings // despite having improperly defined `toString` methods. var result = false; if (value != null && typeof value.toString != 'function') { try { result = !!(value + ''); } catch (e) {} } return result; } /** * 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 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 decompiled source of functions. */ var funcToString = funcProto.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var objectToString = 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, getPrototype = overArg(Object.getPrototypeOf, Object), objectCreate = Object.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, splice = arrayProto.splice; /* 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 ? entries.length : 0; 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) : {}; } /** * 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) { return this.has(key) && delete this.__data__[key]; } /** * 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__; 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 ? entries.length : 0; 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__ = []; } /** * 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); } 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) { 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 ? entries.length : 0; 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.__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) { return getMapData(this, key)['delete'](key); } /** * 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) { getMapData(this, key).set(key, value); 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 a stack cache object to store key-value pairs. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function Stack(entries) { this.__data__ = new ListCache(entries); } /** * Removes all key-value entries from the stack. * * @private * @name clear * @memberOf Stack */ function stackClear() { this.__data__ = new ListCache; } /** * 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) { return this.__data__['delete'](key); } /** * 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 cache = this.__data__; if (cache instanceof ListCache) { var pairs = cache.__data__; if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { pairs.push([key, value]); return this; } cache = this.__data__ = new MapCache(pairs); } cache.set(key, value); 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) { // Safari 8.1 makes `arguments.callee` enumerable in strict mode. // Safari 9 makes `arguments.length` enumerable in strict mode. var result = (isArray(value) || isArguments(value)) ? baseTimes(value.length, String) : []; var length = result.length, skipIndexes = !!length; for (var key in value) { if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == 'length' || isIndex(key, length)))) { result.push(key); } } return result; } /** * Assigns `value` to `key` of `object` if the existing value is not equivalent * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function assignValue(object, key, value) { var objValue = object[key]; if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || (value === undefined && !(key in object))) { object[key] = value; } } /** * 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 `_.assign` without support for multiple sources * or `customizer` functions. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @returns {Object} Returns `object`. */ function baseAssign(object, source) { return object && copyObject(source, keys(source), object); } /** * The base implementation of `_.clone` and `_.cloneDeep` which tracks * traversed objects. * * @private * @param {*} value The value to clone. * @param {boolean} [isDeep] Specify a deep clone. * @param {boolean} [isFull] Specify a clone including symbols. * @param {Function} [customizer] The function to customize cloning. * @param {string} [key] The key of `value`. * @param {Object} [object] The parent object of `value`. * @param {Object} [stack] Tracks traversed objects and their clone counterparts. * @returns {*} Returns the cloned value. */ function baseClone(value, isDeep, isFull, customizer, key, object, stack) { var result; if (customizer) { result = object ? customizer(value, key, object, stack) : customizer(value); } if (result !== undefined) { return result; } if (!isObject(value)) { return value; } var isArr = isArray(value); if (isArr) { result = initCloneArray(value); if (!isDeep) { return copyArray(value, result); } } else { var tag = getTag(value), isFunc = tag == funcTag || tag == genTag; if (isBuffer(value)) { return cloneBuffer(value, isDeep); } if (tag == objectTag || tag == argsTag || (isFunc && !object)) { if (isHostObject(value)) { return object ? value : {}; } result = initCloneObject(isFunc ? {} : value); if (!isDeep) { return copySymbols(value, baseAssign(result, value)); } } else { if (!cloneableTags[tag]) { return object ? value : {}; } result = initCloneByTag(value, tag, baseClone, isDeep); } } // Check for circular references and return its corresponding clone. stack || (stack = new Stack); var stacked = stack.get(value); if (stacked) { return stacked; } stack.set(value, result); if (!isArr) { var props = isFull ? getAllKeys(value) : keys(value); } arrayEach(props || value, function(subValue, key) { if (props) { key = subValue; subValue = value[key]; } // Recursively populate clone (susceptible to call stack limits). assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack)); }); return result; } /** * The base implementation of `_.create` without support for assigning * properties to the created object. * * @private * @param {Object} prototype The object to inherit from. * @returns {Object} Returns the new object. */ function baseCreate(proto) { return isObject(proto) ? objectCreate(proto) : {}; } /** * 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`. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ function baseGetTag(value) { return objectToString.call(value); } /** * 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) || isHostObject(value)) ? reIsNative : reIsHostCtor; return pattern.test(toSource(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; } /** * Creates a clone of `buffer`. * * @private * @param {Buffer} buffer The buffer to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Buffer} Returns the cloned buffer. */ function cloneBuffer(buffer, isDeep) { if (isDeep) { return buffer.slice(); } var result = new buffer.constructor(buffer.length); buffer.copy(result); return result; } /** * Creates a clone of `arrayBuffer`. * * @private * @param {ArrayBuffer} arrayBuffer The array buffer to clone. * @returns {ArrayBuffer} Returns the cloned array buffer. */ function cloneArrayBuffer(arrayBuffer) { var result = new arrayBuffer.constructor(arrayBuffer.byteLength); new Uint8Array(result).set(new Uint8Array(arrayBuffer)); return result; } /** * Creates a clone of `dataView`. * * @private * @param {Object} dataView The data view to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the cloned data view. */ function cloneDataView(dataView, isDeep) { var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); } /** * Creates a clone of `map`. * * @private * @param {Object} map The map to clone. * @param {Function} cloneFunc The function to clone values. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the cloned map. */ function cloneMap(map, isDeep, cloneFunc) { var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map); return arrayReduce(array, addMapEntry, new map.constructor); } /** * Creates a clone of `regexp`. * * @private * @param {Object} regexp The regexp to clone. * @returns {Object} Returns the cloned regexp. */ function cloneRegExp(regexp) { var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); result.lastIndex = regexp.lastIndex; return result; } /** * Creates a clone of `set`. * * @private * @param {Object} set The set to clone. * @param {Function} cloneFunc The function to clone values. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the cloned set. */ function cloneSet(set, isDeep, cloneFunc) { var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set); return arrayReduce(array, addSetEntry, new set.constructor); } /** * Creates a clone of the `symbol` object. * * @private * @param {Object} symbol The symbol object to clone. * @returns {Object} Returns the cloned symbol object. */ function cloneSymbol(symbol) { return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; } /** * Creates a clone of `typedArray`. * * @private * @param {Object} typedArray The typed array to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the cloned typed array. */ function cloneTypedArray(typedArray, isDeep) { var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); } /** * Copies the values of `source` to `array`. * * @private * @param {Array} source The array to copy values from. * @param {Array} [array=[]] The array to copy values to. * @returns {Array} Returns `array`. */ function copyArray(source, array) { var index = -1, length = source.length; array || (array = Array(length)); while (++index < length) { array[index] = source[index]; } return array; } /** * Copies properties of `source` to `object`. * * @private * @param {Object} source The object to copy properties from. * @param {Array} props The property identifiers to copy. * @param {Object} [object={}] The object to copy properties to. * @param {Function} [customizer] The function to customize copied values. * @returns {Object} Returns `object`. */ function copyObject(source, props, object, customizer) { object || (object = {}); var index = -1, length = props.length; while (++index < length) { var key = props[index]; var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined; assignValue(object, key, newValue === undefined ? source[key] : newValue); } return object; } /** * Copies own symbol properties of `source` to `object`. * * @private * @param {Object} source The object to copy symbols from. * @param {Object} [object={}] The object to copy symbols to. * @returns {Object} Returns `object`. */ function copySymbols(source, object) { return copyObject(source, getSymbols(source), object); } /** * 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; } /** * Creates an array of the own enumerable symbol properties of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray; /** * 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, // for data views in Edge < 14, and promises in Node.js. 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 = objectToString.call(value), Ctor = result == objectTag ? value.constructor : undefined, ctorString = Ctor ? toSource(Ctor) : undefined; 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; }; } /** * Initializes an array clone. * * @private * @param {Array} array The array to clone. * @returns {Array} Returns the initialized clone. */ function initCloneArray(array) { var length = array.length, result = array.constructor(length); // Add properties assigned by `RegExp#exec`. if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { result.index = array.index; result.input = array.input; } return result; } /** * Initializes an object clone. * * @private * @param {Object} object The object to clone. * @returns {Object} Returns the initialized clone. */ function initCloneObject(object) { return (typeof object.constructor == 'function' && !isPrototype(object)) ? baseCreate(getPrototype(object)) : {}; } /** * Initializes an object clone based on its `toStringTag`. * * **Note:** This function only supports cloning values with tags of * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. * * @private * @param {Object} object The object to clone. * @param {string} tag The `toStringTag` of the object to clone. * @param {Function} cloneFunc The function to clone values. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the initialized clone. */ function initCloneByTag(object, tag, cloneFunc, isDeep) { var Ctor = object.constructor; switch (tag) { case arrayBufferTag: return cloneArrayBuffer(object); case boolTag: case dateTag: return new Ctor(+object); case dataViewTag: return cloneDataView(object, isDeep); case float32Tag: case float64Tag: case int8Tag: case int16Tag: case int32Tag: case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: return cloneTypedArray(object, isDeep); case mapTag: return cloneMap(object, isDeep, cloneFunc); case numberTag: case stringTag: return new Ctor(object); case regexpTag: return cloneRegExp(object); case setTag: return cloneSet(object, isDeep, cloneFunc); case symbolTag: return cloneSymbol(object); } } /** * 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 `func` to its source code. * * @private * @param {Function} func The function to process. * @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 ''; } /** * This method is like `_.clone` except that it recursively clones `value`. * * @static * @memberOf _ * @since 1.0.0 * @category Lang * @param {*} value The value to recursively clone. * @returns {*} Returns the deep cloned value. * @see _.clone * @example * * var objects = [{ 'a': 1 }, { 'b': 2 }]; * * var deep = _.cloneDeep(objects); * console.log(deep[0] === objects[0]); * // => false */ function cloneDeep(value) { return baseClone(value, true, true); } /** * 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 */ function isArguments(value) { // Safari 8.1 makes `arguments.callee` enumerable in strict mode. return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); } /** * 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); } /** * This method is like `_.isArrayLike` except that it also checks if `value` * is an object. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an array-like object, * else `false`. * @example * * _.isArrayLikeObject([1, 2, 3]); * // => true * * _.isArrayLikeObject(document.body.children); * // => true * * _.isArrayLikeObject('abc'); * // => false * * _.isArrayLikeObject(_.noop); * // => false */ function isArrayLikeObject(value) { return isObjectLike(value) && isArrayLike(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; /** * 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) { // The use of `Object#toString` avoids issues with the `typeof` operator // in Safari 8-9 which returns 'object' for typed array and other constructors. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } /** * 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 && (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 && typeof value == 'object'; } /** * 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 = cloneDeep; /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }()), __webpack_require__(303)(module))) /***/ }), /* 548 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _src = __webpack_require__(109); var _src2 = _interopRequireDefault(_src); var _dragColumn = __webpack_require__(546); var _dragColumn2 = _interopRequireDefault(_dragColumn); var _beeIcon = __webpack_require__(136); var _beeIcon2 = _interopRequireDefault(_beeIcon); 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); } /** * * @title 拖拽调整列的宽度 * @description 注:不支持tree结构的表头、合并表头的table【目前支持表头拖拽宽度、交互列一起使用】 */ var columns23 = [{ title: "名字", dataIndex: "a", key: "a", width: '200' }, { title: "性别", dataIndex: "b", key: "b", width: '100' }, { title: "年龄", dataIndex: "c", key: "c", width: '200', sumCol: true, sorter: function sorter(a, b) { return a.c - b.c; } }, { title: "武功级别", dataIndex: "d", key: "d", fixed: 'right', width: 200 }]; var data23 = [{ a: "杨过", b: "男", c: 30, d: '内行', key: "2" }, { a: "令狐冲", b: "男", c: 41, d: '大侠', key: "1" }, { a: "郭靖", b: "男", c: 25, d: '大侠', key: "3" }]; var DragColumnTable = (0, _dragColumn2['default'])(_src2['default']); var defaultProps23 = { prefixCls: "bee-table" }; var Demo23 = function (_Component) { _inherits(Demo23, _Component); function Demo23(props) { _classCallCheck(this, Demo23); return _possibleConstructorReturn(this, _Component.call(this, props)); } Demo23.prototype.render = function render() { return _react2['default'].createElement(DragColumnTable, { columns: columns23, data: data23, bordered: true, dragborder: true, draggable: true }); }; return Demo23; }(_react.Component); Demo23.defaultProps = defaultProps23; exports['default'] = Demo23; module.exports = exports['default']; /***/ }), /* 549 */ /***/ (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__(4); var _react2 = _interopRequireDefault(_react); var _src = __webpack_require__(109); var _src2 = _interopRequireDefault(_src); var _beeIcon = __webpack_require__(136); var _beeIcon2 = _interopRequireDefault(_beeIcon); var _beeMenus = __webpack_require__(485); var _beeMenus2 = _interopRequireDefault(_beeMenus); var _beeDropdown = __webpack_require__(476); var _beeDropdown2 = _interopRequireDefault(_beeDropdown); 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); } /** * * @title 动态设置固、取消固定列 * @description 动态设置固、取消固定列 * @description 动态固定列设置 一个table动态设置一个方向【fixed: "left",fixed: "right"】。 * */ var Item = _beeMenus2['default'].Item; // const columns24 = [ // { // title: "Full Name", // width: 100, // dataIndex: "name", // key: "name", // fixed: "left", // }, // { title: "Age", width: 100, dataIndex: "age", key: "age", fixed: "left" }, // { title: "Column 1", dataIndex: "address", key: "1" }, // { title: "Column 2", dataIndex: "address2", key: "2" }, // { title: "Column 3", dataIndex: "address", key: "3" }, // { title: "Column 4", dataIndex: "address", key: "4" }, // { title: "Column 24", dataIndex: "address", key: "24" }, // { title: "Column 6", dataIndex: "address", key: "6" }, // { title: "Column 7", dataIndex: "address", key: "7" }, // { title: "Column 8", dataIndex: "address", key: "8" } // ]; var columns24 = [{ title: "名字", dataIndex: "a", key: "a", width: 100, fixed: "left" }, { title: "性别", dataIndex: "b", key: "b", width: 100, fixed: "left" }, { title: "年龄", dataIndex: "c", key: "c", width: 100 }, { title: "武功级别", dataIndex: "d", key: "d", width: 150 }, { title: "对手", dataIndex: "e", key: "e", width: 100 }, { title: "帮派", dataIndex: "f", key: "f", width: 100 }, { title: "武功类型", dataIndex: "g", key: "g", width: 100 }, { title: "师傅", dataIndex: "k", key: "k" // width: 100 }, { title: "攻击系数", dataIndex: "h", key: "h", width: 100 }]; var data24 = [{ a: "杨过", b: "男", c: 30, d: '内行', e: '黄荣', f: '古墓派', g: '剑术', k: '小龙女', h: '0.5', key: "1" }, { a: "令狐冲", b: "男", c: 41, d: '剑客', e: '自己', f: '无', g: '剑术', k: '无', h: '0.5', key: "2" }, { a: "郭靖", b: "男", c: 25, d: '大侠', e: '黄荣', f: '朝廷', g: '内容', k: '外侵势力', h: '0.6', key: "3" }]; var Demo24 = function (_Component) { _inherits(Demo24, _Component); function Demo24(props) { _classCallCheck(this, Demo24); // let columns = []; // Object.assign(columns,columns24); // columns.forEach(da=>da.onHeadCellClick=this.onHeadCellClick); var _this = _possibleConstructorReturn(this, _Component.call(this, props)); _this.onSelect = function (_ref) { var key = _ref.key, item = _ref.item; console.log(key + ' selected'); //获取key var currentObject = item.props.data; //获取选中对象的数据 var columns = _this.state.columns; var fixedCols = []; var nonColums = []; columns.find(function (da) { if (da.key == key) { da.fixed ? delete da.fixed : da.fixed = 'left'; } da.fixed ? fixedCols.push(da) : nonColums.push(da); }); columns = [].concat(fixedCols, nonColums); _this.setState({ columns: columns }); }; _this.state = { columns: columns24 }; return _this; } //表头增加下拉菜单 Demo24.prototype.renderColumnsDropdown = function renderColumnsDropdown(columns) { var _this2 = this; var icon = 'uf-arrow-down'; return columns.map(function (originColumn, index) { var column = _extends({}, originColumn); var menuInfo = [], title = '锁定'; if (originColumn.fixed) { title = '解锁'; } menuInfo.push({ info: title, key: originColumn.key, index: index }); var menu = _react2['default'].createElement( _beeMenus2['default'], { onSelect: _this2.onSelect }, menuInfo.map(function (da) { return _react2['default'].createElement( Item, { key: da.key, data: da }, da.info ); }) ); column.title = _react2['default'].createElement( 'span', { className: 'title-con drop-menu' }, column.title, _react2['default'].createElement( _beeDropdown2['default'], { trigger: ['click'], overlay: menu, animation: 'slide-up' }, _react2['default'].createElement(_beeIcon2['default'], { type: icon }) ) ); return column; }); }; Demo24.prototype.render = function render() { var columns = this.state.columns; columns = this.renderColumnsDropdown(columns); return _react2['default'].createElement( 'div', { className: 'demo24' }, _react2['default'].createElement(_src2['default'], { columns: columns, data: data24, scroll: { x: "110%", y: 240 } }) ); }; return Demo24; }(_react.Component); exports['default'] = Demo24; module.exports = exports['default']; /***/ }), /* 550 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _src = __webpack_require__(109); var _src2 = _interopRequireDefault(_src); var _multiSelect = __webpack_require__(512); var _multiSelect2 = _interopRequireDefault(_multiSelect); var _filterColumn = __webpack_require__(541); var _filterColumn2 = _interopRequireDefault(_filterColumn); var _dragColumn = __webpack_require__(546); var _dragColumn2 = _interopRequireDefault(_dragColumn); var _sum = __webpack_require__(519); var _sum2 = _interopRequireDefault(_sum); var _beeIcon = __webpack_require__(136); var _beeIcon2 = _interopRequireDefault(_beeIcon); var _beeCheckbox = __webpack_require__(513); var _beeCheckbox2 = _interopRequireDefault(_beeCheckbox); var _beePopover = __webpack_require__(542); var _beePopover2 = _interopRequireDefault(_beePopover); 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); } /** * @title 根据列进行过滤、拖拽交换列综合使用案例 * @description 新增属性【checkMinSize 当前表格显示最少列数 】 1. 当所有列都设置了width属性后,需要给table增加checkMinSize属性 2. 所有列不设置width。 */ /**注: * 在使用过滤列的时候,如果每一列都设置了width属性,勾选的时候回出现重复列问题。当表格的宽度小于合计宽度的时候,就会出现此问题。 * 必须有个别列不设置width属性,即可避免此问题。 */ //Cloumns1 function getCloumns() { var column = [{ title: "序号", dataIndex: "index", key: "index", width: 100 }, { title: "订单编号", dataIndex: "orderCode", key: "orderCode", width: 100 }, { title: "供应商名称", dataIndex: "supplierName", key: "supplierName", width: 100 }, { title: "类型", dataIndex: "type_name", key: "type_name", width: 100 }, { title: "采购组织", dataIndex: "purchasing", key: "purchasing", width: 100 }, { title: "采购组", dataIndex: "purchasingGroup", key: "purchasingGroup", width: 300 }, { title: "凭证日期", dataIndex: "voucherDate", key: "voucherDate", width: 100 }, { title: "审批状态", dataIndex: "approvalState_name", key: "approvalState_name", width: 100 }, { title: "确认状态", dataIndex: "confirmState_name", key: "confirmState_name", width: 100 }, { title: "关闭状态", dataIndex: "closeState_name", key: "closeState_name", width: 100 }, { title: "操作", dataIndex: "d", key: "d", width: 100, fixed: "right", render: function render(text, record, index) { return _react2['default'].createElement( 'div', { className: 'operation-btn' }, _react2['default'].createElement( 'a', { href: '#', tooltip: text, onClick: function onClick() { alert('这是第' + index + '列,内容为:' + text); } }, '\u4E00\u4E9B\u64CD\u4F5C' ) ); } }]; return column; } var dataList = [{ index: 1, orderCode: "2343", supplierName: "xxx", type_name: "123", purchasing: '内行', purchasingGroup: "323", voucherDate: "kkkk", approvalState_name: "vvvv", confirmState_name: "aaaa", closeState_name: "vnnnnn", d: "操作", key: "1" }, { index: 2, _checked: true, orderCode: "222", supplierName: "22xxx", type_name: "1223", purchasing: '内行2', purchasingGroup: "3223", voucherDate: "222kk", approvalState_name: "22vvvv", confirmState_name: "2aaaa", closeState_name: "2vnnnnn", d: "2操作", key: "2" }, { index: 3, orderCode: "222", supplierName: "22xxx", _disabled: true, type_name: "1223", purchasing: '内行2', purchasingGroup: "3223", voucherDate: "222kk", approvalState_name: "22vvvv", confirmState_name: "2aaaa", closeState_name: "2vnnnnn", d: "3操作", key: "3" }, { index: 4, orderCode: "222", supplierName: "22xxx", type_name: "1223", purchasing: '内行2', purchasingGroup: "3223", voucherDate: "222kk", approvalState_name: "22vvvv", confirmState_name: "2aaaa", closeState_name: "2vnnnnn", d: "4操作", key: "4" }]; var DragColumnTable = (0, _filterColumn2['default'])((0, _dragColumn2['default'])((0, _multiSelect2['default'])(_src2['default'], _beeCheckbox2['default'])), _beePopover2['default']); var defaultProps25 = { prefixCls: "bee-table" }; var Demo25 = function (_Component) { _inherits(Demo25, _Component); function Demo25(props) { _classCallCheck(this, Demo25); var _this = _possibleConstructorReturn(this, _Component.call(this, props)); _this.getSelectedDataFunc = function (data) { console.log("data", data); }; _this.getCloumnsScroll = function (columns) { var sum = 0; columns.forEach(function (da) { sum += da.width; }); console.log("sum", sum); return sum; }; _this.selectedRow = function (record, index) {}; return _this; } Demo25.prototype.render = function render() { var columns = getCloumns(); return _react2['default'].createElement( 'div', { className: 'demo25' }, _react2['default'].createElement(DragColumnTable, { columns: columns, data: dataList, getSelectedDataFunc: this.getSelectedDataFunc, bordered: true, checkMinSize: 7, draggable: true, multiSelect: { type: "checkbox" }, scroll: { x: "130%", y: 100 }, selectedRow: this.selectedRow // scroll={{x:this.getCloumnsScroll(columns), y: 150}} }) ); }; return Demo25; }(_react.Component); Demo25.defaultProps = defaultProps25; exports['default'] = Demo25; module.exports = exports['default']; /***/ }), /* 551 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _src = __webpack_require__(109); var _src2 = _interopRequireDefault(_src); 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); } /** * * @title 按条件和值过滤 * @description 可以根据输入项目以及判断条件对表格内的数据进行过滤 * */ var columns26 = [{ title: "姓名", width: 180, dataIndex: "name", key: "name", filterType: "text", filterDropdown: "show" }, { title: "年龄", width: 150, dataIndex: "age", key: "age", filterType: "dropdown", filterDropdown: "show" }, { title: "日期", width: 200, dataIndex: "date", key: "date", filterType: "date", filterDropdown: "show", format: "YYYY-MM-DD" }, { title: "居住地址", width: 150, dataIndex: "address", key: "address", filterType: "dropdown", filterDropdown: "show" }, { title: "备注", dataIndex: "mark", key: "mark" }]; var data26 = [{ key: "1", name: "John Brown", age: 32, date: "2018-09-19", address: "朝阳区", mark: "无" }, { key: "2", name: "Jim Green", age: 40, date: "2018-09-18", address: "朝阳区", mark: "无" }, { key: "3", name: "Jim Green", age: 40, date: "2018-09-18", address: "东城区", mark: "无" }, { key: "4", name: "Jim Green", age: 40, date: "2018-09-18", address: "东城区", mark: "无" }, { key: "5", name: "John Brown", age: 32, date: "2018-09-18", address: "海淀区", mark: "无" }, { key: "6", name: "Jim Green", age: 48, date: "2018-09-18", address: "海淀区", mark: "无" }, { key: "7", name: "Jim Green", age: 40, date: "2018-09-18", address: "海淀区", mark: "无" }, { key: "8", name: "Jim Green", age: 38, date: "2018-09-18", address: "海淀区", mark: "无" }]; var Demo26 = function (_Component) { _inherits(Demo26, _Component); function Demo26() { var _temp, _this, _ret; _classCallCheck(this, Demo26); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.handlerFilterChange = function (key, val, condition) { console.log('参数:key=', key, ' value=', val, 'condition=', condition); }, _this.handlerFilterClear = function (key) { console.log('清除条件', key); }, _temp), _possibleConstructorReturn(_this, _ret); } Demo26.prototype.render = function render() { return _react2['default'].createElement(_src2['default'], { onFilterChange: this.handlerFilterChange //下拉条件的回调(key,val)=>() , onFilterClear: this.handlerFilterClear //触发输入操作以及其他的回调(key,val)=>() , filterDelay: 500 //输入文本多少ms触发回调函数,默认300ms , filterable: true //是否开启过滤数据功能 , bordered: true, columns: columns26, data: data26 }); }; return Demo26; }(_react.Component); exports['default'] = Demo26; module.exports = exports['default']; /***/ }), /* 552 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _src = __webpack_require__(109); var _src2 = _interopRequireDefault(_src); var _MultiSelect = __webpack_require__(553); var _MultiSelect2 = _interopRequireDefault(_MultiSelect); var _sort = __webpack_require__(510); var _sort2 = _interopRequireDefault(_sort); var _beeCheckbox = __webpack_require__(513); var _beeCheckbox2 = _interopRequireDefault(_beeCheckbox); var _beeIcon = __webpack_require__(136); var _beeIcon2 = _interopRequireDefault(_beeIcon); var _beeMenus = __webpack_require__(485); var _beeMenus2 = _interopRequireDefault(_beeMenus); var _beeDropdown = __webpack_require__(476); var _beeDropdown2 = _interopRequireDefault(_beeDropdown); 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); } /** * * @title 组合过滤和其他功能使用 * @description 在过滤数据行的基础上增加列拖拽、动态菜单显示、下拉条件动态传入自定义等 * */ /** * @description */ var Item = _beeMenus2['default'].Item; var SubMenu = _beeMenus2['default'].SubMenu; var MenuItemGroup = _beeMenus2['default'].ItemGroup; var dataList = [{ "key": "1", value: "库存明细", id: "a" }, { "key": "2", value: "订单明细", id: "v" }, { "key": "3", value: "发货明细", id: "c" }]; var data27 = [{ key: "1", name: "John Brown", age: 32, date: "2018-09-19", address: "朝阳区", mark: "无" }, { key: "2", name: "Jim Green", age: 40, date: "2018-09-18", address: "朝阳区", mark: "无" }, { key: "3", name: "Jim Green", age: 40, date: "2018-09-18", address: "东城区", mark: "无" }, { key: "4", name: "Jim Green", age: 40, date: "2018-09-18", address: "东城区", mark: "无" }, { key: "5", name: "John Brown", age: 32, date: "2018-09-18", address: "海淀区", mark: "无" }, { key: "6", name: "Jim Green", age: 48, date: "2018-09-18", address: "海淀区", mark: "无" }, { key: "7", name: "Jim Green", age: 40, date: "2018-09-18", address: "海淀区", mark: "无" }, { key: "8", name: "Jim Green", age: 38, date: "2018-09-18", address: "海淀区", mark: "无" }]; var MultiSelectTable = (0, _MultiSelect2['default'])(_src2['default'], _beeCheckbox2['default']); var ComplexTable = (0, _sort2['default'])(MultiSelectTable, _beeIcon2['default']); var Demo27 = function (_Component) { _inherits(Demo27, _Component); function Demo27(props) { _classCallCheck(this, Demo27); var _this = _possibleConstructorReturn(this, _Component.call(this, props)); _this.handlerFilterChange = function (key, val, condition) { console.log('参数:key=', key, ' value=', val, 'condition=', condition); }; _this.handlerFilterClear = function (key) { console.log('清除条件', key); }; _this.getSelectedDataFunc = function (data) { console.log(data); }; _this.onClick = function (item) { console.log(item); }; _this.state = { dropdownvalue: [] }; return _this; } Demo27.prototype.render = function render() { var menu1 = _react2['default'].createElement( _beeMenus2['default'], { onClick: this.onClick, style: { width: 240 }, mode: 'vertical' }, _react2['default'].createElement( SubMenu, { key: 'sub1', title: _react2['default'].createElement( 'span', null, _react2['default'].createElement( 'span', null, '\u7EC4\u7EC7 1' ) ) }, _react2['default'].createElement( MenuItemGroup, { title: 'Item 1' }, _react2['default'].createElement( _beeMenus2['default'].Item, { key: '1' }, '\u9009\u9879 1' ), _react2['default'].createElement( _beeMenus2['default'].Item, { key: '2' }, '\u9009\u9879 2' ) ), _react2['default'].createElement( MenuItemGroup, { title: 'Iteom 2' }, _react2['default'].createElement( _beeMenus2['default'].Item, { key: '3' }, '\u9009\u9879 3' ), _react2['default'].createElement( _beeMenus2['default'].Item, { key: '4' }, '\u9009\u9879 4' ) ) ) ); var multiObj = { type: "checkbox" }; var columns27 = [{ title: "", width: 40, dataIndex: "key", key: "key", render: function render(text, record, index) { return _react2['default'].createElement( _beeDropdown2['default'], { trigger: ['click'], overlay: menu1, animation: 'slide-up' }, _react2['default'].createElement(_beeIcon2['default'], { style: { "visibility": "hidden" }, type: 'uf-eye' }) ); } }, { title: "姓名", width: 180, dataIndex: "name", key: "name", filterType: "text", //输入框类型 filterDropdown: "show", //显示条件 filterDropdownType: "string" //字符条件 }, { title: "年龄", width: 180, dataIndex: "age", key: "age", filterType: "number", //输入框类型 filterDropdown: "show", //显示条件 filterDropdownType: "number" //字符条件 }, { title: "日期", width: 190, dataIndex: "date", key: "date", filterType: "date", //输入框类型 filterDropdown: "show", //显示条件 filterDropdownType: "string" //字符条件 }, { title: "时间范围", width: 290, dataIndex: "mark", key: "mark", filterType: "daterange", //输入框类型 filterDropdown: "show", //显示条件 filterDropdownType: "number" //字符条件 }, { title: "地址", width: 100, dataIndex: "address", key: "address", filterType: "dropdown", //输入框类型 filterDropdown: "show", //显示条件 filterDropdownType: "number" //字符条件 }]; return _react2['default'].createElement(ComplexTable, { onFilterChange: this.handlerFilterChange //下拉条件的回调(key,val)=>() , onFilterClear: this.handlerFilterClear //触发输入操作以及其他的回调(key,val)=>() , filterDelay: 500 //输入文本多少ms触发回调函数,默认500ms , filterable: true //是否开启过滤数据功能 , getSelectedDataFunc: this.getSelectedDataFunc, bordered: true, multiSelect: multiObj, columns: columns27, data: data27 }); }; return Demo27; }(_react.Component); exports['default'] = Demo27; module.exports = exports['default']; /***/ }), /* 553 */ /***/ (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; }; exports['default'] = multiSelect; var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _beeCheckbox = __webpack_require__(513); var _beeCheckbox2 = _interopRequireDefault(_beeCheckbox); var _util = __webpack_require__(517); 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); } /** * 参数: 过滤表头 * @param {*} Table * @param {*} Checkbox * @param {*} Popover * @param {*} Icon */ function multiSelect(Table, Checkbox) { var _class, _temp, _initialiseProps; return _temp = _class = function (_Component) { _inherits(NewMultiSelect, _Component); function NewMultiSelect(props) { _classCallCheck(this, NewMultiSelect); var _this = _possibleConstructorReturn(this, _Component.call(this, props)); _initialiseProps.call(_this); var obj = _this.getCheckedOrIndeter(props.data); _this.state = _extends({}, obj, { data: (0, _util.ObjectAssign)(props.data) }); return _this; } NewMultiSelect.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { if (this.props.data != nextProps.data) { var obj = this.getCheckedOrIndeter(nextProps.data); this.setState(_extends({}, obj, { data: (0, _util.ObjectAssign)(nextProps.data) })); } }; /** * @param {*} data */ NewMultiSelect.prototype.getCheckedOrIndeter = function getCheckedOrIndeter(data) { var obj = {}; var checkStatus = this.setChecked(data); if (!checkStatus) { obj.checkedAll = false; obj.indeterminate = false; return obj; } if (checkStatus == 'indeter') { obj.indeterminate = true; obj.checkedAll = false; } else if (checkStatus == 'all') { obj.checkedAll = true; obj.indeterminate = false; } return obj; }; /** * 判断数据是否全部选中 * @param {*} data * reutnr string all(全选)、indeter(半选) */ NewMultiSelect.prototype.setChecked = function setChecked(data) { if (!this.isArray(data)) return false; if (data.length == 0) return false; var count = 0; var disabledCount = 0; data.forEach(function (da) { if (da._checked) { count++; } if (da._disabled) { disabledCount++; } }); if (data.length == count + disabledCount) { return "all"; } return count == 0 ? false : "indeter"; }; /** * 判断是否是数组 * @param {*} o */ NewMultiSelect.prototype.isArray = function isArray(o) { return Object.prototype.toString.call(o) == '[object Array]'; }; NewMultiSelect.prototype.render = function render() { var columns = this.props.columns; var data = this.state.data; return _react2['default'].createElement(Table, _extends({}, this.props, { columns: this.getDefaultColumns(columns), data: data })); }; return NewMultiSelect; }(_react.Component), _class.defaultProps = { prefixCls: "u-table-mult-select" }, _initialiseProps = function _initialiseProps() { var _this2 = this; this.onAllCheckChange = function () { var _state = _this2.state, data = _state.data, checkedAll = _state.checkedAll, indeterminate = _state.indeterminate; var check = false; if (checkedAll) { check = false; } else { // if(indeterminate){ // check = true; // }else{ // check = true; // } check = true; } var selectList = []; data.forEach(function (item) { if (!item._disabled) { item._checked = check; } if (item._checked) { selectList.push(item); } }); if (selectList.length > 0) { indeterminate = true; } else { indeterminate = false; } _this2.setState({ indeterminate: indeterminate, checkedAll: check }); _this2.props.getSelectedDataFunc(selectList); }; this.handleClick = function () {}; this.onCheckboxChange = function (text, record, index) { return function () { var data = _this2.state.data; var selectList = []; record._checked = record._checked ? false : true; var obj = _this2.getCheckedOrIndeter(data); _this2.setState(_extends({ data: data }, obj)); data.forEach(function (da) { if (da._checked) { selectList.push(da); } }); _this2.props.getSelectedDataFunc(selectList, record, index); }; }; this.getDefaultColumns = function (columns) { var _state2 = _this2.state, checkedAll = _state2.checkedAll, indeterminate = _state2.indeterminate; var checkAttr = { checked: checkedAll ? true : false }; var data = _this2.props.data; var dataLength = data.length; var disabledCount = 0; indeterminate ? checkAttr.indeterminate = true : ""; //设置表头Checkbox是否可以点击 data.forEach(function (item, index, arr) { if (item._disabled) { disabledCount++; } }); var _defaultColumns = [{ title: _react2['default'].createElement(Checkbox, _extends({ className: 'table-checkbox' }, checkAttr, { disabled: disabledCount == dataLength ? true : false, onChange: _this2.onAllCheckChange })), key: "checkbox", dataIndex: "checkbox", fixed: "left", width: 50, render: function render(text, record, index) { var attr = {}; record._disabled ? attr.disabled = record._disabled : ""; return _react2['default'].createElement(Checkbox, _extends({ key: index, className: 'table-checkbox' }, attr, { checked: record._checked, onClick: _this2.handleClick, onChange: _this2.onCheckboxChange(text, record, index) })); } }]; return _defaultColumns.concat(columns); }; }, _temp; } module.exports = exports['default']; /***/ }), /* 554 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _src = __webpack_require__(109); var _src2 = _interopRequireDefault(_src); var _beeIcon = __webpack_require__(136); var _beeIcon2 = _interopRequireDefault(_beeIcon); var _sort = __webpack_require__(510); var _sort2 = _interopRequireDefault(_sort); 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); } /** * * @title 列排序,后端排序 * */ var ComplexTable = (0, _sort2['default'])(_src2['default'], _beeIcon2['default']); var columns11 = [{ title: "名字", dataIndex: "a", key: "a", width: 100 }, { title: "性别", dataIndex: "b", key: "b", width: 100 }, { title: "年龄", dataIndex: "c", key: "c", width: 200, sorter: function sorter(a, b) { return a.c - b.c; } }, { title: "武功级别", dataIndex: "d", key: "d" }, { title: "分数", dataIndex: "e", key: "e", sorter: function sorter(a, b) { return a.c - b.c; } }]; var data11 = [{ a: "杨过", b: "男", c: 30, d: '内行', e: 139, key: "2" }, { a: "令狐冲", b: "男", c: 41, d: '大侠', e: 109, key: "1" }, { a: "郭靖", b: "男", c: 25, d: '大侠', e: 159, key: "3" }]; var defaultProps = { prefixCls: "bee-table" }; var Demo28 = function (_Component) { _inherits(Demo28, _Component); function Demo28(props) { _classCallCheck(this, Demo28); var _this = _possibleConstructorReturn(this, _Component.call(this, props)); _this.sortFun = function (sortParam) { console.info(sortParam); //将参数传递给后端排序 }; _this.state = { sortOrder: "", data: data11 }; return _this; } /** * 后端获取数据 */ Demo28.prototype.render = function render() { var sortObj = { mode: 'multiple', backSource: true, sortFun: this.sortFun }; return _react2['default'].createElement(ComplexTable, { columns: columns11, data: this.state.data, sort: sortObj }); }; return Demo28; }(_react.Component); Demo28.defaultProps = defaultProps; exports['default'] = Demo28; module.exports = exports['default']; /***/ }), /* 555 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _src = __webpack_require__(109); var _src2 = _interopRequireDefault(_src); var _beeModal = __webpack_require__(556); var _beeModal2 = _interopRequireDefault(_beeModal); var _beeButton = __webpack_require__(82); var _beeButton2 = _interopRequireDefault(_beeButton); 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); } /** * * @title 从弹出框内显示过滤行并且设置可选下拉条件 * @description 通过Modal组件来展示表格的过滤相关能力,并且通过filterDropdownIncludeKeys设置可选条件 * */ var columns29 = [{ title: "姓名", width: 180, dataIndex: "name", key: "name", filterType: "text", filterDropdown: "show", filterDropdownIncludeKeys: ['LIKE', 'EQ'] }, { title: "年龄", width: 170, dataIndex: "age", key: "age", filterType: "number", filterDropdown: "show", filterDropdownType: "number", filterDropdownIncludeKeys: ['EQ'], filterInputNumberOptions: { max: 200, min: 0, step: 1, precision: 0 } }, { title: "日期", width: 200, dataIndex: "date", key: "date", filterType: "date", filterDropdown: "show", format: "YYYY-MM-DD" }]; var data29 = [{ key: "1", name: "John Brown", age: 32, date: "2018-09-19", address: "朝阳区", mark: "无" }, { key: "2", name: "Jim Green", age: 40, date: "2018-09-18", address: "朝阳区", mark: "无" }, { key: "3", name: "Jim Green", age: 40, date: "2018-09-18", address: "东城区", mark: "无" }, { key: "4", name: "Jim Green", age: 40, date: "2018-09-18", address: "东城区", mark: "无" }, { key: "5", name: "John Brown", age: 32, date: "2018-09-18", address: "海淀区", mark: "无" }, { key: "6", name: "Jim Green", age: 48, date: "2018-09-18", address: "海淀区", mark: "无" }, { key: "7", name: "Jim Green", age: 40, date: "2018-09-18", address: "海淀区", mark: "无" }, { key: "8", name: "Jim Green", age: 38, date: "2018-09-18", address: "海淀区", mark: "无" }]; var Demo29 = function (_Component) { _inherits(Demo29, _Component); function Demo29() { _classCallCheck(this, Demo29); var _this = _possibleConstructorReturn(this, _Component.call(this)); _this.handlerFilterChange = function (key, val, condition) { console.log('参数:key=', key, ' value=', val, 'condition=', condition); }; _this.handlerFilterClear = function (key) { console.log('清除条件', key); }; _this.state = { show: false }; _this.close = _this.close.bind(_this); _this.open = _this.open.bind(_this); return _this; } Demo29.prototype.close = function close() { this.setState({ show: false }); }; Demo29.prototype.open = function open() { this.setState({ show: true }); }; Demo29.prototype.render = function render() { return _react2['default'].createElement( 'div', null, _react2['default'].createElement( _beeModal2['default'], { show: this.state.show, onHide: this.close, autoFocus: false, enforceFocus: false }, _react2['default'].createElement( _beeModal2['default'].Header, { closeButton: true }, _react2['default'].createElement( _beeModal2['default'].Title, null, '\u8FC7\u6EE4\u884C' ) ), _react2['default'].createElement( _beeModal2['default'].Body, null, _react2['default'].createElement(_src2['default'], { onFilterChange: this.handlerFilterChange //下拉条件的回调(key,val)=>() , onFilterClear: this.handlerFilterClear //触发输入操作以及其他的回调(key,val)=>() , filterDelay: 500 //输入文本多少ms触发回调函数,默认300ms , filterable: true //是否开启过滤数据功能 , bordered: true, columns: columns29, data: data29 }) ) ), _react2['default'].createElement( _beeButton2['default'], { colors: 'primary', onClick: this.open }, '\u663E\u793A\u8868\u683C' ) ); }; return Demo29; }(_react.Component); exports['default'] = Demo29; module.exports = exports['default']; /***/ }), /* 556 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _Modal = __webpack_require__(557); var _Modal2 = _interopRequireDefault(_Modal); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } exports["default"] = _Modal2["default"]; module.exports = exports['default']; /***/ }), /* 557 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); 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 _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 _events = __webpack_require__(558); var _events2 = _interopRequireDefault(_events); var _ownerDocument = __webpack_require__(75); var _ownerDocument2 = _interopRequireDefault(_ownerDocument); var _inDOM = __webpack_require__(15); var _inDOM2 = _interopRequireDefault(_inDOM); var _scrollbarSize = __webpack_require__(562); var _scrollbarSize2 = _interopRequireDefault(_scrollbarSize); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _reactDom = __webpack_require__(12); var _reactDom2 = _interopRequireDefault(_reactDom); var _Modal = __webpack_require__(563); var _Modal2 = _interopRequireDefault(_Modal); var _isOverflowing = __webpack_require__(569); var _isOverflowing2 = _interopRequireDefault(_isOverflowing); var _tinperBeeCore = __webpack_require__(27); var _beeTransition = __webpack_require__(10); var _ModalBody = __webpack_require__(573); var _ModalBody2 = _interopRequireDefault(_ModalBody); var _ModalDialog = __webpack_require__(574); var _ModalDialog2 = _interopRequireDefault(_ModalDialog); var _ModalFooter = __webpack_require__(575); var _ModalFooter2 = _interopRequireDefault(_ModalFooter); var _ModalHeader = __webpack_require__(576); var _ModalHeader2 = _interopRequireDefault(_ModalHeader); var _ModalTitle = __webpack_require__(577); var _ModalTitle2 = _interopRequireDefault(_ModalTitle); var _propTypes = __webpack_require__(5); 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 = _extends({}, _Modal2["default"].propTypes, _ModalDialog2["default"].propTypes, { /** * 是否弹出遮罩层/遮罩层点击是否触发关闭 */ 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, /** * 要添加到的元素 */ 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"], clsPrefix: 'u-modal' }); 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, 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), 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), 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), onClick: backdrop === true && !!backdropClosable ? this.handleDialogClick : null, size: size }), children ) ); }; return Modal; }(_react2["default"].Component); 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; module.exports = exports['default']; /***/ }), /* 558 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(14); exports.__esModule = true; exports.default = void 0; var _on = _interopRequireDefault(__webpack_require__(16)); exports.on = _on.default; var _off = _interopRequireDefault(__webpack_require__(77)); exports.off = _off.default; var _filter = _interopRequireDefault(__webpack_require__(559)); exports.filter = _filter.default; var _listen = _interopRequireDefault(__webpack_require__(561)); exports.listen = _listen.default; var _default = { on: _on.default, off: _off.default, filter: _filter.default, listen: _listen.default }; exports.default = _default; /***/ }), /* 559 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(14); exports.__esModule = true; exports.default = filterEvents; var _contains = _interopRequireDefault(__webpack_require__(88)); var _querySelectorAll = _interopRequireDefault(__webpack_require__(560)); function filterEvents(selector, handler) { return function filterHandler(e) { var top = e.currentTarget, target = e.target, matches = (0, _querySelectorAll.default)(top, selector); if (matches.some(function (match) { return (0, _contains.default)(match, target); })) handler.call(this, e); }; } module.exports = exports["default"]; /***/ }), /* 560 */ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports.default = qsa; // Zepto.js // (c) 2010-2015 Thomas Fuchs // Zepto.js may be freely distributed under the MIT license. var simpleSelectorRE = /^[\w-]*$/; var toArray = Function.prototype.bind.call(Function.prototype.call, [].slice); function qsa(element, selector) { var maybeID = selector[0] === '#', maybeClass = selector[0] === '.', nameOnly = maybeID || maybeClass ? selector.slice(1) : selector, isSimple = simpleSelectorRE.test(nameOnly), found; if (isSimple) { if (maybeID) { element = element.getElementById ? element : document; return (found = element.getElementById(nameOnly)) ? [found] : []; } if (element.getElementsByClassName && maybeClass) return toArray(element.getElementsByClassName(nameOnly)); return toArray(element.getElementsByTagName(selector)); } return toArray(element.querySelectorAll(selector)); } module.exports = exports["default"]; /***/ }), /* 561 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(14); exports.__esModule = true; exports.default = void 0; var _inDOM = _interopRequireDefault(__webpack_require__(15)); var _on = _interopRequireDefault(__webpack_require__(16)); var _off = _interopRequireDefault(__webpack_require__(77)); var listen = function listen() {}; if (_inDOM.default) { listen = function listen(node, eventName, handler, capture) { (0, _on.default)(node, eventName, handler, capture); return function () { (0, _off.default)(node, eventName, handler, capture); }; }; } var _default = listen; exports.default = _default; module.exports = exports["default"]; /***/ }), /* 562 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(14); exports.__esModule = true; exports.default = scrollbarSize; var _inDOM = _interopRequireDefault(__webpack_require__(15)); var size; function scrollbarSize(recalc) { if (!size && size !== 0 || recalc) { if (_inDOM.default) { var scrollDiv = document.createElement('div'); scrollDiv.style.position = 'absolute'; scrollDiv.style.top = '-9999px'; scrollDiv.style.width = '50px'; scrollDiv.style.height = '50px'; scrollDiv.style.overflow = 'scroll'; document.body.appendChild(scrollDiv); size = scrollDiv.offsetWidth - scrollDiv.clientWidth; document.body.removeChild(scrollDiv); } } return size; } module.exports = exports["default"]; /***/ }), /* 563 */ /***/ (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__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _warning = __webpack_require__(32); var _warning2 = _interopRequireDefault(_warning); var _tinperBeeCore = __webpack_require__(27); var _Portal = __webpack_require__(89); var _Portal2 = _interopRequireDefault(_Portal); var _ModalManager = __webpack_require__(564); var _ModalManager2 = _interopRequireDefault(_ModalManager); var _ownerDocument = __webpack_require__(74); var _ownerDocument2 = _interopRequireDefault(_ownerDocument); var _addEventListener = __webpack_require__(76); var _addEventListener2 = _interopRequireDefault(_addEventListener); var _addFocusListener = __webpack_require__(571); var _addFocusListener2 = _interopRequireDefault(_addFocusListener); var _inDOM = __webpack_require__(15); var _inDOM2 = _interopRequireDefault(_inDOM); var _activeElement = __webpack_require__(572); var _activeElement2 = _interopRequireDefault(_activeElement); var _contains = __webpack_require__(88); var _contains2 = _interopRequireDefault(_contains); var _getContainer = __webpack_require__(90); 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']; /***/ }), /* 564 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _style = __webpack_require__(18); var _style2 = _interopRequireDefault(_style); var _class = __webpack_require__(565); var _class2 = _interopRequireDefault(_class); var _scrollbarSize = __webpack_require__(562); var _scrollbarSize2 = _interopRequireDefault(_scrollbarSize); var _isOverflowing = __webpack_require__(569); var _isOverflowing2 = _interopRequireDefault(_isOverflowing); var _manageAriaHidden = __webpack_require__(570); 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 findIndexOf(arr, cb) { var idx = -1; arr.some(function (d, i) { if (cb(d, i)) { idx = i; return true; } }); return idx; } //查找容器 function findContainer(data, modal) { return findIndexOf(data, function (d) { return d.modals.indexOf(modal) !== -1; }); } //设置容器style function setContainerStyle(state, container) { var style = { overflow: 'hidden' }; state.style = { overflow: container.style.overflow, paddingRight: container.style.paddingRight }; if (state.overflowing) { //设置内边距,和添加滚动条宽度 style.paddingRight = parseInt((0, _style2["default"])(container, 'paddingRight') || 0, 10) + (0, _scrollbarSize2["default"])() + 'px'; } (0, _style2["default"])(container, style); } //移除容器style function removeContainerStyle(_ref, container) { var style = _ref.style; Object.keys(style).forEach(function (key) { return container.style[key] = style[key]; }); } /** * 容器的正确状态管理和那些容器中的模态。 */ var ModalManager = function () { function ModalManager() { var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, _ref2$hideSiblingNode = _ref2.hideSiblingNodes, hideSiblingNodes = _ref2$hideSiblingNode === undefined ? true : _ref2$hideSiblingNode, _ref2$handleContainer = _ref2.handleContainerOverflow, handleContainerOverflow = _ref2$handleContainer === undefined ? true : _ref2$handleContainer; _classCallCheck(this, ModalManager); this.hideSiblingNodes = hideSiblingNodes; this.handleContainerOverflow = handleContainerOverflow; this.modals = []; this.containers = []; this.data = []; } ModalManager.prototype.add = function add(modal, container, className) { var modalIdx = this.modals.indexOf(modal); var containerIdx = this.containers.indexOf(container); if (modalIdx !== -1) { return modalIdx; } modalIdx = this.modals.length; this.modals.push(modal); if (this.hideSiblingNodes) { (0, _manageAriaHidden.hideSiblings)(container, modal.mountNode); } if (containerIdx !== -1) { this.data[containerIdx].modals.push(modal); return modalIdx; } var data = { modals: [modal], //right now only the first modal of a container will have its classes applied classes: className ? className.split(/\s+/) : [], overflowing: (0, _isOverflowing2["default"])(container) }; if (this.handleContainerOverflow) { setContainerStyle(data, container); } data.classes.forEach(_class2["default"].addClass.bind(null, container)); this.containers.push(container); this.data.push(data); return modalIdx; }; ModalManager.prototype.remove = function remove(modal) { var modalIdx = this.modals.indexOf(modal); if (modalIdx === -1) { return; } var containerIdx = findContainer(this.data, modal); var data = this.data[containerIdx]; var container = this.containers[containerIdx]; data.modals.splice(data.modals.indexOf(modal), 1); this.modals.splice(modalIdx, 1); // if that was the last modal in a container, // clean up the container if (data.modals.length === 0) { data.classes.forEach(_class2["default"].removeClass.bind(null, container)); if (this.handleContainerOverflow) { removeContainerStyle(data, container); } if (this.hideSiblingNodes) { (0, _manageAriaHidden.showSiblings)(container, modal.mountNode); } this.containers.splice(containerIdx, 1); this.data.splice(containerIdx, 1); } else if (this.hideSiblingNodes) { //otherwise make sure the next top modal is visible to a SR (0, _manageAriaHidden.ariaHidden)(false, data.modals[data.modals.length - 1].mountNode); } }; ModalManager.prototype.isTopModal = function isTopModal(modal) { return !!this.modals.length && this.modals[this.modals.length - 1] === modal; }; return ModalManager; }(); exports["default"] = ModalManager; module.exports = exports['default']; /***/ }), /* 565 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(14); exports.__esModule = true; exports.default = void 0; var _addClass = _interopRequireDefault(__webpack_require__(566)); exports.addClass = _addClass.default; var _removeClass = _interopRequireDefault(__webpack_require__(568)); exports.removeClass = _removeClass.default; var _hasClass = _interopRequireDefault(__webpack_require__(567)); exports.hasClass = _hasClass.default; var _default = { addClass: _addClass.default, removeClass: _removeClass.default, hasClass: _hasClass.default }; exports.default = _default; /***/ }), /* 566 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(14); exports.__esModule = true; exports.default = addClass; var _hasClass = _interopRequireDefault(__webpack_require__(567)); function addClass(element, className) { if (element.classList) element.classList.add(className);else if (!(0, _hasClass.default)(element, className)) if (typeof element.className === 'string') element.className = element.className + ' ' + className;else element.setAttribute('class', (element.className && element.className.baseVal || '') + ' ' + className); } module.exports = exports["default"]; /***/ }), /* 567 */ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports.default = hasClass; function hasClass(element, className) { if (element.classList) return !!className && element.classList.contains(className);else return (" " + (element.className.baseVal || element.className) + " ").indexOf(" " + className + " ") !== -1; } module.exports = exports["default"]; /***/ }), /* 568 */ /***/ (function(module, exports) { 'use strict'; function replaceClassName(origClass, classToRemove) { return origClass.replace(new RegExp('(^|\\s)' + classToRemove + '(?:\\s|$)', 'g'), '$1').replace(/\s+/g, ' ').replace(/^\s*|\s*$/g, ''); } module.exports = function removeClass(element, className) { if (element.classList) element.classList.remove(className);else if (typeof element.className === 'string') element.className = replaceClassName(element.className, className);else element.setAttribute('class', replaceClassName(element.className && element.className.baseVal || '', className)); }; /***/ }), /* 569 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = isOverflowing; var _isWindow = __webpack_require__(97); var _isWindow2 = _interopRequireDefault(_isWindow); var _ownerDocument = __webpack_require__(75); 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']; /***/ }), /* 570 */ /***/ (function(module, exports) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.ariaHidden = ariaHidden; exports.hideSiblings = hideSiblings; exports.showSiblings = showSiblings; var BLACKLIST = ['template', 'script', 'style']; var isHidable = function isHidable(_ref) { var nodeType = _ref.nodeType, tagName = _ref.tagName; return nodeType === 1 && BLACKLIST.indexOf(tagName.toLowerCase()) === -1; }; var siblings = function siblings(container, mount, cb) { mount = [].concat(mount); [].forEach.call(container.children, function (node) { if (mount.indexOf(node) === -1 && isHidable(node)) { cb(node); } }); }; function ariaHidden(show, node) { if (!node) { return; } if (show) { node.setAttribute('aria-hidden', 'true'); } else { node.removeAttribute('aria-hidden'); } } function hideSiblings(container, mountNode) { siblings(container, mountNode, function (node) { return ariaHidden(true, node); }); } function showSiblings(container, mountNode) { siblings(container, mountNode, function (node) { return ariaHidden(false, node); }); } /***/ }), /* 571 */ /***/ (function(module, exports) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = addFocusListener; /** * Firefox doesn't have a focusin event so using capture is easiest way to get bubbling * IE8 can't do addEventListener, but does have onfocusin, so we use that in ie8 * * We only allow one Listener at a time to avoid stack overflows */ function addFocusListener(handler) { var useFocusin = !document.addEventListener; var remove = void 0; if (useFocusin) { document.attachEvent('onfocusin', handler); remove = function remove() { return document.detachEvent('onfocusin', handler); }; } else { document.addEventListener('focus', handler, true); remove = function remove() { return document.removeEventListener('focus', handler, true); }; } return { remove: remove }; } module.exports = exports['default']; /***/ }), /* 572 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(14); exports.__esModule = true; exports.default = activeElement; var _ownerDocument = _interopRequireDefault(__webpack_require__(75)); function activeElement(doc) { if (doc === void 0) { doc = (0, _ownerDocument.default)(); } try { return doc.activeElement; } catch (e) { /* ie throws if no active element */ } } module.exports = exports["default"]; /***/ }), /* 573 */ /***/ (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__(4); var _react2 = _interopRequireDefault(_react); var _tinperBeeCore = __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 _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: _tinperBeeCore.elementType }; var defaultProps = { componentClass: 'div', clsPrefix: 'u-modal-body' }; var ModalBody = function (_React$Component) { _inherits(ModalBody, _React$Component); function ModalBody() { _classCallCheck(this, ModalBody); return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); } ModalBody.prototype.render = function render() { var _props = this.props, Component = _props.componentClass, clsPrefix = _props.clsPrefix, className = _props.className, props = _objectWithoutProperties(_props, ['componentClass', 'clsPrefix', 'className']); var classes = {}; classes['' + clsPrefix] = true; return _react2["default"].createElement(Component, _extends({}, props, { className: (0, _classnames2["default"])(className, classes) })); }; return ModalBody; }(_react2["default"].Component); ModalBody.propTypes = propTypes; ModalBody.defaultProps = defaultProps; exports["default"] = ModalBody; module.exports = exports['default']; /***/ }), /* 574 */ /***/ (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__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); 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 = { /** * 传给dialog的classname */ dialogClassName: _propTypes2["default"].string, contentStyle: _propTypes2["default"].object }; var defaultProps = { clsPrefix: 'u-modal' }; var ModalDialog = function (_React$Component) { _inherits(ModalDialog, _React$Component); function ModalDialog() { _classCallCheck(this, ModalDialog); return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); } ModalDialog.prototype.render = function render() { var _dialogClasses; var _props = this.props, dialogClassName = _props.dialogClassName, className = _props.className, clsPrefix = _props.clsPrefix, size = _props.size, style = _props.style, contentStyle = _props.contentStyle, children = _props.children, props = _objectWithoutProperties(_props, ['dialogClassName', 'className', 'clsPrefix', 'size', 'style', 'contentStyle', 'children']); // const [bsProps, elementProps] = splitBsProps(props); // var uClassName = _defineProperty({}, '' + clsPrefix, true); var modalStyle = { display: 'block' }; var dialogClasses = (_dialogClasses = {}, _defineProperty(_dialogClasses, uClassName, false), _defineProperty(_dialogClasses, clsPrefix + '-dialog', true), _dialogClasses); if (size) { dialogClasses[clsPrefix + '-' + size] = true; } return _react2["default"].createElement( 'div', _extends({}, props, { tabIndex: '-1', role: 'dialog', style: modalStyle, className: (0, _classnames2["default"])(className, uClassName) }), _react2["default"].createElement( 'div', { className: (0, _classnames2["default"])(dialogClassName, dialogClasses), style: style }, _react2["default"].createElement( 'div', { style: contentStyle, className: (0, _classnames2["default"])([clsPrefix + '-content']), role: 'document' }, children ) ) ); }; return ModalDialog; }(_react2["default"].Component); ModalDialog.propTypes = propTypes; ModalDialog.defaultProps = defaultProps; exports["default"] = ModalDialog; module.exports = exports['default']; /***/ }), /* 575 */ /***/ (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__(4); var _react2 = _interopRequireDefault(_react); var _tinperBeeCore = __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 _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: _tinperBeeCore.elementType }; var defaultProps = { componentClass: 'div', clsPrefix: 'u-modal-footer' }; var ModalFooter = function (_React$Component) { _inherits(ModalFooter, _React$Component); function ModalFooter() { _classCallCheck(this, ModalFooter); return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); } ModalFooter.prototype.render = function render() { var _props = this.props, Component = _props.componentClass, clsPrefix = _props.clsPrefix, className = _props.className, props = _objectWithoutProperties(_props, ['componentClass', 'clsPrefix', 'className']); var classes = {}; classes['' + clsPrefix] = true; return _react2["default"].createElement(Component, _extends({}, props, { className: (0, _classnames2["default"])(className, classes) })); }; return ModalFooter; }(_react2["default"].Component); ModalFooter.propTypes = propTypes; ModalFooter.defaultProps = defaultProps; exports["default"] = ModalFooter; module.exports = exports['default']; /***/ }), /* 576 */ /***/ (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__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _tinperBeeCore = __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 _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 = { /** * 是否显示关闭按钮 */ closeButton: _propTypes2["default"].bool, /** * 关闭时的钩子函数 */ onHide: _propTypes2["default"].func }; var defaultProps = { 'aria-label': 'Close', closeButton: false, clsPrefix: 'u-modal-header' }; var contextTypes = { $u_modal: _propTypes2["default"].shape({ onHide: _propTypes2["default"].func }) }; var ModalHeader = function (_React$Component) { _inherits(ModalHeader, _React$Component); function ModalHeader() { _classCallCheck(this, ModalHeader); return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); } ModalHeader.prototype.render = function render() { var _props = this.props, label = _props['aria-label'], closeButton = _props.closeButton, onHide = _props.onHide, className = _props.className, clsPrefix = _props.clsPrefix, children = _props.children, props = _objectWithoutProperties(_props, ['aria-label', 'closeButton', 'onHide', 'className', 'clsPrefix', 'children']); var modal = this.context.$u_modal; var classes = {}; classes['' + clsPrefix] = true; return _react2["default"].createElement( 'div', _extends({}, props, { className: (0, _classnames2["default"])(className, classes) }), closeButton && _react2["default"].createElement( 'button', { type: 'button', className: 'u-close', 'aria-label': label, onClick: (0, _tinperBeeCore.createChainedFunction)(modal.onHide, onHide) }, _react2["default"].createElement( 'span', { 'aria-hidden': 'true' }, _react2["default"].createElement('i', { className: 'uf uf-close' }) ) ), children ); }; return ModalHeader; }(_react2["default"].Component); ModalHeader.propTypes = propTypes; ModalHeader.defaultProps = defaultProps; ModalHeader.contextTypes = contextTypes; exports["default"] = ModalHeader; module.exports = exports['default']; /***/ }), /* 577 */ /***/ (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__(4); var _react2 = _interopRequireDefault(_react); var _tinperBeeCore = __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 _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: _tinperBeeCore.elementType }; var defaultProps = { componentClass: 'h4', clsPrefix: 'u-modal-title' }; var ModalTitle = function (_React$Component) { _inherits(ModalTitle, _React$Component); function ModalTitle() { _classCallCheck(this, ModalTitle); return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); } ModalTitle.prototype.render = function render() { var _props = this.props, Component = _props.componentClass, className = _props.className, clsPrefix = _props.clsPrefix, props = _objectWithoutProperties(_props, ['componentClass', 'className', 'clsPrefix']); var classes = {}; classes['' + clsPrefix] = true; return _react2["default"].createElement(Component, _extends({}, props, { className: (0, _classnames2["default"])(className, classes) })); }; return ModalTitle; }(_react2["default"].Component); ModalTitle.propTypes = propTypes; ModalTitle.defaultProps = defaultProps; exports["default"] = ModalTitle; module.exports = exports['default']; /***/ }), /* 578 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _beeButton = __webpack_require__(82); var _beeButton2 = _interopRequireDefault(_beeButton); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _src = __webpack_require__(109); var _src2 = _interopRequireDefault(_src); 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); } /** * * @title 表头分组并自定义表头高度 * @description columns[n] 可以内嵌 children,以渲染分组表头。 * 自定义表头高度需要传headerHeight,注:修改th的padding top和bottom置为0,否则会有影响 * */ var ColumnGroup = _src2["default"].ColumnGroup, Column = _src2["default"].Column; var columns = [{ title: "Name", dataIndex: "name", key: "name", width: 100, fixed: "left" }, { title: "Other", width: 600, children: [{ title: "Age", dataIndex: "age", key: "age", width: 200 }, { title: "Address", children: [{ title: "Street", dataIndex: "street", key: "street", width: 200 }, { title: "Block", children: [{ title: "Building", dataIndex: "building", key: "building", width: 100 }, { title: "Door No.", dataIndex: "number", key: "number", width: 100 }] }] }] }, { title: "Company", width: 400, children: [{ title: "Company Address", dataIndex: "companyAddress", key: "companyAddress", width: 200 }, { title: "Company Name", dataIndex: "companyName", key: "companyName", width: 200 }] }, { title: "Gender", dataIndex: "gender", key: "gender", width: 60, fixed: "right" }]; var data = []; for (var i = 0; i < 20; i++) { data.push({ key: i, name: "John Brown", age: i + 1, street: "Lake Park", building: "C", number: 2035, companyAddress: "Lake Street 42", companyName: "SoftLake Co", gender: "M" }); } var Demo3 = function (_Component) { _inherits(Demo3, _Component); function Demo3() { _classCallCheck(this, Demo3); return _possibleConstructorReturn(this, _Component.apply(this, arguments)); } Demo3.prototype.render = function render() { return _react2["default"].createElement(_src2["default"], { className: 'demo3', columns: columns, data: data, headerHeight: 40 //自定义表头高度 , bordered: true, scroll: { y: 240 } }); }; return Demo3; }(_react.Component); exports["default"] = Demo3; module.exports = exports["default"]; /***/ }), /* 579 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _beeTooltip = __webpack_require__(85); var _beeTooltip2 = _interopRequireDefault(_beeTooltip); var _src = __webpack_require__(109); var _src2 = _interopRequireDefault(_src); var _bigData = __webpack_require__(580); var _bigData2 = _interopRequireDefault(_bigData); 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 _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); } } /** * * @title 大数据加载 * 【Tooltip】 * @description */ var BigDataTable = (0, _bigData2["default"])(_src2["default"]); var columns = [{ title: '序号', dataIndex: 'index', width: '50', render: function render(text, record, index) { return index; }, fixed: 'left' }, { title: "用户名", dataIndex: "a", key: "a", width: 580, className: "rowClassName", render: function render(text, record, index) { return _react2["default"].createElement( _beeTooltip2["default"], { inverse: true, overlay: text }, _react2["default"].createElement( "span", { tootip: text, style: { display: "inline-block", width: "80px", textOverflow: "ellipsis", overflow: "hidden", whiteSpace: "nowrap", verticalAlign: "middle" } }, text ) ); } }, { id: "123", title: "性别", dataIndex: "b", key: "b", width: 80 }, { title: "年龄", dataIndex: "c", key: "c", width: 200 }, { title: "操作", dataIndex: "d", key: "d", fixed: 'right', render: function render(text, record, index) { return _react2["default"].createElement( "div", { style: { position: 'relative' }, title: text }, _react2["default"].createElement( "a", { href: "javascript:;", tooltip: text, onClick: function onClick() { alert('这是第' + index + '列,内容为:' + text); } }, "\u4E00\u4E9B\u64CD\u4F5C" ) ); } }]; var data = [].concat(_toConsumableArray(new Array(10000))).map(function (e, i) { var rs = { a: i + 'a', b: i + 'b', c: i + 'c', d: i + 'd', key: i }; if (i % 3 == 0) { rs.b = '女'; } return rs; }); var Demo30 = function (_Component) { _inherits(Demo30, _Component); function Demo30(props) { _classCallCheck(this, Demo30); var _this = _possibleConstructorReturn(this, _Component.call(this, props)); _this.state = { data: data, selectedRowIndex: 0 }; return _this; } Demo30.prototype.render = function render() { return _react2["default"].createElement(BigDataTable, { columns: columns, data: data, parentNodeId: "parent", scroll: { y: 300 }, height: 40, onRowClick: function onRowClick(record, index, indent) { console.log('currentIndex--' + index); } }); }; return Demo30; }(_react.Component); exports["default"] = Demo30; module.exports = exports["default"]; /***/ }), /* 580 */ /***/ (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; }; exports['default'] = bigData; var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); 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); } var defaultHeight = 40; var rowDiff = 3; //行差值 function bigData(Table) { var _class, _temp, _initialiseProps; return _temp = _class = function (_Component) { _inherits(BigData, _Component); function BigData(props) { _classCallCheck(this, BigData); var _this2 = _possibleConstructorReturn(this, _Component.call(this, props)); _initialiseProps.call(_this2); _this2.state = { scrollLeft: 0, scrollTop: 0 }; var rowHeight = _this2.props.height ? _this2.props.height : defaultHeight; //默认显示25条,rowsInView根据定高算的。在非固定高下,这个只是一个大概的值。 var scrollY = _this2.props.scroll.y ? parseInt(_this2.props.scroll.y) : 0; _this2.rowsInView = scrollY ? Math.ceil(scrollY / rowHeight) : 20; _this2.currentIndex = 0; _this2.loadCount = props.loadBuffer ? _this2.rowsInView + props.loadBuffer * 2 : 26; //一次加载多少数据 _this2.cachedRowHeight = []; //缓存每行的高度 _this2.lastScrollTop = 0; _this2.currentScrollTop = 0; _this2.startIndex = _this2.currentIndex; //数据开始位置 _this2.endIndex = _this2.currentIndex + _this2.loadCount; //数据结束位置 _this2.setRowHeight = _this2.setRowHeight.bind(_this2); return _this2; } /** *获取数据区高度 * * **/ BigData.prototype.getContentHeight = function getContentHeight() { if (!this.props.data) return 0; return this.getSumHeight(0, this.props.data.length); }; BigData.prototype.getSumHeight = function getSumHeight(start, end) { var height = this.props.height; var rowHeight = height ? height : defaultHeight; var sumHeight = 0; for (var i = start; i < end; i++) { sumHeight += this.cachedRowHeight[i] || rowHeight; } return sumHeight; }; /** *@description 根据返回的scrollTop计算当前的索引。此处做了两次缓存一个是根据上一次的currentIndex计算当前currentIndex。另一个是根据当前内容区的数据是否在缓存中如果在则不重新render页面 *@param 最新一次滚动的scrollTop */ BigData.prototype.setRowHeight = function setRowHeight(height, index) { this.cachedRowHeight[index] = height; }; BigData.prototype.render = function render() { var data = this.props.data; var scrollTop = this.scrollTop; var endIndex = this.endIndex, startIndex = this.startIndex; var lazyLoad = { preHeight: this.getSumHeight(0, startIndex), sufHeight: this.getSumHeight(endIndex, data.length), startIndex: startIndex }; return _react2['default'].createElement(Table, _extends({}, this.props, { data: data.slice(startIndex, endIndex), lazyLoad: lazyLoad, handleScroll: this.handleScroll, scrollTop: scrollTop, setRowHeight: this.setRowHeight // className={'lazy-table'} })); }; return BigData; }(_react.Component), _class.defaultProps = { data: [], loadBuffer: 5 }, _class.propTypes = { loadBuffer: _propTypes2['default'].number }, _initialiseProps = function _initialiseProps() { var _this3 = this; this.handleScroll = function (nextScrollTop) { var _this = _this3; var _this$props = _this.props, data = _this$props.data, height = _this$props.height, _this$props$scroll = _this$props.scroll, scroll = _this$props$scroll === undefined ? {} : _this$props$scroll, loadBuffer = _this$props.loadBuffer; var rowHeight = height ? height : defaultHeight; var _this$currentIndex = _this.currentIndex, currentIndex = _this$currentIndex === undefined ? 0 : _this$currentIndex, loadCount = _this.loadCount, scrollTop = _this.scrollTop, currentScrollTop = _this.currentScrollTop; var endIndex = _this.endIndex, startIndex = _this.startIndex; var needRender = _this.state.needRender; var viewHeight = parseInt(scroll.y); // let index = currentIndex;//记录下次当前位置 // let temp = currentIndex ?nextScrollTop - currentScrollTop:nextScrollTop; // const isOrder = temp > 0 ?true:false;//true为向下滚动、false为向上滚动 // //根据scrollTop计算下次当前索引的位置 // if(isOrder){ // while (temp > 0) { // temp -= this.cachedRowHeight[index] || rowHeight // if(temp > 0){ // index += 1 // //保存当前index对应的scrollTop // this.currentScrollTop += this.cachedRowHeight[index]|| rowHeight; // } // } // }else{ // while(temp < 0){ // temp += this.cachedRowHeight[index] || rowHeight // if(temp < 0){ // index -= 1 // this.currentScrollTop -= this.cachedRowHeight[index]|| rowHeight; // } // } // } var index = 0; var temp = nextScrollTop; while (temp > 0) { temp -= _this3.cachedRowHeight[index] || rowHeight; if (temp > 0) { index += 1; } } var isOrder = index - currentIndex > 0 ? true : false; if (index < 0) index = 0; console.log('currentIndex****' + index); //如果之前的索引和下一次的不一样则重置索引和滚动的位置 if (currentIndex !== index) { _this.currentIndex = index; _this.scrollTop = nextScrollTop; var rowsInView = 0; //可视区域显示多少行 var rowsHeight = 0; //可视区域内容高度 //如果可视区域中需要展示的数据已经在缓存中则不重现render。 if (viewHeight) { //有时滚动过快时this.cachedRowHeight[rowsInView + index]为undifined while (rowsHeight < viewHeight && _this3.cachedRowHeight[rowsInView + index]) { rowsHeight += _this3.cachedRowHeight[rowsInView + index]; rowsInView++; } // 如果rowsInView 小于 缓存的数据则重新render // 向下滚动 下临界值超出缓存的endIndex则重新渲染 if (rowsInView + index > endIndex - rowDiff && isOrder) { _this3.startIndex = index - loadBuffer; endIndex = _this3.startIndex + loadCount; if (endIndex > data.length) { endIndex = data.length; } _this3.endIndex = endIndex; _this3.setState({ needRender: !needRender }); } // 向上滚动,当前的index是否已经加载(currentIndex),若干上临界值小于startIndex则重新渲染 if (!isOrder && index < startIndex + rowDiff) { startIndex = index - loadBuffer; if (startIndex < 0) { startIndex = 0; } _this3.startIndex = startIndex; _this3.endIndex = _this3.startIndex + loadCount; _this3.setState({ needRender: !needRender }); } } console.log('**index**' + index, "**startIndex**" + _this3.startIndex, "**endIndex**" + _this3.endIndex); } }; }, _temp; } module.exports = exports['default']; /***/ }), /* 581 */ /***/ (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__(4); var _react2 = _interopRequireDefault(_react); var _src = __webpack_require__(109); var _src2 = _interopRequireDefault(_src); var _bigData = __webpack_require__(580); var _bigData2 = _interopRequireDefault(_bigData); 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 _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); } } /** * * @title 含有嵌套子表格的大数据场景 * @description 通过expandedRowRender参数来实现子表格 * */ var BigDataTable = (0, _bigData2["default"])(_src2["default"]); var outColumns = [{ title: "操作", dataIndex: "d", key: "d", width: 200, render: function render(text, record, index) { return _react2["default"].createElement( "a", { href: "#", onClick: function onClick() { alert("这是第" + index + "列,内容为:" + text); } }, "\u4E00\u4E9B\u64CD\u4F5C" ); } }, { title: "用户名", dataIndex: "a", key: "a", width: 250 }, { id: "123", title: "性别", dataIndex: "b", key: "b", width: 100 }, { title: "年龄", dataIndex: "c", key: "c", width: 200 }]; var innerColumns = [{ title: "操作", dataIndex: "d", key: "d", width: 200, render: function render(text, record, index) { return _react2["default"].createElement( "a", { href: "#", onClick: function onClick() { alert("这是第" + index + "列,内容为:" + text); } }, "\u4E00\u4E9B\u64CD\u4F5C" ); } }, { title: "用户名", dataIndex: "a", key: "a", width: 100 }, { id: "123", title: "性别", dataIndex: "b", key: "b", width: 100 }, { title: "年龄", dataIndex: "c", key: "c", width: 200 }]; var data16 = [].concat(_toConsumableArray(new Array(10000))).map(function (e, i) { return { a: i + 'a', b: i + 'b', c: i + 'c', d: i + 'd', key: i }; }); var Demo31 = function (_Component) { _inherits(Demo31, _Component); function Demo31(props) { _classCallCheck(this, Demo31); var _this = _possibleConstructorReturn(this, _Component.call(this, props)); _this.expandedRowRender = function (record, index, indent) { var height = 42 * (_this.state.data_obj[record.key].length + 2); return _react2["default"].createElement(_src2["default"], { columns: innerColumns // style={{height:height}} , data: _this.state.data_obj[record.key] }); }; _this.getData = function (expanded, record) { //当点击展开的时候才去请求数据 var new_obj = _extends({}, _this.state.data_obj); if (expanded) { if (record.key === '1') { new_obj[record.key] = [{ a: "令狐冲", b: "男", c: 41, d: "操作", key: "1" }, { a: "杨过", b: "男", c: 67, d: "操作", key: "2" }]; _this.setState({ data_obj: new_obj }); } else { new_obj[record.key] = [{ a: "令狐冲", b: "男", c: 41, d: "操作", key: "1" }, { a: "菲菲", b: "nv", c: 67, d: "操作", key: "2" }]; _this.setState({ data_obj: new_obj }); } } }; _this.haveExpandIcon = function (record, index) { //控制是否显示行展开icon,该参数只有在和expandedRowRender同时使用才生效 if (index == 0) { return true; } return false; }; _this.state = { data_obj: { 0: [{ a: "令狐冲", b: "男", c: 41, d: "操作", key: "1" }, { a: "杨过", b: "男", c: 67, d: "操作", key: "2" }], 1: [{ a: "令狐冲", b: "男", c: 41, d: "操作", key: "1" }, { a: "菲菲", b: "nv", c: 67, d: "操作", key: "2" }] } }; return _this; } Demo31.prototype.render = function render() { return _react2["default"].createElement(BigDataTable, { columns: outColumns, data: data16, onExpand: this.getData, expandedRowRender: this.expandedRowRender, scroll: { y: 350 } // defaultExpandedRowKeys={[0,1]} , title: function title(currentData) { return _react2["default"].createElement( "div", null, "\u6807\u9898: \u8FD9\u662F\u4E00\u4E2A\u6807\u9898" ); }, footer: function footer(currentData) { return _react2["default"].createElement( "div", null, "\u8868\u5C3E: \u6211\u662F\u5C0F\u5C3E\u5DF4" ); } }); }; return Demo31; }(_react.Component); exports["default"] = Demo31; module.exports = exports["default"]; /***/ }), /* 582 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _beeTooltip = __webpack_require__(85); var _beeTooltip2 = _interopRequireDefault(_beeTooltip); var _beeCheckbox = __webpack_require__(513); var _beeCheckbox2 = _interopRequireDefault(_beeCheckbox); var _beeIcon = __webpack_require__(136); var _beeIcon2 = _interopRequireDefault(_beeIcon); var _beePopover = __webpack_require__(542); var _beePopover2 = _interopRequireDefault(_beePopover); var _src = __webpack_require__(109); var _src2 = _interopRequireDefault(_src); var _bigData = __webpack_require__(580); var _bigData2 = _interopRequireDefault(_bigData); var _MultiSelect = __webpack_require__(553); var _MultiSelect2 = _interopRequireDefault(_MultiSelect); var _filterColumn = __webpack_require__(541); var _filterColumn2 = _interopRequireDefault(_filterColumn); 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 _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); } } /** * * @title 大数据加载下的复杂Table * * @description */ var ComplexTable = (0, _filterColumn2["default"])((0, _MultiSelect2["default"])((0, _bigData2["default"])(_src2["default"]), _beeCheckbox2["default"]), _beePopover2["default"], _beeIcon2["default"]); var columns = [{ title: '序号', dataIndex: 'index', width: '50', render: function render(text, record, index) { return index; }, fixed: 'left' }, { title: "用户名", dataIndex: "a", key: "a", width: 580, className: "rowClassName", render: function render(text, record, index) { return _react2["default"].createElement( _beeTooltip2["default"], { inverse: true, overlay: text }, _react2["default"].createElement( "span", { tootip: text, style: { display: "inline-block", width: "80px", textOverflow: "ellipsis", overflow: "hidden", whiteSpace: "nowrap", verticalAlign: "middle" } }, text ) ); } }, { id: "123", title: "性别", dataIndex: "b", key: "b", width: 80 }, { title: "年龄", dataIndex: "c", key: "c", width: 200 }, { title: "操作", dataIndex: "d", key: "d", fixed: 'right', render: function render(text, record, index) { return _react2["default"].createElement( "div", { style: { position: 'relative' }, title: text }, _react2["default"].createElement( "a", { href: "javascript:;", tooltip: text, onClick: function onClick() { alert('这是第' + index + '列,内容为:' + text); } }, "\u4E00\u4E9B\u64CD\u4F5C" ) ); } }]; var data = [].concat(_toConsumableArray(new Array(10000))).map(function (e, i) { var rs = { a: i + 'a', b: i + 'b', c: i + 'c', d: i + 'd', key: i }; if (i % 3 == 0) { rs.b = '女'; } return rs; }); var Demo32 = function (_Component) { _inherits(Demo32, _Component); function Demo32(props) { _classCallCheck(this, Demo32); var _this = _possibleConstructorReturn(this, _Component.call(this, props)); _this.getSelectedDataFunc = function (data) { console.log(data); }; _this.state = { data: data, selectedRowIndex: 0 }; return _this; } Demo32.prototype.render = function render() { var _this2 = this; return _react2["default"].createElement(ComplexTable, { columns: columns, data: data, parentNodeId: "parent", scroll: { y: 300 }, height: 40, bordered: true, onRowClick: function onRowClick(record, index, indent) { _this2.setState({ selectedRowIndex: index }); }, getSelectedDataFunc: this.getSelectedDataFunc }); }; return Demo32; }(_react.Component); exports["default"] = Demo32; module.exports = exports["default"]; /***/ }), /* 583 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _beeButton = __webpack_require__(82); var _beeButton2 = _interopRequireDefault(_beeButton); var _beeTooltip = __webpack_require__(85); var _beeTooltip2 = _interopRequireDefault(_beeTooltip); var _src = __webpack_require__(109); var _src2 = _interopRequireDefault(_src); var _beeCheckbox = __webpack_require__(513); var _beeCheckbox2 = _interopRequireDefault(_beeCheckbox); 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); } /** * * @title 快捷键在table中的简单使用应用。 * @description tab 键可以默认选中第一行、up 选中上一条、down 选中下一条 更多api 见文档说明。 */ var columns = [{ title: "", dataIndex: "d", fixed: "left", key: "d", width: 80, render: function render(text, record, index) { return _react2["default"].createElement( "div", { style: { position: 'relative' }, title: text }, _react2["default"].createElement(_beeCheckbox2["default"], null) ); } }, { title: "用户名", dataIndex: "a", key: "a", width: 80, className: "rowClassName" }, { id: "123", title: "性别", dataIndex: "b", key: "b", width: 100 }, { title: "年龄", dataIndex: "c", key: "c", width: 200 }]; var data = [{ a: "令狐冲", b: "男", c: 41, d: '操作', key: "1" }, { a: "杨过叔叔的女儿黄蓉", b: "男", c: 67, d: '操作', key: "2" }, { a: "郭靖", b: "男", c: 25, d: '操作', key: "3" }]; var Demo33 = function (_Component) { _inherits(Demo33, _Component); function Demo33(props) { _classCallCheck(this, Demo33); var _this = _possibleConstructorReturn(this, _Component.call(this, props)); _this.onKeyTab = function () { var selectedRowIndex = _this.state.selectedRowIndex; // let count = selectedRowIndex;//(selectedRowIndex+1); // count == (data.length-1)?count = -1:count; // this.setState({ // selectedRowIndex: (count+1) // }) console.log(" ---onKeyTab---- ", selectedRowIndex); _this.setState({ selectedRowIndex: 0 }); }; _this.onKeyUp = function () { var selectedRowIndex = _this.state.selectedRowIndex; var count = selectedRowIndex; var len = data.length - 1; count = count == 0 ? count = len : count - 1; _this.setState({ selectedRowIndex: count }); }; _this.onKeyDown = function () { var selectedRowIndex = _this.state.selectedRowIndex; var count = selectedRowIndex; count == data.length - 1 ? count = -1 : count + 1; _this.setState({ selectedRowIndex: count + 1 }); }; _this.onTableKeyDown = function () { var selectedRowIndex = _this.state.selectedRowIndex; console.log(" ----onTabkeKeyDown--- ", selectedRowIndex); }; _this.state = { data: data, selectedRowIndex: 2 }; return _this; } Demo33.prototype.render = function render() { var _this2 = this; return _react2["default"].createElement( "div", null, _react2["default"].createElement("input", null), _react2["default"].createElement(_src2["default"], { columns: columns, data: data, rowClassName: function rowClassName(record, index, indent) { if (_this2.state.selectedRowIndex == index) { return 'selected'; } else { return ''; } }, onRowClick: function onRowClick(record, index, indent) { _this2.setState({ selectedRowIndex: index }); }, onKeyTab: this.onKeyTab, onKeyUp: this.onKeyUp, onKeyDown: this.onKeyDown, onTableKeyDown: this.onTableKeyDown, scroll: { x: "110%", y: 140 } }), " " ); }; return Demo33; }(_react.Component); exports["default"] = Demo33; module.exports = exports["default"]; /***/ }), /* 584 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _src = __webpack_require__(109); var _src2 = _interopRequireDefault(_src); 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); } /** * * @title 树形数据展示 * @description 通过在data中配置children数据,来自动生成树形数据 * */ var columns4 = [{ title: "Name", dataIndex: "name", key: "name", width: "40%" }, { title: "Age", dataIndex: "age", key: "age", width: "30%" }, { title: "Address", dataIndex: "address", key: "address" }]; var data4 = [{ key: 1, name: "John Brown sr.", age: 60, address: "New York No. 1 Lake Park", children: [{ key: 11, name: "John Brown", age: 42, address: "New York No. 2 Lake Park" }, { key: 12, name: "John Brown jr.", age: 30, address: "New York No. 3 Lake Park", children: [{ key: 121, name: "Jimmy Brown", age: 16, address: "New York No. 3 Lake Park" }] }, { key: 13, name: "Jim Green sr.", age: 72, address: "London No. 1 Lake Park", children: [{ key: 131, name: "Jim Green", age: 42, address: "London No. 2 Lake Park", children: [{ key: 1311, name: "Jim Green jr.", age: 25, address: "London No. 3 Lake Park" }, { key: 1312, name: "Jimmy Green sr.", age: 18, address: "London No. 4 Lake Park" }] }] }] }, { key: 2, name: "Joe Black", age: 32, address: "Sidney No. 1 Lake Park" }]; var Demo4 = function (_Component) { _inherits(Demo4, _Component); function Demo4(props) { _classCallCheck(this, Demo4); var _this = _possibleConstructorReturn(this, _Component.call(this, props)); _this.state = { data: data4, factoryValue: 0, selectedRow: new Array(data4.length) //状态同步 }; return _this; } Demo4.prototype.render = function render() { var _this2 = this; return _react2['default'].createElement(_src2['default'], { rowClassName: function rowClassName(record, index, indent) { if (_this2.state.selectedRow[index]) { return 'selected'; } else { return ''; } }, onRowClick: function onRowClick(record, index, indent) { var selectedRow = new Array(_this2.state.data.length); selectedRow[index] = true; _this2.setState({ factoryValue: record, selectedRow: selectedRow }); }, columns: columns4, data: data4 }); }; return Demo4; }(_react.Component); exports['default'] = Demo4; module.exports = exports['default']; /***/ }), /* 585 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _src = __webpack_require__(109); var _src2 = _interopRequireDefault(_src); 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); } /** * * @title 固定列 * @description 固定列到表格的某侧 * */ var columns5 = [{ title: "Full Name", width: 100, dataIndex: "name", key: "name", fixed: "left" }, { title: "Age", width: 100, dataIndex: "age", key: "age", fixed: "left" }, { title: "address", dataIndex: "address", key: "address" }]; var data5 = [{ key: "1", name: "John Brown", age: 32, address: "New York Park" }, { key: "2", name: "Jim Green", age: 40, address: "London Park" }, { key: "3", name: "Jim Green", age: 40, address: "London Park" }, { key: "4", name: "Jim Green", age: 40, address: "London Park" }]; var Demo5 = function (_Component) { _inherits(Demo5, _Component); function Demo5() { _classCallCheck(this, Demo5); return _possibleConstructorReturn(this, _Component.apply(this, arguments)); } Demo5.prototype.render = function render() { return _react2['default'].createElement(_src2['default'], { columns: columns5, data: data5, scroll: { x: "110%", y: 140 } }); }; return Demo5; }(_react.Component); exports['default'] = Demo5; module.exports = exports['default']; /***/ }), /* 586 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _src = __webpack_require__(109); var _src2 = _interopRequireDefault(_src); var _dragColumn = __webpack_require__(546); var _dragColumn2 = _interopRequireDefault(_dragColumn); 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); } /** * * @title 固定表头 * @description 方便一页内展示大量数据。需要指定 column 的 width 属性,否则列头和内容可能不对齐。(还可以设置scroll来支持横向或纵向滚动) * */ ; var DragColumnTable = (0, _dragColumn2['default'])(_src2['default']); var columns6 = [{ title: "Full Name", width: 100, dataIndex: "name", key: "name" }, { title: "Age", width: 100, dataIndex: "age", key: "age" }, { title: "Address", dataIndex: "address", key: "1" }]; var data6 = [{ key: "1", name: "John Brown", age: 32, address: "New York Park" }, { key: "2", name: "Jim Green", age: 40, address: "London Park" }, { key: "3", name: "Jim Green", age: 40, address: "London Park" }, { key: "4", name: "Jim Green", age: 40, address: "London Park" }, { key: "11", name: "John Brown", age: 32, address: "New York Park" }, { key: "12", name: "Jim Green", age: 40, address: "London Park" }, { key: "13", name: "Jim Green", age: 40, address: "London Park" }, { key: "14", name: "Jim Green", age: 40, address: "London Park" }]; var Demo6 = function (_Component) { _inherits(Demo6, _Component); function Demo6() { _classCallCheck(this, Demo6); return _possibleConstructorReturn(this, _Component.apply(this, arguments)); } Demo6.prototype.render = function render() { return _react2['default'].createElement(DragColumnTable, { columns: columns6, data: data6, scroll: { y: 150 }, dragborder: true }); }; return Demo6; }(_react.Component); exports['default'] = Demo6; module.exports = exports['default']; /***/ }), /* 587 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _src = __webpack_require__(109); var _src2 = _interopRequireDefault(_src); 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); } /** * * @title 主子表 * @description 主表点击子表联动 * */ var columns7 = [{ title: "班级", dataIndex: "a", key: "a" }, { title: "人数", dataIndex: "b", key: "b" }, { title: "班主任", dataIndex: "c", key: "c" }, { title: "武功级别", dataIndex: "d", key: "d" }]; var data7 = [{ a: "02级一班", b: "2", c: "欧阳锋", d: "大侠", key: "1" }, { a: "03级二班", b: "3", c: "归海一刀", d: "大侠", key: "2" }, { a: "05级三班", b: "1", c: "一拳超人", d: "愣头青", key: "3" }]; var columns7_1 = [{ title: "姓名", dataIndex: "a", key: "a" }, { title: "班级", dataIndex: "b", key: "b" }, { title: "系别", dataIndex: "c", key: "c" }]; var Demo7 = function (_Component) { _inherits(Demo7, _Component); function Demo7(props) { _classCallCheck(this, Demo7); var _this = _possibleConstructorReturn(this, _Component.call(this, props)); _this.rowclick = function (record, index) { if (record.a === "02级一班") { _this.setState({ children_data: [{ a: "郭靖", b: "02级一班", c: "文学系", key: "1" }, { a: "黄蓉", b: "02级一班", c: "文学系", key: "2" }] }); } else if (record.a === "03级二班") { _this.setState({ children_data: [{ a: "杨过", b: "03级二班", c: "外语系", key: "1" }, { a: "小龙女", b: "03级二班", c: "外语系", key: "2" }, { a: "傻姑", b: "03级二班", c: "外语系", key: "3" }] }); } else if (record.a === "05级三班") { _this.setState({ children_data: [{ a: "金圣叹", b: "05级三班", c: "美术系", key: "1" }] }); } }; _this.state = { children_data: [] }; return _this; } Demo7.prototype.render = function render() { return _react2["default"].createElement( "div", null, _react2["default"].createElement(_src2["default"], { columns: columns7, data: data7, onRowClick: this.rowclick, title: function title(currentData) { return _react2["default"].createElement( "div", null, "\u6807\u9898: \u6211\u662F\u4E3B\u8868" ); } }), _react2["default"].createElement(_src2["default"], { style: { marginTop: 40 }, columns: columns7_1, data: this.state.children_data, title: function title(currentData) { return _react2["default"].createElement( "div", null, "\u6807\u9898: \u6211\u662F\u5B50\u8868" ); } }) ); }; return Demo7; }(_react.Component); exports["default"] = Demo7; module.exports = exports["default"]; /***/ }), /* 588 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _src = __webpack_require__(109); var _src2 = _interopRequireDefault(_src); var _beePagination = __webpack_require__(589); var _beePagination2 = _interopRequireDefault(_beePagination); 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); } /** * * @title 表格+分页 * @description 点击分页联动表格 */ var columns8 = [{ 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: "d", key: "d" }]; var pageData = { 1: [{ a: "杨过", b: "男", c: 30, d: "内行", key: "2" }, { a: "令狐冲", b: "男", c: 41, d: "大侠", key: "1" }, { a: "郭靖", b: "男", c: 25, d: "大侠", key: "3" }], 2: [{ a: "芙蓉姐姐", b: "女", c: 23, d: "大侠", key: "1" }, { a: "芙蓉妹妹", b: "女", c: 23, d: "内行", key: "2" }] }; var Demo8 = function (_Component) { _inherits(Demo8, _Component); function Demo8(props) { _classCallCheck(this, Demo8); var _this = _possibleConstructorReturn(this, _Component.call(this, props)); _this.state = { data: pageData[1], activePage: 1 }; return _this; } Demo8.prototype.handleSelect = function handleSelect(eventKey) { this.setState({ data: pageData[eventKey], activePage: eventKey }); }; Demo8.prototype.render = function render() { return _react2["default"].createElement( "div", null, _react2["default"].createElement(_src2["default"], { columns: columns8, data: this.state.data }), _react2["default"].createElement(_beePagination2["default"], { first: true, last: true, prev: true, next: true, maxButtons: 5, boundaryLinks: true, activePage: this.state.activePage, onSelect: this.handleSelect.bind(this), onDataNumSelect: this.dataNumSelect, showJump: true, total: 100, dataNum: 2 }) ); }; return Demo8; }(_react.Component); exports["default"] = Demo8; module.exports = exports["default"]; /***/ }), /* 589 */ /***/ (function(module, exports, __webpack_require__) { 'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _Pagination = __webpack_require__(590); var _Pagination2 = _interopRequireDefault(_Pagination); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } exports["default"] = _Pagination2["default"]; module.exports = exports['default']; /***/ }), /* 590 */ /***/ (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 _classnames2 = __webpack_require__(3); var _classnames3 = _interopRequireDefault(_classnames2); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _PaginationButton = __webpack_require__(591); var _PaginationButton2 = _interopRequireDefault(_PaginationButton); var _beeButton = __webpack_require__(82); var _beeButton2 = _interopRequireDefault(_beeButton); var _beeSelect = __webpack_require__(138); var _beeSelect2 = _interopRequireDefault(_beeSelect); var _propTypes = __webpack_require__(5); var _propTypes2 = _interopRequireDefault(_propTypes); var _i18n = __webpack_require__(592); var _i18n2 = _interopRequireDefault(_i18n); var _tool = __webpack_require__(501); 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 Option = _beeSelect2["default"].Option; var propTypes = { /** * 当前激活状态页 */ activePage: _propTypes2["default"].number, /** * 总页数 */ items: _propTypes2["default"].number, /** * 显示按钮从1到maxButton的按钮数 */ maxButtons: _propTypes2["default"].number, /** * 当为true,不管切换到多少页都显示第一页和最后一页的按钮 */ boundaryLinks: _propTypes2["default"].bool, /** * 当为true,显示省略号,否则 * */ ellipsis: _propTypes2["default"].oneOfType([_propTypes2["default"].bool, _propTypes2["default"].node]), /** * 当为true,显示点击到第一页的按钮 */ first: _propTypes2["default"].oneOfType([_propTypes2["default"].bool, _propTypes2["default"].node]), /** * 当为true,显示点击到最后一页的按钮 */ last: _propTypes2["default"].oneOfType([_propTypes2["default"].bool, _propTypes2["default"].node]), /** * 当为true,显示前一页按钮 */ prev: _propTypes2["default"].oneOfType([_propTypes2["default"].bool, _propTypes2["default"].node]), /** * 当为true,显示下一页按钮 */ next: _propTypes2["default"].oneOfType([_propTypes2["default"].bool, _propTypes2["default"].node]), /** * 暴露给用户的切换页的方法 */ onSelect: _propTypes2["default"].func, /** * You can use a custom element for the buttons */ buttonComponentClass: _propTypes2["default"].oneOfType([_propTypes2["default"].element, _propTypes2["default"].string]), /** * 每页多少条的选择 */ dataNumSelect: _propTypes2["default"].array, /** * 每页多少条选择哪一个 */ dataNum: _propTypes2["default"].number, /** * 显示跳页 */ showJump: _propTypes2["default"].bool, /** * 显示总共条数 */ total: _propTypes2["default"].number, /** * pagiantion不可点 */ disabled: _propTypes2["default"].bool, /** * 确认按钮的样式集合 */ btnType: _propTypes2["default"].object }; var defaultProps = { activePage: 1, maxButtons: 0, first: false, last: false, prev: false, next: false, ellipsis: true, boundaryLinks: false, clsPrefix: "u-pagination", gap: false, noBorder: false, dataNumSelect: ['5', '10', '15', '20'], dataNum: 1, showJump: false, locale: {}, disabled: false, btnType: { shape: 'border' } }; var Pagination = function (_React$Component) { _inherits(Pagination, _React$Component); function Pagination(props, context) { _classCallCheck(this, Pagination); var _this = _possibleConstructorReturn(this, _React$Component.call(this, props, context)); _this.onKeyup = function (e) { e.keyCode === 13 && _this.handleEnsurePageJump(); }; _this.setPageJump = function (e) { var value = e.target.value; // 20181129跳转内容可以清空 if (value !== '' && (isNaN(Number(value)) || value > _this.state.items || value <= 0)) { return false; } else { _this.setState({ jumpPageState: value }); } }; _this.handleEnsurePageJump = function () { var jumpPageState = _this.state.jumpPageState; var onSelect = _this.props.onSelect; if (jumpPageState === '') { return; } _this.setState({ activePage: jumpPageState * 1, jumpPageState: '' }); if (typeof onSelect === 'function') { onSelect(jumpPageState * 1); } }; _this.dataNumSelect = function (value) { // console.log(value); var _this$props = _this.props, onDataNumSelect = _this$props.onDataNumSelect, total = _this$props.total; var dataNumValue = _this.props.dataNumSelect[value]; // console.log("dataNumValue", dataNumValue); if (total) { _this.setState({ // 20181210因为dataNumSelect的某项不是数字或者数字字符串 items: Number.isNaN(parseInt(dataNumValue)) ? 1 : Math.ceil(total / dataNumValue) }); } _this.setState({ dataNum: value }); if (typeof onDataNumSelect === 'function') { onDataNumSelect(value, dataNumValue); } }; _this.state = { activePage: _this.props.activePage, //当前的页码 dataNum: props.dataNum, items: props.items ? props.items : props.total ? Math.ceil(props.total / props.dataNumSelect[props.dataNum]) : 1, jumpPageState: '' }; return _this; } Pagination.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { if (this.state.activePage !== nextProps.activePage) { this.setState({ activePage: nextProps.activePage }); } if (nextProps.dataNum && this.props.dataNum !== nextProps.dataNum) { this.setState({ dataNum: nextProps.dataNum, // 20181210因为dataNumSelect的某项不是数字或者数字字符串 items: Number.isNaN(parseInt(nextProps.dataNumSelect[nextProps.dataNum])) ? 1 : Math.ceil(nextProps.total / nextProps.dataNumSelect[nextProps.dataNum]) }); } if (nextProps.items && this.props.items !== nextProps.items) { this.setState({ items: nextProps.items }); } }; /** * 确认跳页 */ /** * 每页多少条的选择 * @param e */ /** * 渲染page的按钮 * @param activePage * @param items * @param maxButtons * @param boundaryLinks * @param ellipsis * @param buttonProps * @returns {Array} */ Pagination.prototype.renderPageButtons = function renderPageButtons(activePage, items, maxButtons, boundaryLinks, ellipsis, buttonProps) { var pageButtons = []; var startPage = void 0; var endPage = void 0; var hasHiddenPagesAfter = void 0; if (maxButtons) { //根据max很当前activepage计算出应隐藏activeButton之前的页数 var hiddenPagesBefore = activePage - parseInt(maxButtons / 2, 10); startPage = hiddenPagesBefore > 2 ? hiddenPagesBefore : 1; //计算出是否存在隐藏activeButton之后的页数 hasHiddenPagesAfter = startPage + maxButtons < items + 1; if (!hasHiddenPagesAfter) { endPage = items; startPage = items - maxButtons + 1; if (startPage < 1) { startPage = 1; } } else { endPage = startPage + maxButtons - 1; } } else { startPage = 1; endPage = items; } //将所有的button循环渲染出来 for (var pagenumber = startPage; pagenumber <= endPage; pagenumber++) { pageButtons.push(_react2["default"].createElement( _PaginationButton2["default"], _extends({}, buttonProps, { key: pagenumber, eventKey: pagenumber, active: pagenumber === activePage }), pagenumber )); } //如果boundaryLinks和eclipsis且startPage!=1 需要加上before More Button if (boundaryLinks && ellipsis && startPage !== 1) { if (startPage > 2) { pageButtons.unshift(_react2["default"].createElement( _PaginationButton2["default"], { key: "ellipsisFirst", disabled: true, componentClass: buttonProps.componentClass }, _react2["default"].createElement( "span", { "aria-label": "More" }, ellipsis === true ? "\u2026" : ellipsis ) )); } //加上最小边界 Button pageButtons.unshift(_react2["default"].createElement( _PaginationButton2["default"], _extends({}, buttonProps, { key: 1, eventKey: 1, active: false }), "1" )); } //如果maxButtons和eclipsis且hasHiddenPagesAfter 需加上after More Button if (maxButtons && hasHiddenPagesAfter && ellipsis) { if (!boundaryLinks || boundaryLinks && items > 1 + endPage) { pageButtons.push(_react2["default"].createElement( _PaginationButton2["default"], { key: "ellipsis", disabled: true, componentClass: buttonProps.componentClass }, _react2["default"].createElement( "span", { "aria-label": "More" }, ellipsis === true ? "\u2026" : ellipsis ) )); } //如果最后一个页数按钮不等于总页数 且 边界为true 需加上最大边界按钮 if (boundaryLinks && endPage !== items) { pageButtons.push(_react2["default"].createElement( _PaginationButton2["default"], _extends({}, buttonProps, { key: items, eventKey: items, active: false }), items )); } } return pageButtons; }; Pagination.prototype.render = function render() { var local = (0, _tool.getComponentLocale)(this.props, this.context, 'Pagination', function () { return _i18n2["default"]; }); var _props = this.props, items = _props.items, maxButtons = _props.maxButtons, boundaryLinks = _props.boundaryLinks, ellipsis = _props.ellipsis, first = _props.first, last = _props.last, prev = _props.prev, next = _props.next, onSelect = _props.onSelect, buttonComponentClass = _props.buttonComponentClass, noBorder = _props.noBorder, className = _props.className, clsPrefix = _props.clsPrefix, size = _props.size, gap = _props.gap, onDataNumSelect = _props.onDataNumSelect, dataNumSelect = _props.dataNumSelect, dataNum = _props.dataNum, activePage = _props.activePage, showJump = _props.showJump, total = _props.total, disabled = _props.disabled, btnType = _props.btnType, others = _objectWithoutProperties(_props, ["items", "maxButtons", "boundaryLinks", "ellipsis", "first", "last", "prev", "next", "onSelect", "buttonComponentClass", "noBorder", "className", "clsPrefix", "size", "gap", "onDataNumSelect", "dataNumSelect", "dataNum", "activePage", "showJump", "total", "disabled", "btnType"]); var activePageState = this.state.activePage; var jumpPageState = this.state.jumpPageState; var classes = {}; if (noBorder) { classes[clsPrefix + "-no-border"] = true; } if (size) { classes[clsPrefix + "-" + size] = true; } if (gap) { classes[clsPrefix + "-gap"] = true; } var classNames = (0, _classnames3["default"])(clsPrefix + "-list", classes); var wrapperClass = (0, _classnames3["default"])(clsPrefix, _defineProperty({}, clsPrefix + "-disabled", disabled)); /** * 页按钮属性 * onSelect:暴露在外层交互动作,也是与父组件Pagination的交流接口 * componentClass: 用户定义的按钮dom元素类型 */ var buttonProps = { onSelect: onSelect, componentClass: buttonComponentClass }; return _react2["default"].createElement( "div", { className: (0, _classnames3["default"])(wrapperClass, className) }, disabled && _react2["default"].createElement("div", { className: clsPrefix + "-disabled-mask" }), _react2["default"].createElement( "ul", _extends({}, others, { className: classNames }), first && _react2["default"].createElement( _PaginationButton2["default"], _extends({}, buttonProps, { eventKey: 1, disabled: activePageState === 1, iconBtn: true }), _react2["default"].createElement( "span", { "aria-label": "First" }, first === true ? "\xAB" : first ) ), prev && _react2["default"].createElement( _PaginationButton2["default"], _extends({}, buttonProps, { eventKey: activePageState - 1, disabled: activePageState === 1, iconBtn: true }), _react2["default"].createElement( "span", { "aria-label": "Previous" }, prev === true ? "\u2039" : prev ) ), this.renderPageButtons(activePageState, this.state.items, maxButtons, boundaryLinks, ellipsis, buttonProps), next && _react2["default"].createElement( _PaginationButton2["default"], _extends({}, buttonProps, { eventKey: activePageState + 1, disabled: activePageState >= this.state.items, iconBtn: true }), _react2["default"].createElement( "span", { "aria-label": "Next" }, next === true ? "\u203A" : next ) ), last && _react2["default"].createElement( _PaginationButton2["default"], _extends({}, buttonProps, { eventKey: this.state.items, disabled: activePageState >= this.state.items, iconBtn: true }), _react2["default"].createElement( "span", { "aria-label": "Last" }, last === true ? "\xBB" : last ) ) ), total != null ? _react2["default"].createElement( "div", { className: clsPrefix + "-total" }, local['total'], _react2["default"].createElement( "span", null, total ), local['items'] ) : null, showJump ? _react2["default"].createElement( "div", { className: "data_per_select" }, _react2["default"].createElement( "span", null, local['show'] ), _react2["default"].createElement( _beeSelect2["default"] // className="data_select" , { value: this.state.dataNum, onChange: this.dataNumSelect }, dataNumSelect.length > 0 && dataNumSelect.map(function (item, i) { return _react2["default"].createElement( Option, { key: i, value: i }, item ); }) ), _react2["default"].createElement( "span", null, local['items'] ) ) : null, showJump ? _react2["default"].createElement( "div", { className: "page_jump" }, _react2["default"].createElement( "span", null, local['goto'] ), _react2["default"].createElement("input", { className: "page_jump_value", value: jumpPageState, onKeyDown: this.onKeyup, onChange: this.setPageJump }), _react2["default"].createElement( "span", null, local['page'] ), _react2["default"].createElement( _beeButton2["default"], _extends({ className: "page_jump_btn", onClick: this.handleEnsurePageJump // shape="border" }, btnType), _react2["default"].createElement( "span", null, local['ok'] ) ) ) : null ); }; return Pagination; }(_react2["default"].Component); Pagination.propTypes = propTypes; Pagination.defaultProps = defaultProps; Pagination.contextTypes = { beeLocale: _propTypes2["default"].object }; exports["default"] = Pagination; module.exports = exports["default"]; /***/ }), /* 591 */ /***/ (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__(4); var _react2 = _interopRequireDefault(_react); var _propTypes = __webpack_require__(5); 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 = { className: _propTypes2["default"].string, eventKey: _propTypes2["default"].any, onSelect: _propTypes2["default"].func, disabled: _propTypes2["default"].bool, active: _propTypes2["default"].bool, onClick: _propTypes2["default"].func }; var defaultProps = { componentClass: 'a', active: false, disabled: false }; var PaginationButton = function (_React$Component) { _inherits(PaginationButton, _React$Component); function PaginationButton(props, context) { _classCallCheck(this, PaginationButton); var _this = _possibleConstructorReturn(this, _React$Component.call(this, props, context)); _this.handleClick = _this.handleClick.bind(_this); return _this; } PaginationButton.prototype.handleClick = function handleClick(event) { var _props = this.props, disabled = _props.disabled, onSelect = _props.onSelect, eventKey = _props.eventKey; if (disabled) { return; } if (onSelect) { onSelect(eventKey, event); } }; PaginationButton.prototype.render = function render() { var _props2 = this.props, Component = _props2.componentClass, active = _props2.active, disabled = _props2.disabled, onClick = _props2.onClick, eventKey = _props2.eventKey, className = _props2.className, style = _props2.style, iconBtn = _props2.iconBtn, props = _objectWithoutProperties(_props2, ['componentClass', 'active', 'disabled', 'onClick', 'eventKey', 'className', 'style', 'iconBtn']); delete props.onSelect; return _react2["default"].createElement( 'li', { className: (0, _classnames2["default"])(className, { active: active, disabled: disabled, iconBtn: iconBtn }), style: style }, _react2["default"].createElement(Component, _extends({}, props, { disabled: disabled, onClick: this.handleClick })) ); }; return PaginationButton; }(_react2["default"].Component); PaginationButton.propTypes = propTypes; PaginationButton.defaultProps = defaultProps; exports["default"] = PaginationButton; module.exports = exports['default']; /***/ }), /* 592 */ /***/ (function(module, exports) { 'use strict'; module.exports = { 'lang': 'zh-cn', 'total': '共', 'items': '条', 'show': '显示', 'goto': '跳至', 'page': '页', 'ok': '确认', 'en-us': { 'total': 'total', 'items': 'items', 'show': 'page', 'goto': 'goto', 'ok': 'ok' }, 'zh-tw': { 'total': '共', 'items': '條', 'show': '顯示', 'goto': '跳至', 'ok': '確認' } }; /***/ }), /* 593 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _react = __webpack_require__(4); var _react2 = _interopRequireDefault(_react); var _src = __webpack_require__(109); var _src2 = _interopRequireDefault(_src); var _beeIcon = __webpack_require__(136); var _beeIcon2 = _interopRequireDefault(_beeIcon); var _beeInputGroup = __webpack_require__(290); var _beeInputGroup2 = _interopRequireDefault(_beeInputGroup); var _beeFormControl = __webpack_require__(134); var _beeFormControl2 = _interopRequireDefault(_beeFormControl); 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); } /** * * @title 表格+搜索 * @description 搜索刷新表格数据 * * * import {Table} from 'tinper-bee'; */ var Search = function (_Component) { _inherits(Search, _Component); function Search() { var _temp, _this, _ret; _classCallCheck(this, Search); for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } return _ret = (_temp = (_this = _possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.state = { searchValue: "", empty: false }, _this.handleSearch = function () { var onSearch = _this.props.onSearch; _this.setState({ empty: true }); onSearch && onSearch(_this.state.searchValue); }, _this.handleKeyDown = function (e) { if (e.keyCode === 13) { _this.handleSearch(); } }, _this.handleChange = function (e) { _this.setState({ searchValue: e }); }, _this.emptySearch = function () { var onEmpty = _this.props.onEmpty; _this.setState({ searchValue: "", empty: false }); onEmpty && onEmpty(); }, _temp), _possibleConstructorReturn(_this, _ret); } /** * 搜索 */ /** * 捕获回车 * @param e */ /** * 输入框改变 * @param e */ /** * 清空输入框 */ Search.prototype.render = function render() { return _react2["default"].createElement( _beeInputGroup2["default"], { simple: true, className: "search-component" }, _react2["default"].createElement(_beeFormControl2["default"], { onChange: this.handleChange, value: this.state.searchValue, onKeyDown: this.handleKeyDown, placeholder: "\u8BF7\u8F93\u5165\u7528\u6237\u540D", type: "text" }), this.state.empty ? _react2["default"].createElement(_beeIcon2["default"], { type: "uf-close-c", onClick: this.emptySearch, className: "empty-search" }) : null, _react2["default"].createElement( _beeInputGroup2["default"].Button, { onClick: this.handleSearch, shape: "border" }, _react2["default"].createElement(_beeIcon2["default"], { type: "uf-search" }) ) ); }; return Search; }(_react.Component); var columns9 = [{ title: "姓名", dataIndex: "a", key: "a", width: 100 }, { title: "性别", dataIndex: "b", key: "b", width: 100 }, { title: "年龄", dataIndex: "c", key: "c", width: 200 }, { title: "武功级别", dataIndex: "d", key: "d" }]; var userData = [{ a: "杨过", b: "男", c: 30, d: "内行", key: "2" }, { a: "令狐冲", b: "男", c: 41, d: "大侠", key: "1" }, { a: "郭靖", b: "男", c: 25, d: "大侠", key: "3" }]; var Demo9 = function (_Component2) { _inherits(Demo9, _Component2); function Demo9(props) { _classCallCheck(this, Demo9); var _this2 = _possibleConstructorReturn(this, _Component2.call(this, props)); _this2.handleSearch = function (value) { if (value === "") { return _this2.setState({ data: userData }); } var regExp = new RegExp(value, "ig"); var data = userData.filter(function (item) { return regExp.test(item.a); }); _this2.setState({ data: data }); }; _this2.handleEmpty = function () { _this2.setState({ data: userData }); }; _this2.state = { data: userData }; return _this2; } Demo9.prototype.render = function render() { return _react2["default"].createElement( "div", null, _react2["default"].createElement( "div", { className: "clearfix" }, _react2["default"].createElement(Search, { onSearch: this.handleSearch, onEmpty: this.handleEmpty }) ), _react2["default"].createElement(_src2["default"], { columns: columns9, data: this.state.data }) ); }; return Demo9; }(_react.Component); exports["default"] = Demo9; module.exports = exports["default"]; /***/ }) /******/ ]); //# sourceMappingURL=demo.js.map