@cozeloop/components 0.0.2 → 0.0.4

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 (461) hide show
  1. package/README.md +82 -1
  2. package/dist/es/index.css +661 -0
  3. package/dist/es/index.js +6044 -65
  4. package/dist/es/static/svg/select.svg +1 -0
  5. package/dist/lib/base-search-select/base-search-form-select.d.ts +3 -0
  6. package/dist/lib/base-search-select/base-search-form-select.js +6 -0
  7. package/dist/lib/base-search-select/base-search-form-select.js.map +1 -0
  8. package/dist/lib/base-search-select/base-search-select.d.ts +9 -0
  9. package/dist/lib/base-search-select/base-search-select.js +127 -0
  10. package/dist/lib/base-search-select/base-search-select.js.map +1 -0
  11. package/dist/lib/base-search-select/index.d.ts +3 -0
  12. package/dist/lib/base-search-select/index.js +3 -0
  13. package/dist/lib/base-search-select/index.js.map +1 -0
  14. package/dist/lib/base-search-select/types.d.ts +13 -0
  15. package/dist/lib/base-search-select/types.js +2 -0
  16. package/dist/lib/base-search-select/types.js.map +1 -0
  17. package/dist/lib/base-search-select/utils.d.ts +8 -0
  18. package/dist/lib/base-search-select/utils.js +48 -0
  19. package/dist/lib/base-search-select/utils.js.map +1 -0
  20. package/dist/lib/basic-card/index.d.ts +7 -0
  21. package/dist/lib/basic-card/index.js +4 -0
  22. package/dist/lib/basic-card/index.js.map +1 -0
  23. package/dist/lib/card-pane/index.d.ts +5 -0
  24. package/dist/lib/card-pane/index.js +9 -0
  25. package/dist/lib/card-pane/index.js.map +1 -0
  26. package/dist/lib/chip-select/index.d.ts +2 -0
  27. package/dist/lib/chip-select/index.js +6 -0
  28. package/dist/lib/chip-select/index.js.map +1 -0
  29. package/dist/lib/code-editor/index.d.ts +3 -0
  30. package/dist/lib/code-editor/index.js +7 -0
  31. package/dist/lib/code-editor/index.js.map +1 -0
  32. package/dist/lib/code-usage/index.d.ts +14 -0
  33. package/dist/lib/code-usage/index.js +31 -0
  34. package/dist/lib/code-usage/index.js.map +1 -0
  35. package/dist/lib/codemirror-editor/code-editor.d.ts +2 -0
  36. package/dist/lib/codemirror-editor/code-editor.js +108 -0
  37. package/dist/lib/codemirror-editor/code-editor.js.map +1 -0
  38. package/dist/lib/codemirror-editor/index.d.ts +4 -0
  39. package/dist/lib/codemirror-editor/index.js +5 -0
  40. package/dist/lib/codemirror-editor/index.js.map +1 -0
  41. package/dist/lib/codemirror-editor/json-editor.d.ts +19 -0
  42. package/dist/lib/codemirror-editor/json-editor.js +97 -0
  43. package/dist/lib/codemirror-editor/json-editor.js.map +1 -0
  44. package/dist/lib/codemirror-editor/raw-text-editor.d.ts +11 -0
  45. package/dist/lib/codemirror-editor/raw-text-editor.js +32 -0
  46. package/dist/lib/codemirror-editor/raw-text-editor.js.map +1 -0
  47. package/dist/lib/codemirror-editor/text-editor.d.ts +2 -0
  48. package/dist/lib/codemirror-editor/text-editor.js +44 -0
  49. package/dist/lib/codemirror-editor/text-editor.js.map +1 -0
  50. package/dist/lib/codemirror-editor/themes/coze-dark.d.ts +1 -0
  51. package/dist/lib/codemirror-editor/themes/coze-dark.js +113 -0
  52. package/dist/lib/codemirror-editor/themes/coze-dark.js.map +1 -0
  53. package/dist/lib/codemirror-editor/themes/coze-light.d.ts +1 -0
  54. package/dist/lib/codemirror-editor/themes/coze-light.js +119 -0
  55. package/dist/lib/codemirror-editor/themes/coze-light.js.map +1 -0
  56. package/dist/lib/collapse-card/index.d.ts +13 -0
  57. package/dist/lib/collapse-card/index.js +31 -0
  58. package/dist/lib/collapse-card/index.js.map +1 -0
  59. package/dist/lib/collapsible-card/index.d.ts +13 -0
  60. package/dist/lib/collapsible-card/index.js +12 -78
  61. package/dist/lib/collapsible-card/index.js.map +1 -0
  62. package/dist/{types → lib}/column-manage-storage/index.d.ts +6 -6
  63. package/dist/lib/column-manage-storage/index.js +43 -93
  64. package/dist/lib/column-manage-storage/index.js.map +1 -0
  65. package/dist/lib/columns-select/index.d.ts +19 -0
  66. package/dist/lib/columns-select/index.js +73 -237
  67. package/dist/lib/columns-select/index.js.map +1 -0
  68. package/dist/lib/edit-icon-button/index.d.ts +8 -0
  69. package/dist/lib/edit-icon-button/index.js +13 -0
  70. package/dist/lib/edit-icon-button/index.js.map +1 -0
  71. package/dist/lib/footer-actions/index.d.ts +15 -0
  72. package/dist/lib/footer-actions/index.js +9 -0
  73. package/dist/lib/footer-actions/index.js.map +1 -0
  74. package/dist/{types → lib}/hooks/use-infinite-scroll.d.ts +12 -12
  75. package/dist/lib/hooks/use-infinite-scroll.js +130 -192
  76. package/dist/lib/hooks/use-infinite-scroll.js.map +1 -0
  77. package/dist/lib/hooks/use-mouse-down-offset.d.ts +9 -0
  78. package/dist/lib/hooks/use-mouse-down-offset.js +38 -64
  79. package/dist/lib/hooks/use-mouse-down-offset.js.map +1 -0
  80. package/dist/lib/hooks/use-unsave-leave-warning.d.ts +12 -0
  81. package/dist/lib/hooks/use-unsave-leave-warning.js +33 -0
  82. package/dist/lib/hooks/use-unsave-leave-warning.js.map +1 -0
  83. package/dist/lib/id-render/icon-button-container.d.ts +8 -0
  84. package/dist/lib/id-render/icon-button-container.js +7 -88
  85. package/dist/lib/id-render/icon-button-container.js.map +1 -0
  86. package/dist/lib/id-render/index.d.ts +7 -0
  87. package/dist/lib/id-render/index.js +20 -111
  88. package/dist/lib/id-render/index.js.map +1 -0
  89. package/dist/lib/index-controller/record-navigation.d.ts +6 -0
  90. package/dist/lib/index-controller/record-navigation.js +9 -0
  91. package/dist/lib/index-controller/record-navigation.js.map +1 -0
  92. package/dist/lib/index-controller/use-item-index-controller.d.ts +47 -0
  93. package/dist/lib/index-controller/use-item-index-controller.js +123 -0
  94. package/dist/lib/index-controller/use-item-index-controller.js.map +1 -0
  95. package/dist/lib/index.d.ts +70 -0
  96. package/dist/lib/index.js +76 -110
  97. package/dist/lib/index.js.map +1 -0
  98. package/dist/{types → lib}/infinite-scroll-table/index.d.ts +6 -6
  99. package/dist/lib/infinite-scroll-table/index.js +31 -123
  100. package/dist/lib/infinite-scroll-table/index.js.map +1 -0
  101. package/dist/lib/info-tooltip/index.d.ts +9 -0
  102. package/dist/lib/info-tooltip/index.js +9 -0
  103. package/dist/lib/info-tooltip/index.js.map +1 -0
  104. package/dist/lib/input-components/radio-button.d.ts +14 -0
  105. package/dist/lib/input-components/radio-button.js +21 -0
  106. package/dist/lib/input-components/radio-button.js.map +1 -0
  107. package/dist/lib/input-slider/index.d.ts +15 -0
  108. package/dist/lib/input-slider/index.js +73 -146
  109. package/dist/lib/input-slider/index.js.map +1 -0
  110. package/dist/lib/input-with-count/index.d.ts +2 -0
  111. package/dist/lib/input-with-count/index.js +7 -0
  112. package/dist/lib/input-with-count/index.js.map +1 -0
  113. package/dist/lib/jump-button/jump-icon-button.d.ts +4 -0
  114. package/dist/lib/jump-button/jump-icon-button.js +7 -0
  115. package/dist/lib/jump-button/jump-icon-button.js.map +1 -0
  116. package/dist/{types → lib}/large-txt-render/index.d.ts +2 -2
  117. package/dist/lib/large-txt-render/index.js +24 -60
  118. package/dist/lib/large-txt-render/index.js.map +1 -0
  119. package/dist/lib/layout/content.d.ts +7 -0
  120. package/dist/lib/layout/content.js +5 -0
  121. package/dist/lib/layout/content.js.map +1 -0
  122. package/dist/lib/layout/header.d.ts +7 -0
  123. package/dist/lib/layout/header.js +6 -0
  124. package/dist/lib/layout/header.js.map +1 -0
  125. package/dist/lib/layout/index.d.ts +12 -0
  126. package/dist/lib/layout/index.js +9 -0
  127. package/dist/lib/layout/index.js.map +1 -0
  128. package/dist/lib/layout/tabs.d.ts +6 -0
  129. package/dist/lib/layout/tabs.js +10 -0
  130. package/dist/lib/layout/tabs.js.map +1 -0
  131. package/dist/lib/lazy-load-component/index.d.ts +5 -0
  132. package/dist/lib/lazy-load-component/index.js +42 -0
  133. package/dist/lib/lazy-load-component/index.js.map +1 -0
  134. package/dist/lib/logic-editor/index.d.ts +3 -0
  135. package/dist/lib/logic-editor/index.js +3 -0
  136. package/dist/lib/logic-editor/index.js.map +1 -0
  137. package/dist/lib/logic-editor/logic-editor.d.ts +17 -0
  138. package/dist/lib/logic-editor/logic-editor.js +69 -0
  139. package/dist/lib/logic-editor/logic-editor.js.map +1 -0
  140. package/dist/lib/logic-editor/logic-left-render.d.ts +3 -0
  141. package/dist/lib/logic-editor/logic-left-render.js +60 -0
  142. package/dist/lib/logic-editor/logic-left-render.js.map +1 -0
  143. package/dist/lib/logic-editor/logic-operator-render.d.ts +3 -0
  144. package/dist/lib/logic-editor/logic-operator-render.js +29 -0
  145. package/dist/lib/logic-editor/logic-operator-render.js.map +1 -0
  146. package/dist/lib/logic-editor/logic-right-render.d.ts +3 -0
  147. package/dist/lib/logic-editor/logic-right-render.js +25 -0
  148. package/dist/lib/logic-editor/logic-right-render.js.map +1 -0
  149. package/dist/lib/logic-editor/logic-types.d.ts +49 -0
  150. package/dist/lib/logic-editor/logic-types.js +136 -0
  151. package/dist/lib/logic-editor/logic-types.js.map +1 -0
  152. package/dist/lib/logic-editor/utils.d.ts +2 -0
  153. package/dist/lib/logic-editor/utils.js +18 -0
  154. package/dist/lib/logic-editor/utils.js.map +1 -0
  155. package/dist/lib/logic-expr/consts.d.ts +2 -0
  156. package/dist/lib/logic-expr/consts.js +5 -0
  157. package/dist/lib/logic-expr/consts.js.map +1 -0
  158. package/dist/lib/logic-expr/expr-group-render.d.ts +2 -0
  159. package/dist/lib/logic-expr/expr-group-render.js +61 -0
  160. package/dist/lib/logic-expr/expr-group-render.js.map +1 -0
  161. package/dist/lib/logic-expr/expr-render.d.ts +2 -0
  162. package/dist/lib/logic-expr/expr-render.js +85 -0
  163. package/dist/lib/logic-expr/expr-render.js.map +1 -0
  164. package/dist/lib/logic-expr/index.d.ts +2 -0
  165. package/dist/lib/logic-expr/index.js +2 -0
  166. package/dist/lib/logic-expr/index.js.map +1 -0
  167. package/dist/lib/logic-expr/logic-expr.d.ts +2 -0
  168. package/dist/lib/logic-expr/logic-expr.js +187 -0
  169. package/dist/lib/logic-expr/logic-expr.js.map +1 -0
  170. package/dist/lib/logic-expr/logic-not.d.ts +10 -0
  171. package/dist/lib/logic-expr/logic-not.js +21 -0
  172. package/dist/lib/logic-expr/logic-not.js.map +1 -0
  173. package/dist/lib/logic-expr/logic-toggle.d.ts +12 -0
  174. package/dist/lib/logic-expr/logic-toggle.js +33 -0
  175. package/dist/lib/logic-expr/logic-toggle.js.map +1 -0
  176. package/dist/lib/logic-expr/types.d.ts +79 -0
  177. package/dist/lib/logic-expr/types.js +2 -0
  178. package/dist/lib/logic-expr/types.js.map +1 -0
  179. package/dist/lib/loop-radio-group/index.d.ts +2 -0
  180. package/dist/lib/loop-radio-group/index.js +7 -0
  181. package/dist/lib/loop-radio-group/index.js.map +1 -0
  182. package/dist/lib/multi-part-editor/components/image-item-renderer.d.ts +14 -0
  183. package/dist/lib/multi-part-editor/components/image-item-renderer.js +57 -0
  184. package/dist/lib/multi-part-editor/components/image-item-renderer.js.map +1 -0
  185. package/dist/lib/multi-part-editor/components/multipart-item-renderer.d.ts +10 -0
  186. package/dist/lib/multi-part-editor/components/multipart-item-renderer.js +25 -0
  187. package/dist/lib/multi-part-editor/components/multipart-item-renderer.js.map +1 -0
  188. package/dist/lib/multi-part-editor/components/url-input-modal.d.ts +14 -0
  189. package/dist/lib/multi-part-editor/components/url-input-modal.js +150 -0
  190. package/dist/lib/multi-part-editor/components/url-input-modal.js.map +1 -0
  191. package/dist/lib/multi-part-editor/components/video-item-renderer.d.ts +14 -0
  192. package/dist/lib/multi-part-editor/components/video-item-renderer.js +57 -0
  193. package/dist/lib/multi-part-editor/components/video-item-renderer.js.map +1 -0
  194. package/dist/lib/multi-part-editor/index.d.ts +3 -0
  195. package/dist/lib/multi-part-editor/index.js +300 -0
  196. package/dist/lib/multi-part-editor/index.js.map +1 -0
  197. package/dist/lib/multi-part-editor/multi-part-render.d.ts +10 -0
  198. package/dist/lib/multi-part-editor/multi-part-render.js +40 -0
  199. package/dist/lib/multi-part-editor/multi-part-render.js.map +1 -0
  200. package/dist/lib/multi-part-editor/type.d.ts +81 -0
  201. package/dist/lib/multi-part-editor/type.js +25 -0
  202. package/dist/lib/multi-part-editor/type.js.map +1 -0
  203. package/dist/lib/multi-part-editor/upload-button.d.ts +23 -0
  204. package/dist/lib/multi-part-editor/upload-button.js +103 -0
  205. package/dist/lib/multi-part-editor/upload-button.js.map +1 -0
  206. package/dist/lib/multi-part-editor/utils.d.ts +16 -0
  207. package/dist/lib/multi-part-editor/utils.js +43 -0
  208. package/dist/lib/multi-part-editor/utils.js.map +1 -0
  209. package/dist/lib/open-detail-button/index.d.ts +6 -0
  210. package/dist/lib/open-detail-button/index.js +11 -0
  211. package/dist/lib/open-detail-button/index.js.map +1 -0
  212. package/dist/lib/page-content/index.d.ts +20 -0
  213. package/dist/lib/page-content/index.js +17 -130
  214. package/dist/lib/page-content/index.js.map +1 -0
  215. package/dist/lib/primary-page/index.d.ts +1 -0
  216. package/dist/lib/primary-page/index.js +2 -28
  217. package/dist/lib/primary-page/index.js.map +1 -0
  218. package/dist/lib/primary-page/primary-header.d.ts +13 -0
  219. package/dist/lib/primary-page/primary-header.js +4 -72
  220. package/dist/lib/primary-page/primary-header.js.map +1 -0
  221. package/dist/lib/primary-title/index.d.ts +6 -0
  222. package/dist/lib/primary-title/index.js +8 -0
  223. package/dist/lib/primary-title/index.js.map +1 -0
  224. package/dist/lib/provider/index.d.ts +18 -0
  225. package/dist/lib/provider/index.js +43 -0
  226. package/dist/lib/provider/index.js.map +1 -0
  227. package/dist/lib/resizable-side-sheet/index.d.ts +10 -0
  228. package/dist/lib/resizable-side-sheet/index.js +32 -0
  229. package/dist/lib/resizable-side-sheet/index.js.map +1 -0
  230. package/dist/{types → lib}/resize-sidesheet/index.d.ts +4 -3
  231. package/dist/lib/resize-sidesheet/index.js +15 -129
  232. package/dist/lib/resize-sidesheet/index.js.map +1 -0
  233. package/dist/lib/resize-sidesheet/use-drag.d.ts +11 -0
  234. package/dist/lib/resize-sidesheet/use-drag.js +26 -51
  235. package/dist/lib/resize-sidesheet/use-drag.js.map +1 -0
  236. package/dist/lib/schema-editor/index.d.ts +11 -0
  237. package/dist/lib/schema-editor/index.js +5 -0
  238. package/dist/lib/schema-editor/index.js.map +1 -0
  239. package/dist/lib/search-form/index.d.ts +15 -0
  240. package/dist/lib/search-form/index.js +77 -0
  241. package/dist/lib/search-form/index.js.map +1 -0
  242. package/dist/lib/semi-schema-form/components/tmpls/array-field-item.d.ts +6 -0
  243. package/dist/lib/semi-schema-form/components/tmpls/array-field-item.js +19 -0
  244. package/dist/lib/semi-schema-form/components/tmpls/array-field-item.js.map +1 -0
  245. package/dist/lib/semi-schema-form/components/tmpls/array-field.d.ts +6 -0
  246. package/dist/lib/semi-schema-form/components/tmpls/array-field.js +39 -0
  247. package/dist/lib/semi-schema-form/components/tmpls/array-field.js.map +1 -0
  248. package/dist/lib/semi-schema-form/components/tmpls/base-input.d.ts +8 -0
  249. package/dist/lib/semi-schema-form/components/tmpls/base-input.js +32 -0
  250. package/dist/lib/semi-schema-form/components/tmpls/base-input.js.map +1 -0
  251. package/dist/lib/semi-schema-form/components/tmpls/description-field.d.ts +6 -0
  252. package/dist/lib/semi-schema-form/components/tmpls/description-field.js +13 -0
  253. package/dist/lib/semi-schema-form/components/tmpls/description-field.js.map +1 -0
  254. package/dist/lib/semi-schema-form/components/tmpls/error-list.d.ts +6 -0
  255. package/dist/lib/semi-schema-form/components/tmpls/error-list.js +14 -0
  256. package/dist/lib/semi-schema-form/components/tmpls/error-list.js.map +1 -0
  257. package/dist/lib/semi-schema-form/components/tmpls/field-error.d.ts +6 -0
  258. package/dist/lib/semi-schema-form/components/tmpls/field-error.js +16 -0
  259. package/dist/lib/semi-schema-form/components/tmpls/field-error.js.map +1 -0
  260. package/dist/lib/semi-schema-form/components/tmpls/field.d.ts +7 -0
  261. package/dist/lib/semi-schema-form/components/tmpls/field.js +21 -0
  262. package/dist/lib/semi-schema-form/components/tmpls/field.js.map +1 -0
  263. package/dist/lib/semi-schema-form/components/tmpls/icon-button.d.ts +11 -0
  264. package/dist/lib/semi-schema-form/components/tmpls/icon-button.js +29 -0
  265. package/dist/lib/semi-schema-form/components/tmpls/icon-button.js.map +1 -0
  266. package/dist/lib/semi-schema-form/components/tmpls/index.d.ts +2 -0
  267. package/dist/lib/semi-schema-form/components/tmpls/index.js +31 -0
  268. package/dist/lib/semi-schema-form/components/tmpls/index.js.map +1 -0
  269. package/dist/lib/semi-schema-form/components/tmpls/object-field.d.ts +8 -0
  270. package/dist/lib/semi-schema-form/components/tmpls/object-field.js +81 -0
  271. package/dist/lib/semi-schema-form/components/tmpls/object-field.js.map +1 -0
  272. package/dist/lib/semi-schema-form/components/tmpls/submit.d.ts +4 -0
  273. package/dist/lib/semi-schema-form/components/tmpls/submit.js +13 -0
  274. package/dist/lib/semi-schema-form/components/tmpls/submit.js.map +1 -0
  275. package/dist/lib/semi-schema-form/components/tmpls/title-field.d.ts +6 -0
  276. package/dist/lib/semi-schema-form/components/tmpls/title-field.js +12 -0
  277. package/dist/lib/semi-schema-form/components/tmpls/title-field.js.map +1 -0
  278. package/dist/lib/semi-schema-form/components/widgets/checkbox.d.ts +7 -0
  279. package/dist/lib/semi-schema-form/components/widgets/checkbox.js +26 -0
  280. package/dist/lib/semi-schema-form/components/widgets/checkbox.js.map +1 -0
  281. package/dist/lib/semi-schema-form/components/widgets/checkboxs.d.ts +7 -0
  282. package/dist/lib/semi-schema-form/components/widgets/checkboxs.js +27 -0
  283. package/dist/lib/semi-schema-form/components/widgets/checkboxs.js.map +1 -0
  284. package/dist/lib/semi-schema-form/components/widgets/index.d.ts +2 -0
  285. package/dist/lib/semi-schema-form/components/widgets/index.js +15 -0
  286. package/dist/lib/semi-schema-form/components/widgets/index.js.map +1 -0
  287. package/dist/lib/semi-schema-form/components/widgets/radio.d.ts +7 -0
  288. package/dist/lib/semi-schema-form/components/widgets/radio.js +27 -0
  289. package/dist/lib/semi-schema-form/components/widgets/radio.js.map +1 -0
  290. package/dist/lib/semi-schema-form/components/widgets/range.d.ts +7 -0
  291. package/dist/lib/semi-schema-form/components/widgets/range.js +26 -0
  292. package/dist/lib/semi-schema-form/components/widgets/range.js.map +1 -0
  293. package/dist/lib/semi-schema-form/components/widgets/select.d.ts +7 -0
  294. package/dist/lib/semi-schema-form/components/widgets/select.js +44 -0
  295. package/dist/lib/semi-schema-form/components/widgets/select.js.map +1 -0
  296. package/dist/lib/semi-schema-form/components/widgets/textarea.d.ts +6 -0
  297. package/dist/lib/semi-schema-form/components/widgets/textarea.js +18 -0
  298. package/dist/lib/semi-schema-form/components/widgets/textarea.js.map +1 -0
  299. package/dist/lib/semi-schema-form/index.d.ts +4 -0
  300. package/dist/lib/semi-schema-form/index.js +9 -0
  301. package/dist/lib/semi-schema-form/index.js.map +1 -0
  302. package/dist/lib/sentinel-form/enum.d.ts +8 -0
  303. package/dist/lib/sentinel-form/enum.js +15 -0
  304. package/dist/lib/sentinel-form/enum.js.map +1 -0
  305. package/dist/lib/sentinel-form/index.d.ts +20 -0
  306. package/dist/lib/sentinel-form/index.js +289 -0
  307. package/dist/lib/sentinel-form/index.js.map +1 -0
  308. package/dist/lib/step-nav/index.d.ts +12 -0
  309. package/dist/lib/step-nav/index.js +13 -0
  310. package/dist/lib/step-nav/index.js.map +1 -0
  311. package/dist/{types → lib}/table/index.d.ts +1 -1
  312. package/dist/lib/table/index.js +6 -88
  313. package/dist/lib/table/index.js.map +1 -0
  314. package/dist/lib/table/sort-icon.d.ts +8 -0
  315. package/dist/lib/table/sort-icon.js +25 -132
  316. package/dist/lib/table/sort-icon.js.map +1 -0
  317. package/dist/lib/table/table-with-pagination.d.ts +21 -0
  318. package/dist/lib/table/table-with-pagination.js +71 -143
  319. package/dist/lib/table/table-with-pagination.js.map +1 -0
  320. package/dist/lib/table/table-without-pagniation.d.ts +6 -0
  321. package/dist/lib/table/table-without-pagniation.js +36 -107
  322. package/dist/lib/table/table-without-pagniation.js.map +1 -0
  323. package/dist/lib/table-batch-operate/table-batch-operation.d.ts +9 -0
  324. package/dist/lib/table-batch-operate/table-batch-operation.js +14 -0
  325. package/dist/lib/table-batch-operate/table-batch-operation.js.map +1 -0
  326. package/dist/lib/table-batch-operate/use-batch-operate.d.ts +30 -0
  327. package/dist/lib/table-batch-operate/use-batch-operate.js +71 -0
  328. package/dist/lib/table-batch-operate/use-batch-operate.js.map +1 -0
  329. package/dist/lib/table-col-actions/index.d.ts +22 -0
  330. package/dist/lib/table-col-actions/index.js +34 -122
  331. package/dist/lib/table-col-actions/index.js.map +1 -0
  332. package/dist/lib/table-cols-config/index.d.ts +11 -0
  333. package/dist/lib/table-cols-config/index.js +57 -0
  334. package/dist/lib/table-cols-config/index.js.map +1 -0
  335. package/dist/lib/table-cols-config/type.d.ts +6 -0
  336. package/dist/lib/table-cols-config/type.js +2 -0
  337. package/dist/lib/table-cols-config/type.js.map +1 -0
  338. package/dist/lib/table-cols-config/use-hidden-col-keys.d.ts +5 -0
  339. package/dist/lib/table-cols-config/use-hidden-col-keys.js +32 -0
  340. package/dist/lib/table-cols-config/use-hidden-col-keys.js.map +1 -0
  341. package/dist/lib/table-cols-config/util.d.ts +3 -0
  342. package/dist/lib/table-cols-config/util.js +39 -0
  343. package/dist/lib/table-cols-config/util.js.map +1 -0
  344. package/dist/lib/table-empty/index.d.ts +2 -0
  345. package/dist/lib/table-empty/index.js +10 -0
  346. package/dist/lib/table-empty/index.js.map +1 -0
  347. package/dist/lib/table-header/index.d.ts +14 -0
  348. package/dist/lib/table-header/index.js +10 -95
  349. package/dist/lib/table-header/index.js.map +1 -0
  350. package/dist/{types → lib}/tabs/index.d.ts +1 -1
  351. package/dist/lib/tabs/index.js +9 -74
  352. package/dist/lib/tabs/index.js.map +1 -0
  353. package/dist/lib/text-area-pro/index.d.ts +6 -0
  354. package/dist/lib/text-area-pro/index.js +10 -0
  355. package/dist/lib/text-area-pro/index.js.map +1 -0
  356. package/dist/lib/text-with-copy/index.d.ts +14 -0
  357. package/dist/lib/text-with-copy/index.js +23 -104
  358. package/dist/lib/text-with-copy/index.js.map +1 -0
  359. package/dist/lib/title-with-sub/index.d.ts +7 -0
  360. package/dist/lib/title-with-sub/index.js +6 -0
  361. package/dist/lib/title-with-sub/index.js.map +1 -0
  362. package/dist/lib/tooltip-when-disabled/index.d.ts +6 -0
  363. package/dist/lib/tooltip-when-disabled/index.js +9 -0
  364. package/dist/lib/tooltip-when-disabled/index.js.map +1 -0
  365. package/dist/lib/tooltip-with-disabled/index.d.ts +5 -0
  366. package/dist/lib/tooltip-with-disabled/index.js +7 -69
  367. package/dist/lib/tooltip-with-disabled/index.js.map +1 -0
  368. package/dist/lib/tsconfig.build.tsbuildinfo +1 -0
  369. package/dist/lib/upload/index.d.ts +9 -0
  370. package/dist/lib/upload/index.js +25 -0
  371. package/dist/lib/upload/index.js.map +1 -0
  372. package/dist/lib/user-profile/index.d.ts +9 -0
  373. package/dist/lib/user-profile/index.js +21 -0
  374. package/dist/lib/user-profile/index.js.map +1 -0
  375. package/dist/lib/utils/basic.d.ts +2 -0
  376. package/dist/lib/utils/basic.js +27 -76
  377. package/dist/lib/utils/basic.js.map +1 -0
  378. package/dist/lib/version-list/version-descriptions.d.ts +15 -0
  379. package/dist/lib/version-list/version-descriptions.js +14 -0
  380. package/dist/lib/version-list/version-descriptions.js.map +1 -0
  381. package/dist/lib/version-list/version-item.d.ts +9 -0
  382. package/dist/lib/version-list/version-item.js +6 -0
  383. package/dist/lib/version-list/version-item.js.map +1 -0
  384. package/dist/lib/version-list/version-list.d.ts +11 -0
  385. package/dist/lib/version-list/version-list.js +11 -0
  386. package/dist/lib/version-list/version-list.js.map +1 -0
  387. package/dist/lib/version-list/version-switch-panel.d.ts +5 -0
  388. package/dist/lib/version-list/version-switch-panel.js +10 -0
  389. package/dist/lib/version-list/version-switch-panel.js.map +1 -0
  390. package/package.json +31 -21
  391. package/dist/es/collapsible-card/index.js +0 -45
  392. package/dist/es/collapsible-card/index.module.js +0 -5
  393. package/dist/es/collapsible-card/index_module.css +0 -48
  394. package/dist/es/column-manage-storage/index.js +0 -73
  395. package/dist/es/columns-select/index.js +0 -219
  396. package/dist/es/hooks/use-infinite-scroll.js +0 -178
  397. package/dist/es/hooks/use-mouse-down-offset.js +0 -41
  398. package/dist/es/id-render/icon-button-container.js +0 -61
  399. package/dist/es/id-render/index.js +0 -78
  400. package/dist/es/infinite-scroll-table/index.js +0 -98
  401. package/dist/es/input-slider/index.js +0 -123
  402. package/dist/es/input-slider/index.module.js +0 -5
  403. package/dist/es/input-slider/index_module.css +0 -21
  404. package/dist/es/large-txt-render/index.js +0 -38
  405. package/dist/es/page-content/index.js +0 -108
  406. package/dist/es/primary-page/index.js +0 -4
  407. package/dist/es/primary-page/primary-header.js +0 -38
  408. package/dist/es/resize-sidesheet/index.js +0 -100
  409. package/dist/es/resize-sidesheet/index.module.js +0 -5
  410. package/dist/es/resize-sidesheet/index_module.css +0 -9
  411. package/dist/es/resize-sidesheet/use-drag.js +0 -31
  412. package/dist/es/table/index.js +0 -56
  413. package/dist/es/table/index.module.js +0 -5
  414. package/dist/es/table/index_module.css +0 -90
  415. package/dist/es/table/sort-icon.js +0 -105
  416. package/dist/es/table/table-with-pagination.js +0 -112
  417. package/dist/es/table/table-without-pagniation.js +0 -74
  418. package/dist/es/table-col-actions/index.js +0 -103
  419. package/dist/es/table-header/index.js +0 -68
  420. package/dist/es/table-header/index.module.js +0 -5
  421. package/dist/es/table-header/index_module.css +0 -3
  422. package/dist/es/tabs/index.js +0 -42
  423. package/dist/es/tabs/index.module.js +0 -5
  424. package/dist/es/tabs/index_module.css +0 -37
  425. package/dist/es/text-with-copy/index.js +0 -71
  426. package/dist/es/tooltip-with-disabled/index.js +0 -49
  427. package/dist/es/utils/basic.js +0 -44
  428. package/dist/es/utils/rect.js +0 -37
  429. package/dist/lib/collapsible-card/index.module.js +0 -25
  430. package/dist/lib/collapsible-card/index_module.css +0 -48
  431. package/dist/lib/input-slider/index.module.js +0 -25
  432. package/dist/lib/input-slider/index_module.css +0 -21
  433. package/dist/lib/resize-sidesheet/index.module.js +0 -25
  434. package/dist/lib/resize-sidesheet/index_module.css +0 -9
  435. package/dist/lib/table/index.module.js +0 -25
  436. package/dist/lib/table/index_module.css +0 -90
  437. package/dist/lib/table-header/index.module.js +0 -25
  438. package/dist/lib/table-header/index_module.css +0 -3
  439. package/dist/lib/tabs/index.module.js +0 -25
  440. package/dist/lib/tabs/index_module.css +0 -37
  441. package/dist/lib/utils/rect.js +0 -65
  442. package/dist/types/collapsible-card/index.d.ts +0 -22
  443. package/dist/types/columns-select/index.d.ts +0 -29
  444. package/dist/types/hooks/use-mouse-down-offset.d.ts +0 -9
  445. package/dist/types/id-render/icon-button-container.d.ts +0 -12
  446. package/dist/types/id-render/index.d.ts +0 -13
  447. package/dist/types/index.d.ts +0 -19
  448. package/dist/types/input-slider/index.d.ts +0 -14
  449. package/dist/types/page-content/index.d.ts +0 -36
  450. package/dist/types/primary-page/index.d.ts +0 -1
  451. package/dist/types/primary-page/primary-header.d.ts +0 -17
  452. package/dist/types/resize-sidesheet/use-drag.d.ts +0 -10
  453. package/dist/types/table/sort-icon.d.ts +0 -13
  454. package/dist/types/table/table-with-pagination.d.ts +0 -14
  455. package/dist/types/table/table-without-pagniation.d.ts +0 -8
  456. package/dist/types/table-col-actions/index.d.ts +0 -21
  457. package/dist/types/table-header/index.d.ts +0 -20
  458. package/dist/types/text-with-copy/index.d.ts +0 -24
  459. package/dist/types/tooltip-with-disabled/index.d.ts +0 -9
  460. package/dist/types/utils/basic.d.ts +0 -1
  461. package/dist/types/utils/rect.d.ts +0 -10
