@ccs-ui/rc-pro 2.3.6-alpha-32 → 2.3.6-alpha-33

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 (344) hide show
  1. package/package.json +4 -26
  2. package/LICENSE +0 -21
  3. package/README.md +0 -37
  4. package/docs-dist/2179.b80aa159.async.js +0 -22
  5. package/docs-dist/2191.275582c6.async.js +0 -6
  6. package/docs-dist/27.82086704.async.js +0 -11
  7. package/docs-dist/3249.edb38f0f.async.js +0 -28
  8. package/docs-dist/404.html +0 -15
  9. package/docs-dist/5171.198d8c6e.async.js +0 -8
  10. package/docs-dist/7024.588d984f.async.js +0 -22
  11. package/docs-dist/7488.2db563fb.async.js +0 -137
  12. package/docs-dist/751.bb8cce69.async.js +0 -1
  13. package/docs-dist/8784.91b4ab45.async.js +0 -598
  14. package/docs-dist/9591.06d066b1.async.js +0 -1
  15. package/docs-dist/9600.78d67888.async.js +0 -16
  16. package/docs-dist/9600.e8c51481.chunk.css +0 -5
  17. package/docs-dist/auth__demos.32e710d5.async.js +0 -1
  18. package/docs-dist/auth__index.md.33be0665.chunk.css +0 -1
  19. package/docs-dist/auth__index.md.e0b5996f.async.js +0 -1
  20. package/docs-dist/button__demos.a20990de.async.js +0 -1
  21. package/docs-dist/button__index.md.33be0665.chunk.css +0 -1
  22. package/docs-dist/button__index.md.43fe8c62.async.js +0 -1
  23. package/docs-dist/cascader__demos.cb1e67f3.async.js +0 -1
  24. package/docs-dist/cascader__index.md.33be0665.chunk.css +0 -1
  25. package/docs-dist/cascader__index.md.cafec622.async.js +0 -1
  26. package/docs-dist/components/auth/index.html +0 -15
  27. package/docs-dist/components/button/index.html +0 -15
  28. package/docs-dist/components/cascader/index.html +0 -15
  29. package/docs-dist/components/date-picker/index.html +0 -15
  30. package/docs-dist/components/dialog/index.html +0 -15
  31. package/docs-dist/components/editor/index.html +0 -15
  32. package/docs-dist/components/group-form-item/index.html +0 -15
  33. package/docs-dist/components/index.html +0 -15
  34. package/docs-dist/components/interval-button/index.html +0 -15
  35. package/docs-dist/components/layout-keep-alive/index.html +0 -15
  36. package/docs-dist/components/loading/index.html +0 -15
  37. package/docs-dist/components/pro-grid/index.html +0 -15
  38. package/docs-dist/components/pro-table/index.html +0 -15
  39. package/docs-dist/components/pro-tabs/index.html +0 -15
  40. package/docs-dist/components/result/index.html +0 -15
  41. package/docs-dist/components/select/index.html +0 -15
  42. package/docs-dist/components/time-picker/index.html +0 -15
  43. package/docs-dist/components/trigger/index.html +0 -15
  44. package/docs-dist/components/virtual-list/index.html +0 -15
  45. package/docs-dist/components/water-mark/index.html +0 -15
  46. package/docs-dist/date-picker__demos.4cf5ef3e.async.js +0 -1
  47. package/docs-dist/date-picker__index.md.33be0665.chunk.css +0 -1
  48. package/docs-dist/date-picker__index.md.c27e69b2.async.js +0 -1
  49. package/docs-dist/dialog__demos.14d31789.async.js +0 -1
  50. package/docs-dist/dialog__index.md.33be0665.chunk.css +0 -1
  51. package/docs-dist/dialog__index.md.665375f8.async.js +0 -1
  52. package/docs-dist/docs__index.md.0a458278.async.js +0 -1
  53. package/docs-dist/docs__index.md.33be0665.chunk.css +0 -1
  54. package/docs-dist/docs__log.md.33be0665.chunk.css +0 -1
  55. package/docs-dist/docs__log.md.af406e13.async.js +0 -1
  56. package/docs-dist/docs__utils.md.33be0665.chunk.css +0 -1
  57. package/docs-dist/docs__utils.md.e1ca1150.async.js +0 -1
  58. package/docs-dist/dumi__tmp-production__dumi__theme__ContextWrapper.b4f42a14.async.js +0 -233
  59. package/docs-dist/dumi__tmp-production__dumi__theme__ContextWrapper.b9764392.chunk.css +0 -1
  60. package/docs-dist/editor__demos.f5ff3638.async.js +0 -6
  61. package/docs-dist/editor__index.md.33be0665.chunk.css +0 -1
  62. package/docs-dist/editor__index.md.b4f3c5a3.async.js +0 -1
  63. package/docs-dist/favicon.png +0 -0
  64. package/docs-dist/group-form-item__demos.3197aa4d.async.js +0 -1
  65. package/docs-dist/group-form-item__index.md.33be0665.chunk.css +0 -1
  66. package/docs-dist/group-form-item__index.md.63bf18f4.async.js +0 -1
  67. package/docs-dist/index.html +0 -15
  68. package/docs-dist/index.md.1621f8b8.async.js +0 -1
  69. package/docs-dist/index.md.33be0665.chunk.css +0 -1
  70. package/docs-dist/interval-button__demos.ff98564f.async.js +0 -1
  71. package/docs-dist/interval-button__index.md.33be0665.chunk.css +0 -1
  72. package/docs-dist/interval-button__index.md.54c9da91.async.js +0 -1
  73. package/docs-dist/layout-keep-alive__demos.c12a544d.async.js +0 -1
  74. package/docs-dist/layout-keep-alive__index.md.33be0665.chunk.css +0 -1
  75. package/docs-dist/layout-keep-alive__index.md.90ef1c2b.async.js +0 -1
  76. package/docs-dist/loading__demos.8ac9187d.async.js +0 -1
  77. package/docs-dist/loading__index.md.33be0665.chunk.css +0 -1
  78. package/docs-dist/loading__index.md.d52a9847.async.js +0 -1
  79. package/docs-dist/log/index.html +0 -15
  80. package/docs-dist/logo.svg +0 -48
  81. package/docs-dist/meta__auth.2fdb9639.async.js +0 -12
  82. package/docs-dist/meta__auth.b9764392.chunk.css +0 -1
  83. package/docs-dist/meta__button.420ed66c.async.js +0 -8759
  84. package/docs-dist/meta__button.b9764392.chunk.css +0 -1
  85. package/docs-dist/meta__cascader.79f5fc28.async.js +0 -103
  86. package/docs-dist/meta__cascader.b9764392.chunk.css +0 -1
  87. package/docs-dist/meta__date-picker.79265ba8.async.js +0 -72
  88. package/docs-dist/meta__date-picker.b9764392.chunk.css +0 -1
  89. package/docs-dist/meta__dialog.1ca8b654.async.js +0 -502
  90. package/docs-dist/meta__dialog.b9764392.chunk.css +0 -1
  91. package/docs-dist/meta__docs.5dbc484a.async.js +0 -1
  92. package/docs-dist/meta__editor.11adf92c.async.js +0 -37
  93. package/docs-dist/meta__editor.b9764392.chunk.css +0 -1
  94. package/docs-dist/meta__group-form-item.a6e6163c.async.js +0 -36
  95. package/docs-dist/meta__group-form-item.b9764392.chunk.css +0 -1
  96. package/docs-dist/meta__index.md.3fe47f24.async.js +0 -1
  97. package/docs-dist/meta__interval-button.72bce101.async.js +0 -17
  98. package/docs-dist/meta__interval-button.b9764392.chunk.css +0 -1
  99. package/docs-dist/meta__layout-keep-alive.3997804f.async.js +0 -17
  100. package/docs-dist/meta__layout-keep-alive.b9764392.chunk.css +0 -1
  101. package/docs-dist/meta__loading.b9764392.chunk.css +0 -1
  102. package/docs-dist/meta__loading.cd39daf6.async.js +0 -24
  103. package/docs-dist/meta__pro-grid.b9764392.chunk.css +0 -1
  104. package/docs-dist/meta__pro-grid.be34bc7a.async.js +0 -21
  105. package/docs-dist/meta__pro-table.b9764392.chunk.css +0 -1
  106. package/docs-dist/meta__pro-table.d318e6ac.async.js +0 -609
  107. package/docs-dist/meta__pro-tabs.2d66cb0d.async.js +0 -104
  108. package/docs-dist/meta__pro-tabs.b9764392.chunk.css +0 -1
  109. package/docs-dist/meta__result.12e85cae.async.js +0 -20
  110. package/docs-dist/meta__result.b9764392.chunk.css +0 -1
  111. package/docs-dist/meta__select.91395de5.async.js +0 -337
  112. package/docs-dist/meta__select.b9764392.chunk.css +0 -1
  113. package/docs-dist/meta__time-picker.5ae1cf72.async.js +0 -24
  114. package/docs-dist/meta__time-picker.b9764392.chunk.css +0 -1
  115. package/docs-dist/meta__trigger.0368918c.async.js +0 -451
  116. package/docs-dist/meta__trigger.b9764392.chunk.css +0 -1
  117. package/docs-dist/meta__virtual-list.71ae35a9.async.js +0 -35
  118. package/docs-dist/meta__virtual-list.b9764392.chunk.css +0 -1
  119. package/docs-dist/meta__water-mark.b9764392.chunk.css +0 -1
  120. package/docs-dist/meta__water-mark.f487e8dd.async.js +0 -15
  121. package/docs-dist/nm__dumi__dist__client__pages__404.8b85f2d9.chunk.css +0 -1
  122. package/docs-dist/nm__dumi__dist__client__pages__404.c319e0a3.async.js +0 -1
  123. package/docs-dist/nm__dumi__dist__client__pages__Demo__index.578aa5c0.chunk.css +0 -1
  124. package/docs-dist/nm__dumi__dist__client__pages__Demo__index.7e033f2b.async.js +0 -1
  125. package/docs-dist/nm__dumi__theme-default__layouts__DocLayout__index.8a08baa2.async.js +0 -1
  126. package/docs-dist/preload_helper.9430b29d.js +0 -1
  127. package/docs-dist/pro-grid__demos.81d67052.async.js +0 -1
  128. package/docs-dist/pro-grid__index.md.33be0665.chunk.css +0 -1
  129. package/docs-dist/pro-grid__index.md.a6b9c956.async.js +0 -1
  130. package/docs-dist/pro-table__demos.254e5b3a.async.js +0 -1
  131. package/docs-dist/pro-table__index.md.33be0665.chunk.css +0 -1
  132. package/docs-dist/pro-table__index.md.607fa3d4.async.js +0 -1
  133. package/docs-dist/pro-tabs__demos.2f05143c.async.js +0 -1
  134. package/docs-dist/pro-tabs__index.md.33be0665.chunk.css +0 -1
  135. package/docs-dist/pro-tabs__index.md.61a7d2c1.async.js +0 -1
  136. package/docs-dist/result__demos.689a5a17.async.js +0 -1
  137. package/docs-dist/result__index.md.33be0665.chunk.css +0 -1
  138. package/docs-dist/result__index.md.7cac7890.async.js +0 -1
  139. package/docs-dist/select__demos.c77af292.async.js +0 -1
  140. package/docs-dist/select__index.md.33be0665.chunk.css +0 -1
  141. package/docs-dist/select__index.md.f818a939.async.js +0 -2
  142. package/docs-dist/time-picker__demos.48d5025e.async.js +0 -1
  143. package/docs-dist/time-picker__index.md.25b2d39e.async.js +0 -1
  144. package/docs-dist/time-picker__index.md.33be0665.chunk.css +0 -1
  145. package/docs-dist/trigger__demos.2f9bf9f4.async.js +0 -1
  146. package/docs-dist/trigger__index.md.33be0665.chunk.css +0 -1
  147. package/docs-dist/trigger__index.md.7e0b7729.async.js +0 -1
  148. package/docs-dist/umi.52ae6580.js +0 -110
  149. package/docs-dist/umi.8c46519e.css +0 -1
  150. package/docs-dist/utils/index.html +0 -15
  151. package/docs-dist/virtual-list__demos.b1f5e707.async.js +0 -1
  152. package/docs-dist/virtual-list__index.md.33be0665.chunk.css +0 -1
  153. package/docs-dist/virtual-list__index.md.47c7bdca.async.js +0 -1
  154. package/docs-dist/water-mark__demos.f7bcee8a.async.js +0 -1
  155. package/docs-dist/water-mark__index.md.33be0665.chunk.css +0 -1
  156. package/docs-dist/water-mark__index.md.e5555c25.async.js +0 -1
  157. package/docs-dist/~demos/:id/index.html +0 -15
  158. package/docs-dist/~demos/auth-demo-basic/index.html +0 -15
  159. package/docs-dist/~demos/button-demo-button/index.html +0 -15
  160. package/docs-dist/~demos/button-demo-group/index.html +0 -15
  161. package/docs-dist/~demos/cascader-demo-basic/index.html +0 -15
  162. package/docs-dist/~demos/cascader-demo-cache/index.html +0 -15
  163. package/docs-dist/~demos/date-picker-demo-basic/index.html +0 -15
  164. package/docs-dist/~demos/date-picker-demo-range/index.html +0 -15
  165. package/docs-dist/~demos/dialog-demo-demos/index.html +0 -15
  166. package/docs-dist/~demos/editor-demo-demos/index.html +0 -15
  167. package/docs-dist/~demos/group-form-item-demo-basic/index.html +0 -15
  168. package/docs-dist/~demos/interval-button-demo-basic/index.html +0 -15
  169. package/docs-dist/~demos/layout-keep-alive-demo-basic/index.html +0 -15
  170. package/docs-dist/~demos/loading-demo-basic/index.html +0 -15
  171. package/docs-dist/~demos/pro-grid-demo-basic/index.html +0 -15
  172. package/docs-dist/~demos/pro-table-demo-basic/index.html +0 -15
  173. package/docs-dist/~demos/pro-table-demo-fixed/index.html +0 -15
  174. package/docs-dist/~demos/pro-table-demo-selection/index.html +0 -15
  175. package/docs-dist/~demos/pro-tabs-demo-basic/index.html +0 -15
  176. package/docs-dist/~demos/pro-tabs-demo-tab/index.html +0 -15
  177. package/docs-dist/~demos/result-demo-basic/index.html +0 -15
  178. package/docs-dist/~demos/select-demo-api/index.html +0 -15
  179. package/docs-dist/~demos/select-demo-basic/index.html +0 -15
  180. package/docs-dist/~demos/select-demo-customize/index.html +0 -15
  181. package/docs-dist/~demos/select-demo-customize-label/index.html +0 -15
  182. package/docs-dist/~demos/time-picker-demo-basic/index.html +0 -15
  183. package/docs-dist/~demos/trigger-demo-basic/index.html +0 -15
  184. package/docs-dist/~demos/virtual-list-demo-basic/index.html +0 -15
  185. package/docs-dist/~demos/water-mark-demo-basic/index.html +0 -15
  186. package/es/aj-captcha/index.d.ts +0 -34
  187. package/es/aj-captcha/index.js +0 -302
  188. package/es/aj-captcha/index.less +0 -89
  189. package/es/auth/index.d.ts +0 -22
  190. package/es/auth/index.js +0 -52
  191. package/es/breadcrumb.d.ts +0 -8
  192. package/es/breadcrumb.js +0 -40
  193. package/es/button/dropdown.d.ts +0 -6
  194. package/es/button/dropdown.js +0 -72
  195. package/es/button/group.d.ts +0 -2
  196. package/es/button/group.js +0 -176
  197. package/es/button/index.d.ts +0 -65
  198. package/es/button/index.js +0 -133
  199. package/es/cascader/index.d.ts +0 -33
  200. package/es/cascader/index.js +0 -120
  201. package/es/ccs.d.ts +0 -131
  202. package/es/ccs.js +0 -1
  203. package/es/color-picker/index.d.ts +0 -7
  204. package/es/color-picker/index.js +0 -142
  205. package/es/color-picker/index.less +0 -8
  206. package/es/config.d.ts +0 -6
  207. package/es/config.js +0 -126
  208. package/es/context/index.d.ts +0 -115
  209. package/es/context/index.js +0 -6
  210. package/es/date-picker/index.d.ts +0 -19
  211. package/es/date-picker/index.js +0 -72
  212. package/es/dialog/HookDrawer.d.ts +0 -9
  213. package/es/dialog/HookDrawer.js +0 -156
  214. package/es/dialog/HookModal.d.ts +0 -10
  215. package/es/dialog/HookModal.js +0 -213
  216. package/es/dialog/button.d.ts +0 -24
  217. package/es/dialog/button.js +0 -256
  218. package/es/dialog/context.d.ts +0 -25
  219. package/es/dialog/context.js +0 -13
  220. package/es/dialog/drawer-footer.d.ts +0 -16
  221. package/es/dialog/drawer-footer.js +0 -43
  222. package/es/dialog/form.d.ts +0 -16
  223. package/es/dialog/form.js +0 -53
  224. package/es/dialog/hook.d.ts +0 -80
  225. package/es/dialog/hook.js +0 -234
  226. package/es/dialog/index.d.ts +0 -19
  227. package/es/dialog/index.js +0 -14
  228. package/es/dialog/usePatchElement.d.ts +0 -5
  229. package/es/dialog/usePatchElement.js +0 -35
  230. package/es/editor/index.d.ts +0 -22
  231. package/es/editor/index.js +0 -18
  232. package/es/editor/index.less +0 -19
  233. package/es/editor/javascript.d.ts +0 -2
  234. package/es/editor/javascript.js +0 -56
  235. package/es/editor/json.d.ts +0 -7
  236. package/es/editor/json.js +0 -82
  237. package/es/editor/sql.d.ts +0 -2
  238. package/es/editor/sql.js +0 -54
  239. package/es/ellipsis/index.d.ts +0 -22
  240. package/es/ellipsis/index.js +0 -129
  241. package/es/ellipsis/index.less +0 -5
  242. package/es/ellipsis/useMeasure.d.ts +0 -9
  243. package/es/ellipsis/useMeasure.js +0 -142
  244. package/es/ellipsis/useResizeEffect.d.ts +0 -2
  245. package/es/ellipsis/useResizeEffect.js +0 -14
  246. package/es/ellipsis/withStopPropagation.d.ts +0 -4
  247. package/es/ellipsis/withStopPropagation.js +0 -38
  248. package/es/full-screen/index.d.ts +0 -3
  249. package/es/full-screen/index.js +0 -49
  250. package/es/group-form-item/index.d.ts +0 -11
  251. package/es/group-form-item/index.js +0 -124
  252. package/es/hooks/use-app.d.ts +0 -25
  253. package/es/hooks/use-app.js +0 -52
  254. package/es/hooks/use-event.d.ts +0 -10
  255. package/es/hooks/use-event.js +0 -69
  256. package/es/hooks/use-once-event.d.ts +0 -2
  257. package/es/hooks/use-once-event.js +0 -16
  258. package/es/hooks/use-page.d.ts +0 -10
  259. package/es/hooks/use-page.js +0 -10
  260. package/es/hooks/use-selection.d.ts +0 -17
  261. package/es/hooks/use-selection.js +0 -172
  262. package/es/hooks/use-tabs.d.ts +0 -2
  263. package/es/hooks/use-tabs.js +0 -10
  264. package/es/hooks/use-window.d.ts +0 -8
  265. package/es/hooks/use-window.js +0 -15
  266. package/es/index.d.ts +0 -37
  267. package/es/index.js +0 -37
  268. package/es/interval-button/index.d.ts +0 -14
  269. package/es/interval-button/index.js +0 -128
  270. package/es/layout-keep-alive/index.d.ts +0 -29
  271. package/es/layout-keep-alive/index.js +0 -400
  272. package/es/layout-keep-alive/index.less +0 -79
  273. package/es/layout-keep-alive/page.d.ts +0 -14
  274. package/es/layout-keep-alive/page.js +0 -53
  275. package/es/layout-single-page/index.d.ts +0 -14
  276. package/es/layout-single-page/index.js +0 -71
  277. package/es/layout-single-page/index.less +0 -15
  278. package/es/layout-single-page/page.d.ts +0 -13
  279. package/es/layout-single-page/page.js +0 -41
  280. package/es/loading/index.d.ts +0 -14
  281. package/es/loading/index.js +0 -43
  282. package/es/pro-grid/index.d.ts +0 -15
  283. package/es/pro-grid/index.js +0 -58
  284. package/es/pro-table/_utils.d.ts +0 -12
  285. package/es/pro-table/_utils.js +0 -94
  286. package/es/pro-table/form-item.d.ts +0 -9
  287. package/es/pro-table/form-item.js +0 -44
  288. package/es/pro-table/head.d.ts +0 -16
  289. package/es/pro-table/head.js +0 -225
  290. package/es/pro-table/index.d.ts +0 -23
  291. package/es/pro-table/index.js +0 -37
  292. package/es/pro-table/index.less +0 -82
  293. package/es/pro-table/operation.d.ts +0 -14
  294. package/es/pro-table/operation.js +0 -194
  295. package/es/pro-table/selection-alert.d.ts +0 -20
  296. package/es/pro-table/selection-alert.js +0 -64
  297. package/es/pro-table/size.d.ts +0 -10
  298. package/es/pro-table/size.js +0 -17
  299. package/es/pro-table/summary.d.ts +0 -8
  300. package/es/pro-table/summary.js +0 -32
  301. package/es/pro-table/table.d.ts +0 -104
  302. package/es/pro-table/table.js +0 -712
  303. package/es/pro-table/tree.d.ts +0 -24
  304. package/es/pro-table/tree.js +0 -197
  305. package/es/pro-tabs/index.d.ts +0 -9
  306. package/es/pro-tabs/index.js +0 -174
  307. package/es/resize-observer.d.ts +0 -15
  308. package/es/resize-observer.js +0 -37
  309. package/es/result/icon.d.ts +0 -3
  310. package/es/result/icon.js +0 -3
  311. package/es/result/index.d.ts +0 -12
  312. package/es/result/index.js +0 -68
  313. package/es/select/ modal.d.ts +0 -10
  314. package/es/select/ modal.js +0 -141
  315. package/es/select/api.d.ts +0 -25
  316. package/es/select/api.js +0 -67
  317. package/es/select/customize.d.ts +0 -25
  318. package/es/select/customize.js +0 -139
  319. package/es/select/index.d.ts +0 -31
  320. package/es/select/index.js +0 -108
  321. package/es/status-tag/index.d.ts +0 -13
  322. package/es/status-tag/index.js +0 -31
  323. package/es/table/index.d.ts +0 -19
  324. package/es/table/index.js +0 -253
  325. package/es/table/index.less +0 -29
  326. package/es/theme-dialog.d.ts +0 -28
  327. package/es/theme-dialog.js +0 -81
  328. package/es/time-picker/index.d.ts +0 -15
  329. package/es/time-picker/index.js +0 -49
  330. package/es/trigger/index.d.ts +0 -43
  331. package/es/trigger/index.js +0 -298
  332. package/es/trigger/index.less +0 -42
  333. package/es/types.d.ts +0 -0
  334. package/es/types.js +0 -0
  335. package/es/upload/index.d.ts +0 -42
  336. package/es/upload/index.js +0 -167
  337. package/es/upload/upload-image.d.ts +0 -6
  338. package/es/upload/upload-image.js +0 -205
  339. package/es/virtual-list/index.d.ts +0 -51
  340. package/es/virtual-list/index.js +0 -132
  341. package/es/water-mark/index.d.ts +0 -65
  342. package/es/water-mark/index.js +0 -141
  343. package/es/water-mark/relative.d.ts +0 -62
  344. package/es/water-mark/relative.js +0 -130
