@titaui/pc 1.11.27-beta.8 → 1.11.29

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 (270) hide show
  1. package/lib/components/avatar/name-avatar/index.css +0 -1
  2. package/lib/components/avatar/name-avatar/index.js +13 -22
  3. package/lib/components/avatar/text-avatar/index.css +7 -0
  4. package/lib/components/avatar/text-avatar/index.js +32 -7
  5. package/lib/components/button/icon-btn/index.js +17 -8
  6. package/lib/components/button/rect-btn/index.css +11 -45
  7. package/lib/components/button/rect-btn/index.js +13 -19
  8. package/lib/components/change-okr-modal/Item.js +14 -14
  9. package/lib/components/change-okr-modal/index.js +1 -2
  10. package/lib/components/create-okr-modal/index.js +1 -3
  11. package/lib/components/create-okr-modal/request-api.js +1 -1
  12. package/lib/components/dialog-confirm/index.css +2 -2
  13. package/lib/components/drawer/headerAction.js +1 -5
  14. package/lib/components/drawer/headerDrop.js +4 -42
  15. package/lib/components/drawer/index.css +0 -33
  16. package/lib/components/drawer/index.js +3 -26
  17. package/lib/components/drop-selector/index.js +25 -10
  18. package/lib/components/dynamic/advertise/components/next-btn/index.css +27 -0
  19. package/lib/components/dynamic/advertise/components/next-btn/index.js +32 -0
  20. package/lib/components/dynamic/advertise/components/pre-btn/index.css +26 -0
  21. package/lib/components/dynamic/advertise/components/pre-btn/index.js +32 -0
  22. package/lib/components/dynamic/advertise/index.css +21 -0
  23. package/lib/components/dynamic/advertise/index.js +126 -0
  24. package/lib/components/dynamic/advertise/interface.js +5 -0
  25. package/lib/components/dynamic/advertise/util.js +28 -0
  26. package/lib/components/dynamic/components/dynamic-search-input/index.css +81 -0
  27. package/lib/components/dynamic/components/dynamic-search-input/index.js +203 -0
  28. package/lib/components/dynamic/components/first-level-tabs/index.css +101 -0
  29. package/lib/components/dynamic/components/first-level-tabs/index.js +131 -0
  30. package/lib/components/dynamic/constant.js +33 -32
  31. package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/dynamic-footer.js +9 -9
  32. package/lib/components/dynamic/dynamic-item/dynamic-ai-dialy/index.js +1 -1
  33. package/lib/components/dynamic/dynamic-item/dynamic-interview/img/wifi.svg +24 -0
  34. package/lib/components/dynamic/dynamic-item/dynamic-interview/index.css +51 -0
  35. package/lib/components/dynamic/dynamic-item/dynamic-interview/index.js +50 -0
  36. package/lib/components/dynamic/dynamic-item/dynamic-interview/interview-content.js +65 -0
  37. package/lib/components/dynamic/dynamic-item/dynamic-interview-share/img/wifi.svg +24 -0
  38. package/lib/components/dynamic/dynamic-item/dynamic-interview-share/index.css +61 -0
  39. package/lib/components/dynamic/dynamic-item/dynamic-interview-share/index.js +61 -0
  40. package/lib/components/dynamic/dynamic-item/dynamic-interview-share/interview-content.js +69 -0
  41. package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +5 -5
  42. package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +6 -6
  43. package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +10 -10
  44. package/lib/components/dynamic/dynamic-item/dynamic-reply/index.js +13 -13
  45. package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +9 -9
  46. package/lib/components/dynamic/dynamic-item/index.js +50 -32
  47. package/lib/components/dynamic/dynamic-like-ranking/image/like-ranking.svg +23 -0
  48. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-1.png +0 -0
  49. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-2.png +0 -0
  50. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-3.png +0 -0
  51. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-empty.png +0 -0
  52. package/lib/components/dynamic/dynamic-like-ranking/index.css +146 -0
  53. package/lib/components/dynamic/dynamic-like-ranking/index.js +180 -0
  54. package/lib/components/dynamic/dynamic-like-ranking/item.js +105 -0
  55. package/lib/components/dynamic/dynamic-like-ranking/mock.js +84 -0
  56. package/lib/components/dynamic/dynamic-liking/image/like-dynamic.svg +30 -0
  57. package/lib/components/dynamic/dynamic-liking/index.css +81 -0
  58. package/lib/{pages/new-okr-list/header/operate-record.js → components/dynamic/dynamic-liking/index.js} +39 -91
  59. package/lib/components/dynamic/dynamic-liking/item.js +75 -0
  60. package/lib/components/dynamic/dynamic-liking/mock.js +83 -0
  61. package/lib/components/dynamic/dynamic-list/index.js +7 -15
  62. package/lib/components/dynamic/dynamic-topping/image/quotation-mark.svg +16 -0
  63. package/lib/components/dynamic/dynamic-topping/image/top-icon.svg +30 -0
  64. package/lib/components/dynamic/dynamic-topping/index.css +141 -0
  65. package/lib/components/dynamic/dynamic-topping/index.js +82 -0
  66. package/lib/components/dynamic/dynamic-topping/interface.js +5 -0
  67. package/lib/components/dynamic/dynamic-topping/item.js +153 -0
  68. package/lib/components/dynamic/dynamic-topping/request-api.js +36 -0
  69. package/lib/components/dynamic/dynamic.css +173 -0
  70. package/lib/components/dynamic/dynamic.js +428 -0
  71. package/lib/components/dynamic/export-module/index.js +37 -0
  72. package/lib/components/dynamic/img/dynamic-top.svg +14 -0
  73. package/lib/components/dynamic/index.js +12 -9
  74. package/lib/components/dynamic/my-team/img/add-subordinate.png +0 -0
  75. package/lib/components/dynamic/my-team/img/line.png +0 -0
  76. package/lib/components/dynamic/my-team/img/team.png +0 -0
  77. package/lib/components/dynamic/my-team/index.css +184 -0
  78. package/lib/components/dynamic/my-team/index.js +263 -0
  79. package/lib/components/dynamic/my-team/request-api.js +52 -0
  80. package/lib/components/dynamic/my-team/util.js +20 -0
  81. package/lib/components/dynamic/new-ui.css +192 -0
  82. package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.css +58 -0
  83. package/lib/components/dynamic/online-broadcast/components/broadcast-item/index.js +68 -0
  84. package/lib/components/dynamic/online-broadcast/data.js +77 -0
  85. package/lib/components/dynamic/online-broadcast/img/broadcast.svg +14 -0
  86. package/lib/components/dynamic/online-broadcast/img/new.png +0 -0
  87. package/lib/components/dynamic/online-broadcast/img/preview.png +0 -0
  88. package/lib/components/dynamic/online-broadcast/index.css +46 -0
  89. package/lib/components/dynamic/online-broadcast/index.js +61 -0
  90. package/lib/components/dynamic/online-broadcast/interfact.js +5 -0
  91. package/lib/components/dynamic/quick-operation/components/create-announcement/index.css +25 -0
  92. package/lib/components/dynamic/quick-operation/components/create-announcement/index.js +39 -0
  93. package/lib/components/dynamic/quick-operation/components/create-okr/index.css +25 -0
  94. package/lib/components/dynamic/quick-operation/components/create-okr/index.js +39 -0
  95. package/lib/components/dynamic/quick-operation/components/create-share/index.css +25 -0
  96. package/lib/components/dynamic/quick-operation/components/create-share/index.js +39 -0
  97. package/lib/components/dynamic/quick-operation/components/create-task/index.css +25 -0
  98. package/lib/components/dynamic/quick-operation/components/create-task/index.js +44 -0
  99. package/lib/components/dynamic/quick-operation/img/new-announcement.png +0 -0
  100. package/lib/components/dynamic/quick-operation/img/new-okr.png +0 -0
  101. package/lib/components/dynamic/quick-operation/img/new-share.png +0 -0
  102. package/lib/components/dynamic/quick-operation/img/new-task.png +0 -0
  103. package/lib/components/dynamic/quick-operation/index.css +51 -0
  104. package/lib/components/dynamic/quick-operation/index.js +120 -0
  105. package/lib/components/dynamic/request-api.js +68 -7
  106. package/lib/components/e-priority/index.js +8 -8
  107. package/lib/components/eReport/eReportShare/index.js +11 -11
  108. package/lib/components/form/form-fields/date/index.css +24 -0
  109. package/lib/components/form/form-fields/date/index.js +102 -0
  110. package/lib/components/form/form-fields/input/index.js +10 -10
  111. package/lib/components/form/form-fields/user/index.css +23 -3
  112. package/lib/components/form/form-fields/user/index.js +18 -8
  113. package/lib/components/form/form-fields/user/user-input.js +15 -6
  114. package/lib/components/form/index.js +10 -3
  115. package/lib/components/grid-layout/sub-employee-okr/person-okr.js +5 -5
  116. package/lib/components/icon-button-list/index.js +3 -3
  117. package/lib/components/img-viewer/index.css +3 -3
  118. package/lib/components/img-viewer/index.js +11 -11
  119. package/lib/components/menus/components/menu-tree/images/interview-menu/my-interview.svg +16 -0
  120. package/lib/components/menus/components/menu-tree/images/interview-menu/template.svg +16 -0
  121. package/lib/components/menus/components/menu-tree/images/interview-menu/todo.svg +16 -0
  122. package/lib/components/menus/components/menu-tree/index.css +4 -2
  123. package/lib/components/menus/components/menu-tree/tree-node/index.css +85 -1
  124. package/lib/components/menus/export-modules/interview-menus/constant.js +30 -0
  125. package/lib/components/menus/export-modules/interview-menus/handle-highlight.js +63 -0
  126. package/lib/components/menus/export-modules/interview-menus/index.css +7 -0
  127. package/lib/components/menus/export-modules/interview-menus/index.js +128 -0
  128. package/lib/components/menus/index.js +11 -5
  129. package/lib/components/nav-top/components/menu/index.js +14 -14
  130. package/lib/components/nav-top/components/user-message/components/inform/inform-item.js +25 -19
  131. package/lib/components/nav-top/components/user-message/components/remind/remind-item.js +48 -10
  132. package/lib/components/nav-top/components/user-message/constant.js +1 -0
  133. package/lib/components/nav-top/components/user-message/hrMessage.js +22 -19
  134. package/lib/components/nav-top/components/user-message/index.js +23 -20
  135. package/lib/components/nav-top/index.js +4 -8
  136. package/lib/components/nav-top/request.apis.js +3 -1
  137. package/lib/components/okr-detail/base-info/other-infos/date-cycle/index.js +4 -20
  138. package/lib/components/okr-detail/base-info/other-infos/principal/index.js +1 -9
  139. package/lib/components/okr-detail/components/header/index.js +3 -10
  140. package/lib/components/okr-detail/components/header/o-name.js +3 -10
  141. package/lib/components/okr-detail/components/o-classify.js +1 -5
  142. package/lib/components/okr-detail/components/okr-tree/tree-node/e-node/e-priority-dropdown.js +7 -7
  143. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +10 -14
  144. package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/range-picker-pop.js +10 -0
  145. package/lib/components/okr-detail/detail-header/actions.js +23 -23
  146. package/lib/components/okr-detail/detail-header/delete-confirm/delete-confirm.js +43 -98
  147. package/lib/components/okr-detail/detail-header/delete-confirm/style.js +38 -0
  148. package/lib/components/okr-detail/detail-header/index.css +0 -11
  149. package/lib/components/okr-detail/detail-header/index.js +234 -228
  150. package/lib/components/okr-detail/index.js +21 -40
  151. package/lib/components/okr-detail/okr-list/index.js +8 -11
  152. package/lib/components/okr-detail/request-apis.js +4 -10
  153. package/lib/components/okr-flow/child-node/index.css +6 -6
  154. package/lib/components/okr-flow/child-node/work-node.js +21 -21
  155. package/lib/components/okr-flow/export-modal/index.js +33 -19
  156. package/lib/components/okr-flow/export-modules/okr-search-panel/index.js +14 -14
  157. package/lib/components/okr-flow/okr-map/index.js +5 -5
  158. package/lib/components/okr-flow/request-apis.js +4 -4
  159. package/lib/components/okr-flow/root-node/index.js +25 -24
  160. package/lib/components/okr-flow/utils/index.js +5 -5
  161. package/lib/components/okr-flow/utils/tree-handler.js +17 -17
  162. package/lib/components/okr-period-selector/index.js +5 -9
  163. package/lib/components/okr-period-selector/select-cycle.js +19 -23
  164. package/lib/components/okrcase-library/okrcases-components/submitOkr-dialog.js +30 -30
  165. package/lib/components/operation-records/index.js +1 -1
  166. package/lib/components/operation-records/style.js +1 -1
  167. package/lib/components/pagination/index.css +3 -3
  168. package/lib/components/pagination/select.css +58 -23
  169. package/lib/components/period-selector/index.css +3 -3
  170. package/lib/components/period-selector/index.js +11 -11
  171. package/lib/components/picker/components/panels/date-panel/date-body.js +118 -0
  172. package/lib/components/picker/components/panels/date-panel/date-head.js +87 -0
  173. package/lib/components/picker/components/panels/date-panel/index.css +14 -0
  174. package/lib/components/picker/components/panels/date-panel/index.js +49 -0
  175. package/lib/components/picker/components/panels/month-panel/index.css +27 -0
  176. package/lib/components/picker/components/panels/month-panel/index.js +63 -0
  177. package/lib/components/picker/components/panels/month-panel/month-body.js +89 -0
  178. package/lib/components/picker/components/panels/month-panel/month-head.js +47 -0
  179. package/lib/components/picker/components/panels/panel-body/index.js +53 -0
  180. package/lib/components/picker/components/panels/panel-head/index.js +48 -0
  181. package/lib/components/picker/components/panels/year-panel/index.css +23 -0
  182. package/lib/components/picker/components/panels/year-panel/index.js +65 -0
  183. package/lib/components/picker/components/panels/year-panel/year-body.js +92 -0
  184. package/lib/components/picker/components/panels/year-panel/year-head.js +35 -0
  185. package/lib/components/picker/components/picker-trigger/index.css +57 -0
  186. package/lib/components/picker/components/picker-trigger/index.js +94 -0
  187. package/lib/components/picker/context.js +15 -0
  188. package/lib/components/picker/index.css +121 -0
  189. package/lib/components/picker/index.js +13 -0
  190. package/lib/components/picker/picker-panels.js +182 -0
  191. package/lib/components/picker/picker.js +132 -0
  192. package/lib/components/picker/type.js +5 -0
  193. package/lib/components/picker/utils.js +28 -0
  194. package/lib/components/popup/index.js +4 -4
  195. package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +10 -16
  196. package/lib/components/radio/index.css +9 -9
  197. package/lib/components/scrollbar/scroll-mask/index.js +1 -1
  198. package/lib/components/superset-charts/utils/axios.js +5 -5
  199. package/lib/components/survey-model/index.css +18 -18
  200. package/lib/components/survey-model/instance.js +1 -1
  201. package/lib/components/task-relation-modal/request-api.js +1 -2
  202. package/lib/components/task-tree/helper.js +61 -0
  203. package/lib/components/task-tree/images/P1.svg +15 -0
  204. package/lib/components/task-tree/images/P2.svg +15 -0
  205. package/lib/components/task-tree/images/P3.svg +15 -0
  206. package/lib/components/task-tree/images/P4.svg +15 -0
  207. package/lib/components/task-tree/images/P5.svg +15 -0
  208. package/lib/components/task-tree/images/arrow.svg +9 -0
  209. package/lib/components/task-tree/images/empty-131.png +0 -0
  210. package/lib/components/task-tree/images/followed.svg +33 -0
  211. package/lib/components/task-tree/images/nice.svg +108 -0
  212. package/lib/components/task-tree/images/struc12.png +0 -0
  213. package/lib/components/task-tree/images/struc2.png +0 -0
  214. package/lib/components/task-tree/images/xialat-s.svg +13 -0
  215. package/lib/components/task-tree/index.js +22 -0
  216. package/lib/components/task-tree/mock.js +944 -0
  217. package/lib/components/task-tree/precls.js +8 -0
  218. package/lib/components/task-tree/request-apis.js +88 -0
  219. package/lib/components/task-tree/task-item-node/constant.js +45 -0
  220. package/lib/components/task-tree/task-item-node/e-empty.js +29 -0
  221. package/lib/components/task-tree/task-item-node/e-project.js +212 -0
  222. package/lib/components/task-tree/task-item-node/e-status-dropdown.js +94 -0
  223. package/lib/components/task-tree/task-item-node/e-task.js +426 -0
  224. package/lib/components/task-tree/task-item-node/get-process-color.js +62 -0
  225. package/lib/components/task-tree/task-item-node/index.css +289 -0
  226. package/lib/components/task-tree/task-item-node/task-node-render.js +43 -0
  227. package/lib/components/task-tree/task-tree.css +16 -0
  228. package/lib/components/task-tree/task-tree.js +49 -0
  229. package/lib/components/time-picker/index.css +123 -0
  230. package/lib/components/time-picker/index.js +13 -0
  231. package/lib/components/time-picker/time-picker-selector.js +138 -0
  232. package/lib/components/time-picker/time-picker.js +336 -0
  233. package/lib/components/time-picker/timer-picker-input.js +96 -0
  234. package/lib/components/time-picker/utils.js +52 -0
  235. package/lib/components/toast/index.js +3 -5
  236. package/lib/components/user-selector/select-tree/tree-nodes/tree-person-node/index.css +1 -0
  237. package/lib/components-v1/radio/radio.js +3 -3
  238. package/lib/components-v1/radio/style/index.css +8 -8
  239. package/lib/index.js +0 -40
  240. package/lib/pages/aha2021/index.js +5 -1
  241. package/lib/pages/new-okr-list/header/index.css +0 -45
  242. package/lib/pages/new-okr-list/header/index.js +16 -38
  243. package/lib/pages/new-okr-list/index.js +1 -3
  244. package/lib/pages/new-okr-list/list/index.js +2 -19
  245. package/lib/pages/new-okr-list/request-api.js +2 -8
  246. package/lib/pages/okr-map/export-modules/okr-map/header/index.js +24 -24
  247. package/lib/pages/okr-map/export-modules/okr-map/okr-map.js +31 -31
  248. package/lib/pages/okr-map/export-modules/share-okr-page/header/index.css +2 -2
  249. package/lib/pages/okr-map/export-modules/share-okr-page/header/index.js +11 -11
  250. package/lib/pages/okr-map/export-modules/share-okr-page/share-okr-map.js +8 -8
  251. package/lib/pages/okr-map/number-select/index.js +2 -2
  252. package/lib/pages/okr-map/unsupport-ie/index.js +5 -3
  253. package/lib/utils/auth.js +6 -6
  254. package/lib/utils/bs-global.js +12 -12
  255. package/lib/utils/format-time.js +1 -8
  256. package/lib/utils/hooks.js +72 -0
  257. package/lib/utils/open-data.js +27 -31
  258. package/package.json +6 -3
  259. package/.eslintignore +0 -3
  260. package/.eslintrc.js +0 -223
  261. package/.husky/pre-commit +0 -4
  262. package/.prettierignore +0 -31
  263. package/.prettierrc.js +0 -90
  264. package/.vscode/settings.json +0 -5
  265. package/lib/components/okr-detail/detail-header/constant.js +0 -53
  266. package/lib/components/okr-detail/detail-header/delete-confirm/index.css +0 -55
  267. package/lib/components/okr-detail/helper.js +0 -108
  268. package/lib/components/textarea/index.css +0 -142
  269. package/lib/components/textarea/index.js +0 -259
  270. package/lib/pages/new-okr-list/header/common.js +0 -52
