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
package/es/style.css
ADDED
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
.shein-components_systemrobotassistant_renderIconWrapper {
|
|
2
|
+
display: inline-block;
|
|
3
|
+
}
|
|
4
|
+
.shein-components_systemrobotassistant_renderIconWrapper.shein-components_systemrobotassistant_draggableIcon {
|
|
5
|
+
position: fixed;
|
|
6
|
+
}
|
|
7
|
+
.shein-components_systemrobotassistant_iconWrapper {
|
|
8
|
+
position: fixed;
|
|
9
|
+
bottom: 32px;
|
|
10
|
+
right: 32px;
|
|
11
|
+
width: 56px;
|
|
12
|
+
border-radius: 2px;
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
}
|
|
15
|
+
.shein-components_systemrobotassistant_iconWrapper .shein-components_systemrobotassistant_avatarWrap {
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
align-items: center;
|
|
19
|
+
}
|
|
20
|
+
.shein-components_systemrobotassistant_iconWrapper .shein-components_systemrobotassistant_avatarWrap .shein-components_systemrobotassistant_avatarBorder > img {
|
|
21
|
+
width: 52px;
|
|
22
|
+
height: 52px;
|
|
23
|
+
border-radius: 2px;
|
|
24
|
+
-webkit-user-drag: none;
|
|
25
|
+
}
|
|
26
|
+
.shein-components_systemrobotassistant_iconWrapper .shein-components_systemrobotassistant_avatarWrap > span {
|
|
27
|
+
display: inline-block;
|
|
28
|
+
white-space: nowrap;
|
|
29
|
+
margin-top: 8px;
|
|
30
|
+
}
|
|
31
|
+
.shein-components_systemrobotassistant_collapseRobotBox {
|
|
32
|
+
width: 30px;
|
|
33
|
+
height: 30px;
|
|
34
|
+
}
|
|
35
|
+
.shein-components_systemrobotassistant_collapseRobotBox .shein-components_systemrobotassistant_collapseIcon {
|
|
36
|
+
font-size: 28px;
|
|
37
|
+
color: #1890FF;
|
|
38
|
+
}
|
|
39
|
+
.shein-components_systemrobotassistant_redDot {
|
|
40
|
+
position: absolute;
|
|
41
|
+
top: -12px;
|
|
42
|
+
right: -12px;
|
|
43
|
+
width: 24px;
|
|
44
|
+
height: 24px;
|
|
45
|
+
border-radius: 12px;
|
|
46
|
+
background: red;
|
|
47
|
+
color: #ffffff;
|
|
48
|
+
display: flex;
|
|
49
|
+
align-items: center;
|
|
50
|
+
justify-content: center;
|
|
51
|
+
}
|
|
52
|
+
.shein-components_systemrobotassistant_chatModalWrapper {
|
|
53
|
+
position: fixed;
|
|
54
|
+
display: flex;
|
|
55
|
+
flex-direction: column;
|
|
56
|
+
width: 440px;
|
|
57
|
+
height: 85vh;
|
|
58
|
+
max-height: 660px;
|
|
59
|
+
background: #ffffff;
|
|
60
|
+
box-shadow: 0px 8px 12px 0px rgba(25, 122, 250, 0.1);
|
|
61
|
+
border: 1px solid #D9D9D9;
|
|
62
|
+
border-radius: 8px;
|
|
63
|
+
word-break: break-all;
|
|
64
|
+
}
|
|
65
|
+
.shein-components_systemrobotassistant_chatModalWrapper .shein-components_systemrobotassistant_header {
|
|
66
|
+
position: relative;
|
|
67
|
+
display: flex;
|
|
68
|
+
justify-content: space-between;
|
|
69
|
+
flex-shrink: 0;
|
|
70
|
+
align-items: center;
|
|
71
|
+
padding: 0 50px 0 20px;
|
|
72
|
+
height: 48px;
|
|
73
|
+
box-shadow: 0px 1px 0px 0px rgba(230, 234, 240, 0.5);
|
|
74
|
+
border-radius: 4px 4px 0px 0px;
|
|
75
|
+
}
|
|
76
|
+
.shein-components_systemrobotassistant_chatModalWrapper .shein-components_systemrobotassistant_midlleWrapper {
|
|
77
|
+
height: 100%;
|
|
78
|
+
display: flex;
|
|
79
|
+
flex: 1;
|
|
80
|
+
justify-content: space-around;
|
|
81
|
+
flex-direction: row;
|
|
82
|
+
}
|
|
83
|
+
.shein-components_systemrobotassistant_chatModalWrapper .shein-components_systemrobotassistant_tabItem {
|
|
84
|
+
margin-right: 12px;
|
|
85
|
+
flex: 1;
|
|
86
|
+
justify-content: center;
|
|
87
|
+
}
|
|
88
|
+
.shein-components_systemrobotassistant_chatModalWrapper .shein-components_systemrobotassistant_tabItem:last-child {
|
|
89
|
+
margin: 0;
|
|
90
|
+
}
|
|
91
|
+
.shein-components_systemrobotassistant_chatModalWrapper .shein-components_systemrobotassistant_leftTitle {
|
|
92
|
+
display: flex;
|
|
93
|
+
align-items: center;
|
|
94
|
+
}
|
|
95
|
+
.shein-components_systemrobotassistant_chatModalWrapper .shein-components_systemrobotassistant_tabIcon {
|
|
96
|
+
margin-right: 4px;
|
|
97
|
+
}
|
|
98
|
+
.shein-components_systemrobotassistant_chatModalWrapper .shein-components_systemrobotassistant_title {
|
|
99
|
+
font-size: 16px;
|
|
100
|
+
font-weight: bold;
|
|
101
|
+
color: #35383d;
|
|
102
|
+
margin-left: 20px;
|
|
103
|
+
}
|
|
104
|
+
.shein-components_systemrobotassistant_chatModalWrapper .shein-components_systemrobotassistant_avatarClass {
|
|
105
|
+
width: 55px;
|
|
106
|
+
}
|
|
107
|
+
.shein-components_systemrobotassistant_chatModalWrapper .shein-components_systemrobotassistant_suggestion {
|
|
108
|
+
font-size: 12px;
|
|
109
|
+
font-weight: 400;
|
|
110
|
+
color: #FFFFFF;
|
|
111
|
+
}
|
|
112
|
+
.shein-components_systemrobotassistant_chatModalWrapper .shein-components_systemrobotassistant_link {
|
|
113
|
+
font-size: 14px;
|
|
114
|
+
font-weight: 400;
|
|
115
|
+
color: #1890FF;
|
|
116
|
+
color: var(--primary-color, #1890FF);
|
|
117
|
+
cursor: pointer;
|
|
118
|
+
}
|
|
119
|
+
.shein-components_systemrobotassistant_chatModalWrapper .shein-components_systemrobotassistant_link > span {
|
|
120
|
+
margin-right: 2px;
|
|
121
|
+
}
|
|
122
|
+
.shein-components_systemrobotassistant_chatModalWrapper .shein-components_systemrobotassistant_closedIcon {
|
|
123
|
+
position: absolute;
|
|
124
|
+
right: 20px;
|
|
125
|
+
color: #7E848F;
|
|
126
|
+
font-size: 20px;
|
|
127
|
+
cursor: pointer;
|
|
128
|
+
}
|
|
129
|
+
.shein-components_systemrobotassistant_chatContentWrapper {
|
|
130
|
+
flex: 1;
|
|
131
|
+
display: flex;
|
|
132
|
+
flex-direction: column;
|
|
133
|
+
}
|
|
134
|
+
.shein-components_systemrobotassistant_switch {
|
|
135
|
+
color: #666C7C;
|
|
136
|
+
}
|
|
137
|
+
.shein-components_systemrobotassistant_robotImg {
|
|
138
|
+
width: 64px;
|
|
139
|
+
height: 64px;
|
|
140
|
+
border-radius: 50%;
|
|
141
|
+
-webkit-user-drag: none;
|
|
142
|
+
box-shadow: 1px 1px 6px 6px rgba(30, 128, 255, 0.1);
|
|
143
|
+
background-image: url('https://assets.dotfashion.cn/unpkg/@shein/static-file@1.0.69/image/pims/help-center/close-eyes.png');
|
|
144
|
+
background-color: #1890FF;
|
|
145
|
+
background-position: center center;
|
|
146
|
+
background-size: cover;
|
|
147
|
+
animation-name: shein-components_systemrobotassistant_robotGif;
|
|
148
|
+
animation-duration: 1.5s;
|
|
149
|
+
animation-timing-function: step-end;
|
|
150
|
+
animation-iteration-count: infinite;
|
|
151
|
+
}
|
|
152
|
+
.shein-components_systemrobotassistant_robotImg.shein-components_systemrobotassistant_expireStatus {
|
|
153
|
+
animation-name: shein-components_systemrobotassistant_none;
|
|
154
|
+
background-image: url('https://assets.dotfashion.cn/unpkg/@shein/static-file@1.0.96/image/hfc/expire-robot.svg');
|
|
155
|
+
box-shadow: unset;
|
|
156
|
+
}
|
|
157
|
+
@keyframes shein-components_systemrobotassistant_robotGif {
|
|
158
|
+
0% {
|
|
159
|
+
background-image: url('https://assets.dotfashion.cn/unpkg/@shein/static-file@1.0.69/image/pims/help-center/open-eyes.png');
|
|
160
|
+
}
|
|
161
|
+
90% {
|
|
162
|
+
background-image: url('https://assets.dotfashion.cn/unpkg/@shein/static-file@1.0.69/image/pims/help-center/close-eyes.png');
|
|
163
|
+
}
|
|
164
|
+
100% {
|
|
165
|
+
background-image: url('https://assets.dotfashion.cn/unpkg/@shein/static-file@1.0.69/image/pims/help-center/open-eyes.png');
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
.shein-components_systemrobotassistant_modalMask {
|
|
169
|
+
left: 0;
|
|
170
|
+
top: 0;
|
|
171
|
+
height: 100%;
|
|
172
|
+
width: 100%;
|
|
173
|
+
position: fixed;
|
|
174
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
export interface AnswerItmeItem {
|
|
4
|
+
isHaveAnswer?: number;
|
|
5
|
+
problem?: string;
|
|
6
|
+
answer?: string;
|
|
7
|
+
answerList?: {
|
|
8
|
+
isHaveAnswer?: string;
|
|
9
|
+
problemTitle?: string;
|
|
10
|
+
}[];
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface AnswerItmeProps {
|
|
14
|
+
item?: AnswerItmeItem;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
declare const AnswerItme: React.FC<AnswerItmeProps>;
|
|
18
|
+
|
|
19
|
+
export default AnswerItme;
|
|
20
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/component/answer-itme/index.jsx"],"names":[],"mappings":";AAKA,6DA0CE"}
|
|
@@ -0,0 +1,51 @@
|
|
|
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 _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
var _toHfc = require("../../js/to-hfc");
|
|
10
|
+
require("./style.css");
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
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); }
|
|
13
|
+
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; }
|
|
14
|
+
var styles = {
|
|
15
|
+
"answerTitle": "shein-components_systemrobotassistant_answerTitle",
|
|
16
|
+
"answerContent": "shein-components_systemrobotassistant_answerContent",
|
|
17
|
+
"otherAnswer": "shein-components_systemrobotassistant_otherAnswer",
|
|
18
|
+
"toHfc": "shein-components_systemrobotassistant_toHfc",
|
|
19
|
+
"onSeekHlep": "shein-components_systemrobotassistant_onSeekHlep",
|
|
20
|
+
"onDisabled": "shein-components_systemrobotassistant_onDisabled"
|
|
21
|
+
};
|
|
22
|
+
var AnswerItme = /*#__PURE__*/(0, _react.memo)(props => {
|
|
23
|
+
var item = props.item,
|
|
24
|
+
t = props.t;
|
|
25
|
+
return /*#__PURE__*/_react.default.createElement("div", null, item.isHaveAnswer === 0 ? /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("span", {
|
|
26
|
+
className: styles.otherAnswer
|
|
27
|
+
}, item.answer), t('找对接人'), t('寻求帮助')) : /*#__PURE__*/_react.default.createElement("div", {
|
|
28
|
+
className: styles.answerTitle
|
|
29
|
+
}, t('你问的“{0}?”,找到以下问题:', item.problem)), item.isHaveAnswer !== 0 && item.answerList && item.answerList.map(vo => /*#__PURE__*/_react.default.createElement("div", {
|
|
30
|
+
key: vo.problemId,
|
|
31
|
+
className: styles.answerContent,
|
|
32
|
+
onClick: () => {
|
|
33
|
+
var url = '/question/answer/';
|
|
34
|
+
var problemId = vo.problemId;
|
|
35
|
+
(0, _toHfc.toHfc)(url + problemId);
|
|
36
|
+
}
|
|
37
|
+
}, vo.problemTitle)));
|
|
38
|
+
});
|
|
39
|
+
AnswerItme.propTypes = {
|
|
40
|
+
item: _propTypes.default.shape({
|
|
41
|
+
isHaveAnswer: _propTypes.default.number,
|
|
42
|
+
problem: _propTypes.default.string,
|
|
43
|
+
answer: _propTypes.default.string,
|
|
44
|
+
answerList: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
45
|
+
isHaveAnswer: _propTypes.default.string,
|
|
46
|
+
problemTitle: _propTypes.default.string
|
|
47
|
+
}))
|
|
48
|
+
})
|
|
49
|
+
};
|
|
50
|
+
var _default = AnswerItme;
|
|
51
|
+
exports.default = _default;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
.shein-components_systemrobotassistant_answerTitle {
|
|
2
|
+
font-size: 14px;
|
|
3
|
+
font-weight: 400;
|
|
4
|
+
}
|
|
5
|
+
.shein-components_systemrobotassistant_answerContent {
|
|
6
|
+
font-size: 14px;
|
|
7
|
+
font-weight: 400;
|
|
8
|
+
color: #1890FF;
|
|
9
|
+
color: var(--primary-color, #1890FF);
|
|
10
|
+
margin-top: 7px;
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
}
|
|
13
|
+
.shein-components_systemrobotassistant_answerContent:hover {
|
|
14
|
+
color: #005AAD;
|
|
15
|
+
color: var(--primary-color, #005AAD);
|
|
16
|
+
}
|
|
17
|
+
.shein-components_systemrobotassistant_otherAnswer {
|
|
18
|
+
font-size: 14px;
|
|
19
|
+
font-weight: 400;
|
|
20
|
+
color: #35383D;
|
|
21
|
+
}
|
|
22
|
+
.shein-components_systemrobotassistant_toHfc {
|
|
23
|
+
color: #1890FF;
|
|
24
|
+
color: var(--primary-color, #1890FF);
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
}
|
|
27
|
+
.shein-components_systemrobotassistant_onSeekHlep {
|
|
28
|
+
color: #1890FF;
|
|
29
|
+
color: var(--primary-color, #1890FF);
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
}
|
|
32
|
+
.shein-components_systemrobotassistant_onDisabled {
|
|
33
|
+
color: #A5ACB8;
|
|
34
|
+
cursor: not-allowed;
|
|
35
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
export type DataContainerEmptyText = React.ReactNode | string | React.ReactElement<any>;
|
|
4
|
+
|
|
5
|
+
export type DataContainerChildren = React.ReactNode | React.ReactElement<any>;
|
|
6
|
+
|
|
7
|
+
export type DataContainerClassName = string | any[];
|
|
8
|
+
|
|
9
|
+
export interface DataContainerProps {
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
emptyText?: DataContainerEmptyText;
|
|
12
|
+
children?: DataContainerChildren;
|
|
13
|
+
className?: DataContainerClassName;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
declare const DataContainer: React.FC<DataContainerProps>;
|
|
17
|
+
|
|
18
|
+
export default DataContainer;
|
|
19
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/component/data-container/index.jsx"],"names":[],"mappings":";AASA,oFA0BC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
|
+
var _shineout = require("shineout");
|
|
11
|
+
var _Icon = _interopRequireDefault(require("@shein-components/Icon"));
|
|
12
|
+
require("./style.css");
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
var styles = {
|
|
15
|
+
"dataContainer": "shein-components_systemrobotassistant_dataContainer",
|
|
16
|
+
"emptyCon": "shein-components_systemrobotassistant_emptyCon",
|
|
17
|
+
"loadingMask": "shein-components_systemrobotassistant_loadingMask"
|
|
18
|
+
};
|
|
19
|
+
var cs = _classnames.default.bind(styles);
|
|
20
|
+
var DataContainer = props => {
|
|
21
|
+
var loading = props.loading,
|
|
22
|
+
emptyText = props.emptyText,
|
|
23
|
+
className = props.className,
|
|
24
|
+
children = props.children;
|
|
25
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
26
|
+
className: cs(styles.dataContainer, className)
|
|
27
|
+
}, !children || Array.isArray(children) && !(children !== null && children !== void 0 && children.length) ? /*#__PURE__*/_react.default.createElement("div", {
|
|
28
|
+
className: styles.emptyCon
|
|
29
|
+
}, /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
30
|
+
name: "dataemptying_icon",
|
|
31
|
+
fontSize: 200
|
|
32
|
+
}), /*#__PURE__*/_react.default.createElement("div", null, emptyText)) : children, loading ? /*#__PURE__*/_react.default.createElement("div", {
|
|
33
|
+
className: cs(styles.loadingMask)
|
|
34
|
+
}, /*#__PURE__*/_react.default.createElement(_shineout.Spin, {
|
|
35
|
+
size: "48px"
|
|
36
|
+
})) : null);
|
|
37
|
+
};
|
|
38
|
+
DataContainer.propTypes = {
|
|
39
|
+
loading: _propTypes.default.bool,
|
|
40
|
+
emptyText: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.string, _propTypes.default.element]),
|
|
41
|
+
children: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.element]),
|
|
42
|
+
className: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.array])
|
|
43
|
+
};
|
|
44
|
+
var _default = DataContainer;
|
|
45
|
+
exports.default = _default;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
.shein-components_systemrobotassistant_dataContainer {
|
|
2
|
+
flex: 1;
|
|
3
|
+
}
|
|
4
|
+
.shein-components_systemrobotassistant_dataContainer .shein-components_systemrobotassistant_emptyCon {
|
|
5
|
+
height: 100%;
|
|
6
|
+
width: 100%;
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
flex: 1;
|
|
12
|
+
color: #1890ff;
|
|
13
|
+
color: var(--primary-color, #1890ff);
|
|
14
|
+
}
|
|
15
|
+
.shein-components_systemrobotassistant_loadingMask {
|
|
16
|
+
position: absolute;
|
|
17
|
+
top: 0;
|
|
18
|
+
left: 0;
|
|
19
|
+
width: 100%;
|
|
20
|
+
height: 100%;
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
justify-content: center;
|
|
24
|
+
background-color: rgba(0, 0, 0, 0.04);
|
|
25
|
+
z-index: 100;
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/component/days-tab/index.jsx"],"names":[],"mappings":";AA6CA,8EAkEC"}
|
|
@@ -0,0 +1,129 @@
|
|
|
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 _moment = _interopRequireDefault(require("moment"));
|
|
9
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
|
+
var _Icon = _interopRequireDefault(require("@shein-components/Icon"));
|
|
11
|
+
var _stateImmer = _interopRequireDefault(require("../../js/state-immer"));
|
|
12
|
+
require("./style.css");
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
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
|
+
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; }
|
|
17
|
+
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; }
|
|
18
|
+
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; }
|
|
19
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
20
|
+
function _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."); }
|
|
21
|
+
function _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); }
|
|
22
|
+
function _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; }
|
|
23
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
24
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
25
|
+
var styles = {
|
|
26
|
+
"daysTab": "shein-components_systemrobotassistant_daysTab",
|
|
27
|
+
"arrowIcon": "shein-components_systemrobotassistant_arrowIcon",
|
|
28
|
+
"disabledIcon": "shein-components_systemrobotassistant_disabledIcon",
|
|
29
|
+
"itemWrapper": "shein-components_systemrobotassistant_itemWrapper",
|
|
30
|
+
"dateItem": "shein-components_systemrobotassistant_dateItem",
|
|
31
|
+
"active": "shein-components_systemrobotassistant_active"
|
|
32
|
+
};
|
|
33
|
+
var cs = _classnames.default.bind(styles);
|
|
34
|
+
var defaultState = {
|
|
35
|
+
showData: [],
|
|
36
|
+
// activeDay: '',
|
|
37
|
+
curDate: (0, _moment.default)(),
|
|
38
|
+
splitIndex: 0
|
|
39
|
+
};
|
|
40
|
+
var getNextDays = (sourceData, splitIndex) => {
|
|
41
|
+
var _result;
|
|
42
|
+
var index = splitIndex + 3;
|
|
43
|
+
var result = sourceData === null || sourceData === void 0 ? void 0 : sourceData.slice(index, index + 3);
|
|
44
|
+
var len = sourceData === null || sourceData === void 0 ? void 0 : sourceData.length;
|
|
45
|
+
if (((_result = result) === null || _result === void 0 ? void 0 : _result.length) < 3 && len > 3) {
|
|
46
|
+
result = sourceData === null || sourceData === void 0 ? void 0 : sourceData.slice(len - 3, len);
|
|
47
|
+
index = len - 3;
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
data: result,
|
|
51
|
+
index
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
var getPrevDays = (sourceData, splitIndex) => {
|
|
55
|
+
var index = splitIndex - 3;
|
|
56
|
+
var result = [];
|
|
57
|
+
if (index <= 0) {
|
|
58
|
+
index = 0;
|
|
59
|
+
result = sourceData === null || sourceData === void 0 ? void 0 : sourceData.slice(0, 3);
|
|
60
|
+
} else {
|
|
61
|
+
result = sourceData === null || sourceData === void 0 ? void 0 : sourceData.slice(index, splitIndex);
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
data: result,
|
|
65
|
+
index
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
var DaysTab = props => {
|
|
69
|
+
var activeDay = props.activeDay,
|
|
70
|
+
data = props.data,
|
|
71
|
+
t = props.t,
|
|
72
|
+
onChange = props.onChange;
|
|
73
|
+
var _useImmer = (0, _stateImmer.default)(defaultState),
|
|
74
|
+
_useImmer2 = _slicedToArray(_useImmer, 2),
|
|
75
|
+
state = _useImmer2[0],
|
|
76
|
+
setState = _useImmer2[1];
|
|
77
|
+
var curDate = state.curDate,
|
|
78
|
+
showData = state.showData,
|
|
79
|
+
splitIndex = state.splitIndex;
|
|
80
|
+
(0, _react.useEffect)(() => {
|
|
81
|
+
var now = (0, _moment.default)();
|
|
82
|
+
setState({
|
|
83
|
+
// activeDay: now.format('YYYY-MM-DD'),
|
|
84
|
+
showData: data === null || data === void 0 ? void 0 : data.slice(0, 3),
|
|
85
|
+
curDate: now
|
|
86
|
+
});
|
|
87
|
+
}, [data]);
|
|
88
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
89
|
+
className: styles.daysTab
|
|
90
|
+
}, /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
91
|
+
name: "arrow-left",
|
|
92
|
+
className: cs(styles.arrowIcon, splitIndex <= 0 && styles.disabledIcon),
|
|
93
|
+
onClick: () => {
|
|
94
|
+
if (splitIndex <= 0) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
var obj = getPrevDays(data, splitIndex);
|
|
98
|
+
setState({
|
|
99
|
+
showData: obj.data,
|
|
100
|
+
splitIndex: obj.index
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
104
|
+
className: styles.itemWrapper
|
|
105
|
+
}, showData === null || showData === void 0 ? void 0 : showData.map(item => /*#__PURE__*/_react.default.createElement("div", {
|
|
106
|
+
className: [styles.dateItem, activeDay === item.date && styles.active].join(' '),
|
|
107
|
+
onClick: () => {
|
|
108
|
+
setState({
|
|
109
|
+
activeDay: item.date
|
|
110
|
+
});
|
|
111
|
+
onChange(_objectSpread({}, item));
|
|
112
|
+
}
|
|
113
|
+
}, item.dateStr, item.today ? t('(今天)') : null))), /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
114
|
+
name: "arrow-right",
|
|
115
|
+
className: cs(styles.arrowIcon, splitIndex + 3 >= (data === null || data === void 0 ? void 0 : data.length) && styles.disabledIcon),
|
|
116
|
+
onClick: () => {
|
|
117
|
+
if (splitIndex + 3 >= (data === null || data === void 0 ? void 0 : data.length)) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
var obj = getNextDays(data, splitIndex);
|
|
121
|
+
setState({
|
|
122
|
+
showData: obj.data,
|
|
123
|
+
splitIndex: obj.index
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
}));
|
|
127
|
+
};
|
|
128
|
+
var _default = DaysTab;
|
|
129
|
+
exports.default = _default;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
.shein-components_systemrobotassistant_daysTab {
|
|
2
|
+
padding: 12px;
|
|
3
|
+
display: flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
background-color: #FFFFFF;
|
|
6
|
+
}
|
|
7
|
+
.shein-components_systemrobotassistant_daysTab .shein-components_systemrobotassistant_arrowIcon {
|
|
8
|
+
color: #7E848F;
|
|
9
|
+
cursor: pointer;
|
|
10
|
+
}
|
|
11
|
+
.shein-components_systemrobotassistant_daysTab .shein-components_systemrobotassistant_disabledIcon {
|
|
12
|
+
cursor: not-allowed;
|
|
13
|
+
color: #cccfd6;
|
|
14
|
+
}
|
|
15
|
+
.shein-components_systemrobotassistant_daysTab .shein-components_systemrobotassistant_itemWrapper {
|
|
16
|
+
margin: 0 12px;
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
flex: 1;
|
|
21
|
+
}
|
|
22
|
+
.shein-components_systemrobotassistant_daysTab .shein-components_systemrobotassistant_dateItem {
|
|
23
|
+
margin-left: 8px;
|
|
24
|
+
width: calc((100% - 16px) / 3);
|
|
25
|
+
height: 32px;
|
|
26
|
+
display: flex;
|
|
27
|
+
justify-content: center;
|
|
28
|
+
align-items: center;
|
|
29
|
+
background: #FFFFFF;
|
|
30
|
+
border-radius: 4px;
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
}
|
|
33
|
+
.shein-components_systemrobotassistant_daysTab .shein-components_systemrobotassistant_dateItem:first-child {
|
|
34
|
+
margin-left: 0;
|
|
35
|
+
}
|
|
36
|
+
.shein-components_systemrobotassistant_daysTab .shein-components_systemrobotassistant_dateItem.shein-components_systemrobotassistant_active {
|
|
37
|
+
background: #E2F2FF;
|
|
38
|
+
color: #1890FF;
|
|
39
|
+
color: var(--primary-color, #1890FF);
|
|
40
|
+
}
|
|
41
|
+
.shein-components_systemrobotassistant_daysTab .shein-components_systemrobotassistant_dateItem:hover {
|
|
42
|
+
background: #F3F9FE;
|
|
43
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export function getPrevDays(date: any, num?: number): {
|
|
2
|
+
date: string;
|
|
3
|
+
year: number;
|
|
4
|
+
}[];
|
|
5
|
+
export function getNextDays(date: any, num?: number): {
|
|
6
|
+
date: string;
|
|
7
|
+
year: number;
|
|
8
|
+
}[];
|
|
9
|
+
export function getDayLabel({ date, year, curDate }: {
|
|
10
|
+
date: any;
|
|
11
|
+
year: any;
|
|
12
|
+
curDate: any;
|
|
13
|
+
}): string;
|
|
14
|
+
export function getPrevWeeks(date: any, num?: number): {
|
|
15
|
+
start: string;
|
|
16
|
+
end: string;
|
|
17
|
+
weekIndex: number;
|
|
18
|
+
year: number;
|
|
19
|
+
}[];
|
|
20
|
+
export function getNextWeeks(date: any, num?: number): {
|
|
21
|
+
start: string;
|
|
22
|
+
end: string;
|
|
23
|
+
weekIndex: number;
|
|
24
|
+
year: number;
|
|
25
|
+
}[];
|
|
26
|
+
export function getWeekLabel({ weekIndex, start, year, curDate }: {
|
|
27
|
+
weekIndex: any;
|
|
28
|
+
start: any;
|
|
29
|
+
year: any;
|
|
30
|
+
curDate: any;
|
|
31
|
+
}): string;
|
|
32
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/component/days-tab/utils.js"],"names":[],"mappings":"AAGO;;;IAWN;AAGM;;;IAWN;AAGM;;;;WAON;AAGM;;;;;IAgBN;AAGM;;;;;IAgBN;AAGM;;;;;WAON"}
|