@titaui/pc 1.5.78 → 1.5.82

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 (316) hide show
  1. package/lib/components/avatar/index.js +1 -9
  2. package/lib/components/change-okr/Filter.js +65 -133
  3. package/lib/components/change-okr/Item.js +0 -6
  4. package/lib/components/change-okr/filterTab.js +0 -2
  5. package/lib/components/change-okr/index.js +2 -2
  6. package/lib/components/checkbox/index.js +3 -4
  7. package/lib/components/communication/CommunicationRecord.js +161 -116
  8. package/lib/components/communication/ConvertUserName.js +1 -1
  9. package/lib/components/communication/index.js +28 -53
  10. package/lib/components/communication/style.js +25 -21
  11. package/lib/components/dropdown-layer/icon-item.js +3 -5
  12. package/lib/components/dropdown-layer/index.css +0 -16
  13. package/lib/components/dropdown-layer/index.js +14 -21
  14. package/lib/components/emotionsSelector/style.js +1 -1
  15. package/lib/components/form/form-fields/input/index.css +0 -11
  16. package/lib/components/form/form-fields/input/index.js +1 -3
  17. package/lib/components/grid-page/personal-info/index.js +4 -4
  18. package/lib/components/mblog/components/MblogAction.js +6 -10
  19. package/lib/components/mblog/index.js +11 -24
  20. package/lib/components/mblog/style.js +8 -8
  21. package/lib/components/okr-detail/components/header/index.css +0 -4
  22. package/lib/components/okr-detail/components/header/o-cycle.js +2 -2
  23. package/lib/components/okr-detail/components/okr-tree/tree-node/e-kr-node/index.js +8 -15
  24. package/lib/components/okr-flow/child-node/work-node.js +1 -7
  25. package/lib/components/okr-period-selector/select-cycle.js +151 -139
  26. package/lib/components/okr-progress-detail/index.css +0 -1
  27. package/lib/components/okr-review/ReviewPop/components/ReviewBody/index.js +5 -5
  28. package/lib/components/okr-review/ReviewPop/index.js +4 -4
  29. package/lib/components/period-selector/common.js +4 -149
  30. package/lib/components/period-selector/components/selector/index.js +38 -103
  31. package/lib/components/period-selector/components/selector/style.js +9 -23
  32. package/lib/components/period-selector/index.js +28 -29
  33. package/lib/components/popup/index.js +1 -3
  34. package/lib/components/radio/index.css +0 -5
  35. package/lib/components/radio/radio.js +4 -12
  36. package/lib/components/table/index.css +1 -0
  37. package/lib/components/upload/components/uploadedPreview.js +54 -62
  38. package/lib/components/upload/index.js +57 -89
  39. package/lib/components/upload/style.js +7 -7
  40. package/lib/components/upload/type.js +15 -15
  41. package/lib/components/upvote/index.js +14 -37
  42. package/lib/components/user-selector/export-modules/field-tree-selector/index.css +0 -4
  43. package/lib/components/user-selector/export-modules/field-tree-selector/index.js +24 -50
  44. package/lib/components/user-selector/export-modules/field-tree-selector/single-selector/index.js +2 -11
  45. package/lib/components/user-selector/layout/index.css +1 -1
  46. package/lib/index.js +5 -49
  47. package/lib/pages/home-page/components/data-list/nav-selector/index.js +0 -18
  48. package/lib/pages/home-page/components/data-list/table/utils-function.js +3 -6
  49. package/lib/utils/auth.js +5 -46
  50. package/lib/utils/bs-global.js +2 -26
  51. package/lib/utils/tools.js +20 -140
  52. package/package.json +2 -2
  53. package/lib/components/avatar/icon-avatar/index.css +0 -15
  54. package/lib/components/avatar/icon-avatar/index.js +0 -50
  55. package/lib/components/avatar/num-avatar/index.css +0 -12
  56. package/lib/components/avatar/num-avatar/index.js +0 -34
  57. package/lib/components/button/admin-button/default.js +0 -35
  58. package/lib/components/button/admin-button/drop-down-arrow.js +0 -93
  59. package/lib/components/button/admin-button/index.css +0 -86
  60. package/lib/components/button/admin-button/index.js +0 -40
  61. package/lib/components/button/admin-button/primary.js +0 -33
  62. package/lib/components/button/admin-button/secondary.js +0 -35
  63. package/lib/components/button/default-button/index.css +0 -49
  64. package/lib/components/button/default-button/index.js +0 -51
  65. package/lib/components/button/export-button/index.css +0 -51
  66. package/lib/components/button/export-button/index.js +0 -81
  67. package/lib/components/button/images/daoru.svg +0 -18
  68. package/lib/components/button/index.js +0 -23
  69. package/lib/components/button/interface.js +0 -5
  70. package/lib/components/communication/index.css +0 -63
  71. package/lib/components/create-okr/animation/check-animation.js +0 -2746
  72. package/lib/components/create-okr/constant.js +0 -27
  73. package/lib/components/create-okr/createCycle.js +0 -171
  74. package/lib/components/create-okr/createSuccessCmp.js +0 -233
  75. package/lib/components/create-okr/createSuccessCmpWrapper.js +0 -20
  76. package/lib/components/create-okr/fields/date-cycle.js +0 -98
  77. package/lib/components/create-okr/fields/index.css +0 -346
  78. package/lib/components/create-okr/fields/index.js +0 -17
  79. package/lib/components/create-okr/fields/input-with-err-popup.js +0 -57
  80. package/lib/components/create-okr/fields/o-new-name.js +0 -197
  81. package/lib/components/create-okr/fields/okr-case.js +0 -98
  82. package/lib/components/create-okr/fields/okr-classify.js +0 -51
  83. package/lib/components/create-okr/fields/okr-create-suggest.js +0 -147
  84. package/lib/components/create-okr/fields/okr-new-user-selector.js +0 -106
  85. package/lib/components/create-okr/fields/okr-parent.js +0 -157
  86. package/lib/components/create-okr/fields/okr-type-detail.js +0 -196
  87. package/lib/components/create-okr/fields/okr-type.js +0 -131
  88. package/lib/components/create-okr/fields/okr-visibility-detail.js +0 -224
  89. package/lib/components/create-okr/fields/okr-visibility.js +0 -169
  90. package/lib/components/create-okr/img/check-normal.svg +0 -29
  91. package/lib/components/create-okr/img/check-right.svg +0 -16
  92. package/lib/components/create-okr/img/check-wrong.svg +0 -29
  93. package/lib/components/create-okr/img/create-success-head.png +0 -0
  94. package/lib/components/create-okr/img/create-success-left-quotation.svg +0 -14
  95. package/lib/components/create-okr/img/create-success-message.svg +0 -1
  96. package/lib/components/create-okr/img/create-success-right-quotation.svg +0 -14
  97. package/lib/components/create-okr/img/create-success-shadow.svg +0 -23
  98. package/lib/components/create-okr/img/example.svg +0 -11
  99. package/lib/components/create-okr/img/hand.svg +0 -12
  100. package/lib/components/create-okr/img/kr-add.svg +0 -12
  101. package/lib/components/create-okr/img/left-quotation.svg +0 -12
  102. package/lib/components/create-okr/img/light.svg +0 -1
  103. package/lib/components/create-okr/img/pack-up.js +0 -28
  104. package/lib/components/create-okr/img/qr-code.png +0 -0
  105. package/lib/components/create-okr/img/right-quotation.svg +0 -12
  106. package/lib/components/create-okr/img/shower.png +0 -0
  107. package/lib/components/create-okr/img/target.svg +0 -19
  108. package/lib/components/create-okr/img/teach-okr.svg +0 -17
  109. package/lib/components/create-okr/img/wave.png +0 -0
  110. package/lib/components/create-okr/img/weight.svg +0 -12
  111. package/lib/components/create-okr/index.css +0 -446
  112. package/lib/components/create-okr/index.js +0 -911
  113. package/lib/components/create-okr/interface.js +0 -5
  114. package/lib/components/create-okr/kr-items/index.css +0 -180
  115. package/lib/components/create-okr/kr-items/kr-item-weight.js +0 -194
  116. package/lib/components/create-okr/kr-items/krDatas.js +0 -299
  117. package/lib/components/create-okr/kr-items/krItem.js +0 -167
  118. package/lib/components/create-okr/objectType.js +0 -273
  119. package/lib/components/create-okr/request-api.js +0 -220
  120. package/lib/components/create-okr/style.js +0 -100
  121. package/lib/components/create-okr/utils/getCreateOkrSurpassPercent.js +0 -124
  122. package/lib/components/create-okr/utils/helper.js +0 -99
  123. package/lib/components/create-okr/utils/index.js +0 -23
  124. package/lib/components/dynamic/components/condition-render/index.js +0 -20
  125. package/lib/components/dynamic/components/dangerous-html/index.js +0 -22
  126. package/lib/components/dynamic/components/dynamic-search-input/index.css +0 -78
  127. package/lib/components/dynamic/components/dynamic-search-input/index.js +0 -192
  128. package/lib/components/dynamic/components/obj-status/index.css +0 -22
  129. package/lib/components/dynamic/components/obj-status/index.js +0 -38
  130. package/lib/components/dynamic/components/percent/index.css +0 -21
  131. package/lib/components/dynamic/components/percent/index.js +0 -38
  132. package/lib/components/dynamic/components/title/index.css +0 -35
  133. package/lib/components/dynamic/components/title/index.js +0 -59
  134. package/lib/components/dynamic/constant.js +0 -96
  135. package/lib/components/dynamic/context/index.js +0 -13
  136. package/lib/components/dynamic/dynamic-item/components/header/index.css +0 -101
  137. package/lib/components/dynamic/dynamic-item/components/header/index.js +0 -294
  138. package/lib/components/dynamic/dynamic-item/components/icon/index.css +0 -10
  139. package/lib/components/dynamic/dynamic-item/components/icon/index.js +0 -35
  140. package/lib/components/dynamic/dynamic-item/dynamic-align/img/dynamic-align.svg +0 -22
  141. package/lib/components/dynamic/dynamic-item/dynamic-align/img/dynamic-relative.svg +0 -22
  142. package/lib/components/dynamic/dynamic-item/dynamic-align/index.css +0 -95
  143. package/lib/components/dynamic/dynamic-item/dynamic-align/index.js +0 -173
  144. package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.css +0 -54
  145. package/lib/components/dynamic/dynamic-item/dynamic-announcement/index.js +0 -107
  146. package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.css +0 -48
  147. package/lib/components/dynamic/dynamic-item/dynamic-assessment/index.js +0 -89
  148. package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.css +0 -96
  149. package/lib/components/dynamic/dynamic-item/dynamic-create-o/index.js +0 -171
  150. package/lib/components/dynamic/dynamic-item/dynamic-kr/index.css +0 -67
  151. package/lib/components/dynamic/dynamic-item/dynamic-kr/index.js +0 -110
  152. package/lib/components/dynamic/dynamic-item/dynamic-milestone/constant.js +0 -16
  153. package/lib/components/dynamic/dynamic-item/dynamic-milestone/img/milestone.png +0 -0
  154. package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.css +0 -111
  155. package/lib/components/dynamic/dynamic-item/dynamic-milestone/index.js +0 -158
  156. package/lib/components/dynamic/dynamic-item/dynamic-progress/index.css +0 -95
  157. package/lib/components/dynamic/dynamic-item/dynamic-progress/index.js +0 -215
  158. package/lib/components/dynamic/dynamic-item/dynamic-project/constant.js +0 -16
  159. package/lib/components/dynamic/dynamic-item/dynamic-project/img/project.png +0 -0
  160. package/lib/components/dynamic/dynamic-item/dynamic-project/index.css +0 -91
  161. package/lib/components/dynamic/dynamic-item/dynamic-project/index.js +0 -125
  162. package/lib/components/dynamic/dynamic-item/dynamic-relative/img/dynamic-relative.svg +0 -22
  163. package/lib/components/dynamic/dynamic-item/dynamic-relative/index.css +0 -95
  164. package/lib/components/dynamic/dynamic-item/dynamic-relative/index.js +0 -192
  165. package/lib/components/dynamic/dynamic-item/dynamic-replay/index.css +0 -138
  166. package/lib/components/dynamic/dynamic-item/dynamic-replay/index.js +0 -183
  167. package/lib/components/dynamic/dynamic-item/dynamic-report/index.css +0 -153
  168. package/lib/components/dynamic/dynamic-item/dynamic-report/index.js +0 -138
  169. package/lib/components/dynamic/dynamic-item/dynamic-reward/index.css +0 -97
  170. package/lib/components/dynamic/dynamic-item/dynamic-reward/index.js +0 -207
  171. package/lib/components/dynamic/dynamic-item/dynamic-share/index.css +0 -54
  172. package/lib/components/dynamic/dynamic-item/dynamic-share/index.js +0 -107
  173. package/lib/components/dynamic/dynamic-item/dynamic-task/constant.js +0 -50
  174. package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-cancel.png +0 -0
  175. package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-delay.png +0 -0
  176. package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-done.png +0 -0
  177. package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-pause.png +0 -0
  178. package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-progress.png +0 -0
  179. package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-unaccept.png +0 -0
  180. package/lib/components/dynamic/dynamic-item/dynamic-task/img/task-unstart.png +0 -0
  181. package/lib/components/dynamic/dynamic-item/dynamic-task/index.css +0 -111
  182. package/lib/components/dynamic/dynamic-item/dynamic-task/index.js +0 -164
  183. package/lib/components/dynamic/dynamic-item/index.css +0 -128
  184. package/lib/components/dynamic/dynamic-item/index.js +0 -352
  185. package/lib/components/dynamic/dynamic-like-ranking/image/like-ranking.svg +0 -23
  186. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-1.png +0 -0
  187. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-2.png +0 -0
  188. package/lib/components/dynamic/dynamic-like-ranking/image/ranking-3.png +0 -0
  189. package/lib/components/dynamic/dynamic-like-ranking/index.css +0 -126
  190. package/lib/components/dynamic/dynamic-like-ranking/index.js +0 -157
  191. package/lib/components/dynamic/dynamic-like-ranking/item.js +0 -107
  192. package/lib/components/dynamic/dynamic-like-ranking/mock.js +0 -84
  193. package/lib/components/dynamic/dynamic-liking/image/like-dynamic.svg +0 -30
  194. package/lib/components/dynamic/dynamic-liking/index.css +0 -81
  195. package/lib/components/dynamic/dynamic-liking/index.js +0 -76
  196. package/lib/components/dynamic/dynamic-liking/item.js +0 -90
  197. package/lib/components/dynamic/dynamic-liking/mock.js +0 -83
  198. package/lib/components/dynamic/dynamic-list/index.css +0 -36
  199. package/lib/components/dynamic/dynamic-list/index.js +0 -61
  200. package/lib/components/dynamic/dynamic-topping/image/quotationMark.svg +0 -16
  201. package/lib/components/dynamic/dynamic-topping/image/topIcon.svg +0 -30
  202. package/lib/components/dynamic/dynamic-topping/index.css +0 -130
  203. package/lib/components/dynamic/dynamic-topping/index.js +0 -78
  204. package/lib/components/dynamic/dynamic-topping/interface.js +0 -5
  205. package/lib/components/dynamic/dynamic-topping/item.js +0 -138
  206. package/lib/components/dynamic/dynamic-topping/request-api.js +0 -36
  207. package/lib/components/dynamic/dynamic.css +0 -204
  208. package/lib/components/dynamic/dynamic.js +0 -391
  209. package/lib/components/dynamic/export-module/index.js +0 -33
  210. package/lib/components/dynamic/img/dynamic-P1.svg +0 -15
  211. package/lib/components/dynamic/img/dynamic-P2.svg +0 -15
  212. package/lib/components/dynamic/img/dynamic-P3.svg +0 -15
  213. package/lib/components/dynamic/img/dynamic-P4.svg +0 -15
  214. package/lib/components/dynamic/img/dynamic-P5.svg +0 -15
  215. package/lib/components/dynamic/img/dynamic-delay.svg +0 -17
  216. package/lib/components/dynamic/img/dynamic-desire.svg +0 -61
  217. package/lib/components/dynamic/img/dynamic-empty.png +0 -0
  218. package/lib/components/dynamic/img/dynamic-end.svg +0 -17
  219. package/lib/components/dynamic/img/dynamic-left-quoto.svg +0 -13
  220. package/lib/components/dynamic/img/dynamic-loading.gif +0 -0
  221. package/lib/components/dynamic/img/dynamic-normal.svg +0 -17
  222. package/lib/components/dynamic/img/dynamic-promise.svg +0 -61
  223. package/lib/components/dynamic/img/dynamic-reword.svg +0 -24
  224. package/lib/components/dynamic/img/dynamic-right-quoto.svg +0 -13
  225. package/lib/components/dynamic/img/dynamic-risk.svg +0 -17
  226. package/lib/components/dynamic/img/dynamic-submit-delay.svg +0 -16
  227. package/lib/components/dynamic/img/dynamic-submit-normal.svg +0 -18
  228. package/lib/components/dynamic/img/dynamic-top.svg +0 -14
  229. package/lib/components/dynamic/index.js +0 -27
  230. package/lib/components/dynamic/interface.js +0 -5
  231. package/lib/components/dynamic/quick-operation/components/create-announcement/index.css +0 -25
  232. package/lib/components/dynamic/quick-operation/components/create-announcement/index.js +0 -37
  233. package/lib/components/dynamic/quick-operation/components/create-okr/index.css +0 -25
  234. package/lib/components/dynamic/quick-operation/components/create-okr/index.js +0 -37
  235. package/lib/components/dynamic/quick-operation/components/create-share/index.css +0 -25
  236. package/lib/components/dynamic/quick-operation/components/create-share/index.js +0 -37
  237. package/lib/components/dynamic/quick-operation/components/create-task/index.css +0 -25
  238. package/lib/components/dynamic/quick-operation/components/create-task/index.js +0 -42
  239. package/lib/components/dynamic/quick-operation/img/create-announcement.png +0 -0
  240. package/lib/components/dynamic/quick-operation/img/create-okr.png +0 -0
  241. package/lib/components/dynamic/quick-operation/img/create-share.png +0 -0
  242. package/lib/components/dynamic/quick-operation/img/create-task.png +0 -0
  243. package/lib/components/dynamic/quick-operation/index.css +0 -51
  244. package/lib/components/dynamic/quick-operation/index.js +0 -112
  245. package/lib/components/dynamic/request-api.js +0 -92
  246. package/lib/components/dynamic/util.js +0 -140
  247. package/lib/components/file-list/components/single-file/index.css +0 -84
  248. package/lib/components/file-list/components/single-file/index.js +0 -115
  249. package/lib/components/file-list/img/new-file-list-doc.svg +0 -1
  250. package/lib/components/file-list/img/new-file-list-other.svg +0 -1
  251. package/lib/components/file-list/img/new-file-list-pdf.svg +0 -1
  252. package/lib/components/file-list/img/new-file-list-ppt.svg +0 -1
  253. package/lib/components/file-list/img/new-file-list-radio.svg +0 -1
  254. package/lib/components/file-list/img/new-file-list-video.svg +0 -1
  255. package/lib/components/file-list/img/new-file-list-xls.svg +0 -1
  256. package/lib/components/file-list/index.css +0 -5
  257. package/lib/components/file-list/index.js +0 -61
  258. package/lib/components/file-list/interface.js +0 -5
  259. package/lib/components/file-list/util.js +0 -78
  260. package/lib/components/img-viewer/icon/enlarge.js +0 -30
  261. package/lib/components/img-viewer/icon/left-rotate.js +0 -46
  262. package/lib/components/img-viewer/icon/right-rotate.js +0 -44
  263. package/lib/components/img-viewer/icon/shrink.js +0 -37
  264. package/lib/components/img-viewer/image/loading.gif +0 -0
  265. package/lib/components/img-viewer/index.css +0 -155
  266. package/lib/components/img-viewer/index.js +0 -228
  267. package/lib/components/img-viewer/interface.js +0 -5
  268. package/lib/components/img-viewer/util.js +0 -16
  269. package/lib/components/publish-dynamic-modal/index.js +0 -13
  270. package/lib/components/publish-dynamic-modal/interface.js +0 -5
  271. package/lib/components/publish-dynamic-modal/publish-dynamic-modal.css +0 -3
  272. package/lib/components/publish-dynamic-modal/publish-dynamic-modal.js +0 -191
  273. package/lib/components/publish-dynamic-modal/requist-api.js +0 -48
  274. package/lib/components/search-key-handle/index.js +0 -39
  275. package/lib/components/upload/img/doc.svg +0 -1
  276. package/lib/components/upload/img/other.svg +0 -1
  277. package/lib/components/upload/img/pdf.svg +0 -1
  278. package/lib/components/upload/img/ppt.svg +0 -1
  279. package/lib/components/upload/img/radio.svg +0 -1
  280. package/lib/components/upload/img/video.svg +0 -1
  281. package/lib/components/upload/img/xls.svg +0 -1
  282. package/lib/components/upload/index.css +0 -26
  283. package/lib/components/upload/util.js +0 -102
  284. package/lib/components-v1/buttonv2/ButtonLinked.js +0 -35
  285. package/lib/components-v1/buttonv2/ButtonOutlined.js +0 -64
  286. package/lib/components-v1/buttonv2/ButtonRounded.js +0 -101
  287. package/lib/components-v1/buttonv2/DefaultButton.js +0 -86
  288. package/lib/components-v1/buttonv2/index.js +0 -37
  289. package/lib/components-v1/buttonv2/style/style.js +0 -53
  290. package/lib/components-v1/buttonv2/style/theme.css +0 -3
  291. package/lib/components-v1/confirm/index.js +0 -158
  292. package/lib/pages/dynamic/index.css +0 -5
  293. package/lib/pages/dynamic/index.js +0 -25
  294. package/lib/pages/like-ranking/column.js +0 -141
  295. package/lib/pages/like-ranking/filter-buttons/department.js +0 -44
  296. package/lib/pages/like-ranking/filter-buttons/group.js +0 -34
  297. package/lib/pages/like-ranking/filter-buttons/index.css +0 -19
  298. package/lib/pages/like-ranking/filter-buttons/index.js +0 -44
  299. package/lib/pages/like-ranking/filter-buttons/modular.js +0 -110
  300. package/lib/pages/like-ranking/filter-buttons/name.js +0 -73
  301. package/lib/pages/like-ranking/filter-buttons/search-dropdown/index.css +0 -27
  302. package/lib/pages/like-ranking/filter-buttons/search-dropdown/index.js +0 -38
  303. package/lib/pages/like-ranking/filter-buttons/timer.js +0 -56
  304. package/lib/pages/like-ranking/image/dynamic-empty.png +0 -0
  305. package/lib/pages/like-ranking/image/loading.gif +0 -0
  306. package/lib/pages/like-ranking/image/ranking-1.png +0 -0
  307. package/lib/pages/like-ranking/image/ranking-2.png +0 -0
  308. package/lib/pages/like-ranking/image/ranking-3.png +0 -0
  309. package/lib/pages/like-ranking/index.css +0 -185
  310. package/lib/pages/like-ranking/index.js +0 -252
  311. package/lib/pages/like-ranking/mock.js +0 -366
  312. package/lib/pages/like-ranking/request-api.js +0 -15
  313. package/lib/utils/format-time.js +0 -161
  314. package/lib/utils/helpers.js +0 -41
  315. package/lib/utils/roundWeight.js +0 -105
  316. package/yarn-error.log +0 -15894
