@cozeloop/components 0.0.10 → 0.0.11

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 (278) hide show
  1. package/dist/es/{index.js → index.mjs} +302 -13
  2. package/dist/es/static/svg/audio-icon.svg +6 -0
  3. package/dist/es/static/svg/video-icon.svg +6 -0
  4. package/dist/lib/base-search-select/base-search-select.d.ts +4 -1
  5. package/dist/lib/base-search-select/index.d.ts +1 -1
  6. package/dist/lib/base-search-select/types.d.ts +1 -1
  7. package/dist/lib/codemirror-editor/code-editor.d.ts +23 -2
  8. package/dist/lib/codemirror-editor/text-editor.d.ts +23 -2
  9. package/dist/lib/collapse-item/index.d.ts +7 -0
  10. package/dist/lib/index.d.ts +3 -1
  11. package/dist/lib/large-txt-render/index.d.ts +1 -0
  12. package/dist/lib/multi-modal-dataset-item-render/audio-render/index.d.ts +35 -0
  13. package/dist/lib/multi-modal-dataset-item-render/index.d.ts +2 -0
  14. package/dist/lib/multi-modal-dataset-item-render/video-render/index.d.ts +35 -0
  15. package/dist/lib/primary-page/primary-header.d.ts +1 -1
  16. package/package.json +10 -29
  17. package/dist/lib/base-search-select/base-search-form-select.js +0 -6
  18. package/dist/lib/base-search-select/base-search-form-select.js.map +0 -1
  19. package/dist/lib/base-search-select/base-search-select.js +0 -128
  20. package/dist/lib/base-search-select/base-search-select.js.map +0 -1
  21. package/dist/lib/base-search-select/index.js +0 -3
  22. package/dist/lib/base-search-select/index.js.map +0 -1
  23. package/dist/lib/base-search-select/types.js +0 -2
  24. package/dist/lib/base-search-select/types.js.map +0 -1
  25. package/dist/lib/base-search-select/utils.js +0 -48
  26. package/dist/lib/base-search-select/utils.js.map +0 -1
  27. package/dist/lib/basic-card/index.js +0 -4
  28. package/dist/lib/basic-card/index.js.map +0 -1
  29. package/dist/lib/card-pane/index.js +0 -9
  30. package/dist/lib/card-pane/index.js.map +0 -1
  31. package/dist/lib/chip-select/index.js +0 -6
  32. package/dist/lib/chip-select/index.js.map +0 -1
  33. package/dist/lib/code-editor/index.js +0 -9
  34. package/dist/lib/code-editor/index.js.map +0 -1
  35. package/dist/lib/code-editor-with-loading/index.js +0 -31
  36. package/dist/lib/code-editor-with-loading/index.js.map +0 -1
  37. package/dist/lib/codemirror-editor/code-editor.js +0 -116
  38. package/dist/lib/codemirror-editor/code-editor.js.map +0 -1
  39. package/dist/lib/codemirror-editor/index.js +0 -7
  40. package/dist/lib/codemirror-editor/index.js.map +0 -1
  41. package/dist/lib/codemirror-editor/json-editor.js +0 -103
  42. package/dist/lib/codemirror-editor/json-editor.js.map +0 -1
  43. package/dist/lib/codemirror-editor/raw-code-editor.js +0 -103
  44. package/dist/lib/codemirror-editor/raw-code-editor.js.map +0 -1
  45. package/dist/lib/codemirror-editor/raw-text-editor.js +0 -32
  46. package/dist/lib/codemirror-editor/raw-text-editor.js.map +0 -1
  47. package/dist/lib/codemirror-editor/text-editor.js +0 -44
  48. package/dist/lib/codemirror-editor/text-editor.js.map +0 -1
  49. package/dist/lib/codemirror-editor/themes/coze-dark.js +0 -113
  50. package/dist/lib/codemirror-editor/themes/coze-dark.js.map +0 -1
  51. package/dist/lib/codemirror-editor/themes/coze-light.js +0 -119
  52. package/dist/lib/codemirror-editor/themes/coze-light.js.map +0 -1
  53. package/dist/lib/collapse-card/index.js +0 -31
  54. package/dist/lib/collapse-card/index.js.map +0 -1
  55. package/dist/lib/collapsible-card/index.js +0 -13
  56. package/dist/lib/collapsible-card/index.js.map +0 -1
  57. package/dist/lib/column-manage-storage/index.js +0 -48
  58. package/dist/lib/column-manage-storage/index.js.map +0 -1
  59. package/dist/lib/columns-select/index.js +0 -78
  60. package/dist/lib/columns-select/index.js.map +0 -1
  61. package/dist/lib/copyable/index.js +0 -12
  62. package/dist/lib/copyable/index.js.map +0 -1
  63. package/dist/lib/edit-icon-button/index.js +0 -13
  64. package/dist/lib/edit-icon-button/index.js.map +0 -1
  65. package/dist/lib/footer-actions/index.js +0 -8
  66. package/dist/lib/footer-actions/index.js.map +0 -1
  67. package/dist/lib/hooks/use-infinite-scroll.js +0 -133
  68. package/dist/lib/hooks/use-infinite-scroll.js.map +0 -1
  69. package/dist/lib/hooks/use-mouse-down-offset.js +0 -39
  70. package/dist/lib/hooks/use-mouse-down-offset.js.map +0 -1
  71. package/dist/lib/hooks/use-unsave-leave-warning.js +0 -26
  72. package/dist/lib/hooks/use-unsave-leave-warning.js.map +0 -1
  73. package/dist/lib/id-render/icon-button-container.js +0 -8
  74. package/dist/lib/id-render/icon-button-container.js.map +0 -1
  75. package/dist/lib/id-render/index.js +0 -22
  76. package/dist/lib/id-render/index.js.map +0 -1
  77. package/dist/lib/index-controller/record-navigation.js +0 -10
  78. package/dist/lib/index-controller/record-navigation.js.map +0 -1
  79. package/dist/lib/index-controller/use-item-index-controller.js +0 -123
  80. package/dist/lib/index-controller/use-item-index-controller.js.map +0 -1
  81. package/dist/lib/index.js +0 -76
  82. package/dist/lib/index.js.map +0 -1
  83. package/dist/lib/infinite-scroll-table/index.js +0 -35
  84. package/dist/lib/infinite-scroll-table/index.js.map +0 -1
  85. package/dist/lib/info-tooltip/index.js +0 -9
  86. package/dist/lib/info-tooltip/index.js.map +0 -1
  87. package/dist/lib/input-components/radio-button.js +0 -21
  88. package/dist/lib/input-components/radio-button.js.map +0 -1
  89. package/dist/lib/input-slider/index.js +0 -81
  90. package/dist/lib/input-slider/index.js.map +0 -1
  91. package/dist/lib/input-with-count/index.js +0 -7
  92. package/dist/lib/input-with-count/index.js.map +0 -1
  93. package/dist/lib/jump-button/jump-icon-button.js +0 -7
  94. package/dist/lib/jump-button/jump-icon-button.js.map +0 -1
  95. package/dist/lib/large-txt-render/index.js +0 -26
  96. package/dist/lib/large-txt-render/index.js.map +0 -1
  97. package/dist/lib/layout/content.js +0 -5
  98. package/dist/lib/layout/content.js.map +0 -1
  99. package/dist/lib/layout/header.js +0 -6
  100. package/dist/lib/layout/header.js.map +0 -1
  101. package/dist/lib/layout/index.js +0 -9
  102. package/dist/lib/layout/index.js.map +0 -1
  103. package/dist/lib/layout/tabs.js +0 -10
  104. package/dist/lib/layout/tabs.js.map +0 -1
  105. package/dist/lib/lazy-load-component/index.js +0 -42
  106. package/dist/lib/lazy-load-component/index.js.map +0 -1
  107. package/dist/lib/logic-editor/index.js +0 -3
  108. package/dist/lib/logic-editor/index.js.map +0 -1
  109. package/dist/lib/logic-editor/logic-editor.js +0 -70
  110. package/dist/lib/logic-editor/logic-editor.js.map +0 -1
  111. package/dist/lib/logic-editor/logic-left-render.js +0 -62
  112. package/dist/lib/logic-editor/logic-left-render.js.map +0 -1
  113. package/dist/lib/logic-editor/logic-operator-render.js +0 -31
  114. package/dist/lib/logic-editor/logic-operator-render.js.map +0 -1
  115. package/dist/lib/logic-editor/logic-right-render.js +0 -26
  116. package/dist/lib/logic-editor/logic-right-render.js.map +0 -1
  117. package/dist/lib/logic-editor/logic-types.js +0 -144
  118. package/dist/lib/logic-editor/logic-types.js.map +0 -1
  119. package/dist/lib/logic-editor/utils.js +0 -18
  120. package/dist/lib/logic-editor/utils.js.map +0 -1
  121. package/dist/lib/logic-expr/consts.js +0 -5
  122. package/dist/lib/logic-expr/consts.js.map +0 -1
  123. package/dist/lib/logic-expr/expr-group-render.js +0 -60
  124. package/dist/lib/logic-expr/expr-group-render.js.map +0 -1
  125. package/dist/lib/logic-expr/expr-render.js +0 -84
  126. package/dist/lib/logic-expr/expr-render.js.map +0 -1
  127. package/dist/lib/logic-expr/index.js +0 -2
  128. package/dist/lib/logic-expr/index.js.map +0 -1
  129. package/dist/lib/logic-expr/logic-expr.js +0 -187
  130. package/dist/lib/logic-expr/logic-expr.js.map +0 -1
  131. package/dist/lib/logic-expr/logic-not.js +0 -20
  132. package/dist/lib/logic-expr/logic-not.js.map +0 -1
  133. package/dist/lib/logic-expr/logic-toggle.js +0 -32
  134. package/dist/lib/logic-expr/logic-toggle.js.map +0 -1
  135. package/dist/lib/logic-expr/types.js +0 -2
  136. package/dist/lib/logic-expr/types.js.map +0 -1
  137. package/dist/lib/loop-icons/index.js +0 -3
  138. package/dist/lib/loop-icons/index.js.map +0 -1
  139. package/dist/lib/loop-radio-group/index.js +0 -7
  140. package/dist/lib/loop-radio-group/index.js.map +0 -1
  141. package/dist/lib/multi-part-editor/components/image-item-renderer.js +0 -58
  142. package/dist/lib/multi-part-editor/components/image-item-renderer.js.map +0 -1
  143. package/dist/lib/multi-part-editor/components/multipart-item-renderer.js +0 -26
  144. package/dist/lib/multi-part-editor/components/multipart-item-renderer.js.map +0 -1
  145. package/dist/lib/multi-part-editor/components/url-input-modal.js +0 -151
  146. package/dist/lib/multi-part-editor/components/url-input-modal.js.map +0 -1
  147. package/dist/lib/multi-part-editor/components/video-item-renderer.js +0 -58
  148. package/dist/lib/multi-part-editor/components/video-item-renderer.js.map +0 -1
  149. package/dist/lib/multi-part-editor/index.js +0 -301
  150. package/dist/lib/multi-part-editor/index.js.map +0 -1
  151. package/dist/lib/multi-part-editor/multi-part-render.js +0 -40
  152. package/dist/lib/multi-part-editor/multi-part-render.js.map +0 -1
  153. package/dist/lib/multi-part-editor/type.js +0 -27
  154. package/dist/lib/multi-part-editor/type.js.map +0 -1
  155. package/dist/lib/multi-part-editor/upload-button.js +0 -104
  156. package/dist/lib/multi-part-editor/upload-button.js.map +0 -1
  157. package/dist/lib/multi-part-editor/utils.js +0 -43
  158. package/dist/lib/multi-part-editor/utils.js.map +0 -1
  159. package/dist/lib/open-detail-button/index.js +0 -12
  160. package/dist/lib/open-detail-button/index.js.map +0 -1
  161. package/dist/lib/page-content/index.js +0 -24
  162. package/dist/lib/page-content/index.js.map +0 -1
  163. package/dist/lib/primary-page/index.js +0 -2
  164. package/dist/lib/primary-page/index.js.map +0 -1
  165. package/dist/lib/primary-page/primary-header.js +0 -4
  166. package/dist/lib/primary-page/primary-header.js.map +0 -1
  167. package/dist/lib/primary-title/index.js +0 -8
  168. package/dist/lib/primary-title/index.js.map +0 -1
  169. package/dist/lib/provider/index.js +0 -42
  170. package/dist/lib/provider/index.js.map +0 -1
  171. package/dist/lib/resizable-side-sheet/index.js +0 -32
  172. package/dist/lib/resizable-side-sheet/index.js.map +0 -1
  173. package/dist/lib/resize-sidesheet/index.js +0 -15
  174. package/dist/lib/resize-sidesheet/index.js.map +0 -1
  175. package/dist/lib/resize-sidesheet/use-drag.js +0 -30
  176. package/dist/lib/resize-sidesheet/use-drag.js.map +0 -1
  177. package/dist/lib/schema-editor/index.js +0 -5
  178. package/dist/lib/schema-editor/index.js.map +0 -1
  179. package/dist/lib/semi-schema-form/components/tmpls/array-field-item.js +0 -19
  180. package/dist/lib/semi-schema-form/components/tmpls/array-field-item.js.map +0 -1
  181. package/dist/lib/semi-schema-form/components/tmpls/array-field.js +0 -39
  182. package/dist/lib/semi-schema-form/components/tmpls/array-field.js.map +0 -1
  183. package/dist/lib/semi-schema-form/components/tmpls/base-input.js +0 -32
  184. package/dist/lib/semi-schema-form/components/tmpls/base-input.js.map +0 -1
  185. package/dist/lib/semi-schema-form/components/tmpls/description-field.js +0 -13
  186. package/dist/lib/semi-schema-form/components/tmpls/description-field.js.map +0 -1
  187. package/dist/lib/semi-schema-form/components/tmpls/error-list.js +0 -14
  188. package/dist/lib/semi-schema-form/components/tmpls/error-list.js.map +0 -1
  189. package/dist/lib/semi-schema-form/components/tmpls/field-error.js +0 -16
  190. package/dist/lib/semi-schema-form/components/tmpls/field-error.js.map +0 -1
  191. package/dist/lib/semi-schema-form/components/tmpls/field.js +0 -21
  192. package/dist/lib/semi-schema-form/components/tmpls/field.js.map +0 -1
  193. package/dist/lib/semi-schema-form/components/tmpls/icon-button.js +0 -29
  194. package/dist/lib/semi-schema-form/components/tmpls/icon-button.js.map +0 -1
  195. package/dist/lib/semi-schema-form/components/tmpls/index.js +0 -31
  196. package/dist/lib/semi-schema-form/components/tmpls/index.js.map +0 -1
  197. package/dist/lib/semi-schema-form/components/tmpls/object-field.js +0 -81
  198. package/dist/lib/semi-schema-form/components/tmpls/object-field.js.map +0 -1
  199. package/dist/lib/semi-schema-form/components/tmpls/submit.js +0 -13
  200. package/dist/lib/semi-schema-form/components/tmpls/submit.js.map +0 -1
  201. package/dist/lib/semi-schema-form/components/tmpls/title-field.js +0 -12
  202. package/dist/lib/semi-schema-form/components/tmpls/title-field.js.map +0 -1
  203. package/dist/lib/semi-schema-form/components/widgets/checkbox.js +0 -26
  204. package/dist/lib/semi-schema-form/components/widgets/checkbox.js.map +0 -1
  205. package/dist/lib/semi-schema-form/components/widgets/checkboxs.js +0 -27
  206. package/dist/lib/semi-schema-form/components/widgets/checkboxs.js.map +0 -1
  207. package/dist/lib/semi-schema-form/components/widgets/index.js +0 -15
  208. package/dist/lib/semi-schema-form/components/widgets/index.js.map +0 -1
  209. package/dist/lib/semi-schema-form/components/widgets/radio.js +0 -27
  210. package/dist/lib/semi-schema-form/components/widgets/radio.js.map +0 -1
  211. package/dist/lib/semi-schema-form/components/widgets/range.js +0 -26
  212. package/dist/lib/semi-schema-form/components/widgets/range.js.map +0 -1
  213. package/dist/lib/semi-schema-form/components/widgets/select.js +0 -44
  214. package/dist/lib/semi-schema-form/components/widgets/select.js.map +0 -1
  215. package/dist/lib/semi-schema-form/components/widgets/textarea.js +0 -18
  216. package/dist/lib/semi-schema-form/components/widgets/textarea.js.map +0 -1
  217. package/dist/lib/semi-schema-form/index.js +0 -9
  218. package/dist/lib/semi-schema-form/index.js.map +0 -1
  219. package/dist/lib/sentinel-form/enum.js +0 -15
  220. package/dist/lib/sentinel-form/enum.js.map +0 -1
  221. package/dist/lib/sentinel-form/index.js +0 -301
  222. package/dist/lib/sentinel-form/index.js.map +0 -1
  223. package/dist/lib/step-nav/index.js +0 -13
  224. package/dist/lib/step-nav/index.js.map +0 -1
  225. package/dist/lib/table/index.js +0 -7
  226. package/dist/lib/table/index.js.map +0 -1
  227. package/dist/lib/table/sort-icon.js +0 -31
  228. package/dist/lib/table/sort-icon.js.map +0 -1
  229. package/dist/lib/table/table-with-pagination.js +0 -74
  230. package/dist/lib/table/table-with-pagination.js.map +0 -1
  231. package/dist/lib/table/table-without-pagniation.js +0 -37
  232. package/dist/lib/table/table-without-pagniation.js.map +0 -1
  233. package/dist/lib/table-batch-operate/table-batch-operation.js +0 -17
  234. package/dist/lib/table-batch-operate/table-batch-operation.js.map +0 -1
  235. package/dist/lib/table-batch-operate/use-batch-operate.js +0 -71
  236. package/dist/lib/table-batch-operate/use-batch-operate.js.map +0 -1
  237. package/dist/lib/table-col-actions/index.js +0 -39
  238. package/dist/lib/table-col-actions/index.js.map +0 -1
  239. package/dist/lib/table-cols-config/index.js +0 -60
  240. package/dist/lib/table-cols-config/index.js.map +0 -1
  241. package/dist/lib/table-cols-config/type.js +0 -2
  242. package/dist/lib/table-cols-config/type.js.map +0 -1
  243. package/dist/lib/table-cols-config/use-hidden-col-keys.js +0 -32
  244. package/dist/lib/table-cols-config/use-hidden-col-keys.js.map +0 -1
  245. package/dist/lib/table-cols-config/util.js +0 -39
  246. package/dist/lib/table-cols-config/util.js.map +0 -1
  247. package/dist/lib/table-empty/index.js +0 -9
  248. package/dist/lib/table-empty/index.js.map +0 -1
  249. package/dist/lib/table-header/index.js +0 -12
  250. package/dist/lib/table-header/index.js.map +0 -1
  251. package/dist/lib/tabs/index.js +0 -9
  252. package/dist/lib/tabs/index.js.map +0 -1
  253. package/dist/lib/text-area-pro/index.js +0 -10
  254. package/dist/lib/text-area-pro/index.js.map +0 -1
  255. package/dist/lib/text-with-copy/index.js +0 -25
  256. package/dist/lib/text-with-copy/index.js.map +0 -1
  257. package/dist/lib/title-with-sub/index.js +0 -6
  258. package/dist/lib/title-with-sub/index.js.map +0 -1
  259. package/dist/lib/tooltip-when-disabled/index.js +0 -9
  260. package/dist/lib/tooltip-when-disabled/index.js.map +0 -1
  261. package/dist/lib/tooltip-with-disabled/index.js +0 -9
  262. package/dist/lib/tooltip-with-disabled/index.js.map +0 -1
  263. package/dist/lib/tsconfig.build.tsbuildinfo +0 -1
  264. package/dist/lib/upload/index.js +0 -25
  265. package/dist/lib/upload/index.js.map +0 -1
  266. package/dist/lib/user-profile/index.js +0 -21
  267. package/dist/lib/user-profile/index.js.map +0 -1
  268. package/dist/lib/utils/basic.js +0 -30
  269. package/dist/lib/utils/basic.js.map +0 -1
  270. package/dist/lib/version-list/version-descriptions.js +0 -15
  271. package/dist/lib/version-list/version-descriptions.js.map +0 -1
  272. package/dist/lib/version-list/version-item.js +0 -6
  273. package/dist/lib/version-list/version-item.js.map +0 -1
  274. package/dist/lib/version-list/version-list.js +0 -12
  275. package/dist/lib/version-list/version-list.js.map +0 -1
  276. package/dist/lib/version-list/version-switch-panel.js +0 -11
  277. package/dist/lib/version-list/version-switch-panel.js.map +0 -1
  278. /package/dist/es/{loopIcons.js → loopIcons.mjs} +0 -0
