@zw-team/react-lib 1.0.1

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 (338) hide show
  1. package/README.md +207 -0
  2. package/dist/components/AccessReport/index.d.ts +29 -0
  3. package/dist/components/AccessReport/index.js +129 -0
  4. package/dist/components/Avatar/Avatar.d.ts +3 -0
  5. package/dist/components/Avatar/Avatar.js +58 -0
  6. package/dist/components/Avatar/index.d.ts +2 -0
  7. package/dist/components/Avatar/index.js +2 -0
  8. package/dist/components/Avatar/types.d.ts +9 -0
  9. package/dist/components/Avatar/types.js +0 -0
  10. package/dist/components/Block/Block.css +8 -0
  11. package/dist/components/Block/Block.d.ts +4 -0
  12. package/dist/components/Block/Block.js +11 -0
  13. package/dist/components/Block/index.d.ts +2 -0
  14. package/dist/components/Block/index.js +2 -0
  15. package/dist/components/Block/types.d.ts +3 -0
  16. package/dist/components/Block/types.js +0 -0
  17. package/dist/components/ConfigProvider/ConfigContext.d.ts +4 -0
  18. package/dist/components/ConfigProvider/ConfigContext.js +19 -0
  19. package/dist/components/ConfigProvider/ConfigProvider.d.ts +4 -0
  20. package/dist/components/ConfigProvider/ConfigProvider.js +57 -0
  21. package/dist/components/ConfigProvider/index.d.ts +2 -0
  22. package/dist/components/ConfigProvider/index.js +2 -0
  23. package/dist/components/ConfigProvider/types.d.ts +19 -0
  24. package/dist/components/ConfigProvider/types.js +0 -0
  25. package/dist/components/CustomColumn/CustomColumn.d.ts +4 -0
  26. package/dist/components/CustomColumn/CustomColumn.js +388 -0
  27. package/dist/components/CustomColumn/CustomColumn.scss +135 -0
  28. package/dist/components/CustomColumn/index.d.ts +2 -0
  29. package/dist/components/CustomColumn/index.js +2 -0
  30. package/dist/components/CustomColumn/types.d.ts +19 -0
  31. package/dist/components/CustomColumn/types.js +0 -0
  32. package/dist/components/DatePicker/DatePicker.d.ts +4 -0
  33. package/dist/components/DatePicker/DatePicker.js +89 -0
  34. package/dist/components/DatePicker/datePickerOption.d.ts +14 -0
  35. package/dist/components/DatePicker/datePickerOption.js +149 -0
  36. package/dist/components/DatePicker/index.d.ts +2 -0
  37. package/dist/components/DatePicker/index.js +2 -0
  38. package/dist/components/DatePicker/types.d.ts +12 -0
  39. package/dist/components/DatePicker/types.js +0 -0
  40. package/dist/components/DatePickerPanel/DatePickerPanel.d.ts +6 -0
  41. package/dist/components/DatePickerPanel/DatePickerPanel.js +397 -0
  42. package/dist/components/DatePickerPanel/datePickerPanel.scss +362 -0
  43. package/dist/components/DatePickerPanel/index.d.ts +2 -0
  44. package/dist/components/DatePickerPanel/index.js +2 -0
  45. package/dist/components/DatePickerPanel/type.d.ts +23 -0
  46. package/dist/components/DatePickerPanel/type.js +0 -0
  47. package/dist/components/DownloadCenter/DownloadCenter.d.ts +5 -0
  48. package/dist/components/DownloadCenter/DownloadCenter.js +367 -0
  49. package/dist/components/DownloadCenter/index.css +54 -0
  50. package/dist/components/DownloadCenter/index.d.ts +2 -0
  51. package/dist/components/DownloadCenter/index.js +2 -0
  52. package/dist/components/DownloadCenter/types.d.ts +27 -0
  53. package/dist/components/DownloadCenter/types.js +0 -0
  54. package/dist/components/Fireworks/Fireworks.d.ts +11 -0
  55. package/dist/components/Fireworks/Fireworks.js +415 -0
  56. package/dist/components/Fireworks/imgs/birthday-cake.svg +180 -0
  57. package/dist/components/Fireworks/imgs/hb.png +0 -0
  58. package/dist/components/Fireworks/imgs/sd.png +0 -0
  59. package/dist/components/Fireworks/imgs/xc.png +0 -0
  60. package/dist/components/Fireworks/imgs/yd.png +0 -0
  61. package/dist/components/Fireworks/index.d.ts +2 -0
  62. package/dist/components/Fireworks/index.js +2 -0
  63. package/dist/components/Fireworks/index.scss +9 -0
  64. package/dist/components/Fireworks/types.d.ts +6 -0
  65. package/dist/components/Fireworks/types.js +0 -0
  66. package/dist/components/Form/Form.css +4 -0
  67. package/dist/components/Form/Form.d.ts +9 -0
  68. package/dist/components/Form/Form.js +18 -0
  69. package/dist/components/Form/index.d.ts +1 -0
  70. package/dist/components/Form/index.js +2 -0
  71. package/dist/components/FormItem/FormItem.css +38 -0
  72. package/dist/components/FormItem/FormItem.d.ts +9 -0
  73. package/dist/components/FormItem/FormItem.js +25 -0
  74. package/dist/components/FormItem/index.d.ts +1 -0
  75. package/dist/components/FormItem/index.js +2 -0
  76. package/dist/components/HomeData/HomeData.d.ts +6 -0
  77. package/dist/components/HomeData/HomeData.js +364 -0
  78. package/dist/components/HomeData/HomeData.scss +161 -0
  79. package/dist/components/HomeData/index.d.ts +1 -0
  80. package/dist/components/HomeData/index.js +2 -0
  81. package/dist/components/Icon/Icon.d.ts +4 -0
  82. package/dist/components/Icon/Icon.js +34 -0
  83. package/dist/components/Icon/index.d.ts +2 -0
  84. package/dist/components/Icon/index.js +2 -0
  85. package/dist/components/Icon/types.d.ts +8 -0
  86. package/dist/components/Icon/types.js +0 -0
  87. package/dist/components/Log/index.d.ts +2 -0
  88. package/dist/components/Log/index.js +2 -0
  89. package/dist/components/Log/src/Detail.d.ts +7 -0
  90. package/dist/components/Log/src/Detail.js +71 -0
  91. package/dist/components/Log/src/Detail.scss +27 -0
  92. package/dist/components/Log/src/Log.d.ts +5 -0
  93. package/dist/components/Log/src/Log.js +335 -0
  94. package/dist/components/Log/src/Log.scss +50 -0
  95. package/dist/components/Log/src/useLogTableColumns.d.ts +2 -0
  96. package/dist/components/Log/src/useLogTableColumns.js +141 -0
  97. package/dist/components/Log/types.d.ts +5 -0
  98. package/dist/components/Log/types.js +0 -0
  99. package/dist/components/LogButton/LogButton.d.ts +4 -0
  100. package/dist/components/LogButton/LogButton.js +30 -0
  101. package/dist/components/LogButton/index.d.ts +2 -0
  102. package/dist/components/LogButton/index.js +2 -0
  103. package/dist/components/LogButton/logbutton.css +15 -0
  104. package/dist/components/LogButton/types.d.ts +10 -0
  105. package/dist/components/LogButton/types.js +0 -0
  106. package/dist/components/LogDialog/BiLogManager.d.ts +29 -0
  107. package/dist/components/LogDialog/BiLogManager.js +78 -0
  108. package/dist/components/LogDialog/LogDialog.d.ts +8 -0
  109. package/dist/components/LogDialog/LogDialog.js +106 -0
  110. package/dist/components/LogDialog/LogDialog.scss +29 -0
  111. package/dist/components/LogDialog/index.d.ts +3 -0
  112. package/dist/components/LogDialog/index.js +3 -0
  113. package/dist/components/LogDialog/types.d.ts +8 -0
  114. package/dist/components/LogDialog/types.js +0 -0
  115. package/dist/components/MediaPreview/MediaPreview.d.ts +5 -0
  116. package/dist/components/MediaPreview/MediaPreview.js +124 -0
  117. package/dist/components/MediaPreview/hook.d.ts +26 -0
  118. package/dist/components/MediaPreview/hook.js +174 -0
  119. package/dist/components/MediaPreview/index.css +202 -0
  120. package/dist/components/MediaPreview/index.d.ts +2 -0
  121. package/dist/components/MediaPreview/index.js +2 -0
  122. package/dist/components/MediaPreview/types.d.ts +24 -0
  123. package/dist/components/MediaPreview/types.js +0 -0
  124. package/dist/components/Modal/Modal.d.ts +3 -0
  125. package/dist/components/Modal/Modal.js +31 -0
  126. package/dist/components/Modal/index.d.ts +2 -0
  127. package/dist/components/Modal/index.js +2 -0
  128. package/dist/components/Modal/types.d.ts +8 -0
  129. package/dist/components/Modal/types.js +0 -0
  130. package/dist/components/ModalStore/ModalProvider.d.ts +11 -0
  131. package/dist/components/ModalStore/ModalProvider.js +15 -0
  132. package/dist/components/ModalStore/ModalStore.d.ts +78 -0
  133. package/dist/components/ModalStore/ModalStore.js +188 -0
  134. package/dist/components/ModalStore/index.d.ts +3 -0
  135. package/dist/components/ModalStore/index.js +4 -0
  136. package/dist/components/ModalStore/types.d.ts +73 -0
  137. package/dist/components/ModalStore/types.js +0 -0
  138. package/dist/components/MoreButton/MoreButton.d.ts +3 -0
  139. package/dist/components/MoreButton/MoreButton.js +50 -0
  140. package/dist/components/MoreButton/index.d.ts +2 -0
  141. package/dist/components/MoreButton/index.js +2 -0
  142. package/dist/components/MoreButton/types.d.ts +15 -0
  143. package/dist/components/MoreButton/types.js +0 -0
  144. package/dist/components/NavbarTool/NavbarTool.d.ts +5 -0
  145. package/dist/components/NavbarTool/NavbarTool.js +143 -0
  146. package/dist/components/NavbarTool/components/index.css +49 -0
  147. package/dist/components/NavbarTool/components/index.d.ts +5 -0
  148. package/dist/components/NavbarTool/components/index.js +98 -0
  149. package/dist/components/NavbarTool/index.css +14 -0
  150. package/dist/components/NavbarTool/index.d.ts +2 -0
  151. package/dist/components/NavbarTool/index.js +2 -0
  152. package/dist/components/NavbarTool/types.d.ts +40 -0
  153. package/dist/components/NavbarTool/types.js +0 -0
  154. package/dist/components/NoticeCenter/NoticeCenter.d.ts +4 -0
  155. package/dist/components/NoticeCenter/NoticeCenter.js +334 -0
  156. package/dist/components/NoticeCenter/assets/notice.png +0 -0
  157. package/dist/components/NoticeCenter/assets/tongzhi.png +0 -0
  158. package/dist/components/NoticeCenter/index.d.ts +2 -0
  159. package/dist/components/NoticeCenter/index.js +2 -0
  160. package/dist/components/NoticeCenter/noticeCenter.scss +232 -0
  161. package/dist/components/NoticeCenter/types.d.ts +6 -0
  162. package/dist/components/NoticeCenter/types.js +0 -0
  163. package/dist/components/Pagination/BiPagination.css +152 -0
  164. package/dist/components/Pagination/Pagination.d.ts +5 -0
  165. package/dist/components/Pagination/Pagination.js +67 -0
  166. package/dist/components/Pagination/index.d.ts +2 -0
  167. package/dist/components/Pagination/index.js +2 -0
  168. package/dist/components/Pagination/types.d.ts +14 -0
  169. package/dist/components/Pagination/types.js +0 -0
  170. package/dist/components/ResponseInterceptor/index.d.ts +17 -0
  171. package/dist/components/ResponseInterceptor/index.js +43 -0
  172. package/dist/components/SuperDate/SuperDate.d.ts +6 -0
  173. package/dist/components/SuperDate/SuperDate.js +113 -0
  174. package/dist/components/SuperDate/SuperDate.scss +42 -0
  175. package/dist/components/SuperDate/components/CustomRangPanel/CustomRangPanel.d.ts +5 -0
  176. package/dist/components/SuperDate/components/CustomRangPanel/CustomRangPanel.js +87 -0
  177. package/dist/components/SuperDate/components/CustomRangPanel/CustomRangPanel.scss +52 -0
  178. package/dist/components/SuperDate/components/DynamicTimeCom/DynamicTimeCom.d.ts +6 -0
  179. package/dist/components/SuperDate/components/DynamicTimeCom/DynamicTimeCom.js +129 -0
  180. package/dist/components/SuperDate/components/DynamicTimeCom/dynamicTimeCom.scss +70 -0
  181. package/dist/components/SuperDate/constant.d.ts +35 -0
  182. package/dist/components/SuperDate/constant.js +27 -0
  183. package/dist/components/SuperDate/index.d.ts +2 -0
  184. package/dist/components/SuperDate/index.js +2 -0
  185. package/dist/components/SuperDate/store.d.ts +68 -0
  186. package/dist/components/SuperDate/store.js +254 -0
  187. package/dist/components/SuperDate/types.d.ts +34 -0
  188. package/dist/components/SuperDate/types.js +0 -0
  189. package/dist/components/SuperDate/utils.d.ts +18 -0
  190. package/dist/components/SuperDate/utils.js +14 -0
  191. package/dist/components/SystemLink/SystemLink.d.ts +4 -0
  192. package/dist/components/SystemLink/SystemLink.js +85 -0
  193. package/dist/components/SystemLink/index.d.ts +1 -0
  194. package/dist/components/SystemLink/index.js +2 -0
  195. package/dist/components/SystemLink/index.scss +142 -0
  196. package/dist/components/Table/ResizableTitle.d.ts +3 -0
  197. package/dist/components/Table/ResizableTitle.js +43 -0
  198. package/dist/components/Table/Table.d.ts +9 -0
  199. package/dist/components/Table/Table.js +189 -0
  200. package/dist/components/Table/index.d.ts +2 -0
  201. package/dist/components/Table/index.js +2 -0
  202. package/dist/components/Table/index.scss +42 -0
  203. package/dist/components/Table/types.d.ts +24 -0
  204. package/dist/components/Table/types.js +0 -0
  205. package/dist/components/Table/useHeaderPopper.d.ts +8 -0
  206. package/dist/components/Table/useHeaderPopper.js +95 -0
  207. package/dist/components/TableHeaderPopper/EditBox.d.ts +6 -0
  208. package/dist/components/TableHeaderPopper/EditBox.js +208 -0
  209. package/dist/components/TableHeaderPopper/Popover.d.ts +6 -0
  210. package/dist/components/TableHeaderPopper/Popover.js +85 -0
  211. package/dist/components/TableHeaderPopper/index.d.ts +3 -0
  212. package/dist/components/TableHeaderPopper/index.js +3 -0
  213. package/dist/components/TableHeaderPopper/index.scss +96 -0
  214. package/dist/components/TaskCenter/TaskCenter.d.ts +4 -0
  215. package/dist/components/TaskCenter/TaskCenter.js +257 -0
  216. package/dist/components/TaskCenter/TaskCenter.scss +44 -0
  217. package/dist/components/TaskCenter/api.d.ts +13 -0
  218. package/dist/components/TaskCenter/api.js +13 -0
  219. package/dist/components/TaskCenter/index.d.ts +2 -0
  220. package/dist/components/TaskCenter/index.js +2 -0
  221. package/dist/components/TaskCenter/types.d.ts +29 -0
  222. package/dist/components/TaskCenter/types.js +0 -0
  223. package/dist/components/TooltipIcon/TooltipIcon.d.ts +3 -0
  224. package/dist/components/TooltipIcon/TooltipIcon.js +43 -0
  225. package/dist/components/TooltipIcon/index.d.ts +2 -0
  226. package/dist/components/TooltipIcon/index.js +2 -0
  227. package/dist/components/TooltipIcon/types.d.ts +14 -0
  228. package/dist/components/TooltipIcon/types.js +0 -0
  229. package/dist/components/Verification/content.d.ts +11 -0
  230. package/dist/components/Verification/content.js +223 -0
  231. package/dist/components/Verification/index.css +43 -0
  232. package/dist/components/Verification/index.d.ts +1 -0
  233. package/dist/components/Verification/index.js +37 -0
  234. package/dist/components/index.d.ts +32 -0
  235. package/dist/components/index.js +29 -0
  236. package/dist/config/index.d.ts +83 -0
  237. package/dist/config/index.js +115 -0
  238. package/dist/config/theme/index.d.ts +368 -0
  239. package/dist/config/theme/index.js +369 -0
  240. package/dist/hooks/createAlive.d.ts +11 -0
  241. package/dist/hooks/createAlive.js +22 -0
  242. package/dist/hooks/createGlobalState.d.ts +7 -0
  243. package/dist/hooks/createGlobalState.js +28 -0
  244. package/dist/hooks/index.d.ts +26 -0
  245. package/dist/hooks/index.js +25 -0
  246. package/dist/hooks/useAsync.d.ts +27 -0
  247. package/dist/hooks/useAsync.js +76 -0
  248. package/dist/hooks/useClickOther.d.ts +10 -0
  249. package/dist/hooks/useClickOther.js +30 -0
  250. package/dist/hooks/useCopyToClipboard.d.ts +7 -0
  251. package/dist/hooks/useCopyToClipboard.js +32 -0
  252. package/dist/hooks/useCreate.d.ts +7 -0
  253. package/dist/hooks/useCreate.js +21 -0
  254. package/dist/hooks/useEventListener.d.ts +22 -0
  255. package/dist/hooks/useEventListener.js +33 -0
  256. package/dist/hooks/useHistoryStore.d.ts +16 -0
  257. package/dist/hooks/useHistoryStore.js +106 -0
  258. package/dist/hooks/useIntersectionObserver.d.ts +8 -0
  259. package/dist/hooks/useIntersectionObserver.js +23 -0
  260. package/dist/hooks/useInterval.d.ts +8 -0
  261. package/dist/hooks/useInterval.js +19 -0
  262. package/dist/hooks/useLatest.d.ts +2 -0
  263. package/dist/hooks/useLatest.js +12 -0
  264. package/dist/hooks/useLockAsyncFn.d.ts +7 -0
  265. package/dist/hooks/useLockAsyncFn.js +24 -0
  266. package/dist/hooks/useLockFn.d.ts +7 -0
  267. package/dist/hooks/useLockFn.js +17 -0
  268. package/dist/hooks/useMergedState.d.ts +10 -0
  269. package/dist/hooks/useMergedState.js +30 -0
  270. package/dist/hooks/useMountedState.d.ts +4 -0
  271. package/dist/hooks/useMountedState.js +13 -0
  272. package/dist/hooks/usePermission.d.ts +8 -0
  273. package/dist/hooks/usePermission.js +21 -0
  274. package/dist/hooks/usePersistFn.d.ts +8 -0
  275. package/dist/hooks/usePersistFn.js +13 -0
  276. package/dist/hooks/useReactive.d.ts +7 -0
  277. package/dist/hooks/useReactive.js +34 -0
  278. package/dist/hooks/useRefresh.d.ts +5 -0
  279. package/dist/hooks/useRefresh.js +8 -0
  280. package/dist/hooks/useToggle.d.ts +16 -0
  281. package/dist/hooks/useToggle.js +20 -0
  282. package/dist/hooks/useUnmount.d.ts +6 -0
  283. package/dist/hooks/useUnmount.js +10 -0
  284. package/dist/hooks/useUpdateEffect.d.ts +9 -0
  285. package/dist/hooks/useUpdateEffect.js +10 -0
  286. package/dist/hooks/useWindowSize.d.ts +6 -0
  287. package/dist/hooks/useWindowSize.js +15 -0
  288. package/dist/hooks/util.d.ts +9 -0
  289. package/dist/hooks/util.js +6 -0
  290. package/dist/index.d.ts +5 -0
  291. package/dist/index.js +2 -0
  292. package/dist/utils/array.d.ts +12 -0
  293. package/dist/utils/array.js +15 -0
  294. package/dist/utils/classNames.d.ts +4 -0
  295. package/dist/utils/classNames.js +19 -0
  296. package/dist/utils/date.d.ts +98 -0
  297. package/dist/utils/date.js +101 -0
  298. package/dist/utils/debounce.d.ts +8 -0
  299. package/dist/utils/debounce.js +38 -0
  300. package/dist/utils/deepClone.d.ts +6 -0
  301. package/dist/utils/deepClone.js +10 -0
  302. package/dist/utils/empty.d.ts +16 -0
  303. package/dist/utils/empty.js +24 -0
  304. package/dist/utils/formatPrice.d.ts +2 -0
  305. package/dist/utils/formatPrice.js +15 -0
  306. package/dist/utils/getUUID.d.ts +1 -0
  307. package/dist/utils/getUUID.js +17 -0
  308. package/dist/utils/getUrlParams.d.ts +11 -0
  309. package/dist/utils/getUrlParams.js +10 -0
  310. package/dist/utils/index.d.ts +20 -0
  311. package/dist/utils/index.js +19 -0
  312. package/dist/utils/listToTree.d.ts +12 -0
  313. package/dist/utils/listToTree.js +14 -0
  314. package/dist/utils/object.d.ts +6 -0
  315. package/dist/utils/object.js +5 -0
  316. package/dist/utils/ossUpload.d.ts +45 -0
  317. package/dist/utils/ossUpload.js +88 -0
  318. package/dist/utils/parseTo.d.ts +6 -0
  319. package/dist/utils/parseTo.js +9 -0
  320. package/dist/utils/request/accessReport.d.ts +2 -0
  321. package/dist/utils/request/accessReport.js +27 -0
  322. package/dist/utils/request/defaultRequest.d.ts +9 -0
  323. package/dist/utils/request/defaultRequest.js +33 -0
  324. package/dist/utils/request/exportDownload.d.ts +2 -0
  325. package/dist/utils/request/exportDownload.js +28 -0
  326. package/dist/utils/request/index.d.ts +29 -0
  327. package/dist/utils/request/index.js +40 -0
  328. package/dist/utils/request/noticeCenter.d.ts +2 -0
  329. package/dist/utils/request/noticeCenter.js +28 -0
  330. package/dist/utils/svgIcon/index.d.ts +47 -0
  331. package/dist/utils/svgIcon/index.js +76 -0
  332. package/dist/utils/throttle.d.ts +10 -0
  333. package/dist/utils/throttle.js +21 -0
  334. package/dist/utils/time/index.d.ts +7 -0
  335. package/dist/utils/time/index.js +12 -0
  336. package/dist/utils/tools.d.ts +43 -0
  337. package/dist/utils/tools.js +57 -0
  338. package/package.json +116 -0
