From 67c787741323ef4a4ab7a01baa33fcc651580c32 Mon Sep 17 00:00:00 2001 From: bplok20010 Date: Fri, 22 Feb 2019 21:48:38 +0800 Subject: [PATCH] Modified docs/index.html Missing docs/static/js/index.ed336b3c.js Missing docs/static/js/index.ed336b3c.js.map Modified examples/demos/demo1.js Modified lib/ListBox.js Modified package.json Modified src/ListBox.js Add docs/static/js/index.dcbccb8c.js Add docs/static/js/index.dcbccb8c.js.map --- docs/index.html | 2 +- .../js/{index.ed336b3c.js => index.dcbccb8c.js} | 16 ++++++++-------- docs/static/js/index.dcbccb8c.js.map | 1 + docs/static/js/index.ed336b3c.js.map | 1 - examples/demos/demo1.js | 2 +- lib/ListBox.js | 12 ++++++------ package.json | 4 ++-- src/ListBox.js | 12 ++++++------ 8 files changed, 25 insertions(+), 25 deletions(-) rename docs/static/js/{index.ed336b3c.js => index.dcbccb8c.js} (99%) create mode 100644 docs/static/js/index.dcbccb8c.js.map delete mode 100644 docs/static/js/index.ed336b3c.js.map diff --git a/docs/index.html b/docs/index.html index ff1b553..2546262 100644 --- a/docs/index.html +++ b/docs/index.html @@ -20,6 +20,6 @@
- + \ No newline at end of file diff --git a/docs/static/js/index.ed336b3c.js b/docs/static/js/index.dcbccb8c.js similarity index 99% rename from docs/static/js/index.ed336b3c.js rename to docs/static/js/index.dcbccb8c.js index 2de9231..2d0f743 100644 --- a/docs/static/js/index.ed336b3c.js +++ b/docs/static/js/index.dcbccb8c.js @@ -323,7 +323,7 @@ var uuid = 100; for (var i = 0; i < 10; i++) { var items = []; var d = { - items: items, + children: items, label: '分组' + (i + 1) }; dataset.push(d); @@ -824,7 +824,7 @@ function (_React$Component) { var _this$props4 = this.props, labelField = _this$props4.labelField, valueField = _this$props4.valueField, - itemsField = _this$props4.itemsField, + childrenField = _this$props4.childrenField, prefixCls = _this$props4.prefixCls, disabled = _this$props4.disabled; var itemsMap = this.state.itemsMap; @@ -835,7 +835,7 @@ function (_React$Component) { item = (_item = {}, (0, _defineProperty2.default)(_item, labelField, item), (0, _defineProperty2.default)(_item, valueField, item), _item); } - var isGroup = item[itemsField]; + var isGroup = item[childrenField]; var itemPrefixCls = "".concat(prefixCls, "-item"); var activeCls = "".concat(prefixCls, "-item-active"); var onMouseEnter = noop; @@ -873,7 +873,7 @@ function (_React$Component) { prefixCls: "".concat(itemPrefixCls, "-group"), key: item[labelField], label: item[labelField] - }, _this2.renderListItems(item[itemsField] || [], selectedMap)); + }, _this2.renderListItems(item[childrenField] || [], selectedMap)); }); } }, { @@ -884,7 +884,7 @@ function (_React$Component) { var _this$props5 = this.props, labelField = _this$props5.labelField, valueField = _this$props5.valueField, - itemsField = _this$props5.itemsField, + childrenField = _this$props5.childrenField, prefixCls = _this$props5.prefixCls, disabled = _this$props5.disabled; var itemsMap = this.state.itemsMap; @@ -1071,7 +1071,7 @@ exports.default = ListBox; prefixCls: _propTypes.default.string, valueField: _propTypes.default.string, labelField: _propTypes.default.string, - itemsField: _propTypes.default.string, + childrenField: _propTypes.default.string, items: _propTypes.default.array, emptyLabel: _propTypes.default.any, multiple: _propTypes.default.bool, @@ -1098,7 +1098,7 @@ exports.default = ListBox; prefixCls: 'rw-listbox', valueField: 'value', labelField: 'label', - itemsField: 'items', + childrenField: 'children', labelInValue: false, tabIndex: 0, items: [], @@ -1462,4 +1462,4 @@ module.exports = __webpack_require__(/*! D:\wamp\www\github-projects\react-widge /***/ }) /******/ }); -//# sourceMappingURL=index.ed336b3c.js.map \ No newline at end of file +//# sourceMappingURL=index.dcbccb8c.js.map \ No newline at end of file diff --git a/docs/static/js/index.dcbccb8c.js.map b/docs/static/js/index.dcbccb8c.js.map new file mode 100644 index 0000000..79effb4 --- /dev/null +++ b/docs/static/js/index.dcbccb8c.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./examples/Demo.js","webpack:///./examples/DemoList.js","webpack:///./examples/demos/demo1.js","webpack:///./examples/index.js","webpack:///./examples/style/animate.scss?bdcb","webpack:///./examples/style/index.scss?2d25","webpack:///./src/ListBox.js","webpack:///./src/ListItem.js","webpack:///./src/ListItemGroup.js","webpack:///./src/index.js","webpack:///./src/style/index.scss?9cab","webpack:///./src/util.js"],"names":["Demo","current","DemoList","item","e","setState","state","map","i","onDemoChange","bind","label","Component","component","Demo1","ListItem","ListBox","ListItemGroup","dataset","uuid","items","d","children","push","j","value","disabled","DEMO","console","log","maxWidth","maxHeight","height","borderBottom","borderTop","handleChange","filter","indexOf","filterMsg","handleChange2","position","right","top","ReactDOM","render","demo","noop","copy","data","concat","props","onItemClick","target","getListViewBody","el","valueField","setValue","multiple","onChange","labelInValue","selectedValue","newSelectedValue","transformChangeValue","prefixCls","selector","activeCls","selectCls","list","getActiveIndex","keyCode","idx","UP","DOWN","sIdx","dom","ENTER","indexValueMap","_indexValueMap","activeIndex","_activeIndex","enableDownUpSelect","onKeyDown","querySelectorAll","length","minIndex","maxIndex","preventDefault","getAttribute","itemsMap","labelField","node","_listview","_listview_header","_listview_body","_listview_footer","defaultValue","_itemIndex","autoFocus","focus","selectedItem","querySelector","blur","v","selectedMap","childrenField","isGroup","itemPrefixCls","onMouseEnter","onMouseLeave","itemIndex","currentTarget","onItemSelect","onItemDeselect","renderListItems","React","Children","child","type","isListItemGroup","cloneElement","renderListChild","newProps","selected","onClick","onSelect","onDeselect","emptyLabel","forEach","childs","count","className","width","tabIndex","onFocus","onBlur","style","bodyStyle","WrapperComponent","wrapperComponent","HeaderWrapperComponent","headerWrapperComponent","BodyWrapperComponent","bodyWrapperComponent","FooterWrapperComponent","footerWrapperComponent","renderHeader","renderFooter","headerStyle","footerStyle","classes","saveListView","saveListViewHeader","saveListViewBody","renderList","saveListViewFooter","nextProps","prevState","PropTypes","string","object","array","any","bool","oneOfType","number","func","refs","nextState","nextContext","active","others","propTypes","saveItem","handleItemClick","ItemGroup","ObjProto","Object","prototype","toString","nativeIsArray","isNumber","obj","isArray","call","isUndefined","undefined","isEqual","a","b","String","each","iterator","context","hasContext"],"mappings":";AAAA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAQ,oBAAoB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,yBAAiB,4BAA4B;AAC7C;AACA;AACA,0BAAkB,2BAA2B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAgC;AAC1E;AACA;;AAEA;AACA;AACA;AACA,gEAAwD,kBAAkB;AAC1E;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAyC,iCAAiC;AAC1E,wHAAgH,mBAAmB,EAAE;AACrI;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;AACA;AACA;AACA,wBAAgB,uBAAuB;AACvC;;;AAGA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACtJA;;AACA;;IAEqBA,I;;;;;;;;;;;;;;;;;8HAET;AACJC,aAAO,EAAEC,kBAAS,CAAT;AADL,K;;;;;;iCAIKC,I,EAAMC,C,EAAG;AAClB,WAAKC,QAAL,CAAc;AACVJ,eAAO,EAAEE;AADC,OAAd;AAGH;;;6BAEQ;AAAA;;AAAA,UACGF,OADH,GACe,KAAKK,KADpB,CACGL,OADH;AAEL,aACI;AAAK,iBAAS,EAAC;AAAf,SACI;AAAK,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3E,CAAC,EAA9C,EAAkD;AAC9C,QAAIuL,QAAQ,CAACR,IAAT,CAAcU,UAAU,GAAGD,OAAH,GAAaX,GAAG,CAAC7K,CAAD,CAAxC,EAA6C6K,GAAG,CAAC7K,CAAD,CAAhD,EAAqDA,CAArD,EAAwD6K,GAAxD,MAAiE,KAArE,EAA4E;AAC/E;;AAED,SAAOA,GAAP;AACH,C","file":"static\\js\\index.dcbccb8c.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"index\": 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([0,\"vendors\"]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","import React, { Component } from 'react';\r\nimport DemoList from './DemoList';\r\n\r\nexport default class Demo extends Component {\r\n\r\n state = {\r\n current: DemoList[0]\r\n }\r\n\r\n onDemoChange(item, e) {\r\n this.setState({\r\n current: item\r\n });\r\n }\r\n\r\n render() {\r\n const { current } = this.state;\r\n return (\r\n
\r\n
\r\n {\r\n DemoList.map((item, i) => {\r\n return (\r\n \r\n {item.label}\r\n
\r\n );\r\n })\r\n }\r\n
\r\n
\r\n {current ? : null}\r\n
\r\n \r\n )\r\n }\r\n}","import Demo1 from './demos/demo1';\r\n// import Demo2 from './demos/Demo2';\r\n// import Demo3 from './demos/Demo3';\r\n// import Demo4 from './demos/Demo4';\r\n\r\nexport default [\r\n {\r\n label: '基本功能',\r\n component: Demo1\r\n }\r\n]","import React, { Component } from 'react';\r\nimport ListBox from '../../src';\r\n\r\nconst { ListItem, ListItemGroup } = ListBox\r\n\r\nconst dataset = [];\r\n\r\nvar uuid = 100;\r\n\r\nfor (let i = 0; i < 10; i++) {\r\n const items = [];\r\n const d = {\r\n children: items,\r\n label: '分组' + (i + 1)\r\n }\r\n\r\n dataset.push(d)\r\n\r\n for (let j = 0; j < 40; j++) {\r\n let d = {\r\n value: uuid++,\r\n label: '选项' + (j + 1),\r\n disabled: j % 2\r\n }\r\n items.push(d)\r\n }\r\n}\r\n\r\n\r\nexport default class DEMO extends Component {\r\n\r\n state = {\r\n value: 2\r\n }\r\n\r\n\r\n handleChange = (value) => {\r\n this.setState({\r\n value\r\n })\r\n\r\n console.log('changed ', value)\r\n }\r\n\r\n handleChange2 = (value) => {\r\n console.log('changed ', value)\r\n }\r\n\r\n filterMsg = ''\r\n\r\n render() {\r\n\r\n return (\r\n
\r\n

