@titaui/pc 1.6.11 → 1.6.15

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.
Files changed (188) hide show
  1. package/lib/components/button/icon-btn/index.css +2 -0
  2. package/lib/components/button/index.js +1 -9
  3. package/lib/components/button/rect-btn/index.css +41 -8
  4. package/lib/components/button/rect-btn/index.js +8 -8
  5. package/lib/components/button/text-btn/index.css +33 -0
  6. package/lib/components/button/text-btn/index.js +52 -2
  7. package/lib/components/dynamic/components/title/index.css +2 -2
  8. package/lib/components/dynamic/constant.js +2 -1
  9. package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +8 -0
  10. package/lib/components/dynamic/dynamic-item/dynamic-milestone/img/dynamic-milestone.png +0 -0
  11. package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.css +7 -1
  12. package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +4 -21
  13. package/lib/components/dynamic/dynamic-item/dynamic-progress/index.css +4 -0
  14. package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +4 -2
  15. package/lib/components/dynamic/dynamic-item/dynamic-project/img/dynamic-project.png +0 -0
  16. package/lib/components/dynamic/dynamic-item/dynamic-project/index.css +7 -1
  17. package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +4 -7
  18. package/lib/components/dynamic/dynamic-item/dynamic-task/constant.js +1 -35
  19. package/lib/components/dynamic/dynamic-item/dynamic-task/img/dynamic-task.png +0 -0
  20. package/lib/components/dynamic/dynamic-item/dynamic-task/index.css +7 -1
  21. package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +17 -7
  22. package/lib/components/dynamic/dynamic-like-ranking/index.css +1 -2
  23. package/lib/components/dynamic/dynamic-like-ranking/index.js +11 -6
  24. package/lib/components/dynamic/dynamic-liking/index.css +0 -1
  25. package/lib/components/dynamic/dynamic-liking/item.js +2 -20
  26. package/lib/components/dynamic/dynamic.js +4 -1
  27. package/lib/components/dynamic/new-ui.css +206 -0
  28. package/lib/components/dynamic/quick-operation/components/create-announcement/index.js +2 -2
  29. package/lib/components/dynamic/quick-operation/components/create-okr/index.js +2 -2
  30. package/lib/components/dynamic/quick-operation/components/create-share/index.js +2 -2
  31. package/lib/components/dynamic/quick-operation/components/create-task/index.js +2 -2
  32. package/lib/components/dynamic/quick-operation/img/okr.png +0 -0
  33. package/lib/components/dynamic/quick-operation/img/send-announcement.png +0 -0
  34. package/lib/components/dynamic/quick-operation/img/send-share.png +0 -0
  35. package/lib/components/dynamic/quick-operation/img/task.png +0 -0
  36. package/lib/components/dynamic/util.js +1 -1
  37. package/lib/components/file-list/components/single-file/index.css +2 -2
  38. package/lib/components/file-list/components/single-file/index.js +1 -1
  39. package/lib/components/form/form-fields/radios/index.css +5 -0
  40. package/lib/components/form/form-fields/radios/index.js +34 -5
  41. package/lib/components/help-card/image/canceled.svg +13 -0
  42. package/lib/components/help-card/image/helpzx.svg +8 -0
  43. package/lib/components/help-card/image/kefu.svg +18 -0
  44. package/lib/components/help-card/image/kefu1.svg +8 -0
  45. package/lib/components/help-card/image/okr-shequ.svg +14 -0
  46. package/lib/components/help-card/image/question.svg +20 -0
  47. package/lib/components/help-card/image/yuyueyanshi.svg +8 -0
  48. package/lib/components/help-card/index.css +219 -0
  49. package/lib/components/help-card/index.js +286 -0
  50. package/lib/components/help-card/request-api.js +34 -0
  51. package/lib/components/img-viewer/index.css +4 -0
  52. package/lib/components/img-viewer/index.js +2 -1
  53. package/lib/components/menus/components/drag-resize/index.css +4 -4
  54. package/lib/components/menus/components/drag-resize/index.js +35 -30
  55. package/lib/components/menus/components/flip-menu-card/index.css +7 -2
  56. package/lib/components/menus/components/flip-menu-card/index.js +17 -15
  57. package/lib/components/menus/components/menu-card/index.js +1 -6
  58. package/lib/components/menus/components/menu-close-btn/index.css +2 -1
  59. package/lib/components/menus/components/menu-tree/images/loading-node.gif +0 -0
  60. package/lib/components/menus/components/menu-tree/index.js +4 -3
  61. package/lib/components/menus/components/menu-tree/tree-node/avatar/index.css +50 -0
  62. package/lib/components/menus/components/menu-tree/tree-node/avatar/index.js +72 -0
  63. package/lib/components/menus/components/menu-tree/tree-node/compony-node/index.js +3 -1
  64. package/lib/components/menus/components/menu-tree/tree-node/depart-node/index.js +8 -4
  65. package/lib/components/menus/components/menu-tree/tree-node/follower-node/index.css +48 -0
  66. package/lib/components/menus/components/menu-tree/tree-node/follower-node/index.js +65 -0
  67. package/lib/components/menus/components/menu-tree/tree-node/index.css +72 -0
  68. package/lib/components/menus/components/menu-tree/tree-node/index.js +19 -0
  69. package/lib/components/{button/admin-button/primary.js → menus/components/menu-tree/tree-node/loading-node.js} +7 -14
  70. package/lib/components/menus/components/menu-tree/tree-node/no-follower-node.js +24 -0
  71. package/lib/components/menus/components/menu-tree/tree-node/user-concern-node.js +7 -3
  72. package/lib/components/menus/components/menu-tree/tree-node/user-node/index.css +3 -0
  73. package/lib/components/menus/components/menu-tree/tree-node/user-node/index.js +9 -42
  74. package/lib/components/menus/export-modules/appraisal-menus/datas.js +45 -18
  75. package/lib/components/menus/export-modules/depart-menus/index.js +34 -7
  76. package/lib/components/menus/export-modules/okr-menus/datas.js +102 -2
  77. package/lib/components/menus/export-modules/okr-menus/index.css +0 -3
  78. package/lib/components/menus/export-modules/okr-menus/index.js +73 -20
  79. package/lib/components/menus/export-modules/subordinate-menus/index.js +3 -2
  80. package/lib/components/menus/request-apis.js +22 -5
  81. package/lib/components/nav-top/components/menu/index.js +7 -5
  82. package/lib/components/nav-top/components/user-message/components/inform/index.css +28 -6
  83. package/lib/components/nav-top/components/user-message/components/inform/index.js +184 -22
  84. package/lib/components/nav-top/components/user-message/components/red-pack/index.css +40 -0
  85. package/lib/components/nav-top/components/user-message/components/red-pack/index.js +105 -0
  86. package/lib/components/nav-top/components/user-message/components/red-pack/request-api.js +14 -0
  87. package/lib/components/nav-top/components/user-message/components/remind/index.css +25 -8
  88. package/lib/components/nav-top/components/user-message/components/remind/index.js +74 -21
  89. package/lib/components/nav-top/components/user-message/components/reply/index.css +27 -6
  90. package/lib/components/nav-top/components/user-message/components/reply/index.js +129 -24
  91. package/lib/components/nav-top/components/user-message/components/tab-title/index.js +4 -8
  92. package/lib/components/nav-top/components/user-message/components/todos/index.css +25 -12
  93. package/lib/components/nav-top/components/user-message/components/todos/index.js +147 -23
  94. package/lib/components/nav-top/components/user-message/constant.js +11 -1
  95. package/lib/components/nav-top/components/user-message/images/loading.gif +0 -0
  96. package/lib/components/nav-top/components/user-message/images/msg-reward.png +0 -0
  97. package/lib/components/nav-top/components/user-message/index.css +37 -0
  98. package/lib/components/nav-top/components/user-message/index.js +86 -72
  99. package/lib/components/nav-top/components/user-message/msg/index.js +17 -24
  100. package/lib/components/nav-top/components/user-message/utils.js +14 -0
  101. package/lib/components/nav-top/components/user-own-menu/index.js +3 -4
  102. package/lib/components/nav-top/components/user-own-menu/utils.js +77 -0
  103. package/lib/components/nav-top/constant.js +1 -1
  104. package/lib/components/nav-top/index.js +12 -12
  105. package/lib/components/nav-top/request.apis.js +52 -0
  106. package/lib/components/nav-top/utils.js +10 -70
  107. package/lib/components/okr-filter-drawer/filter-button.js +1 -0
  108. package/lib/components/okr-filter-drawer/filter-form.js +163 -0
  109. package/lib/components/okr-filter-drawer/index.css +45 -0
  110. package/lib/components/okr-filter-drawer/index.js +42 -0
  111. package/lib/components/pagination/index.css +6 -12
  112. package/lib/components/photo-card/components/card/index.css +78 -105
  113. package/lib/components/photo-card/components/card/index.js +133 -40
  114. package/lib/components/photo-card/data.js +5 -5
  115. package/lib/components/photo-card/images/assistant.svg +40 -0
  116. package/lib/components/photo-card/images/back-manager.svg +40 -0
  117. package/lib/components/photo-card/images/boss.svg +38 -0
  118. package/lib/components/photo-card/images/depart-leader.svg +40 -0
  119. package/lib/components/photo-card/images/super-manager.svg +40 -0
  120. package/lib/components/photo-card/index.css +12 -12
  121. package/lib/components/photo-card/index.js +17 -13
  122. package/lib/components/point-demo/drop-down-box/index.css +98 -0
  123. package/lib/components/point-demo/drop-down-box/index.js +159 -0
  124. package/lib/components/point-demo/image/demo-bcg.png +0 -0
  125. package/lib/components/point-demo/image/down.svg +14 -0
  126. package/lib/components/point-demo/image/icon-canceled.svg +7 -0
  127. package/lib/components/point-demo/image/logo.svg +64 -0
  128. package/lib/components/point-demo/index.css +348 -0
  129. package/lib/components/point-demo/index.js +657 -0
  130. package/lib/components/point-demo/input/index.css +74 -0
  131. package/lib/components/point-demo/input/index.js +176 -0
  132. package/lib/components/point-demo/point-demo.js +93 -0
  133. package/lib/components/point-demo/popup/index.css +7 -0
  134. package/lib/components/point-demo/popup/index.js +113 -0
  135. package/lib/components/point-demo/popup/placement.js +44 -0
  136. package/lib/components/point-demo/popup/rc-trigger.css +127 -0
  137. package/lib/components/tree/index.js +0 -2
  138. package/lib/components/update-modal/img/background.png +0 -0
  139. package/lib/components/update-modal/img/rocket.png +0 -0
  140. package/lib/components/update-modal/index.css +80 -0
  141. package/lib/components/update-modal/index.js +83 -0
  142. package/lib/components/update-modal/request-api.js +17 -0
  143. package/lib/hooks/useLocalStorage.js +37 -0
  144. package/lib/index.js +22 -2
  145. package/lib/pages/aha2021/index.css +16 -1
  146. package/lib/pages/aha2021/index.js +15 -5
  147. package/lib/pages/new-okr-list/context.js +14 -0
  148. package/lib/{components/button/export-button/index.js → pages/new-okr-list/header/create-okr.js} +24 -44
  149. package/lib/pages/new-okr-list/header/depart-title.js +19 -0
  150. package/lib/pages/new-okr-list/header/filter.js +58 -0
  151. package/lib/pages/new-okr-list/header/index.css +31 -0
  152. package/lib/pages/new-okr-list/header/index.js +94 -0
  153. package/lib/pages/new-okr-list/header/user-title.js +19 -0
  154. package/lib/pages/new-okr-list/index.css +10 -0
  155. package/lib/pages/new-okr-list/index.js +127 -0
  156. package/lib/pages/new-okr-list/keyword-search/index.css +71 -0
  157. package/lib/{components/button/admin-button/drop-down-arrow.js → pages/new-okr-list/keyword-search/index.js} +54 -47
  158. package/lib/pages/new-okr-list/list/index.css +0 -0
  159. package/lib/pages/new-okr-list/list/index.js +48 -0
  160. package/lib/pages/new-okr-list/precls.js +8 -0
  161. package/lib/pages/new-okr-list/request-api.js +57 -0
  162. package/lib/pages/new-okr-list/theme.css +3 -0
  163. package/lib/pages/okr-map/hooks/useStorage.js +1 -1
  164. package/lib/pages/okr-map/utils.js +11 -7
  165. package/lib/pages/personal-info/index.js +5 -3
  166. package/lib/utils/bs-global.js +16 -1
  167. package/package.json +2 -1
  168. package/lib/components/button/admin-button/default.js +0 -35
  169. package/lib/components/button/admin-button/index.css +0 -86
  170. package/lib/components/button/admin-button/index.js +0 -40
  171. package/lib/components/button/admin-button/secondary.js +0 -35
  172. package/lib/components/button/export-button/index.css +0 -51
  173. package/lib/components/dynamic/dynamic-item/components/icon/index.css +0 -10
  174. package/lib/components/dynamic/dynamic-item/components/icon/index.js +0 -35
  175. package/lib/components/dynamic/dynamic-item/dynamic-milestone/img/milestone.png +0 -0
  176. package/lib/components/dynamic/dynamic-item/dynamic-project/img/project.png +0 -0
  177. package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-cancel.png +0 -0
  178. package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-delay.png +0 -0
  179. package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-done.png +0 -0
  180. package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-pause.png +0 -0
  181. package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-progress.png +0 -0
  182. package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-unaccept.png +0 -0
  183. package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-unstart.png +0 -0
  184. package/lib/components/dynamic/quick-operation/img/create-announcement.png +0 -0
  185. package/lib/components/dynamic/quick-operation/img/create-okr.png +0 -0
  186. package/lib/components/dynamic/quick-operation/img/create-share.png +0 -0
  187. package/lib/components/dynamic/quick-operation/img/create-task.png +0 -0
  188. package/lib/components/nav-top/mock.js +0 -36
