"use strict";
/*
 * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
 * This devtool is neither made for production nor for readable output files.
 * It uses "eval()" calls to create a separate source file in the browser devtools.
 * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
 * or disable the default devtool with "devtool: false".
 * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
 */
(self["webpackJsonp_bos-platform"] = self["webpackJsonp_bos-platform"] || []).push([[7960],{

/***/ "./src/page/SystemNotification.jsx":
/*!*****************************************!*\
  !*** ./src/page/SystemNotification.jsx ***!
  \*****************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

eval("\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"../../node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"../../node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"../../node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"../../node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"../../node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"../../node_modules/core-js/modules/es.array.from.js\");\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"../../node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"../../node_modules/core-js/modules/es.array.slice.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"../../node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-string.js */ \"../../node_modules/core-js/modules/es.date.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"../../node_modules/core-js/modules/es.function.name.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"../../node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-properties.js */ \"../../node_modules/core-js/modules/es.object.define-properties.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"../../node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"../../node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"../../node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"../../node_modules/core-js/modules/es.object.keys.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"../../node_modules/core-js/modules/es.regexp.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.weak-map.js */ \"../../node_modules/core-js/modules/es.weak-map.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"../../node_modules/core-js/modules/web.dom-collections.for-each.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports.clearNotificationService = clearNotificationService;\nexports[\"default\"] = void 0;\nexports.notificationButtonClick = notificationButtonClick;\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"../../node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"../../node_modules/core-js/modules/es.array.includes.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"../../node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"../../node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.array.reduce.js */ \"../../node_modules/core-js/modules/es.array.reduce.js\");\n__webpack_require__(/*! core-js/modules/es.map.js */ \"../../node_modules/core-js/modules/es.map.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"../../node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.object.values.js */ \"../../node_modules/core-js/modules/es.object.values.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"../../node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"../../node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"../../node_modules/core-js/modules/es.string.replace.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"../../node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.timers.js */ \"../../node_modules/core-js/modules/web.timers.js\");\nvar _react = _interopRequireWildcard(__webpack_require__(/*! react */ \"webpack/sharing/consume/default/react/react?dca2\"));\nvar _classnames9 = _interopRequireDefault(__webpack_require__(/*! classnames */ \"../../node_modules/classnames/index.js\"));\nvar _kdesign = __webpack_require__(/*! @kdcloudjs/kdesign */ \"webpack/sharing/consume/default/@kdcloudjs/kdesign/@kdcloudjs/kdesign\");\nvar _reactDom = __webpack_require__(/*! react-dom */ \"webpack/sharing/consume/default/react-dom/react-dom?418d\");\nvar _immutable = __webpack_require__(/*! immutable */ \"webpack/sharing/consume/default/immutable/immutable?f2ca\");\nvar _global = __webpack_require__(/*! @/global */ \"./src/global/index.js\");\nvar _formservice = _interopRequireDefault(__webpack_require__(/*! @/api/formservice */ \"./src/api/formservice.js\"));\nvar _SystemUIProvider = __webpack_require__(/*! ./SystemUIProvider */ \"./src/page/SystemUIProvider.js\");\nvar _appModelFunction = __webpack_require__(/*! ../model/appModelFunction */ \"./src/model/appModelFunction.js\");\nvar _action = __webpack_require__(/*! @/action/action */ \"./src/action/action.js\");\nvar _sanitizeHtmlUtil = __webpack_require__(/*! @/util/sanitizeHtmlUtil.js */ \"./src/util/sanitizeHtmlUtil.js\");\nvar _SystemNotification = _interopRequireDefault(__webpack_require__(/*! ./SystemNotification.less */ \"./src/page/SystemNotification.less\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != _typeof(e) && \"function\" != typeof e) return { \"default\": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n[\"default\"] = e, t && t.set(e, n), n; }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : String(i); }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it[\"return\"] != null) it[\"return\"](); } finally { if (didErr) throw err; } } }; }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nvar POSITION_LIST = ['bottomRight', 'bottomLeft', 'topRight', 'topLeft'];\nvar DEFAULT_POSITION = 'bottomRight';\nvar DEFAULT_MODE = 0; // 0金蝶风格，1华为风格\nvar DEFAULT_OFFSET = 40;\nvar IGNORE_BTN_KEY = 'ignore';\n\n/**\n  * 计算面板显示位置\n  * 'bottomRight'|'bottomLeft'|'topRight'|'topLeft'\n*/\nfunction calcPosition(direction, offset) {\n  var style = {};\n  // 将'bottomRight'处理成['bottom', 'right']这种形式\n  var positionArr = direction.replace(/([A-Z])/g, '-$1').toLowerCase().split('-');\n  var _iterator = _createForOfIteratorHelper(positionArr),\n    _step;\n  try {\n    for (_iterator.s(); !(_step = _iterator.n()).done;) {\n      var position = _step.value;\n      style[position] = offset;\n    }\n  } catch (err) {\n    _iterator.e(err);\n  } finally {\n    _iterator.f();\n  }\n  return style;\n}\n\n// 清除消息通知请求\nfunction clearNotificationService(pageid, args) {\n  var url = 'notification/clearNotifications.do';\n  return _formservice[\"default\"].postApi(url, args).then(function (data) {\n    (0, _action.doPostActions)(pageid, data, _global.doGlobalDispatch, true);\n  })[\"catch\"](function (error) {\n    console.log(error);\n  });\n}\n\n// 消息通知按钮点击请求\nfunction notificationButtonClick(pageid, args) {\n  var url = 'notification/notificationButtonClick.do';\n  return _formservice[\"default\"].postApi(url, args).then(function (data) {\n    (0, _action.doPostActions)(pageid, data, _global.doGlobalDispatch, true);\n  })[\"catch\"](function (error) {\n    console.log(error);\n  });\n}\nfunction Icon(_ref) {\n  var iconType = _ref.iconType;\n  var classMap = new Map([['success', 'kdfont kdfont-zhuangtai_wancheng'], ['info', 'kdfont kdfont-zhuangtai_jingshi'], ['warning', 'kdfont kdfont-zhuangtai_jingshi'], ['error', 'kdfont kdfont-zhuangtai_cuowu']]);\n  var iconClass = classMap.get(iconType) || '';\n  var cls = (0, _classnames9[\"default\"])(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, _SystemNotification[\"default\"]['header-icon'], true), iconClass, true), 'success-color', iconType === 'success'), 'ongoing-color', iconType === 'info'), 'warning-color', iconType === 'warning'), 'error-color', iconType === 'error'));\n  return iconClass && /*#__PURE__*/_react[\"default\"].createElement(\"i\", {\n    className: cls\n  });\n}\n\n// header\nfunction Header(_ref2) {\n  var isHwStyle = _ref2.isHwStyle,\n    title = _ref2.title,\n    iconType = _ref2.iconType,\n    handleClearAll = _ref2.handleClearAll;\n  var icon = iconType && isHwStyle && /*#__PURE__*/_react[\"default\"].createElement(Icon, {\n    iconType: iconType\n  });\n  return /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n    className: (0, _classnames9[\"default\"])('kd-cq-sysnotification-header', _defineProperty(_defineProperty({}, _SystemNotification[\"default\"].header, true), 'theme-bg', !isHwStyle))\n  }, icon, /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n    className: (0, _classnames9[\"default\"])('kd-cq-sysnotification-header-title', _defineProperty(_defineProperty({}, _SystemNotification[\"default\"].title, true), _SystemNotification[\"default\"].grey, isHwStyle)),\n    title: title\n  }, title), /*#__PURE__*/_react[\"default\"].createElement(\"i\", {\n    className: (0, _classnames9[\"default\"])(_defineProperty(_defineProperty({\n      kdfont: true,\n      'kdfont-guanbiyulan': true\n    }, _SystemNotification[\"default\"]['close-button'], true), _SystemNotification[\"default\"].grey, isHwStyle)),\n    onClick: handleClearAll\n  }));\n}\n\n// footer\nfunction Footer(_ref3) {\n  var total = _ref3.total,\n    page = _ref3.page,\n    renderButton = _ref3.renderButton,\n    onPageChange = _ref3.onPageChange;\n  var getPaginationNode = (0, _react.useCallback)(function () {\n    return total > 1 && /*#__PURE__*/_react[\"default\"].createElement(_kdesign.Pagination, {\n      pageType: \"simple\",\n      current: page,\n      total: total,\n      pageSize: 1,\n      showQuickJumper: false,\n      onChange: onPageChange\n    });\n  }, [total, page, onPageChange]);\n  return /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n    className: (0, _classnames9[\"default\"])('kd-cq-sysnotification-footer', _SystemNotification[\"default\"].bottom)\n  }, renderButton(), getPaginationNode());\n}\n\n/***\n* * 指令：showNotification\n[\n  {\n    a: 'showNotification',\n    p: [{\n      mode: 0, // 风格：0为金蝶风格，1为华为风格\n      position: 'bottomRight'|'bottomLeft'|'topRight'|'topLeft', // 显示位置\n      offset: 20, // 偏移量\n      duration: 5000, // 延时关闭\n      notification: [{\n        appId: 'xxx',\n        notificationId: 'xxx', // 每一条通知的id\n        title: '系统提示', // 标题\n        content: '您的二开补丁已部署到沙箱环境。', // 内容\n        iconType: 'success'|'info'|'warning'|'error', // 图标类型（仅在华为风格下有效）\n        buttonInfo: [{ // 按钮组信息，最多配置3个按钮\n          key: 'detail',  // 按钮key，类似id\n          text: '查看详情',   // 按钮文本内容\n      }},{\n        mode: 2, //自定义风格\n        appId: 'xxx',\n        notificationId: 'xxx', // 每一条通知的id\n        title: '系统提示', // 标题\n        content: '您的二开补丁已部署到沙箱环境。', // 内容\n        iconType: 'success'|'info'|'warning'|'error', // 图标类型（仅在华为风格下有效）\n        buttonInfo: [{ // 按钮组信息，最多配置3个按钮\n          key: 'detail',  // 按钮key，类似id\n          text: '查看详情',   // 按钮文本内容\n      }],\n    }]\n  }}\n* */\nfunction Notification(_ref4) {\n  var data = _ref4.data;\n  var _useState = (0, _react.useState)(data),\n    _useState2 = _slicedToArray(_useState, 2),\n    notificationData = _useState2[0],\n    setNotificationData = _useState2[1];\n  var _useState3 = (0, _react.useState)(true),\n    _useState4 = _slicedToArray(_useState3, 2),\n    overflow = _useState4[0],\n    setOverflow = _useState4[1];\n  var _useState5 = (0, _react.useState)(1),\n    _useState6 = _slicedToArray(_useState5, 2),\n    page = _useState6[0],\n    setPage = _useState6[1];\n  var contentRef = (0, _react.useRef)();\n  var wrapperRef = (0, _react.useRef)();\n  var _notificationData$off = notificationData.offset,\n    offset = _notificationData$off === void 0 ? DEFAULT_OFFSET : _notificationData$off,\n    _notificationData$pos = notificationData.position,\n    position = _notificationData$pos === void 0 ? DEFAULT_POSITION : _notificationData$pos,\n    duration = notificationData.duration,\n    _notificationData$not = notificationData.notification,\n    notification = _notificationData$not === void 0 ? [] : _notificationData$not,\n    iconType = notificationData.iconType;\n  var pageId = (0, _appModelFunction.getRootPageId)()((0, _global.getGlobalState)());\n  var total = notification.length;\n  var currentNotification = notification[page - 1];\n  var _ref5 = currentNotification || {},\n    _ref5$title = _ref5.title,\n    title = _ref5$title === void 0 ? '' : _ref5$title,\n    _ref5$content = _ref5.content,\n    content = _ref5$content === void 0 ? '' : _ref5$content,\n    _ref5$buttonInfo = _ref5.buttonInfo,\n    buttonInfo = _ref5$buttonInfo === void 0 ? [] : _ref5$buttonInfo,\n    notificationId = _ref5.notificationId,\n    appId = _ref5.appId,\n    _ref5$mode = _ref5.mode,\n    mode = _ref5$mode === void 0 ? DEFAULT_MODE : _ref5$mode;\n  var isHwStyle = mode === 1; // 判断是否时华为风格\n  var direction = !POSITION_LIST.includes(position) ? DEFAULT_POSITION : position;\n  var style = calcPosition(direction, offset);\n\n  // 判断提示内容是否超出显示区域，超出需要加‘...’处理\n  var getOverFlow = function getOverFlow(el) {\n    if (!el) {\n      return false;\n    }\n    var clientHeight = el.clientHeight,\n      scrollHeight = el.scrollHeight;\n    return scrollHeight > clientHeight;\n  };\n  (0, _react.useEffect)(function () {\n    var isOverFlow = getOverFlow(contentRef.current);\n    setOverflow(isOverFlow);\n  }, [contentRef.current, currentNotification]);\n  (0, _react.useEffect)(function () {\n    // 数据改变，页码重置\n    var oldData = notificationData.notification;\n    var newData = data.notification;\n    oldData = oldData.map(function (item) {\n      return item.notificationId;\n    });\n    newData = newData.map(function (item) {\n      return item.notificationId;\n    });\n    if (!(0, _immutable.is)((0, _immutable.List)(oldData), (0, _immutable.List)(newData))) {\n      setNotificationData(data);\n      setPage(1);\n    }\n  }, [data]);\n  var timer = (0, _react.useRef)();\n  // 通知延时关闭功能\n  (0, _react.useEffect)(function () {\n    if (duration && typeof duration === 'number') {\n      timer.current = setTimeout(function () {\n        handleClearAll();\n      }, duration);\n    }\n    return function () {\n      clearTimeout(timer.current);\n    };\n  }, []);\n  var handleMouseOver = function handleMouseOver() {\n    timer.current && clearTimeout(timer.current);\n  };\n  var handleMouseOut = function handleMouseOut() {\n    clearTimeout(timer.current);\n    if (duration && typeof duration === 'number') {\n      timer.current = setTimeout(function () {\n        handleClearAll();\n      }, duration);\n    }\n  };\n\n  // 消息分页切换\n  var onPageChange = (0, _react.useCallback)(function (page) {\n    setPage(page);\n  }, []);\n  var clearNotification = (0, _react.useCallback)(function () {\n    var newData = _objectSpread({}, notificationData);\n    newData.notification = [];\n    setNotificationData(newData);\n  }, [notificationData]);\n\n  // 点击\"x\"\n  var handleClearAll = (0, _react.useCallback)(function () {\n    clearNotification();\n    var params = notification.reduce(function (obj, current) {\n      var appId = current.appId,\n        notificationId = current.notificationId;\n      if (!obj.appId) {\n        obj.appId = {\n          appid: appId,\n          rootpageid: pageId,\n          notificationids: [notificationId]\n        };\n      } else {\n        // 相同appId的做合并\n        obj.appId.notificationids.push(notificationId);\n      }\n      return obj;\n    }, {});\n    params = Object.values(params);\n    params.length && clearNotificationService(pageId, {\n      params: params\n    });\n  }, [notification, clearNotification]);\n\n  // 忽略\n  var handleIgnore = function handleIgnore() {\n    var newData = _objectSpread({}, notificationData);\n    newData.notification = newData.notification.filter(function (_ref6) {\n      var id = _ref6.notificationId;\n      return id !== notificationId;\n    });\n    setNotificationData(newData);\n    if (page === notification.length) {\n      setPage(function (page) {\n        return page - 1;\n      });\n    }\n  };\n\n  // 按钮点击\n  var handleButtonClick = function handleButtonClick(buttonKey) {\n    var args = {\n      appid: appId,\n      rootpageid: pageId,\n      notificationId: notificationId,\n      buttonKey: buttonKey,\n      params: []\n    };\n    if (buttonKey === IGNORE_BTN_KEY) {\n      handleIgnore();\n    }\n    notificationButtonClick(pageId, args);\n  };\n\n  // 获取按钮\n  var renderButton = (0, _react.useCallback)(function () {\n    return /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n      className: _SystemNotification[\"default\"]['btn-wrapper']\n    }, buttonInfo.map(function (item) {\n      var key = item.key,\n        text = item.text;\n      return /*#__PURE__*/_react[\"default\"].createElement(\"a\", {\n        className: (0, _classnames9[\"default\"])('kd-cq-btn', _defineProperty(_defineProperty({}, _SystemNotification[\"default\"].btn, true), 'link-color', true)),\n        key: key,\n        onClick: function onClick() {\n          return handleButtonClick(key);\n        }\n      }, text);\n    }));\n  }, [buttonInfo]);\n  var cls = (0, _classnames9[\"default\"])('kd-cq-sysnotification', _defineProperty(_defineProperty(_defineProperty({}, _SystemNotification[\"default\"]['notification-wrapper'], true), _SystemNotification[\"default\"]['notification-wrapper-mode' + mode], true), _SystemNotification[\"default\"][direction], true));\n  var contentCls = (0, _classnames9[\"default\"])(_defineProperty(_defineProperty({}, _SystemNotification[\"default\"].content, true), _SystemNotification[\"default\"].contentOverflow, overflow));\n  // 自定义风格\n  if (mode === 2) {\n    var titleHtml = (0, _sanitizeHtmlUtil.sanitize)(title);\n    var contentHtml = (0, _sanitizeHtmlUtil.sanitize)(content);\n    return total > 0 && /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n      className: cls,\n      style: style,\n      ref: wrapperRef,\n      id: \"system-notification\",\n      onMouseOut: handleMouseOut,\n      onMouseOver: handleMouseOver\n    }, /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n      className: _SystemNotification[\"default\"]['notification-custom-title'],\n      dangerouslySetInnerHTML: {\n        __html: titleHtml\n      }\n    }), /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n      className: _SystemNotification[\"default\"]['notification-custom-content'],\n      dangerouslySetInnerHTML: {\n        __html: contentHtml\n      }\n    }), /*#__PURE__*/_react[\"default\"].createElement(\"i\", {\n      className: (0, _classnames9[\"default\"])(_defineProperty({\n        kdfont: true,\n        'kdfont-guanbiyulan': true\n      }, _SystemNotification[\"default\"]['close-button'], true)),\n      onClick: handleClearAll\n    }), /*#__PURE__*/_react[\"default\"].createElement(Footer, {\n      total: total,\n      page: page,\n      renderButton: renderButton,\n      onPageChange: onPageChange,\n      mode: mode\n    }));\n  }\n  // 金蝶风格或华为风格\n  return total > 0 && /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n    className: cls,\n    style: style,\n    ref: wrapperRef,\n    id: \"system-notification\",\n    onMouseOut: handleMouseOut,\n    onMouseOver: handleMouseOver\n  }, /*#__PURE__*/_react[\"default\"].createElement(Header, {\n    title: title,\n    iconType: iconType,\n    isHwStyle: isHwStyle,\n    handleClearAll: handleClearAll\n  }), /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n    className: (0, _classnames9[\"default\"])('kd-cq-sysnotification-content', _SystemNotification[\"default\"]['notification-main'])\n  }, /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n    className: contentCls,\n    title: content,\n    ref: contentRef\n  }, content)), /*#__PURE__*/_react[\"default\"].createElement(Footer, {\n    total: total,\n    page: page,\n    renderButton: renderButton,\n    onPageChange: onPageChange\n  }));\n}\nfunction CreateNotification() {\n  var _useContext = (0, _react.useContext)(_SystemUIProvider.SystemUIContext),\n    data = _useContext.uiData;\n  var notification = /*#__PURE__*/_react[\"default\"].createElement(Notification, {\n    data: data\n  });\n  return /*#__PURE__*/(0, _reactDom.createPortal)(notification, document.body);\n}\nvar _default = exports[\"default\"] = CreateNotification;\n\n//# sourceURL=webpack://bos-platform/./src/page/SystemNotification.jsx?");

/***/ }),

/***/ "./src/util/sanitizeHtmlUtil.js":
/*!**************************************!*\
  !*** ./src/util/sanitizeHtmlUtil.js ***!
  \**************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {

eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"../../node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n  value: true\n}));\nexports.sanitize = void 0;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"../../node_modules/core-js/modules/es.array.concat.js\");\nvar _sanitizeHtml = _interopRequireDefault(__webpack_require__(/*! sanitize-html */ \"./node_modules/sanitize-html/dist/sanitize-html.js\"));\nvar _lodash = __webpack_require__(/*! lodash */ \"../../node_modules/lodash/lodash.js\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n// santize配置\nvar _sanitizeOptions = {\n  allowedTags: _sanitizeHtml[\"default\"].defaults.allowedTags.concat(['img']),\n  allowedAttributes: (0, _lodash.extend)({}, _sanitizeHtml[\"default\"].defaults.allowedAttributes, {\n    '*': ['style'],\n    a: []\n  })\n};\n\n/**\n * 用于HTML清理\n */\nvar sanitize = exports.sanitize = function sanitize() {\n  var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n  return (0, _sanitizeHtml[\"default\"])(text, _sanitizeOptions);\n};\n\n//# sourceURL=webpack://bos-platform/./src/util/sanitizeHtmlUtil.js?");

