@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
@@ -1,108 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getApprovalOpenItem = exports.getApprovalOkr = exports.getApprovalKr = exports.getApprovalIsShow = exports.getApproval = exports.EApproveStatus = exports.EApprovalTypes = exports.EApprovalKrTypes = void 0;
7
- var EApprovalTypes;
8
- exports.EApprovalTypes = EApprovalTypes;
9
-
10
- (function (EApprovalTypes) {
11
- EApprovalTypes[EApprovalTypes["CreateOkr"] = 53] = "CreateOkr";
12
- EApprovalTypes[EApprovalTypes["ChangeOkrName"] = 54] = "ChangeOkrName";
13
- EApprovalTypes[EApprovalTypes["ChangeOkrTime"] = 56] = "ChangeOkrTime";
14
- EApprovalTypes[EApprovalTypes["DeleteOkr"] = 55] = "DeleteOkr";
15
- })(EApprovalTypes || (exports.EApprovalTypes = EApprovalTypes = {}));
16
-
17
- var EApprovalKrTypes;
18
- exports.EApprovalKrTypes = EApprovalKrTypes;
19
-
20
- (function (EApprovalKrTypes) {
21
- EApprovalKrTypes[EApprovalKrTypes["Createkr"] = 57] = "Createkr";
22
- EApprovalKrTypes[EApprovalKrTypes["ChangekrName"] = 58] = "ChangekrName";
23
- EApprovalKrTypes[EApprovalKrTypes["ChangekrTime"] = 60] = "ChangekrTime";
24
- EApprovalKrTypes[EApprovalKrTypes["Deletekr"] = 59] = "Deletekr";
25
- })(EApprovalKrTypes || (exports.EApprovalKrTypes = EApprovalKrTypes = {}));
26
-
27
- var EApproveStatus;
28
- exports.EApproveStatus = EApproveStatus;
29
-
30
- (function (EApproveStatus) {
31
- EApproveStatus[EApproveStatus["None"] = 0] = "None";
32
- EApproveStatus[EApproveStatus["WaitCommit"] = 6] = "WaitCommit";
33
- EApproveStatus[EApproveStatus["Rejected"] = 3] = "Rejected";
34
- EApproveStatus[EApproveStatus["UnderApproval"] = 1] = "UnderApproval";
35
- EApproveStatus[EApproveStatus["ApproveAgree"] = 2] = "ApproveAgree";
36
- EApproveStatus[EApproveStatus["WithDraw"] = 4] = "WithDraw";
37
- EApproveStatus[EApproveStatus["Done"] = 5] = "Done";
38
- })(EApproveStatus || (exports.EApproveStatus = EApproveStatus = {}));
39
-
40
- var getApprovalOpenItem = function getApprovalOpenItem(setting) {
41
- var result = {
42
- isOpen: setting.isOpened === 1,
43
- changeOkrName: false,
44
- changeOkrTime: false,
45
- deleteOkr: false,
46
- createOkr: false
47
- };
48
-
49
- if (setting !== null && setting !== void 0 && setting.okrApprovalSettings) {
50
- setting.okrApprovalSettings.forEach(function (item) {
51
- if (item.approvalType === EApprovalTypes.ChangeOkrName) {
52
- result.changeOkrName = true;
53
- } else if (item.approvalType === EApprovalTypes.ChangeOkrTime) {
54
- result.changeOkrTime = true;
55
- } else if (item.approvalType === EApprovalTypes.CreateOkr) {
56
- result.createOkr = true;
57
- } else if (item.approvalType === EApprovalTypes.DeleteOkr) {
58
- result.deleteOkr = true;
59
- }
60
- });
61
- }
62
-
63
- return result;
64
- };
65
-
66
- exports.getApprovalOpenItem = getApprovalOpenItem;
67
-
68
- var getApprovalIsShow = function getApprovalIsShow(approvalSetting, type, applyState) {
69
- var okrType = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
70
- var krType = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];
71
- {
72
- /* 有编辑权限,
73
- 且审批开关没有开启
74
- 或者审批开关开启但是没开修改okr名字审批 且(状态不是审批中或者状态审批中且不为新建)
75
- 或者开启okr审批开关 且开启okr名字审批 且当前状态不是审批中的时候是可编辑的 */
76
- }
77
- var okrCreate = okrType === null || okrType === void 0 ? void 0 : okrType.includes(EApprovalTypes.CreateOkr);
78
- var krCreate = krType === null || krType === void 0 ? void 0 : krType.includes(EApprovalKrTypes.Createkr);
79
- var isCreate = okrCreate || krCreate;
80
- return !approvalSetting.isOpen || approvalSetting.isOpen && !(approvalSetting !== null && approvalSetting !== void 0 && approvalSetting[type]) && (applyState !== EApproveStatus.UnderApproval || applyState === EApproveStatus.UnderApproval && !isCreate) || approvalSetting.isOpen && (approvalSetting === null || approvalSetting === void 0 ? void 0 : approvalSetting[type]) && applyState !== EApproveStatus.UnderApproval;
81
- };
82
-
83
- exports.getApprovalIsShow = getApprovalIsShow;
84
-
85
- var getApproval = function getApproval(approvalSetting, type, applyState, isCreate) {
86
- return !(!(approvalSetting !== null && approvalSetting !== void 0 && approvalSetting[type]) && applyState === EApproveStatus.UnderApproval && isCreate || approvalSetting !== null && approvalSetting !== void 0 && approvalSetting[type] && applyState !== EApproveStatus.UnderApproval);
87
- };
88
-
89
- exports.getApproval = getApproval;
90
-
91
- var getApprovalOkr = function getApprovalOkr(approvalSetting, type, applyState) {
92
- var okrType = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
93
- var okrCreate = okrType === null || okrType === void 0 ? void 0 : okrType.includes(EApprovalTypes.CreateOkr);
94
- return getApproval(approvalSetting, type, applyState, okrCreate);
95
- };
96
-
97
- exports.getApprovalOkr = getApprovalOkr;
98
-
99
- var getApprovalKr = function getApprovalKr(approvalSetting, type, applyState) {
100
- var okrType = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
101
- var krType = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];
102
- var okrCreate = okrType === null || okrType === void 0 ? void 0 : okrType.includes(EApprovalTypes.CreateOkr);
103
- var krCreate = krType === null || krType === void 0 ? void 0 : krType.includes(EApprovalKrTypes.Createkr);
104
- var isCreate = okrCreate || krCreate;
105
- return getApproval(approvalSetting, type, applyState, isCreate);
106
- };
107
-
108
- exports.getApprovalKr = getApprovalKr;
@@ -1,142 +0,0 @@
1
- .titaui-textArea {
2
- box-sizing: border-box;
3
- position: relative;
4
- min-height: 36px;
5
- background: #ffffff;
6
- cursor: text;
7
- border-radius: 8px;
8
- display: flex;
9
- align-items: center;
10
- padding: 7px 0;
11
- transition: border 0.2s ease 0.2s, box-shadow 0.2s ease 0.2s;
12
- }
13
-
14
- .titaui-textArea.has-error {
15
- border: 1px solid #f05e5e !important;
16
- }
17
-
18
- .titaui-textArea:hover {
19
- border: 1px solid #2879ff;
20
- }
21
-
22
- .titaui-textArea > input {
23
- flex-grow: 1;
24
- border: none;
25
- padding: 0 12px;
26
- margin: 0;
27
- outline: none;
28
- width: 0;
29
- box-sizing: border-box;
30
- background-color: transparent;
31
- color: #3f4755;
32
- }
33
-
34
- .titaui-textArea > input ::-webkit-input-placeholder {
35
- color: #bfc7d5;
36
- }
37
-
38
- .titaui-textArea > input :-ms-input-placeholder {
39
- color: #bfc7d5;
40
- }
41
-
42
- .titaui-textArea > input :-moz-input-placeholder {
43
- color: #bfc7d5;
44
- }
45
-
46
- .titaui-textArea textarea {
47
- flex: 1;
48
- line-height: 20px;
49
- min-height: 20px;
50
- border: none;
51
- padding: 0;
52
- margin: 0;
53
- outline: none;
54
- resize: none;
55
- padding: 0 12px;
56
- width: 100%;
57
- box-sizing: border-box;
58
- background-color: transparent;
59
- color: #3f4755;
60
- word-break: break-all;
61
- }
62
-
63
- .titaui-textArea textarea ::-webkit-input-placeholder {
64
- color: #bfc7d5;
65
- }
66
-
67
- .titaui-textArea textarea :-ms-input-placeholder {
68
- color: #bfc7d5;
69
- }
70
-
71
- .titaui-textArea textarea :-moz-input-placeholder {
72
- color: #bfc7d5;
73
- }
74
-
75
- .titaui-textArea.disabled {
76
- background-color: rgba(240, 242, 245, 0.4);
77
- border-color: #f0f2f5;
78
- color: #bfc7d5;
79
- cursor: default;
80
- }
81
-
82
- .titaui-textArea.disabled > input,
83
- .titaui-textArea.disabled textarea,
84
- .titaui-textArea.disabled .tail-wrapper {
85
- color: #bfc7d5;
86
- }
87
-
88
- .titaui-textArea.disabled:hover {
89
- border-color: #f0f2f5;
90
- }
91
-
92
- .area-error {
93
- border: 1px solid #f05e5e !important;
94
- box-shadow: 0px 0px 6px 0px rgba(240, 94, 94, 0.3);
95
- }
96
-
97
- .area-focus {
98
- border: 1px solid #2879ff !important;
99
- box-shadow: 0px 0px 6px 0px rgba(40, 121, 255, 0.3);
100
- }
101
-
102
- .area-normal {
103
- border: 1px solid #e9ecf0 !important;
104
- box-shadow: none;
105
- }
106
-
107
- .inner {
108
- overflow: auto;
109
- display: flex;
110
- flex: 1;
111
- width: 0;
112
- }
113
-
114
- .err-color {
115
- font-size: 12px;
116
- font-weight: 400;
117
- color: #f05e5e;
118
- line-height: 18px;
119
- padding-left: 12px;
120
- }
121
-
122
- .commonTextAreaWrapperTopShadow::before {
123
- content: '';
124
- border-radius: 8px;
125
- height: 30px;
126
- background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0) 100%);
127
- position: absolute;
128
- top: 0;
129
- width: 100%;
130
- z-index: 2;
131
- }
132
-
133
- .commonTextAreaWrapperBottomShadow::after {
134
- content: '';
135
- border-radius: 8px;
136
- height: 30px;
137
- background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #ffffff 100%);
138
- position: absolute;
139
- bottom: 0;
140
- width: 100%;
141
- z-index: 2;
142
- }
@@ -1,259 +0,0 @@
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 _classnames = _interopRequireDefault(require("classnames"));
13
-
14
- require("./index.css");
15
-
16
- var _excluded = ["disabled", "onFocus", "onBlur", "inputRef", "onChange", "className", "value", "placeholder", "maxLine", "maxLength", "initValue", "onErrorChange", "validator", "onKeyDown"];
17
-
18
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
-
20
- 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); }
21
-
22
- 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; }
23
-
24
- 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); }
25
-
26
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
27
-
28
- 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."); }
29
-
30
- 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); }
31
-
32
- 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; }
33
-
34
- 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; }
35
-
36
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
37
-
38
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
39
-
40
- 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; }
41
-
42
- var Textarea = function Textarea(p) {
43
- var disabled = p.disabled,
44
- _onFocus = p.onFocus,
45
- _onBlur = p.onBlur,
46
- inputRef = p.inputRef,
47
- _onChange = p.onChange,
48
- className = p.className,
49
- value = p.value,
50
- placeholder = p.placeholder,
51
- _p$maxLine = p.maxLine,
52
- maxLine = _p$maxLine === void 0 ? 4 : _p$maxLine,
53
- maxLength = p.maxLength,
54
- initValue = p.initValue,
55
- onErrorChange = p.onErrorChange,
56
- validator = p.validator,
57
- _onKeyDown = p.onKeyDown,
58
- others = _objectWithoutProperties(p, _excluded);
59
-
60
- var prefixCls = "titaui-textArea";
61
-
62
- var _useState = (0, _react.useState)(false),
63
- _useState2 = _slicedToArray(_useState, 2),
64
- active = _useState2[0],
65
- setActive = _useState2[1];
66
-
67
- var _useState3 = (0, _react.useState)(initValue || ""),
68
- _useState4 = _slicedToArray(_useState3, 2),
69
- selfValue = _useState4[0],
70
- setSelfValue = _useState4[1];
71
-
72
- var selfInputRef = (0, _react.useRef)();
73
- var realInputRef = inputRef || selfInputRef;
74
- var isControlled = ("value" in p);
75
- var realValue = isControlled ? value : selfValue;
76
-
77
- var _useState5 = (0, _react.useState)(false),
78
- _useState6 = _slicedToArray(_useState5, 2),
79
- error = _useState6[0],
80
- setError = _useState6[1];
81
-
82
- var _useState7 = (0, _react.useState)(""),
83
- _useState8 = _slicedToArray(_useState7, 2),
84
- errorText = _useState8[0],
85
- setErrorText = _useState8[1];
86
-
87
- var wrapperRef = (0, _react.useRef)();
88
-
89
- var _useState9 = (0, _react.useState)(false),
90
- _useState10 = _slicedToArray(_useState9, 2),
91
- validateEnable = _useState10[0],
92
- setvalidateEnable = _useState10[1];
93
-
94
- var _useState11 = (0, _react.useState)(false),
95
- _useState12 = _slicedToArray(_useState11, 2),
96
- isTrue = _useState12[0],
97
- setIsTrue = _useState12[1];
98
-
99
- var _useState13 = (0, _react.useState)(1),
100
- _useState14 = _slicedToArray(_useState13, 2),
101
- textAreaRows = _useState14[0],
102
- setTextAreaRows = _useState14[1];
103
-
104
- var _useState15 = (0, _react.useState)(false),
105
- _useState16 = _slicedToArray(_useState15, 2),
106
- showTopShadow = _useState16[0],
107
- setShowTopShadow = _useState16[1];
108
-
109
- var _useState17 = (0, _react.useState)(false),
110
- _useState18 = _slicedToArray(_useState17, 2),
111
- showBottomShadow = _useState18[0],
112
- setShowBottomShadow = _useState18[1];
113
-
114
- (0, _react.useEffect)(function () {
115
- if (!validateEnable) return;
116
- var hasError = false;
117
- var eText = "";
118
-
119
- if (maxLength !== undefined) {
120
- if (realValue.length > maxLength) {
121
- hasError = true;
122
- eText = "\u5DF2\u8F93\u5165 ".concat(realValue.length, " \u4E2A\u5B57\uFF0C\u6700\u591A\u53EF\u8F93\u5165 ").concat(maxLength, " \u4E2A\u5B57");
123
- }
124
- }
125
-
126
- if (!hasError && validator) {
127
- var _validator = validator(realValue),
128
- isValid = _validator.isValid,
129
- _errorText = _validator.errorText;
130
-
131
- if (!isValid) {
132
- hasError = true;
133
- eText = _errorText || "";
134
- }
135
- }
136
-
137
- setErrorText(eText);
138
-
139
- if (hasError !== error) {
140
- if (onErrorChange) {
141
- onErrorChange(hasError);
142
- }
143
-
144
- setError(hasError);
145
- }
146
- }, [realValue]);
147
-
148
- var handleShadowVisible = function handleShadowVisible() {
149
- setTimeout(function () {
150
- if (realInputRef.current) {
151
- if (Math.abs(realInputRef.current.scrollHeight - realInputRef.current.offsetHeight) <= 3) {
152
- setShowTopShadow(false);
153
- setShowBottomShadow(false);
154
- } else if (realInputRef.current.scrollTop > 0 && Math.abs(realInputRef.current.scrollHeight - realInputRef.current.scrollTop - realInputRef.current.offsetHeight) > 3) {
155
- setShowTopShadow(true);
156
- setShowBottomShadow(true);
157
- } else if (realInputRef.current.scrollTop > 0) {
158
- setShowTopShadow(true);
159
- setShowBottomShadow(false);
160
- } else {
161
- setShowTopShadow(false);
162
- setShowBottomShadow(true);
163
- }
164
- }
165
- }, 0);
166
- };
167
-
168
- var resetTextareaHeight = function resetTextareaHeight() {
169
- setTimeout(function () {
170
- var rows = realInputRef.current && Math.ceil(realInputRef.current.scrollHeight / 22);
171
-
172
- if (rows && rows <= maxLine) {
173
- setTextAreaRows(rows);
174
- } else {
175
- setTextAreaRows(maxLine);
176
- }
177
- }, 0);
178
- }; // 鼠标移入
179
-
180
-
181
- var changeMoveOver = function changeMoveOver() {
182
- setIsTrue(true);
183
- }; // 鼠标移出
184
-
185
-
186
- var changeMoveOut = function changeMoveOut() {
187
- setIsTrue(false);
188
- };
189
-
190
- var areaNormal = isTrue ? "area-focus" : "area-normal";
191
- var areaFocus = active ? "area-focus" : areaNormal;
192
- var areaError = error ? "area-error" : areaFocus;
193
- return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
194
- className: "\n ".concat(prefixCls, "\n ").concat(areaError, "\n ").concat(disabled ? " disabled" : "", "\n "),
195
- onFocus: function onFocus() {},
196
- onBlur: function onBlur() {},
197
- onMouseOver: changeMoveOver,
198
- onMouseOut: changeMoveOut,
199
- ref: wrapperRef,
200
- onClick: function onClick() {
201
- var _realInputRef$current;
202
-
203
- (_realInputRef$current = realInputRef.current) === null || _realInputRef$current === void 0 ? void 0 : _realInputRef$current.focus();
204
- }
205
- }, /*#__PURE__*/_react["default"].createElement("div", {
206
- className: (0, _classnames["default"])("inner scrollbar-size-sm", {
207
- commonTextAreaWrapperTopShadow: showTopShadow,
208
- commonTextAreaWrapperBottomShadow: showBottomShadow
209
- })
210
- }, /*#__PURE__*/_react["default"].createElement("textarea", _extends({
211
- className: "".concat(className, " scrollbar-size-sm"),
212
- disabled: disabled,
213
- ref: realInputRef,
214
- value: realValue,
215
- rows: textAreaRows,
216
- placeholder: placeholder,
217
- onScroll: handleShadowVisible,
218
- onChange: function onChange(e) {
219
- if (!isControlled) {
220
- setSelfValue(e.target.value);
221
- }
222
-
223
- if (_onChange) {
224
- _onChange(e);
225
- }
226
-
227
- resetTextareaHeight();
228
- setvalidateEnable(true);
229
- },
230
- onFocus: function onFocus(e) {
231
- setActive(true);
232
-
233
- if (_onFocus) {
234
- _onFocus(e);
235
- }
236
- },
237
- onKeyDown: function onKeyDown(e) {
238
- if (_onKeyDown) {
239
- _onKeyDown(e);
240
- }
241
-
242
- if (e.keyCode === 13) {
243
- e.preventDefault();
244
- }
245
- },
246
- onBlur: function onBlur(e) {
247
- setActive(false);
248
-
249
- if (_onBlur) {
250
- _onBlur(e);
251
- }
252
- }
253
- }, others)))), error && /*#__PURE__*/_react["default"].createElement("div", {
254
- className: "err-color"
255
- }, errorText));
256
- };
257
-
258
- var _default = Textarea;
259
- exports["default"] = _default;
@@ -1,52 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.formatPeriod = void 0;
7
-
8
- var _getLocale = require("../../../utils/getLocale");
9
-
10
- var _constant = require("../../../utils/constant");
11
-
12
- var formatPeriod = function formatPeriod(selected) {
13
- if (!selected) return "";
14
- var quarter = ["", "".concat((0, _getLocale.getLocale)("OKR_MyO_Pop_1stQuarter")), "".concat((0, _getLocale.getLocale)("OKR_MyO_Pop_2ndQuarter")), "".concat((0, _getLocale.getLocale)("OKR_MyO_Pop_3rdQuarter")), "".concat((0, _getLocale.getLocale)("OKR_MyO_Pop_4thQuarter"))];
15
- var cycleDate = "";
16
- var annualNum = Number("".concat(selected.annualNum)) === -1 ? "".concat((0, _getLocale.getLocale)("OKR_MyO_Butt_Allyears")) : "".concat(selected.annualNum).concat(_getLocale.isEn ? "" : "年");
17
- var month = (0, _constant.getMonth)();
18
-
19
- switch ("".concat(selected.cycleType)) {
20
- case "-1":
21
- cycleDate = "".concat((0, _getLocale.getLocale)("OKR_MyO_Butt_AllStatee"));
22
- break;
23
-
24
- case "1":
25
- cycleDate = "".concat((0, _getLocale.getLocale)("OKR_MyO_Pop_Year"));
26
- break;
27
-
28
- case "2":
29
- // 季度
30
- cycleDate = quarter[Number(selected.yqmNum)];
31
- break;
32
-
33
- case "3":
34
- cycleDate = month[Number(selected.yqmNum) - 1];
35
- break;
36
-
37
- case "4":
38
- cycleDate = "".concat(month[Number(selected.yqmNum) - 1], " - ").concat(month[((Number(selected.yqmNum) + 1) % 12 || 12) - 1]);
39
- break;
40
-
41
- case "5":
42
- cycleDate = Number("".concat(selected.yqmNum)) === 1 ? "".concat((0, _getLocale.getLocale)("OKR_MyO_Pop_Firsthalf")) : "".concat((0, _getLocale.getLocale)("OKR_MyO_Pop_Secondhalf"));
43
- break;
44
-
45
- default:
46
- cycleDate = "".concat((0, _getLocale.getLocale)("Mod_Customization"));
47
- }
48
-
49
- return "".concat(annualNum, " ").concat(cycleDate);
50
- };
51
-
52
- exports.formatPeriod = formatPeriod;