4d8b24dd53d787dbbe51b6b84118a160.json 9.5 KB
{"ast":null,"code":"import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\n/**\n * To match accessibility requirement, we always provide an input in the component.\n * Other element will not set `tabIndex` to avoid `onBlur` sequence problem.\n * For focused select, we set `aria-live=\"polite\"` to update the accessibility content.\n *\n * ref:\n * - keyboard: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/listbox_role#Keyboard_interactions\n *\n * New api:\n * - listHeight\n * - listItemHeight\n * - component\n *\n * Remove deprecated api:\n * - multiple\n * - tags\n * - combobox\n * - firstActiveValue\n * - dropdownMenuStyle\n * - openClassName (Not list in api)\n *\n * Update:\n * - `backfill` only support `combobox` mode\n * - `combobox` mode not support `labelInValue` since it's meaningless\n * - `getInputElement` only support `combobox` mode\n * - `onChange` return OptionData instead of ReactNode\n * - `filterOption` `onChange` `onSelect` accept OptionData instead of ReactNode\n * - `combobox` mode trigger `onChange` will get `undefined` if no `value` match in Option\n * - `combobox` mode not support `optionLabelProp`\n */\n\nimport * as React from 'react';\nimport SelectOptionList from './OptionList';\nimport Option from './Option';\nimport OptGroup from './OptGroup';\nimport { convertChildrenToData as convertSelectChildrenToData } from './utils/legacyUtil';\nimport { getLabeledValue as getSelectLabeledValue, filterOptions as selectDefaultFilterOptions, isValueDisabled as isSelectValueDisabled, findValueOption as findSelectValueOption, flattenOptions, fillOptionsWithMissingValue } from './utils/valueUtil';\nimport generateSelector from './generate';\nimport warningProps from './utils/warningPropsUtil';\nvar RefSelect = generateSelector({\n  prefixCls: 'rc-select',\n  components: {\n    optionList: SelectOptionList\n  },\n  convertChildrenToData: convertSelectChildrenToData,\n  flattenOptions: flattenOptions,\n  getLabeledValue: getSelectLabeledValue,\n  filterOptions: selectDefaultFilterOptions,\n  isValueDisabled: isSelectValueDisabled,\n  findValueOption: findSelectValueOption,\n  warningProps: warningProps,\n  fillOptionsWithMissingValue: fillOptionsWithMissingValue\n});\n/**\n * Typescript not support generic with function component,\n * we have to wrap an class component to handle this.\n */\n\nvar Select = /*#__PURE__*/function (_React$Component) {\n  _inherits(Select, _React$Component);\n\n  var _super = _createSuper(Select);\n\n  function Select() {\n    var _this;\n\n    _classCallCheck(this, Select);\n\n    _this = _super.apply(this, arguments);\n    _this.selectRef = React.createRef();\n\n    _this.focus = function () {\n      _this.selectRef.current.focus();\n    };\n\n    _this.blur = function () {\n      _this.selectRef.current.blur();\n    };\n\n    return _this;\n  }\n\n  _createClass(Select, [{\n    key: \"render\",\n    value: function render() {\n      return React.createElement(RefSelect, Object.assign({\n        ref: this.selectRef\n      }, this.props));\n    }\n  }]);\n\n  return Select;\n}(React.Component);\n\nSelect.Option = Option;\nSelect.OptGroup = OptGroup;\nexport default Select;","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/rc-select/es/Select.js"],"names":["_classCallCheck","_createClass","_inherits","_createSuper","React","SelectOptionList","Option","OptGroup","convertChildrenToData","convertSelectChildrenToData","getLabeledValue","getSelectLabeledValue","filterOptions","selectDefaultFilterOptions","isValueDisabled","isSelectValueDisabled","findValueOption","findSelectValueOption","flattenOptions","fillOptionsWithMissingValue","generateSelector","warningProps","RefSelect","prefixCls","components","optionList","Select","_React$Component","_super","_this","apply","arguments","selectRef","createRef","focus","current","blur","key","value","render","createElement","Object","assign","ref","props","Component"],"mappings":"AAAA,OAAOA,eAAP,MAA4B,2CAA5B;AACA,OAAOC,YAAP,MAAyB,wCAAzB;AACA,OAAOC,SAAP,MAAsB,qCAAtB;AACA,OAAOC,YAAP,MAAyB,wCAAzB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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AnB,CAAR;AACAF,IAAAA,KAAK,CAACG,SAAN,GAAkB5B,KAAK,CAAC6B,SAAN,EAAlB;;AAEAJ,IAAAA,KAAK,CAACK,KAAN,GAAc,YAAY;AACxBL,MAAAA,KAAK,CAACG,SAAN,CAAgBG,OAAhB,CAAwBD,KAAxB;AACD,KAFD;;AAIAL,IAAAA,KAAK,CAACO,IAAN,GAAa,YAAY;AACvBP,MAAAA,KAAK,CAACG,SAAN,CAAgBG,OAAhB,CAAwBC,IAAxB;AACD,KAFD;;AAIA,WAAOP,KAAP;AACD;;AAED5B,EAAAA,YAAY,CAACyB,MAAD,EAAS,CAAC;AACpBW,IAAAA,GAAG,EAAE,QADe;AAEpBC,IAAAA,KAAK,EAAE,SAASC,MAAT,GAAkB;AACvB,aAAOnC,KAAK,CAACoC,aAAN,CAAoBlB,SAApB,EAA+BmB,MAAM,CAACC,MAAP,CAAc;AAClDC,QAAAA,GAAG,EAAE,KAAKX;AADwC,OAAd,EAEnC,KAAKY,KAF8B,CAA/B,CAAP;AAGD;AANmB,GAAD,CAAT,CAAZ;;AASA,SAAOlB,MAAP;AACD,CAlCyB,CAkCxBtB,KAAK,CAACyC,SAlCkB,CAA1B;;AAoCAnB,MAAM,CAACpB,MAAP,GAAgBA,MAAhB;AACAoB,MAAM,CAACnB,QAAP,GAAkBA,QAAlB;AACA,eAAemB,MAAf","sourcesContent":["import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _inherits from \"@babel/runtime/helpers/esm/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/esm/createSuper\";\n\n/**\n * To match accessibility requirement, we always provide an input in the component.\n * Other element will not set `tabIndex` to avoid `onBlur` sequence problem.\n * For focused select, we set `aria-live=\"polite\"` to update the accessibility content.\n *\n * ref:\n * - keyboard: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/listbox_role#Keyboard_interactions\n *\n * New api:\n * - listHeight\n * - listItemHeight\n * - component\n *\n * Remove deprecated api:\n * - multiple\n * - tags\n * - combobox\n * - firstActiveValue\n * - dropdownMenuStyle\n * - openClassName (Not list in api)\n *\n * Update:\n * - `backfill` only support `combobox` mode\n * - `combobox` mode not support `labelInValue` since it's meaningless\n * - `getInputElement` only support `combobox` mode\n * - `onChange` return OptionData instead of ReactNode\n * - `filterOption` `onChange` `onSelect` accept OptionData instead of ReactNode\n * - `combobox` mode trigger `onChange` will get `undefined` if no `value` match in Option\n * - `combobox` mode not support `optionLabelProp`\n */\nimport * as React from 'react';\nimport SelectOptionList from './OptionList';\nimport Option from './Option';\nimport OptGroup from './OptGroup';\nimport { convertChildrenToData as convertSelectChildrenToData } from './utils/legacyUtil';\nimport { getLabeledValue as getSelectLabeledValue, filterOptions as selectDefaultFilterOptions, isValueDisabled as isSelectValueDisabled, findValueOption as findSelectValueOption, flattenOptions, fillOptionsWithMissingValue } from './utils/valueUtil';\nimport generateSelector from './generate';\nimport warningProps from './utils/warningPropsUtil';\nvar RefSelect = generateSelector({\n  prefixCls: 'rc-select',\n  components: {\n    optionList: SelectOptionList\n  },\n  convertChildrenToData: convertSelectChildrenToData,\n  flattenOptions: flattenOptions,\n  getLabeledValue: getSelectLabeledValue,\n  filterOptions: selectDefaultFilterOptions,\n  isValueDisabled: isSelectValueDisabled,\n  findValueOption: findSelectValueOption,\n  warningProps: warningProps,\n  fillOptionsWithMissingValue: fillOptionsWithMissingValue\n});\n/**\n * Typescript not support generic with function component,\n * we have to wrap an class component to handle this.\n */\n\nvar Select = /*#__PURE__*/function (_React$Component) {\n  _inherits(Select, _React$Component);\n\n  var _super = _createSuper(Select);\n\n  function Select() {\n    var _this;\n\n    _classCallCheck(this, Select);\n\n    _this = _super.apply(this, arguments);\n    _this.selectRef = React.createRef();\n\n    _this.focus = function () {\n      _this.selectRef.current.focus();\n    };\n\n    _this.blur = function () {\n      _this.selectRef.current.blur();\n    };\n\n    return _this;\n  }\n\n  _createClass(Select, [{\n    key: \"render\",\n    value: function render() {\n      return React.createElement(RefSelect, Object.assign({\n        ref: this.selectRef\n      }, this.props));\n    }\n  }]);\n\n  return Select;\n}(React.Component);\n\nSelect.Option = Option;\nSelect.OptGroup = OptGroup;\nexport default Select;"]},"metadata":{},"sourceType":"module"}