/***/ }),

/***/ "./src/page/SystemNotification.less":
/*!******************************************!*\
  !*** ./src/page/SystemNotification.less ***!
  \******************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {

eval("__webpack_require__.r(__webpack_exports__);\n// extracted by mini-css-extract-plugin\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\"notification-wrapper\":\"SystemNotification_notification-wrapper_NbJ0\",\"notification-wrapper-mode0\":\"SystemNotification_notification-wrapper-mode0_sdVy\",\"notification-wrapper-mode1\":\"SystemNotification_notification-wrapper-mode1_wa-C\",\"topLeft\":\"SystemNotification_topLeft_sSs5\",\"topRight\":\"SystemNotification_topRight_3Tix\",\"bottomRight\":\"SystemNotification_bottomRight_1SLM\",\"bottomLeft\":\"SystemNotification_bottomLeft_2S2y\",\"NotificationLeftFadeIn\":\"SystemNotification_NotificationLeftFadeIn_3iF3\",\"NotificationFadeIn\":\"SystemNotification_NotificationFadeIn_d1wl\",\"fadeOut\":\"SystemNotification_fadeOut_2A7p\",\"NotificationFadeOut\":\"SystemNotification_NotificationFadeOut_2c8z\",\"header\":\"SystemNotification_header_1ZyB\",\"header-icon\":\"SystemNotification_header-icon_3DR7\",\"title\":\"SystemNotification_title_1fKJ\",\"grey\":\"SystemNotification_grey_2Lbr\",\"notification-custom-title\":\"SystemNotification_notification-custom-title_3YnB\",\"notification-custom-content\":\"SystemNotification_notification-custom-content_vmsw\",\"close-button\":\"SystemNotification_close-button_2Cht\",\"bottom\":\"SystemNotification_bottom_HPyf\",\"btn\":\"SystemNotification_btn_2-_I\",\"notification-main\":\"SystemNotification_notification-main_cWDe\",\"content\":\"SystemNotification_content_3MHR\",\"contentOverflow\":\"SystemNotification_contentOverflow_1jq8\"});\n\n//# sourceURL=webpack://bos-platform/./src/page/SystemNotification.less?");

/***/ })

}]);