@@ -1,129 +1,15 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __defProps = Object.defineProperties;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
- var __getOwnPropNames = Object.getOwnPropertyNames;
8
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
- var __getProtoOf = Object.getPrototypeOf;
10
- var __hasOwnProp = Object.prototype.hasOwnProperty;
11
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13
- var __spreadValues = (a, b) => {
14
- for (var prop in b || (b = {}))
15
- if (__hasOwnProp.call(b, prop))
16
- __defNormalProp(a, prop, b[prop]);
17
- if (__getOwnPropSymbols)
18
- for (var prop of __getOwnPropSymbols(b)) {
19
- if (__propIsEnum.call(b, prop))
20
- __defNormalProp(a, prop, b[prop]);
21
- }
22
- return a;
23
- };
24
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
25
- var __objRest = (source, exclude) => {
26
- var target = {};
27
- for (var prop in source)
28
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
29
- target[prop] = source[prop];
30
- if (source != null && __getOwnPropSymbols)
31
- for (var prop of __getOwnPropSymbols(source)) {
32
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
33
- target[prop] = source[prop];
34
- }
35
- return target;
36
- };
37
- var __export = (target, all) => {
38
- for (var name in all)
39
- __defProp(target, name, { get: all[name], enumerable: true });
40
- };
41
- var __copyProps = (to, from, except, desc) => {
42
- if (from && typeof from === "object" || typeof from === "function") {
43
- for (let key of __getOwnPropNames(from))
44
- if (!__hasOwnProp.call(to, key) && key !== except)
45
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
46
- }
47
- return to;
48
- };
49
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
50
- // If the importer is in node compatibility mode or this is not an ESM
51
- // file that has been converted to a CommonJS file using a Babel-
52
- // compatible transform (i.e. "__esModule" has not been set), then set
53
- // "default" to the CommonJS "module.exports" for node compatibility.
54
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
55
- mod
56
- ));
57
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
58
- var resize_sidesheet_exports = {};
59
- __export(resize_sidesheet_exports, {
60
- ResizeSidesheet: () => ResizeSidesheet
61
- });
62
- module.exports = __toCommonJS(resize_sidesheet_exports);
63
- var import_jsx_runtime = require("react/jsx-runtime");
64
- var import_classnames = __toESM(require("classnames"));
65
- var import_icons = require("@coze-arch/coze-design/icons");
66
- var import_coze_design = require("@coze-arch/coze-design");
67
- var import_coze_design2 = require("@coze-arch/coze-design");
68
- var import_use_drag = require("./use-drag");
69
- var import_index = __toESM(require("./index.module"));
70
- const ResizeSidesheet = (props) => {
71
- const _a = props, {
72
- children,
73
- dragOptions,
74
- title,
75
- onCancel,
76
- className,
77
- showDivider
78
- } = _a, rest = __objRest(_a, [
79
- "children",
80
- "dragOptions",
81
- "title",
82
- "onCancel",
83
- "className",
84
- "showDivider"
85
- ]);
86
- const { containerRef, isActive, sidePaneWidth } = (0, import_use_drag.useDrag)(dragOptions);
87
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
88
- import_coze_design.SideSheet,
89
- __spreadProps(__spreadValues({
90
- title: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2", children: [
91
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex-1", children: title }),
92
- showDivider ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_coze_design.Divider, { layout: "vertical", className: "h-[12px]" }) : null,
93
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
94
- import_coze_design2.Button,
95
- {
96
- type: "primary",
97
- color: "secondary",
98
- icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.IconCozCrossFill, { className: "w-[16px] h-[16px]" }),
99
- onClick: onCancel
100
- }
101
- )
102
- ] }),
103
- width: sidePaneWidth,
104
- className: (0, import_classnames.default)(import_index.default.sheet, className)
105
- }, rest), {
106
- onCancel,
107
- closable: false,
108
- children: [
109
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
110
- "div",
111
- {
112
- ref: containerRef,
113
- className: (0, import_classnames.default)(
114
- "absolute h-full w-[2px] z-[20000] bg-transparent top-0 left-0 hover:cursor-col-resize hover:bg-[rgb(var(--coze-up-brand-9))] transition ",
115
- {
116
- "bg-[rgb(var(--coze-up-brand-9))] cursor-col-resize": isActive
117
- }
118
- )
119
- }
120
- ),
121
- props.children
122
- ]
123
- })
124
- );
125
- };
126
- // Annotate the CommonJS export names for ESM import in node:
127
- 0 && (module.exports = {
128
- ResizeSidesheet
129
- });
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import cn from 'classnames';
3
+ import { IconCozCrossFill } from '@coze-arch/coze-design/icons';
4
+ import { Divider, SideSheet, } from '@coze-arch/coze-design';
5
+ import { Button } from '@coze-arch/coze-design';
6
+ import { useDrag } from './use-drag';
7
+ import styles from './index.module.less';
8
+ export const ResizeSidesheet = (props) => {
9
+ const { children, dragOptions, title, onCancel, className, showDivider, disableDrag, ...rest } = props;
10
+ const { containerRef, isActive, sidePaneWidth } = useDrag(dragOptions);
11
+ return (_jsxs(SideSheet, { title: _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("div", { className: "flex-1", children: title }), showDivider ? (_jsx(Divider, { layout: "vertical", className: "h-[12px]" })) : null, _jsx(Button, { type: "primary", color: "secondary", icon: _jsx(IconCozCrossFill, { className: "w-[16px] h-[16px]" }), onClick: onCancel })] }), width: disableDrag ? undefined : sidePaneWidth, className: cn(styles.sheet, className), ...rest, onCancel: onCancel, closable: false, children: [disableDrag ? null : (_jsx("div", { ref: containerRef, className: cn('absolute h-full w-[2px] z-[20000] bg-transparent top-0 left-0 hover:cursor-col-resize hover:bg-[rgb(var(--coze-up-brand-9))] transition ', {
12
+ 'bg-[rgb(var(--coze-up-brand-9))] cursor-col-resize': isActive,
13
+ }) })), props.children] }));
14
+ };
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file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AAQ,EAAE,KAAK,aAEd,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CACpB,cACE,GAAG,EAAE,YAAY,EACjB,SAAS,EAAE,EAAE,CACX,2IAA2I,EAC3I;oBACE,oDAAoD,EAAE,QAAQ;iBAC/D,CACF,GACD,CACH,EACA,KAAK,CAAC,QAAQ,IACL,CACb,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ export interface DragOptions {
2
+ defaultWidth?: number;
3
+ maxWidth?: number;
4
+ minWidth?: number;
5
+ onDragEnd?: (width: number) => void;
6
+ }
7
+ export declare const useDrag: (options?: DragOptions) => {
8
+ sidePaneWidth: number;
9
+ containerRef: (node: HTMLElement | null) => void;
10
+ isActive: boolean;
11
+ };
@@ -1,55 +1,30 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var use_drag_exports = {};
20
- __export(use_drag_exports, {
21
- useDrag: () => useDrag
22
- });
23
- module.exports = __toCommonJS(use_drag_exports);
24
- var import_react = require("react");
25
- var import_use_mouse_down_offset = require("../hooks/use-mouse-down-offset");
1
+ import { useEffect, useRef, useState } from 'react';
2
+ import { useMouseDownOffset } from '../hooks/use-mouse-down-offset';
26
3
  const DEFAULT_WIDTH = 500;