header

}\r\n renderFooter={() =>

footer

}\r\n headerStyle={{\r\n borderBottom: '1px solid #ccc'\r\n }}\r\n footerStyle={{\r\n borderTop: '1px solid #ccc'\r\n }}\r\n value={this.state.value}\r\n onChange={this.handleChange}\r\n items={dataset.filter((item, i) => item.label.indexOf(this.filterMsg) >= 0)}\r\n emptyLabel=\"无匹配项\"\r\n />\r\n\r\n \r\n \r\n V01Hot\r\n V02\r\n V03\r\n V04\r\n \r\n \r\n X01\r\n X02\r\n X03\r\n X04\r\n \r\n \r\n
\r\n );\r\n }\r\n\r\n}\r\n","import React from 'react'\r\nimport ReactDOM from 'react-dom';\r\n\r\nimport './style/index.scss';\r\nimport './style/animate.scss';\r\n\r\n//import 'react-widget-scrollview/lib/style/index.css';\r\nimport '../src/style/index.scss';\r\n\r\nimport Demo from './Demo';\r\n\r\n\r\nReactDOM.render(, demo);","// extracted by mini-css-extract-plugin","// extracted by mini-css-extract-plugin","import React from 'react';\r\nimport { findDOMNode } from 'react-dom';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport omit from 'object.omit';\r\nimport ListItem from './ListItem';\r\nimport ListItemGroup from './ListItemGroup';\r\nimport { isArray, isUndefined, isEqual, each } from './util';\r\nimport { hasClass, addClass, removeClass } from 'bplokjs-dom-utils/classes';\r\nimport scrollIntoView from 'bplokjs-dom-utils/scrollIntoView';\r\n\r\nfunction noop() { }\r\n\r\nfunction copy(data) {\r\n return isArray(data) ? [].concat(data) : data;\r\n}\r\n\r\nexport default class ListBox extends React.Component {\r\n\r\n static propTypes = {\r\n className: PropTypes.string,\r\n style: PropTypes.object,\r\n headerStyle: PropTypes.object,\r\n footerStyle: PropTypes.object,\r\n bodyStyle: PropTypes.object,\r\n prefixCls: PropTypes.string,\r\n valueField: PropTypes.string,\r\n labelField: PropTypes.string,\r\n childrenField: PropTypes.string,\r\n items: PropTypes.array,\r\n emptyLabel: PropTypes.any,\r\n multiple: PropTypes.bool,\r\n disabled: PropTypes.bool,\r\n autoFocus: PropTypes.bool,\r\n width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\r\n height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\r\n labelInValue: PropTypes.bool,\r\n tabIndex: PropTypes.number,\r\n enableDownUpSelect: PropTypes.bool,\r\n onItemClick: PropTypes.func,\r\n onChange: PropTypes.func,\r\n onFocus: PropTypes.func,\r\n onBlur: PropTypes.func,\r\n onKeyDown: PropTypes.func,\r\n renderHeader: PropTypes.func,\r\n renderFooter: PropTypes.func,\r\n wrapperComponent: PropTypes.node,\r\n headerWrapperComponent: PropTypes.node,\r\n bodyWrapperComponent: PropTypes.node,\r\n footerWrapperComponent: PropTypes.node,\r\n };\r\n\r\n static defaultProps = {\r\n prefixCls: 'rw-listbox',\r\n valueField: 'value',\r\n labelField: 'label',\r\n childrenField: 'children',\r\n labelInValue: false,\r\n tabIndex: 0,\r\n items: [],\r\n emptyLabel: null,\r\n enableDownUpSelect: true,\r\n onFocus: noop,\r\n onBlur: noop,\r\n onKeyDown: noop,\r\n wrapperComponent: \"div\",\r\n headerWrapperComponent: 'div',\r\n bodyWrapperComponent: 'div',\r\n footerWrapperComponent: 'div',\r\n };\r\n\r\n constructor(props) {\r\n super(props);\r\n\r\n const selectedValue = [];\r\n let value;\r\n\r\n // if (!isUndefined(props.value)) {\r\n // value = isArray(props.value) ? props.value : [props.value];\r\n // } else if (!isUndefined(props.defaultValue)) {\r\n // value = isArray(props.defaultValue) ? props.defaultValue : [props.defaultValue];\r\n // }\r\n\r\n if (!isUndefined(props.defaultValue)) {\r\n value = isArray(props.defaultValue) ? props.defaultValue : [props.defaultValue];\r\n }\r\n\r\n if (value) {\r\n selectedValue.push(...value);\r\n }\r\n\r\n //item 索引id\r\n this._itemIndex = 0;\r\n //索引值对应的item.value\r\n this._indexValueMap = {};\r\n this._activeIndex = null;\r\n\r\n\r\n this.state = {\r\n selectedValue,\r\n //items的value=>item对应表\r\n itemsMap: {}\r\n };\r\n }\r\n\r\n static getDerivedStateFromProps(nextProps, prevState) {\r\n const value = nextProps.value;\r\n\r\n if (!isUndefined(value)) {\r\n return {\r\n selectedValue: isArray(value) ? copy(value) : [value]\r\n };\r\n }\r\n\r\n return {};\r\n }\r\n\r\n // componentWillReceiveProps({ value }) {\r\n // if (!isUndefined(value)) {\r\n // this.setState({\r\n // selectedValue: isArray(value) ? copy(value) : [value]\r\n // });\r\n // }\r\n // }\r\n\r\n componentDidMount() {\r\n const { prefixCls, autoFocus } = this.props;\r\n const el = findDOMNode(this);\r\n //const scrollview = this.getListView();//this.refs.listbox;\r\n const selector = `.${prefixCls}-item-selected`;\r\n\r\n if (autoFocus) {\r\n this.focus();\r\n }\r\n\r\n const selectedItem = el.querySelector(selector);\r\n if (selectedItem) {\r\n scrollIntoView(selectedItem, this.getListViewBody());\r\n //scrollview.scrollIntoView(selectedItem);\r\n }\r\n }\r\n\r\n focus() {\r\n findDOMNode(this).focus();\r\n }\r\n\r\n blur() {\r\n findDOMNode(this).blur();\r\n }\r\n\r\n onItemClick = (item, e) => {\r\n const { onItemClick } = this.props;\r\n if (e) {\r\n scrollIntoView(e.target, this.getListViewBody());\r\n }\r\n //this.getListView().scrollIntoView(e.target);\r\n\r\n if (onItemClick) onItemClick(item);\r\n }\r\n\r\n transformChangeValue(value) {\r\n const { labelInValue } = this.props;\r\n const { itemsMap } = this.state;\r\n\r\n if (labelInValue) {\r\n return isArray(value) ?\r\n value.map(v => itemsMap[v]) :\r\n itemsMap[value];\r\n }\r\n\r\n return value;\r\n }\r\n\r\n setValue(value) {\r\n const { multiple, onChange } = this.props;\r\n const { selectedValue, itemsMap } = this.state;\r\n\r\n if (!multiple) {\r\n selectedValue.length = 0;\r\n }\r\n\r\n selectedValue.push(value);\r\n\r\n if (!('value' in this.props)) {\r\n this.setState({\r\n selectedValue\r\n })\r\n }\r\n\r\n if (onChange) {\r\n onChange(this.transformChangeValue(multiple ? copy(selectedValue) : selectedValue[0]));\r\n }\r\n }\r\n\r\n getVaule() {\r\n const { multiple } = this.props;\r\n const { selectedValue } = this.state;\r\n\r\n return this.transformChangeValue(multiple ? copy(selectedValue) : selectedValue[0]);\r\n }\r\n\r\n onItemSelect = (item, el) => {\r\n const valueField = 'value';\r\n this.setValue(item[valueField]);\r\n }\r\n\r\n onItemDeselect = (item, el) => {\r\n const { multiple, onChange, labelInValue } = this.props;\r\n const { selectedValue } = this.state;\r\n const valueField = 'value';\r\n\r\n if (!multiple) return;\r\n\r\n let newSelectedValue = selectedValue.filter((d) => !isEqual(item[valueField], d));\r\n\r\n if (!('value' in this.props)) {\r\n this.setState({\r\n selectedValue: newSelectedValue\r\n })\r\n }\r\n\r\n if (onChange) {\r\n onChange(this.transformChangeValue(copy(newSelectedValue)));\r\n }\r\n\r\n }\r\n\r\n onKeyDown = (e) => {\r\n const { prefixCls } = this.props;\r\n const selector = `.${prefixCls}-item:not(.${prefixCls}-item-disabled)`;\r\n const activeCls = `${prefixCls}-item-active`;\r\n const selectCls = `${prefixCls}-item-selected`;\r\n let list = null;//NodeList[]\r\n\r\n function getActiveIndex(keyCode) {\r\n let idx = -1;\r\n const UP = keyCode === 38;\r\n const DOWN = keyCode === 40;\r\n let sIdx = -1;\r\n\r\n if (list) {\r\n //ie no support NodeList.prototype.forEach\r\n each(list, (item, i) => {\r\n if (hasClass(item, activeCls)) {\r\n removeClass(item, activeCls);\r\n if (UP) {\r\n if (idx === -1) idx = i;\r\n } else {\r\n idx = i;\r\n }\r\n } else if (idx === -1 && hasClass(item, selectCls)) {\r\n sIdx = i;\r\n }\r\n })\r\n }\r\n\r\n return idx === -1 ? sIdx : idx;\r\n }\r\n\r\n const props = this.props;\r\n const state = this.state;\r\n const dom = findDOMNode(this);\r\n const UP = e.keyCode === 38;\r\n const DOWN = e.keyCode === 40;\r\n const ENTER = e.keyCode === 13;\r\n const indexValueMap = this._indexValueMap;\r\n const activeIndex = this._activeIndex;\r\n\r\n if (props.enableDownUpSelect) {\r\n props.onKeyDown(e);\r\n }\r\n\r\n if (!list) {\r\n list = dom.querySelectorAll(selector);\r\n }\r\n\r\n if (!list.length) return;\r\n\r\n const minIndex = 0;\r\n const maxIndex = list.length - 1;\r\n\r\n if (UP || DOWN) {\r\n e.preventDefault();\r\n let idx = getActiveIndex(e.keyCode);\r\n\r\n if (UP) {\r\n idx = idx === -1 ? maxIndex : --idx;\r\n if (idx < 0) idx = maxIndex;\r\n addClass(list[idx], activeCls);\r\n } else {\r\n idx = idx === -1 ? minIndex : ++idx;\r\n if (idx > maxIndex) idx = 0;\r\n addClass(list[idx], activeCls);\r\n }\r\n\r\n this._activeIndex = list[idx].getAttribute('data-index');\r\n scrollIntoView(list[idx], this.getListViewBody());\r\n //scrollview.scrollIntoView(list[idx]);\r\n } else if (ENTER && activeIndex !== null) {\r\n const value = indexValueMap[activeIndex];\r\n const item = state.itemsMap[value] || {};\r\n this.setValue(value);\r\n //触发onItemClick\r\n this.onItemClick({\r\n value,\r\n label: item[props.labelField]\r\n });\r\n }\r\n\r\n }\r\n\r\n renderListItems(items, selectedMap) {\r\n const { labelField, valueField, childrenField, prefixCls, disabled } = this.props;\r\n const { itemsMap } = this.state;\r\n\r\n return items.map(item => {\r\n if (typeof item === 'string' || typeof item === 'number') {\r\n item = {\r\n [labelField]: item,\r\n [valueField]: item,\r\n }\r\n }\r\n\r\n const isGroup = item[childrenField];\r\n const itemPrefixCls = `${prefixCls}-item`;\r\n const activeCls = `${prefixCls}-item-active`;\r\n let onMouseEnter = noop;\r\n let onMouseLeave = noop;\r\n let itemIndex = this._itemIndex++;\r\n\r\n if (!isGroup) {\r\n itemsMap[item[valueField]] = item;\r\n this._indexValueMap[itemIndex] = item[valueField];\r\n\r\n if (!disabled && !item.disabled) {\r\n onMouseEnter = e => {\r\n addClass(e.currentTarget, activeCls);\r\n }\r\n onMouseLeave = e => {\r\n removeClass(e.currentTarget, activeCls);\r\n }\r\n }\r\n }\r\n\r\n return !isGroup ? (\r\n \r\n {item[labelField]}\r\n \r\n ) : (\r\n \r\n {this.renderListItems(item[childrenField] || [], selectedMap)}\r\n \r\n );\r\n });\r\n }\r\n\r\n renderListChild(children, selectedMap) {\r\n const { labelField, valueField, childrenField, prefixCls, disabled } = this.props;\r\n const { itemsMap } = this.state;\r\n\r\n const itemPrefixCls = `${prefixCls}-item`;\r\n const activeCls = `${prefixCls}-item-active`;\r\n\r\n return React.Children.map(children, child => {\r\n const props = child.props;\r\n\r\n if (child.type.isListItemGroup) {\r\n return React.cloneElement(\r\n child,\r\n {\r\n prefixCls: `${itemPrefixCls}-group`\r\n },\r\n this.renderListChild(props.children, selectedMap)\r\n );\r\n }\r\n\r\n let onMouseEnter = noop;\r\n let onMouseLeave = noop;\r\n let itemIndex = this._itemIndex++;\r\n\r\n itemsMap[props[valueField]] = Object.assign(\r\n {},\r\n omit(props, ['children', 'selected', 'prefixCls']),\r\n { [labelField]: props.children }\r\n );\r\n this._indexValueMap[itemIndex] = props[valueField];\r\n\r\n if (!props.disabled && !disabled) {\r\n onMouseEnter = e => {\r\n addClass(e.currentTarget, activeCls);\r\n if (props.onMouseEnter) props.onMouseEnter(e);\r\n }\r\n onMouseLeave = e => {\r\n removeClass(e.currentTarget, activeCls);\r\n if (props.onMouseLeave) props.onMouseLeave(e);\r\n }\r\n }\r\n\r\n const newProps = {\r\n selected: selectedMap[props[valueField]],\r\n prefixCls: itemPrefixCls,\r\n 'data-index': itemIndex,\r\n onClick: this.onItemClick,\r\n onSelect: this.onItemSelect,\r\n onDeselect: this.onItemDeselect,\r\n onMouseEnter,\r\n onMouseLeave,\r\n };\r\n\r\n if (disabled) {\r\n newProps.disabled = true;\r\n }\r\n\r\n return React.cloneElement(child, newProps);\r\n });\r\n }\r\n\r\n renderList() {\r\n const { labelField, valueField, prefixCls, multiple, items, emptyLabel, children } = this.props;\r\n const { selectedValue } = this.state;\r\n\r\n this.state.itemsMap = {};\r\n\r\n const selectedMap = {};\r\n selectedValue.forEach(v => selectedMap[v] = true);\r\n\r\n this._itemIndex = 0;\r\n this._indexValueMap = {};\r\n this._activeIndex = null;\r\n\r\n const childs = items.length ?\r\n this.renderListItems(items, selectedMap) :\r\n this.renderListChild(children, selectedMap);\r\n\r\n return React.Children.count(childs) ? childs : emptyLabel;\r\n }\r\n\r\n saveListView = (node) => {\r\n this._listview = node;\r\n }\r\n\r\n saveListViewHeader = (node) => {\r\n this._listview_header = node;\r\n }\r\n\r\n saveListViewBody = (node) => {\r\n this._listview_body = node;\r\n }\r\n\r\n saveListViewFooter = (node) => {\r\n this._listview_footer = node;\r\n }\r\n\r\n getListView() {\r\n return findDOMNode(this._listview);\r\n }\r\n\r\n getListViewHeader() {\r\n return findDOMNode(this._listview_header);\r\n }\r\n\r\n getListViewBody() {\r\n return findDOMNode(this._listview_body);\r\n }\r\n\r\n getListViewFooter() {\r\n return findDOMNode(this._listview_footer);\r\n }\r\n\r\n render() {\r\n const {\r\n className,\r\n value,\r\n prefixCls,\r\n items,\r\n width,\r\n height,\r\n tabIndex,\r\n disabled,\r\n enableDownUpSelect,\r\n onKeyDown,\r\n onFocus,\r\n onBlur,\r\n style = {},\r\n bodyStyle = {},\r\n wrapperComponent: WrapperComponent,\r\n headerWrapperComponent: HeaderWrapperComponent,\r\n bodyWrapperComponent: BodyWrapperComponent,\r\n footerWrapperComponent: FooterWrapperComponent,\r\n renderHeader,\r\n renderFooter,\r\n headerStyle = {},\r\n footerStyle = {},\r\n } = this.props;\r\n\r\n if (width) {\r\n style.width = width;\r\n }\r\n if (height) {\r\n style.height = height;\r\n }\r\n\r\n const classes = classNames({\r\n [`${prefixCls}`]: true,\r\n [className]: className,\r\n [`${prefixCls}-disabled`]: disabled,\r\n });\r\n\r\n // scrollViewBodyCls={`${prefixCls}-body`}\r\n // scrollViewBodyStyle={scrollViewBodyStyle}\r\n\r\n return (\r\n \r\n {\r\n renderHeader ?\r\n \r\n {renderHeader()}\r\n :\r\n null\r\n }\r\n\r\n \r\n {this.renderList()}\r\n \r\n {\r\n renderFooter ?\r\n \r\n {renderFooter()}\r\n :\r\n null\r\n }\r\n \r\n );\r\n }\r\n\r\n}","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport shallowEqual from 'shallowequal';\r\nimport omit from 'object.omit';\r\n\r\nexport default class ListItem extends React.Component {\r\n\r\n static propTypes = {\r\n prefixCls: PropTypes.string,\r\n value: PropTypes.any,\r\n onSelect: PropTypes.func,\r\n onDeselect: PropTypes.func,\r\n onClick: PropTypes.func,\r\n selected: PropTypes.bool,\r\n disabled: PropTypes.bool,\r\n }\r\n\r\n static defaultProps = {\r\n prefixCls: 'rw-listbox-item',\r\n value: '',\r\n selected: false,\r\n disabled: false,\r\n }\r\n\r\n static isListItem = true;\r\n\r\n shouldComponentUpdate(nextProps, nextState, nextContext) {\r\n return !shallowEqual(this.props, nextProps) ||\r\n !shallowEqual(this.state, nextState);\r\n }\r\n\r\n handleItemClick = (e) => {\r\n const { onSelect, onDeselect, onClick, selected, disabled, value, children } = this.props;\r\n if (disabled) return;\r\n\r\n const item = {\r\n value,\r\n label: children\r\n };\r\n\r\n if (onClick) {\r\n onClick(item, e);\r\n }\r\n\r\n if (!selected) {\r\n onSelect && onSelect(item, this.refs.item)\r\n } else {\r\n onDeselect && onDeselect(item, this.refs.item)\r\n }\r\n }\r\n\r\n saveItem = (item) => {\r\n this.node = item;\r\n }\r\n\r\n render() {\r\n const { prefixCls, disabled, selected, active, children } = this.props;\r\n const classes = classNames({\r\n [`${prefixCls}`]: true,\r\n [`${prefixCls}-selected`]: selected,\r\n [`${prefixCls}-disabled`]: disabled,\r\n });\r\n\r\n const others = omit(this.props, Object.keys(ListItem.propTypes));\r\n\r\n return \r\n {children}\r\n ;\r\n }\r\n\r\n}","import React from 'react';\r\n//import PropTypes from 'prop-types';\r\n\r\nexport default class ItemGroup extends React.Component {\r\n\r\n static defaultProps = {\r\n prefixCls: 'rw-listbox-item-group',\r\n label: '',\r\n };\r\n\r\n static isListItemGroup = true;\r\n\r\n render() {\r\n const { prefixCls, label, children } = this.props;\r\n return (\r\n
\r\n
{label}
\r\n
\r\n {children}\r\n
\r\n
\r\n );\r\n }\r\n\r\n}\r\n","import ListBox from './ListBox';\r\nimport ListItem from './ListItem';\r\nimport ListItemGroup from './ListItemGroup';\r\n\r\nexport {\r\n ListBox,\r\n ListItem,\r\n ListItemGroup\r\n}\r\n\r\nListBox.ListItemGroup = ListItemGroup;\r\nListBox.ListItem = ListItem;\r\n\r\nexport default ListBox;\r\n","// extracted by mini-css-extract-plugin","\r\nvar ObjProto = Object.prototype\r\n\r\nvar toString = ObjProto.toString;\r\n\r\nvar\r\n nativeIsArray = Array.isArray;\r\n\r\nexport function isNumber(obj) {\r\n return typeof obj === 'number';\r\n}\r\n\r\nexport var isArray = nativeIsArray ? nativeIsArray : function (value) {\r\n return toString.call(value) === '[object Array]';\r\n}\r\n\r\nexport function isUndefined(obj) {\r\n return obj === undefined;\r\n}\r\n\r\n\r\nexport function isEqual(a, b) {\r\n return String(a) === String(b);\r\n}\r\n\r\nexport function noop() { }\r\n\r\n\r\nexport function each(obj, iterator, context) {\r\n if (obj == null) return obj;\r\n\r\n var i, length, hasContext = context === void 0 ? false : true;\r\n\r\n for (i = 0, length = obj.length; i < length; i++) {\r\n if (iterator.call(hasContext ? context : obj[i], obj[i], i, obj) === false) break;\r\n }\r\n\r\n return obj;\r\n}\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/docs/static/js/index.ed336b3c.js.map b/docs/static/js/index.ed336b3c.js.map deleted file mode 100644 index 1c29788..0000000 --- a/docs/static/js/index.ed336b3c.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./examples/Demo.js","webpack:///./examples/DemoList.js","webpack:///./examples/demos/demo1.js","webpack:///./examples/index.js","webpack:///./examples/style/animate.scss?bdcb","webpack:///./examples/style/index.scss?2d25","webpack:///./src/ListBox.js","webpack:///./src/ListItem.js","webpack:///./src/ListItemGroup.js","webpack:///./src/index.js","webpack:///./src/style/index.scss?9cab","webpack:///./src/util.js"],"names":["Demo","current","DemoList","item","e","setState","state","map","i","onDemoChange","bind","label","Component","component","Demo1","ListItem","ListBox","ListItemGroup","dataset","uuid","items","d","push","j","value","disabled","DEMO","console","log","maxWidth","maxHeight","height","borderBottom","borderTop","handleChange","filter","indexOf","filterMsg","handleChange2","position","right","top","ReactDOM","render","demo","noop","copy","data","concat","props","onItemClick","target","getListViewBody","el","valueField","setValue","multiple","onChange","labelInValue","selectedValue","newSelectedValue","transformChangeValue","prefixCls","selector","activeCls","selectCls","list","getActiveIndex","keyCode","idx","UP","DOWN","sIdx","dom","ENTER","indexValueMap","_indexValueMap","activeIndex","_activeIndex","enableDownUpSelect","onKeyDown","querySelectorAll","length","minIndex","maxIndex","preventDefault","getAttribute","itemsMap","labelField","node","_listview","_listview_header","_listview_body","_listview_footer","defaultValue","_itemIndex","autoFocus","focus","selectedItem","querySelector","blur","v","selectedMap","itemsField","isGroup","itemPrefixCls","onMouseEnter","onMouseLeave","itemIndex","currentTarget","onItemSelect","onItemDeselect","renderListItems","children","React","Children","child","type","isListItemGroup","cloneElement","renderListChild","newProps","selected","onClick","onSelect","onDeselect","emptyLabel","forEach","childs","count","className","width","tabIndex","onFocus","onBlur","style","bodyStyle","WrapperComponent","wrapperComponent","HeaderWrapperComponent","headerWrapperComponent","BodyWrapperComponent","bodyWrapperComponent","FooterWrapperComponent","footerWrapperComponent","renderHeader","renderFooter","headerStyle","footerStyle","classes","saveListView","saveListViewHeader","saveListViewBody","renderList","saveListViewFooter","nextProps","prevState","PropTypes","string","object","array","any","bool","oneOfType","number","func","refs","nextState","nextContext","active","others","propTypes","saveItem","handleItemClick","ItemGroup","ObjProto","Object","prototype","toString","nativeIsArray","isNumber","obj","isArray","call","isUndefined","undefined","isEqual","a","b","String","each","iterator","context","hasContext"],"mappings":";AAAA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAQ,oBAAoB;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,yBAAiB,4BAA4B;AAC7C;AACA;AACA,0BAAkB,2BAA2B;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAgC;AAC1E;AACA;;AAEA;AACA;AACA;AACA,gEAAwD,kBAAkB;AAC1E;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA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ASgK,WAAT,CAAqBH,GAArB,EAA0B;AAC7B,SAAOA,GAAG,KAAKI,SAAf;AACH;;AAGM,SAASC,OAAT,CAAiBC,CAAjB,EAAoBC,CAApB,EAAuB;AAC1B,SAAOC,MAAM,CAACF,CAAD,CAAN,KAAcE,MAAM,CAACD,CAAD,CAA3B;AACH;;AAEM,SAAS/I,IAAT,GAAgB,CAAG;;AAGnB,SAASiJ,IAAT,CAAcT,GAAd,EAAmBU,QAAnB,EAA6BC,OAA7B,EAAsC;AACzC,MAAIX,GAAG,IAAI,IAAX,EAAiB,OAAOA,GAAP;AAEjB,MAAI7K,CAAJ;AAAA,MAAO0E,MAAP;AAAA,MAAe+G,UAAU,GAAGD,OAAO,KAAK,KAAK,CAAjB,GAAqB,KAArB,GAA6B,IAAzD;;AAEA,OAAKxL,CAAC,GAAG,CAAJ,EAAO0E,MAAM,GAAGmG,GAAG,CAACnG,MAAzB,EAAiC1E,CAAC,GAAG0E,MAArC,EAA6C1E,CAAC,EAA9C,EAAkD;AAC9C,QAAIuL,QAAQ,CAACR,IAAT,CAAcU,UAAU,GAAGD,OAAH,GAAaX,GAAG,CAAC7K,CAAD,CAAxC,EAA6C6K,GAAG,CAAC7K,CAAD,CAAhD,EAAqDA,CAArD,EAAwD6K,GAAxD,MAAiE,KAArE,EAA4E;AAC/E;;AAED,SAAOA,GAAP;AACH,C","file":"static\\js\\index.ed336b3c.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"index\": 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([0,\"vendors\"]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","import React, { Component } from 'react';\r\nimport DemoList from './DemoList';\r\n\r\nexport default class Demo extends Component {\r\n\r\n state = {\r\n current: DemoList[0]\r\n }\r\n\r\n onDemoChange(item, e) {\r\n this.setState({\r\n current: item\r\n });\r\n }\r\n\r\n render() {\r\n const { current } = this.state;\r\n return (\r\n
\r\n
\r\n {\r\n DemoList.map((item, i) => {\r\n return (\r\n \r\n {item.label}\r\n
\r\n );\r\n })\r\n }\r\n
\r\n
\r\n {current ? : null}\r\n
\r\n \r\n )\r\n }\r\n}","import Demo1 from './demos/demo1';\r\n// import Demo2 from './demos/Demo2';\r\n// import Demo3 from './demos/Demo3';\r\n// import Demo4 from './demos/Demo4';\r\n\r\nexport default [\r\n {\r\n label: '基本功能',\r\n component: Demo1\r\n }\r\n]","import React, { Component } from 'react';\r\nimport ListBox from '../../src';\r\n\r\nconst { ListItem, ListItemGroup } = ListBox\r\n\r\nconst dataset = [];\r\n\r\nvar uuid = 100;\r\n\r\nfor (let i = 0; i < 10; i++) {\r\n const items = [];\r\n const d = {\r\n items,\r\n label: '分组' + (i + 1)\r\n }\r\n\r\n dataset.push(d)\r\n\r\n for (let j = 0; j < 40; j++) {\r\n let d = {\r\n value: uuid++,\r\n label: '选项' + (j + 1),\r\n disabled: j % 2\r\n }\r\n items.push(d)\r\n }\r\n}\r\n\r\n\r\nexport default class DEMO extends Component {\r\n\r\n state = {\r\n value: 2\r\n }\r\n\r\n\r\n handleChange = (value) => {\r\n this.setState({\r\n value\r\n })\r\n\r\n console.log('changed ', value)\r\n }\r\n\r\n handleChange2 = (value) => {\r\n console.log('changed ', value)\r\n }\r\n\r\n filterMsg = ''\r\n\r\n render() {\r\n\r\n return (\r\n
\r\n