@@ -0,0 +1,219 @@
1
+ .home-fixed-kefu {
2
+ cursor: pointer;
3
+ user-select: none;
4
+ z-index: 2;
5
+ width: 52px;
6
+ height: 52px;
7
+ background-color: #FFFFFF;
8
+ border-radius: 50%;
9
+ box-shadow: 0px 4px 12px 0px rgba(127, 145, 180, 0.2);
10
+ display: flex;
11
+ align-items: center;
12
+ justify-content: center;
13
+ }
14
+
15
+ .home-fixed-kefu-image {
16
+ width: 24px;
17
+ height: 24px;
18
+ background: url("./image/kefu.svg") 50% 50% no-repeat;
19
+ }
20
+
21
+ .home-fixed-kefu-canceled {
22
+ background: url("./image/canceled.svg") 50% 50% no-repeat;
23
+ animation-duration: 0.3s;
24
+ animation-name: kefuActive;
25
+ }
26
+
27
+ .home-fixed-kefu-canceled .home-fixed-kefu-image {
28
+ background: unset;
29
+ }
30
+
31
+ .help-card {
32
+ width: 332px;
33
+ height: 520px;
34
+ border-radius: 24px;
35
+ background: #FFFFFF;
36
+ box-shadow: 0px 0px 16px 0px rgba(127, 145, 180, 0.1);
37
+ }
38
+
39
+ .help-card__header {
40
+ width: 332px;
41
+ height: 72px;
42
+ background: #5C8EFF;
43
+ border-radius: 24px 24px 0px 0px;
44
+ box-sizing: border-box;
45
+ padding: 16px 20px;
46
+ display: flex;
47
+ align-items: center;
48
+ color: #FFFFFF;
49
+ }
50
+
51
+ .help-card__header-avatar {
52
+ width: 40px;
53
+ height: 40px;
54
+ background: #03C2FC;
55
+ border: 1px solid #FFFFFF;
56
+ margin-right: 12px;
57
+ border-radius: 50%;
58
+ }
59
+
60
+ .help-card__body {
61
+ box-sizing: border-box;
62
+ padding: 0 20px;
63
+ margin: 24px 0 30px;
64
+ }
65
+
66
+ .help-card__body-item {
67
+ box-sizing: border-box;
68
+ width: 292px;
69
+ height: 148px;
70
+ border-radius: 8px;
71
+ padding: 12px;
72
+ margin-top: 12px;
73
+ background: rgba(240, 244, 250, 0.6) url("./image/question.svg") 100% 100% no-repeat;
74
+ }
75
+
76
+ .help-card__body-item-title {
77
+ display: flex;
78
+ justify-content: space-between;
79
+ align-items: center;
80
+ }
81
+
82
+ .help-card__body-item-title-left {
83
+ width: 64px;
84
+ height: 24px;
85
+ font-size: 16px;
86
+ color: #2879FF;
87
+ line-height: 24px;
88
+ z-index: 2;
89
+ position: relative;
90
+ }
91
+
92
+ .help-card__body-item-title-left::before {
93
+ content: '';
94
+ width: 81px;
95
+ height: 7px;
96
+ background: linear-gradient(90deg, #2879FF 0%, #F6F8FC 100%);
97
+ z-index: -1;
98
+ position: absolute;
99
+ left: 0;
100
+ bottom: 0;
101
+ }
102
+
103
+ .help-card__body-item-title-right {
104
+ cursor: pointer;
105
+ font-size: 12px;
106
+ font-weight: 400;
107
+ color: #89919F;
108
+ line-height: 22px;
109
+ }
110
+
111
+ .help-card__body-item-title-right > .tu-icon-gengxin1 {
112
+ margin-right: 4px;
113
+ }
114
+
115
+ .help-card__body-item-content-item {
116
+ cursor: pointer;
117
+ margin-top: 12px;
118
+ font-weight: 400;
119
+ font-size: 14px;
120
+ color: #3F4755;
121
+ line-height: 22px;
122
+ }
123
+
124
+ .help-card__footer {
125
+ width: 332px;
126
+ height: 86px;
127
+ background: #FFFFFF;
128
+ box-shadow: 0px -4px 8px 0px rgba(127, 145, 180, 0.1);
129
+ padding: 12px;
130
+ border-radius: 24px;
131
+ box-sizing: border-box;
132
+ display: flex;
133
+ justify-content: space-between;
134
+ }
135
+
136
+ .help-card__footer-item {
137
+ width: 77px;
138
+ height: 62px;
139
+ display: flex;
140
+ flex-direction: column;
141
+ justify-content: center;
142
+ align-items: center;
143
+ font-size: 14px;
144
+ font-family: Resource-Han-Rounded-CN-Normal, Resource-Han-Rounded-CN;
145
+ font-weight: 400;
146
+ color: #141C28;
147
+ cursor: pointer;
148
+ }
149
+
150
+ .help-card__footer-item > img {
151
+ width: 20px;
152
+ height: 20px;
153
+ margin-bottom: 5px;
154
+ }
155
+
156
+ .tita-popup-zoom-left-bottom-enter,
157
+ .tita-popup-zoom-left-bottom-appear {
158
+ opacity: 0;
159
+ animation-duration: 0.3s;
160
+ animation-fill-mode: both;
161
+ animation-timing-function: cubic-bezier(0.18, 0.89, 0.32, 1.28);
162
+ animation-play-state: paused;
163
+ }
164
+
165
+ .tita-popup-zoom-left-bottom-leave {
166
+ animation-duration: 0.3s;
167
+ animation-fill-mode: both;
168
+ animation-timing-function: cubic-bezier(0.6, -0.3, 0.74, 0.05);
169
+ animation-play-state: paused;
170
+ }
171
+
172
+ .tita-popup-zoom-left-bottom-enter.tita-popup-zoom-left-bottom-enter-active,
173
+ .tita-popup-zoom-left-bottom-appear.tita-popup-zoom-left-bottom-appear-active {
174
+ animation-name: titaZoomInLB;
175
+ animation-play-state: running;
176
+ }
177
+
178
+ .tita-popup-zoom-left-bottom-leave.tita-popup-zoom-left-bottom-leave-active {
179
+ animation-name: titaZoomOutLB;
180
+ animation-play-state: running;
181
+ }
182
+
183
+ @keyframes kefuActive {
184
+ 0% {
185
+ transform: rotate(0deg);
186
+ }
187
+
188
+ 100% {
189
+ transform: rotate(90deg);
190
+ }
191
+ }
192
+
193
+ @keyframes titaZoomInLB {
194
+ 0% {
195
+ opacity: 0;
196
+ transform-origin: 0 100%;
197
+ transform: scale(0, 0);
198
+ }
199
+
200
+ 100% {
201
+ opacity: 1;
202
+ transform-origin: 0 100%;
203
+ transform: scale(1, 1);
204
+ }
205
+ }
206
+
207
+ @keyframes titaZoomOutLB {
208
+ 0% {
209
+ opacity: 1;
210
+ transform-origin: 0 100%;
211
+ transform: scale(1, 1);
212
+ }
213
+
214
+ 100% {
215
+ opacity: 0;
216
+ transform-origin: 0 100%;
217
+ transform: scale(0, 0);
218
+ }
219
+ }
@@ -0,0 +1,286 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = void 0;
9
+
10
+ var _react = _interopRequireWildcard(require("react"));
11
+
12
+ var _popup = _interopRequireDefault(require("../popup"));
13
+
14
+ var _pointDemo = _interopRequireDefault(require("../point-demo"));
15
+
16
+ var _classnames = _interopRequireDefault(require("classnames"));
17
+
18
+ var _openData = require("../../utils/open-data");
19
+
20
+ var _bsGlobal = require("../../utils/bs-global");
21
+
22
+ var _requestApi = require("./request-api");
23
+
24
+ require("./index.css");
25
+
26
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
27
+
28
+ 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); }
29
+
30
+ 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; }
31
+
32
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
33
+
34
+ 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."); }
35
+
36
+ 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); }
37
+
38
+ 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; }
39
+
40
+ 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; }
41
+
42
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
43
+
44
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
45
+
46
+ var preCls = "help-card";
47
+
48
+ var HelpCard = function HelpCard(_ref) {
49
+ var restProps = _extends({}, _ref);
50
+
51
+ var _useState = (0, _react.useState)(false),
52
+ _useState2 = _slicedToArray(_useState, 2),
53
+ visible = _useState2[0],
54
+ setVisible = _useState2[1];
55
+
56
+ var _useState3 = (0, _react.useState)(1),
57
+ _useState4 = _slicedToArray(_useState3, 2),
58
+ pageNum = _useState4[0],
59
+ setPageNum = _useState4[1];
60
+
61
+ var _useState5 = (0, _react.useState)(false),
62
+ _useState6 = _slicedToArray(_useState5, 2),
63
+ pointVisible = _useState6[0],
64
+ setPointVisible = _useState6[1];
65
+
66
+ var _useState7 = (0, _react.useState)([]),
67
+ _useState8 = _slicedToArray(_useState7, 2),
68
+ listType1 = _useState8[0],
69
+ setListType1 = _useState8[1];
70
+
71
+ var _useState9 = (0, _react.useState)([]),
72
+ _useState10 = _slicedToArray(_useState9, 2),
73
+ listType2 = _useState10[0],
74
+ setListType2 = _useState10[1];
75
+
76
+ var isTrial = (0, _bsGlobal.getVersion)() == 1;
77
+ var userId = window.BSGlobal && window.BSGlobal.loginUserInfo.Id || 0;
78
+ var kefuUrl = isTrial ? "https://wpa1.qq.com/vZYKN3kT?_type=wpa&qidian=true" : "https://wpa1.qq.com/o6X4XD1n?_type=wpa&qidian=true";
79
+
80
+ var handleSkip = function handleSkip(url) {
81
+ setVisible(false);
82
+ window.open(url);
83
+ };
84
+
85
+ var sliceArray = function sliceArray(data, pageNum) {
86
+ return data.slice((pageNum - 1) * 3, pageNum * 3);
87
+ };
88
+
89
+ var formatQuestionList = function formatQuestionList(data) {
90
+ var type1 = [];
91
+ var type2 = [];
92
+ var questionList = [];
93
+ data.forEach(function (item) {
94
+ if (item.questionType === 1) {
95
+ type1.push(item);
96
+ } else if (item.questionType === 2) {
97
+ type2.push(item);
98
+ }
99
+ });
100
+ questionList = [{
101
+ type: type1,
102
+ pageNum: 1
103
+ }, {
104
+ type: type2,
105
+ pageNum: 1
106
+ }];
107
+ setListType1(sliceArray(type1, 1));
108
+ setListType2(sliceArray(type2, 1));
109
+ window.sessionStorage.setItem("questionList_".concat(userId), JSON.stringify(questionList));
110
+ };
111
+
112
+ (0, _react.useEffect)(function () {
113
+ (0, _requestApi.getQuestionList)(pageNum).then(function (res) {
114
+ console.log(res); // formatQuestionList(res.Data);
115
+ });
116
+ }, []);
117
+
118
+ var handlePoint = function handlePoint() {
119
+ setVisible(false);
120
+ setPointVisible(true);
121
+ };
122
+
123
+ var handleHelpCenter = function handleHelpCenter() {
124
+ setVisible(false);
125
+
126
+ if ((0, _openData.isPlatform)("dd")) {
127
+ window.open("https://wiki.tita.com/pages/viewpage.action?pageId=4915206");
128
+ } else if ((0, _openData.isPlatform)("feishu")) {
129
+ window.open("https://wiki.tita.com/pages/viewpage.action?pageId=12026137");
130
+ } else {
131
+ window.open("https://wiki.tita.com/display/TITA1/Tita");
132
+ }
133
+ };
134
+
135
+ var handleKnowledgeCommunity = function handleKnowledgeCommunity() {
136
+ setVisible(false);
137
+ window.open("https://club.tita.com/");
138
+ };
139
+
140
+ var handleCustomerService = function handleCustomerService() {
141
+ setVisible(false);
142
+ window.open(kefuUrl);
143
+ };
144
+
145
+ var handleUpgrade = function handleUpgrade() {
146
+ setVisible(false);
147
+ window.open("https://wiki.tita.com/pages/viewpage.action?pageId=15696164");
148
+ };
149
+
150
+ var chageBatch = function chageBatch() {
151
+ var questionList = window.sessionStorage.getItem("questionList_".concat(userId)) || "[]";
152
+ var data = JSON.parse(questionList);
153
+ var type1 = data[0].type;
154
+ var type2 = data[1].type;
155
+ var pageNum1 = data[0].pageNum + 1;
156
+ var pageNum2 = data[1].pageNum + 1;
157
+
158
+ if ((pageNum1 - 1) * 3 >= type1.length) {
159
+ pageNum1 = 1;
160
+ }
161
+
162
+ if ((pageNum2 - 1) * 3 >= type2.length) {
163
+ pageNum2 = 1;
164
+ }
165
+
166
+ setListType1(sliceArray(type1, pageNum1));
167
+ setListType2(sliceArray(type2, pageNum2));
168
+ data = [{
169
+ type: type1,
170
+ pageNum: pageNum1
171
+ }, {
172
+ type: type2,
173
+ pageNum: pageNum2
174
+ }];
175
+ window.sessionStorage.setItem("questionList_".concat(userId), JSON.stringify(data));
176
+ };
177
+
178
+ var popupContent = function popupContent() {
179
+ return /*#__PURE__*/_react["default"].createElement("div", {
180
+ className: preCls
181
+ }, /*#__PURE__*/_react["default"].createElement("div", {
182
+ className: "".concat(preCls, "__header")
183
+ }, /*#__PURE__*/_react["default"].createElement("div", {
184
+ className: "".concat(preCls, "__header-avatar")
185
+ }), "Tita\u5C0F\u52A9\u624B"), /*#__PURE__*/_react["default"].createElement("div", {
186
+ className: "".concat(preCls, "__body")
187
+ }, /*#__PURE__*/_react["default"].createElement("div", {
188
+ className: "".concat(preCls, "__body-item")
189
+ }, /*#__PURE__*/_react["default"].createElement("div", {
190
+ className: "".concat(preCls, "__body-item-title")
191
+ }, /*#__PURE__*/_react["default"].createElement("div", {
192
+ className: "".concat(preCls, "__body-item-title-left")
193
+ }, "\u731C\u4F60\u60F3\u95EE"), /*#__PURE__*/_react["default"].createElement("div", {
194
+ className: "".concat(preCls, "__body-item-title-right")
195
+ }, /*#__PURE__*/_react["default"].createElement("span", {
196
+ className: "tu-icon-gengxin1",
197
+ onClick: chageBatch
198
+ }), "\u6362\u4E00\u6279")), /*#__PURE__*/_react["default"].createElement("div", {
199
+ className: "".concat(preCls, "__body-item-content")
200
+ }, listType1.map(function (item, key) {
201
+ return /*#__PURE__*/_react["default"].createElement("div", {
202
+ className: "".concat(preCls, "__body-item-content-item"),
203
+ onClick: function onClick() {
204
+ return handleSkip(item.questionUrl);
205
+ },
206
+ key: key
207
+ }, item.questionName);
208
+ }))), /*#__PURE__*/_react["default"].createElement("div", {
209
+ className: "".concat(preCls, "__body-item")
210
+ }, /*#__PURE__*/_react["default"].createElement("div", {
211
+ className: "".concat(preCls, "__body-item-title")
212
+ }, /*#__PURE__*/_react["default"].createElement("div", {
213
+ className: "".concat(preCls, "__body-item-title-left")
214
+ }, "\u5E38\u89C1\u95EE\u9898")), /*#__PURE__*/_react["default"].createElement("div", {
215
+ className: "".concat(preCls, "__body-item-content")
216
+ }, listType2.map(function (item, key) {
217
+ return /*#__PURE__*/_react["default"].createElement("div", {
218
+ className: "".concat(preCls, "__body-item-content-item"),
219
+ onClick: function onClick() {
220
+ return handleSkip(item.questionUrl);
221
+ },
222
+ key: key
223
+ }, item.questionName);
224
+ })))), /*#__PURE__*/_react["default"].createElement("div", {
225
+ className: "".concat(preCls, "__footer")
226
+ }, isTrial && /*#__PURE__*/_react["default"].createElement("div", {
227
+ className: "".concat(preCls, "__footer-item"),
228
+ onClick: handlePoint
229
+ }, /*#__PURE__*/_react["default"].createElement("img", {
230
+ src: require("./image/yuyueyanshi.svg"),
231
+ alt: "\u9884\u7EA6\u6F14\u793A"
232
+ }), "\u9884\u7EA6\u6F14\u793A"), /*#__PURE__*/_react["default"].createElement("div", {
233
+ className: "".concat(preCls, "__footer-item"),
234
+ onClick: handleHelpCenter
235
+ }, /*#__PURE__*/_react["default"].createElement("img", {
236
+ src: require("./image/helpzx.svg"),
237
+ alt: "\u5E2E\u52A9\u4E2D\u5FC3"
238
+ }), "\u5E2E\u52A9\u4E2D\u5FC3"), !isTrial && /*#__PURE__*/_react["default"].createElement("div", {
239
+ className: "".concat(preCls, "__footer-item"),
240
+ onClick: handleUpgrade
241
+ }, /*#__PURE__*/_react["default"].createElement("img", {
242
+ src: require("./image/yuyueyanshi.svg"),
243
+ alt: "\u5347\u7EA7\u901A\u77E5"
244
+ }), "\u5347\u7EA7\u901A\u77E5"), !(0, _openData.isPlatform)("feishu") && /*#__PURE__*/_react["default"].createElement("div", {
245
+ className: "".concat(preCls, "__footer-item"),
246
+ onClick: handleKnowledgeCommunity
247
+ }, /*#__PURE__*/_react["default"].createElement("img", {
248
+ src: require("./image/okr-shequ.svg"),
249
+ alt: "\u77E5\u8BC6\u793E\u533A"
250
+ }), "\u77E5\u8BC6\u793E\u533A"), !(0, _openData.isPlatform)("feishu") && !(0, _openData.isPlatform)("dd") && /*#__PURE__*/_react["default"].createElement("div", {
251
+ className: "".concat(preCls, "__footer-item"),
252
+ onClick: handleCustomerService
253
+ }, /*#__PURE__*/_react["default"].createElement("img", {
254
+ src: require("./image/kefu1.svg"),
255
+ alt: "\u8054\u7CFB\u5BA2\u670D"
256
+ }), "\u8054\u7CFB\u5BA2\u670D")));
257
+ };
258
+
259
+ return /*#__PURE__*/_react["default"].createElement("div", restProps, /*#__PURE__*/_react["default"].createElement(_popup["default"], {
260
+ popupTransitionName: "tita-popup-zoom-left-bottom",
261
+ placement: "topRight",
262
+ popupAlign: {
263
+ offset: [-32, -10],
264
+ overflow: {
265
+ adjustX: 1,
266
+ adjustY: 1
267
+ }
268
+ },
269
+ popup: popupContent(),
270
+ popupVisible: visible,
271
+ onPopupVisibleChange: function onPopupVisibleChange(bol) {
272
+ return setVisible(bol);
273
+ }
274
+ }, /*#__PURE__*/_react["default"].createElement("div", {
275
+ className: (0, _classnames["default"])("home-fixed-kefu")
276
+ }, /*#__PURE__*/_react["default"].createElement("div", {
277
+ className: (0, _classnames["default"])("home-fixed-kefu-image", {
278
+ "home-fixed-kefu-canceled": visible
279
+ })
280
+ }))), pointVisible && /*#__PURE__*/_react["default"].createElement(_pointDemo["default"], {
281
+ setVisible: setPointVisible
282
+ }));
283
+ };
284
+
285
+ var _default = HelpCard;
286
+ exports["default"] = _default;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getQuestionList = void 0;
7
+
8
+ var _axios = _interopRequireDefault(require("axios"));
9
+
10
+ var _bsGlobal = require("../../utils/bs-global");
11
+
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
+
14
+ var tenantId = BSGlobal && BSGlobal.tenantInfo.Id || 0;
15
+ var userId = BSGlobal && BSGlobal.loginUserInfo.Id || 0;
16
+
17
+ var requestDomain = function requestDomain() {
18
+ if (!window.location.hostname.match(/dev/)) return '';
19
+ return "".concat(location.protocol, "//www.tita.gift");
20
+ };
21
+
22
+ var getQuestionList = function getQuestionList(pageNum) {
23
+ var source = (0, _bsGlobal.getSource)();
24
+
25
+ if (source !== 860 || source !== 861 || source !== 862) {
26
+ source = 0;
27
+ }
28
+
29
+ return _axios["default"].get("".concat(requestDomain(), "/api/v1/").concat(tenantId, "/").concat(userId, "/const/question?source=").concat(source, "&pageSize=", 3, "&pageNum=").concat(pageNum)).then(function (res) {
30
+ return res.data;
31
+ });
32
+ };
33
+
34
+ exports.getQuestionList = getQuestionList;
@@ -78,6 +78,10 @@
78
78
  background: #f7f9fb;