@@ -1,4 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import classNames from 'classnames';
3
- export const PrimaryPage = ({ pageTitle, filterSlot, children, contentClassName, className, headerClassName, titleClassName, titleSlot, }) => (_jsxs("div", { className: classNames('pt-2 pb-3 h-full max-h-full flex flex-col', className), children: [pageTitle || titleSlot ? (_jsxs("div", { className: classNames('flex items-center justify-between py-4 px-6', headerClassName), children: [_jsx("div", { className: classNames('text-[20px] font-medium leading-6 coz-fg-plus', titleClassName), children: pageTitle }), _jsx("div", { children: titleSlot })] })) : null, filterSlot ? (_jsx("div", { className: "box-border coz-fg-secondary pt-1 pb-3 px-6", children: filterSlot })) : null, _jsx("div", { className: classNames('flex-1 h-full max-h-full overflow-hidden px-6', contentClassName), children: children })] }));
4
- //# sourceMappingURL=primary-header.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"primary-header.js","sourceRoot":"","sources":["../../../src/primary-page/primary-header.tsx"],"names":[],"mappings":";AAEA,OAAO,UAAU,MAAM,YAAY,CAAC;AAapC,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAC1B,SAAS,EACT,UAAU,EACV,QAAQ,EACR,gBAAgB,EAChB,SAAS,EACT,eAAe,EACf,cAAc,EACd,SAAS,GACc,EAAE,EAAE,CAAC,CAC5B,eACE,SAAS,EAAE,UAAU,CACnB,2CAA2C,EAC3C,SAAS,CACV,aAEA,SAAS,IAAI,SAAS,CAAC,CAAC,CAAC,CACxB,eACE,SAAS,EAAE,UAAU,CACnB,6CAA6C,EAC7C,eAAe,CAChB,aAED,cACE,SAAS,EAAE,UAAU,CACnB,+CAA+C,EAC/C,cAAc,CACf,YAEA,SAAS,GACN,EACN,wBAAM,SAAS,GAAO,IAClB,CACP,CAAC,CAAC,CAAC,IAAI,EACP,UAAU,CAAC,CAAC,CAAC,CACZ,cAAK,SAAS,EAAC,4CAA4C,YACxD,UAAU,GACP,CACP,CAAC,CAAC,CAAC,IAAI,EACR,cACE,SAAS,EAAE,UAAU,CACnB,+CAA+C,EAC/C,gBAAgB,CACjB,YAEA,QAAQ,GACL,IACF,CACP,CAAC"}
@@ -1,8 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import classNames from 'classnames';
3
- import { Typography } from '@coze-arch/coze-design';
4
- import styles from './index.module.less';
5
- export function PrimaryTitle({ title, className }) {
6
- return (_jsx(Typography.Text, { className: classNames(styles['primary-title'], className), children: title }));
7
- }
8
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/primary-title/index.tsx"],"names":[],"mappings":";AACA,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,OAAO,MAAM,MAAM,qBAAqB,CAAC;AAOzC,MAAM,UAAU,YAAY,CAAC,EAAE,KAAK,EAAE,SAAS,EAAqB;IAClE,OAAO,CACL,KAAC,UAAU,CAAC,IAAI,IAAC,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,eAAe,CAAC,EAAE,SAAS,CAAC,YACvE,KAAK,GACU,CACnB,CAAC;AACJ,CAAC"}
@@ -1,42 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- /* eslint-disable @typescript-eslint/naming-convention */
3
- import { createContext, useContext, useEffect, useRef, useState, } from 'react';
4
- import { initIntl } from '@cozeloop/i18n';
5
- import { PageLoading } from '@/page-content';
6
- // Create context
7
- const CozeLoopContext = createContext({});
8
- // Provider component
9
- export function CozeLoopProvider({ children, defaultLanguage, resources, sendEvent, }) {
10
- const isInitialized = useRef(false);
11
- const [initialized, setInitialized] = useState(false);
12
- useEffect(() => {
13
- if (resources && !isInitialized.current) {
14
- initIntl({
15
- lng: defaultLanguage,
16
- resources,
17
- })
18
- .then(() => {
19
- isInitialized.current = true;
20
- setInitialized(true);
21
- })
22
- .catch(error => {
23
- console.error('Error initializing intl:', error);
24
- isInitialized.current = true;
25
- setInitialized(true);
26
- });
27
- }
28
- }, [resources, defaultLanguage]);
29
- if (!initialized) {
30
- return _jsx(PageLoading, {});
31
- }
32
- return (_jsx(CozeLoopContext.Provider, { value: { sendEvent }, children: children }));
33
- }
34
- // Hook to use sendEvent - return sendEvent function
35
- export function useReportEvent() {
36
- const context = useContext(CozeLoopContext);
37
- return (context.sendEvent ??
38
- ((name, params) => {
39
- console.info(name, params);
40
- }));
41
- }
42
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/provider/index.tsx"],"names":[],"mappings":";AAAA,yDAAyD;AACzD,OAAO,EACL,aAAa,EACb,UAAU,EACV,SAAS,EACT,MAAM,EACN,QAAQ,GAET,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAmB7C,iBAAiB;AACjB,MAAM,eAAe,GAAG,aAAa,CAAuB,EAAE,CAAC,CAAC;AAOhE,qBAAqB;AACrB,MAAM,UAAU,gBAAgB,CAAC,EAC/B,QAAQ,EACR,eAAe,EACf,SAAS,EACT,SAAS,GACa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xs } from "react/jsx-runtime";
2
- import { useEffect, useRef, useState } from 'react';
3
- import classNames from 'classnames';
4
- import { useMouseDownOffset } from '@cozeloop/hooks';
5
- import { SideSheet } from '@coze-arch/coze-design';
6
- const SIZE_MAP = {
7
- small: 448,
8
- medium: 684,
9
- large: 920,
10
- };
11
- /** 仅支持 left 模式 */
12
- export const ResizableSideSheet = (props) => {
13
- const { minSize = Number.MIN_VALUE, defaultSize, maxSize = Number.MAX_VALUE, size = 'small', onResizeEnd, className, children, ...restProps } = props;
14
- const [sidePaneWidth, setSidePaneWidth] = useState(defaultSize ?? SIZE_MAP[size]);
15
- const prevWidthRef = useRef(sidePaneWidth);
16
- const { ref, isActive } = useMouseDownOffset(({ offsetX }) => {
17
- const newWidth = prevWidthRef.current - offsetX;
18
- setSidePaneWidth([maxSize, newWidth, minSize].sort((a, b) => a - b)[1]);
19
- });
20
- useEffect(() => {
21
- prevWidthRef.current = sidePaneWidth;
22
- document.body.style.cursor = isActive ? 'col-resize' : '';
23
- document.body.style.userSelect = isActive ? 'none' : 'auto';
24
- if (!isActive) {
25
- onResizeEnd?.(sidePaneWidth);
26
- }
27
- }, [isActive]);
28
- return (_jsxs(SideSheet, { className: classNames('relative', className), size: size, width: sidePaneWidth, ...restProps, children: [_jsx("div", { ref: ref, className: classNames('absolute h-full w-1 bg-white top-0 left-0 hover:cursor-col-resize hover:bg-blue-400 transition', {
29
- 'bg-blue-400 cursor-col-resize': isActive,
30
- }) }), children] }));
31
- };
32
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resizable-side-sheet/index.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE3D,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAA4B,SAAS,EAAE,MA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AC;QAC5D,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,WAAW,EAAE,CAAC,aAAa,CAAC,CAAC;QAC/B,CAAC;IACH,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IACf,OAAO,CACL,MAAC,SAAS,IACR,SAAS,EAAE,UAAU,CAAC,UAAU,EAAE,SAAS,CAAC,EAC5C,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,aAAa,KAChB,SAAS,aAEb,cACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,UAAU,CACnB,gGAAgG,EAChG;oBACE,+BAA+B,EAAE,QAAQ;iBAC1C,CACF,GACD,EACD,QAAQ,IACC,CACb,CAAC;AACJ,CAAC,CAAC"}
@@ -1,15 +0,0 @@
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resize-sidesheet/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAEL,OAAO,EACP,SAAS,GACV,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAEhD,OAAO,EAAE,OAAO,EAAoB,MAAM,YAAY,CAAC;AAEvD,OAAO,MAAM,MAAM,qBAAqB,CAAC;AAEzC,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,KAIC,EACD,EAAE;IACF,MAAM,EACJ,QAAQ,EACR,WAAW,EACX,KAAK,EACL,QAAQ,EACR,SAAS,EACT,WAAW,EACX,WAAW,EACX,GAAG,IAAI,EACR,GAAG,KAAK,CAAC;IACV,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IACvE,OAAO,CACL,MAAC,SAAS,IACR,KAAK,EACH,eAAK,SAAS,EAAC,yBAAyB,aACtC,cAAK,SAAS,EAAC,QAAQ,YAAE,KAAK,GAAO,EACpC,WAAW,CAAC,CAAC,CAAC,CACb,KAAC,OAAO,IAAC,MAAM,EAAC,UAAU,EAAC,SAAS,EAAC,UAAU,GAAG,CACnD,CAAC,CAAC,CAAC,IAAI,EACR,KAAC,MAAM,IACL,IAAI,EAAC,SAAS,EACd,KAAK,EAAC,WAAW,EACjB,IAAI,EAAE,KAAC,gBAAgB,IAAC,SAAS,EAAC,mBAAmB,GAAG,EACxD,OAAO,EAAE,QAAQ,GACjB,IACE,EAER,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,aAAa,EAC9C,SAAS,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,SAAS,CAAC,KAClC,IAAI,EACR,QAAQ,EAAE,QAAQ,EAClB,QAAQ,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"}
@@ -1,30 +0,0 @@
1
- import { useEffect, useRef, useState } from 'react';
2
- import { useMouseDownOffset } from '../hooks/use-mouse-down-offset';
3
- const DEFAULT_WIDTH = 500;
4
- const MAX_WIDTH = 800;
5
- const MIN_WIDTH = 300;
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
- };
29
- };
30
- //# sourceMappingURL=use-drag.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-drag.js","sourceRoot":"","sources":["../../../src/resize-sidesheet/use-drag.ts"],"names":[],"mappings":"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,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"}
@@ -1,5 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,19 +0,0 @@
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
@@ -1 +0,0 @@
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,KAAK,EAAE,gBAAgB;CACxB,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAI5C,KAA0C;IAC1C,MAAM,EACJ,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,WAAW,EACX,SAAS,EACT,SAAS,EACT,UAAU,EACV,KAAK,EACL,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,QAAQ,EACR,QAAQ,EACR,QAAQ,GACT,GAAG,KAAK,CAAC;IACV,MAAM,EAAE,UAAU,EAAE,cAAc,EAAE,YAAY,EAAE,YAAY,EAAE,GAC9D,QAAQ,CAAC,SAAS,CAAC,eAAe,CAAC;IACrC,MAAM,EAAE,SAAS,GAAG,EAAE,EAAE,YAAY,GAAG,KAAK,EAAE,GAAG,QAAQ,CAAC,WAAW,CAAC;IAEtE,OAAO,CACL,MA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AAQ,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"}
@@ -1,39 +0,0 @@
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
@@ -1 +0,0 @@
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,EACX,YAAY,GAOb,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,wBAAwB,CAAC;AAElD,kCAAkC;AAClC,0BAA0B;AAC1B,KAAK;AAEL;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAIxC,KAAuC;IACvC,MAAM,EACJ,MAAM,EACN,SAAS,EACT,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,KAAK,EACL,UAAU,EACV,QAAQ,EACR,QAAQ;IACR,YAAY;IACZ,UAAU;IACV,SAAS;IACT,QAAQ,GACT,GAAG,KAAK,CAAC;IACV,MAAM,SAAS,GAAG,YAAY,CAAU,QAAQ,CAAC,CAAC;IAClD,qDAAqD;IACrD,qCAAqC;IACrC,OAAO;IACP,OAAO;IACP,MAAM;IACN,2DAA2D;IAC3D,MAAM,sBAAsB,GAAG,WAAW,CACxC,wBAAwB,EACxB,QAAQ,EACR,SAAS,CACV,CAAC;IACF,+CAA+C;IAC/C,+BAA+B;IAC/B,OAAO;IACP,OAAO;IACP,MAAM;IACN,qDAAqD;IACrD,sDAAsD;IACtD,MAAM,EACJ,eAAe,EAAE,EAAE,SAAS,EAAE,GAC/B,GAAG,QAAQ,CAAC,SAAS,CAAC;IACvB,MAAM,EAAE,SAAS,GAAG,EAAE,EAAE,GAAG,WAAgC,CAAC;IAE5D,OAAO,CACL,cACE,SAAS,EAAE,EAAE,CAAC,sCAAsC,EAAE,SAAS,CAAC,EAChE,EAAE,EAAE,QAAQ,CAAC,GAAG,YAEhB,MAAC,GAAG,IAAC,MAAM,EAAE,SAAS,aAwBpB,KAAC,GAAG,IAAC,SAAS,EAAC,qBAAqB,EAAC,IAAI,EAAE,EAAE,YAC1C,KAAK;wBACJ,CAAC,CAAC,KAAK,CAAC,GAAG,CACP,CAAC,EACC,GAAG,EACH,GAAG,SAAS,EACwB,EAAE,EAAE,CAAC,CACzC,KAAC,sBAAsB,OAAe,SAAS,IAAlB,GAAG,CAAmB,CACpD,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"}
@@ -1,32 +0,0 @@
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"base-input.js","sourceRoot":"","sources":["../../../../../src/semi-schema-form/components/tmpls/base-input.tsx"],"names":[],"mappings":";AAGA,OAAO,EACL,kBAAkB,EAElB,UAAU,EACV,aAAa,GAKd,MAAM,aAAa,CAAC;AACrB,OAAO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C,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"}
@@ -1,13 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,14 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,16 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,21 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Form, Typography } from '@coze-arch/coze-design';
3
- /** The `FieldTemplate` component is the template used by `SchemaField` to render any field. It renders the field
4
- * content, (label, description, children, errors and help) inside of a `WrapIfAdditional` component.
5
- *
6
- * @param props - The `FieldTemplateProps` for this component
7
- */
8
- export default function FieldTemplate(props) {
9
- const { children, description, rawErrors, hidden, label, rawDescription, required, } = props;
10
- if (hidden) {
11
- return _jsx("div", { className: "field-hidden", children: children });
12
- }
13
- // check to see if there is rawDescription(string) before using description(ReactNode)
14
- // to prevent showing a blank description area
15
- const descriptionNode = rawDescription ? description : undefined;
16
- return (_jsxs(Form.Slot, { label: { text: label, required }, className: "mb-4", error: {
17
- error: rawErrors,
18
- validateStatus: rawErrors?.length ? 'error' : undefined,
19
- }, children: [children, _jsx(Typography.Paragraph, { className: "text-xs w-full text-gray-500", children: descriptionNode })] }));
20
- }
21
- //# sourceMappingURL=field.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"field.js","sourceRoot":"","sources":["../../../../../src/semi-schema-form/components/tmpls/field.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAE1D;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAInC,KAAkC;IAClC,MAAM,EACJ,QAAQ,EACR,WAAW,EACX,SAAS,EACT,MAAM,EACN,KAAK,EACL,cAAc,EACd,QAAQ,GACT,GAAG,KAAK,CAAC;IAEV,IAAI,MAAM,EAAE,CAAC;QACX,OAAO,cAAK,SAAS,EAAC,cAAc,YAAE,QAAQ,GAAO,CAAC;IACxD,CAAC;IAED,sFAAsF;IACtF,8CAA8C;IAC9C,MAAM,eAAe,GAAG,cAAc,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC;IAEjE,OAAO,CACL,MAAC,IAAI,CAAC,IAAI,IACR,KAAK,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,EAChC,SAAS,EAAC,MAAM,EAChB,KAAK,EAAE;YACL,KAAK,EAAE,SAAS;YAChB,cAAc,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS;SACxD,aAEA,QAAQ,EAET,KAAC,UAAU,CAAC,SAAS,IAAC,SAAS,EAAC,8BAA8B,YAC3D,eAAe,GACK,IACb,CACb,CAAC;AACJ,CAAC"}
@@ -1,29 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { TranslatableString, } from '@rjsf/utils';
3
- import { IconCozCopy, IconCozLongArrowUp, IconCozPlusCircle, IconCozTrashCan, } from '@coze-arch/coze-design/icons';
4
- import { IconButton, } from '@coze-arch/coze-design';
5
- export default function BaseIconButton(props) {
6
- const { iconType, icon, onClick, uiSchema, registry, style, ...otherProps } = props;
7
- return (_jsx(IconButton, { onClick: onClick, icon: icon, ...otherProps, size: "small" }));
8
- }
9
- export const AddButton = props => {
10
- const { registry: { translateString }, } = props;
11
- return (_jsx(BaseIconButton, { title: translateString(TranslatableString.AddItemButton), ...props, icon: _jsx(IconCozPlusCircle, {}) }));
12
- };
13
- export const CopyButton = props => {
14
- const { registry: { translateString }, } = props;
15
- return (_jsx(BaseIconButton, { title: translateString(TranslatableString.CopyButton), ...props, icon: _jsx(IconCozCopy, {}) }));
16
- };
17
- export const MoveDownButton = props => {
18
- const { registry: { translateString }, } = props;
19
- return (_jsx(BaseIconButton, { title: translateString(TranslatableString.MoveDownButton), ...props, icon: _jsx(IconCozLongArrowUp, { className: "rotate-180" }) }));
20
- };
21
- export const MoveUpButton = props => {
22
- const { registry: { translateString }, } = props;
23
- return (_jsx(BaseIconButton, { title: translateString(TranslatableString.MoveUpButton), ...props, icon: _jsx(IconCozLongArrowUp, {}) }));
24
- };
25
- export const RemoveButton = props => {
26
- const { registry: { translateString }, } = props;
27
- return (_jsx(BaseIconButton, { title: translateString(TranslatableString.RemoveButton), ...props, type: "danger", icon: _jsx(IconCozTrashCan, {}) }));
28
- };
29
- //# sourceMappingURL=icon-button.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"icon-button.js","sourceRoot":"","sources":["../../../../../src/semi-schema-form/components/tmpls/icon-button.tsx"],"names":[],"mappings":";AAEA,OAAO,EAKL,kBAAkB,GACnB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,GAChB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,UAAU,GAEX,MAAM,wBAAwB,CAAC;AAgBhC,MAAM,CAAC,OAAO,UAAU,cAAc,CAIpC,KAA6D;IAC7D,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,UAAU,EAAE,GACzE,KAAK,CAAC;IAER,OAAO,CACL,KAAC,UAAU,IAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,KAAM,UAAU,EAAE,IAAI,EAAC,OAAO,GAAG,CAC1E,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,SAAS,GAAwB,KAAK,CAAC,EAAE;IACpD,MAAM,EACJ,QAAQ,EAAE,EAAE,eAAe,EAAE,GAC9B,GAAG,KAAK,CAAC;IACV,OAAO,CACL,KAAC,cAAc,IACb,KAAK,EAAE,eAAe,CAAC,kBAAkB,CAAC,aAAa,CAAC,KACpD,KAAK,EACT,IAAI,EAAE,KAAC,iBAAiB,KAAG,GAC3B,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAA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
1
- import TitleFieldTemplate from './title-field';
2
- import SubmitButton from './submit';
3
- import ObjectFieldTemplate from './object-field';
4
- import { AddButton, CopyButton, MoveDownButton, MoveUpButton, RemoveButton, } from './icon-button';
5
- import FieldErrorTemplate from './field-error';
6
- import FieldTemplate from './field';
7
- import ErrorListTemplate from './error-list';
8
- import DescriptionFieldTemplate from './description-field';
9
- import BaseInputTemplate from './base-input';
10
- import ArrayFieldItemTemplate from './array-field-item';
11
- import ArrayFieldTemplate from './array-field';
12
- export const templates = {
13
- ArrayFieldTemplate,
14
- ArrayFieldItemTemplate,
15
- BaseInputTemplate,
16
- FieldTemplate,
17
- ObjectFieldTemplate,
18
- ButtonTemplates: {
19
- AddButton,
20
- CopyButton,
21
- MoveDownButton,
22
- MoveUpButton,
23
- RemoveButton,
24
- SubmitButton,
25
- },
26
- TitleFieldTemplate,
27
- DescriptionFieldTemplate,
28
- FieldErrorTemplate,
29
- ErrorListTemplate,
30
- };
31
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/semi-schema-form/components/tmpls/index.ts"],"names":[],"mappings":"AAEA,OAAO,kBAAkB,MAAM,eAAe,CAAC;AAC/C,OAAO,YAAY,MAAM,UAAU,CAAC;AACpC,OAAO,mBAAmB,MAAM,gBAAgB,CAAC;AACjD,OAAO,EACL,SAAS,EACT,UAAU,EACV,cAAc,EACd,YAAY,EACZ,YAAY,GACb,MAAM,eAAe,CAAC;AACvB,OAAO,kBAAkB,MAAM,eAAe,CAAC;AAC/C,OAAO,aAAa,MAAM,SAAS,CAAC;AACpC,OAAO,iBAAiB,MAAM,cAAc,CAAC;AAC7C,OAAO,wBAAwB,MAAM,qBAAqB,CAAC;AAC3D,OAAO,iBAAiB,MAAM,cAAc,CAAC;AAC7C,OAAO,sBAAsB,MAAM,oBAAoB,CAAC;AACxD,OAAO,kBAAkB,MAAM,eAAe,CAAC;AAE/C,MAAM,CAAC,MAAM,SAAS,GAA2B;IAC/C,kBAAkB;IAClB,sBAAsB;IACtB,iBAAiB;IACjB,aAAa;IACb,mBAAmB;IACnB,eAAe,EAAE;QACf,SAAS;QACT,UAAU;QACV,cAAc;QACd,YAAY;QACZ,YAAY;QACZ,YAAY;KACb;IACD,kBAAkB;IAClB,wBAAwB;IACxB,kBAAkB;IAClB,iBAAiB;CAClB,CAAC"}
@@ -1,81 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { isString, isObject, isNumber } from 'lodash-es';
3
- import { canExpand,
4
- // descriptionId,
5
- // getTemplate,
6
- getUiOptions,
7
- // titleId,
8
- } from '@rjsf/utils';
9
- import { Col, Row, TextArea } from '@coze-arch/coze-design';
10
- // const DESCRIPTION_COL_STYLE = {
11
- // paddingBottom: '8px',
12
- // };
13
- /** The `ObjectFieldTemplate` is the template to use to render all the inner properties of an object along with the
14
- * title and description if available. If the object is expandable, then an `AddButton` is also rendered after all
15
- * the properties.
16
- *
17
- * @param props - The `ObjectFieldTemplateProps` for this component
18
- */
19
- export default function ObjectFieldTemplate(props) {
20
- const {
21
- // description,
22
- disabled, formContext, formData, idSchema, onAddClick, properties, readonly,
23
- // required,
24
- registry, schema,
25
- // title,
26
- uiSchema, } = props;
27
- // const uiOptions = getUiOptions<T, S, F>(uiSchema);
28
- // const TitleFieldTemplate = getTemplate<'TitleFieldTemplate', T, S, F>(
29
- // 'TitleFieldTemplate',
30
- // registry,
31
- // uiOptions,
32
- // );
33
- // const DescriptionFieldTemplate = getTemplate<
34
- // 'DescriptionFieldTemplate',
35
- // T,
36
- // S,
37
- // F
38
- // >('DescriptionFieldTemplate', registry, uiOptions);
39
- // Button templates are not overridden in the uiSchema
40
- const { ButtonTemplates: { AddButton }, } = registry.templates;
41
- const { colSpan = 24, rowGutter = 24 } = formContext;
42
- const findSchema = (element) => element.content.props.schema;
43
- const findSchemaType = (element) => findSchema(element).type;
44
- const findUiSchema = (element) => element.content.props.uiSchema;
45
- const findUiSchemaField = (element) => getUiOptions(findUiSchema(element)).field;
46
- const findUiSchemaWidget = (element) => getUiOptions(findUiSchema(element)).widget;
47
- const calculateColSpan = (element) => {
48
- const type = findSchemaType(element);
49
- const field = findUiSchemaField(element);
50
- const widget = findUiSchemaWidget(element);
51
- const defaultColSpan = properties.length < 2 || // Single or no field in object.
52
- type === 'object' ||
53
- type === 'array' ||
54
- widget === 'textarea'
55
- ? 24
56
- : 12;
57
- if (isObject(colSpan)) {
58
- const colSpanObj = colSpan;
59
- if (isString(widget)) {
60
- return colSpanObj[widget];
61
- }
62
- if (isString(field)) {
63
- return colSpanObj[field];
64
- }
65
- if (isString(type)) {
66
- return colSpanObj[type];
67
- }
68
- }
69
- if (isNumber(colSpan)) {
70
- return colSpan;
71
- }
72
- return defaultColSpan;
73
- };
74
- if (!props.properties.length) {
75
- return _jsx(TextArea, { id: idSchema.$id });
76
- }
77
- return (_jsxs("fieldset", { id: idSchema.$id, className: 'p-3 semi-card-bordered rounded-[4px]', children: [_jsx(Row, { gutter: rowGutter, children: properties
78
- .filter(e => !e.hidden)
79
- .map((element) => (_jsx(Col, { span: calculateColSpan(element), children: element.content }, element.name))) }), canExpand(schema, uiSchema, formData) && (_jsx(Col, { span: 24, children: _jsx(Row, { gutter: rowGutter, justify: "end", children: _jsx(Col, { span: 6, children: _jsx(AddButton, { className: "object-property-expand", disabled: disabled || readonly, onClick: onAddClick(schema), uiSchema: uiSchema, registry: registry }) }) }) }))] }));
80
- }
81
- //# sourceMappingURL=object-field.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"object-field.js","sourceRoot":"","sources":["../../../../../src/semi-schema-form/components/tmpls/object-field.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,EAQL,SAAS;AACT,iBAAiB;AACjB,eAAe;AACf,YAAY;AACZ,WAAW;EACZ,MAAM,aAAa,CAAC;AACrB,OAAO,E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AS,YAwBnB,UAAU;qBACR,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;qBACtB,GAAG,CAAC,CAAC,OAAwC,EAAE,EAAE,CAAC,CACjD,KAAC,GAAG,IAAoB,IAAI,EAAE,gBAAgB,CAAC,OAAO,CAAC,YACpD,OAAO,CAAC,OAAO,IADR,OAAO,CAAC,IAAI,CAEhB,CACP,CAAC,GACA,EAEL,SAAS,CAAC,MAAM,EAAE,QAAQ,EAAE,QAAQ,CAAC,IAAI,CACxC,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,wBAAwB,EAClC,QAAQ,EAAE,QAAQ,IAAI,QAAQ,EAC9B,OAAO,EAAE,UAAU,CAAC,MAAM,CAAC,EAC3B,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,GAClB,GACE,GACF,GACF,CACP,IACQ,CACZ,CAAC;AACJ,CAAC"}
@@ -1,13 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { getSubmitButtonOptions, } from '@rjsf/utils';
3
- import { Button } from '@coze-arch/coze-design';
4
- /** The `SubmitButton` renders a button that represent the `Submit` action on a form
5
- */
6
- export default function SubmitButton({ uiSchema }) {
7
- const { submitText, norender, props: submitButtonProps, } = getSubmitButtonOptions(uiSchema);
8
- if (norender) {
9
- return null;
10
- }
11
- return (_jsx(Button, { type: "primary", ...submitButtonProps, htmlType: "submit", children: submitText }));
12
- }
13
- //# sourceMappingURL=submit.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"submit.js","sourceRoot":"","sources":["../../../../../src/semi-schema-form/components/tmpls/submit.tsx"],"names":[],"mappings":";AACA,OAAO,EACL,sBAAsB,GAKvB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAEhD;GACG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAIlC,EAAE,QAAQ,EAA8B;IACxC,MAAM,EACJ,UAAU,EACV,QAAQ,EACR,KAAK,EAAE,iBAAiB,GACzB,GAAG,sBAAsB,CAAC,QAAQ,CAAC,CAAC;IACrC,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,CACL,KAAC,MAAM,IAAC,IAAI,EAAC,SAAS,KAAK,iBAAiB,EAAE,QAAQ,EAAC,QAAQ,YAC5D,UAAU,GACJ,CACV,CAAC;AACJ,CAAC"}
@@ -1,12 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { getUiOptions, } from '@rjsf/utils';
3
- import { Typography } from '@coze-arch/coze-design';
4
- /** The `TitleField` is the template to use to render the title of a field
5
- *
6
- * @param props - The `TitleFieldProps` for this component
7
- */
8
- export default function TitleField({ id, uiSchema, title }) {
9
- const uiOptions = getUiOptions(uiSchema);
10
- return (_jsxs("div", { id: id, className: "my-1", children: [_jsx(Typography.Title, { heading: 5, children: uiOptions.title || title }), _jsx("hr", { className: "border-0 bg-secondary", style: { height: '1px' } })] }));
11
- }
12
- //# sourceMappingURL=title-field.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"title-field.js","sourceRoot":"","sources":["../../../../../src/semi-schema-form/components/tmpls/title-field.tsx"],"names":[],"mappings":";AACA,OAAO,EAKL,YAAY,GACb,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,UAAU,CAIhC,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAA4B;IACjD,MAAM,SAAS,GAAG,YAAY,CAAU,QAAQ,CAAC,CAAC;IAElD,OAAO,CACL,eAAK,EAAE,EAAE,EAAE,EAAE,SAAS,EAAC,MAAM,aAC3B,KAAC,UAAU,CAAC,KAAK,IAAC,OAAO,EAAE,CAAC,YACzB,SAAS,CAAC,KAAK,IAAI,KAAK,GACR,EACnB,aAAI,SAAS,EAAC,uBAAuB,EAAC,KAAK,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,GAAI,IAC9D,CACP,CAAC;AACJ,CAAC"}