package/README.md ADDED
@@ -0,0 +1,207 @@
1
+ # BI Components
2
+
3
+ 基于 `rslib` 的 React 组件库项目,配套接入 Storybook 文档系统与 Biome 代码规范工具;日常开发与构建请使用 `pnpm`。
4
+
5
+ ## 技术栈
6
+
7
+ - [React 19](https://react.dev/) + [TypeScript](https://www.typescriptlang.org/) 组件开发
8
+ - [`rslib`](https://rslib.rs/zh/guide/start/quick-start) + [`rsbuild`](https://rsbuild.rs/zh/guide/start/) 负责打包与类型声明产出
9
+ - [Storybook](https://storybook.js.org/)([`storybook-react-rsbuild`](https://github.com/web-infra-dev/storybook-rsbuild) + [`storybook-addon-rslib`](https://github.com/web-infra-dev/storybook-rsbuild/tree/main/packages/addon-rslib))用于文档与演示
10
+ - [Ant Design](https://ant.design/)(示例组件引用了 `Tag`)
11
+ - [Biome](https://biomejs.dev/) 统一代码格式、语法与样式检查
12
+
13
+ ## 环境要求
14
+
15
+ - Node.js `v20.19.x`(与 `.nvmrc` 保持一致,可通过 `nvm use` 快速切换)
16
+ - pnpm ≥ 8(项目默认使用 pnpm 锁定依赖)
17
+ - 需更新 browserslist 数据库时可执行 `npx update-browserslist-db@latest`
18
+ - 装Biome插件并且配置默认格式化为Biome
19
+
20
+ ## 安装与快速开始
21
+
22
+ ```bash
23
+ pnpm install # 安装依赖
24
+ pnpm dev # 监听模式构建库产物(输出到 dist/)
25
+ pnpm storybook # 启动 Storybook 文档站(默认 http://localhost:6006)
26
+ pnpm build # 生成最终分发产物及类型声明
27
+ pnpm build:storybook# 生成静态化 Storybook(输出到 storybook-static/)
28
+ ```
29
+
30
+ `pnpm dev` 与 `pnpm storybook` 可同时运行:一个负责构建库文件,另一个负责交互式文档。
31
+
32
+ ## 新增组件流程
33
+
34
+ 1. **规划结构**
35
+ - 在 `src/components` 下新建组件目录,例如 `src/components/Alert/`。
36
+ - 建议保持入口文件命名为 `index.ts`,具体实现放在同目录的业务文件内(如 `Alert.tsx`)。
37
+ - 类型定义建议放在 `types.ts` 文件中统一管理。
38
+ 2. **实现组件**
39
+ - 使用 TypeScript 定义 `Props`,在 `types.ts` 中导出类型。
40
+ - 若存在样式,放在同目录下的 `.css` 或 `.scss` 文件中,并在组件内显式引入。
41
+ - 在组件目录的 `index.ts` 中按以下模式导出:
42
+ ```typescript
43
+ // src/components/Alert/index.ts
44
+ export { default as BiAlert } from './Alert'
45
+ export type { AlertProps } from './types'
46
+ ```
47
+ - 在 `src/components/index.ts` 中添加统一导出:
48
+ ```typescript
49
+ export * from './Alert'
50
+ ```
51
+ - 主入口 `src/index.ts` 已通过 `export * from './components'` 统一导出所有组件。
52
+ 3. **编写 Storybook 文档**
53
+ - 在 `stories` 目录下新增 `Alert.stories.ts`(命名与组件保持一致)。
54
+ - 在 `meta` 中配置分组、参数、控制器,并通过 `args` 覆盖核心用例。
55
+ - 需要交互事件时使用 `fn()` 或 `action` 辅助调试。
56
+ 4. **(可选)补充测试**
57
+ - 如果组件逻辑较复杂,推荐在 `src/components/Alert/__tests__/Alert.test.tsx` 等位置编写单元测试 / 交互测试。
58
+ 5. **自查与验证**
59
+ - 运行 `pnpm format`、`pnpm lint`(或 `npm run format`、`npm run lint`)保证无格式与 lint 报错。
60
+ - 执行 `pnpm dev` / `pnpm build` 确保打包通过。
61
+ - 在 Storybook 中验证组件展示、交互与文档说明是否完整。
62
+ 6. **提交与评审**
63
+ - 保持提交只包含相关改动,附上截图 / 录屏展示关键状态。
64
+ - 在 PR 或合并说明中记录 Storybook 路径、接口变更、兼容性注意事项。
65
+
66
+ ## Storybook 使用
67
+
68
+ - `pnpm storybook`:本地开发调试组件时实时查看属性变更、文档与交互。
69
+ - `pnpm build:storybook`:打包生成静态文档,输出目录 `storybook-static/`,可直接部署至静态站点。
70
+ - `stories` 中的命名建议遵循 `目录/类别/组件名`,以便 Storybook 侧边栏分类清晰。
71
+
72
+ ## 代码规范与质量检查
73
+
74
+ - `pnpm format`:调用 Biome 自动格式化代码。
75
+ - `pnpm lint`:运行 Biome 的 linter 规则(等同于 `npm run lint`)。
76
+ - `pnpm check`:Biome 综合检查(含 lint + format 建议),适合提交前统一自检。
77
+ - 保持组件类型声明完整,避免将外部依赖打包进产物(`rslib` 默认按需生成类型与 ESM 包)。
78
+
79
+ ## 导出与使用方式
80
+
81
+ ### 组件导出模式
82
+
83
+ 组件库采用多入口点导出方式,支持按需导入:
84
+
85
+ - **主入口**(`@zw-team/react-lib`):导出所有组件
86
+ ```typescript
87
+ import { BiAvatar, BiBlock } from '@zw-team/react-lib'
88
+ ```
89
+
90
+ - **组件入口**(`@zw-team/react-lib/components`):仅导出组件
91
+ ```typescript
92
+ import { BiAvatar, BiBlock } from '@zw-team/react-lib/components'
93
+ ```
94
+
95
+ - **Hooks 入口**(`@zw-team/react-lib/hooks`):导出工具 Hooks
96
+ ```typescript
97
+ import { useLatest, usePermission } from '@zw-team/react-lib/hooks'
98
+ ```
99
+
100
+ - **工具入口**(`@zw-team/react-lib/utils`):导出工具函数
101
+ ```typescript
102
+ import { request, ossUpload } from '@zw-team/react-lib/utils'
103
+ ```
104
+
105
+ ### 组件命名规范
106
+
107
+ 所有组件统一使用 `Bi` 前缀(如 `BiAvatar`、`BiBlock`、`BiForm`)可在组件的index.ts重新命名加上Bi,便于识别和避免命名冲突。
108
+
109
+ ## 本地开发与调试
110
+
111
+ 在开发过程中,如果需要在其他项目中实时调试本组件库,可以使用 `link` 功能将本地开发版本链接到目标项目。
112
+
113
+
114
+ ### 使用 pnpm link
115
+ **步骤 1:在组件库项目中创建全局链接**
116
+
117
+ ```bash
118
+ # 在本项目根目录执行
119
+ pnpm link --global
120
+ ```
121
+
122
+ **步骤 2:在目标项目中链接组件库**
123
+
124
+ ```bash
125
+ # 进入需要使用组件库的项目目录
126
+ cd /path/to/your-project
127
+
128
+ # 链接本地组件库
129
+ pnpm link @zw-team/react-lib
130
+ ```
131
+
132
+ **步骤 3:开启监听模式**
133
+
134
+ 在组件库项目中运行监听模式,代码变更会自动编译:
135
+
136
+ ```bash
137
+ # 在本项目根目录执行
138
+ pnpm dev
139
+ ```
140
+
141
+ **取消链接(调试完毕)**
142
+
143
+ ```bash
144
+ # 在目标项目中执行
145
+ pnpm unlink @zw-team/react-lib
146
+ ```
147
+
148
+
149
+ ```
150
+
151
+ ### 注意事项
152
+
153
+ - 链接前请确保已执行 `pnpm build` 至少一次,保证 `dist/` 目录存在。
154
+ - 使用 `pnpm dev` 可以监听文件变化并自动编译,方便实时调试。
155
+ - 如果目标项目的依赖版本(React、Ant Design 等)与组件库不一致,可能会出现多实例问题,建议保持版本一致。
156
+ - 调试完成后记得取消链接,避免影响正常的包管理。
157
+
158
+ ## 构建与产物
159
+
160
+ - `pnpm build` 会在 `dist/` 目录生成每个组件的 ESM 代码与 `.d.ts` 类型文件。
161
+ - `rslib.config.ts` 中配置了多个入口点(`index`、`components`、`hooks`、`utils`),每个入口都会生成对应的 `.js` 和 `.d.ts` 文件。
162
+ - `bundle: false` 配置意味着各入口保持模块化输出,方便 Tree Shaking。
163
+ - 发布前请确认 `peerDependencies`(`react` / `react-dom` / `antd`)版本要求是否符合目标项目。
164
+
165
+ ## 目录结构(节选)
166
+
167
+ ```
168
+ .
169
+ ├── .storybook/ # Storybook 工程配置
170
+ ├── src/
171
+ │ ├── components/ # 组件目录
172
+ │ │ ├── Avatar/ # Avatar 组件
173
+ │ │ │ ├── Avatar.tsx
174
+ │ │ │ ├── index.ts # 导出:export { default as BiAvatar } from './Avatar'
175
+ │ │ │ └── types.ts # 类型定义
176
+ │ │ ├── Block/ # Block 组件
177
+ │ │ │ ├── Block.tsx
178
+ │ │ │ ├── Block.css
179
+ │ │ │ ├── index.ts
180
+ │ │ │ └── types.ts
181
+ │ │ ├── ... # 其他组件
182
+ │ │ └── index.ts # 组件统一导出入口
183
+ │ ├── hooks/ # 工具 Hooks
184
+ │ │ ├── useLatest.ts
185
+ │ │ ├── usePermission.ts
186
+ │ │ └── index.ts # Hooks 导出入口
187
+ │ ├── utils/ # 工具函数
188
+ │ │ ├── date.ts
189
+ │ │ ├── ossUpload.ts
190
+ │ │ ├── request/
191
+ │ │ └── index.ts # Utils 导出入口
192
+ │ └── index.ts # 主入口(导出所有组件)
193
+ ├── stories/ # Storybook 示例
194
+ ├── dist/ # 构建后产物(由 rslib 生成)
195
+ ├── rslib.config.ts # rslib 打包配置(多入口点配置)
196
+ ├── biome.json # Biome 规范配置
197
+ └── package.json # 包配置(exports 字段定义多入口点)
198
+ ```
199
+
200
+ ## 现有组件状态
201
+
202
+ - 项目已包含多个业务组件,如 `Avatar`、`Block`、`Form`、`DatePicker`、`Dialog`、`Pagination` 等。
203
+ - 所有组件统一使用 `Bi` 前缀命名(如 `BiAvatar`、`BiBlock`)。
204
+ - 组件均配置了对应的 Storybook 文档,可在开发时查看使用示例。
205
+ - 新增组件请遵循现有的目录结构和导出模式,确保文档与测试覆盖。
206
+
207
+ 如需更多约定或流程,可在本仓库新增文档说明,并同步更新此 README。欢迎在问题单或 PR 中提出改进建议。
@@ -0,0 +1,29 @@
1
+ declare class AccessReport {
2
+ systemName: string;
3
+ authorization: string;
4
+ baseUrl: string;
5
+ constructor({ system, authorization, env }: {
6
+ system?: string | undefined;
7
+ authorization?: string | undefined;
8
+ env?: string | undefined;
9
+ });
10
+ report(router: string, page: string): void;
11
+ loginReport(): void;
12
+ accessReportSavev(data: any): Promise<import("axios").AxiosResponse<any, any, {}>>;
13
+ browserType(): {
14
+ engine: string;
15
+ engineVs: string;
16
+ platform: string;
17
+ supporter: string;
18
+ supporterVs: string;
19
+ system: string;
20
+ systemVs: string;
21
+ } & ({
22
+ shell?: undefined;
23
+ shellVs?: undefined;
24
+ } | {
25
+ shell: string;
26
+ shellVs: string;
27
+ });
28
+ }
29
+ export default AccessReport;
@@ -0,0 +1,129 @@
1
+ import { getServiceURL } from "../../config/index.js";
2
+ import defaultRequest from "../../utils/request/defaultRequest.js";
3
+ class AccessReport_AccessReport {
4
+ systemName = '';
5
+ authorization = '';
6
+ baseUrl = 'https://zqapi.wozhangwan.com';
7
+ constructor({ system = '', authorization = '', env = 'production' }){
8
+ this.systemName = system;
9
+ this.authorization = authorization;
10
+ this.baseUrl = getServiceURL(void 0, env);
11
+ }
12
+ report(router, page) {
13
+ const params = {
14
+ system: this.systemName,
15
+ login_device: this.browserType(),
16
+ router: this.systemName + '-' + router,
17
+ page
18
+ };
19
+ this.accessReportSavev(params);
20
+ }
21
+ loginReport() {}
22
+ accessReportSavev(data) {
23
+ return defaultRequest({
24
+ url: this.baseUrl + '/api/access_log/record',
25
+ method: 'post',
26
+ headers: {
27
+ 'Login-Device': JSON.stringify(this.browserType())
28
+ },
29
+ data
30
+ });
31
+ }
32
+ browserType() {
33
+ const ua = navigator.userAgent.toLowerCase();
34
+ const testUa = (regexp)=>regexp.test(ua);
35
+ const testVs = (regexp)=>{
36
+ const res = ua.match(regexp) || '';
37
+ return res.toString().replace(/[^0-9|_.]/g, '').replace(/_/g, '.');
38
+ };
39
+ let system = 'other';
40
+ if (testUa(/windows|win32|win64|wow32|wow64/g)) system = 'windows';
41
+ else if (testUa(/macintosh|macintel/g)) system = 'macos';
42
+ else if (testUa(/x11/g)) system = 'linux';
43
+ else if (testUa(/android|adr/g)) system = 'android';
44
+ else if (testUa(/ios|iphone|ipad|ipod|iwatch/g)) system = 'ios';
45
+ let systemVs = 'unknow';
46
+ if ('windows' === system) {
47
+ if (testUa(/windows nt 5.0|windows 2000/g)) systemVs = '2000';
48
+ else if (testUa(/windows nt 5.1|windows xp/g)) systemVs = 'xp';
49
+ else if (testUa(/windows nt 5.2|windows 2003/g)) systemVs = '2003';
50
+ else if (testUa(/windows nt 6.0|windows vista/g)) systemVs = 'vista';
51
+ else if (testUa(/windows nt 6.1|windows 7/g)) systemVs = '7';
52
+ else if (testUa(/windows nt 6.2|windows 8/g)) systemVs = '8';
53
+ else if (testUa(/windows nt 6.3|windows 8.1/g)) systemVs = '8.1';
54
+ else if (testUa(/windows nt 10.0|windows 10/g)) systemVs = '10';
55
+ } else if ('macos' === system) systemVs = testVs(/os x [\d._]+/g);
56
+ else if ('android' === system) systemVs = testVs(/android [\d._]+/g);
57
+ else if ('ios' === system) systemVs = testVs(/os [\d._]+/g);
58
+ let platform = 'unknow';
59
+ if ('windows' === system || 'macos' === system || 'linux' === system) platform = 'desktop';
60
+ else if ('android' === system || 'ios' === system || testUa(/mobile/g)) platform = 'mobile';
61
+ let engine = 'unknow';
62
+ let supporter = 'unknow';
63
+ if (testUa(/applewebkit/g)) {
64
+ engine = 'webkit';
65
+ if (testUa(/edge/g)) supporter = 'edge';
66
+ else if (testUa(/opr/g)) supporter = 'opera';
67
+ else if (testUa(/chrome/g)) supporter = 'chrome';
68
+ else if (testUa(/safari/g)) supporter = 'safari';
69
+ else if (testUa(/dingtalk/g)) supporter = 'dingtalk';
70
+ } else if (testUa(/gecko/g) && testUa(/firefox/g)) {
71
+ engine = 'gecko';
72
+ supporter = 'firefox';
73
+ } else if (testUa(/presto/g)) {
74
+ engine = 'presto';
75
+ supporter = 'opera';
76
+ } else if (testUa(/trident|compatible|msie/g)) {
77
+ engine = 'trident';
78
+ supporter = 'iexplore';
79
+ }
80
+ let engineVs = 'unknow';
81
+ if ('webkit' === engine) engineVs = testVs(/applewebkit\/[\d._]+/g);
82
+ else if ('gecko' === engine) engineVs = testVs(/gecko\/[\d._]+/g);
83
+ else if ('presto' === engine) engineVs = testVs(/presto\/[\d._]+/g);
84
+ else if ('trident' === engine) engineVs = testVs(/trident\/[\d._]+/g);
85
+ let supporterVs = 'unknow';
86
+ if ('chrome' === supporter) supporterVs = testVs(/chrome\/[\d._]+/g);
87
+ else if ('safari' === supporter) supporterVs = testVs(/version\/[\d._]+/g);
88
+ else if ('firefox' === supporter) supporterVs = testVs(/firefox\/[\d._]+/g);
89
+ else if ('opera' === supporter) supporterVs = testVs(/opr\/[\d._]+/g);
90
+ else if ('iexplore' === supporter) supporterVs = testVs(/(msie [\d._]+)|(rv:[\d._]+)/g);
91
+ else if ('edge' === supporter) supporterVs = testVs(/edge\/[\d._]+/g);
92
+ else if ('dingtalk' === supporter) supporterVs = testVs(/dingtalk\/[\d._]+/);
93
+ let shell = 'none';
94
+ let shellVs = 'unknow';
95
+ if (testUa(/micromessenger/g)) {
96
+ shell = 'wechat';
97
+ shellVs = testVs(/micromessenger\/[\d._]+/g);
98
+ } else if (testUa(/qqbrowser/g)) {
99
+ shell = 'qq';
100
+ shellVs = testVs(/qqbrowser\/[\d._]+/g);
101
+ } else if (testUa(/ucbrowser/g)) {
102
+ shell = 'uc';
103
+ shellVs = testVs(/ucbrowser\/[\d._]+/g);
104
+ } else if (testUa(/qihu 360se/g)) shell = '360';
105
+ else if (testUa(/2345explorer/g)) {
106
+ shell = '2345';
107
+ shellVs = testVs(/2345explorer\/[\d._]+/g);
108
+ } else if (testUa(/metasr/g)) shell = 'sougou';
109
+ else if (testUa(/lbbrowser/g)) shell = 'liebao';
110
+ else if (testUa(/maxthon/g)) {
111
+ shell = 'maxthon';
112
+ shellVs = testVs(/maxthon\/[\d._]+/g);
113
+ }
114
+ return Object.assign({
115
+ engine,
116
+ engineVs,
117
+ platform,
118
+ supporter,
119
+ supporterVs,
120
+ system,
121
+ systemVs
122
+ }, 'none' === shell ? {} : {
123
+ shell,
124
+ shellVs
125
+ });
126
+ }
127
+ }
128
+ const AccessReport = AccessReport_AccessReport;
129
+ export { AccessReport as default };
@@ -0,0 +1,3 @@
1
+ import type { AvatarProps } from './types';
2
+ export declare const BiAvatar: React.FC<AvatarProps>;
3
+ export default BiAvatar;
@@ -0,0 +1,58 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { UserOutlined } from "@ant-design/icons";
3
+ import { Avatar, Badge, Dropdown } from "antd";
4
+ const BiAvatar = ({ image = '', badge = 0, dot = false, size = 'default', shape = 'circle', icon = /*#__PURE__*/ jsx(UserOutlined, {}), logout })=>{
5
+ const items = [
6
+ {
7
+ key: 'advice',
8
+ label: /*#__PURE__*/ jsx("a", {
9
+ target: "_blank",
10
+ rel: "noopener noreferrer",
11
+ href: "http://zq.wozhangwan.com/DemandFeedback.html",
12
+ children: "需求反馈"
13
+ })
14
+ },
15
+ {
16
+ key: 'logout',
17
+ label: /*#__PURE__*/ jsx("a", {
18
+ target: "_blank",
19
+ rel: "noopener noreferrer",
20
+ onClick: ()=>handleClick('logout'),
21
+ children: "退出登录"
22
+ })
23
+ }
24
+ ];
25
+ const handleClick = (key)=>{
26
+ switch(key){
27
+ case 'logout':
28
+ logout?.();
29
+ break;
30
+ default:
31
+ break;
32
+ }
33
+ };
34
+ return /*#__PURE__*/ jsx(Dropdown, {
35
+ menu: {
36
+ items
37
+ },
38
+ placement: "bottom",
39
+ arrow: true,
40
+ children: /*#__PURE__*/ jsx(Badge, {
41
+ count: badge,
42
+ dot: dot,
43
+ children: /*#__PURE__*/ jsx(Avatar, {
44
+ src: image ? /*#__PURE__*/ jsx("img", {
45
+ src: image + '?imageView2/1/w/80/h/80',
46
+ style: {
47
+ width: 32
48
+ }
49
+ }) : null,
50
+ size: size,
51
+ shape: shape,
52
+ icon: icon
53
+ })
54
+ })
55
+ });
56
+ };
57
+ const Avatar_Avatar = BiAvatar;
58
+ export { BiAvatar, Avatar_Avatar as default };
@@ -0,0 +1,2 @@
1
+ export { default as BiAvatar } from './Avatar';
2
+ export type { AvatarProps } from './types';
@@ -0,0 +1,2 @@
1
+ import Avatar from "./Avatar.js";
2
+ export { Avatar as BiAvatar };
@@ -0,0 +1,9 @@
1
+ export interface AvatarProps {
2
+ image?: string;
3
+ badge?: number;
4
+ dot?: boolean;
5
+ icon?: React.ReactNode;
6
+ size?: 'large' | 'small' | 'default';
7
+ shape?: 'circle' | 'square';
8
+ logout?: () => void;
9
+ }
File without changes
@@ -0,0 +1,8 @@
1
+ .block-box {
2
+ background: #fff;
3
+ border-radius: 4px;
4
+ padding: 20px;
5
+ }
6
+ .block-box + .block-box {
7
+ margin-top: 15px;
8
+ }
@@ -0,0 +1,4 @@
1
+ import './Block.css';
2
+ import type { BlockProps } from './types';
3
+ declare const Block: (props: BlockProps) => import("react/jsx-runtime").JSX.Element;
4
+ export default Block;
@@ -0,0 +1,11 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import "./Block.css";
3
+ const Block = (props)=>{
4
+ const { children } = props;
5
+ return /*#__PURE__*/ jsx("div", {
6
+ className: "block-box",
7
+ children: children
8
+ });
9
+ };
10
+ const Block_Block = Block;
11
+ export { Block_Block as default };
@@ -0,0 +1,2 @@
1
+ export { default as BiBlock } from './Block';
2
+ export type { BlockProps } from './types';
@@ -0,0 +1,2 @@
1
+ import Block from "./Block.js";
2
+ export { Block as BiBlock };
@@ -0,0 +1,3 @@
1
+ export interface BlockProps {
2
+ children: React.ReactNode;
3
+ }
File without changes
@@ -0,0 +1,4 @@
1
+ import type { ConfigProviderValue } from './types';
2
+ export declare const defaultConfig: ConfigProviderValue;
3
+ export declare const ConfigContext: import("react").Context<ConfigProviderValue>;
4
+ export declare const useConfig: () => ConfigProviderValue;
@@ -0,0 +1,19 @@
1
+ import { createContext, useContext } from "react";
2
+ const defaultConfig = {
3
+ contextValue: {
4
+ env: 'production',
5
+ system: '',
6
+ request: null,
7
+ needIcon: false,
8
+ iconInit: false,
9
+ iconList: {},
10
+ componentsKeys: ''
11
+ }
12
+ };
13
+ const ConfigContext = createContext(defaultConfig);
14
+ const useConfig = ()=>{
15
+ const context = useContext(ConfigContext);
16
+ if (!context) throw new Error('未获取到全局上下文');
17
+ return context;
18
+ };
19
+ export { ConfigContext, defaultConfig, useConfig };
@@ -0,0 +1,4 @@
1
+ import type React from 'react';
2
+ import type { ConfigProviderProps } from './types';
3
+ declare const ConfigProvider: React.FC<ConfigProviderProps>;
4
+ export default ConfigProvider;
@@ -0,0 +1,57 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { ConfigProvider } from "antd";
3
+ import js_cookie from "js-cookie";
4
+ import { useCallback, useEffect, useState } from "react";
5
+ import { loadIconMock, loadSvg } from "../../utils/svgIcon/index.js";
6
+ import AccessReport from "../AccessReport/index.js";
7
+ import { ConfigContext, defaultConfig } from "./ConfigContext.js";
8
+ const ConfigProvider_ConfigProvider_ConfigProvider = ({ children, antdConfig, ...restProps })=>{
9
+ const [contextValue, setContextValue] = useState({
10
+ ...defaultConfig.contextValue,
11
+ ...restProps
12
+ });
13
+ const updateConfig = useCallback((newConfig)=>{
14
+ setContextValue((prev)=>({
15
+ ...prev,
16
+ ...newConfig
17
+ }));
18
+ }, []);
19
+ const install = ()=>{
20
+ setContextValue((prev)=>({
21
+ ...prev,
22
+ componentsKeys: Date.now(),
23
+ $AccessReport: new AccessReport({
24
+ system: prev.system,
25
+ env: prev.env || 'production'
26
+ })
27
+ }));
28
+ window.$BI = contextValue;
29
+ window.$AccessReport = contextValue.$AccessReport;
30
+ window.$BiEnv = contextValue.env;
31
+ window.$BiSystem = contextValue.system;
32
+ js_cookie.set('$BiEnv', contextValue.env);
33
+ js_cookie.set('$BiSystem', contextValue.system);
34
+ loadSvg(contextValue.system, contextValue.env || 'production');
35
+ if (contextValue.needIcon) loadIconMock(contextValue.env || 'production', (data)=>{
36
+ updateConfig({
37
+ iconList: data.data,
38
+ iconInit: true
39
+ });
40
+ });
41
+ };
42
+ useEffect(()=>{
43
+ install();
44
+ }, []);
45
+ return /*#__PURE__*/ jsx(ConfigContext.Provider, {
46
+ value: {
47
+ contextValue,
48
+ updateConfig
49
+ },
50
+ children: /*#__PURE__*/ jsx(ConfigProvider, {
51
+ ...antdConfig,
52
+ children: children
53
+ })
54
+ });
55
+ };
56
+ const ConfigProvider_ConfigProvider = ConfigProvider_ConfigProvider_ConfigProvider;
57
+ export { ConfigProvider_ConfigProvider as default };
@@ -0,0 +1,2 @@
1
+ export { default as BiConfigProvider } from './ConfigProvider';
2
+ export type { ConfigProviderProps, ConfigProviderValue, ContextValue, } from './types';
@@ -0,0 +1,2 @@
1
+ import ConfigProvider from "./ConfigProvider.js";
2
+ export { ConfigProvider as BiConfigProvider };
@@ -0,0 +1,19 @@
1
+ import type { ConfigProviderProps as AntdConfigProviderProps } from 'antd';
2
+ export interface ContextValue {
3
+ env: string;
4
+ system: string;
5
+ request: any;
6
+ needIcon: boolean;
7
+ iconInit: boolean;
8
+ iconList: Record<string, any>;
9
+ componentsKeys: string | number;
10
+ [key: string]: any;
11
+ }
12
+ export interface ConfigProviderValue {
13
+ contextValue: ContextValue;
14
+ updateConfig?: (newConfig: Partial<ContextValue>) => void;
15
+ }
16
+ export interface ConfigProviderProps extends Partial<ContextValue> {
17
+ children?: React.ReactNode;
18
+ antdConfig?: Omit<AntdConfigProviderProps, 'children'>;
19
+ }
File without changes
@@ -0,0 +1,4 @@
1
+ import './CustomColumn.scss';
2
+ import type { CustomColumnProps } from './types';
3
+ declare const CustomColumn: React.FC<CustomColumnProps>;
4
+ export default CustomColumn;