@@ -164,39 +164,6 @@
164
164
  background-repeat: no-repeat;
165
165
  }
166
166
 
167
- .titaui-drawer-header-action-drop-wrapper .header-drop-item-approval {
168
- height: 32px;
169
- display: flex;
170
- align-items: center;
171
- padding: 0 23px;
172
- cursor: pointer;
173
- color: #BFC7D5;
174
- }
175
-
176
- .titaui-drawer-header-action-drop-wrapper .header-drop-item-approval-icon {
177
- font-size: 18px;
178
- color: inherit;
179
- width: 18px;
180
- height: 18px;
181
- cursor: pointer;
182
- margin-right: 10px;
183
- background-size: contain;
184
- background-position: center center;
185
- background-repeat: no-repeat;
186
- }
187
-
188
- .titaui-drawer-header-action-drop-wrapper .header-drop-item-approval-icon > span {
189
- display: flex;
190
- align-items: center;
191
- justify-content: center;
192
- color: inherit;
193
- width: 18px;
194
- height: 18px;
195
- background-size: contain;
196
- background-position: center center;
197
- background-repeat: no-repeat;
198
- }
199
-
200
167
  .drawer-left .drawer-content-wrapper,
201
168
  .drawer-right .drawer-content-wrapper,
202
169
  .drawer-left .drawer-content,