27
4
  const MAX_WIDTH = 800;
28
5
  const MIN_WIDTH = 300;
29
- const useDrag = (options = {}) => {
30
- const {
31
- defaultWidth = DEFAULT_WIDTH,
32
- maxWidth = MAX_WIDTH,
33
- minWidth = MIN_WIDTH
34
- } = options;
35
- const [sidePaneWidth, setSidePaneWidth] = (0, import_react.useState)(defaultWidth);
36
- const prevWidthRef = (0, import_react.useRef)(sidePaneWidth);
37
- const { ref, isActive } = (0, import_use_mouse_down_offset.useMouseDownOffset)(({ offsetX }) => {
38
- const newWidth = prevWidthRef.current - offsetX;
39
- setSidePaneWidth([maxWidth, newWidth, minWidth].sort((a, b) => a - b)[1]);
40
- });
41
- (0, import_react.useEffect)(() => {
42
- prevWidthRef.current = sidePaneWidth;
43
- document.body.style.cursor = isActive ? "col-resize" : "";
44
- document.body.style.userSelect = isActive ? "none" : "auto";
45
- }, [isActive]);
46
- return {
47
- sidePaneWidth,
48
- containerRef: ref,
49
- isActive
50
- };
6
+ export const useDrag = (options = {}) => {
7
+ const { defaultWidth = DEFAULT_WIDTH, maxWidth = MAX_WIDTH, minWidth = MIN_WIDTH, } = options;
8
+ const [sidePaneWidth, setSidePaneWidth] = useState(defaultWidth);
9
+ const prevWidthRef = useRef(sidePaneWidth);
10
+ const isActiveRef = useRef(false);
11
+ const { ref, isActive } = useMouseDownOffset(({ offsetX }) => {
12
+ const newWidth = prevWidthRef.current - offsetX;
13
+ setSidePaneWidth([maxWidth, newWidth, minWidth].sort((a, b) => a - b)[1]);
14
+ });
15
+ useEffect(() => {
16
+ prevWidthRef.current = sidePaneWidth;
17
+ document.body.style.cursor = isActive ? 'col-resize' : '';
18
+ document.body.style.userSelect = isActive ? 'none' : 'auto';
19
+ if (isActiveRef.current && !isActive) {
20
+ options?.onDragEnd?.(sidePaneWidth);
21
+ }
22
+ isActiveRef.current = isActive;
23
+ }, [isActive]);
24
+ return {
25
+ sidePaneWidth,
26
+ containerRef: ref,
27
+ isActive,
28
+ };
51
29
  };
52
- // Annotate the CommonJS export names for ESM import in node:
53
- 0 && (module.exports = {
54
- useDrag
55
- });
30
+ //# sourceMappingURL=use-drag.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-drag.js","sourceRoot":"","sources":["../../../src/resize-sidesheet/use-drag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,SAAS,GAAG,GAAG,CAAC;AACtB,MAAM,SAAS,GAAG,GAAG,CAAC;AAStB,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,UAAuB,EAAE,EAAE,EAAE;IACnD,MAAM,EACJ,YAAY,GAAG,aAAa,EAC5B,QAAQ,GAAG,SAAS,EACpB,QAAQ,GAAG,SAAS,GACrB,GAAG,OAAO,CAAC;IACZ,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAC,YAAY,CAAC,CAAC;IACjE,MAAM,YAAY,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC;IAC3C,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAClC,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,kBAAkB,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE;QAC3D,MAAM,QAAQ,GAAG,YAAY,CAAC,OAAO,GAAG,OAAO,CAAC;QAChD,gBAAgB,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5E,CAAC,CAAC,CAAC;IACH,SAAS,CAAC,GAAG,EAAE;QACb,YAAY,CAAC,OAAO,GAAG,aAAa,CAAC;QACrC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;QAC1D,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;QAC5D,IAAI,WAAW,CAAC,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC;YACrC,OAAO,EAAE,SAAS,EAAE,CAAC,aAAa,CAAC,CAAC;QACtC,CAAC;QACD,WAAW,CAAC,OAAO,GAAG,QAAQ,CAAC;IACjC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IACf,OAAO;QACL,aAAa;QACb,YAAY,EAAE,GAAG;QACjB,QAAQ;KACT,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ interface SchemaEditorProps {
2
+ value?: string;
3
+ readOnly?: boolean;
4
+ onChange?: (value?: string) => void;
5
+ language?: string;
6
+ placeholder?: string;
7
+ showLineNumbs?: boolean;
8
+ className?: string;
9
+ }
10
+ export declare const SchemaEditor: ({ value, onChange, placeholder, readOnly, language, className, }: SchemaEditorProps) => import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import classNames from 'classnames';
3
+ import { CodeMirrorJsonEditor, CodeMirrorRawTextEditor, } from '../codemirror-editor';
4
+ export const SchemaEditor = ({ value, onChange, placeholder, readOnly, language, className, }) => (_jsx("div", { className: classNames('w-full h-[500px] border border-solid coz-stroke-primary rounded-[4px] overflow-hidden relative bg-white', { 'opacity-70': readOnly }, className), children: language === 'json' ? (_jsx(CodeMirrorJsonEditor, { className: "w-full h-full overflow-y-auto", onChange: onChange, value: value || '', placeholder: placeholder, readonly: readOnly, borderRadius: 4 })) : (_jsx(CodeMirrorRawTextEditor, { className: "w-full h-full overflow-y-auto", onChange: onChange, value: value || '', placeholder: placeholder, readonly: readOnly })) }));
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/schema-editor/index.tsx"],"names":[],"mappings":";AAAA,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EACL,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,sBAAsB,CAAC;AAY9B,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAC3B,KAAK,EACL,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,SAAS,GACS,EAAE,EAAE,CAAC,CACvB,cACE,SAAS,EAAE,UAAU,CACnB,yGAAyG,EACzG,EAAE,YAAY,EAAE,QAAQ,EAAE,EAC1B,SAAS,CACV,YAEA,QAAQ,KAAK,MAAM,CAAC,CAAC,CAAC,CACrB,KAAC,oBAAoB,IACnB,SAAS,EAAC,+BAA+B,EACzC,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,IAAI,EAAE,EAClB,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,CAAC,GACf,CACH,CAAC,CAAC,CAAC,CACF,KAAC,uBAAuB,IACtB,SAAS,EAAC,+BAA+B,EACzC,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,IAAI,EAAE,EAClB,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,GAClB,CACH,GACG,CACP,CAAC"}
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { type Form } from '@coze-arch/coze-design';
3
+ export type SearchFormFilterRecord = Record<string, any>;
4
+ export interface SearchFormRef {
5
+ getValues: () => SearchFormFilterRecord | undefined;
6
+ }
7
+ interface SearchFormProps {
8
+ className?: string;
9
+ children: any;
10
+ SemiForm: typeof Form;
11
+ onSearch?: (v: SearchFormFilterRecord) => Promise<any>;
12
+ initValue?: SearchFormFilterRecord;
13
+ }
14
+ export declare const SearchForm: React.ForwardRefExoticComponent<SearchFormProps & React.RefAttributes<SearchFormRef>>;
15
+ export {};
@@ -0,0 +1,77 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /* eslint-disable security/detect-object-injection */
3
+ /* eslint-disable @typescript-eslint/naming-convention */
4
+ /* eslint-disable @typescript-eslint/no-explicit-any */
5
+ import { useSearchParams } from 'react-router-dom';
6
+ import { forwardRef, useCallback, useImperativeHandle, useRef, useState, } from 'react';
7
+ import { omit } from 'lodash-es';
8
+ import { safeJsonParse } from '@cozeloop/toolkit';
9
+ /**
10
+ * 如果对象的value为对象,将 value 转换为字符串
11
+ * @param value
12
+ * @returns
13
+ */
14
+ const stringifyObjectValue = (value) => Object.keys(value).reduce((acc, key) => {
15
+ const val = value[key];
16
+ if (typeof val === 'object') {
17
+ acc[key] = JSON.stringify(val);
18
+ }
19
+ else {
20
+ acc[key] = val;
21
+ }
22
+ return acc;
23
+ }, {});
24
+ const parseObjectValue = (data) => Object.keys(data).reduce((acc, key) => {
25
+ const value = data[key];
26
+ if (value.startsWith('{') || value.startsWith('[')) {
27
+ acc[key] = safeJsonParse(value) || value;
28
+ }
29
+ else {
30
+ acc[key] = value;
31
+ }
32
+ return acc;
33
+ }, {});
34
+ export const SearchForm = forwardRef(({ className, children, onSearch, SemiForm, initValue = {} }, ref) => {
35
+ const formRef = useRef(null);
36
+ const [initValueAndParams] = useState(() => {
37
+ const params = new URLSearchParams(window.location.search);
38
+ const initParams = {};
39
+ params.forEach((value, key) => {
40
+ initParams[key] = value;
41
+ });
42
+ const urlValues = parseObjectValue(initParams);
43
+ const defaultValue = { ...initValue, ...urlValues };
44
+ const defaultSearchParams = new URLSearchParams(stringifyObjectValue(defaultValue));
45
+ const filterValue = omit(defaultValue, ['page', 'pageSize']);
46
+ if (Object.keys(filterValue).length !== 0) {
47
+ onSearch?.(filterValue);
48
+ }
49
+ return {
50
+ defaultValue: filterValue,
51
+ defaultSearchParams,
52
+ };
53
+ });
54
+ const [searchParams, setSearchParams] = useSearchParams();
55
+ const formValueChange = useCallback((allValues) => {
56
+ const searchResult = onSearch?.(allValues);
57
+ searchResult?.then(() => {
58
+ setSearchParams(prev => {
59
+ const v = stringifyObjectValue(allValues || {});
60
+ prev.forEach((_value, key) => {
61
+ if (!['page', 'pageSize', 'tab'].includes(key)) {
62
+ prev.delete(key);
63
+ }
64
+ });
65
+ Object.keys(v).forEach(key => {
66
+ prev.set(key, v[key]);
67
+ });
68
+ return prev;
69
+ }, { replace: true });
70
+ });
71
+ }, [searchParams]);
72
+ useImperativeHandle(ref, () => ({
73
+ getValues: () => formRef.current?.formApi?.getValues?.(),
74
+ }));
75
+ return children ? (_jsx(SemiForm, { ref: formRef, initValues: initValueAndParams.defaultValue, onValueChange: formValueChange, layout: "horizontal", className: className, children: children })) : null;
76
+ });
77
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/search-form/index.tsx"],"names":[],"mappings":";AAAA,qDAAqD;AACrD,yDAAyD;AACzD,uDAAuD;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAc,EACZ,UAAU,EACV,WAAW,EACX,mBAAmB,EACnB,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAgBlD;;;;GAIG;AACH,MAAM,oBAAoB,GAAG,CAAC,KAA0B,EAAE,EAAE,CAC1D,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CACvB,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;IACX,MAAM,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;IACvB,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QAC5B,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,SAAS,C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AG,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;gBACxB,CAAC,CAAC,CAAC;gBACH,OAAO,IAAI,CAAC;YACd,CAAC,EACD,EAAE,OAAO,EAAE,IAAI,EAAE,CAClB,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,EACD,CAAC,YAAY,CAAC,CACf,CAAC;IAEF,mBAAmB,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;QAC9B,SAAS,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE;KACzD,CAAC,CAAC,CAAC;IAGJ,OAAO,QAAQ,CAAC,CAAC,CAAC,CAChB,KAAC,QAAQ,IACP,GAAG,EAAE,OAAO,EACZ,UAAU,EAAE,kBAAkB,CAAC,YAAY,EAC3C,aAAa,EAAE,eAAe,EAC9B,MAAM,EAAC,YAAY,EACnB,SAAS,EAAE,SAAS,YAEnB,QAAQ,GACA,CACZ,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC,CACF,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { type ArrayFieldTemplateItemType, type FormContextType, type RJSFSchema, type StrictRJSFSchema } from '@rjsf/utils';
2
+ /** The `ArrayFieldItemTemplate` component is the template used to render an items of an array.
3
+ *
4
+ * @param props - The `ArrayFieldTemplateItemType` props for the component
5
+ */
6
+ export default function ArrayFieldItemTemplate<T = unknown, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = object>(props: ArrayFieldTemplateItemType<T, S, F>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,19 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { ButtonGroup, Col, Row } from '@coze-arch/coze-design';
3
+ const BTN_GRP_STYLE = {
4
+ width: '100%',
5
+ };
6
+ const BTN_STYLE = {
7
+ width: 'calc(100% / 4)',
8
+ };
9
+ /** The `ArrayFieldItemTemplate` component is the template used to render an items of an array.
10
+ *
11
+ * @param props - The `ArrayFieldTemplateItemType` props for the component
12
+ */
13
+ export default function ArrayFieldItemTemplate(props) {
14
+ const { children, disabled, hasCopy, hasMoveDown, hasMoveUp, hasRemove, hasToolbar, index, onCopyIndexClick, onDropIndexClick, onReorderClick, readonly, registry, uiSchema, } = props;
15
+ const { CopyButton, MoveDownButton, MoveUpButton, RemoveButton } = registry.templates.ButtonTemplates;
16
+ const { rowGutter = 24, toolbarAlign = 'top' } = registry.formContext;
17
+ return (_jsxs(Row, { align: toolbarAlign, gutter: rowGutter, children: [_jsx(Col, { span: 18, children: children }), hasToolbar ? (_jsx(Col, { span: 6, children: _jsxs(ButtonGroup, { style: BTN_GRP_STYLE, children: [hasMoveUp || hasMoveDown ? (_jsx(MoveUpButton, { disabled: disabled || readonly || !hasMoveUp, onClick: onReorderClick(index, index - 1), style: BTN_STYLE, uiSchema: uiSchema, registry: registry })) : null, hasMoveUp || hasMoveDown ? (_jsx(MoveDownButton, { disabled: disabled || readonly || !hasMoveDown, onClick: onReorderClick(index, index + 1), style: BTN_STYLE, uiSchema: uiSchema, registry: registry })) : null, hasCopy ? (_jsx(CopyButton, { disabled: disabled || readonly, onClick: onCopyIndexClick(index), style: BTN_STYLE, uiSchema: uiSchema, registry: registry })) : null, hasRemove ? (_jsx(RemoveButton, { disabled: disabled || readonly, onClick: onDropIndexClick(index), style: BTN_STYLE, uiSchema: uiSchema, registry: registry })) : null] }) })) : null] }, `array-item-${index}`));
18
+ }
19
+ //# sourceMappingURL=array-field-item.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"array-field-item.js","sourceRoot":"","sources":["../../../../../src/semi-schema-form/components/tmpls/array-field-item.tsx"],"names":[],"mappings":";AASA,OAAO,EAAE,WAAW,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,wBAAwB,CAAC;AAE/D,MAAM,aAAa,GAAG;IACpB,KAAK,EAAE,MAAM;CACd,CAAC;AAEF,MAAM,SAAS,GAAG;IAChB,KA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AAC,CAAC,EACzC,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAC,CAAC,CAAC,IAAI,EACP,OAAO,CAAC,CAAC,CAAC,CACT,KAAC,UAAU,IACT,QAAQ,EAAE,QAAQ,IAAI,QAAQ,EAC9B,OAAO,EAAE,gBAAgB,CAAC,KAAK,CAAC,EAChC,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAC,CAAC,CAAC,IAAI,EACP,SAAS,CAAC,CAAC,CAAC,CACX,KAAC,YAAY,IACX,QAAQ,EAAE,QAAQ,IAAI,QAAQ,EAC9B,OAAO,EAAE,gBAAgB,CAAC,KAAK,CAAC,EAChC,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAC,CAAC,CAAC,IAAI,IACI,GACV,CACP,CAAC,CAAC,CAAC,IAAI,KA5CqB,cAAc,KAAK,EAAE,CA6C9C,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { type ArrayFieldTemplateProps, type FormContextType, type RJSFSchema, type StrictRJSFSchema } from '@rjsf/utils';
2
+ /** The `ArrayFieldTemplate` component is the template used to render all items in an array.
3
+ *
4
+ * @param props - The `ArrayFieldTemplateItemType` props for the component
5
+ */
6
+ export default function ArrayFieldTemplate<T = unknown, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = object>(props: ArrayFieldTemplateProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,39 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import cn from 'classnames';
3
+ import { getTemplate, getUiOptions, } from '@rjsf/utils';
4
+ import { Col, Row } from '@coze-arch/coze-design';
5
+ // const DESCRIPTION_COL_STYLE = {
6
+ // paddingBottom: '8px',
7
+ // };
8
+ /** The `ArrayFieldTemplate` component is the template used to render all items in an array.
9
+ *
10
+ * @param props - The `ArrayFieldTemplateItemType` props for the component
11
+ */
12
+ export default function ArrayFieldTemplate(props) {
13
+ const { canAdd, className, disabled, formContext, idSchema, items, onAddClick, readonly, registry,
14
+ // required,
15
+ // schema,
16
+ // title,
17
+ uiSchema, } = props;
18
+ const uiOptions = getUiOptions(uiSchema);
19
+ // const ArrayFieldDescriptionTemplate = getTemplate<
20
+ // 'ArrayFieldDescriptionTemplate',
21
+ // T,
22
+ // S,
23
+ // F
24
+ // >('ArrayFieldDescriptionTemplate', registry, uiOptions);
25
+ const ArrayFieldItemTemplate = getTemplate('ArrayFieldItemTemplate', registry, uiOptions);
26
+ // const ArrayFieldTitleTemplate = getTemplate<
27
+ // 'ArrayFieldTitleTemplate',
28
+ // T,
29
+ // S,
30
+ // F
31
+ // >('ArrayFieldTitleTemplate', registry, uiOptions);
32
+ // Button templates are not overridden in the uiSchema
33
+ const { ButtonTemplates: { AddButton }, } = registry.templates;
34
+ const { rowGutter = 24 } = formContext;
35
+ return (_jsx("div", { className: cn('p-3 semi-card-bordered rounded-[4px]', className), id: idSchema.$id, children: _jsxs(Row, { gutter: rowGutter, children: [_jsx(Col, { className: "row array-item-list", span: 24, children: items
36
+ ? items.map(({ key, ...itemProps }) => (_jsx(ArrayFieldItemTemplate, { ...itemProps }, key)))
37
+ : null }), canAdd ? (_jsx(Col, { span: 24, children: _jsx(Row, { gutter: rowGutter, justify: "end", children: _jsx(Col, { span: 6, children: _jsx(AddButton, { className: "array-item-add", disabled: disabled || readonly, onClick: onAddClick, uiSchema: uiSchema, registry: registry }) }) }) })) : null] }) }));
38
+ }
39
+ //# sourceMappingURL=array-field.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"array-field.js","sourceRoot":"","sources":["../../../../../src/semi-schema-form/components/tmpls/array-field.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EACL,WAAW,EAC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ACpD,CACF;wBACH,CAAC,CAAC,IAAI,GACJ,EAEL,MAAM,CAAC,CAAC,CAAC,CACR,KAAC,GAAG,IAAC,IAAI,EAAE,EAAE,YACX,KAAC,GAAG,IAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAC,KAAK,YACnC,KAAC,GAAG,IAAC,IAAI,EAAE,CAAC,YACV,KAAC,SAAS,IACR,SAAS,EAAC,gBAAgB,EAC1B,QAAQ,EAAE,QAAQ,IAAI,QAAQ,EAC9B,OAAO,EAAE,UAAU,EACnB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,GAClB,GACE,GACF,GACF,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,GACF,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { type BaseInputTemplateProps, type FormContextType, type RJSFSchema, type StrictRJSFSchema } from '@rjsf/utils';
2
+ /** The `BaseInputTemplate` is the template to use to render the basic `<input>` component for the `core` theme.
3
+ * It is used as the template for rendering many of the <input> based widgets that differ by `type` and callbacks only.
4
+ * It can be customized/overridden for other themes or individual implementations as needed.
5
+ *
6
+ * @param props - The `WidgetProps` for this template
7
+ */
8
+ export default function BaseInputTemplate<T = unknown, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = object>(props: BaseInputTemplateProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,32 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { ariaDescribedByIds, examplesId, getInputProps, } from '@rjsf/utils';
3
+ import { Input, CozInputNumber, } from '@coze-arch/coze-design';
4
+ const INPUT_STYLE = {
5
+ width: '100%',
6
+ };
7
+ /** The `BaseInputTemplate` is the template to use to render the basic `<input>` component for the `core` theme.
8
+ * It is used as the template for rendering many of the <input> based widgets that differ by `type` and callbacks only.
9
+ * It can be customized/overridden for other themes or individual implementations as needed.
10
+ *
11
+ * @param props - The `WidgetProps` for this template
12
+ */
13
+ export default function BaseInputTemplate(props) {
14
+ const { disabled, formContext, id, onBlur, onChange, onChangeOverride, onFocus, options, placeholder, readonly, schema, value, type, } = props;
15
+ const { step, type: fieldType, ...inputProps } = getInputProps(schema, type, options, false);
16
+ const { readonlyAsDisabled = true } = formContext;
17
+ const handleNumberChange = nextValue => onChange(nextValue);
18
+ const handleTextChange = (nextValue, e) => {
19
+ onChangeOverride
20
+ ? onChangeOverride(e)
21
+ : onChange(nextValue === '' ? options.emptyValue : nextValue);
22
+ };
23
+ const handleBlur = ({ target }) => onBlur(id, target && target.value);
24
+ const handleFocus = ({ target }) => onFocus(id, target && target.value);
25
+ const input = fieldType === 'number' || fieldType === 'integer' ? (_jsx(CozInputNumber, { disabled: disabled || (readonlyAsDisabled && readonly), id: id, name: id, onBlur: !readonly ? handleBlur : undefined, onChange: !readonly ? handleNumberChange : undefined, onFocus: !readonly ? handleFocus : undefined, placeholder: placeholder, style: INPUT_STYLE, list: schema.examples ? examplesId(id) : undefined, ...inputProps, step: step, value: value, "aria-describedby": ariaDescribedByIds(id, !!schema.examples) })) : (_jsx(Input, { disabled: disabled || (readonlyAsDisabled && readonly), id: id, name: id, onBlur: !readonly ? handleBlur : undefined, onChange: !readonly ? handleTextChange : undefined, onFocus: !readonly ? handleFocus : undefined, placeholder: placeholder, style: INPUT_STYLE, list: schema.examples ? examplesId(id) : undefined, ...inputProps, value: value, "aria-describedby": ariaDescribedByIds(id, !!schema.examples) }));
26
+ return (_jsxs(_Fragment, { children: [input, Array.isArray(schema.examples) && (_jsx("datalist", { id: examplesId(id), children: schema.examples
27
+ .concat(schema.default && !schema.examples.includes(schema.default)
28
+ ? [schema.default]
29
+ : [])
30
+ .map(example => (_jsx("option", { value: example }, example))) }))] }));
31
+ }
32
+ //# sourceMappingURL=base-input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-input.js","sourceRoot":"","sources":["../../../../../src/semi-schema-form/components/tmpls/base-input.tsx"],"names":[],"mappings":";AAGA,OAA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E,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAI,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,KACjD,UAAU,EACd,KAAK,EAAE,KAAK,sBACM,kBAAkB,CAAI,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,GAC9D,CACH,CAAC;IAEJ,OAAO,CACL,8BACG,KAAK,EACL,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CACjC,mBAAU,EAAE,EAAE,UAAU,CAAI,EAAE,CAAC,YAC3B,MAAM,CAAC,QAAqB;qBAC3B,MAAM,CACL,MAAM,CAAC,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC;oBACzD,CAAC,CAAE,CAAC,MAAM,CAAC,OAAO,CAAc;oBAChC,CAAC,CAAC,EAAE,CACP;qBACA,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,CACd,iBAAsB,KAAK,EAAE,OAAO,IAAvB,OAAO,CAAoB,CACzC,CAAC,GACK,CACZ,IACA,CACJ,CAAC;AACJ,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { type DescriptionFieldProps, type FormContextType, type RJSFSchema, type StrictRJSFSchema } from '@rjsf/utils';
2
+ /** The `DescriptionField` is the template to use to render the description of a field
3
+ *
4
+ * @param props - The `DescriptionFieldProps` for this component
5
+ */
6
+ export default function DescriptionField<T = unknown, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = object>(props: DescriptionFieldProps<T, S, F>): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /** The `DescriptionField` is the template to use to render the description of a field
3
+ *
4
+ * @param props - The `DescriptionFieldProps` for this component
5
+ */
6
+ export default function DescriptionField(props) {
7
+ const { id, description } = props;
8
+ if (!description) {
9
+ return null;
10
+ }
11
+ return _jsx("span", { id: id, children: description });
12
+ }
13
+ //# sourceMappingURL=description-field.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"description-field.js","sourceRoot":"","sources":["../../../../../src/semi-schema-form/components/tmpls/description-field.tsx"],"names":[],"mappings":";AAOA;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAItC,KAAqC;IACrC,MAAM,EAAE,EAAE,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC;IAElC,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,eAAM,EAAE,EAAE,EAAE,YAAG,WAAW,GAAQ,CAAC;AAC5C,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { type ErrorListProps, type FormContextType, type RJSFSchema, type StrictRJSFSchema } from '@rjsf/utils';
2
+ /** The `ErrorList` component is the template that renders the all the errors associated with the fields in the `Form`
3
+ *
4
+ * @param props - The `ErrorListProps` for this component
5
+ */
6
+ export default function ErrorList<T = unknown, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = object>({ errors, registry }: ErrorListProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { TranslatableString, } from '@rjsf/utils';
3
+ import { IconCozWarningCircle } from '@coze-arch/coze-design/icons';
4
+ import { Banner, List, Space } from '@coze-arch/coze-design';
5
+ /** The `ErrorList` component is the template that renders the all the errors associated with the fields in the `Form`
6
+ *
7
+ * @param props - The `ErrorListProps` for this component
8
+ */
9
+ export default function ErrorList({ errors, registry }) {
10
+ const { translateString } = registry;
11
+ const renderErrors = () => (_jsx(List, { className: "list-group", size: "small", children: errors.map((error, index) => (_jsx(List.Item, { children: _jsxs(Space, { children: [_jsx(IconCozWarningCircle, {}), error.stack] }) }, index))) }));
12
+ return (_jsx(Banner, { type: "danger", className: "panel panel-danger errors", title: translateString(TranslatableString.ErrorsLabel), description: renderErrors() }));
13
+ }
14
+ //# sourceMappingURL=error-list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error-list.js","sourceRoot":"","sources":["../../../../../src/semi-schema-form/components/tmpls/error-list.tsx"],"names":[],"mappings":";AAEA,OAAO,EAKL,kBAAkB,GACnB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAE7D;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAI/B,EAAE,MAAM,EAAE,QAAQ,EAA2B;IAC7C,MAAM,EAAE,eAAe,EAAE,GAAG,QAAQ,CAAC;IACrC,MAAM,YAAY,GAAG,GAAG,EAAE,CAAC,CACzB,KAAC,IAAI,IAAC,SAAS,EAAC,YAAY,EAAC,IAAI,EAAC,OAAO,YACtC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CAC5B,KAAC,IAAI,CAAC,IAAI,cACR,MAAC,KAAK,eACJ,KAAC,oBAAoB,KAAG,EACvB,KAAK,CAAC,KAAK,IACN,IAJM,KAAK,CAKT,CACb,CAAC,GACG,CACR,CAAC;IAEF,OAAO,CACL,KAAC,MAAM,IACL,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,2BAA2B,EACrC,KAAK,EAAE,eAAe,CAAC,kBAAkB,CAAC,WAAW,CAAC,EACtD,WAAW,EAAE,YAAY,EAAE,GAC3B,CACH,CAAC;AACJ,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { type FieldErrorProps, type FormContextType, type RJSFSchema, type StrictRJSFSchema } from '@rjsf/utils';
2
+ /** The `FieldErrorTemplate` component renders the errors local to the particular field
3
+ *
4
+ * @param props - The `FieldErrorProps` for the errors being rendered
5
+ */
6
+ export default function FieldErrorTemplate<T = unknown, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = object>(props: FieldErrorProps<T, S, F>): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,16 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { errorId, } from '@rjsf/utils';
3
+ import { Form } from '@coze-arch/coze-design';
4
+ /** The `FieldErrorTemplate` component renders the errors local to the particular field
5
+ *
6
+ * @param props - The `FieldErrorProps` for the errors being rendered
7
+ */
8
+ export default function FieldErrorTemplate(props) {
9
+ const { errors = [], idSchema } = props;
10
+ if (errors.length === 0) {
11
+ return null;
12
+ }
13
+ const id = errorId(idSchema);
14
+ return (_jsx("div", { id: id, children: errors.map(error => (_jsx(Form.ErrorMessage, { error: error }, `field-${id}-error-${error}`))) }));
15
+ }
16
+ //# sourceMappingURL=field-error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"field-error.js","sourceRoot":"","sources":["../../../../../src/semi-schema-form/components/tmpls/field-error.tsx"],"names":[],"mappings":";AACA,OAAO,EAKL,OAAO,GACR,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAIxC,KAA+B;IAC/B,MAAM,EAAE,MAAM,GAAG,EAAE,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IACxC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,EAAE,GAAG,OAAO,CAAI,QAAQ,CAAC,CAAC;IAEhC,OAAO,CACL,cAAK,EAAE,EAAE,EAAE,YACR,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CACnB,KAAC,IAAI,CAAC,YAAY,IAAoC,KAAK,EAAE,KAAK,IAA1C,SAAS,EAAE,UAAU,KAAK,EAAE,CAAkB,CACvE,CAAC,GACE,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { type FieldTemplateProps, type FormContextType, type RJSFSchema, type StrictRJSFSchema } from '@rjsf/utils';
2
+ /** The `FieldTemplate` component is the template used by `SchemaField` to render any field. It renders the field
3
+ * content, (label, description, children, errors and help) inside of a `WrapIfAdditional` component.
4
+ *
5
+ * @param props - The `FieldTemplateProps` for this component
6
+ */
7
+ export default function FieldTemplate<T = unknown, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = object>(props: FieldTemplateProps<T, S, F>): import("react/jsx-runtime").JSX.Element;