77042b5d42adb66fbb96dddce35ec8c6.json
55.5 KB
{"ast":null,"code":"import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _toConsumableArray from \"@babel/runtime/helpers/toConsumableArray\";\nimport _typeof from \"@babel/runtime/helpers/typeof\";\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _inherits from \"@babel/runtime/helpers/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/createSuper\";\n\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n }\n\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport toArray from \"rc-util/es/Children/toArray\";\nimport copy from 'copy-to-clipboard';\nimport omit from 'omit.js';\nimport EditOutlined from '@ant-design/icons/EditOutlined';\nimport CheckOutlined from '@ant-design/icons/CheckOutlined';\nimport CopyOutlined from '@ant-design/icons/CopyOutlined';\nimport ResizeObserver from 'rc-resize-observer';\nimport { configConsumerProps, ConfigContext } from '../config-provider';\nimport LocaleReceiver from '../locale-provider/LocaleReceiver';\nimport devWarning from '../_util/devWarning';\nimport TransButton from '../_util/transButton';\nimport raf from '../_util/raf';\nimport { isStyleSupport } from '../_util/styleChecker';\nimport Tooltip from '../tooltip';\nimport Typography from './Typography';\nimport Editable from './Editable';\nimport measure from './util';\nvar isLineClampSupport = isStyleSupport('webkitLineClamp');\nvar isTextOverflowSupport = isStyleSupport('textOverflow');\n\nfunction wrapperDecorations(_ref, content) {\n var mark = _ref.mark,\n code = _ref.code,\n underline = _ref.underline,\n del = _ref[\"delete\"],\n strong = _ref.strong,\n keyboard = _ref.keyboard;\n var currentContent = content;\n\n function wrap(needed, tag) {\n if (!needed) return;\n currentContent = /*#__PURE__*/React.createElement(tag, {}, currentContent);\n }\n\n wrap(strong, 'strong');\n wrap(underline, 'u');\n wrap(del, 'del');\n wrap(code, 'code');\n wrap(mark, 'mark');\n wrap(keyboard, 'kbd');\n return currentContent;\n}\n\nvar ELLIPSIS_STR = '...';\n\nvar Base = /*#__PURE__*/function (_React$Component) {\n _inherits(Base, _React$Component);\n\n var _super = _createSuper(Base);\n\n function Base() {\n var _this;\n\n _classCallCheck(this, Base);\n\n _this = _super.apply(this, arguments);\n _this.contentRef = /*#__PURE__*/React.createRef();\n _this.state = {\n edit: false,\n copied: false,\n ellipsisText: '',\n ellipsisContent: null,\n isEllipsis: false,\n expanded: false,\n clientRendered: false\n };\n\n _this.getPrefixCls = function () {\n var customizePrefixCls = _this.props.prefixCls;\n var getPrefixCls = _this.context.getPrefixCls;\n return getPrefixCls('typography', customizePrefixCls);\n }; // =============== Expand ===============\n\n\n _this.onExpandClick = function (e) {\n var _this$getEllipsis = _this.getEllipsis(),\n onExpand = _this$getEllipsis.onExpand;\n\n _this.setState({\n expanded: true\n });\n\n if (onExpand) {\n onExpand(e);\n }\n }; // ================ Edit ================\n\n\n _this.onEditClick = function () {\n _this.triggerEdit(true);\n };\n\n _this.onEditChange = function (value) {\n var _this$getEditable = _this.getEditable(),\n onChange = _this$getEditable.onChange;\n\n if (onChange) {\n onChange(value);\n }\n\n _this.triggerEdit(false);\n };\n\n _this.onEditCancel = function () {\n _this.triggerEdit(false);\n }; // ================ Copy ================\n\n\n _this.onCopyClick = function (e) {\n e.preventDefault();\n var _this$props = _this.props,\n children = _this$props.children,\n copyable = _this$props.copyable;\n\n var copyConfig = _extends({}, _typeof(copyable) === 'object' ? copyable : null);\n\n if (copyConfig.text === undefined) {\n copyConfig.text = String(children);\n }\n\n copy(copyConfig.text || '');\n\n _this.setState({\n copied: true\n }, function () {\n if (copyConfig.onCopy) {\n copyConfig.onCopy();\n }\n\n _this.copyId = window.setTimeout(function () {\n _this.setState({\n copied: false\n });\n }, 3000);\n });\n };\n\n _this.setEditRef = function (node) {\n _this.editIcon = node;\n };\n\n _this.triggerEdit = function (edit) {\n var _this$getEditable2 = _this.getEditable(),\n onStart = _this$getEditable2.onStart;\n\n if (edit && onStart) {\n onStart();\n }\n\n _this.setState({\n edit: edit\n }, function () {\n if (!edit && _this.editIcon) {\n _this.editIcon.focus();\n }\n });\n }; // ============== Ellipsis ==============\n\n\n _this.resizeOnNextFrame = function () {\n raf.cancel(_this.rafId);\n _this.rafId = raf(function () {\n // Do not bind `syncEllipsis`. It need for test usage on prototype\n _this.syncEllipsis();\n });\n };\n\n return _this;\n }\n\n _createClass(Base, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.setState({\n clientRendered: true\n });\n this.resizeOnNextFrame();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n var children = this.props.children;\n var ellipsis = this.getEllipsis();\n var prevEllipsis = this.getEllipsis(prevProps);\n\n if (children !== prevProps.children || ellipsis.rows !== prevEllipsis.rows) {\n this.resizeOnNextFrame();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n window.clearTimeout(this.copyId);\n raf.cancel(this.rafId);\n }\n }, {\n key: \"getEditable\",\n value: function getEditable(props) {\n var edit = this.state.edit;\n\n var _ref2 = props || this.props,\n editable = _ref2.editable;\n\n if (!editable) return {\n editing: edit\n };\n return _extends({\n editing: edit\n }, _typeof(editable) === 'object' ? editable : null);\n }\n }, {\n key: \"getEllipsis\",\n value: function getEllipsis(props) {\n var _ref3 = props || this.props,\n ellipsis = _ref3.ellipsis;\n\n if (!ellipsis) return {};\n return _extends({\n rows: 1,\n expandable: false\n }, _typeof(ellipsis) === 'object' ? ellipsis : null);\n }\n }, {\n key: \"canUseCSSEllipsis\",\n value: function canUseCSSEllipsis() {\n var clientRendered = this.state.clientRendered;\n var _this$props2 = this.props,\n editable = _this$props2.editable,\n copyable = _this$props2.copyable;\n\n var _this$getEllipsis2 = this.getEllipsis(),\n rows = _this$getEllipsis2.rows,\n expandable = _this$getEllipsis2.expandable,\n suffix = _this$getEllipsis2.suffix,\n onEllipsis = _this$getEllipsis2.onEllipsis;\n\n if (suffix) return false; // Can't use css ellipsis since we need to provide the place for button\n\n if (editable || copyable || expandable || !clientRendered || onEllipsis) {\n return false;\n }\n\n if (rows === 1) {\n return isTextOverflowSupport;\n }\n\n return isLineClampSupport;\n }\n }, {\n key: \"syncEllipsis\",\n value: function syncEllipsis() {\n var _this$state = this.state,\n ellipsisText = _this$state.ellipsisText,\n isEllipsis = _this$state.isEllipsis,\n expanded = _this$state.expanded;\n\n var _this$getEllipsis3 = this.getEllipsis(),\n rows = _this$getEllipsis3.rows,\n suffix = _this$getEllipsis3.suffix,\n onEllipsis = _this$getEllipsis3.onEllipsis;\n\n var children = this.props.children;\n if (!rows || rows < 0 || !this.contentRef.current || expanded) return; // Do not measure if css already support ellipsis\n\n if (this.canUseCSSEllipsis()) return;\n devWarning(toArray(children).every(function (child) {\n return typeof child === 'string';\n }), 'Typography', '`ellipsis` should use string as children only.');\n\n var _measure = measure(this.contentRef.current, {\n rows: rows,\n suffix: suffix\n }, children, this.renderOperations(true), ELLIPSIS_STR),\n content = _measure.content,\n text = _measure.text,\n ellipsis = _measure.ellipsis;\n\n if (ellipsisText !== text || isEllipsis !== ellipsis) {\n this.setState({\n ellipsisText: text,\n ellipsisContent: content,\n isEllipsis: ellipsis\n });\n\n if (isEllipsis !== ellipsis && onEllipsis) {\n onEllipsis(ellipsis);\n }\n }\n }\n }, {\n key: \"renderExpand\",\n value: function renderExpand(forceRender) {\n var _this$getEllipsis4 = this.getEllipsis(),\n expandable = _this$getEllipsis4.expandable,\n symbol = _this$getEllipsis4.symbol;\n\n var _this$state2 = this.state,\n expanded = _this$state2.expanded,\n isEllipsis = _this$state2.isEllipsis;\n if (!expandable) return null; // force render expand icon for measure usage or it will cause dead loop\n\n if (!forceRender && (expanded || !isEllipsis)) return null;\n var expandContent;\n\n if (symbol) {\n expandContent = symbol;\n } else {\n expandContent = this.expandStr;\n }\n\n return /*#__PURE__*/React.createElement(\"a\", {\n key: \"expand\",\n className: \"\".concat(this.getPrefixCls(), \"-expand\"),\n onClick: this.onExpandClick,\n \"aria-label\": this.expandStr\n }, expandContent);\n }\n }, {\n key: \"renderEdit\",\n value: function renderEdit() {\n var editable = this.props.editable;\n if (!editable) return;\n var icon = editable.icon,\n tooltip = editable.tooltip;\n var title = toArray(tooltip)[0] || this.editStr;\n var ariaLabel = typeof title === 'string' ? title : '';\n return /*#__PURE__*/React.createElement(Tooltip, {\n key: \"edit\",\n title: tooltip === false ? '' : title\n }, /*#__PURE__*/React.createElement(TransButton, {\n ref: this.setEditRef,\n className: \"\".concat(this.getPrefixCls(), \"-edit\"),\n onClick: this.onEditClick,\n \"aria-label\": ariaLabel\n }, icon || /*#__PURE__*/React.createElement(EditOutlined, {\n role: \"button\"\n })));\n }\n }, {\n key: \"renderCopy\",\n value: function renderCopy() {\n var copied = this.state.copied;\n var copyable = this.props.copyable;\n if (!copyable) return;\n var prefixCls = this.getPrefixCls();\n var tooltips = copyable.tooltips;\n var tooltipNodes = toArray(tooltips);\n\n if (tooltipNodes.length === 0) {\n tooltipNodes = [this.copyStr, this.copiedStr];\n }\n\n var title = copied ? tooltipNodes[1] : tooltipNodes[0];\n var ariaLabel = typeof title === 'string' ? title : '';\n var icons = toArray(copyable.icon);\n return /*#__PURE__*/React.createElement(Tooltip, {\n key: \"copy\",\n title: tooltips === false ? '' : title\n }, /*#__PURE__*/React.createElement(TransButton, {\n className: classNames(\"\".concat(prefixCls, \"-copy\"), copied && \"\".concat(prefixCls, \"-copy-success\")),\n onClick: this.onCopyClick,\n \"aria-label\": ariaLabel\n }, copied ? icons[1] || /*#__PURE__*/React.createElement(CheckOutlined, null) : icons[0] || /*#__PURE__*/React.createElement(CopyOutlined, null)));\n }\n }, {\n key: \"renderEditInput\",\n value: function renderEditInput() {\n var _this$props3 = this.props,\n children = _this$props3.children,\n className = _this$props3.className,\n style = _this$props3.style;\n var direction = this.context.direction;\n\n var _this$getEditable3 = this.getEditable(),\n maxLength = _this$getEditable3.maxLength,\n autoSize = _this$getEditable3.autoSize;\n\n return /*#__PURE__*/React.createElement(Editable, {\n value: typeof children === 'string' ? children : '',\n onSave: this.onEditChange,\n onCancel: this.onEditCancel,\n prefixCls: this.getPrefixCls(),\n className: className,\n style: style,\n direction: direction,\n maxLength: maxLength,\n autoSize: autoSize\n });\n }\n }, {\n key: \"renderOperations\",\n value: function renderOperations(forceRenderExpanded) {\n return [this.renderExpand(forceRenderExpanded), this.renderEdit(), this.renderCopy()].filter(function (node) {\n return node;\n });\n }\n }, {\n key: \"renderContent\",\n value: function renderContent() {\n var _this2 = this;\n\n var _this$state3 = this.state,\n ellipsisContent = _this$state3.ellipsisContent,\n isEllipsis = _this$state3.isEllipsis,\n expanded = _this$state3.expanded;\n\n var _a = this.props,\n component = _a.component,\n children = _a.children,\n className = _a.className,\n type = _a.type,\n disabled = _a.disabled,\n style = _a.style,\n restProps = __rest(_a, [\"component\", \"children\", \"className\", \"type\", \"disabled\", \"style\"]);\n\n var direction = this.context.direction;\n\n var _this$getEllipsis5 = this.getEllipsis(),\n rows = _this$getEllipsis5.rows,\n suffix = _this$getEllipsis5.suffix;\n\n var prefixCls = this.getPrefixCls();\n var textProps = omit(restProps, ['prefixCls', 'editable', 'copyable', 'ellipsis', 'mark', 'code', 'delete', 'underline', 'strong', 'keyboard'].concat(_toConsumableArray(configConsumerProps)));\n var cssEllipsis = this.canUseCSSEllipsis();\n var cssTextOverflow = rows === 1 && cssEllipsis;\n var cssLineClamp = rows && rows > 1 && cssEllipsis;\n var textNode = children; // Only use js ellipsis when css ellipsis not support\n\n if (rows && isEllipsis && !expanded && !cssEllipsis) {\n var title = restProps.title;\n var restContent = title || '';\n\n if (!title && (typeof children === 'string' || typeof children === 'number')) {\n restContent = String(children);\n } // show rest content as title on symbol\n\n\n restContent = restContent === null || restContent === void 0 ? void 0 : restContent.slice(String(ellipsisContent || '').length); // We move full content to outer element to avoid repeat read the content by accessibility\n\n textNode = /*#__PURE__*/React.createElement(React.Fragment, null, ellipsisContent, /*#__PURE__*/React.createElement(\"span\", {\n title: restContent,\n \"aria-hidden\": \"true\"\n }, ELLIPSIS_STR), suffix);\n } else {\n textNode = /*#__PURE__*/React.createElement(React.Fragment, null, children, suffix);\n }\n\n textNode = wrapperDecorations(this.props, textNode);\n return /*#__PURE__*/React.createElement(LocaleReceiver, {\n componentName: \"Text\"\n }, function (_ref4) {\n var _classNames;\n\n var edit = _ref4.edit,\n copyStr = _ref4.copy,\n copied = _ref4.copied,\n expand = _ref4.expand;\n _this2.editStr = edit;\n _this2.copyStr = copyStr;\n _this2.copiedStr = copied;\n _this2.expandStr = expand;\n return /*#__PURE__*/React.createElement(ResizeObserver, {\n onResize: _this2.resizeOnNextFrame,\n disabled: !rows\n }, /*#__PURE__*/React.createElement(Typography, _extends({\n className: classNames((_classNames = {}, _defineProperty(_classNames, \"\".concat(prefixCls, \"-\").concat(type), type), _defineProperty(_classNames, \"\".concat(prefixCls, \"-disabled\"), disabled), _defineProperty(_classNames, \"\".concat(prefixCls, \"-ellipsis\"), rows), _defineProperty(_classNames, \"\".concat(prefixCls, \"-ellipsis-single-line\"), cssTextOverflow), _defineProperty(_classNames, \"\".concat(prefixCls, \"-ellipsis-multiple-line\"), cssLineClamp), _classNames), className),\n style: _extends(_extends({}, style), {\n WebkitLineClamp: cssLineClamp ? rows : null\n }),\n component: component,\n ref: _this2.contentRef,\n direction: direction\n }, textProps), textNode, _this2.renderOperations()));\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$getEditable4 = this.getEditable(),\n editing = _this$getEditable4.editing;\n\n if (editing) {\n return this.renderEditInput();\n }\n\n return this.renderContent();\n }\n }], [{\n key: \"getDerivedStateFromProps\",\n value: function getDerivedStateFromProps(nextProps) {\n var children = nextProps.children,\n editable = nextProps.editable;\n devWarning(!editable || typeof children === 'string', 'Typography', 'When `editable` is enabled, the `children` should use string.');\n return {};\n }\n }]);\n\n return Base;\n}(React.Component);\n\nBase.contextType = ConfigContext;\nBase.defaultProps = {\n children: ''\n};\nexport default Base;","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/antd/es/typography/Base.js"],"names":["_defineProperty","_toConsumableArray","_typeof","_extends","_classCallCheck","_createClass","_inherits","_createSuper","__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","React","classNames","toArray","copy","omit","EditOutlined","CheckOutlined","CopyOutlined","ResizeObserver","configConsumerProps","ConfigContext","LocaleReceiver","devWarning","TransButton","raf","isStyleSupport","Tooltip","Typography","Editable","measure","isLineClampSupport","isTextOverflowSupport","wrapperDecorations","_ref","content","mark","code","underline","del","strong","keyboard","currentContent","wrap","needed","tag","createElement","ELLIPSIS_STR","Base","_React$Component","_super","_this","apply","arguments","contentRef","createRef","state","edit","copied","ellipsisText","ellipsisContent","isEllipsis","expanded","clientRendered","getPrefixCls","customizePrefixCls","props","prefixCls","context","onExpandClick","_this$getEllipsis","getEllipsis","onExpand","setState","onEditClick","triggerEdit","onEditChange","value","_this$getEditable","getEditable","onChange","onEditCancel","onCopyClick","preventDefault","_this$props","children","copyable","copyConfig","text","undefined","String","onCopy","copyId","window","setTimeout","setEditRef","node","editIcon","_this$getEditable2","onStart","focus","resizeOnNextFrame","cancel","rafId","syncEllipsis","key","componentDidMount","componentDidUpdate","prevProps","ellipsis","prevEllipsis","rows","componentWillUnmount","clearTimeout","_ref2","editable","editing","_ref3","expandable","canUseCSSEllipsis","_this$props2","_this$getEllipsis2","suffix","onEllipsis","_this$state","_this$getEllipsis3","current","every","child","_measure","renderOperations","renderExpand","forceRender","_this$getEllipsis4","symbol","_this$state2","expandContent","expandStr","className","concat","onClick","renderEdit","icon","tooltip","title","editStr","ariaLabel","ref","role","renderCopy","tooltips","tooltipNodes","copyStr","copiedStr","icons","renderEditInput","_this$props3","style","direction","_this$getEditable3","maxLength","autoSize","onSave","onCancel","forceRenderExpanded","filter","renderContent","_this2","_this$state3","_a","component","type","disabled","restProps","_this$getEllipsis5","textProps","cssEllipsis","cssTextOverflow","cssLineClamp","textNode","restContent","slice","Fragment","componentName","_ref4","_classNames","expand","onResize","WebkitLineClamp","render","_this$getEditable4","getDerivedStateFromProps","nextProps","Component","contextType","defaultProps"],"mappings":"AAAA,OAAOA,eAAP,MAA4B,uCAA5B;AACA,OAAOC,kBAAP,MAA+B,0CAA/B;AACA,OAAOC,OAAP,MAAoB,+BAApB;AACA,OAAOC,QAAP,MAAqB,gCAArB;AACA,OAAOC,eAAP,MAA4B,uCAA5B;AACA,OAAOC,YAAP,MAAyB,oCAAzB;AACA,OAAOC,SAAP,MAAsB,iCAAtB;AACA,OAAOC,YAAP,MAAyB,oCAAzB;;AAEA,IAAIC,MAAM,GAAG,QAAQ,KAAKA,MAAb,IAAuB,UAAUC,CAAV,EAAaC,CAAb,EAAgB;AAClD,MAAIC,CAAC,GAAG,EAAR;;AAEA,OAAK,IAAIC,CAAT,IAAcH,CAAd,EAAiB;AACf,QAAII,MAAM,CAACC,SAAP,CAAiBC,cAAjB,CAAgCC,IAAhC,CAAqCP,CAArC,EAAwCG,CAAxC,KAA8CF,CAAC,CAACO,OAAF,CAAUL,CAAV,IAAe,CAAjE,EAAoED,CAAC,CAACC,CAAD,CAAD,GAAOH,CAAC,CAACG,CAAD,CAAR;AACrE;;AAED,MAAIH,CAAC,IAAI,IAAL,IAAa,OAAOI,MAAM,CAACK,qBAAd,KAAwC,UAAzD,EAAqE,KAAK,IAAIC,CAAC,GAAG,CAAR,EAAWP,CAAC,GAAGC,MAAM,CAACK,qBAAP,CAA6BT,CAA7B,CAApB,EAAqDU,CAAC,GAAGP,CAAC,CAACQ,MAA3D,EAAmED,CAAC,EAApE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AClD,UAAI3G,QAAQ,GAAG2G,SAAS,CAAC3G,QAAzB;AAAA,UACI8B,QAAQ,GAAG6E,SAAS,CAAC7E,QADzB;AAEA5F,MAAAA,UAAU,CAAC,CAAC4F,QAAD,IAAa,OAAO9B,QAAP,KAAoB,QAAlC,EAA4C,YAA5C,EAA0D,+DAA1D,CAAV;AACA,aAAO,EAAP;AACD;AAPE,GAAD,CA7TQ,CAAZ;;AAuUA,SAAOrC,IAAP;AACD,CArcuB,CAqctBrC,KAAK,CAACsL,SArcgB,CAAxB;;AAucAjJ,IAAI,CAACkJ,WAAL,GAAmB7K,aAAnB;AACA2B,IAAI,CAACmJ,YAAL,GAAoB;AAClB9G,EAAAA,QAAQ,EAAE;AADQ,CAApB;AAGA,eAAerC,IAAf","sourcesContent":["import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _toConsumableArray from \"@babel/runtime/helpers/toConsumableArray\";\nimport _typeof from \"@babel/runtime/helpers/typeof\";\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport _inherits from \"@babel/runtime/helpers/inherits\";\nimport _createSuper from \"@babel/runtime/helpers/createSuper\";\n\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n }\n\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport toArray from \"rc-util/es/Children/toArray\";\nimport copy from 'copy-to-clipboard';\nimport omit from 'omit.js';\nimport EditOutlined from '@ant-design/icons/EditOutlined';\nimport CheckOutlined from '@ant-design/icons/CheckOutlined';\nimport CopyOutlined from '@ant-design/icons/CopyOutlined';\nimport ResizeObserver from 'rc-resize-observer';\nimport { configConsumerProps, ConfigContext } from '../config-provider';\nimport LocaleReceiver from '../locale-provider/LocaleReceiver';\nimport devWarning from '../_util/devWarning';\nimport TransButton from '../_util/transButton';\nimport raf from '../_util/raf';\nimport { isStyleSupport } from '../_util/styleChecker';\nimport Tooltip from '../tooltip';\nimport Typography from './Typography';\nimport Editable from './Editable';\nimport measure from './util';\nvar isLineClampSupport = isStyleSupport('webkitLineClamp');\nvar isTextOverflowSupport = isStyleSupport('textOverflow');\n\nfunction wrapperDecorations(_ref, content) {\n var mark = _ref.mark,\n code = _ref.code,\n underline = _ref.underline,\n del = _ref[\"delete\"],\n strong = _ref.strong,\n keyboard = _ref.keyboard;\n var currentContent = content;\n\n function wrap(needed, tag) {\n if (!needed) return;\n currentContent = /*#__PURE__*/React.createElement(tag, {}, currentContent);\n }\n\n wrap(strong, 'strong');\n wrap(underline, 'u');\n wrap(del, 'del');\n wrap(code, 'code');\n wrap(mark, 'mark');\n wrap(keyboard, 'kbd');\n return currentContent;\n}\n\nvar ELLIPSIS_STR = '...';\n\nvar Base = /*#__PURE__*/function (_React$Component) {\n _inherits(Base, _React$Component);\n\n var _super = _createSuper(Base);\n\n function Base() {\n var _this;\n\n _classCallCheck(this, Base);\n\n _this = _super.apply(this, arguments);\n _this.contentRef = /*#__PURE__*/React.createRef();\n _this.state = {\n edit: false,\n copied: false,\n ellipsisText: '',\n ellipsisContent: null,\n isEllipsis: false,\n expanded: false,\n clientRendered: false\n };\n\n _this.getPrefixCls = function () {\n var customizePrefixCls = _this.props.prefixCls;\n var getPrefixCls = _this.context.getPrefixCls;\n return getPrefixCls('typography', customizePrefixCls);\n }; // =============== Expand ===============\n\n\n _this.onExpandClick = function (e) {\n var _this$getEllipsis = _this.getEllipsis(),\n onExpand = _this$getEllipsis.onExpand;\n\n _this.setState({\n expanded: true\n });\n\n if (onExpand) {\n onExpand(e);\n }\n }; // ================ Edit ================\n\n\n _this.onEditClick = function () {\n _this.triggerEdit(true);\n };\n\n _this.onEditChange = function (value) {\n var _this$getEditable = _this.getEditable(),\n onChange = _this$getEditable.onChange;\n\n if (onChange) {\n onChange(value);\n }\n\n _this.triggerEdit(false);\n };\n\n _this.onEditCancel = function () {\n _this.triggerEdit(false);\n }; // ================ Copy ================\n\n\n _this.onCopyClick = function (e) {\n e.preventDefault();\n var _this$props = _this.props,\n children = _this$props.children,\n copyable = _this$props.copyable;\n\n var copyConfig = _extends({}, _typeof(copyable) === 'object' ? copyable : null);\n\n if (copyConfig.text === undefined) {\n copyConfig.text = String(children);\n }\n\n copy(copyConfig.text || '');\n\n _this.setState({\n copied: true\n }, function () {\n if (copyConfig.onCopy) {\n copyConfig.onCopy();\n }\n\n _this.copyId = window.setTimeout(function () {\n _this.setState({\n copied: false\n });\n }, 3000);\n });\n };\n\n _this.setEditRef = function (node) {\n _this.editIcon = node;\n };\n\n _this.triggerEdit = function (edit) {\n var _this$getEditable2 = _this.getEditable(),\n onStart = _this$getEditable2.onStart;\n\n if (edit && onStart) {\n onStart();\n }\n\n _this.setState({\n edit: edit\n }, function () {\n if (!edit && _this.editIcon) {\n _this.editIcon.focus();\n }\n });\n }; // ============== Ellipsis ==============\n\n\n _this.resizeOnNextFrame = function () {\n raf.cancel(_this.rafId);\n _this.rafId = raf(function () {\n // Do not bind `syncEllipsis`. It need for test usage on prototype\n _this.syncEllipsis();\n });\n };\n\n return _this;\n }\n\n _createClass(Base, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.setState({\n clientRendered: true\n });\n this.resizeOnNextFrame();\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n var children = this.props.children;\n var ellipsis = this.getEllipsis();\n var prevEllipsis = this.getEllipsis(prevProps);\n\n if (children !== prevProps.children || ellipsis.rows !== prevEllipsis.rows) {\n this.resizeOnNextFrame();\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n window.clearTimeout(this.copyId);\n raf.cancel(this.rafId);\n }\n }, {\n key: \"getEditable\",\n value: function getEditable(props) {\n var edit = this.state.edit;\n\n var _ref2 = props || this.props,\n editable = _ref2.editable;\n\n if (!editable) return {\n editing: edit\n };\n return _extends({\n editing: edit\n }, _typeof(editable) === 'object' ? editable : null);\n }\n }, {\n key: \"getEllipsis\",\n value: function getEllipsis(props) {\n var _ref3 = props || this.props,\n ellipsis = _ref3.ellipsis;\n\n if (!ellipsis) return {};\n return _extends({\n rows: 1,\n expandable: false\n }, _typeof(ellipsis) === 'object' ? ellipsis : null);\n }\n }, {\n key: \"canUseCSSEllipsis\",\n value: function canUseCSSEllipsis() {\n var clientRendered = this.state.clientRendered;\n var _this$props2 = this.props,\n editable = _this$props2.editable,\n copyable = _this$props2.copyable;\n\n var _this$getEllipsis2 = this.getEllipsis(),\n rows = _this$getEllipsis2.rows,\n expandable = _this$getEllipsis2.expandable,\n suffix = _this$getEllipsis2.suffix,\n onEllipsis = _this$getEllipsis2.onEllipsis;\n\n if (suffix) return false; // Can't use css ellipsis since we need to provide the place for button\n\n if (editable || copyable || expandable || !clientRendered || onEllipsis) {\n return false;\n }\n\n if (rows === 1) {\n return isTextOverflowSupport;\n }\n\n return isLineClampSupport;\n }\n }, {\n key: \"syncEllipsis\",\n value: function syncEllipsis() {\n var _this$state = this.state,\n ellipsisText = _this$state.ellipsisText,\n isEllipsis = _this$state.isEllipsis,\n expanded = _this$state.expanded;\n\n var _this$getEllipsis3 = this.getEllipsis(),\n rows = _this$getEllipsis3.rows,\n suffix = _this$getEllipsis3.suffix,\n onEllipsis = _this$getEllipsis3.onEllipsis;\n\n var children = this.props.children;\n if (!rows || rows < 0 || !this.contentRef.current || expanded) return; // Do not measure if css already support ellipsis\n\n if (this.canUseCSSEllipsis()) return;\n devWarning(toArray(children).every(function (child) {\n return typeof child === 'string';\n }), 'Typography', '`ellipsis` should use string as children only.');\n\n var _measure = measure(this.contentRef.current, {\n rows: rows,\n suffix: suffix\n }, children, this.renderOperations(true), ELLIPSIS_STR),\n content = _measure.content,\n text = _measure.text,\n ellipsis = _measure.ellipsis;\n\n if (ellipsisText !== text || isEllipsis !== ellipsis) {\n this.setState({\n ellipsisText: text,\n ellipsisContent: content,\n isEllipsis: ellipsis\n });\n\n if (isEllipsis !== ellipsis && onEllipsis) {\n onEllipsis(ellipsis);\n }\n }\n }\n }, {\n key: \"renderExpand\",\n value: function renderExpand(forceRender) {\n var _this$getEllipsis4 = this.getEllipsis(),\n expandable = _this$getEllipsis4.expandable,\n symbol = _this$getEllipsis4.symbol;\n\n var _this$state2 = this.state,\n expanded = _this$state2.expanded,\n isEllipsis = _this$state2.isEllipsis;\n if (!expandable) return null; // force render expand icon for measure usage or it will cause dead loop\n\n if (!forceRender && (expanded || !isEllipsis)) return null;\n var expandContent;\n\n if (symbol) {\n expandContent = symbol;\n } else {\n expandContent = this.expandStr;\n }\n\n return /*#__PURE__*/React.createElement(\"a\", {\n key: \"expand\",\n className: \"\".concat(this.getPrefixCls(), \"-expand\"),\n onClick: this.onExpandClick,\n \"aria-label\": this.expandStr\n }, expandContent);\n }\n }, {\n key: \"renderEdit\",\n value: function renderEdit() {\n var editable = this.props.editable;\n if (!editable) return;\n var icon = editable.icon,\n tooltip = editable.tooltip;\n var title = toArray(tooltip)[0] || this.editStr;\n var ariaLabel = typeof title === 'string' ? title : '';\n return /*#__PURE__*/React.createElement(Tooltip, {\n key: \"edit\",\n title: tooltip === false ? '' : title\n }, /*#__PURE__*/React.createElement(TransButton, {\n ref: this.setEditRef,\n className: \"\".concat(this.getPrefixCls(), \"-edit\"),\n onClick: this.onEditClick,\n \"aria-label\": ariaLabel\n }, icon || /*#__PURE__*/React.createElement(EditOutlined, {\n role: \"button\"\n })));\n }\n }, {\n key: \"renderCopy\",\n value: function renderCopy() {\n var copied = this.state.copied;\n var copyable = this.props.copyable;\n if (!copyable) return;\n var prefixCls = this.getPrefixCls();\n var tooltips = copyable.tooltips;\n var tooltipNodes = toArray(tooltips);\n\n if (tooltipNodes.length === 0) {\n tooltipNodes = [this.copyStr, this.copiedStr];\n }\n\n var title = copied ? tooltipNodes[1] : tooltipNodes[0];\n var ariaLabel = typeof title === 'string' ? title : '';\n var icons = toArray(copyable.icon);\n return /*#__PURE__*/React.createElement(Tooltip, {\n key: \"copy\",\n title: tooltips === false ? '' : title\n }, /*#__PURE__*/React.createElement(TransButton, {\n className: classNames(\"\".concat(prefixCls, \"-copy\"), copied && \"\".concat(prefixCls, \"-copy-success\")),\n onClick: this.onCopyClick,\n \"aria-label\": ariaLabel\n }, copied ? icons[1] || /*#__PURE__*/React.createElement(CheckOutlined, null) : icons[0] || /*#__PURE__*/React.createElement(CopyOutlined, null)));\n }\n }, {\n key: \"renderEditInput\",\n value: function renderEditInput() {\n var _this$props3 = this.props,\n children = _this$props3.children,\n className = _this$props3.className,\n style = _this$props3.style;\n var direction = this.context.direction;\n\n var _this$getEditable3 = this.getEditable(),\n maxLength = _this$getEditable3.maxLength,\n autoSize = _this$getEditable3.autoSize;\n\n return /*#__PURE__*/React.createElement(Editable, {\n value: typeof children === 'string' ? children : '',\n onSave: this.onEditChange,\n onCancel: this.onEditCancel,\n prefixCls: this.getPrefixCls(),\n className: className,\n style: style,\n direction: direction,\n maxLength: maxLength,\n autoSize: autoSize\n });\n }\n }, {\n key: \"renderOperations\",\n value: function renderOperations(forceRenderExpanded) {\n return [this.renderExpand(forceRenderExpanded), this.renderEdit(), this.renderCopy()].filter(function (node) {\n return node;\n });\n }\n }, {\n key: \"renderContent\",\n value: function renderContent() {\n var _this2 = this;\n\n var _this$state3 = this.state,\n ellipsisContent = _this$state3.ellipsisContent,\n isEllipsis = _this$state3.isEllipsis,\n expanded = _this$state3.expanded;\n\n var _a = this.props,\n component = _a.component,\n children = _a.children,\n className = _a.className,\n type = _a.type,\n disabled = _a.disabled,\n style = _a.style,\n restProps = __rest(_a, [\"component\", \"children\", \"className\", \"type\", \"disabled\", \"style\"]);\n\n var direction = this.context.direction;\n\n var _this$getEllipsis5 = this.getEllipsis(),\n rows = _this$getEllipsis5.rows,\n suffix = _this$getEllipsis5.suffix;\n\n var prefixCls = this.getPrefixCls();\n var textProps = omit(restProps, ['prefixCls', 'editable', 'copyable', 'ellipsis', 'mark', 'code', 'delete', 'underline', 'strong', 'keyboard'].concat(_toConsumableArray(configConsumerProps)));\n var cssEllipsis = this.canUseCSSEllipsis();\n var cssTextOverflow = rows === 1 && cssEllipsis;\n var cssLineClamp = rows && rows > 1 && cssEllipsis;\n var textNode = children; // Only use js ellipsis when css ellipsis not support\n\n if (rows && isEllipsis && !expanded && !cssEllipsis) {\n var title = restProps.title;\n var restContent = title || '';\n\n if (!title && (typeof children === 'string' || typeof children === 'number')) {\n restContent = String(children);\n } // show rest content as title on symbol\n\n\n restContent = restContent === null || restContent === void 0 ? void 0 : restContent.slice(String(ellipsisContent || '').length); // We move full content to outer element to avoid repeat read the content by accessibility\n\n textNode = /*#__PURE__*/React.createElement(React.Fragment, null, ellipsisContent, /*#__PURE__*/React.createElement(\"span\", {\n title: restContent,\n \"aria-hidden\": \"true\"\n }, ELLIPSIS_STR), suffix);\n } else {\n textNode = /*#__PURE__*/React.createElement(React.Fragment, null, children, suffix);\n }\n\n textNode = wrapperDecorations(this.props, textNode);\n return /*#__PURE__*/React.createElement(LocaleReceiver, {\n componentName: \"Text\"\n }, function (_ref4) {\n var _classNames;\n\n var edit = _ref4.edit,\n copyStr = _ref4.copy,\n copied = _ref4.copied,\n expand = _ref4.expand;\n _this2.editStr = edit;\n _this2.copyStr = copyStr;\n _this2.copiedStr = copied;\n _this2.expandStr = expand;\n return /*#__PURE__*/React.createElement(ResizeObserver, {\n onResize: _this2.resizeOnNextFrame,\n disabled: !rows\n }, /*#__PURE__*/React.createElement(Typography, _extends({\n className: classNames((_classNames = {}, _defineProperty(_classNames, \"\".concat(prefixCls, \"-\").concat(type), type), _defineProperty(_classNames, \"\".concat(prefixCls, \"-disabled\"), disabled), _defineProperty(_classNames, \"\".concat(prefixCls, \"-ellipsis\"), rows), _defineProperty(_classNames, \"\".concat(prefixCls, \"-ellipsis-single-line\"), cssTextOverflow), _defineProperty(_classNames, \"\".concat(prefixCls, \"-ellipsis-multiple-line\"), cssLineClamp), _classNames), className),\n style: _extends(_extends({}, style), {\n WebkitLineClamp: cssLineClamp ? rows : null\n }),\n component: component,\n ref: _this2.contentRef,\n direction: direction\n }, textProps), textNode, _this2.renderOperations()));\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$getEditable4 = this.getEditable(),\n editing = _this$getEditable4.editing;\n\n if (editing) {\n return this.renderEditInput();\n }\n\n return this.renderContent();\n }\n }], [{\n key: \"getDerivedStateFromProps\",\n value: function getDerivedStateFromProps(nextProps) {\n var children = nextProps.children,\n editable = nextProps.editable;\n devWarning(!editable || typeof children === 'string', 'Typography', 'When `editable` is enabled, the `children` should use string.');\n return {};\n }\n }]);\n\n return Base;\n}(React.Component);\n\nBase.contextType = ConfigContext;\nBase.defaultProps = {\n children: ''\n};\nexport default Base;"]},"metadata":{},"sourceType":"module"}