systemrobotassistant 3.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of systemrobotassistant might be problematic. Click here for more details.
- package/.eslintignore +6 -0
- package/.eslintrc +45 -0
- package/.gitlab-ci.yml +52 -0
- package/.lecprc.ts +76 -0
- package/.yarnrc +1 -0
- package/CHANGELOG.md +114 -0
- package/README.md +14 -0
- package/custom-amd-plugin.ts +46 -0
- package/es/component/answer-itme/index.d.ts +20 -0
- package/es/component/answer-itme/index.d.ts.map +1 -0
- package/es/component/answer-itme/index.js +41 -0
- package/es/component/answer-itme/style.css +35 -0
- package/es/component/data-container/index.d.ts +19 -0
- package/es/component/data-container/index.d.ts.map +1 -0
- package/es/component/data-container/index.js +37 -0
- package/es/component/data-container/style.css +26 -0
- package/es/component/days-tab/index.d.ts +6 -0
- package/es/component/days-tab/index.d.ts.map +1 -0
- package/es/component/days-tab/index.js +119 -0
- package/es/component/days-tab/style.css +43 -0
- package/es/component/days-tab/utils.d.ts +32 -0
- package/es/component/days-tab/utils.d.ts.map +1 -0
- package/es/component/days-tab/utils.js +98 -0
- package/es/component/error-boundary/index.d.ts +2 -0
- package/es/component/error-boundary/index.d.ts.map +1 -0
- package/es/component/error-boundary/index.js +33 -0
- package/es/component/it-notice-modal/columns.d.ts +11 -0
- package/es/component/it-notice-modal/columns.d.ts.map +1 -0
- package/es/component/it-notice-modal/columns.js +108 -0
- package/es/component/it-notice-modal/double-tab.d.ts +6 -0
- package/es/component/it-notice-modal/double-tab.d.ts.map +1 -0
- package/es/component/it-notice-modal/double-tab.js +94 -0
- package/es/component/it-notice-modal/index.d.ts +6 -0
- package/es/component/it-notice-modal/index.d.ts.map +1 -0
- package/es/component/it-notice-modal/index.js +488 -0
- package/es/component/it-notice-modal/server.d.ts +8 -0
- package/es/component/it-notice-modal/server.d.ts.map +1 -0
- package/es/component/it-notice-modal/server.js +43 -0
- package/es/component/it-notice-modal/single-tab.d.ts +6 -0
- package/es/component/it-notice-modal/single-tab.d.ts.map +1 -0
- package/es/component/it-notice-modal/single-tab.js +82 -0
- package/es/component/it-notice-modal/style.css +301 -0
- package/es/component/it-notice-modal/utils.d.ts +2 -0
- package/es/component/it-notice-modal/utils.d.ts.map +1 -0
- package/es/component/it-notice-modal/utils.js +8 -0
- package/es/component/it-notice-tab/index.d.ts +6 -0
- package/es/component/it-notice-tab/index.d.ts.map +1 -0
- package/es/component/it-notice-tab/index.js +206 -0
- package/es/component/it-notice-tab/server.d.ts +3 -0
- package/es/component/it-notice-tab/server.d.ts.map +1 -0
- package/es/component/it-notice-tab/server.js +13 -0
- package/es/component/it-notice-tab/style.css +103 -0
- package/es/component/mail-list-modal/index.d.ts +2 -0
- package/es/component/mail-list-modal/index.d.ts.map +1 -0
- package/es/component/mail-list-modal/index.js +306 -0
- package/es/component/mail-list-modal/server.d.ts +7 -0
- package/es/component/mail-list-modal/server.d.ts.map +1 -0
- package/es/component/mail-list-modal/server.js +38 -0
- package/es/component/mail-list-modal/style.css +132 -0
- package/es/component/myself-chat-card/index.d.ts +15 -0
- package/es/component/myself-chat-card/index.d.ts.map +1 -0
- package/es/component/myself-chat-card/index.js +25 -0
- package/es/component/myself-chat-card/style.css +22 -0
- package/es/component/need-answer/index.d.ts +15 -0
- package/es/component/need-answer/index.d.ts.map +1 -0
- package/es/component/need-answer/index.js +60 -0
- package/es/component/need-answer/style.css +19 -0
- package/es/component/opppsition-chat-card/index.d.ts +11 -0
- package/es/component/opppsition-chat-card/index.d.ts.map +1 -0
- package/es/component/opppsition-chat-card/index.js +25 -0
- package/es/component/opppsition-chat-card/style.css +23 -0
- package/es/component/question-library/index.d.ts +10 -0
- package/es/component/question-library/index.d.ts.map +1 -0
- package/es/component/question-library/index.js +291 -0
- package/es/component/question-library/server.d.ts +4 -0
- package/es/component/question-library/server.d.ts.map +1 -0
- package/es/component/question-library/server.js +19 -0
- package/es/component/question-library/style.css +75 -0
- package/es/component/question-tag/index.d.ts +11 -0
- package/es/component/question-tag/index.d.ts.map +1 -0
- package/es/component/question-tag/index.js +23 -0
- package/es/component/question-tag/style.css +12 -0
- package/es/component/recommend-questions-card/index.d.ts +10 -0
- package/es/component/recommend-questions-card/index.d.ts.map +1 -0
- package/es/component/recommend-questions-card/index.js +104 -0
- package/es/component/recommend-questions-card/style.css +54 -0
- package/es/component/scroll-view/index.d.ts +3 -0
- package/es/component/scroll-view/index.d.ts.map +1 -0
- package/es/component/scroll-view/index.js +2 -0
- package/es/component/scroll-view/scroll-view.d.ts +18 -0
- package/es/component/scroll-view/scroll-view.d.ts.map +1 -0
- package/es/component/scroll-view/scroll-view.js +66 -0
- package/es/component/scroll-view/style.css +34 -0
- package/es/component/tab/index.d.ts +2 -0
- package/es/component/tab/index.d.ts.map +1 -0
- package/es/component/tab/index.js +18 -0
- package/es/component/tab/style.css +26 -0
- package/es/component/tips-answer/index.d.ts +15 -0
- package/es/component/tips-answer/index.d.ts.map +1 -0
- package/es/component/tips-answer/index.js +28 -0
- package/es/component/tips-answer/style.css +10 -0
- package/es/images/expire-robot.svg +16 -0
- package/es/images/pc-invalid.svg +11 -0
- package/es/images/screenshot-5.png +0 -0
- package/es/index.d.ts +92 -0
- package/es/index.d.ts.map +1 -0
- package/es/index.js +506 -0
- package/es/js/const.d.ts +41 -0
- package/es/js/const.d.ts.map +1 -0
- package/es/js/const.js +46 -0
- package/es/js/gen-render-promise.d.ts +9 -0
- package/es/js/gen-render-promise.d.ts.map +1 -0
- package/es/js/gen-render-promise.js +30 -0
- package/es/js/get-time.d.ts +15 -0
- package/es/js/get-time.d.ts.map +1 -0
- package/es/js/get-time.js +35 -0
- package/es/js/hfc-space.d.ts +16 -0
- package/es/js/hfc-space.d.ts.map +1 -0
- package/es/js/hfc-space.js +71 -0
- package/es/js/render-special.d.ts +16 -0
- package/es/js/render-special.d.ts.map +1 -0
- package/es/js/render-special.js +53 -0
- package/es/js/request/fetch.d.ts +10 -0
- package/es/js/request/fetch.d.ts.map +1 -0
- package/es/js/request/fetch.js +81 -0
- package/es/js/request/request.d.ts +3 -0
- package/es/js/request/request.d.ts.map +1 -0
- package/es/js/request/request.js +63 -0
- package/es/js/showMessage.d.ts +15 -0
- package/es/js/showMessage.d.ts.map +1 -0
- package/es/js/showMessage.js +75 -0
- package/es/js/state-immer.d.ts +3 -0
- package/es/js/state-immer.d.ts.map +1 -0
- package/es/js/state-immer.js +19 -0
- package/es/js/timer-executor.d.ts +3 -0
- package/es/js/timer-executor.d.ts.map +1 -0
- package/es/js/timer-executor.js +83 -0
- package/es/js/to-hfc.d.ts +2 -0
- package/es/js/to-hfc.d.ts.map +1 -0
- package/es/js/to-hfc.js +8 -0
- package/es/js/utils.d.ts +3 -0
- package/es/js/utils.d.ts.map +1 -0
- package/es/js/utils.js +11 -0
- package/es/jsx/chat-modal.d.ts +16 -0
- package/es/jsx/chat-modal.d.ts.map +1 -0
- package/es/jsx/chat-modal.js +268 -0
- package/es/server.d.ts +8 -0
- package/es/server.d.ts.map +1 -0
- package/es/server.js +44 -0
- package/es/style.css +174 -0
- package/lib/component/answer-itme/index.d.ts +20 -0
- package/lib/component/answer-itme/index.d.ts.map +1 -0
- package/lib/component/answer-itme/index.js +51 -0
- package/lib/component/answer-itme/style.css +35 -0
- package/lib/component/data-container/index.d.ts +19 -0
- package/lib/component/data-container/index.d.ts.map +1 -0
- package/lib/component/data-container/index.js +45 -0
- package/lib/component/data-container/style.css +26 -0
- package/lib/component/days-tab/index.d.ts +6 -0
- package/lib/component/days-tab/index.d.ts.map +1 -0
- package/lib/component/days-tab/index.js +129 -0
- package/lib/component/days-tab/style.css +43 -0
- package/lib/component/days-tab/utils.d.ts +32 -0
- package/lib/component/days-tab/utils.d.ts.map +1 -0
- package/lib/component/days-tab/utils.js +110 -0
- package/lib/component/error-boundary/index.d.ts +2 -0
- package/lib/component/error-boundary/index.d.ts.map +1 -0
- package/lib/component/error-boundary/index.js +40 -0
- package/lib/component/it-notice-modal/columns.d.ts +11 -0
- package/lib/component/it-notice-modal/columns.d.ts.map +1 -0
- package/lib/component/it-notice-modal/columns.js +116 -0
- package/lib/component/it-notice-modal/double-tab.d.ts +6 -0
- package/lib/component/it-notice-modal/double-tab.d.ts.map +1 -0
- package/lib/component/it-notice-modal/double-tab.js +104 -0
- package/lib/component/it-notice-modal/index.d.ts +6 -0
- package/lib/component/it-notice-modal/index.d.ts.map +1 -0
- package/lib/component/it-notice-modal/index.js +499 -0
- package/lib/component/it-notice-modal/server.d.ts +8 -0
- package/lib/component/it-notice-modal/server.d.ts.map +1 -0
- package/lib/component/it-notice-modal/server.js +55 -0
- package/lib/component/it-notice-modal/single-tab.d.ts +6 -0
- package/lib/component/it-notice-modal/single-tab.d.ts.map +1 -0
- package/lib/component/it-notice-modal/single-tab.js +92 -0
- package/lib/component/it-notice-modal/style.css +301 -0
- package/lib/component/it-notice-modal/utils.d.ts +2 -0
- package/lib/component/it-notice-modal/utils.d.ts.map +1 -0
- package/lib/component/it-notice-modal/utils.js +15 -0
- package/lib/component/it-notice-tab/index.d.ts +6 -0
- package/lib/component/it-notice-tab/index.d.ts.map +1 -0
- package/lib/component/it-notice-tab/index.js +216 -0
- package/lib/component/it-notice-tab/server.d.ts +3 -0
- package/lib/component/it-notice-tab/server.d.ts.map +1 -0
- package/lib/component/it-notice-tab/server.js +20 -0
- package/lib/component/it-notice-tab/style.css +103 -0
- package/lib/component/mail-list-modal/index.d.ts +2 -0
- package/lib/component/mail-list-modal/index.d.ts.map +1 -0
- package/lib/component/mail-list-modal/index.js +316 -0
- package/lib/component/mail-list-modal/server.d.ts +7 -0
- package/lib/component/mail-list-modal/server.d.ts.map +1 -0
- package/lib/component/mail-list-modal/server.js +50 -0
- package/lib/component/mail-list-modal/style.css +132 -0
- package/lib/component/myself-chat-card/index.d.ts +15 -0
- package/lib/component/myself-chat-card/index.d.ts.map +1 -0
- package/lib/component/myself-chat-card/index.js +35 -0
- package/lib/component/myself-chat-card/style.css +22 -0
- package/lib/component/need-answer/index.d.ts +15 -0
- package/lib/component/need-answer/index.d.ts.map +1 -0
- package/lib/component/need-answer/index.js +70 -0
- package/lib/component/need-answer/style.css +19 -0
- package/lib/component/opppsition-chat-card/index.d.ts +11 -0
- package/lib/component/opppsition-chat-card/index.d.ts.map +1 -0
- package/lib/component/opppsition-chat-card/index.js +35 -0
- package/lib/component/opppsition-chat-card/style.css +23 -0
- package/lib/component/question-library/index.d.ts +10 -0
- package/lib/component/question-library/index.d.ts.map +1 -0
- package/lib/component/question-library/index.js +301 -0
- package/lib/component/question-library/server.d.ts +4 -0
- package/lib/component/question-library/server.d.ts.map +1 -0
- package/lib/component/question-library/server.js +27 -0
- package/lib/component/question-library/style.css +75 -0
- package/lib/component/question-tag/index.d.ts +11 -0
- package/lib/component/question-tag/index.d.ts.map +1 -0
- package/lib/component/question-tag/index.js +33 -0
- package/lib/component/question-tag/style.css +12 -0
- package/lib/component/recommend-questions-card/index.d.ts +10 -0
- package/lib/component/recommend-questions-card/index.d.ts.map +1 -0
- package/lib/component/recommend-questions-card/index.js +114 -0
- package/lib/component/recommend-questions-card/style.css +54 -0
- package/lib/component/scroll-view/index.d.ts +3 -0
- package/lib/component/scroll-view/index.d.ts.map +1 -0
- package/lib/component/scroll-view/index.js +10 -0
- package/lib/component/scroll-view/scroll-view.d.ts +18 -0
- package/lib/component/scroll-view/scroll-view.d.ts.map +1 -0
- package/lib/component/scroll-view/scroll-view.js +76 -0
- package/lib/component/scroll-view/style.css +34 -0
- package/lib/component/tab/index.d.ts +2 -0
- package/lib/component/tab/index.d.ts.map +1 -0
- package/lib/component/tab/index.js +28 -0
- package/lib/component/tab/style.css +26 -0
- package/lib/component/tips-answer/index.d.ts +15 -0
- package/lib/component/tips-answer/index.d.ts.map +1 -0
- package/lib/component/tips-answer/index.js +38 -0
- package/lib/component/tips-answer/style.css +10 -0
- package/lib/images/expire-robot.svg +16 -0
- package/lib/images/pc-invalid.svg +11 -0
- package/lib/images/screenshot-5.png +0 -0
- package/lib/index.d.ts +92 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +516 -0
- package/lib/js/const.d.ts +41 -0
- package/lib/js/const.d.ts.map +1 -0
- package/lib/js/const.js +55 -0
- package/lib/js/gen-render-promise.d.ts +9 -0
- package/lib/js/gen-render-promise.d.ts.map +1 -0
- package/lib/js/gen-render-promise.js +37 -0
- package/lib/js/get-time.d.ts +15 -0
- package/lib/js/get-time.d.ts.map +1 -0
- package/lib/js/get-time.js +43 -0
- package/lib/js/hfc-space.d.ts +16 -0
- package/lib/js/hfc-space.d.ts.map +1 -0
- package/lib/js/hfc-space.js +91 -0
- package/lib/js/render-special.d.ts +16 -0
- package/lib/js/render-special.d.ts.map +1 -0
- package/lib/js/render-special.js +61 -0
- package/lib/js/request/fetch.d.ts +10 -0
- package/lib/js/request/fetch.d.ts.map +1 -0
- package/lib/js/request/fetch.js +88 -0
- package/lib/js/request/request.d.ts +3 -0
- package/lib/js/request/request.d.ts.map +1 -0
- package/lib/js/request/request.js +71 -0
- package/lib/js/showMessage.d.ts +15 -0
- package/lib/js/showMessage.d.ts.map +1 -0
- package/lib/js/showMessage.js +83 -0
- package/lib/js/state-immer.d.ts +3 -0
- package/lib/js/state-immer.d.ts.map +1 -0
- package/lib/js/state-immer.js +27 -0
- package/lib/js/timer-executor.d.ts +3 -0
- package/lib/js/timer-executor.d.ts.map +1 -0
- package/lib/js/timer-executor.js +91 -0
- package/lib/js/to-hfc.d.ts +2 -0
- package/lib/js/to-hfc.d.ts.map +1 -0
- package/lib/js/to-hfc.js +14 -0
- package/lib/js/utils.d.ts +3 -0
- package/lib/js/utils.d.ts.map +1 -0
- package/lib/js/utils.js +19 -0
- package/lib/jsx/chat-modal.d.ts +16 -0
- package/lib/jsx/chat-modal.d.ts.map +1 -0
- package/lib/jsx/chat-modal.js +278 -0
- package/lib/server.d.ts +8 -0
- package/lib/server.d.ts.map +1 -0
- package/lib/server.js +58 -0
- package/lib/style.css +174 -0
- package/package.json +57 -0
- package/rct.config.js +8 -0
- package/src/component/answer-itme/index.jsx +64 -0
- package/src/component/answer-itme/style.less +37 -0
- package/src/component/data-container/index.jsx +45 -0
- package/src/component/data-container/style.less +27 -0
- package/src/component/days-tab/index.jsx +114 -0
- package/src/component/days-tab/style.less +55 -0
- package/src/component/days-tab/utils.js +87 -0
- package/src/component/error-boundary/index.jsx +39 -0
- package/src/component/it-notice-modal/columns.js +102 -0
- package/src/component/it-notice-modal/double-tab.jsx +83 -0
- package/src/component/it-notice-modal/index.jsx +404 -0
- package/src/component/it-notice-modal/server.js +43 -0
- package/src/component/it-notice-modal/single-tab.jsx +70 -0
- package/src/component/it-notice-modal/style.less +367 -0
- package/src/component/it-notice-modal/utils.js +8 -0
- package/src/component/it-notice-tab/index.jsx +196 -0
- package/src/component/it-notice-tab/server.js +14 -0
- package/src/component/it-notice-tab/style.less +120 -0
- package/src/component/mail-list-modal/index.jsx +270 -0
- package/src/component/mail-list-modal/server.js +38 -0
- package/src/component/mail-list-modal/style.less +154 -0
- package/src/component/myself-chat-card/index.jsx +27 -0
- package/src/component/myself-chat-card/style.less +30 -0
- package/src/component/need-answer/index.jsx +56 -0
- package/src/component/need-answer/style.less +21 -0
- package/src/component/opppsition-chat-card/index.jsx +25 -0
- package/src/component/opppsition-chat-card/style.less +33 -0
- package/src/component/question-library/index.jsx +316 -0
- package/src/component/question-library/server.js +19 -0
- package/src/component/question-library/style.less +102 -0
- package/src/component/question-tag/index.jsx +27 -0
- package/src/component/question-tag/style.less +15 -0
- package/src/component/recommend-questions-card/index.jsx +111 -0
- package/src/component/recommend-questions-card/style.less +66 -0
- package/src/component/scroll-view/index.js +3 -0
- package/src/component/scroll-view/scroll-view.jsx +74 -0
- package/src/component/scroll-view/style.less +37 -0
- package/src/component/tab/index.jsx +17 -0
- package/src/component/tab/style.less +26 -0
- package/src/component/tips-answer/index.jsx +38 -0
- package/src/component/tips-answer/style.less +11 -0
- package/src/images/expire-robot.svg +16 -0
- package/src/images/pc-invalid.svg +11 -0
- package/src/images/screenshot-5.png +0 -0
- package/src/index.jsx +554 -0
- package/src/js/const.js +48 -0
- package/src/js/gen-render-promise.js +32 -0
- package/src/js/get-time.js +35 -0
- package/src/js/hfc-space.js +91 -0
- package/src/js/render-special.js +64 -0
- package/src/js/request/fetch.js +87 -0
- package/src/js/request/request.js +74 -0
- package/src/js/showMessage.js +81 -0
- package/src/js/state-immer.js +12 -0
- package/src/js/timer-executor.js +37 -0
- package/src/js/to-hfc.js +9 -0
- package/src/js/utils.js +13 -0
- package/src/jsx/chat-modal.jsx +254 -0
- package/src/main.js +1 -0
- package/src/server.js +45 -0
- package/src/style.less +229 -0
- package/test/cases/case-01.assert.js +6 -0
- package/test/cases/case-01.source.jsx +17 -0
- package/test/cases/case-02.assert.js +6 -0
- package/test/cases/case-02.source.jsx +25 -0
- package/test/cases/case-02.style.less +15 -0
- package/test/cases/case-03.source.jsx +69 -0
- package/test/cases/case-03.style.less +3 -0
- package/tsconfig.json +48 -0
- package/typings.d.ts +5 -0
- package/umd/b415d90208c277ba3703.png +0 -0
- package/umd/index.css +1753 -0
- package/umd/index.js +36258 -0
- package/umd/index.min.css +1 -0
- package/umd/index.min.js +657 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _moment = _interopRequireDefault(require("moment"));
|
|
8
|
+
var _itNoticeModal = require("../component/it-notice-modal");
|
|
9
|
+
var _server = require("../server");
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
12
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
13
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
14
|
+
var timer = null;
|
|
15
|
+
var _default = /*#__PURE__*/function () {
|
|
16
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(zIndex, t) {
|
|
17
|
+
var now, timeTemp, weekDay, nextTime, curHour, res;
|
|
18
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
19
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
20
|
+
case 0:
|
|
21
|
+
if (timer) {
|
|
22
|
+
clearTimeout(timer);
|
|
23
|
+
}
|
|
24
|
+
now = (0, _moment.default)();
|
|
25
|
+
timeTemp = now.clone();
|
|
26
|
+
weekDay = now.day();
|
|
27
|
+
weekDay = weekDay === 0 ? 7 : weekDay;
|
|
28
|
+
nextTime = 0; // 周一到周日的10点
|
|
29
|
+
curHour = now.hours();
|
|
30
|
+
if (!(curHour < 10)) {
|
|
31
|
+
_context2.next = 11;
|
|
32
|
+
break;
|
|
33
|
+
}
|
|
34
|
+
nextTime = timeTemp.add(10 - curHour, 'hour').minutes(0).seconds(0);
|
|
35
|
+
_context2.next = 20;
|
|
36
|
+
break;
|
|
37
|
+
case 11:
|
|
38
|
+
if (!(now.minutes() === 0 && now.seconds() === 0)) {
|
|
39
|
+
_context2.next = 19;
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
_context2.next = 14;
|
|
43
|
+
return (0, _server.isPopITInform)();
|
|
44
|
+
case 14:
|
|
45
|
+
res = _context2.sent;
|
|
46
|
+
if (res.info) {
|
|
47
|
+
(0, _itNoticeModal.openITNoticeModal)({
|
|
48
|
+
zIndex,
|
|
49
|
+
t
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
nextTime = timeTemp.add(1, 'days').hour(10).minutes(0).seconds(0);
|
|
53
|
+
_context2.next = 20;
|
|
54
|
+
break;
|
|
55
|
+
case 19:
|
|
56
|
+
nextTime = timeTemp.add(1, 'days').hour(10).minutes(0).seconds(0);
|
|
57
|
+
case 20:
|
|
58
|
+
if (nextTime) {
|
|
59
|
+
timer = setTimeout( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
60
|
+
var res;
|
|
61
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
62
|
+
while (1) switch (_context.prev = _context.next) {
|
|
63
|
+
case 0:
|
|
64
|
+
_context.next = 2;
|
|
65
|
+
return (0, _server.isPopITInform)();
|
|
66
|
+
case 2:
|
|
67
|
+
res = _context.sent;
|
|
68
|
+
if (res !== null && res !== void 0 && res.info) {
|
|
69
|
+
(0, _itNoticeModal.openITNoticeModal)({
|
|
70
|
+
zIndex,
|
|
71
|
+
t
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
case 4:
|
|
75
|
+
case "end":
|
|
76
|
+
return _context.stop();
|
|
77
|
+
}
|
|
78
|
+
}, _callee);
|
|
79
|
+
})), nextTime - now);
|
|
80
|
+
}
|
|
81
|
+
case 21:
|
|
82
|
+
case "end":
|
|
83
|
+
return _context2.stop();
|
|
84
|
+
}
|
|
85
|
+
}, _callee2);
|
|
86
|
+
}));
|
|
87
|
+
return function (_x, _x2) {
|
|
88
|
+
return _ref.apply(this, arguments);
|
|
89
|
+
};
|
|
90
|
+
}();
|
|
91
|
+
exports.default = _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"to-hfc.d.ts","sourceRoot":"","sources":["../../src/js/to-hfc.js"],"names":[],"mappings":"AAEA,uCAMC"}
|
package/lib/js/to-hfc.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.toHfc = toHfc;
|
|
7
|
+
var _hfcSpace = require("./hfc-space");
|
|
8
|
+
function toHfc(path) {
|
|
9
|
+
var origin = `https://${(0, _hfcSpace.getOrigin)()}/#`;
|
|
10
|
+
var originUrl = encodeURIComponent(window.location.href);
|
|
11
|
+
var hfcSpace = (0, _hfcSpace.getHfcSpace)();
|
|
12
|
+
var lang = (0, _hfcSpace.getLocalStorage)(`${hfcSpace}-lang`) || 'CN';
|
|
13
|
+
window.open(`${origin + path}/?token=${(0, _hfcSpace.getHfcToken)()}&hfcSpace=${hfcSpace}&originUrl=${originUrl}&userName=${(0, _hfcSpace.getHfcUserName)()}&lang=${lang}`);
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/js/utils.js"],"names":[],"mappings":"AAAO,sCAAiE;AAGjE,wEASN"}
|
package/lib/js/utils.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getRandomID = exports.debounce = void 0;
|
|
7
|
+
var getRandomID = () => Math.random().toString(36).substring(2);
|
|
8
|
+
exports.getRandomID = getRandomID;
|
|
9
|
+
var debounce = (fn, delay) => {
|
|
10
|
+
var pre = new Date().getTime();
|
|
11
|
+
return function () {
|
|
12
|
+
var next = new Date().getTime();
|
|
13
|
+
if (next - pre >= delay) {
|
|
14
|
+
fn(...arguments);
|
|
15
|
+
pre = next;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
exports.debounce = debounce;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
export interface ChatModalIconRef {
|
|
4
|
+
getBoundingClientRect?: (...args: any[])=>any;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface ChatModalProps {
|
|
8
|
+
onClose?: (...args: any[])=>any;
|
|
9
|
+
iconRef?: ChatModalIconRef;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export default class ChatModal extends React.Component<ChatModalProps, any> {
|
|
13
|
+
render(): JSX.Element;
|
|
14
|
+
|
|
15
|
+
}
|
|
16
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-modal.d.ts","sourceRoot":"","sources":["../../src/jsx/chat-modal.jsx"],"names":[],"mappings":";AAYA;IACE,wBAaC;IAXC;;;;;;;;;MASC;IAqFH,8BAiBC;IAlGD,0BA0BC;IAED;;;;;;MA4CC;IAED,6BAKC;IAsBD,kDAoHC;CACF"}
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _Icon = _interopRequireDefault(require("@shein-components/Icon"));
|
|
9
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
+
var _shineout = require("shineout");
|
|
11
|
+
require("../style.css");
|
|
12
|
+
var _const = require("../js/const");
|
|
13
|
+
var _tab = _interopRequireDefault(require("../component/tab"));
|
|
14
|
+
var _questionLibrary = _interopRequireDefault(require("../component/question-library"));
|
|
15
|
+
var _mailListModal = _interopRequireDefault(require("../component/mail-list-modal"));
|
|
16
|
+
var _itNoticeTab = _interopRequireDefault(require("../component/it-notice-tab"));
|
|
17
|
+
var Server = _interopRequireWildcard(require("../server"));
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
20
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
22
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
23
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
24
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
25
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
26
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
27
|
+
var styles = {
|
|
28
|
+
"renderIconWrapper": "shein-components_systemrobotassistant_renderIconWrapper",
|
|
29
|
+
"draggableIcon": "shein-components_systemrobotassistant_draggableIcon",
|
|
30
|
+
"iconWrapper": "shein-components_systemrobotassistant_iconWrapper",
|
|
31
|
+
"avatarWrap": "shein-components_systemrobotassistant_avatarWrap",
|
|
32
|
+
"avatarBorder": "shein-components_systemrobotassistant_avatarBorder",
|
|
33
|
+
"collapseRobotBox": "shein-components_systemrobotassistant_collapseRobotBox",
|
|
34
|
+
"collapseIcon": "shein-components_systemrobotassistant_collapseIcon",
|
|
35
|
+
"redDot": "shein-components_systemrobotassistant_redDot",
|
|
36
|
+
"chatModalWrapper": "shein-components_systemrobotassistant_chatModalWrapper",
|
|
37
|
+
"header": "shein-components_systemrobotassistant_header",
|
|
38
|
+
"midlleWrapper": "shein-components_systemrobotassistant_midlleWrapper",
|
|
39
|
+
"tabItem": "shein-components_systemrobotassistant_tabItem",
|
|
40
|
+
"leftTitle": "shein-components_systemrobotassistant_leftTitle",
|
|
41
|
+
"tabIcon": "shein-components_systemrobotassistant_tabIcon",
|
|
42
|
+
"title": "shein-components_systemrobotassistant_title",
|
|
43
|
+
"avatarClass": "shein-components_systemrobotassistant_avatarClass",
|
|
44
|
+
"suggestion": "shein-components_systemrobotassistant_suggestion",
|
|
45
|
+
"link": "shein-components_systemrobotassistant_link",
|
|
46
|
+
"closedIcon": "shein-components_systemrobotassistant_closedIcon",
|
|
47
|
+
"chatContentWrapper": "shein-components_systemrobotassistant_chatContentWrapper",
|
|
48
|
+
"switch": "shein-components_systemrobotassistant_switch",
|
|
49
|
+
"robotImg": "shein-components_systemrobotassistant_robotImg",
|
|
50
|
+
"robotGif": "shein-components_systemrobotassistant_robotGif",
|
|
51
|
+
"expireStatus": "shein-components_systemrobotassistant_expireStatus",
|
|
52
|
+
"none": "shein-components_systemrobotassistant_none",
|
|
53
|
+
"modalMask": "shein-components_systemrobotassistant_modalMask"
|
|
54
|
+
};
|
|
55
|
+
class ChatModal extends _react.Component {
|
|
56
|
+
constructor(props) {
|
|
57
|
+
super(props);
|
|
58
|
+
this.state = {
|
|
59
|
+
selectedTab: '',
|
|
60
|
+
tabs: [],
|
|
61
|
+
isHasGuarantee: false,
|
|
62
|
+
groupTree: [],
|
|
63
|
+
defaultSelectedGroupId: '',
|
|
64
|
+
chatModalWidth: 440,
|
|
65
|
+
itLen: 0,
|
|
66
|
+
allConfigUserGroupIdList: []
|
|
67
|
+
};
|
|
68
|
+
this.getGroupTree = this.getGroupTree.bind(this);
|
|
69
|
+
}
|
|
70
|
+
componentDidMount() {
|
|
71
|
+
Server.functiomPermission().then(res => {
|
|
72
|
+
if (res) {
|
|
73
|
+
var _res$info;
|
|
74
|
+
// 根据返回数组排序
|
|
75
|
+
var arr = res.info || [];
|
|
76
|
+
var newArr = [];
|
|
77
|
+
arr.forEach(i => {
|
|
78
|
+
_const.TABS.forEach(vo => {
|
|
79
|
+
if (i.value === vo.value && i.value !== _const.TABS[2].value) {
|
|
80
|
+
newArr.push(_objectSpread(_objectSpread({}, vo), i));
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
this.setState({
|
|
85
|
+
tabs: newArr,
|
|
86
|
+
selectedTab: newArr === null || newArr === void 0 ? void 0 : newArr[0].value,
|
|
87
|
+
isHasGuarantee: !!((_res$info = res.info) !== null && _res$info !== void 0 && _res$info.find(vo => vo.value === _const.TABS[2].value))
|
|
88
|
+
}, () => {
|
|
89
|
+
this.getGroupTree();
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
getStyle() {
|
|
95
|
+
var _modalRef$current;
|
|
96
|
+
var _this$state = this.state,
|
|
97
|
+
chatModalWidth = _this$state.chatModalWidth,
|
|
98
|
+
selectedTab = _this$state.selectedTab,
|
|
99
|
+
itLen = _this$state.itLen;
|
|
100
|
+
var _this$props = this.props,
|
|
101
|
+
iconRef = _this$props.iconRef,
|
|
102
|
+
modalRef = _this$props.modalRef;
|
|
103
|
+
var offsetX = 12;
|
|
104
|
+
if (!iconRef) {
|
|
105
|
+
return {
|
|
106
|
+
bottom: 68 / 2 + 12,
|
|
107
|
+
right: 56 + 32 + offsetX
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
var _ref = (iconRef === null || iconRef === void 0 ? void 0 : iconRef.getBoundingClientRect()) || {},
|
|
111
|
+
left = _ref.left,
|
|
112
|
+
top = _ref.top,
|
|
113
|
+
width = _ref.width,
|
|
114
|
+
height = _ref.height;
|
|
115
|
+
var modalHeight = Math.min(660, window.innerHeight * 0.85);
|
|
116
|
+
var modalWidth = chatModalWidth;
|
|
117
|
+
var offsetLeft = selectedTab === _const.TABS[3].value && itLen > 1 ? 120 : 0; // 左边的偏移量
|
|
118
|
+
var _ref2 = (modalRef === null || modalRef === void 0 ? void 0 : (_modalRef$current = modalRef.current) === null || _modalRef$current === void 0 ? void 0 : _modalRef$current.getBoundingClientRect()) || {},
|
|
119
|
+
_ref2$left = _ref2.left,
|
|
120
|
+
modalLeft = _ref2$left === void 0 ? 0 : _ref2$left,
|
|
121
|
+
_ref2$top = _ref2.top,
|
|
122
|
+
modalTop = _ref2$top === void 0 ? 0 : _ref2$top;
|
|
123
|
+
var bodyWidth = window.innerWidth;
|
|
124
|
+
var bodyHeight = window.innerHeight;
|
|
125
|
+
var style = {};
|
|
126
|
+
// 优先上下弹出,再考虑左右弹出
|
|
127
|
+
if (top - height / 2 >= modalHeight) {
|
|
128
|
+
// 如果可以放在上方,距离图标高度1/2
|
|
129
|
+
style.top = top - modalHeight + height / 2;
|
|
130
|
+
} else if (bodyHeight - height / 2 - top >= modalHeight) {
|
|
131
|
+
// 如果可以放在下方
|
|
132
|
+
style.top = top + height / 2;
|
|
133
|
+
} else if (modalTop > 0 && modalTop < top) {
|
|
134
|
+
style.top = 0;
|
|
135
|
+
} else if (bodyHeight - modalTop < modalHeight) {
|
|
136
|
+
style.top = bodyHeight - modalHeight;
|
|
137
|
+
} else {
|
|
138
|
+
style.top = modalTop;
|
|
139
|
+
}
|
|
140
|
+
if (left >= modalWidth + offsetX + offsetLeft) {
|
|
141
|
+
style.left = left - modalWidth - offsetX;
|
|
142
|
+
} else if (bodyWidth - width - left >= modalWidth + offsetX) {
|
|
143
|
+
style.left = width + left + offsetX;
|
|
144
|
+
} else {
|
|
145
|
+
style.top = modalLeft;
|
|
146
|
+
}
|
|
147
|
+
return style;
|
|
148
|
+
}
|
|
149
|
+
getDefaultId(info) {
|
|
150
|
+
var _info$children, _info$children2;
|
|
151
|
+
if (!(info !== null && info !== void 0 && (_info$children = info.children) !== null && _info$children !== void 0 && _info$children.length)) {
|
|
152
|
+
return info === null || info === void 0 ? void 0 : info.value;
|
|
153
|
+
}
|
|
154
|
+
return this.getDefaultId(info === null || info === void 0 ? void 0 : (_info$children2 = info.children) === null || _info$children2 === void 0 ? void 0 : _info$children2[0]);
|
|
155
|
+
}
|
|
156
|
+
getGroupTree() {
|
|
157
|
+
var _this = this;
|
|
158
|
+
return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
159
|
+
var selectedTab, nodeIdList, res, _res$info2;
|
|
160
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
161
|
+
while (1) switch (_context.prev = _context.next) {
|
|
162
|
+
case 0:
|
|
163
|
+
selectedTab = _this.state.selectedTab;
|
|
164
|
+
if (!(selectedTab !== _const.TABS[1].value)) {
|
|
165
|
+
_context.next = 3;
|
|
166
|
+
break;
|
|
167
|
+
}
|
|
168
|
+
return _context.abrupt("return");
|
|
169
|
+
case 3:
|
|
170
|
+
nodeIdList = _this.props.nodeIdList;
|
|
171
|
+
_context.next = 6;
|
|
172
|
+
return Server.getGroupTree({
|
|
173
|
+
configUserGroupIdList: nodeIdList
|
|
174
|
+
});
|
|
175
|
+
case 6:
|
|
176
|
+
res = _context.sent;
|
|
177
|
+
if (res) {
|
|
178
|
+
_this.setState({
|
|
179
|
+
groupTree: res.info ? [res.info] : [],
|
|
180
|
+
defaultSelectedGroupId: _this.getDefaultId(res === null || res === void 0 ? void 0 : res.info),
|
|
181
|
+
chatModalWidth: res !== null && res !== void 0 && res.info ? 690 : 440,
|
|
182
|
+
allConfigUserGroupIdList: (res === null || res === void 0 ? void 0 : (_res$info2 = res.info) === null || _res$info2 === void 0 ? void 0 : _res$info2.configUserGroupIdList) || []
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
case 8:
|
|
186
|
+
case "end":
|
|
187
|
+
return _context.stop();
|
|
188
|
+
}
|
|
189
|
+
}, _callee);
|
|
190
|
+
}))();
|
|
191
|
+
}
|
|
192
|
+
render() {
|
|
193
|
+
var _this$props2 = this.props,
|
|
194
|
+
onClose = _this$props2.onClose,
|
|
195
|
+
zIndex = _this$props2.zIndex,
|
|
196
|
+
checkBeforeCallWechat = _this$props2.checkBeforeCallWechat,
|
|
197
|
+
modalRef = _this$props2.modalRef,
|
|
198
|
+
chatgptUse = _this$props2.chatgptUse,
|
|
199
|
+
t = _this$props2.t;
|
|
200
|
+
var _this$state2 = this.state,
|
|
201
|
+
selectedTab = _this$state2.selectedTab,
|
|
202
|
+
isHasGuarantee = _this$state2.isHasGuarantee,
|
|
203
|
+
tabs = _this$state2.tabs,
|
|
204
|
+
groupTree = _this$state2.groupTree,
|
|
205
|
+
defaultSelectedGroupId = _this$state2.defaultSelectedGroupId,
|
|
206
|
+
chatModalWidth = _this$state2.chatModalWidth,
|
|
207
|
+
allConfigUserGroupIdList = _this$state2.allConfigUserGroupIdList;
|
|
208
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
209
|
+
ref: modalRef,
|
|
210
|
+
style: _objectSpread(_objectSpread({}, this.getStyle()), {}, {
|
|
211
|
+
zIndex,
|
|
212
|
+
width: chatModalWidth || 440
|
|
213
|
+
}),
|
|
214
|
+
className: styles.chatModalWrapper,
|
|
215
|
+
onClick: e => {
|
|
216
|
+
e.stopPropagation();
|
|
217
|
+
}
|
|
218
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
219
|
+
className: styles.header
|
|
220
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
221
|
+
className: styles.midlleWrapper
|
|
222
|
+
}, tabs.map((vo, idx) => /*#__PURE__*/_react.default.createElement(_tab.default, {
|
|
223
|
+
key: vo.label,
|
|
224
|
+
selected: vo.value === selectedTab,
|
|
225
|
+
className: styles.tabItem,
|
|
226
|
+
onChange: () => {
|
|
227
|
+
this.setState({
|
|
228
|
+
selectedTab: vo.value,
|
|
229
|
+
chatModalWidth: 440
|
|
230
|
+
}, () => {
|
|
231
|
+
this.getGroupTree();
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
}, /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
235
|
+
name: vo.icon,
|
|
236
|
+
fontSize: 14,
|
|
237
|
+
className: styles.tabIcon
|
|
238
|
+
}), vo.label, vo.popoverContent ? /*#__PURE__*/_react.default.createElement("div", {
|
|
239
|
+
style: {
|
|
240
|
+
marginLeft: 4
|
|
241
|
+
}
|
|
242
|
+
}, /*#__PURE__*/_react.default.createElement(_shineout.Popover, {
|
|
243
|
+
zIndex: zIndex,
|
|
244
|
+
trigger: "hover"
|
|
245
|
+
}, t(vo.popoverContent)), /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
246
|
+
name: "pc-help-circle",
|
|
247
|
+
fontSize: 14
|
|
248
|
+
})) : null))), /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
249
|
+
name: "odec-close",
|
|
250
|
+
className: styles.closedIcon,
|
|
251
|
+
onClick: onClose
|
|
252
|
+
})), selectedTab === _const.TABS[0].value ? /*#__PURE__*/_react.default.createElement(_questionLibrary.default, this.props) : null, selectedTab === _const.TABS[1].value ? /*#__PURE__*/_react.default.createElement(_mailListModal.default, {
|
|
253
|
+
defaultSelectedGroupId: defaultSelectedGroupId,
|
|
254
|
+
groupTree: groupTree,
|
|
255
|
+
isHasGuarantee: isHasGuarantee,
|
|
256
|
+
checkBeforeCallWechat: checkBeforeCallWechat,
|
|
257
|
+
chatgptUse: chatgptUse,
|
|
258
|
+
allConfigUserGroupIdList: allConfigUserGroupIdList,
|
|
259
|
+
t: t
|
|
260
|
+
}) : null, selectedTab === _const.TABS[3].value ? /*#__PURE__*/_react.default.createElement(_itNoticeTab.default, {
|
|
261
|
+
zIndex: zIndex,
|
|
262
|
+
t: t,
|
|
263
|
+
getBelongSystemList: list => {
|
|
264
|
+
this.setState({
|
|
265
|
+
itLen: list === null || list === void 0 ? void 0 : list.length
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
}) : null);
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
ChatModal.propTypes = {
|
|
272
|
+
onClose: _propTypes.default.func,
|
|
273
|
+
iconRef: _propTypes.default.shape({
|
|
274
|
+
getBoundingClientRect: _propTypes.default.func
|
|
275
|
+
})
|
|
276
|
+
};
|
|
277
|
+
var _default = ChatModal;
|
|
278
|
+
exports.default = _default;
|
package/lib/server.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export function queryProblem(argument: any): any;
|
|
2
|
+
export function queryHotProblem(argument: any): any;
|
|
3
|
+
export function statisticsMessageCount(): any;
|
|
4
|
+
export function seekHelp(argument: any): any;
|
|
5
|
+
export function functiomPermission(argument: any): any;
|
|
6
|
+
export function getGroupTree(argument: any): any;
|
|
7
|
+
export function isPopITInform(argument: any): any;
|
|
8
|
+
//# sourceMappingURL=server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.js"],"names":[],"mappings":"AAKA,iDAEC;AAID,oDAEC;AAID,8CAEC;AAID,6CAEC;AAKD,uDAEC;AAID,iDAEC;AAID,kDAEC"}
|
package/lib/server.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.functiomPermission = functiomPermission;
|
|
7
|
+
exports.getGroupTree = getGroupTree;
|
|
8
|
+
exports.isPopITInform = isPopITInform;
|
|
9
|
+
exports.queryHotProblem = queryHotProblem;
|
|
10
|
+
exports.queryProblem = queryProblem;
|
|
11
|
+
exports.seekHelp = seekHelp;
|
|
12
|
+
exports.statisticsMessageCount = statisticsMessageCount;
|
|
13
|
+
var _request = _interopRequireWildcard(require("./js/request/request"));
|
|
14
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
16
|
+
// eslint-disable-next-line no-unused-vars
|
|
17
|
+
|
|
18
|
+
// 查询问题
|
|
19
|
+
// https://soapi.sheincorp.cn/application/3768/routes/102710
|
|
20
|
+
function queryProblem(argument) {
|
|
21
|
+
return (0, _request.default)('/front/mesAssistant/queryProblem', argument);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// queryHotProblem
|
|
25
|
+
// https://soapi.sheincorp.cn/application/3768/routes/102709
|
|
26
|
+
function queryHotProblem(argument) {
|
|
27
|
+
return (0, _request.default)('/front/mesAssistant/queryHotProblem', argument);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// 统计消息数量
|
|
31
|
+
// https://soapi.sheincorp.cn/application/3876/routes/post_mesAssistant_statisticsMessageCount
|
|
32
|
+
function statisticsMessageCount() {
|
|
33
|
+
return (0, _request.default)('/front/mesAssistant/statisticsMessageCount');
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// 求助
|
|
37
|
+
// https://soapi.sheincorp.cn/application/3876/routes/post_mesAssistant_seekHelp
|
|
38
|
+
function seekHelp(argument) {
|
|
39
|
+
return (0, _request.default)('/front/mesAssistant/seekHelp', argument);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// 功能权限
|
|
43
|
+
// https://soapi.sheincorp.cn/application/3768/routes/124861
|
|
44
|
+
function functiomPermission(argument) {
|
|
45
|
+
return (0, _request.default)('/front/mesAssistant/functiomPermission', argument);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// 组别树
|
|
49
|
+
// https://soapi.sheincorp.cn/application/5161/routes/post_front_manual_getGroupTree/doc
|
|
50
|
+
function getGroupTree(argument) {
|
|
51
|
+
return (0, _request.default)('/front/manual/getGroupTree', argument);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// 用户登录时判断是否要弹窗
|
|
55
|
+
// https://soapi.sheincorp.cn/application/5161/routes/post_front_manual_isPopITInform/doc
|
|
56
|
+
function isPopITInform(argument) {
|
|
57
|
+
return (0, _request.default)('/front/manual/isPopITInform', argument);
|
|
58
|
+
}
|