@@ -25,9 +25,7 @@ require("./index.css");
25
25
 
26
26
  var _context = _interopRequireDefault(require("../drawer-manager/context"));
27
27
 
28
- var _dom = require("./utils/dom");
29
-
30
- var _excluded = ["visible", "placement", "children", "mask", "width", "className", "contentWrapperStyle", "onClose", "style", "afterVisibleChange", "destroyOnClose", "bodyStyle", "zIndex", "autoClosable"];
28
+ var _excluded = ["visible", "placement", "children", "mask", "width", "className", "contentWrapperStyle", "onClose", "style", "afterVisibleChange", "destroyOnClose", "bodyStyle", "zIndex"];
31
29
 
32
30
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
33
31
 
@@ -72,8 +70,6 @@ var Drawer = function Drawer(props) {
72
70
  bodyStyle = props.bodyStyle,
73
71
  _props$zIndex = props.zIndex,
74
72
  zIndex = _props$zIndex === void 0 ? 1200 : _props$zIndex,
75
- _props$autoClosable = props.autoClosable,
76
- autoClosable = _props$autoClosable === void 0 ? false : _props$autoClosable,
77
73
  rest = _objectWithoutProperties(props, _excluded);
78
74
 
79
75
  var handleAfterVisibleChange = (0, _react.useCallback)(function (opened) {
@@ -93,20 +89,6 @@ var Drawer = function Drawer(props) {
93
89
  return children;
94
90
  }
95
91
 
96
- var autoClose = function autoClose(e) {
97
- if ((0, _dom.hasAncestorElement)(e.target, 'document-mouse-event-ignore,rc-tooltip,titaui-popup,rc-dialog-root,common-modal,in-modal,task-hot-add')) return;
98
- onClose();
99
- };
100
-
101
- (0, _react.useEffect)(function () {
102
- if (autoClosable) {
103
- document.addEventListener('mousedown', autoClose);
104
- }
105
-
106
- return function () {
107
- document.removeEventListener('mousedown', autoClose);
108
- };
109
- }, []);
110
92
  return /*#__PURE__*/_react["default"].createElement(DrawerContext.Provider, {
111
93
  value: {
112
94
  close: function close() {
@@ -141,10 +123,7 @@ function DrawerHeader(_ref) {
141
123
  content = _ref.content,
142
124
  style = _ref.style,
143
125
  onClose = _ref.onClose,
144
- actionComponent = _ref.actionComponent,
145
- onlyShowContent = _ref.onlyShowContent,
146
- approvalSetting = _ref.approvalSetting,
147
- detailInfo = _ref.detailInfo;
126
+ actionComponent = _ref.actionComponent;
148
127
  var drawer = (0, _react.useContext)(DrawerContext);
149
128
  var manager = (0, _react.useContext)(_context["default"]);
150
129
  var showClose = closable && (!!onClose || !!drawer);
@@ -173,11 +152,9 @@ function DrawerHeader(_ref) {
173
152
  style: {
174
153
  flex: 1
175
154
  }
176
- }), /*#__PURE__*/_react["default"].createElement("div", null, onlyShowContent), /*#__PURE__*/_react["default"].createElement("div", null, actionComponent), displayActions.map(function (action) {
155
+ }), /*#__PURE__*/_react["default"].createElement("div", null, actionComponent), displayActions.map(function (action) {
177
156
  return /*#__PURE__*/_react["default"].createElement(_headerAction["default"], action);
178
157
  }), !!collapsedActions.length && /*#__PURE__*/_react["default"].createElement(_headerAction["default"], {
179
- approvalSetting: approvalSetting,
180
- detailInfo: detailInfo,
181
158
  title: (0, _getLocale.getLocale)('Mod_MoreOperate'),
182
159
  icon: "tu-icon-10",
183
160
  children: collapsedActions
@@ -18,14 +18,12 @@ var _popup = _interopRequireDefault(require("../popup"));
18
18
 
19
19
  var _checkbox = _interopRequireDefault(require("../checkbox"));
20
20
 
21
- var _radio = _interopRequireDefault(require("../radio"));
22
-
23
21
  require("./index.css");
24
22
 
25
23
  var _iconItem = _interopRequireDefault(require("./icon-item"));
26
24
 
27
25
  var _excluded = ["name", "multi", "children", "onClick", "className"],
28
- _excluded2 = ["trigger", "triggerIcon", "destroyPopupOnHide", "popupPlacement", "hideOnChange", "onChange", "canEdit"];
26
+ _excluded2 = ["trigger", "triggerIcon", "destroyPopupOnHide", "popupPlacement", "hideOnChange", "onChange", "canEdit", "popAction", "onPopupVisibleChange"];
29
27
 
30
28
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
31
29
 
@@ -57,7 +55,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
57
55
 
58
56
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
59
57
 
60
- var preCls = "titaui-drop-selector";
58
+ var preCls = 'titaui-drop-selector';
61
59
  var IconItem = _iconItem["default"];
62
60
  exports.IconItem = IconItem;
63
61
 
@@ -98,7 +96,7 @@ function DropSelectorLayer(props) {
98
96
  var _classNames;
99
97
 
100
98
  var _props$className = props.className,
101
- className = _props$className === void 0 ? "" : _props$className,
99
+ className = _props$className === void 0 ? '' : _props$className,
102
100
  _props$multi = props.multi,
103
101
  multi = _props$multi === void 0 ? false : _props$multi,
104
102
  onItemClick = props.onItemClick,
@@ -135,12 +133,15 @@ function DropSelector(props) {
135
133
  _props$destroyPopupOn = props.destroyPopupOnHide,
136
134
  destroyPopupOnHide = _props$destroyPopupOn === void 0 ? true : _props$destroyPopupOn,
137
135
  _props$popupPlacement = props.popupPlacement,
138
- popupPlacement = _props$popupPlacement === void 0 ? "bottom" : _props$popupPlacement,
136
+ popupPlacement = _props$popupPlacement === void 0 ? 'bottom' : _props$popupPlacement,
139
137
  _props$hideOnChange = props.hideOnChange,
140
138
  hideOnChange = _props$hideOnChange === void 0 ? true : _props$hideOnChange,
141
139
  onChange = props.onChange,
142
140
  _props$canEdit = props.canEdit,
143
141
  canEdit = _props$canEdit === void 0 ? true : _props$canEdit,
142
+ _props$popAction = props.popAction,
143
+ popAction = _props$popAction === void 0 ? ['click'] : _props$popAction,
144
+ onPopupVisibleChange = props.onPopupVisibleChange,
144
145
  restProps = _objectWithoutProperties(props, _excluded2);
145
146
 
146
147
  var _useState3 = (0, _react.useState)(false),
@@ -148,6 +149,21 @@ function DropSelector(props) {
148
149
  visible = _useState4[0],
149
150
  setVisible = _useState4[1];
150
151
 
152
+ var realVisible = visible;
153
+
154
+ if ('visible' in props) {
155
+ realVisible = props.visible;
156
+ }
157
+
158
+ var handlePopVisibleChange = (0, _react.useCallback)(function (visible) {
159
+ console.log('visible' in props);
160
+
161
+ if (!('visible' in props)) {
162
+ setVisible(visible);
163
+ }
164
+
165
+ onPopupVisibleChange === null || onPopupVisibleChange === void 0 ? void 0 : onPopupVisibleChange(visible);
166
+ }, [props.visible === undefined]);
151
167
  (0, _react.useEffect)(function () {
152
168
  setVisible(props.visible);
153
169
  }, [props.visible]);
@@ -161,12 +177,11 @@ function DropSelector(props) {
161
177
  };
162
178
 
163
179
  return /*#__PURE__*/_react["default"].createElement(_popup["default"], {
164
- popupVisible: canEdit && visible,
180
+ popupVisible: canEdit && realVisible,
165
181
  popupPlacement: popupPlacement,
166
- onPopupVisibleChange: function onPopupVisibleChange(visible) {
167
- return setVisible(visible);
168
- },
182
+ onPopupVisibleChange: handlePopVisibleChange,
169
183
  destroyPopupOnHide: destroyPopupOnHide,
184
+ action: popAction,
170
185
  popup: /*#__PURE__*/_react["default"].createElement(DropSelectorLayer, _extends({}, restProps, {
171
186
  onItemClick: onMenuClickHandler
172
187
  }))
@@ -0,0 +1,27 @@
1
+ .titaui-dynamic-advertise-next-btn {
2
+ width: 24px;
3
+ height: 24px;
4
+ background: rgba(0, 0, 0, 0.4);
5
+ border-radius: 50%;
6
+ display: flex;
7
+ align-items: center;
8
+ justify-content: center;
9
+ cursor: pointer;
10
+ position: absolute;
11
+ top: 50%;
12
+ transform: translateY(-50%);
13
+ z-index: 1;
14
+ right: 16px;
15
+ opacity: 1;
16
+ transition: all 0.3s linear;
17
+ }
18
+
19
+ .titaui-dynamic-advertise-next-btn__icon {
20
+ font-size: 16px;
21
+ transform: rotate(180deg);
22
+ color: #ffffff;
23
+ }
24
+
25
+ .titaui-dynamic-advertise-next-btn--hidden {
26
+ opacity: 0;
27
+ }
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ var _classnames = _interopRequireDefault(require("classnames"));
11
+
12
+ require("./index.css");
13
+
14
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
+
16
+ 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; }
17
+
18
+ var prefix = "titaui-dynamic-advertise-next-btn";
19
+
20
+ var NextBtn = function NextBtn(_ref) {
21
+ var onClick = _ref.onClick,
22
+ isShow = _ref.isShow;
23
+ return /*#__PURE__*/_react["default"].createElement("div", {
24
+ className: (0, _classnames["default"])(prefix, _defineProperty({}, "".concat(prefix, "--hidden"), !isShow)),
25
+ onClick: onClick
26
+ }, /*#__PURE__*/_react["default"].createElement("i", {
27
+ className: (0, _classnames["default"])("tu-icon-left", "".concat(prefix, "__icon"))
28
+ }));
29
+ };
30
+
31
+ var _default = NextBtn;
32
+ exports["default"] = _default;
@@ -0,0 +1,26 @@
1
+ .titaui-dynamic-advertise-pre-btn {
2
+ width: 24px;
3
+ height: 24px;
4
+ background: rgba(0, 0, 0, 0.4);
5
+ border-radius: 50%;
6
+ display: flex;
7
+ align-items: center;
8
+ justify-content: center;
9
+ cursor: pointer;
10
+ position: absolute;
11
+ top: 50%;
12
+ left: 16px;
13
+ transform: translateY(-50%);
14
+ z-index: 1;
15
+ opacity: 1;
16
+ transition: all 0.3s linear;
17
+ }
18
+
19
+ .titaui-dynamic-advertise-pre-btn__icon {
20
+ font-size: 16px;
21
+ color: #ffffff;
22
+ }
23
+
24
+ .titaui-dynamic-advertise-pre-btn--hidden {
25
+ opacity: 0;
26
+ }
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ var _classnames = _interopRequireDefault(require("classnames"));
11
+
12
+ require("./index.css");
13
+
14
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
+
16
+ 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; }
17
+
18
+ var prefix = "titaui-dynamic-advertise-pre-btn";
19
+
20
+ var PreBtn = function PreBtn(_ref) {
21
+ var onClick = _ref.onClick,
22
+ isShow = _ref.isShow;
23
+ return /*#__PURE__*/_react["default"].createElement("div", {
24
+ className: (0, _classnames["default"])(prefix, _defineProperty({}, "".concat(prefix, "--hidden"), !isShow)),
25
+ onClick: onClick
26
+ }, /*#__PURE__*/_react["default"].createElement("i", {
27
+ className: (0, _classnames["default"])("tu-icon-left", "".concat(prefix, "__icon"))
28
+ }));
29
+ };
30
+
31
+ var _default = PreBtn;
32
+ exports["default"] = _default;
@@ -0,0 +1,21 @@
1
+ .tutaui-dynamic-advertise {
2
+ width: 278px;
3
+ border-radius: 12px;
4
+ position: relative;
5
+ }
6
+
7
+ .tutaui-dynamic-advertise--not-empty {
8
+ box-shadow: 0px 2px 12px 0px rgba(127, 145, 180, 0.2);
9
+ margin-top: 10px;
10
+ height: 136px;
11
+ }
12
+
13
+ .tutaui-dynamic-advertise *:focus {
14
+ outline: none !important;
15
+ }
16
+
17
+ .tutaui-dynamic-advertise__img {
18
+ border-radius: 12px;
19
+ width: 278px;
20
+ height: 136px;
21
+ }
@@ -0,0 +1,126 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _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 _reactSlick = _interopRequireDefault(require("react-slick"));
13
+
14
+ var _classnames = _interopRequireDefault(require("classnames"));
15
+
16
+ var _requestApi = require("../request-api");
17
+
18
+ var _toast = _interopRequireDefault(require("../../toast"));
19
+
20
+ var _util = require("./util");
21
+
22
+ var _nextBtn = _interopRequireDefault(require("./components/next-btn"));
23
+
24
+ var _preBtn = _interopRequireDefault(require("./components/pre-btn"));
25
+
26
+ require("slick-carousel/slick/slick.css");
27
+
28
+ require("slick-carousel/slick/slick-theme.css");
29
+
30
+ require("./index.css");
31
+
32
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
33
+
34
+ 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); }
35
+
36
+ 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; }
37
+
38
+ 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); }
39
+
40
+ 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; }
41
+
42
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
43
+
44
+ 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."); }
45
+
46
+ 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); }
47
+
48
+ 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; }
49
+
50
+ 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; }
51
+
52
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
53
+
54
+ var prefix = "tutaui-dynamic-advertise";
55
+ var settings = {
56
+ dots: false,
57
+ infinite: true,
58
+ speed: 1000,
59
+ slidesToShow: 1,
60
+ slidesToScroll: 1,
61
+ // arrows: false,
62
+ autoplay: true
63
+ };
64
+
65
+ var DynamicAdvertise = function DynamicAdvertise() {
66
+ var _useState = (0, _react.useState)([]),
67
+ _useState2 = _slicedToArray(_useState, 2),
68
+ sliderData = _useState2[0],
69
+ setSliderData = _useState2[1];
70
+
71
+ var _useState3 = (0, _react.useState)(false),
72
+ _useState4 = _slicedToArray(_useState3, 2),
73
+ isMouseEnter = _useState4[0],
74
+ setIsMouseEnter = _useState4[1];
75
+
76
+ var handleImgClick = function handleImgClick(link) {
77
+ window.open(link, "_blank");
78
+ };
79
+
80
+ var handleMouseEnter = function handleMouseEnter() {
81
+ setIsMouseEnter(true);
82
+ };
83
+
84
+ var handleMouseLeave = function handleMouseLeave() {
85
+ setIsMouseEnter(false);
86
+ };
87
+
88
+ (0, _react.useEffect)(function () {
89
+ (0, _requestApi.getAdvertise)().then(function (resp) {
90
+ if (resp.Code === 1 && resp.Data.length > 0) {
91
+ setSliderData((0, _util.formatResp)(resp.Data));
92
+ }
93
+
94
+ if (resp.Code !== 1) {
95
+ _toast["default"].Error(resp.Message, {
96
+ canClose: false
97
+ });
98
+ }
99
+ });
100
+ }, []);
101
+ return /*#__PURE__*/_react["default"].createElement("div", {
102
+ className: (0, _classnames["default"])(prefix, _defineProperty({}, "".concat(prefix, "--not-empty"), sliderData.length > 0)),
103
+ onMouseEnter: handleMouseEnter,
104
+ onMouseLeave: handleMouseLeave
105
+ }, sliderData.length > 0 && /*#__PURE__*/_react["default"].createElement(_reactSlick["default"], _extends({}, settings, {
106
+ nextArrow: /*#__PURE__*/_react["default"].createElement(_nextBtn["default"], {
107
+ isShow: isMouseEnter
108
+ }),
109
+ prevArrow: /*#__PURE__*/_react["default"].createElement(_preBtn["default"], {
110
+ isShow: isMouseEnter
111
+ })
112
+ }), sliderData.map(function (item) {
113
+ return /*#__PURE__*/_react["default"].createElement("div", {
114
+ onClick: function onClick() {
115
+ handleImgClick(item.link);
116
+ }
117
+ }, /*#__PURE__*/_react["default"].createElement("img", {
118
+ className: "".concat(prefix, "__img"),
119
+ src: item.img,
120
+ alt: item.name
121
+ }));
122
+ })));
123
+ };
124
+
125
+ var _default = DynamicAdvertise;
126
+ exports["default"] = _default;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.formatResp = void 0;
7
+
8
+ 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; }
9
+
10
+ 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; }
11
+
12
+ 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; }
13
+
14
+ var formatResp = function formatResp(data) {
15
+ if (!data || data.length === 0) {
16
+ return [];
17
+ }
18
+
19
+ return data.map(function (item) {
20
+ var content = JSON.parse(item.content);
21
+ return _objectSpread(_objectSpread({}, item), {}, {
22
+ img: content.picUrl,
23
+ link: content.link
24
+ });
25
+ });
26
+ };
27
+
28
+ exports.formatResp = formatResp;
@@ -0,0 +1,81 @@
1
+ .titaui-dynamic-search-input {
2
+ display: flex;
3
+ align-items: center;
4
+ width: 240px;
5
+ height: 32px;
6
+ background: #ffffff;
7
+ border-radius: 16px;
8
+ border: 1px solid #e9ecf0;
9
+ padding: 5px 12px 5px 14px;
10
+ box-sizing: border-box;
11
+ }
12
+
13
+ .titaui-dynamic-search-input__popup {
14
+ width: 96px;
15
+ height: 96px;
16
+ background: #ffffff;
17
+ box-shadow: 0px 4px 12px 0px rgba(127, 145, 180, 0.2);
18
+ border: 1px solid #f0f2f5;
19
+ padding: 16px 0px 16px 0px;
20
+ box-sizing: border-box;
21
+ border-radius: 6px;
22
+ user-select: none;
23
+ }
24
+
25
+ .titaui-dynamic-search-input__popup-item {
26
+ display: flex;
27
+ align-items: center;
28
+ justify-content: center;
29
+ height: 32px;
30
+ font-size: 14px;
31
+ color: #3f4755;
32
+ line-height: 22px;
33
+ cursor: pointer;
34
+ }
35
+
36
+ .titaui-dynamic-search-input__popup-item--active {
37
+ color: #2879ff;
38
+ }
39
+
40
+ .titaui-dynamic-search-input__popup-item:hover {
41
+ color: #2879ff;
42
+ background: #f7f8fa;
43
+ }
44
+
45
+ .titaui-dynamic-search-input__icon {
46
+ margin: 0 8px;
47
+ }
48
+
49
+ .titaui-dynamic-search-input__select-type {
50
+ display: flex;
51
+ align-items: center;
52
+ cursor: pointer;
53
+ word-break: keep-all;
54
+ white-space: nowrap;
55
+ }
56
+
57
+ .titaui-dynamic-search-input__input {
58
+ border: none;
59
+ outline: none;
60
+ width: 130px;
61
+ margin-right: 4px;
62
+ overflow: hidden;
63
+ text-overflow: ellipsis;
64
+ line-height: 22px;
65
+ }
66
+
67
+ .titaui-dynamic-search-input__input::placeholder {
68
+ font-size: 14px;
69
+ color: #bfc7d5;
70
+ line-height: 22px;
71
+ }
72
+
73
+ .titaui-dynamic-search-input__input-clear {
74
+ color: #bfc7d5;
75
+ font-size: 14px;
76
+ }
77
+
78
+ .titaui-dynamic-search-input__input-clear:hover {
79
+ cursor: pointer;
80
+ color: #f05e5e;
81
+ }