@@ -1,102 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getPreviewImgs = exports.isImg = exports.getFileTypeMapIcon = exports.getFileSize = void 0;
7
-
8
- var _doc = _interopRequireDefault(require("./img/doc.svg"));
9
-
10
- var _other = _interopRequireDefault(require("./img/other.svg"));
11
-
12
- var _pdf = _interopRequireDefault(require("./img/pdf.svg"));
13
-
14
- var _ppt = _interopRequireDefault(require("./img/ppt.svg"));
15
-
16
- var _radio = _interopRequireDefault(require("./img/radio.svg"));
17
-
18
- var _video = _interopRequireDefault(require("./img/video.svg"));
19
-
20
- var _xls = _interopRequireDefault(require("./img/xls.svg"));
21
-
22
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
23
-
24
- var getFileSize = function getFileSize(fileSize) {
25
- if (fileSize < 1024) {
26
- return fileSize + "B";
27
- } else if (fileSize < 1024 * 1024) {
28
- var temp = fileSize / 1024;
29
- temp = Number(temp.toFixed(2));
30
- return temp + "KB";
31
- } else if (fileSize < 1024 * 1024 * 1024) {
32
- var _temp = fileSize / (1024 * 1024);
33
-
34
- _temp = Number(_temp.toFixed(2));
35
- return _temp + "M";
36
- } else {
37
- var _temp2 = fileSize / (1024 * 1024 * 1024);
38
-
39
- _temp2 = Number(_temp2.toFixed(2));
40
- return _temp2 + "GB";
41
- }
42
- };
43
-
44
- exports.getFileSize = getFileSize;
45
-
46
- var getFileTypeMapIcon = function getFileTypeMapIcon(fileType) {
47
- // if (/^(jpg|png|gif|jpeg|image|JPG|PNG|GIF|JPEG)$/.test(fileType)) {
48
- // return
49
- // } else
50
- if (/^(mp3|ogg|ape|flac)$/.test(fileType.toLowerCase())) {
51
- return _radio["default"];
52
- } else if (/^(avi|wmv|mov|mp4|rmvb)$/.test(fileType.toLowerCase())) {
53
- return _video["default"];
54
- } else if (/^(pptx|ppt)$/.test(fileType.toLowerCase())) {
55
- return _ppt["default"];
56
- } else if (/^(doc|docx)$/.test(fileType.toLowerCase())) {
57
- return _doc["default"];
58
- } else if (/^(xls|xlsx)$/.test(fileType.toLowerCase())) {
59
- return _xls["default"];
60
- } else if (/^(pdf)$/.test(fileType.toLowerCase())) {
61
- return _pdf["default"];
62
- }
63
-
64
- return _other["default"];
65
- };
66
-
67
- exports.getFileTypeMapIcon = getFileTypeMapIcon;
68
-
69
- var isImg = function isImg(fileType) {
70
- if (/^(jpg|png|gif|jpeg|image|JPG|PNG|GIF|JPEG)$/.test(fileType)) {
71
- return true;
72
- }
73
-
74
- return false;
75
- };
76
-
77
- exports.isImg = isImg;
78
-
79
- var getPreviewImgs = function getPreviewImgs(files) {
80
- return files.filter(function (file) {
81
- return isImg(file.FileType);
82
- }).map(function (file) {
83
- return {
84
- documentId: file.documentId,
85
- bigImageUrl: file.ClientUrl,
86
- fileName: file.FileName,
87
- fileType: file.FileType,
88
- previewUrl: file.ClientUrl,
89
- deleteable: file.Deleteable,
90
- smallImageUrl: file.ClientUrl,
91
- createDate: '',
92
- documentSource: '',
93
- downloadUrl: file.DownloadUrl,
94
- imageUrl: file.ClientUrl,
95
- relatedFileId: null,
96
- size: file.FileSize,
97
- thumbnailGenerated: null
98
- };
99
- });
100
- };
101
-
102
- exports.getPreviewImgs = getPreviewImgs;
@@ -1,35 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.ButtonLinked = ButtonLinked;
7
-
8
- var _react = _interopRequireDefault(require("react"));
9
-
10
- var _styledComponents = _interopRequireDefault(require("styled-components"));
11
-
12
- var _classnames = _interopRequireDefault(require("classnames"));
13
-
14
- require("./style/theme.css");
15
-
16
- var _templateObject;
17
-
18
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
19
-
20
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
21
-
22
- var LinkedButtonWrapper = _styledComponents["default"].a(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n font-size: 14px;\n user-select: select none;\n font-family: 'Microsoft YaHei', 'PingFang SC';\n &:hover {\n }\n"])));
23
-
24
- function ButtonLinked(_ref) {
25
- var children = _ref.children,
26
- onClick = _ref.onClick,
27
- className = _ref.className,
28
- style = _ref.style;
29
- // 类似于链接,只不过有一个hover效果
30
- return /*#__PURE__*/_react["default"].createElement(LinkedButtonWrapper, {
31
- className: (0, _classnames["default"])(className, 'tita-linked-button'),
32
- style: style,
33
- onClick: onClick
34
- }, children);
35
- }
@@ -1,64 +0,0 @@
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.ButtonOutlined = void 0;
9
-
10
- var _react = _interopRequireWildcard(require("react"));
11
-
12
- var _style = require(".//style/style");
13
-
14
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15
-
16
- 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; }
17
-
18
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19
-
20
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
21
-
22
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
23
-
24
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
25
-
26
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
27
-
28
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
29
-
30
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
31
-
32
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
33
-
34
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
35
-
36
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
37
-
38
- var ButtonOutlined = /*#__PURE__*/function (_Component) {
39
- _inherits(ButtonOutlined, _Component);
40
-
41
- var _super = _createSuper(ButtonOutlined);
42
-
43
- function ButtonOutlined(props) {
44
- _classCallCheck(this, ButtonOutlined);
45
-
46
- return _super.call(this, props);
47
- }
48
-
49
- _createClass(ButtonOutlined, [{
50
- key: "render",
51
- value: function render() {
52
- var _this$props = this.props,
53
- children = _this$props.children,
54
- onClick = _this$props.onClick;
55
- return /*#__PURE__*/_react["default"].createElement(_style.ButtonOutlinedWrapper, {
56
- onClick: onClick
57
- }, children);
58
- }
59
- }]);
60
-
61
- return ButtonOutlined;
62
- }(_react.Component);
63
-
64
- exports.ButtonOutlined = ButtonOutlined;
@@ -1,101 +0,0 @@
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.ButtonRounded = void 0;
9
-
10
- var _react = _interopRequireWildcard(require("react"));
11
-
12
- var _style = require("./style/style");
13
-
14
- var _classnames = _interopRequireDefault(require("classnames"));
15
-
16
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
17
-
18
- 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); }
19
-
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
-
22
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
23
-
24
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
25
-
26
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
27
-
28
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
29
-
30
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
31
-
32
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
33
-
34
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
35
-
36
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
37
-
38
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
39
-
40
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
41
-
42
- // const buttonStyle = {
43
- // padding: '6px 16px',
44
- // fontSize: '16px',
45
- // backgroundImage: 'linear-gradient(90deg, #FFD513 2%, #FFB10B 100%)',
46
- // boxShadow: '0 4px 10px 0 rgba(226,156,2,0.30)',
47
- // borderRadius: '20px',
48
- // color: '#FFFFFF',
49
- // display: 'none',
50
- // };
51
- var ButtonRounded = /*#__PURE__*/function (_Component) {
52
- _inherits(ButtonRounded, _Component);
53
-
54
- var _super = _createSuper(ButtonRounded);
55
-
56
- function ButtonRounded(props) {
57
- var _this;
58
-
59
- _classCallCheck(this, ButtonRounded);
60
-
61
- _this = _super.call(this, props);
62
-
63
- _this.handleClick = function (e) {
64
- var onClick = _this.props.onClick;
65
-
66
- if (onClick) {
67
- onClick(e);
68
- }
69
- };
70
-
71
- _this.state = {};
72
- return _this;
73
- }
74
-
75
- _createClass(ButtonRounded, [{
76
- key: "render",
77
- value: function render() {
78
- var _this$props = this.props,
79
- children = _this$props.children,
80
- type = _this$props.type,
81
- floating = _this$props.floating,
82
- disabled = _this$props.disabled,
83
- style = _this$props.style,
84
- gradient = _this$props.gradient,
85
- className = _this$props.className;
86
- return /*#__PURE__*/_react["default"].createElement(_style.ButtonRoundedStyled, {
87
- className: (0, _classnames["default"])('tita-button-custom', className),
88
- type: type,
89
- floating: floating,
90
- style: style,
91
- disabled: disabled,
92
- gradient: gradient,
93
- onMouseUp: this.handleClick
94
- }, children);
95
- }
96
- }]);
97
-
98
- return ButtonRounded;
99
- }(_react.Component);
100
-
101
- exports.ButtonRounded = ButtonRounded;
@@ -1,86 +0,0 @@
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.Button = void 0;
9
-
10
- var _react = _interopRequireWildcard(require("react"));
11
-
12
- var _style = require("./style/style");
13
-
14
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15
-
16
- 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; }
17
-
18
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19
-
20
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
21
-
22
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
23
-
24
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
25
-
26
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
27
-
28
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
29
-
30
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
31
-
32
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
33
-
34
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
35
-
36
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
37
-
38
- // TODO: 这个组件抽出来只做位最基础的功能用,外面可以套上不同的壳子
39
- var Button = /*#__PURE__*/function (_Component) {
40
- _inherits(Button, _Component);
41
-
42
- var _super = _createSuper(Button);
43
-
44
- function Button(props) {
45
- var _this;
46
-
47
- _classCallCheck(this, Button);
48
-
49
- _this = _super.call(this, props);
50
-
51
- _this.handleClick = function (e) {
52
- var onClick = _this.props.onClick;
53
-
54
- if (onClick) {
55
- onClick(e);
56
- }
57
- };
58
-
59
- _this.state = {};
60
- return _this;
61
- }
62
-
63
- _createClass(Button, [{
64
- key: "render",
65
- value: function render() {
66
- var _this$props = this.props,
67
- children = _this$props.children,
68
- type = _this$props.type,
69
- floating = _this$props.floating,
70
- disabled = _this$props.disabled,
71
- style = _this$props.style;
72
- return /*#__PURE__*/_react["default"].createElement(_style.TitaButton, {
73
- className: "tita-button-custom",
74
- type: type,
75
- floating: floating,
76
- style: style,
77
- disabled: disabled,
78
- onMouseUp: this.handleClick
79
- }, children);
80
- }
81
- }]);
82
-
83
- return Button;
84
- }(_react.Component);
85
-
86
- exports.Button = Button;
@@ -1,37 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "Button", {
7
- enumerable: true,
8
- get: function get() {
9
- return _DefaultButton.Button;
10
- }
11
- });
12
- Object.defineProperty(exports, "ButtonLinked", {
13
- enumerable: true,
14
- get: function get() {
15
- return _ButtonLinked.ButtonLinked;
16
- }
17
- });
18
- Object.defineProperty(exports, "ButtonOutlined", {
19
- enumerable: true,
20
- get: function get() {
21
- return _ButtonOutlined.ButtonOutlined;
22
- }
23
- });
24
- Object.defineProperty(exports, "ButtonRounded", {
25
- enumerable: true,
26
- get: function get() {
27
- return _ButtonRounded.ButtonRounded;
28
- }
29
- });
30
-
31
- var _DefaultButton = require("./DefaultButton");
32
-
33
- var _ButtonLinked = require("./ButtonLinked");
34
-
35
- var _ButtonOutlined = require("./ButtonOutlined");
36
-
37
- var _ButtonRounded = require("./ButtonRounded");
@@ -1,53 +0,0 @@
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.ButtonOutlinedWrapper = exports.ButtonRoundedStyled = exports.TitaButton = void 0;
9
-
10
- var _styledComponents = _interopRequireWildcard(require("styled-components"));
11
-
12
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
13
-
14
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15
-
16
- 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; }
17
-
18
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
19
-
20
- var primaryColor = '#2879FF';
21
- var secondaryColor = '#F0F2F5';
22
- var CommonStyle = (0, _styledComponents.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n /* margin: 0 5px 0 0; */\n font-size: 13px;\n font-family: 'Microsoft YaHei', sans-serif, 'PingFang SC';\n padding: 4px 15px;\n line-height: 24px;\n border: none;\n border-radius: 5px;\n cursor: pointer;\n display: inline-block;\n user-select: none;\n text-align: center;\n letter-spacing: 0.5;\n &:focus {\n outline: none;\n }\n transition: all 300ms ease-in-out;\n"])));
23
-
24
- var TitaButton = _styledComponents["default"].a.attrs(function (props) {// console.log(props);
25
- })(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", ";\n color: ", ";\n background-color: ", ";\n &:hover {\n color: ", ";\n box-shadow: ", ";\n }\n &:active {\n /* \u70B9\u51FB\u6309\u94AE\u4E4B\u540E\u6709\u4E00\u4E2A\u6548\u679C \u7B80\u5355\u6539 scale \u6709\u70B9\u8089 */\n transform: scale(0.98);\n }\n &[disabled] {\n box-shadow: none;\n color: ", ";\n background: ", ";\n }\n"])), CommonStyle, function (props) {
26
- return props.type === 'primary' ? '#fff' : '#BFC3C7';
27
- }, function (props) {
28
- return props.type === 'primary' ? primaryColor : secondaryColor;
29
- }, function (props) {
30
- return props.type === 'primary' ? '#fff' : '#33383D';
31
- }, function (props) {
32
- return props.type === 'primary' ? ' 0 5px 8px 0 #C2E0FF' : '0 5px 8px 0 #E0E0E0';
33
- }, function (props) {
34
- return props.disabled && '#BFC3C7';
35
- }, function (props) {
36
- return props.disabled && '#F0F2F5';
37
- });
38
-
39
- exports.TitaButton = TitaButton;
40
- var commonBtn = (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n padding: 5px 15px;\n font-size: 14px;\n line-height: normal;\n transition: all 300ms ease-in-out;\n user-select: none;\n"])));
41
-
42
- var ButtonRoundedStyled = _styledComponents["default"].a.attrs(function (props) {// console.log('ButtonRoundedStyled', props);
43
- })(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n &:hover {\n color: #fff;\n }\n ", "\n &:active {\n transform: scale(0.98);\n }\n white-space: nowrap;\n font-family: 'Microsoft YaHei', sans-serif, 'PingFang SC';\n color: #fff;\n border-radius: 50px;\n background-image: ", ";\n ", "\n"])), commonBtn, function (p) {
44
- return "linear-gradient(".concat(p.gradient && p.gradient.deg, "deg,").concat(p.gradient && p.gradient.startColor, ",").concat(p.gradient && p.gradient.endColor, ")");
45
- }, function (p) {
46
- return p.floating && 'box-shadow: 0 4px 10px 0 rgba(226, 156, 2, 0.3)';
47
- });
48
-
49
- exports.ButtonRoundedStyled = ButtonRoundedStyled;
50
-
51
- var ButtonOutlinedWrapper = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\nbackground-color: #fff;\nborder-radius: 25%;\nborder: 1px solid #2879ff;\n"])));
52
-
53
- exports.ButtonOutlinedWrapper = ButtonOutlinedWrapper;
@@ -1,3 +0,0 @@
1
- .tita-color-text-gold {
2
- color: #feb927;
3
- }
@@ -1,158 +0,0 @@
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 _pop = _interopRequireDefault(require("../pop"));
13
-
14
- var _styledComponents = _interopRequireDefault(require("styled-components"));
15
-
16
- var _buttonv = require("../buttonv2");
17
-
18
- var _templateObject, _templateObject2;
19
-
20
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
21
-
22
- 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); }
23
-
24
- 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; }
25
-
26
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
27
-
28
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
29
-
30
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
31
-
32
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
33
-
34
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
35
-
36
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
37
-
38
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
39
-
40
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
41
-
42
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
43
-
44
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
45
-
46
- function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
47
-
48
- var ConfirmWrapper = _styledComponents["default"].div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n /* TODO padding \u53EF\u52A8\u6001\u8C03\u6574 */\n width: 300px;\n max-height: 100px;\n border-radius: 5px;\n box-shadow: 0 3px 10px 0 rgba(0, 0, 0, 0.15);\n padding: 15px 12px;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n background-color: #fff;\n"])));
49
-
50
- var FooterWrapper = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-top: 5px;\n button {\n padding: 2px 12px;\n font-size: 12px;\n }\n"])));
51
-
52
- var Confirm = /*#__PURE__*/function (_Component) {
53
- _inherits(Confirm, _Component);
54
-
55
- var _super = _createSuper(Confirm);
56
-
57
- function Confirm(props, trigger, pop) {
58
- var _this;
59
-
60
- _classCallCheck(this, Confirm);
61
-
62
- _this = _super.call(this, props);
63
- _this.trigger = trigger;
64
- _this.pop = pop;
65
-
66
- _this.handleShowPop = function () {
67
- // @ts-ignore
68
- _this.pop.current.show(_this.trigger.current);
69
- };
70
-
71
- _this.handleCancel = function (e) {
72
- var onCancel = _this.props.onCancel;
73
-
74
- if (onCancel) {
75
- onCancel(e);
76
-
77
- _this.setState({
78
- visible: false
79
- });
80
- }
81
- };
82
-
83
- _this.handleOk = function (e) {
84
- var onOk = _this.props.onOk; //this.xxxx.getData()
85
-
86
- if (onOk) {
87
- onOk(e);
88
- }
89
- };
90
-
91
- _this.renderFooter = function () {
92
- // 默认没有按钮, 支持设置按钮, 暂时不支持 数组类型按钮组
93
- var footerContent = _this.props.footerContent;
94
- return /*#__PURE__*/_react["default"].createElement(_react.Fragment, null, footerContent ? footerContent : /*#__PURE__*/_react["default"].createElement(FooterWrapper, null, /*#__PURE__*/_react["default"].createElement("div", {
95
- className: "fr",
96
- style: {
97
- "float": 'right'
98
- }
99
- }, /*#__PURE__*/_react["default"].createElement(_buttonv.Button, {
100
- type: "secondary",
101
- floating: true,
102
- onClick: _this.handleCancel,
103
- style: {
104
- marginRight: 5
105
- }
106
- }, "\u53D6\u6D88"), /*#__PURE__*/_react["default"].createElement(_buttonv.Button, {
107
- type: "primary",
108
- floating: true,
109
- onClick: _this.handleOk
110
- }, "\u786E\u5B9A"))));
111
- };
112
-
113
- _this.hide = function () {
114
- // @ts-ignore
115
- _this.pop.current.hide();
116
- };
117
-
118
- _this.state = {};
119
- _this.trigger = /*#__PURE__*/_react["default"].createRef();
120
- _this.pop = /*#__PURE__*/_react["default"].createRef();
121
- return _this;
122
- }
123
-
124
- _createClass(Confirm, [{
125
- key: "render",
126
- value: function render() {
127
- var _this$props = this.props,
128
- children = _this$props.children,
129
- className = _this$props.className,
130
- innerContent = _this$props.innerContent,
131
- blurToHide = _this$props.blurToHide;
132
- return /*#__PURE__*/_react["default"].createElement("div", {
133
- className: className,
134
- onClick: function onClick(e) {
135
- return e.stopPropagation();
136
- }
137
- }, /*#__PURE__*/_react["default"].createElement("div", {
138
- ref: this.trigger,
139
- onMouseDown: this.handleShowPop,
140
- style: {
141
- cursor: 'pointer'
142
- }
143
- }, innerContent), /*#__PURE__*/_react["default"].createElement(_pop["default"], {
144
- ref: this.pop,
145
- container: document.body,
146
- align: "bottom left",
147
- cover: true,
148
- blurToHide: blurToHide || false
149
- }, /*#__PURE__*/_react["default"].createElement(ConfirmWrapper, null, /*#__PURE__*/_react["default"].createElement("div", {
150
- className: "confirm-content"
151
- }, children), this.renderFooter())));
152
- }
153
- }]);
154
-
155
- return Confirm;
156
- }(_react.Component);
157
-
158
- exports["default"] = Confirm;
@@ -1,5 +0,0 @@
1
- .dynamic-page {
2
- height: 100%;
3
- background: #f0f4fa;
4
- margin-right: -10px;
5
- }