@@ -1,31 +0,0 @@
1
- import { SelectProps } from 'antd';
2
- import { NamePath } from 'antd/es/form/interface';
3
- import ModalSelect from './ modal';
4
- import ApiSelect from './api';
5
- import CustomizeSelect from './customize';
6
- export declare function getDataByNamePath(data: Record<string, any>, name: NamePath): any;
7
- export interface CcsSelectProps extends Omit<SelectProps, 'fieldNames'> {
8
- /** 配置全部选项 */
9
- showAll?: boolean | {
10
- label: string;
11
- value: any;
12
- };
13
- /** 接口数据字段 */
14
- fieldNames?: {
15
- label?: string[] | string;
16
- value?: string[] | string;
17
- };
18
- }
19
- /**
20
- * select 组件扩展
21
- * @param CcsSelectProps
22
- * @returns
23
- */
24
- declare function InternalSelect({ showAll, fieldNames, options, ...props }: CcsSelectProps): import("react/jsx-runtime").JSX.Element;
25
- declare namespace InternalSelect {
26
- var displayName: string;
27
- var Api: typeof ApiSelect;
28
- var Customize: typeof CustomizeSelect;
29
- var Modal: typeof ModalSelect;
30
- }
31
- export default InternalSelect;
@@ -1,108 +0,0 @@
1
- var _excluded = ["showAll", "fieldNames", "options"];
2
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
- 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; }
8
- 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; }
9
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
10
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
11
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
12
- 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); }
13
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
14
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
15
- 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; }
16
- import { Select } from 'antd';
17
- import { useMemo } from 'react';
18
- import pinyin from 'tiny-pinyin';
19
- import ModalSelect from "./ modal";
20
- import ApiSelect from "./api";
21
- import CustomizeSelect from "./customize";
22
- import { jsx as _jsx } from "react/jsx-runtime";
23
- export function getDataByNamePath(data, name) {
24
- if (!data || !name) return;
25
- if (typeof name === 'string') {
26
- return data[name];
27
- }
28
- var newFields = _toConsumableArray(name);
29
- var field = newFields.shift();
30
- var newData = data[field];
31
- if (_typeof(newData) === 'object' && newFields.length > 0) {
32
- return getDataByNamePath(newData, newFields);
33
- }
34
- return newData;
35
- }
36
- function onIsArray(data) {
37
- if (Array.isArray(data)) return data;
38
- return [data];
39
- }
40
- /**
41
- * select 组件扩展
42
- * @param CcsSelectProps
43
- * @returns
44
- */
45
- function InternalSelect(_ref) {
46
- var showAll = _ref.showAll,
47
- fieldNames = _ref.fieldNames,
48
- _ref$options = _ref.options,
49
- options = _ref$options === void 0 ? [] : _ref$options,
50
- props = _objectWithoutProperties(_ref, _excluded);
51
- var labelField = _toConsumableArray(onIsArray((fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.label) || ['label']));
52
- var valueField = _toConsumableArray(onIsArray((fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.value) || ['value']));
53
-
54
- // 搜索,中文转英文搜索
55
- var onFilterOption = function onFilterOption(input, option) {
56
- var str = "".concat(option === null || option === void 0 ? void 0 : option.label).concat(option === null || option === void 0 ? void 0 : option.value);
57
- var strPin = pinyin.convertToPinyin(str, '', true).toLocaleUpperCase();
58
- if (str.includes(input) || strPin.includes(input.toLocaleUpperCase())) {
59
- return true;
60
- }
61
- return false;
62
- };
63
-
64
- // 选项
65
- var selectOptions = useMemo(function () {
66
- var ops = options || [];
67
- while (labelField.length > 0 || valueField.length > 0) {
68
- if (Array.isArray(ops)) {
69
- ops.forEach(function (r) {
70
- r.label = getDataByNamePath(r, labelField);
71
- r.value = getDataByNamePath(r, valueField);
72
- });
73
- break;
74
- }
75
- labelField.shift();
76
- var value = valueField.shift();
77
- if (value) {
78
- ops = ops[value];
79
- }
80
- }
81
-
82
- // 添加全部选中
83
- if (showAll && Array.isArray(ops) && ops.length > 0) {
84
- ops.unshift(typeof showAll === 'boolean' ? {
85
- label: '全部',
86
- value: ''
87
- } : showAll);
88
- }
89
- return ops;
90
- }, [options]);
91
- return /*#__PURE__*/_jsx(Select, _objectSpread({
92
- options: selectOptions,
93
- filterOption: onFilterOption,
94
- placeholder: "\u8BF7\u9009\u62E9",
95
- allowClear: true,
96
- showSearch: true
97
- }, props));
98
- }
99
- if (process.env.NODE_ENV !== 'production') {
100
- InternalSelect.displayName = 'CcsSelect';
101
- }
102
- InternalSelect.Api = ApiSelect;
103
- InternalSelect.Customize = CustomizeSelect;
104
- InternalSelect.Modal = ModalSelect;
105
- if (process.env.NODE_ENV !== 'production') {
106
- InternalSelect.displayName = 'CcsSelect';
107
- }
108
- export default InternalSelect;
@@ -1,13 +0,0 @@
1
- export type CcsStatusTagProps = {
2
- value: any;
3
- options: {
4
- value: any;
5
- label: string;
6
- tag?: string[];
7
- }[];
8
- };
9
- declare function StatusTag({ value, options }: CcsStatusTagProps): any;
10
- declare namespace StatusTag {
11
- var displayName: string;
12
- }
13
- export default StatusTag;
@@ -1,31 +0,0 @@
1
- import { Badge, Tag } from 'antd';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- function StatusTag(_ref) {
4
- var value = _ref.value,
5
- _ref$options = _ref.options,
6
- options = _ref$options === void 0 ? [] : _ref$options;
7
- if (value === undefined || value === '') return value;
8
- var option = options.find(function (op) {
9
- return op.value === value;
10
- });
11
- if (!option) return value;
12
- var label = option.label,
13
- tag = option.tag;
14
- if (tag && tag[0] === 'tag') {
15
- return /*#__PURE__*/_jsx(Tag, {
16
- color: tag[1],
17
- children: label
18
- });
19
- }
20
- if (tag && tag[0] === 'badge') {
21
- return /*#__PURE__*/_jsx(Badge, {
22
- status: tag[1],
23
- text: label
24
- });
25
- }
26
- return label;
27
- }
28
- if (process.env.NODE_ENV !== 'production') {
29
- StatusTag.displayName = 'CcsStatusTag';
30
- }
31
- export default StatusTag;
@@ -1,19 +0,0 @@
1
- /// <reference types="react" />
2
- import { CcsProTableProps, CcsTableProps } from '../pro-table/table';
3
- import './index.less';
4
- export type CustomTableProps<T> = Omit<CcsTableProps<T>, 'request' | 'title'> & Pick<CcsProTableProps<T>, 'showNumber' | 'onEvent'> & {
5
- title?: any;
6
- tableRef?: React.MutableRefObject<TableRefType | undefined>;
7
- tableContentRef: React.RefObject<HTMLDivElement>;
8
- };
9
- export type TableRefType = {
10
- /** 列筛选 */
11
- onColumnFilter: (e: any) => void;
12
- /** 计算固定表头宽度 */
13
- onFixedThead: () => void;
14
- };
15
- declare const CustomTable: {
16
- <T extends object = any>(props: CustomTableProps<T>): import("react/jsx-runtime").JSX.Element;
17
- displayName: string;
18
- };
19
- export default CustomTable;
package/es/table/index.js DELETED
@@ -1,253 +0,0 @@
1
- var _excluded = ["onResize", "width"],
2
- _excluded2 = ["data", "style", "scroll", "rowKey", "columns", "tableRef", "pagination", "rowSelection", "tableContentRef"];
3
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
8
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
9
- 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; }
10
- 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; }
11
- import { useDebounceFn, useUpdate } from 'ahooks';
12
- import { Table, theme } from 'antd';
13
- import { ConfigContext } from 'antd/es/config-provider';
14
- import { useContext, useEffect, useImperativeHandle } from 'react';
15
- import { Resizable } from 'react-resizable';
16
- import CcsEllipsis2 from "../ellipsis";
17
- import useTabs from "../hooks/use-tabs";
18
- import { TableEvent } from "../pro-table/table";
19
- import "./index.less";
20
- import { jsx as _jsx } from "react/jsx-runtime";
21
- var ResizableTitle = function ResizableTitle(props) {
22
- var onResize = props.onResize,
23
- width = props.width,
24
- restProps = _objectWithoutProperties(props, _excluded);
25
- if (!width || typeof width !== 'number') {
26
- return /*#__PURE__*/_jsx("th", _objectSpread({}, restProps));
27
- }
28
- return /*#__PURE__*/_jsx(Resizable, {
29
- width: width,
30
- height: 0,
31
- handle: /*#__PURE__*/_jsx("span", {
32
- className: "react-resizable-handle",
33
- onClick: function onClick(e) {
34
- e.stopPropagation();
35
- }
36
- }),
37
- onResize: onResize,
38
- draggableOpts: {
39
- enableUserSelectHack: false
40
- },
41
- children: /*#__PURE__*/_jsx("th", _objectSpread({}, restProps))
42
- });
43
- };
44
- var CustomTable = function CustomTable(props) {
45
- var data = props.data,
46
- style = props.style,
47
- scroll = props.scroll,
48
- rowKey = props.rowKey,
49
- columns = props.columns,
50
- tableRef = props.tableRef,
51
- pagination = props.pagination,
52
- rowSelection = props.rowSelection,
53
- tableContentRef = props.tableContentRef,
54
- restProps = _objectWithoutProperties(props, _excluded2);
55
- var update = useUpdate();
56
- var _ref = data || {},
57
- _ref$dataSource = _ref.dataSource,
58
- dataSource = _ref$dataSource === void 0 ? [] : _ref$dataSource,
59
- _ref$pageSize = _ref.pageSize,
60
- pageSize = _ref$pageSize === void 0 ? 10 : _ref$pageSize,
61
- _ref$current = _ref.current,
62
- current = _ref$current === void 0 ? 1 : _ref$current,
63
- _ref$total = _ref.total,
64
- total = _ref$total === void 0 ? 0 : _ref$total;
65
- var inTabs = useTabs();
66
- var config = useContext(ConfigContext);
67
-
68
- // table 固定表头,内容滚动
69
- var _useDebounceFn = useDebounceFn(function () {
70
- var _tableContentRef$curr;
71
- if ((scroll === null || scroll === void 0 ? void 0 : scroll.y) !== 'auto') return;
72
- var tableTarget = tableContentRef === null || tableContentRef === void 0 ? void 0 : tableContentRef.current;
73
-
74
- // 在ccs tabs组件内
75
- if (inTabs !== null && inTabs !== void 0 && inTabs.tabsId) {
76
- var tabsDom = document.getElementById(inTabs === null || inTabs === void 0 ? void 0 : inTabs.tabsId);
77
- if (tabsDom) {
78
- tabsDom.classList.add('ccs-tabs-auto-height');
79
- }
80
- }
81
- if (!tableTarget) return;
82
-
83
- // 容器最大高度
84
- var maxHeight = (_tableContentRef$curr = tableContentRef.current) === null || _tableContentRef$curr === void 0 ? void 0 : _tableContentRef$curr.clientHeight;
85
- var prefixCls = config.getPrefixCls();
86
-
87
- // 计算所有dom高度
88
- var tableEle = tableTarget.getElementsByClassName("".concat(prefixCls, "-table"))[0];
89
- var childHeights = [];
90
- var antTablebody = undefined;
91
- tableEle.childNodes.forEach(function (e) {
92
- if (e.classList.contains("".concat(prefixCls, "-table-container"))) {
93
- e.childNodes.forEach(function (node) {
94
- if (node.classList.contains("".concat(prefixCls, "-table-body"))) {
95
- antTablebody = node;
96
- } else {
97
- childHeights.push(node.clientHeight || 0);
98
- }
99
- });
100
- } else {
101
- childHeights.push(e.clientHeight || 0);
102
- }
103
- });
104
-
105
- // 分页高度
106
- var pagination = tableTarget.getElementsByClassName("".concat(prefixCls, "-pagination"));
107
- if (pagination && pagination.length > 0) {
108
- childHeights.push(pagination[0].clientHeight);
109
- }
110
-
111
- // 计算body滚动高度
112
- if (antTablebody) {
113
- var scrollHeight = maxHeight - childHeights.reduce(function (c, s) {
114
- return c + s;
115
- }, 0);
116
- antTablebody.style.height = "".concat(scrollHeight, "px");
117
- }
118
- }, {
119
- wait: 500,
120
- leading: true
121
- }),
122
- onFixedThead = _useDebounceFn.run;
123
- useEffect(function () {
124
- onFixedThead();
125
- }, [total]);
126
-
127
- // 监听列筛选事件
128
- useImperativeHandle(tableRef, function () {
129
- return {
130
- onColumnFilter: function onColumnFilter(e) {
131
- var _props$onEvent;
132
- columns === null || columns === void 0 || columns.forEach(function (c) {
133
- c.hidden = e.columnHiddenKeys.includes(c.dataIndex);
134
- });
135
- (_props$onEvent = props.onEvent) === null || _props$onEvent === void 0 || _props$onEvent.call(props, TableEvent.ColumnFilter, e);
136
- update();
137
- },
138
- onFixedThead: onFixedThead
139
- };
140
- });
141
-
142
- // 改变列宽
143
- var onResize = function onResize(dataIndex) {
144
- return function (_, _ref2) {
145
- var size = _ref2.size;
146
- var column = columns === null || columns === void 0 ? void 0 : columns.find(function (c) {
147
- return c.dataIndex === dataIndex;
148
- });
149
- column.width = size.width;
150
- update();
151
- };
152
- };
153
-
154
- // 列过滤
155
- var filterColumns = function filterColumns() {
156
- var cls = columns === null || columns === void 0 ? void 0 : columns.filter(function (t) {
157
- return !t.hidden;
158
- });
159
- cls === null || cls === void 0 || cls.forEach(function (c) {
160
- if (c.ellipsis && !c.render) {
161
- var ellipsisProps = {};
162
- if (typeof c.ellipsis === 'number') {
163
- ellipsisProps = {
164
- rows: c.ellipsis
165
- };
166
- }
167
- if (typeof c.ellipsis === 'boolean') ellipsisProps = {
168
- rows: 1
169
- };
170
- if (_typeof(c.ellipsis) === 'object') ellipsisProps = c.ellipsis;
171
-
172
- // 禁用默认 ellipsis
173
- c.ellipsis = false;
174
- // 渲染内容
175
- c.render = function (e) {
176
- return /*#__PURE__*/_jsx(CcsEllipsis2, _objectSpread({
177
- content: e,
178
- showTooltip: true
179
- }, ellipsisProps));
180
- };
181
- }
182
- // 拖拽头部改变列宽响应
183
- c.onHeaderCell = function (column) {
184
- return {
185
- width: column.width,
186
- onResize: onResize(c.dataIndex)
187
- };
188
- };
189
- });
190
- if (restProps.showNumber) {
191
- cls === null || cls === void 0 || cls.unshift({
192
- title: '序号',
193
- ellipsis: true,
194
- width: 60,
195
- render: function render(_value, _record, index) {
196
- return index + 1 + ((current || 1) - 1) * (pageSize || 10);
197
- }
198
- });
199
- }
200
- return cls;
201
- };
202
- var _theme$useToken = theme.useToken(),
203
- token = _theme$useToken.token;
204
- var tableRowKey = function tableRowKey(_, index) {
205
- return index || 0;
206
- };
207
- var showColumns = filterColumns();
208
- return /*#__PURE__*/_jsx("div", {
209
- className: "ccs-table-card",
210
- style: _objectSpread(_objectSpread({}, style), {}, {
211
- background: token.colorBgContainer
212
- }),
213
- children: /*#__PURE__*/_jsx(Table, _objectSpread(_objectSpread({
214
- rowKey: rowKey || tableRowKey,
215
- dataSource: dataSource,
216
- sortDirections: ['ascend', 'descend'],
217
- pagination: pagination === false ? false : _objectSpread({
218
- total: total,
219
- pageSize: pageSize,
220
- current: current,
221
- showSizeChanger: true,
222
- showQuickJumper: true,
223
- showTotal: function showTotal() {
224
- return "\u5171".concat(total, "\u6761\u8BB0\u5F55");
225
- },
226
- pageSizeOptions: ['10', '20', '30', '50', '100'],
227
- size: restProps.size === 'small' ? 'small' : 'default',
228
- simple: restProps.size === 'small',
229
- className: 'ccs-table-pagination'
230
- }, pagination),
231
- rowSelection: rowSelection ? _objectSpread(_objectSpread({}, rowSelection), {}, {
232
- columnWidth: 60
233
- }) : undefined,
234
- columns: showColumns,
235
- components: {
236
- header: {
237
- cell: ResizableTitle
238
- }
239
- }
240
- }, restProps), {}, {
241
- size: restProps.size || 'middle',
242
- scroll: scroll,
243
- summary: restProps !== null && restProps !== void 0 && restProps.summary ? function (e) {
244
- var _restProps$summary;
245
- return (_restProps$summary = restProps.summary) === null || _restProps$summary === void 0 ? void 0 : _restProps$summary.call(restProps, e, showColumns || []);
246
- } : undefined
247
- }))
248
- });
249
- };
250
- if (process.env.NODE_ENV !== 'production') {
251
- CustomTable.displayName = 'CcsTable';
252
- }
253
- export default CustomTable;
@@ -1,29 +0,0 @@
1
- .ccs-table {
2
- &-card {
3
- .react-resizable {
4
- position: relative;
5
- background-clip: padding-box;
6
- }
7
-
8
- .react-resizable-handle {
9
- position: absolute;
10
- right: -5px;
11
- bottom: 0;
12
- z-index: 1;
13
- width: 15px;
14
- height: 100%;
15
- cursor: col-resize;
16
- }
17
- }
18
- }
19
-
20
- .ccs-tabs-auto-height {
21
- flex: 1 1 auto;
22
- overflow: hidden;
23
- }
24
-
25
- .ccs-table-ellipsis {
26
- overflow: hidden;
27
- text-overflow: ellipsis;
28
- white-space: nowrap;
29
- }
@@ -1,28 +0,0 @@
1
- import { MessageInstance } from 'antd/es/message/interface';
2
- import { HookAPI } from 'antd/es/modal/useModal';
3
- import { NotificationInstance } from 'antd/es/notification/interface';
4
- export default class ThemeDialog {
5
- static message: MessageInstance;
6
- static notice: NotificationInstance;
7
- static modal: HookAPI;
8
- static setConfig(message: MessageInstance, notice: NotificationInstance, modal: HookAPI): void;
9
- /**
10
- * 接口结果反馈
11
- * @param result // 结果
12
- * @param successText // 成功提示
13
- * @param failText // 失败提示
14
- */
15
- static easyMessage(result?: {
16
- /** 成功标识 */
17
- success?: boolean;
18
- /** 失败信息 */
19
- msg?: string;
20
- }, successText?: string, failText?: string): void;
21
- static confirm(content?: string): Promise<boolean>;
22
- /**
23
- * 确认提示框
24
- * @param content
25
- * @returns
26
- */
27
- static easyConfirm: typeof this.confirm;
28
- }
@@ -1,81 +0,0 @@
1
- var _class;
2
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
3
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4
- 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, _toPropertyKey(descriptor.key), descriptor); } }
5
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
6
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
8
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
9
- import { message, Modal } from 'antd';
10
- import _debounce from 'lodash.debounce';
11
- var ThemeDialog = /*#__PURE__*/function () {
12
- function ThemeDialog() {
13
- _classCallCheck(this, ThemeDialog);
14
- }
15
- _createClass(ThemeDialog, null, [{
16
- key: "setConfig",
17
- value: function setConfig(message, notice, modal) {
18
- this.message = message;
19
- this.notice = notice;
20
- this.modal = modal;
21
- }
22
-
23
- /**
24
- * 接口结果反馈
25
- * @param result // 结果
26
- * @param successText // 成功提示
27
- * @param failText // 失败提示
28
- */
29
- }, {
30
- key: "easyMessage",
31
- value: function easyMessage(result, successText, failText) {
32
- var _this$message;
33
- var msg = (_this$message = this.message) !== null && _this$message !== void 0 ? _this$message : message;
34
- if (result !== null && result !== void 0 && result.success) {
35
- msg.success(successText || '操作成功');
36
- } else {
37
- msg.error(failText || (result === null || result === void 0 ? void 0 : result.msg) || '操作失败');
38
- }
39
- }
40
- }, {
41
- key: "confirm",
42
- value: function confirm() {
43
- var _this = this;
44
- var content = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
45
- return new Promise(function (resolve) {
46
- var _this$modal;
47
- var mod = (_this$modal = _this.modal) !== null && _this$modal !== void 0 ? _this$modal : Modal;
48
- mod.confirm({
49
- title: '操作确认',
50
- content: content,
51
- okText: '确定',
52
- okType: 'danger',
53
- cancelText: '取消',
54
- centered: true,
55
- onOk: function onOk() {
56
- resolve(true);
57
- },
58
- onCancel: function onCancel() {
59
- resolve(false);
60
- }
61
- });
62
- });
63
- }
64
-
65
- /**
66
- * 确认提示框
67
- * @param content
68
- * @returns
69
- */
70
- }]);
71
- return ThemeDialog;
72
- }();
73
- _class = ThemeDialog;
74
- _defineProperty(ThemeDialog, "message", void 0);
75
- _defineProperty(ThemeDialog, "notice", void 0);
76
- _defineProperty(ThemeDialog, "modal", void 0);
77
- _defineProperty(ThemeDialog, "easyConfirm", _debounce(_class.confirm, 500, {
78
- leading: true,
79
- trailing: false
80
- }));
81
- export { ThemeDialog as default };
@@ -1,15 +0,0 @@
1
- import { TimePickerProps } from 'antd';
2
- import { RangePickerProps } from 'antd/es/date-picker';
3
- type CcsTimePickerProps = {
4
- value?: string;
5
- onChange?: (e: string) => void;
6
- } & Omit<TimePickerProps, 'value' | 'onChange'>;
7
- type CcsRangePickerProps = {
8
- value?: [string, string];
9
- onChange?: (e: [string, string]) => void;
10
- } & Omit<RangePickerProps, 'value' | 'onChange' | 'picker'>;
11
- declare function CcsDatePicker({ value, onChange, ...restProps }: CcsTimePickerProps): import("react/jsx-runtime").JSX.Element;
12
- declare namespace CcsDatePicker {
13
- var RangePicker: ({ value, onChange, ...restProps }: CcsRangePickerProps) => import("react/jsx-runtime").JSX.Element;
14
- }
15
- export default CcsDatePicker;
@@ -1,49 +0,0 @@
1
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
- var _excluded = ["value", "onChange"],
3
- _excluded2 = ["value", "onChange"];
4
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
8
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
9
- 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; }
10
- 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; }
11
- import { TimePicker } from 'antd';
12
- import dayjs from 'dayjs';
13
- import customParseFormat from 'dayjs/plugin/customParseFormat';
14
- import _isArray from 'lodash.isarray';
15
- import { jsx as _jsx } from "react/jsx-runtime";
16
- dayjs.extend(customParseFormat);
17
- function CcsDatePicker(_ref) {
18
- var value = _ref.value,
19
- onChange = _ref.onChange,
20
- restProps = _objectWithoutProperties(_ref, _excluded);
21
- var handleOnChange = function handleOnChange(_, dateString) {
22
- if (onChange) onChange(dateString);
23
- };
24
- var dateValue = typeof value === 'string' ? dayjs(value, 'HH:mm:ss') : value;
25
- return /*#__PURE__*/_jsx(TimePicker, _objectSpread({
26
- value: dateValue,
27
- onChange: handleOnChange
28
- }, restProps));
29
- }
30
- function RangePicker(_ref2) {
31
- var value = _ref2.value,
32
- onChange = _ref2.onChange,
33
- restProps = _objectWithoutProperties(_ref2, _excluded2);
34
- var getDateValue = function getDateValue() {
35
- if (_isArray(value)) {
36
- return [dayjs(value[0], 'HH:mm:ss'), dayjs(value[1], 'HH:mm:ss')];
37
- }
38
- return null;
39
- };
40
- var handleOnChange = function handleOnChange(_, dateString) {
41
- if (onChange) onChange(dateString);
42
- };
43
- return /*#__PURE__*/_jsx(TimePicker.RangePicker, _objectSpread({
44
- value: getDateValue(),
45
- onChange: handleOnChange
46
- }, restProps));
47
- }
48
- CcsDatePicker.RangePicker = RangePicker;
49
- export default CcsDatePicker;