@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,129 +0,0 @@
1
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
- 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); }
4
- 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; }
5
- function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
6
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
- import { CopyOutlined } from '@ant-design/icons';
8
- import CcsUtils from '@ccs-ui/utils';
9
- import { Tooltip } from 'antd';
10
- import React from 'react';
11
- import CcsDialog from "../dialog";
12
- import "./index.less";
13
- import useMeasure from "./useMeasure";
14
- import { useResizeEffect } from "./useResizeEffect";
15
- import { withStopPropagation } from "./withStopPropagation";
16
- import { jsx as _jsx } from "react/jsx-runtime";
17
- import { jsxs as _jsxs } from "react/jsx-runtime";
18
- import { Fragment as _Fragment } from "react/jsx-runtime";
19
- var classPrefix = "ccs-ellipsis";
20
- var defaultProps = {
21
- direction: 'end',
22
- rows: 1,
23
- expandText: '',
24
- content: '',
25
- collapseText: '',
26
- stopPropagationForActionButtons: [],
27
- onContentClick: function onContentClick() {},
28
- defaultExpanded: false,
29
- showTooltip: false
30
- };
31
-
32
- /**
33
- * 文本缩略
34
- * @param EllipsisProps
35
- * @returns
36
- */
37
- var Ellipsis = function Ellipsis(p) {
38
- var props = CcsUtils.mergeProps(defaultProps, p);
39
- var direction = props.direction,
40
- rows = props.rows,
41
- expandText = props.expandText,
42
- collapseText = props.collapseText,
43
- stopPropagationForActionButtons = props.stopPropagationForActionButtons,
44
- onContentClick = props.onContentClick,
45
- defaultExpanded = props.defaultExpanded,
46
- showTooltip = props.showTooltip;
47
- var content = props.content === null ? '' : props.content.toString();
48
-
49
- // ============================ Refs ============================
50
- var rootRef = React.useRef(null);
51
-
52
- // ========================== Expanded ==========================
53
- var _React$useState = React.useState(defaultExpanded),
54
- _React$useState2 = _slicedToArray(_React$useState, 2),
55
- expanded = _React$useState2[0],
56
- setExpanded = _React$useState2[1];
57
- var expandNode = expandText ? withStopPropagation(stopPropagationForActionButtons, /*#__PURE__*/_jsx("a", {
58
- onClick: function onClick() {
59
- setExpanded(true);
60
- },
61
- children: expandText
62
- })) : null;
63
- var collapseNode = collapseText ? withStopPropagation(stopPropagationForActionButtons, /*#__PURE__*/_jsx("a", {
64
- onClick: function onClick() {
65
- setExpanded(false);
66
- },
67
- children: collapseText
68
- })) : null;
69
-
70
- // ========================== Ellipsis ==========================
71
- var _useMeasure = useMeasure(content, rows, direction, expanded, expandNode, collapseNode),
72
- _useMeasure2 = _slicedToArray(_useMeasure, 3),
73
- measureNodes = _useMeasure2[0],
74
- status = _useMeasure2[1],
75
- forceResize = _useMeasure2[2];
76
- useResizeEffect(forceResize, rootRef);
77
-
78
- // =========================== Render ===========================
79
- var renderNode = /*#__PURE__*/_jsx("div", {
80
- ref: rootRef,
81
- className: classPrefix,
82
- onClick: function onClick(e) {
83
- if (e.target === e.currentTarget) {
84
- onContentClick(e);
85
- }
86
- },
87
- children: measureNodes
88
- });
89
- if (status === 100 || !showTooltip) {
90
- return renderNode;
91
- }
92
- if (showTooltip) {
93
- return /*#__PURE__*/_jsx(Tooltip, {
94
- zIndex: 9999,
95
- title: function title() {
96
- return /*#__PURE__*/_jsxs(_Fragment, {
97
- children: [content, /*#__PURE__*/_jsxs("a", {
98
- style: {
99
- color: 'gray',
100
- display: 'block'
101
- },
102
- onClick: function onClick() {
103
- var _CcsDialog$message;
104
- CcsUtils.copy(content);
105
- (_CcsDialog$message = CcsDialog.message) === null || _CcsDialog$message === void 0 || _CcsDialog$message.info('复制成功');
106
- },
107
- children: [/*#__PURE__*/_jsx(CopyOutlined, {
108
- style: {
109
- marginRight: 5
110
- }
111
- }), "\u590D\u5236"]
112
- })]
113
- });
114
- },
115
- placement: "bottomLeft",
116
- destroyTooltipOnHide: true,
117
- styles: {
118
- body: {
119
- whiteSpace: 'normal'
120
- }
121
- },
122
- children: renderNode
123
- });
124
- }
125
- };
126
- if (process.env.NODE_ENV !== 'production') {
127
- Ellipsis.displayName = 'CcsEllipsis';
128
- }
129
- export default Ellipsis;
@@ -1,5 +0,0 @@
1
- .ccs-ellipsis {
2
- overflow: hidden;
3
- line-height: 1.5;
4
- word-break: break-word;
5
- }
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- declare const enum MEASURE_STATUS {
3
- PREPARE = 1,
4
- MEASURE_WALKING = 2,
5
- STABLE_ELLIPSIS = 99,
6
- STABLE_NO_ELLIPSIS = 100
7
- }
8
- export default function useMeasure(content: string, rows: number, direction: 'start' | 'end' | 'middle', expanded: boolean, expandNode: React.ReactElement | null, collapseNode: React.ReactElement | null): readonly [import("react/jsx-runtime").JSX.Element, MEASURE_STATUS, () => void];
9
- export {};
@@ -1,142 +0,0 @@
1
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
- 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); }
4
- 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; }
5
- function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
6
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
- import { useEvent } from 'rc-util';
8
- import React from 'react';
9
- import { unstable_batchedUpdates } from 'react-dom';
10
- import runes from 'runes2';
11
- import { Fragment as _Fragment } from "react/jsx-runtime";
12
- import { jsxs as _jsxs } from "react/jsx-runtime";
13
- import { jsx as _jsx } from "react/jsx-runtime";
14
- var ELLIPSIS_TEXT = '...';
15
- var measureStyle = {
16
- visibility: 'hidden',
17
- whiteSpace: 'inherit',
18
- lineHeight: 'inherit',
19
- fontSize: 'inherit'
20
- };
21
- export default function useMeasure(content, rows, direction, expanded, expandNode, collapseNode) {
22
- var contentChars = React.useMemo(function () {
23
- return runes(content);
24
- }, [content]);
25
- var _React$useState = React.useState(0),
26
- _React$useState2 = _slicedToArray(_React$useState, 2),
27
- maxHeight = _React$useState2[0],
28
- setMaxHeight = _React$useState2[1];
29
- var _React$useState3 = React.useState([0, 0]),
30
- _React$useState4 = _slicedToArray(_React$useState3, 2),
31
- walkingIndexes = _React$useState4[0],
32
- setWalkingIndexes = _React$useState4[1];
33
- var midIndex = Math.ceil((walkingIndexes[0] + walkingIndexes[1]) / 2);
34
- var _React$useState5 = React.useState(100),
35
- _React$useState6 = _slicedToArray(_React$useState5, 2),
36
- status = _React$useState6[0],
37
- setStatus = _React$useState6[1];
38
-
39
- // ============================ Refs ============================
40
- var singleRowMeasureRef = React.useRef(null);
41
- var fullMeasureRef = React.useRef(null);
42
- var midMeasureRef = React.useRef(null);
43
- var startMeasure = useEvent(function () {
44
- // use batch update to avoid async update trigger 2 render
45
- unstable_batchedUpdates(function () {
46
- setStatus(1);
47
- setWalkingIndexes([0, direction === 'middle' ? Math.ceil(contentChars.length / 2) : contentChars.length]);
48
- });
49
- });
50
-
51
- // Initialize
52
- React.useLayoutEffect(function () {
53
- startMeasure();
54
- }, [contentChars, rows]);
55
-
56
- // Measure element height
57
- React.useLayoutEffect(function () {
58
- if (status === 1) {
59
- var _fullMeasureRef$curre, _singleRowMeasureRef$;
60
- var fullMeasureHeight = ((_fullMeasureRef$curre = fullMeasureRef.current) === null || _fullMeasureRef$curre === void 0 ? void 0 : _fullMeasureRef$curre.offsetHeight) || 0;
61
- var singleRowMeasureHeight = ((_singleRowMeasureRef$ = singleRowMeasureRef.current) === null || _singleRowMeasureRef$ === void 0 ? void 0 : _singleRowMeasureRef$.offsetHeight) || 0;
62
- var rowMeasureHeight = singleRowMeasureHeight * (rows + 0.5);
63
- if (fullMeasureHeight <= rowMeasureHeight) {
64
- setStatus(100);
65
- } else {
66
- setMaxHeight(rowMeasureHeight);
67
- setStatus(2);
68
- }
69
- }
70
- }, [status]);
71
-
72
- // Walking measure
73
- React.useLayoutEffect(function () {
74
- if (status === 2) {
75
- var _midMeasureRef$curren;
76
- var diff = walkingIndexes[1] - walkingIndexes[0];
77
- var midHeight = ((_midMeasureRef$curren = midMeasureRef.current) === null || _midMeasureRef$curren === void 0 ? void 0 : _midMeasureRef$curren.offsetHeight) || 0;
78
- if (diff > 1) {
79
- if (midHeight > maxHeight) {
80
- setWalkingIndexes([walkingIndexes[0], midIndex]);
81
- } else {
82
- setWalkingIndexes([midIndex, walkingIndexes[1]]);
83
- }
84
- } else {
85
- if (midHeight > maxHeight) {
86
- setWalkingIndexes([walkingIndexes[0], walkingIndexes[0]]);
87
- } else {
88
- setWalkingIndexes([walkingIndexes[1], walkingIndexes[1]]);
89
- }
90
- setStatus(99);
91
- }
92
- }
93
- }, [status, walkingIndexes]);
94
-
95
- // =========================== Render ===========================
96
- /** Render by cut index */
97
- var renderContent = function renderContent(index) {
98
- var prefixContent = contentChars.slice(0, index);
99
- var suffixContent = contentChars.slice(contentChars.length - index);
100
- return /*#__PURE__*/_jsxs(_Fragment, {
101
- children: [direction === 'start' && /*#__PURE__*/_jsxs(_Fragment, {
102
- children: [expandNode, ELLIPSIS_TEXT]
103
- }), direction !== 'start' && prefixContent.join(''), direction === 'middle' && /*#__PURE__*/_jsx(_Fragment, {
104
- children: expandNode ? /*#__PURE__*/_jsxs(_Fragment, {
105
- children: [ELLIPSIS_TEXT, expandNode, ELLIPSIS_TEXT]
106
- }) : ELLIPSIS_TEXT
107
- }), direction !== 'end' && suffixContent.join(''), direction === 'end' && /*#__PURE__*/_jsxs(_Fragment, {
108
- children: [ELLIPSIS_TEXT, expandNode]
109
- })]
110
- });
111
- };
112
- var finalContent = React.useMemo(function () {
113
- if (expanded || status === 100) {
114
- return /*#__PURE__*/_jsxs(React.Fragment, {
115
- children: [content, status === 99 && collapseNode]
116
- }, "display");
117
- }
118
- if (status === 99) {
119
- return renderContent(midIndex);
120
- }
121
- return null;
122
- }, [expanded, status, content, collapseNode, midIndex]);
123
- var allNodes = /*#__PURE__*/_jsxs(_Fragment, {
124
- children: [status === 1 && /*#__PURE__*/_jsxs("div", {
125
- "aria-hidden": true,
126
- ref: fullMeasureRef,
127
- style: measureStyle,
128
- children: [content, expandNode]
129
- }, "full"), status === 1 && /*#__PURE__*/_jsx("div", {
130
- "aria-hidden": true,
131
- ref: singleRowMeasureRef,
132
- style: measureStyle,
133
- children: "\xA0"
134
- }, "stable"), status === 2 && /*#__PURE__*/_jsx("div", {
135
- "aria-hidden": true,
136
- ref: midMeasureRef,
137
- style: measureStyle,
138
- children: renderContent(midIndex)
139
- }, "walking-mid"), finalContent]
140
- });
141
- return [allNodes, status, startMeasure];
142
- }
@@ -1,2 +0,0 @@
1
- import { RefObject } from 'react';
2
- export declare function useResizeEffect<T extends HTMLElement>(effect: (target: T) => void, targetRef: RefObject<T>): void;
@@ -1,14 +0,0 @@
1
- import { useDebounceEffect, useMemoizedFn, useSize } from 'ahooks';
2
- import { useRef } from 'react';
3
- export function useResizeEffect(effect, targetRef) {
4
- var fn = useMemoizedFn(effect);
5
- var widthRef = useRef();
6
- var size = useSize(targetRef);
7
- useDebounceEffect(function () {
8
- if ((size === null || size === void 0 ? void 0 : size.width) === 0 || (size === null || size === void 0 ? void 0 : size.width) === widthRef.current) return;
9
- fn(targetRef.current);
10
- widthRef.current = size === null || size === void 0 ? void 0 : size.width;
11
- }, [size === null || size === void 0 ? void 0 : size.width], {
12
- wait: 500
13
- });
14
- }
@@ -1,4 +0,0 @@
1
- import type { ReactElement } from 'react';
2
- import React from 'react';
3
- export type PropagationEvent = 'click' | 'touchstart';
4
- export declare function withStopPropagation(events: PropagationEvent[], element: ReactElement): ReactElement<any, string | React.JSXElementConstructor<any>>;
@@ -1,38 +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
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
3
- 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); }
4
- 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; }
5
- 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; }
6
- 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; }
7
- 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; }
8
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
9
- 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); }
10
- import React from 'react';
11
- var eventToPropRecord = {
12
- click: 'onClick',
13
- touchstart: 'onTouchStart'
14
- };
15
- export function withStopPropagation(events, element) {
16
- var props = _objectSpread({}, element.props);
17
- var _iterator = _createForOfIteratorHelper(events),
18
- _step;
19
- try {
20
- var _loop = function _loop() {
21
- var key = _step.value;
22
- var prop = eventToPropRecord[key];
23
- props[prop] = function (e) {
24
- var _element$props$prop, _element$props;
25
- e.stopPropagation();
26
- (_element$props$prop = (_element$props = element.props)[prop]) === null || _element$props$prop === void 0 || _element$props$prop.call(_element$props, e);
27
- };
28
- };
29
- for (_iterator.s(); !(_step = _iterator.n()).done;) {
30
- _loop();
31
- }
32
- } catch (err) {
33
- _iterator.e(err);
34
- } finally {
35
- _iterator.f();
36
- }
37
- return /*#__PURE__*/React.cloneElement(element, props);
38
- }
@@ -1,3 +0,0 @@
1
- export default function FullScreen({ onFullScreen, }: {
2
- onFullScreen: (isFull: boolean) => void;
3
- }): import("react/jsx-runtime").JSX.Element;
@@ -1,49 +0,0 @@
1
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
- 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); }
4
- 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; }
5
- function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
6
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
- import { FullscreenExitOutlined, FullscreenOutlined } from '@ant-design/icons';
8
- import { Button, Tooltip } from 'antd';
9
- import { useState } from 'react';
10
- import { classPrefix } from "../pro-table/table";
11
- import { jsx as _jsx } from "react/jsx-runtime";
12
- export default function FullScreen(_ref) {
13
- var onFullScreen = _ref.onFullScreen;
14
- var _useState = useState(false),
15
- _useState2 = _slicedToArray(_useState, 2),
16
- isFull = _useState2[0],
17
- setIsFull = _useState2[1];
18
- var handleOnFullScreen = function handleOnFullScreen() {
19
- setIsFull(!isFull);
20
- onFullScreen(!isFull);
21
- };
22
- return /*#__PURE__*/_jsx(Tooltip, {
23
- title: isFull ? '取消全屏' : '全屏',
24
- children: isFull ? /*#__PURE__*/_jsx(Button, {
25
- onClick: function onClick() {
26
- return handleOnFullScreen();
27
- },
28
- icon: /*#__PURE__*/_jsx(FullscreenExitOutlined, {
29
- className: "".concat(classPrefix, "-icon")
30
- }),
31
- type: "text",
32
- style: {
33
- width: 24
34
- }
35
- }) : /*#__PURE__*/_jsx(Button, {
36
- onClick: function onClick() {
37
- return handleOnFullScreen();
38
- },
39
- icon: /*#__PURE__*/_jsx(FullscreenOutlined, {
40
- className: "".concat(classPrefix, "-icon")
41
- }),
42
- type: "text",
43
- style: {
44
- width: 24
45
- },
46
- className: "ccs-pl-fullbtn"
47
- })
48
- });
49
- }
@@ -1,11 +0,0 @@
1
- import { FormItemProps } from 'antd';
2
- import { NamePath } from 'antd/es/form/interface';
3
- export type GroupFormItemProps = FormItemProps & {
4
- /** 组表单项名称 */
5
- groupItemNames: NamePath[];
6
- };
7
- declare function GroupFormItem({ groupItemNames, name, ...formItemProps }: GroupFormItemProps): import("react/jsx-runtime").JSX.Element;
8
- declare namespace GroupFormItem {
9
- var displayName: string;
10
- }
11
- export default GroupFormItem;
@@ -1,124 +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 = ["groupItemNames", "name"];
3
- 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; }
4
- 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; }
5
- 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; }
6
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
7
- 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); }
8
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
9
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
10
- function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
11
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
12
- 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; }
13
- 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; }
14
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
15
- 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."); }
16
- 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); }
17
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
18
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
19
- 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; }
20
- import { useUpdateEffect } from 'ahooks';
21
- import { Form } from 'antd';
22
- import { useEffect, useState } from 'react';
23
- import { getDataByNamePath } from "../select";
24
- import { jsx as _jsx } from "react/jsx-runtime";
25
- import { Fragment as _Fragment } from "react/jsx-runtime";
26
- import { jsxs as _jsxs } from "react/jsx-runtime";
27
- var FormUpdateItem = function FormUpdateItem(_ref) {
28
- var name = _ref.name,
29
- getFieldsValue = _ref.getFieldsValue,
30
- setFieldValue = _ref.setFieldValue,
31
- getFieldValue = _ref.getFieldValue,
32
- groupItemNames = _ref.groupItemNames;
33
- var nameValue = getFieldValue(name);
34
- useEffect(function () {
35
- // 初始值
36
- var initialValues = getFieldsValue(true);
37
- var initNameValue = [];
38
-
39
- // 根据子项初始值设置name的默认值
40
- groupItemNames.forEach(function (item) {
41
- initNameValue.push(getDataByNamePath(initialValues, item));
42
- });
43
-
44
- // 如果子项有初始值,则设置name的默认值
45
- if (initNameValue.filter(function (n) {
46
- return n !== undefined;
47
- }).length > 0) {
48
- setFieldValue(name, initNameValue);
49
- return;
50
- }
51
-
52
- // 如果子项没有初始值,主项有初始值
53
- var groupNameValue = getDataByNamePath(initialValues, name);
54
- if (Array.isArray(groupNameValue)) {
55
- groupItemNames.forEach(function (item, index) {
56
- setFieldValue(item, groupNameValue[index]);
57
- });
58
- }
59
- }, []);
60
-
61
- // 依赖主字段变更,更新子项属性值
62
- useUpdateEffect(function () {
63
- setTimeout(function () {
64
- groupItemNames.forEach(function (item, index) {
65
- setFieldValue(item, Array.isArray(nameValue) ? nameValue[index] : undefined);
66
- });
67
- }, 1);
68
- }, [nameValue]);
69
- return null;
70
- };
71
- function onGetNameValue() {
72
- var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
73
- var name = arguments.length > 1 ? arguments[1] : undefined;
74
- if (!obj) return undefined;
75
- if (Array.isArray(name)) {
76
- var names = _toConsumableArray(name);
77
- var newName = names.shift();
78
- if (names.length === 0) return obj[newName];
79
- return onGetNameValue(obj[newName], names);
80
- }
81
- return obj[name];
82
- }
83
- function GroupFormItem(_ref2) {
84
- var groupItemNames = _ref2.groupItemNames,
85
- name = _ref2.name,
86
- formItemProps = _objectWithoutProperties(_ref2, _excluded);
87
- var _useState = useState(name || "_".concat(JSON.stringify(groupItemNames).replace(/[^a-zA-Z]/g, ''), "_")),
88
- _useState2 = _slicedToArray(_useState, 1),
89
- itemName = _useState2[0];
90
- return /*#__PURE__*/_jsxs(_Fragment, {
91
- children: [/*#__PURE__*/_jsx(Form.Item, _objectSpread({
92
- name: itemName
93
- }, formItemProps)), groupItemNames && groupItemNames.length > 0 && /*#__PURE__*/_jsxs(_Fragment, {
94
- children: [/*#__PURE__*/_jsx(Form.Item, {
95
- noStyle: true,
96
- shouldUpdate: function shouldUpdate(l, r) {
97
- return onGetNameValue(l, itemName) !== onGetNameValue(r, itemName);
98
- },
99
- children: function children(_ref3) {
100
- var getFieldsValue = _ref3.getFieldsValue,
101
- setFieldValue = _ref3.setFieldValue,
102
- getFieldValue = _ref3.getFieldValue;
103
- return /*#__PURE__*/_jsx(FormUpdateItem, {
104
- getFieldsValue: getFieldsValue,
105
- setFieldValue: setFieldValue,
106
- getFieldValue: getFieldValue,
107
- groupItemNames: groupItemNames,
108
- name: itemName
109
- });
110
- }
111
- }), groupItemNames.map(function (item, index) {
112
- return /*#__PURE__*/_jsx(Form.Item, {
113
- noStyle: true,
114
- name: item,
115
- hidden: true
116
- }, index);
117
- })]
118
- })]
119
- });
120
- }
121
- if (process.env.NODE_ENV !== 'production') {
122
- GroupFormItem.displayName = 'CcsGroupFormItem';
123
- }
124
- export default GroupFormItem;
@@ -1,25 +0,0 @@
1
- /**
2
- * app配置
3
- * @returns
4
- */
5
- declare const useAppConfig: () => import("../context").CssAppConfigType;
6
- export declare const useProTableFields: () => {
7
- dataSource: string[];
8
- total: string[];
9
- requestParam: {
10
- pageNo: string[];
11
- pageSize: string[];
12
- query?: string[] | undefined;
13
- orderProps?: string[] | undefined;
14
- filters?: string[] | undefined;
15
- };
16
- };
17
- export declare const useProTableTreeFields: () => {
18
- dataSource: string[];
19
- };
20
- export declare const useDialogFields: () => {
21
- success: string[];
22
- successTag: any;
23
- errorMsg: string[];
24
- };
25
- export default useAppConfig;
@@ -1,52 +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
- 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
- import { useContext } from 'react';
8
- import { AppConfigContext } from "../context";
9
-
10
- /**
11
- * app配置
12
- * @returns
13
- */
14
- var useAppConfig = function useAppConfig() {
15
- var context = useContext(AppConfigContext);
16
- if (context === undefined) {
17
- throw new Error('AppConfigContext not found 未全局使用 CcsAppConfig');
18
- }
19
- return context;
20
- };
21
- export var useProTableFields = function useProTableFields() {
22
- var _context$fieldNames;
23
- var context = useContext(AppConfigContext) || {};
24
- return _objectSpread({
25
- dataSource: ['data', 'result'],
26
- total: ['data', 'totalNum'],
27
- requestParam: {
28
- pageNo: ['pageNo'],
29
- pageSize: ['pageSize'],
30
- filters: ['filters'],
31
- orderProps: ['orderProps'],
32
- query: ['query']
33
- }
34
- }, context === null || context === void 0 || (_context$fieldNames = context.fieldNames) === null || _context$fieldNames === void 0 ? void 0 : _context$fieldNames.proTable);
35
- };
36
- export var useProTableTreeFields = function useProTableTreeFields() {
37
- var _context$fieldNames2;
38
- var context = useContext(AppConfigContext) || {};
39
- return _objectSpread({
40
- dataSource: ['data']
41
- }, context === null || context === void 0 || (_context$fieldNames2 = context.fieldNames) === null || _context$fieldNames2 === void 0 ? void 0 : _context$fieldNames2.proTableTree);
42
- };
43
- export var useDialogFields = function useDialogFields() {
44
- var _context$fieldNames3;
45
- var context = useContext(AppConfigContext) || {};
46
- return _objectSpread({
47
- success: ['success'],
48
- successTag: true,
49
- errorMsg: ['msg']
50
- }, context === null || context === void 0 || (_context$fieldNames3 = context.fieldNames) === null || _context$fieldNames3 === void 0 ? void 0 : _context$fieldNames3.dialog);
51
- };
52
- export default useAppConfig;
@@ -1,10 +0,0 @@
1
- export declare class EventInstance<T = any, ActionType = any> {
2
- private subscriptions;
3
- emit: (val: T, actionType?: ActionType) => void;
4
- useSubscription: (callback: (val: T) => void, actionType?: ActionType) => T;
5
- }
6
- /**
7
- * 组件消息订阅方式传值
8
- * @returns
9
- */
10
- export default function Event<T = void, ActionType = any>(): EventInstance<T, ActionType>;