79
79
  }
80
80
 
81
+ .titaui-img-viewer__body-img {
82
+ max-width: 800px;
83
+ }
84
+
81
85
  .titaui-img-viewer__body-operate-btn {
82
86
  position: absolute;
83
87
  width: 48px;
@@ -188,8 +188,9 @@ var ImgViewer = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
188
188
  transform: "rotate(".concat(currentRotateDeg, "deg)")
189
189
  }
190
190
  }, /*#__PURE__*/_react["default"].createElement("img", {
191
+ className: prefix + '__body-img',
191
192
  ref: imgRef,
192
- src: currentImgData.bigImageUrl,
193
+ src: currentImgData.previewUrl || currentImgData.bigImageUrl,
193
194
  style: {
194
195
  transform: "scale(".concat(currentScale, ")")
195
196
  }
@@ -1,13 +1,13 @@
1
- .titaui-drag-width {
1
+ .titaui-drag-resize__bar {
2
2
  display: inline-block;
3
3
  position: absolute;
4
4
  width: 10px;
5
- height: calc(100% - 12px);
6
- top: 8px;
5
+ height: calc(100% - 52px);
6
+ top: 40px;
7
7
  right: -5px;
8
8
  }
9
9
 
10
- .titaui-drag-width__darg {
10
+ .titaui-drag-resize__bar-darg {
11
11
  position: absolute;
12
12
  width: 3px;
13
13
  height: 100%;
@@ -19,32 +19,20 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
19
19
 
20
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
21
 
22
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
23
-
24
- 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."); }
25
-
26
- 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); }
27
-
28
- 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; }
29
-
30
- 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; }
31
-
32
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
33
-
34
- var preCls = 'titaui-drag-width';
22
+ var preCls = 'titaui-drag-resize';
35
23
 
36
24
  var _default = function _default(props) {
37
- var container = props.container;
25
+ var children = props.children,
26
+ _props$defaultWidth = props.defaultWidth,
27
+ defaultWidth = _props$defaultWidth === void 0 ? 180 : _props$defaultWidth,
28
+ _props$onResize = props.onResize,
29
+ onResize = _props$onResize === void 0 ? function () {} : _props$onResize,
30
+ _props$minWidth = props.minWidth,
31
+ minWidth = _props$minWidth === void 0 ? 180 : _props$minWidth,
32
+ _props$maxWidth = props.maxWidth,
33
+ maxWidth = _props$maxWidth === void 0 ? 600 : _props$maxWidth;
38
34
  var dragRef = (0, _react.useRef)();
39
-
40
- var _useState = (0, _react.useState)(180),
41
- _useState2 = _slicedToArray(_useState, 1),
42
- minWidth = _useState2[0];
43
-
44
- var _useState3 = (0, _react.useState)(600),
45
- _useState4 = _slicedToArray(_useState3, 1),
46
- maxWidth = _useState4[0]; // 拖拽
47
-
35
+ var container = (0, _react.useRef)(); // 拖拽
48
36
 
49
37
  (0, _react.useEffect)(function () {
50
38
  var m_pos;
@@ -55,23 +43,40 @@ var _default = function _default(props) {
55
43
  var width = parseInt(getComputedStyle(container.current, '').width) - dx;
56
44
  if (width < minWidth) return;
57
45
  if (width > maxWidth) return;
58
- container.current.style.width = parseInt(getComputedStyle(container.current, '').width) - dx + 'px';
46
+ container.current.style.width = "".concat(width, "px");
47
+ onResize({
48
+ width: width
49
+ });
59
50
  };
60
51
 
61
52
  dragRef.current.addEventListener('mousedown', function (e) {
62
53
  m_pos = e.x;
63
54
  document.addEventListener('mousemove', resize, false);
64
55
  }, false);
65
- document.addEventListener('mouseup', function () {
66
- document.removeEventListener('mousemove', resize, false);
67
- }, false);
56
+
57
+ var removeHandler = function removeHandler() {
58
+ return document.removeEventListener('mousemove', resize, false);
59
+ };
60
+
61
+ document.addEventListener('mouseup', removeHandler, false);
62
+ return function () {
63
+ document.removeEventListener('mouseup', removeHandler);
64
+ };
68
65
  }, []);
69
66
  return /*#__PURE__*/_react["default"].createElement("div", {
70
- className: (0, _classnames["default"])(preCls)
67
+ ref: container,
68
+ className: (0, _classnames["default"])(preCls),
69
+ style: {
70
+ 'width': defaultWidth
71
+ }
72
+ }, /*#__PURE__*/_react["default"].createElement("div", {
73
+ className: (0, _classnames["default"])("".concat(preCls, "__container"))
74
+ }, children), /*#__PURE__*/_react["default"].createElement("div", {
75
+ className: (0, _classnames["default"])("".concat(preCls, "__bar"))
71
76
  }, /*#__PURE__*/_react["default"].createElement("div", {
72
77
  ref: dragRef,
73
- className: (0, _classnames["default"])("".concat(preCls, "__darg"))
74
- }));
78
+ className: (0, _classnames["default"])("".concat(preCls, "__bar-darg"))
79
+ })));
75
80
  };
76
81
 
77
82
  exports["default"] = _default;