header

}\r\n renderFooter={() =>

footer

}\r\n headerStyle={{\r\n borderBottom: '1px solid #ccc'\r\n }}\r\n footerStyle={{\r\n borderTop: '1px solid #ccc'\r\n }}\r\n value={this.state.value}\r\n onChange={this.handleChange}\r\n items={dataset.filter((item, i) => item.label.indexOf(this.filterMsg) >= 0)}\r\n emptyLabel=\"无匹配项\"\r\n />\r\n\r\n \r\n \r\n V01Hot\r\n V02\r\n V03\r\n V04\r\n \r\n \r\n X01\r\n X02\r\n X03\r\n X04\r\n \r\n \r\n
\r\n );\r\n }\r\n\r\n}\r\n","import React from 'react'\r\nimport ReactDOM from 'react-dom';\r\n\r\nimport './style/index.scss';\r\nimport './style/animate.scss';\r\n\r\n//import 'react-widget-scrollview/lib/style/index.css';\r\nimport '../src/style/index.scss';\r\n\r\nimport Demo from './Demo';\r\n\r\n\r\nReactDOM.render(, demo);","// extracted by mini-css-extract-plugin","// extracted by mini-css-extract-plugin","import React from 'react';\r\nimport { findDOMNode } from 'react-dom';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport omit from 'object.omit';\r\nimport ListItem from './ListItem';\r\nimport ListItemGroup from './ListItemGroup';\r\nimport { isArray, isUndefined, isEqual, each } from './util';\r\nimport { hasClass, addClass, removeClass } from 'bplokjs-dom-utils/classes';\r\nimport scrollIntoView from 'bplokjs-dom-utils/scrollIntoView';\r\n\r\nfunction noop() { }\r\n\r\nfunction copy(data) {\r\n return isArray(data) ? [].concat(data) : data;\r\n}\r\n\r\nexport default class ListBox extends React.Component {\r\n\r\n static propTypes = {\r\n className: PropTypes.string,\r\n style: PropTypes.object,\r\n headerStyle: PropTypes.object,\r\n footerStyle: PropTypes.object,\r\n bodyStyle: PropTypes.object,\r\n prefixCls: PropTypes.string,\r\n valueField: PropTypes.string,\r\n labelField: PropTypes.string,\r\n itemsField: PropTypes.string,\r\n items: PropTypes.array,\r\n emptyLabel: PropTypes.any,\r\n multiple: PropTypes.bool,\r\n disabled: PropTypes.bool,\r\n autoFocus: PropTypes.bool,\r\n width: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\r\n height: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\r\n labelInValue: PropTypes.bool,\r\n tabIndex: PropTypes.number,\r\n enableDownUpSelect: PropTypes.bool,\r\n onItemClick: PropTypes.func,\r\n onChange: PropTypes.func,\r\n onFocus: PropTypes.func,\r\n onBlur: PropTypes.func,\r\n onKeyDown: PropTypes.func,\r\n renderHeader: PropTypes.func,\r\n renderFooter: PropTypes.func,\r\n wrapperComponent: PropTypes.node,\r\n headerWrapperComponent: PropTypes.node,\r\n bodyWrapperComponent: PropTypes.node,\r\n footerWrapperComponent: PropTypes.node,\r\n };\r\n\r\n static defaultProps = {\r\n prefixCls: 'rw-listbox',\r\n valueField: 'value',\r\n labelField: 'label',\r\n itemsField: 'items',\r\n labelInValue: false,\r\n tabIndex: 0,\r\n items: [],\r\n emptyLabel: null,\r\n enableDownUpSelect: true,\r\n onFocus: noop,\r\n onBlur: noop,\r\n onKeyDown: noop,\r\n wrapperComponent: \"div\",\r\n headerWrapperComponent: 'div',\r\n bodyWrapperComponent: 'div',\r\n footerWrapperComponent: 'div',\r\n };\r\n\r\n constructor(props) {\r\n super(props);\r\n\r\n const selectedValue = [];\r\n let value;\r\n\r\n // if (!isUndefined(props.value)) {\r\n // value = isArray(props.value) ? props.value : [props.value];\r\n // } else if (!isUndefined(props.defaultValue)) {\r\n // value = isArray(props.defaultValue) ? props.defaultValue : [props.defaultValue];\r\n // }\r\n\r\n if (!isUndefined(props.defaultValue)) {\r\n value = isArray(props.defaultValue) ? props.defaultValue : [props.defaultValue];\r\n }\r\n\r\n if (value) {\r\n selectedValue.push(...value);\r\n }\r\n\r\n //item 索引id\r\n this._itemIndex = 0;\r\n //索引值对应的item.value\r\n this._indexValueMap = {};\r\n this._activeIndex = null;\r\n\r\n\r\n this.state = {\r\n selectedValue,\r\n //items的value=>item对应表\r\n itemsMap: {}\r\n };\r\n }\r\n\r\n static getDerivedStateFromProps(nextProps, prevState) {\r\n const value = nextProps.value;\r\n\r\n if (!isUndefined(value)) {\r\n return {\r\n selectedValue: isArray(value) ? copy(value) : [value]\r\n };\r\n }\r\n\r\n return {};\r\n }\r\n\r\n // componentWillReceiveProps({ value }) {\r\n // if (!isUndefined(value)) {\r\n // this.setState({\r\n // selectedValue: isArray(value) ? copy(value) : [value]\r\n // });\r\n // }\r\n // }\r\n\r\n componentDidMount() {\r\n const { prefixCls, autoFocus } = this.props;\r\n const el = findDOMNode(this);\r\n //const scrollview = this.getListView();//this.refs.listbox;\r\n const selector = `.${prefixCls}-item-selected`;\r\n\r\n if (autoFocus) {\r\n this.focus();\r\n }\r\n\r\n const selectedItem = el.querySelector(selector);\r\n if (selectedItem) {\r\n scrollIntoView(selectedItem, this.getListViewBody());\r\n //scrollview.scrollIntoView(selectedItem);\r\n }\r\n }\r\n\r\n focus() {\r\n findDOMNode(this).focus();\r\n }\r\n\r\n blur() {\r\n findDOMNode(this).blur();\r\n }\r\n\r\n onItemClick = (item, e) => {\r\n const { onItemClick } = this.props;\r\n if (e) {\r\n scrollIntoView(e.target, this.getListViewBody());\r\n }\r\n //this.getListView().scrollIntoView(e.target);\r\n\r\n if (onItemClick) onItemClick(item);\r\n }\r\n\r\n transformChangeValue(value) {\r\n const { labelInValue } = this.props;\r\n const { itemsMap } = this.state;\r\n\r\n if (labelInValue) {\r\n return isArray(value) ?\r\n value.map(v => itemsMap[v]) :\r\n itemsMap[value];\r\n }\r\n\r\n return value;\r\n }\r\n\r\n setValue(value) {\r\n const { multiple, onChange } = this.props;\r\n const { selectedValue, itemsMap } = this.state;\r\n\r\n if (!multiple) {\r\n selectedValue.length = 0;\r\n }\r\n\r\n selectedValue.push(value);\r\n\r\n if (!('value' in this.props)) {\r\n this.setState({\r\n selectedValue\r\n })\r\n }\r\n\r\n if (onChange) {\r\n onChange(this.transformChangeValue(multiple ? copy(selectedValue) : selectedValue[0]));\r\n }\r\n }\r\n\r\n getVaule() {\r\n const { multiple } = this.props;\r\n const { selectedValue } = this.state;\r\n\r\n return this.transformChangeValue(multiple ? copy(selectedValue) : selectedValue[0]);\r\n }\r\n\r\n onItemSelect = (item, el) => {\r\n const valueField = 'value';\r\n this.setValue(item[valueField]);\r\n }\r\n\r\n onItemDeselect = (item, el) => {\r\n const { multiple, onChange, labelInValue } = this.props;\r\n const { selectedValue } = this.state;\r\n const valueField = 'value';\r\n\r\n if (!multiple) return;\r\n\r\n let newSelectedValue = selectedValue.filter((d) => !isEqual(item[valueField], d));\r\n\r\n if (!('value' in this.props)) {\r\n this.setState({\r\n selectedValue: newSelectedValue\r\n })\r\n }\r\n\r\n if (onChange) {\r\n onChange(this.transformChangeValue(copy(newSelectedValue)));\r\n }\r\n\r\n }\r\n\r\n onKeyDown = (e) => {\r\n const { prefixCls } = this.props;\r\n const selector = `.${prefixCls}-item:not(.${prefixCls}-item-disabled)`;\r\n const activeCls = `${prefixCls}-item-active`;\r\n const selectCls = `${prefixCls}-item-selected`;\r\n let list = null;//NodeList[]\r\n\r\n function getActiveIndex(keyCode) {\r\n let idx = -1;\r\n const UP = keyCode === 38;\r\n const DOWN = keyCode === 40;\r\n let sIdx = -1;\r\n\r\n if (list) {\r\n //ie no support NodeList.prototype.forEach\r\n each(list, (item, i) => {\r\n if (hasClass(item, activeCls)) {\r\n removeClass(item, activeCls);\r\n if (UP) {\r\n if (idx === -1) idx = i;\r\n } else {\r\n idx = i;\r\n }\r\n } else if (idx === -1 && hasClass(item, selectCls)) {\r\n sIdx = i;\r\n }\r\n })\r\n }\r\n\r\n return idx === -1 ? sIdx : idx;\r\n }\r\n\r\n const props = this.props;\r\n const state = this.state;\r\n const dom = findDOMNode(this);\r\n const UP = e.keyCode === 38;\r\n const DOWN = e.keyCode === 40;\r\n const ENTER = e.keyCode === 13;\r\n const indexValueMap = this._indexValueMap;\r\n const activeIndex = this._activeIndex;\r\n\r\n if (props.enableDownUpSelect) {\r\n props.onKeyDown(e);\r\n }\r\n\r\n if (!list) {\r\n list = dom.querySelectorAll(selector);\r\n }\r\n\r\n if (!list.length) return;\r\n\r\n const minIndex = 0;\r\n const maxIndex = list.length - 1;\r\n\r\n if (UP || DOWN) {\r\n e.preventDefault();\r\n let idx = getActiveIndex(e.keyCode);\r\n\r\n if (UP) {\r\n idx = idx === -1 ? maxIndex : --idx;\r\n if (idx < 0) idx = maxIndex;\r\n addClass(list[idx], activeCls);\r\n } else {\r\n idx = idx === -1 ? minIndex : ++idx;\r\n if (idx > maxIndex) idx = 0;\r\n addClass(list[idx], activeCls);\r\n }\r\n\r\n this._activeIndex = list[idx].getAttribute('data-index');\r\n scrollIntoView(list[idx], this.getListViewBody());\r\n //scrollview.scrollIntoView(list[idx]);\r\n } else if (ENTER && activeIndex !== null) {\r\n const value = indexValueMap[activeIndex];\r\n const item = state.itemsMap[value] || {};\r\n this.setValue(value);\r\n //触发onItemClick\r\n this.onItemClick({\r\n value,\r\n label: item[props.labelField]\r\n });\r\n }\r\n\r\n }\r\n\r\n renderListItems(items, selectedMap) {\r\n const { labelField, valueField, itemsField, prefixCls, disabled } = this.props;\r\n const { itemsMap } = this.state;\r\n\r\n return items.map(item => {\r\n if (typeof item === 'string' || typeof item === 'number') {\r\n item = {\r\n [labelField]: item,\r\n [valueField]: item,\r\n }\r\n }\r\n\r\n const isGroup = item[itemsField];\r\n const itemPrefixCls = `${prefixCls}-item`;\r\n const activeCls = `${prefixCls}-item-active`;\r\n let onMouseEnter = noop;\r\n let onMouseLeave = noop;\r\n let itemIndex = this._itemIndex++;\r\n\r\n if (!isGroup) {\r\n itemsMap[item[valueField]] = item;\r\n this._indexValueMap[itemIndex] = item[valueField];\r\n\r\n if (!disabled && !item.disabled) {\r\n onMouseEnter = e => {\r\n addClass(e.currentTarget, activeCls);\r\n }\r\n onMouseLeave = e => {\r\n removeClass(e.currentTarget, activeCls);\r\n }\r\n }\r\n }\r\n\r\n return !isGroup ? (\r\n \r\n {item[labelField]}\r\n \r\n ) : (\r\n \r\n {this.renderListItems(item[itemsField] || [], selectedMap)}\r\n \r\n );\r\n });\r\n }\r\n\r\n renderListChild(children, selectedMap) {\r\n const { labelField, valueField, itemsField, prefixCls, disabled } = this.props;\r\n const { itemsMap } = this.state;\r\n\r\n const itemPrefixCls = `${prefixCls}-item`;\r\n const activeCls = `${prefixCls}-item-active`;\r\n\r\n return React.Children.map(children, child => {\r\n const props = child.props;\r\n\r\n if (child.type.isListItemGroup) {\r\n return React.cloneElement(\r\n child,\r\n {\r\n prefixCls: `${itemPrefixCls}-group`\r\n },\r\n this.renderListChild(props.children, selectedMap)\r\n );\r\n }\r\n\r\n let onMouseEnter = noop;\r\n let onMouseLeave = noop;\r\n let itemIndex = this._itemIndex++;\r\n\r\n itemsMap[props[valueField]] = Object.assign(\r\n {},\r\n omit(props, ['children', 'selected', 'prefixCls']),\r\n { [labelField]: props.children }\r\n );\r\n this._indexValueMap[itemIndex] = props[valueField];\r\n\r\n if (!props.disabled && !disabled) {\r\n onMouseEnter = e => {\r\n addClass(e.currentTarget, activeCls);\r\n if (props.onMouseEnter) props.onMouseEnter(e);\r\n }\r\n onMouseLeave = e => {\r\n removeClass(e.currentTarget, activeCls);\r\n if (props.onMouseLeave) props.onMouseLeave(e);\r\n }\r\n }\r\n\r\n const newProps = {\r\n selected: selectedMap[props[valueField]],\r\n prefixCls: itemPrefixCls,\r\n 'data-index': itemIndex,\r\n onClick: this.onItemClick,\r\n onSelect: this.onItemSelect,\r\n onDeselect: this.onItemDeselect,\r\n onMouseEnter,\r\n onMouseLeave,\r\n };\r\n\r\n if (disabled) {\r\n newProps.disabled = true;\r\n }\r\n\r\n return React.cloneElement(child, newProps);\r\n });\r\n }\r\n\r\n renderList() {\r\n const { labelField, valueField, prefixCls, multiple, items, emptyLabel, children } = this.props;\r\n const { selectedValue } = this.state;\r\n\r\n this.state.itemsMap = {};\r\n\r\n const selectedMap = {};\r\n selectedValue.forEach(v => selectedMap[v] = true);\r\n\r\n this._itemIndex = 0;\r\n this._indexValueMap = {};\r\n this._activeIndex = null;\r\n\r\n const childs = items.length ?\r\n this.renderListItems(items, selectedMap) :\r\n this.renderListChild(children, selectedMap);\r\n\r\n return React.Children.count(childs) ? childs : emptyLabel;\r\n }\r\n\r\n saveListView = (node) => {\r\n this._listview = node;\r\n }\r\n\r\n saveListViewHeader = (node) => {\r\n this._listview_header = node;\r\n }\r\n\r\n saveListViewBody = (node) => {\r\n this._listview_body = node;\r\n }\r\n\r\n saveListViewFooter = (node) => {\r\n this._listview_footer = node;\r\n }\r\n\r\n getListView() {\r\n return findDOMNode(this._listview);\r\n }\r\n\r\n getListViewHeader() {\r\n return findDOMNode(this._listview_header);\r\n }\r\n\r\n getListViewBody() {\r\n return findDOMNode(this._listview_body);\r\n }\r\n\r\n getListViewFooter() {\r\n return findDOMNode(this._listview_footer);\r\n }\r\n\r\n render() {\r\n const {\r\n className,\r\n value,\r\n prefixCls,\r\n items,\r\n width,\r\n height,\r\n tabIndex,\r\n disabled,\r\n enableDownUpSelect,\r\n onKeyDown,\r\n onFocus,\r\n onBlur,\r\n style = {},\r\n bodyStyle = {},\r\n wrapperComponent: WrapperComponent,\r\n headerWrapperComponent: HeaderWrapperComponent,\r\n bodyWrapperComponent: BodyWrapperComponent,\r\n footerWrapperComponent: FooterWrapperComponent,\r\n renderHeader,\r\n renderFooter,\r\n headerStyle = {},\r\n footerStyle = {},\r\n } = this.props;\r\n\r\n if (width) {\r\n style.width = width;\r\n }\r\n if (height) {\r\n style.height = height;\r\n }\r\n\r\n const classes = classNames({\r\n [`${prefixCls}`]: true,\r\n [className]: className,\r\n [`${prefixCls}-disabled`]: disabled,\r\n });\r\n\r\n // scrollViewBodyCls={`${prefixCls}-body`}\r\n // scrollViewBodyStyle={scrollViewBodyStyle}\r\n\r\n return (\r\n \r\n {\r\n renderHeader ?\r\n \r\n {renderHeader()}\r\n :\r\n null\r\n }\r\n\r\n \r\n {this.renderList()}\r\n \r\n {\r\n renderFooter ?\r\n \r\n {renderFooter()}\r\n :\r\n null\r\n }\r\n \r\n );\r\n }\r\n\r\n}","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\nimport shallowEqual from 'shallowequal';\r\nimport omit from 'object.omit';\r\n\r\nexport default class ListItem extends React.Component {\r\n\r\n static propTypes = {\r\n prefixCls: PropTypes.string,\r\n value: PropTypes.any,\r\n onSelect: PropTypes.func,\r\n onDeselect: PropTypes.func,\r\n onClick: PropTypes.func,\r\n selected: PropTypes.bool,\r\n disabled: PropTypes.bool,\r\n }\r\n\r\n static defaultProps = {\r\n prefixCls: 'rw-listbox-item',\r\n value: '',\r\n selected: false,\r\n disabled: false,\r\n }\r\n\r\n static isListItem = true;\r\n\r\n shouldComponentUpdate(nextProps, nextState, nextContext) {\r\n return !shallowEqual(this.props, nextProps) ||\r\n !shallowEqual(this.state, nextState);\r\n }\r\n\r\n handleItemClick = (e) => {\r\n const { onSelect, onDeselect, onClick, selected, disabled, value, children } = this.props;\r\n if (disabled) return;\r\n\r\n const item = {\r\n value,\r\n label: children\r\n };\r\n\r\n if (onClick) {\r\n onClick(item, e);\r\n }\r\n\r\n if (!selected) {\r\n onSelect && onSelect(item, this.refs.item)\r\n } else {\r\n onDeselect && onDeselect(item, this.refs.item)\r\n }\r\n }\r\n\r\n saveItem = (item) => {\r\n this.node = item;\r\n }\r\n\r\n render() {\r\n const { prefixCls, disabled, selected, active, children } = this.props;\r\n const classes = classNames({\r\n [`${prefixCls}`]: true,\r\n [`${prefixCls}-selected`]: selected,\r\n [`${prefixCls}-disabled`]: disabled,\r\n });\r\n\r\n const others = omit(this.props, Object.keys(ListItem.propTypes));\r\n\r\n return \r\n {children}\r\n ;\r\n }\r\n\r\n}","import React from 'react';\r\n//import PropTypes from 'prop-types';\r\n\r\nexport default class ItemGroup extends React.Component {\r\n\r\n static defaultProps = {\r\n prefixCls: 'rw-listbox-item-group',\r\n label: '',\r\n };\r\n\r\n static isListItemGroup = true;\r\n\r\n render() {\r\n const { prefixCls, label, children } = this.props;\r\n return (\r\n
\r\n
{label}
\r\n
\r\n {children}\r\n
\r\n
\r\n );\r\n }\r\n\r\n}\r\n","import ListBox from './ListBox';\r\nimport ListItem from './ListItem';\r\nimport ListItemGroup from './ListItemGroup';\r\n\r\nexport {\r\n ListBox,\r\n ListItem,\r\n ListItemGroup\r\n}\r\n\r\nListBox.ListItemGroup = ListItemGroup;\r\nListBox.ListItem = ListItem;\r\n\r\nexport default ListBox;\r\n","// extracted by mini-css-extract-plugin","\r\nvar ObjProto = Object.prototype\r\n\r\nvar toString = ObjProto.toString;\r\n\r\nvar\r\n nativeIsArray = Array.isArray;\r\n\r\nexport function isNumber(obj) {\r\n return typeof obj === 'number';\r\n}\r\n\r\nexport var isArray = nativeIsArray ? nativeIsArray : function (value) {\r\n return toString.call(value) === '[object Array]';\r\n}\r\n\r\nexport function isUndefined(obj) {\r\n return obj === undefined;\r\n}\r\n\r\n\r\nexport function isEqual(a, b) {\r\n return String(a) === String(b);\r\n}\r\n\r\nexport function noop() { }\r\n\r\n\r\nexport function each(obj, iterator, context) {\r\n if (obj == null) return obj;\r\n\r\n var i, length, hasContext = context === void 0 ? false : true;\r\n\r\n for (i = 0, length = obj.length; i < length; i++) {\r\n if (iterator.call(hasContext ? context : obj[i], obj[i], i, obj) === false) break;\r\n }\r\n\r\n return obj;\r\n}\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/examples/demos/demo1.js b/examples/demos/demo1.js index dab3c35..74eed15 100644 --- a/examples/demos/demo1.js +++ b/examples/demos/demo1.js @@ -10,7 +10,7 @@ var uuid = 100; for (let i = 0; i < 10; i++) { const items = []; const d = { - items, + children: items, label: '分组' + (i + 1) } diff --git a/lib/ListBox.js b/lib/ListBox.js index 02b5a54..d8c0125 100644 --- a/lib/ListBox.js +++ b/lib/ListBox.js @@ -316,7 +316,7 @@ function (_React$Component) { var _this$props4 = this.props, labelField = _this$props4.labelField, valueField = _this$props4.valueField, - itemsField = _this$props4.itemsField, + childrenField = _this$props4.childrenField, prefixCls = _this$props4.prefixCls, disabled = _this$props4.disabled; var itemsMap = this.state.itemsMap; @@ -327,7 +327,7 @@ function (_React$Component) { item = (_item = {}, (0, _defineProperty2.default)(_item, labelField, item), (0, _defineProperty2.default)(_item, valueField, item), _item); } - var isGroup = item[itemsField]; + var isGroup = item[childrenField]; var itemPrefixCls = "".concat(prefixCls, "-item"); var activeCls = "".concat(prefixCls, "-item-active"); var onMouseEnter = noop; @@ -365,7 +365,7 @@ function (_React$Component) { prefixCls: "".concat(itemPrefixCls, "-group"), key: item[labelField], label: item[labelField] - }, _this2.renderListItems(item[itemsField] || [], selectedMap)); + }, _this2.renderListItems(item[childrenField] || [], selectedMap)); }); } }, { @@ -376,7 +376,7 @@ function (_React$Component) { var _this$props5 = this.props, labelField = _this$props5.labelField, valueField = _this$props5.valueField, - itemsField = _this$props5.itemsField, + childrenField = _this$props5.childrenField, prefixCls = _this$props5.prefixCls, disabled = _this$props5.disabled; var itemsMap = this.state.itemsMap; @@ -563,7 +563,7 @@ exports.default = ListBox; prefixCls: _propTypes.default.string, valueField: _propTypes.default.string, labelField: _propTypes.default.string, - itemsField: _propTypes.default.string, + childrenField: _propTypes.default.string, items: _propTypes.default.array, emptyLabel: _propTypes.default.any, multiple: _propTypes.default.bool, @@ -590,7 +590,7 @@ exports.default = ListBox; prefixCls: 'rw-listbox', valueField: 'value', labelField: 'label', - itemsField: 'items', + childrenField: 'children', labelInValue: false, tabIndex: 0, items: [], diff --git a/package.json b/package.json index 5476d7d..ef6d0b7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-widget-listbox", - "version": "1.0.2", + "version": "1.0.3", "description": "", "main": "index.js", "repository": { @@ -87,4 +87,4 @@ "transform-es": "^2.2.9", "url-loader": "^1.1.2" } -} +} \ No newline at end of file diff --git a/src/ListBox.js b/src/ListBox.js index ef99388..3f0e739 100644 --- a/src/ListBox.js +++ b/src/ListBox.js @@ -26,7 +26,7 @@ export default class ListBox extends React.Component { prefixCls: PropTypes.string, valueField: PropTypes.string, labelField: PropTypes.string, - itemsField: PropTypes.string, + childrenField: PropTypes.string, items: PropTypes.array, emptyLabel: PropTypes.any, multiple: PropTypes.bool, @@ -54,7 +54,7 @@ export default class ListBox extends React.Component { prefixCls: 'rw-listbox', valueField: 'value', labelField: 'label', - itemsField: 'items', + childrenField: 'children', labelInValue: false, tabIndex: 0, items: [], @@ -310,7 +310,7 @@ export default class ListBox extends React.Component { } renderListItems(items, selectedMap) { - const { labelField, valueField, itemsField, prefixCls, disabled } = this.props; + const { labelField, valueField, childrenField, prefixCls, disabled } = this.props; const { itemsMap } = this.state; return items.map(item => { @@ -321,7 +321,7 @@ export default class ListBox extends React.Component { } } - const isGroup = item[itemsField]; + const isGroup = item[childrenField]; const itemPrefixCls = `${prefixCls}-item`; const activeCls = `${prefixCls}-item-active`; let onMouseEnter = noop; @@ -364,14 +364,14 @@ export default class ListBox extends React.Component { key={item[labelField]} label={item[labelField]} > - {this.renderListItems(item[itemsField] || [], selectedMap)} + {this.renderListItems(item[childrenField] || [], selectedMap)} ); }); } renderListChild(children, selectedMap) { - const { labelField, valueField, itemsField, prefixCls, disabled } = this.props; + const { labelField, valueField, childrenField, prefixCls, disabled } = this.props; const { itemsMap } = this.state; const itemPrefixCls = `${prefixCls}-item`;