@cozeloop/components 0.0.2 → 0.0.3
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.
- package/.eslintcache +1 -0
- package/.rush/temp/shrinkwrap-deps.json +770 -0
- package/OWNERS +5 -0
- package/README.md +82 -1
- package/config/rush-project.json +8 -0
- package/dist/es/index.css +661 -0
- package/dist/es/index.js +6044 -65
- package/dist/es/static/svg/select.svg +1 -0
- package/dist/lib/base-search-select/base-search-form-select.d.ts +3 -0
- package/dist/lib/base-search-select/base-search-form-select.js +6 -0
- package/dist/lib/base-search-select/base-search-form-select.js.map +1 -0
- package/dist/lib/base-search-select/base-search-select.d.ts +9 -0
- package/dist/lib/base-search-select/base-search-select.js +127 -0
- package/dist/lib/base-search-select/base-search-select.js.map +1 -0
- package/dist/lib/base-search-select/index.d.ts +3 -0
- package/dist/lib/base-search-select/index.js +3 -0
- package/dist/lib/base-search-select/index.js.map +1 -0
- package/dist/lib/base-search-select/types.d.ts +13 -0
- package/dist/lib/base-search-select/types.js +2 -0
- package/dist/lib/base-search-select/types.js.map +1 -0
- package/dist/lib/base-search-select/utils.d.ts +8 -0
- package/dist/lib/base-search-select/utils.js +48 -0
- package/dist/lib/base-search-select/utils.js.map +1 -0
- package/dist/lib/basic-card/index.d.ts +7 -0
- package/dist/lib/basic-card/index.js +4 -0
- package/dist/lib/basic-card/index.js.map +1 -0
- package/dist/lib/card-pane/index.d.ts +5 -0
- package/dist/lib/card-pane/index.js +9 -0
- package/dist/lib/card-pane/index.js.map +1 -0
- package/dist/lib/chip-select/index.d.ts +2 -0
- package/dist/lib/chip-select/index.js +6 -0
- package/dist/lib/chip-select/index.js.map +1 -0
- package/dist/lib/code-editor/index.d.ts +3 -0
- package/dist/lib/code-editor/index.js +7 -0
- package/dist/lib/code-editor/index.js.map +1 -0
- package/dist/lib/code-usage/index.d.ts +14 -0
- package/dist/lib/code-usage/index.js +31 -0
- package/dist/lib/code-usage/index.js.map +1 -0
- package/dist/lib/codemirror-editor/code-editor.d.ts +2 -0
- package/dist/lib/codemirror-editor/code-editor.js +108 -0
- package/dist/lib/codemirror-editor/code-editor.js.map +1 -0
- package/dist/lib/codemirror-editor/index.d.ts +4 -0
- package/dist/lib/codemirror-editor/index.js +5 -0
- package/dist/lib/codemirror-editor/index.js.map +1 -0
- package/dist/lib/codemirror-editor/json-editor.d.ts +19 -0
- package/dist/lib/codemirror-editor/json-editor.js +97 -0
- package/dist/lib/codemirror-editor/json-editor.js.map +1 -0
- package/dist/lib/codemirror-editor/raw-text-editor.d.ts +11 -0
- package/dist/lib/codemirror-editor/raw-text-editor.js +32 -0
- package/dist/lib/codemirror-editor/raw-text-editor.js.map +1 -0
- package/dist/lib/codemirror-editor/text-editor.d.ts +2 -0
- package/dist/lib/codemirror-editor/text-editor.js +44 -0
- package/dist/lib/codemirror-editor/text-editor.js.map +1 -0
- package/dist/lib/codemirror-editor/themes/coze-dark.d.ts +1 -0
- package/dist/lib/codemirror-editor/themes/coze-dark.js +113 -0
- package/dist/lib/codemirror-editor/themes/coze-dark.js.map +1 -0
- package/dist/lib/codemirror-editor/themes/coze-light.d.ts +1 -0
- package/dist/lib/codemirror-editor/themes/coze-light.js +119 -0
- package/dist/lib/codemirror-editor/themes/coze-light.js.map +1 -0
- package/dist/lib/collapse-card/index.d.ts +13 -0
- package/dist/lib/collapse-card/index.js +31 -0
- package/dist/lib/collapse-card/index.js.map +1 -0
- package/dist/lib/collapsible-card/index.d.ts +13 -0
- package/dist/lib/collapsible-card/index.js +12 -78
- package/dist/lib/collapsible-card/index.js.map +1 -0
- package/dist/{types → lib}/column-manage-storage/index.d.ts +6 -6
- package/dist/lib/column-manage-storage/index.js +43 -93
- package/dist/lib/column-manage-storage/index.js.map +1 -0
- package/dist/lib/columns-select/index.d.ts +19 -0
- package/dist/lib/columns-select/index.js +73 -237
- package/dist/lib/columns-select/index.js.map +1 -0
- package/dist/lib/edit-icon-button/index.d.ts +8 -0
- package/dist/lib/edit-icon-button/index.js +13 -0
- package/dist/lib/edit-icon-button/index.js.map +1 -0
- package/dist/lib/footer-actions/index.d.ts +15 -0
- package/dist/lib/footer-actions/index.js +9 -0
- package/dist/lib/footer-actions/index.js.map +1 -0
- package/dist/{types → lib}/hooks/use-infinite-scroll.d.ts +12 -12
- package/dist/lib/hooks/use-infinite-scroll.js +130 -192
- package/dist/lib/hooks/use-infinite-scroll.js.map +1 -0
- package/dist/lib/hooks/use-mouse-down-offset.d.ts +9 -0
- package/dist/lib/hooks/use-mouse-down-offset.js +38 -64
- package/dist/lib/hooks/use-mouse-down-offset.js.map +1 -0
- package/dist/lib/hooks/use-unsave-leave-warning.d.ts +12 -0
- package/dist/lib/hooks/use-unsave-leave-warning.js +33 -0
- package/dist/lib/hooks/use-unsave-leave-warning.js.map +1 -0
- package/dist/lib/id-render/icon-button-container.d.ts +8 -0
- package/dist/lib/id-render/icon-button-container.js +7 -88
- package/dist/lib/id-render/icon-button-container.js.map +1 -0
- package/dist/lib/id-render/index.d.ts +7 -0
- package/dist/lib/id-render/index.js +20 -111
- package/dist/lib/id-render/index.js.map +1 -0
- package/dist/lib/index-controller/record-navigation.d.ts +6 -0
- package/dist/lib/index-controller/record-navigation.js +9 -0
- package/dist/lib/index-controller/record-navigation.js.map +1 -0
- package/dist/lib/index-controller/use-item-index-controller.d.ts +47 -0
- package/dist/lib/index-controller/use-item-index-controller.js +123 -0
- package/dist/lib/index-controller/use-item-index-controller.js.map +1 -0
- package/dist/lib/index.d.ts +70 -0
- package/dist/lib/index.js +76 -110
- package/dist/lib/index.js.map +1 -0
- package/dist/{types → lib}/infinite-scroll-table/index.d.ts +6 -6
- package/dist/lib/infinite-scroll-table/index.js +31 -123
- package/dist/lib/infinite-scroll-table/index.js.map +1 -0
- package/dist/lib/info-tooltip/index.d.ts +9 -0
- package/dist/lib/info-tooltip/index.js +9 -0
- package/dist/lib/info-tooltip/index.js.map +1 -0
- package/dist/lib/input-components/radio-button.d.ts +14 -0
- package/dist/lib/input-components/radio-button.js +21 -0
- package/dist/lib/input-components/radio-button.js.map +1 -0
- package/dist/lib/input-slider/index.d.ts +15 -0
- package/dist/lib/input-slider/index.js +73 -146
- package/dist/lib/input-slider/index.js.map +1 -0
- package/dist/lib/input-with-count/index.d.ts +2 -0
- package/dist/lib/input-with-count/index.js +7 -0
- package/dist/lib/input-with-count/index.js.map +1 -0
- package/dist/lib/jump-button/jump-icon-button.d.ts +4 -0
- package/dist/lib/jump-button/jump-icon-button.js +7 -0
- package/dist/lib/jump-button/jump-icon-button.js.map +1 -0
- package/dist/{types → lib}/large-txt-render/index.d.ts +2 -2
- package/dist/lib/large-txt-render/index.js +24 -60
- package/dist/lib/large-txt-render/index.js.map +1 -0
- package/dist/lib/layout/content.d.ts +7 -0
- package/dist/lib/layout/content.js +5 -0
- package/dist/lib/layout/content.js.map +1 -0
- package/dist/lib/layout/header.d.ts +7 -0
- package/dist/lib/layout/header.js +6 -0
- package/dist/lib/layout/header.js.map +1 -0
- package/dist/lib/layout/index.d.ts +12 -0
- package/dist/lib/layout/index.js +9 -0
- package/dist/lib/layout/index.js.map +1 -0
- package/dist/lib/layout/tabs.d.ts +6 -0
- package/dist/lib/layout/tabs.js +10 -0
- package/dist/lib/layout/tabs.js.map +1 -0
- package/dist/lib/lazy-load-component/index.d.ts +5 -0
- package/dist/lib/lazy-load-component/index.js +42 -0
- package/dist/lib/lazy-load-component/index.js.map +1 -0
- package/dist/lib/logic-editor/index.d.ts +3 -0
- package/dist/lib/logic-editor/index.js +3 -0
- package/dist/lib/logic-editor/index.js.map +1 -0
- package/dist/lib/logic-editor/logic-editor.d.ts +17 -0
- package/dist/lib/logic-editor/logic-editor.js +69 -0
- package/dist/lib/logic-editor/logic-editor.js.map +1 -0
- package/dist/lib/logic-editor/logic-left-render.d.ts +3 -0
- package/dist/lib/logic-editor/logic-left-render.js +60 -0
- package/dist/lib/logic-editor/logic-left-render.js.map +1 -0
- package/dist/lib/logic-editor/logic-operator-render.d.ts +3 -0
- package/dist/lib/logic-editor/logic-operator-render.js +29 -0
- package/dist/lib/logic-editor/logic-operator-render.js.map +1 -0
- package/dist/lib/logic-editor/logic-right-render.d.ts +3 -0
- package/dist/lib/logic-editor/logic-right-render.js +25 -0
- package/dist/lib/logic-editor/logic-right-render.js.map +1 -0
- package/dist/lib/logic-editor/logic-types.d.ts +49 -0
- package/dist/lib/logic-editor/logic-types.js +136 -0
- package/dist/lib/logic-editor/logic-types.js.map +1 -0
- package/dist/lib/logic-editor/utils.d.ts +2 -0
- package/dist/lib/logic-editor/utils.js +18 -0
- package/dist/lib/logic-editor/utils.js.map +1 -0
- package/dist/lib/logic-expr/consts.d.ts +2 -0
- package/dist/lib/logic-expr/consts.js +5 -0
- package/dist/lib/logic-expr/consts.js.map +1 -0
- package/dist/lib/logic-expr/expr-group-render.d.ts +2 -0
- package/dist/lib/logic-expr/expr-group-render.js +61 -0
- package/dist/lib/logic-expr/expr-group-render.js.map +1 -0
- package/dist/lib/logic-expr/expr-render.d.ts +2 -0
- package/dist/lib/logic-expr/expr-render.js +85 -0
- package/dist/lib/logic-expr/expr-render.js.map +1 -0
- package/dist/lib/logic-expr/index.d.ts +2 -0
- package/dist/lib/logic-expr/index.js +2 -0
- package/dist/lib/logic-expr/index.js.map +1 -0
- package/dist/lib/logic-expr/logic-expr.d.ts +2 -0
- package/dist/lib/logic-expr/logic-expr.js +187 -0
- package/dist/lib/logic-expr/logic-expr.js.map +1 -0
- package/dist/lib/logic-expr/logic-not.d.ts +10 -0
- package/dist/lib/logic-expr/logic-not.js +21 -0
- package/dist/lib/logic-expr/logic-not.js.map +1 -0
- package/dist/lib/logic-expr/logic-toggle.d.ts +12 -0
- package/dist/lib/logic-expr/logic-toggle.js +33 -0
- package/dist/lib/logic-expr/logic-toggle.js.map +1 -0
- package/dist/lib/logic-expr/types.d.ts +79 -0
- package/dist/lib/logic-expr/types.js +2 -0
- package/dist/lib/logic-expr/types.js.map +1 -0
- package/dist/lib/loop-radio-group/index.d.ts +2 -0
- package/dist/lib/loop-radio-group/index.js +7 -0
- package/dist/lib/loop-radio-group/index.js.map +1 -0
- package/dist/lib/multi-part-editor/components/image-item-renderer.d.ts +14 -0
- package/dist/lib/multi-part-editor/components/image-item-renderer.js +57 -0
- package/dist/lib/multi-part-editor/components/image-item-renderer.js.map +1 -0
- package/dist/lib/multi-part-editor/components/multipart-item-renderer.d.ts +10 -0
- package/dist/lib/multi-part-editor/components/multipart-item-renderer.js +25 -0
- package/dist/lib/multi-part-editor/components/multipart-item-renderer.js.map +1 -0
- package/dist/lib/multi-part-editor/components/url-input-modal.d.ts +14 -0
- package/dist/lib/multi-part-editor/components/url-input-modal.js +150 -0
- package/dist/lib/multi-part-editor/components/url-input-modal.js.map +1 -0
- package/dist/lib/multi-part-editor/components/video-item-renderer.d.ts +14 -0
- package/dist/lib/multi-part-editor/components/video-item-renderer.js +57 -0
- package/dist/lib/multi-part-editor/components/video-item-renderer.js.map +1 -0
- package/dist/lib/multi-part-editor/index.d.ts +3 -0
- package/dist/lib/multi-part-editor/index.js +300 -0
- package/dist/lib/multi-part-editor/index.js.map +1 -0
- package/dist/lib/multi-part-editor/multi-part-render.d.ts +10 -0
- package/dist/lib/multi-part-editor/multi-part-render.js +40 -0
- package/dist/lib/multi-part-editor/multi-part-render.js.map +1 -0
- package/dist/lib/multi-part-editor/type.d.ts +81 -0
- package/dist/lib/multi-part-editor/type.js +25 -0
- package/dist/lib/multi-part-editor/type.js.map +1 -0
- package/dist/lib/multi-part-editor/upload-button.d.ts +23 -0
- package/dist/lib/multi-part-editor/upload-button.js +103 -0
- package/dist/lib/multi-part-editor/upload-button.js.map +1 -0
- package/dist/lib/multi-part-editor/utils.d.ts +16 -0
- package/dist/lib/multi-part-editor/utils.js +43 -0
- package/dist/lib/multi-part-editor/utils.js.map +1 -0
- package/dist/lib/open-detail-button/index.d.ts +6 -0
- package/dist/lib/open-detail-button/index.js +11 -0
- package/dist/lib/open-detail-button/index.js.map +1 -0
- package/dist/lib/page-content/index.d.ts +20 -0
- package/dist/lib/page-content/index.js +17 -130
- package/dist/lib/page-content/index.js.map +1 -0
- package/dist/lib/primary-page/index.d.ts +1 -0
- package/dist/lib/primary-page/index.js +2 -28
- package/dist/lib/primary-page/index.js.map +1 -0
- package/dist/lib/primary-page/primary-header.d.ts +13 -0
- package/dist/lib/primary-page/primary-header.js +4 -72
- package/dist/lib/primary-page/primary-header.js.map +1 -0
- package/dist/lib/primary-title/index.d.ts +6 -0
- package/dist/lib/primary-title/index.js +8 -0
- package/dist/lib/primary-title/index.js.map +1 -0
- package/dist/lib/provider/index.d.ts +18 -0
- package/dist/lib/provider/index.js +43 -0
- package/dist/lib/provider/index.js.map +1 -0
- package/dist/lib/resizable-side-sheet/index.d.ts +10 -0
- package/dist/lib/resizable-side-sheet/index.js +32 -0
- package/dist/lib/resizable-side-sheet/index.js.map +1 -0
- package/dist/{types → lib}/resize-sidesheet/index.d.ts +4 -3
- package/dist/lib/resize-sidesheet/index.js +15 -129
- package/dist/lib/resize-sidesheet/index.js.map +1 -0
- package/dist/lib/resize-sidesheet/use-drag.d.ts +11 -0
- package/dist/lib/resize-sidesheet/use-drag.js +26 -51
- package/dist/lib/resize-sidesheet/use-drag.js.map +1 -0
- package/dist/lib/schema-editor/index.d.ts +11 -0
- package/dist/lib/schema-editor/index.js +5 -0
- package/dist/lib/schema-editor/index.js.map +1 -0
- package/dist/lib/search-form/index.d.ts +15 -0
- package/dist/lib/search-form/index.js +77 -0
- package/dist/lib/search-form/index.js.map +1 -0
- package/dist/lib/semi-schema-form/components/tmpls/array-field-item.d.ts +6 -0
- package/dist/lib/semi-schema-form/components/tmpls/array-field-item.js +19 -0
- package/dist/lib/semi-schema-form/components/tmpls/array-field-item.js.map +1 -0
- package/dist/lib/semi-schema-form/components/tmpls/array-field.d.ts +6 -0
- package/dist/lib/semi-schema-form/components/tmpls/array-field.js +39 -0
- package/dist/lib/semi-schema-form/components/tmpls/array-field.js.map +1 -0
- package/dist/lib/semi-schema-form/components/tmpls/base-input.d.ts +8 -0
- package/dist/lib/semi-schema-form/components/tmpls/base-input.js +32 -0
- package/dist/lib/semi-schema-form/components/tmpls/base-input.js.map +1 -0
- package/dist/lib/semi-schema-form/components/tmpls/description-field.d.ts +6 -0
- package/dist/lib/semi-schema-form/components/tmpls/description-field.js +13 -0
- package/dist/lib/semi-schema-form/components/tmpls/description-field.js.map +1 -0
- package/dist/lib/semi-schema-form/components/tmpls/error-list.d.ts +6 -0
- package/dist/lib/semi-schema-form/components/tmpls/error-list.js +14 -0
- package/dist/lib/semi-schema-form/components/tmpls/error-list.js.map +1 -0
- package/dist/lib/semi-schema-form/components/tmpls/field-error.d.ts +6 -0
- package/dist/lib/semi-schema-form/components/tmpls/field-error.js +16 -0
- package/dist/lib/semi-schema-form/components/tmpls/field-error.js.map +1 -0
- package/dist/lib/semi-schema-form/components/tmpls/field.d.ts +7 -0
- package/dist/lib/semi-schema-form/components/tmpls/field.js +21 -0
- package/dist/lib/semi-schema-form/components/tmpls/field.js.map +1 -0
- package/dist/lib/semi-schema-form/components/tmpls/icon-button.d.ts +11 -0
- package/dist/lib/semi-schema-form/components/tmpls/icon-button.js +29 -0
- package/dist/lib/semi-schema-form/components/tmpls/icon-button.js.map +1 -0
- package/dist/lib/semi-schema-form/components/tmpls/index.d.ts +2 -0
- package/dist/lib/semi-schema-form/components/tmpls/index.js +31 -0
- package/dist/lib/semi-schema-form/components/tmpls/index.js.map +1 -0
- package/dist/lib/semi-schema-form/components/tmpls/object-field.d.ts +8 -0
- package/dist/lib/semi-schema-form/components/tmpls/object-field.js +81 -0
- package/dist/lib/semi-schema-form/components/tmpls/object-field.js.map +1 -0
- package/dist/lib/semi-schema-form/components/tmpls/submit.d.ts +4 -0
- package/dist/lib/semi-schema-form/components/tmpls/submit.js +13 -0
- package/dist/lib/semi-schema-form/components/tmpls/submit.js.map +1 -0
- package/dist/lib/semi-schema-form/components/tmpls/title-field.d.ts +6 -0
- package/dist/lib/semi-schema-form/components/tmpls/title-field.js +12 -0
- package/dist/lib/semi-schema-form/components/tmpls/title-field.js.map +1 -0
- package/dist/lib/semi-schema-form/components/widgets/checkbox.d.ts +7 -0
- package/dist/lib/semi-schema-form/components/widgets/checkbox.js +26 -0
- package/dist/lib/semi-schema-form/components/widgets/checkbox.js.map +1 -0
- package/dist/lib/semi-schema-form/components/widgets/checkboxs.d.ts +7 -0
- package/dist/lib/semi-schema-form/components/widgets/checkboxs.js +27 -0
- package/dist/lib/semi-schema-form/components/widgets/checkboxs.js.map +1 -0
- package/dist/lib/semi-schema-form/components/widgets/index.d.ts +2 -0
- package/dist/lib/semi-schema-form/components/widgets/index.js +15 -0
- package/dist/lib/semi-schema-form/components/widgets/index.js.map +1 -0
- package/dist/lib/semi-schema-form/components/widgets/radio.d.ts +7 -0
- package/dist/lib/semi-schema-form/components/widgets/radio.js +27 -0
- package/dist/lib/semi-schema-form/components/widgets/radio.js.map +1 -0
- package/dist/lib/semi-schema-form/components/widgets/range.d.ts +7 -0
- package/dist/lib/semi-schema-form/components/widgets/range.js +26 -0
- package/dist/lib/semi-schema-form/components/widgets/range.js.map +1 -0
- package/dist/lib/semi-schema-form/components/widgets/select.d.ts +7 -0
- package/dist/lib/semi-schema-form/components/widgets/select.js +44 -0
- package/dist/lib/semi-schema-form/components/widgets/select.js.map +1 -0
- package/dist/lib/semi-schema-form/components/widgets/textarea.d.ts +6 -0
- package/dist/lib/semi-schema-form/components/widgets/textarea.js +18 -0
- package/dist/lib/semi-schema-form/components/widgets/textarea.js.map +1 -0
- package/dist/lib/semi-schema-form/index.d.ts +4 -0
- package/dist/lib/semi-schema-form/index.js +9 -0
- package/dist/lib/semi-schema-form/index.js.map +1 -0
- package/dist/lib/sentinel-form/enum.d.ts +8 -0
- package/dist/lib/sentinel-form/enum.js +15 -0
- package/dist/lib/sentinel-form/enum.js.map +1 -0
- package/dist/lib/sentinel-form/index.d.ts +20 -0
- package/dist/lib/sentinel-form/index.js +289 -0
- package/dist/lib/sentinel-form/index.js.map +1 -0
- package/dist/lib/step-nav/index.d.ts +12 -0
- package/dist/lib/step-nav/index.js +13 -0
- package/dist/lib/step-nav/index.js.map +1 -0
- package/dist/{types → lib}/table/index.d.ts +1 -1
- package/dist/lib/table/index.js +6 -88
- package/dist/lib/table/index.js.map +1 -0
- package/dist/lib/table/sort-icon.d.ts +8 -0
- package/dist/lib/table/sort-icon.js +25 -132
- package/dist/lib/table/sort-icon.js.map +1 -0
- package/dist/lib/table/table-with-pagination.d.ts +21 -0
- package/dist/lib/table/table-with-pagination.js +71 -143
- package/dist/lib/table/table-with-pagination.js.map +1 -0
- package/dist/lib/table/table-without-pagniation.d.ts +6 -0
- package/dist/lib/table/table-without-pagniation.js +36 -107
- package/dist/lib/table/table-without-pagniation.js.map +1 -0
- package/dist/lib/table-batch-operate/table-batch-operation.d.ts +9 -0
- package/dist/lib/table-batch-operate/table-batch-operation.js +14 -0
- package/dist/lib/table-batch-operate/table-batch-operation.js.map +1 -0
- package/dist/lib/table-batch-operate/use-batch-operate.d.ts +30 -0
- package/dist/lib/table-batch-operate/use-batch-operate.js +71 -0
- package/dist/lib/table-batch-operate/use-batch-operate.js.map +1 -0
- package/dist/lib/table-col-actions/index.d.ts +22 -0
- package/dist/lib/table-col-actions/index.js +34 -122
- package/dist/lib/table-col-actions/index.js.map +1 -0
- package/dist/lib/table-cols-config/index.d.ts +11 -0
- package/dist/lib/table-cols-config/index.js +57 -0
- package/dist/lib/table-cols-config/index.js.map +1 -0
- package/dist/lib/table-cols-config/type.d.ts +6 -0
- package/dist/lib/table-cols-config/type.js +2 -0
- package/dist/lib/table-cols-config/type.js.map +1 -0
- package/dist/lib/table-cols-config/use-hidden-col-keys.d.ts +5 -0
- package/dist/lib/table-cols-config/use-hidden-col-keys.js +32 -0
- package/dist/lib/table-cols-config/use-hidden-col-keys.js.map +1 -0
- package/dist/lib/table-cols-config/util.d.ts +3 -0
- package/dist/lib/table-cols-config/util.js +39 -0
- package/dist/lib/table-cols-config/util.js.map +1 -0
- package/dist/lib/table-empty/index.d.ts +2 -0
- package/dist/lib/table-empty/index.js +10 -0
- package/dist/lib/table-empty/index.js.map +1 -0
- package/dist/lib/table-header/index.d.ts +14 -0
- package/dist/lib/table-header/index.js +10 -95
- package/dist/lib/table-header/index.js.map +1 -0
- package/dist/{types → lib}/tabs/index.d.ts +1 -1
- package/dist/lib/tabs/index.js +9 -74
- package/dist/lib/tabs/index.js.map +1 -0
- package/dist/lib/text-area-pro/index.d.ts +6 -0
- package/dist/lib/text-area-pro/index.js +10 -0
- package/dist/lib/text-area-pro/index.js.map +1 -0
- package/dist/lib/text-with-copy/index.d.ts +14 -0
- package/dist/lib/text-with-copy/index.js +23 -104
- package/dist/lib/text-with-copy/index.js.map +1 -0
- package/dist/lib/title-with-sub/index.d.ts +7 -0
- package/dist/lib/title-with-sub/index.js +6 -0
- package/dist/lib/title-with-sub/index.js.map +1 -0
- package/dist/lib/tooltip-when-disabled/index.d.ts +6 -0
- package/dist/lib/tooltip-when-disabled/index.js +9 -0
- package/dist/lib/tooltip-when-disabled/index.js.map +1 -0
- package/dist/lib/tooltip-with-disabled/index.d.ts +5 -0
- package/dist/lib/tooltip-with-disabled/index.js +7 -69
- package/dist/lib/tooltip-with-disabled/index.js.map +1 -0
- package/dist/lib/tsconfig.build.tsbuildinfo +1 -0
- package/dist/lib/upload/index.d.ts +9 -0
- package/dist/lib/upload/index.js +25 -0
- package/dist/lib/upload/index.js.map +1 -0
- package/dist/lib/user-profile/index.d.ts +9 -0
- package/dist/lib/user-profile/index.js +21 -0
- package/dist/lib/user-profile/index.js.map +1 -0
- package/dist/lib/utils/basic.d.ts +2 -0
- package/dist/lib/utils/basic.js +27 -76
- package/dist/lib/utils/basic.js.map +1 -0
- package/dist/lib/version-list/version-descriptions.d.ts +15 -0
- package/dist/lib/version-list/version-descriptions.js +14 -0
- package/dist/lib/version-list/version-descriptions.js.map +1 -0
- package/dist/lib/version-list/version-item.d.ts +9 -0
- package/dist/lib/version-list/version-item.js +6 -0
- package/dist/lib/version-list/version-item.js.map +1 -0
- package/dist/lib/version-list/version-list.d.ts +11 -0
- package/dist/lib/version-list/version-list.js +11 -0
- package/dist/lib/version-list/version-list.js.map +1 -0
- package/dist/lib/version-list/version-switch-panel.d.ts +5 -0
- package/dist/lib/version-list/version-switch-panel.js +10 -0
- package/dist/lib/version-list/version-switch-panel.js.map +1 -0
- package/eslint.config.js +7 -0
- package/package.json +29 -25
- package/rslib.config.js +7 -0
- package/script/publish.js +146 -0
- package/src/base-search-select/base-search-form-select.tsx +10 -0
- package/src/base-search-select/base-search-select.tsx +200 -0
- package/src/base-search-select/index.module.less +16 -0
- package/src/base-search-select/index.tsx +3 -0
- package/src/base-search-select/types.ts +16 -0
- package/src/base-search-select/utils.ts +78 -0
- package/src/basic-card/index.tsx +23 -0
- package/src/card-pane/index.module.less +14 -0
- package/src/card-pane/index.tsx +25 -0
- package/src/chip-select/index.module.less +17 -0
- package/src/chip-select/index.tsx +7 -0
- package/src/code-editor/index.tsx +9 -0
- package/src/code-usage/code-item.module.less +32 -0
- package/src/code-usage/index.tsx +91 -0
- package/src/codemirror-editor/code-editor.tsx +139 -0
- package/src/codemirror-editor/index.ts +4 -0
- package/src/codemirror-editor/json-editor.tsx +183 -0
- package/src/codemirror-editor/raw-text-editor.tsx +68 -0
- package/src/codemirror-editor/text-editor.tsx +58 -0
- package/src/codemirror-editor/themes/coze-dark.ts +116 -0
- package/src/codemirror-editor/themes/coze-light.ts +122 -0
- package/src/collapse-card/index.module.less +27 -0
- package/src/collapse-card/index.tsx +93 -0
- package/src/collapsible-card/index.module.less +63 -0
- package/src/collapsible-card/index.tsx +57 -0
- package/src/column-manage-storage/index.tsx +64 -0
- package/src/columns-select/index.tsx +244 -0
- package/src/edit-icon-button/index.tsx +36 -0
- package/src/footer-actions/index.tsx +33 -0
- package/src/hooks/use-infinite-scroll.ts +183 -0
- package/src/hooks/use-mouse-down-offset.ts +50 -0
- package/src/hooks/use-unsave-leave-warning.ts +49 -0
- package/src/id-render/icon-button-container.tsx +37 -0
- package/src/id-render/index.tsx +64 -0
- package/src/index-controller/record-navigation.tsx +57 -0
- package/src/index-controller/use-item-index-controller.ts +197 -0
- package/src/index.ts +208 -0
- package/src/infinite-scroll-table/index.tsx +99 -0
- package/src/info-tooltip/index.tsx +41 -0
- package/src/input-components/radio-button.tsx +63 -0
- package/src/input-slider/index.module.less +30 -0
- package/src/input-slider/index.tsx +161 -0
- package/src/input-with-count/index.tsx +31 -0
- package/src/jump-button/jump-icon-button.tsx +12 -0
- package/src/large-txt-render/index.tsx +46 -0
- package/src/layout/content.tsx +28 -0
- package/src/layout/header.tsx +15 -0
- package/src/layout/index.module.less +28 -0
- package/src/layout/index.tsx +9 -0
- package/src/layout/tabs.tsx +11 -0
- package/src/lazy-load-component/index.tsx +55 -0
- package/src/logic-editor/index.ts +3 -0
- package/src/logic-editor/logic-editor.module.less +13 -0
- package/src/logic-editor/logic-editor.tsx +200 -0
- package/src/logic-editor/logic-left-render.tsx +100 -0
- package/src/logic-editor/logic-operator-render.tsx +54 -0
- package/src/logic-editor/logic-right-render.tsx +51 -0
- package/src/logic-editor/logic-types.tsx +238 -0
- package/src/logic-editor/utils.ts +22 -0
- package/src/logic-expr/assets/select.svg +1 -0
- package/src/logic-expr/consts.ts +6 -0
- package/src/logic-expr/expr-group-render.tsx +238 -0
- package/src/logic-expr/expr-render.tsx +226 -0
- package/src/logic-expr/index.module.less +252 -0
- package/src/logic-expr/index.ts +13 -0
- package/src/logic-expr/logic-expr.tsx +261 -0
- package/src/logic-expr/logic-not.tsx +46 -0
- package/src/logic-expr/logic-toggle.tsx +96 -0
- package/src/logic-expr/types.ts +95 -0
- package/src/loop-radio-group/index.tsx +16 -0
- package/src/multi-part-editor/components/image-item-renderer.tsx +134 -0
- package/src/multi-part-editor/components/index.module.less +21 -0
- package/src/multi-part-editor/components/multipart-item-renderer.tsx +74 -0
- package/src/multi-part-editor/components/url-input-modal.tsx +317 -0
- package/src/multi-part-editor/components/video-item-renderer.tsx +145 -0
- package/src/multi-part-editor/index.module.less +8 -0
- package/src/multi-part-editor/index.tsx +571 -0
- package/src/multi-part-editor/multi-part-render.tsx +87 -0
- package/src/multi-part-editor/type.tsx +103 -0
- package/src/multi-part-editor/upload-button.tsx +256 -0
- package/src/multi-part-editor/utils.ts +64 -0
- package/src/open-detail-button/index.tsx +30 -0
- package/src/page-content/index.tsx +99 -0
- package/src/primary-page/index.tsx +1 -0
- package/src/primary-page/primary-header.tsx +64 -0
- package/src/primary-title/index.module.less +14 -0
- package/src/primary-title/index.tsx +18 -0
- package/src/provider/index.tsx +89 -0
- package/src/resizable-side-sheet/index.tsx +69 -0
- package/src/resize-sidesheet/index.module.less +14 -0
- package/src/resize-sidesheet/index.tsx +68 -0
- package/src/resize-sidesheet/use-drag.ts +43 -0
- package/src/schema-editor/index.tsx +52 -0
- package/src/search-form/index.tsx +134 -0
- package/src/semi-schema-form/components/tmpls/array-field-item.tsx +97 -0
- package/src/semi-schema-form/components/tmpls/array-field.tsx +127 -0
- package/src/semi-schema-form/components/tmpls/base-input.tsx +126 -0
- package/src/semi-schema-form/components/tmpls/description-field.tsx +23 -0
- package/src/semi-schema-form/components/tmpls/error-list.tsx +44 -0
- package/src/semi-schema-form/components/tmpls/field-error.tsx +33 -0
- package/src/semi-schema-form/components/tmpls/field.tsx +54 -0
- package/src/semi-schema-form/components/tmpls/icon-button.tsx +112 -0
- package/src/semi-schema-form/components/tmpls/index.ts +39 -0
- package/src/semi-schema-form/components/tmpls/object-field.tsx +173 -0
- package/src/semi-schema-form/components/tmpls/submit.tsx +31 -0
- package/src/semi-schema-form/components/tmpls/title-field.tsx +30 -0
- package/src/semi-schema-form/components/widgets/checkbox.tsx +67 -0
- package/src/semi-schema-form/components/widgets/checkboxs.tsx +100 -0
- package/src/semi-schema-form/components/widgets/index.ts +17 -0
- package/src/semi-schema-form/components/widgets/radio.tsx +105 -0
- package/src/semi-schema-form/components/widgets/range.tsx +73 -0
- package/src/semi-schema-form/components/widgets/select.tsx +108 -0
- package/src/semi-schema-form/components/widgets/textarea.tsx +63 -0
- package/src/semi-schema-form/index.tsx +14 -0
- package/src/sentinel-form/enum.ts +16 -0
- package/src/sentinel-form/index.tsx +382 -0
- package/src/step-nav/index.module.less +45 -0
- package/src/step-nav/index.tsx +53 -0
- package/src/table/index.module.less +144 -0
- package/src/table/index.tsx +18 -0
- package/src/table/sort-icon.tsx +73 -0
- package/src/table/table-with-pagination.tsx +150 -0
- package/src/table/table-without-pagniation.tsx +66 -0
- package/src/table-batch-operate/table-batch-operation.tsx +47 -0
- package/src/table-batch-operate/use-batch-operate.ts +111 -0
- package/src/table-col-actions/index.module.less +8 -0
- package/src/table-col-actions/index.tsx +149 -0
- package/src/table-cols-config/index.module.less +34 -0
- package/src/table-cols-config/index.tsx +171 -0
- package/src/table-cols-config/type.ts +12 -0
- package/src/table-cols-config/use-hidden-col-keys.ts +53 -0
- package/src/table-cols-config/util.ts +56 -0
- package/src/table-empty/index.tsx +23 -0
- package/src/table-header/index.module.less +7 -0
- package/src/table-header/index.tsx +70 -0
- package/src/tabs/index.module.less +48 -0
- package/src/tabs/index.tsx +9 -0
- package/src/text-area-pro/index.module.less +5 -0
- package/src/text-area-pro/index.tsx +49 -0
- package/src/text-with-copy/index.tsx +95 -0
- package/src/title-with-sub/index.tsx +27 -0
- package/src/tooltip-when-disabled/index.tsx +23 -0
- package/src/tooltip-with-disabled/index.tsx +17 -0
- package/src/types.d.ts +24 -0
- package/src/upload/index.ts +39 -0
- package/src/user-profile/index.tsx +49 -0
- package/src/utils/basic.ts +29 -0
- package/src/version-list/index.module.less +16 -0
- package/src/version-list/version-descriptions.tsx +80 -0
- package/src/version-list/version-item.tsx +30 -0
- package/src/version-list/version-list.tsx +59 -0
- package/src/version-list/version-switch-panel.tsx +31 -0
- package/tailwind.config.ts +6 -0
- package/tsconfig.build.json +44 -0
- package/tsconfig.json +17 -0
- package/tsconfig.misc.json +28 -0
- package/vitest.config.mts +7 -0
- package/dist/es/collapsible-card/index.js +0 -45
- package/dist/es/collapsible-card/index.module.js +0 -5
- package/dist/es/collapsible-card/index_module.css +0 -48
- package/dist/es/column-manage-storage/index.js +0 -73
- package/dist/es/columns-select/index.js +0 -219
- package/dist/es/hooks/use-infinite-scroll.js +0 -178
- package/dist/es/hooks/use-mouse-down-offset.js +0 -41
- package/dist/es/id-render/icon-button-container.js +0 -61
- package/dist/es/id-render/index.js +0 -78
- package/dist/es/infinite-scroll-table/index.js +0 -98
- package/dist/es/input-slider/index.js +0 -123
- package/dist/es/input-slider/index.module.js +0 -5
- package/dist/es/input-slider/index_module.css +0 -21
- package/dist/es/large-txt-render/index.js +0 -38
- package/dist/es/page-content/index.js +0 -108
- package/dist/es/primary-page/index.js +0 -4
- package/dist/es/primary-page/primary-header.js +0 -38
- package/dist/es/resize-sidesheet/index.js +0 -100
- package/dist/es/resize-sidesheet/index.module.js +0 -5
- package/dist/es/resize-sidesheet/index_module.css +0 -9
- package/dist/es/resize-sidesheet/use-drag.js +0 -31
- package/dist/es/table/index.js +0 -56
- package/dist/es/table/index.module.js +0 -5
- package/dist/es/table/index_module.css +0 -90
- package/dist/es/table/sort-icon.js +0 -105
- package/dist/es/table/table-with-pagination.js +0 -112
- package/dist/es/table/table-without-pagniation.js +0 -74
- package/dist/es/table-col-actions/index.js +0 -103
- package/dist/es/table-header/index.js +0 -68
- package/dist/es/table-header/index.module.js +0 -5
- package/dist/es/table-header/index_module.css +0 -3
- package/dist/es/tabs/index.js +0 -42
- package/dist/es/tabs/index.module.js +0 -5
- package/dist/es/tabs/index_module.css +0 -37
- package/dist/es/text-with-copy/index.js +0 -71
- package/dist/es/tooltip-with-disabled/index.js +0 -49
- package/dist/es/utils/basic.js +0 -44
- package/dist/es/utils/rect.js +0 -37
- package/dist/lib/collapsible-card/index.module.js +0 -25
- package/dist/lib/collapsible-card/index_module.css +0 -48
- package/dist/lib/input-slider/index.module.js +0 -25
- package/dist/lib/input-slider/index_module.css +0 -21
- package/dist/lib/resize-sidesheet/index.module.js +0 -25
- package/dist/lib/resize-sidesheet/index_module.css +0 -9
- package/dist/lib/table/index.module.js +0 -25
- package/dist/lib/table/index_module.css +0 -90
- package/dist/lib/table-header/index.module.js +0 -25
- package/dist/lib/table-header/index_module.css +0 -3
- package/dist/lib/tabs/index.module.js +0 -25
- package/dist/lib/tabs/index_module.css +0 -37
- package/dist/lib/utils/rect.js +0 -65
- package/dist/types/collapsible-card/index.d.ts +0 -22
- package/dist/types/columns-select/index.d.ts +0 -29
- package/dist/types/hooks/use-mouse-down-offset.d.ts +0 -9
- package/dist/types/id-render/icon-button-container.d.ts +0 -12
- package/dist/types/id-render/index.d.ts +0 -13
- package/dist/types/index.d.ts +0 -19
- package/dist/types/input-slider/index.d.ts +0 -14
- package/dist/types/page-content/index.d.ts +0 -36
- package/dist/types/primary-page/index.d.ts +0 -1
- package/dist/types/primary-page/primary-header.d.ts +0 -17
- package/dist/types/resize-sidesheet/use-drag.d.ts +0 -10
- package/dist/types/table/sort-icon.d.ts +0 -13
- package/dist/types/table/table-with-pagination.d.ts +0 -14
- package/dist/types/table/table-without-pagniation.d.ts +0 -8
- package/dist/types/table-col-actions/index.d.ts +0 -21
- package/dist/types/table-header/index.d.ts +0 -20
- package/dist/types/text-with-copy/index.d.ts +0 -24
- package/dist/types/tooltip-with-disabled/index.d.ts +0 -9
- package/dist/types/utils/basic.d.ts +0 -1
- package/dist/types/utils/rect.d.ts +0 -10
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/* eslint-disable complexity */
|
|
2
|
+
import React, { type FocusEvent } from 'react';
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
ariaDescribedByIds,
|
|
6
|
+
type BaseInputTemplateProps,
|
|
7
|
+
examplesId,
|
|
8
|
+
getInputProps,
|
|
9
|
+
type FormContextType,
|
|
10
|
+
type GenericObjectType,
|
|
11
|
+
type RJSFSchema,
|
|
12
|
+
type StrictRJSFSchema,
|
|
13
|
+
} from '@rjsf/utils';
|
|
14
|
+
import {
|
|
15
|
+
Input,
|
|
16
|
+
CozInputNumber,
|
|
17
|
+
type InputNumberProps,
|
|
18
|
+
type InputProps,
|
|
19
|
+
} from '@coze-arch/coze-design';
|
|
20
|
+
|
|
21
|
+
const INPUT_STYLE = {
|
|
22
|
+
width: '100%',
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** The `BaseInputTemplate` is the template to use to render the basic `<input>` component for the `core` theme.
|
|
26
|
+
* It is used as the template for rendering many of the <input> based widgets that differ by `type` and callbacks only.
|
|
27
|
+
* It can be customized/overridden for other themes or individual implementations as needed.
|
|
28
|
+
*
|
|
29
|
+
* @param props - The `WidgetProps` for this template
|
|
30
|
+
*/
|
|
31
|
+
export default function BaseInputTemplate<
|
|
32
|
+
T = unknown,
|
|
33
|
+
S extends StrictRJSFSchema = RJSFSchema,
|
|
34
|
+
F extends FormContextType = object,
|
|
35
|
+
>(props: BaseInputTemplateProps<T, S, F>) {
|
|
36
|
+
const {
|
|
37
|
+
disabled,
|
|
38
|
+
formContext,
|
|
39
|
+
id,
|
|
40
|
+
onBlur,
|
|
41
|
+
onChange,
|
|
42
|
+
onChangeOverride,
|
|
43
|
+
onFocus,
|
|
44
|
+
options,
|
|
45
|
+
placeholder,
|
|
46
|
+
readonly,
|
|
47
|
+
schema,
|
|
48
|
+
value,
|
|
49
|
+
type,
|
|
50
|
+
} = props;
|
|
51
|
+
const {
|
|
52
|
+
step,
|
|
53
|
+
type: fieldType,
|
|
54
|
+
...inputProps
|
|
55
|
+
} = getInputProps<T, S, F>(schema, type, options, false);
|
|
56
|
+
|
|
57
|
+
const { readonlyAsDisabled = true } = formContext as GenericObjectType;
|
|
58
|
+
|
|
59
|
+
const handleNumberChange: InputNumberProps['onChange'] = nextValue =>
|
|
60
|
+
onChange(nextValue);
|
|
61
|
+
|
|
62
|
+
const handleTextChange: InputProps['onChange'] = (nextValue, e) => {
|
|
63
|
+
onChangeOverride
|
|
64
|
+
? onChangeOverride(e)
|
|
65
|
+
: onChange(nextValue === '' ? options.emptyValue : nextValue);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
const handleBlur = ({ target }: FocusEvent<HTMLInputElement>) =>
|
|
69
|
+
onBlur(id, target && target.value);
|
|
70
|
+
|
|
71
|
+
const handleFocus = ({ target }: FocusEvent<HTMLInputElement>) =>
|
|
72
|
+
onFocus(id, target && target.value);
|
|
73
|
+
|
|
74
|
+
const input =
|
|
75
|
+
fieldType === 'number' || fieldType === 'integer' ? (
|
|
76
|
+
<CozInputNumber
|
|
77
|
+
disabled={disabled || (readonlyAsDisabled && readonly)}
|
|
78
|
+
id={id}
|
|
79
|
+
name={id}
|
|
80
|
+
onBlur={!readonly ? handleBlur : undefined}
|
|
81
|
+
onChange={!readonly ? handleNumberChange : undefined}
|
|
82
|
+
onFocus={!readonly ? handleFocus : undefined}
|
|
83
|
+
placeholder={placeholder}
|
|
84
|
+
style={INPUT_STYLE}
|
|
85
|
+
list={schema.examples ? examplesId<T>(id) : undefined}
|
|
86
|
+
{...inputProps}
|
|
87
|
+
step={step as number | undefined}
|
|
88
|
+
value={value}
|
|
89
|
+
aria-describedby={ariaDescribedByIds<T>(id, !!schema.examples)}
|
|
90
|
+
/>
|
|
91
|
+
) : (
|
|
92
|
+
<Input
|
|
93
|
+
disabled={disabled || (readonlyAsDisabled && readonly)}
|
|
94
|
+
id={id}
|
|
95
|
+
name={id}
|
|
96
|
+
onBlur={!readonly ? handleBlur : undefined}
|
|
97
|
+
onChange={!readonly ? handleTextChange : undefined}
|
|
98
|
+
onFocus={!readonly ? handleFocus : undefined}
|
|
99
|
+
placeholder={placeholder}
|
|
100
|
+
style={INPUT_STYLE}
|
|
101
|
+
list={schema.examples ? examplesId<T>(id) : undefined}
|
|
102
|
+
{...inputProps}
|
|
103
|
+
value={value}
|
|
104
|
+
aria-describedby={ariaDescribedByIds<T>(id, !!schema.examples)}
|
|
105
|
+
/>
|
|
106
|
+
);
|
|
107
|
+
|
|
108
|
+
return (
|
|
109
|
+
<>
|
|
110
|
+
{input}
|
|
111
|
+
{Array.isArray(schema.examples) && (
|
|
112
|
+
<datalist id={examplesId<T>(id)}>
|
|
113
|
+
{(schema.examples as string[])
|
|
114
|
+
.concat(
|
|
115
|
+
schema.default && !schema.examples.includes(schema.default)
|
|
116
|
+
? ([schema.default] as string[])
|
|
117
|
+
: [],
|
|
118
|
+
)
|
|
119
|
+
.map(example => (
|
|
120
|
+
<option key={example} value={example} />
|
|
121
|
+
))}
|
|
122
|
+
</datalist>
|
|
123
|
+
)}
|
|
124
|
+
</>
|
|
125
|
+
);
|
|
126
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type DescriptionFieldProps,
|
|
3
|
+
type FormContextType,
|
|
4
|
+
type RJSFSchema,
|
|
5
|
+
type StrictRJSFSchema,
|
|
6
|
+
} from '@rjsf/utils';
|
|
7
|
+
|
|
8
|
+
/** The `DescriptionField` is the template to use to render the description of a field
|
|
9
|
+
*
|
|
10
|
+
* @param props - The `DescriptionFieldProps` for this component
|
|
11
|
+
*/
|
|
12
|
+
export default function DescriptionField<
|
|
13
|
+
T = unknown,
|
|
14
|
+
S extends StrictRJSFSchema = RJSFSchema,
|
|
15
|
+
F extends FormContextType = object,
|
|
16
|
+
>(props: DescriptionFieldProps<T, S, F>) {
|
|
17
|
+
const { id, description } = props;
|
|
18
|
+
|
|
19
|
+
if (!description) {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
return <span id={id}>{description}</span>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
type ErrorListProps,
|
|
5
|
+
type FormContextType,
|
|
6
|
+
type RJSFSchema,
|
|
7
|
+
type StrictRJSFSchema,
|
|
8
|
+
TranslatableString,
|
|
9
|
+
} from '@rjsf/utils';
|
|
10
|
+
import { IconCozWarningCircle } from '@coze-arch/coze-design/icons';
|
|
11
|
+
import { Banner, List, Space } from '@coze-arch/coze-design';
|
|
12
|
+
|
|
13
|
+
/** The `ErrorList` component is the template that renders the all the errors associated with the fields in the `Form`
|
|
14
|
+
*
|
|
15
|
+
* @param props - The `ErrorListProps` for this component
|
|
16
|
+
*/
|
|
17
|
+
export default function ErrorList<
|
|
18
|
+
T = unknown,
|
|
19
|
+
S extends StrictRJSFSchema = RJSFSchema,
|
|
20
|
+
F extends FormContextType = object,
|
|
21
|
+
>({ errors, registry }: ErrorListProps<T, S, F>) {
|
|
22
|
+
const { translateString } = registry;
|
|
23
|
+
const renderErrors = () => (
|
|
24
|
+
<List className="list-group" size="small">
|
|
25
|
+
{errors.map((error, index) => (
|
|
26
|
+
<List.Item key={index}>
|
|
27
|
+
<Space>
|
|
28
|
+
<IconCozWarningCircle />
|
|
29
|
+
{error.stack}
|
|
30
|
+
</Space>
|
|
31
|
+
</List.Item>
|
|
32
|
+
))}
|
|
33
|
+
</List>
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<Banner
|
|
38
|
+
type="danger"
|
|
39
|
+
className="panel panel-danger errors"
|
|
40
|
+
title={translateString(TranslatableString.ErrorsLabel)}
|
|
41
|
+
description={renderErrors()}
|
|
42
|
+
/>
|
|
43
|
+
);
|
|
44
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
type FieldErrorProps,
|
|
4
|
+
type FormContextType,
|
|
5
|
+
type RJSFSchema,
|
|
6
|
+
type StrictRJSFSchema,
|
|
7
|
+
errorId,
|
|
8
|
+
} from '@rjsf/utils';
|
|
9
|
+
import { Form } from '@coze-arch/coze-design';
|
|
10
|
+
|
|
11
|
+
/** The `FieldErrorTemplate` component renders the errors local to the particular field
|
|
12
|
+
*
|
|
13
|
+
* @param props - The `FieldErrorProps` for the errors being rendered
|
|
14
|
+
*/
|
|
15
|
+
export default function FieldErrorTemplate<
|
|
16
|
+
T = unknown,
|
|
17
|
+
S extends StrictRJSFSchema = RJSFSchema,
|
|
18
|
+
F extends FormContextType = object,
|
|
19
|
+
>(props: FieldErrorProps<T, S, F>) {
|
|
20
|
+
const { errors = [], idSchema } = props;
|
|
21
|
+
if (errors.length === 0) {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
const id = errorId<T>(idSchema);
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<div id={id}>
|
|
28
|
+
{errors.map(error => (
|
|
29
|
+
<Form.ErrorMessage key={`field-${id}-error-${error}`} error={error} />
|
|
30
|
+
))}
|
|
31
|
+
</div>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
type FieldTemplateProps,
|
|
4
|
+
type FormContextType,
|
|
5
|
+
type RJSFSchema,
|
|
6
|
+
type StrictRJSFSchema,
|
|
7
|
+
} from '@rjsf/utils';
|
|
8
|
+
import { Form, Typography } from '@coze-arch/coze-design';
|
|
9
|
+
|
|
10
|
+
/** The `FieldTemplate` component is the template used by `SchemaField` to render any field. It renders the field
|
|
11
|
+
* content, (label, description, children, errors and help) inside of a `WrapIfAdditional` component.
|
|
12
|
+
*
|
|
13
|
+
* @param props - The `FieldTemplateProps` for this component
|
|
14
|
+
*/
|
|
15
|
+
export default function FieldTemplate<
|
|
16
|
+
T = unknown,
|
|
17
|
+
S extends StrictRJSFSchema = RJSFSchema,
|
|
18
|
+
F extends FormContextType = object,
|
|
19
|
+
>(props: FieldTemplateProps<T, S, F>) {
|
|
20
|
+
const {
|
|
21
|
+
children,
|
|
22
|
+
description,
|
|
23
|
+
rawErrors,
|
|
24
|
+
hidden,
|
|
25
|
+
label,
|
|
26
|
+
rawDescription,
|
|
27
|
+
required,
|
|
28
|
+
} = props;
|
|
29
|
+
|
|
30
|
+
if (hidden) {
|
|
31
|
+
return <div className="field-hidden">{children}</div>;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// check to see if there is rawDescription(string) before using description(ReactNode)
|
|
35
|
+
// to prevent showing a blank description area
|
|
36
|
+
const descriptionNode = rawDescription ? description : undefined;
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<Form.Slot
|
|
40
|
+
label={{ text: label, required }}
|
|
41
|
+
className="mb-4"
|
|
42
|
+
error={{
|
|
43
|
+
error: rawErrors,
|
|
44
|
+
validateStatus: rawErrors?.length ? 'error' : undefined,
|
|
45
|
+
}}
|
|
46
|
+
>
|
|
47
|
+
{children}
|
|
48
|
+
|
|
49
|
+
<Typography.Paragraph className="text-xs w-full text-gray-500">
|
|
50
|
+
{descriptionNode}
|
|
51
|
+
</Typography.Paragraph>
|
|
52
|
+
</Form.Slot>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
type FormContextType,
|
|
5
|
+
type IconButtonProps,
|
|
6
|
+
type RJSFSchema,
|
|
7
|
+
type StrictRJSFSchema,
|
|
8
|
+
TranslatableString,
|
|
9
|
+
} from '@rjsf/utils';
|
|
10
|
+
import {
|
|
11
|
+
IconCozCopy,
|
|
12
|
+
IconCozLongArrowUp,
|
|
13
|
+
IconCozPlusCircle,
|
|
14
|
+
IconCozTrashCan,
|
|
15
|
+
} from '@coze-arch/coze-design/icons';
|
|
16
|
+
import {
|
|
17
|
+
IconButton,
|
|
18
|
+
type IconButtonProps as SemiIconBaseButtonProps,
|
|
19
|
+
} from '@coze-arch/coze-design';
|
|
20
|
+
|
|
21
|
+
// The `type` and `color` for IconButtonProps collides with props of `ButtonProps` so omit it to avoid Typescript issue
|
|
22
|
+
export type BaseIconButtonProps<
|
|
23
|
+
T = unknown,
|
|
24
|
+
S extends StrictRJSFSchema = RJSFSchema,
|
|
25
|
+
F extends FormContextType = object,
|
|
26
|
+
> = Omit<IconButtonProps<T, S, F>, 'type' | 'color'>;
|
|
27
|
+
type IconButtonComponent = <
|
|
28
|
+
T = unknown,
|
|
29
|
+
S extends StrictRJSFSchema = RJSFSchema,
|
|
30
|
+
F extends FormContextType = object,
|
|
31
|
+
>(
|
|
32
|
+
props: BaseIconButtonProps<T, S, F>,
|
|
33
|
+
) => JSX.Element;
|
|
34
|
+
|
|
35
|
+
export default function BaseIconButton<
|
|
36
|
+
T = unknown,
|
|
37
|
+
S extends StrictRJSFSchema = RJSFSchema,
|
|
38
|
+
F extends FormContextType = object,
|
|
39
|
+
>(props: BaseIconButtonProps<T, S, F> & SemiIconBaseButtonProps) {
|
|
40
|
+
const { iconType, icon, onClick, uiSchema, registry, style, ...otherProps } =
|
|
41
|
+
props;
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<IconButton onClick={onClick} icon={icon} {...otherProps} size="small" />
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export const AddButton: IconButtonComponent = props => {
|
|
49
|
+
const {
|
|
50
|
+
registry: { translateString },
|
|
51
|
+
} = props;
|
|
52
|
+
return (
|
|
53
|
+
<BaseIconButton
|
|
54
|
+
title={translateString(TranslatableString.AddItemButton)}
|
|
55
|
+
{...props}
|
|
56
|
+
icon={<IconCozPlusCircle />}
|
|
57
|
+
/>
|
|
58
|
+
);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export const CopyButton: IconButtonComponent = props => {
|
|
62
|
+
const {
|
|
63
|
+
registry: { translateString },
|
|
64
|
+
} = props;
|
|
65
|
+
return (
|
|
66
|
+
<BaseIconButton
|
|
67
|
+
title={translateString(TranslatableString.CopyButton)}
|
|
68
|
+
{...props}
|
|
69
|
+
icon={<IconCozCopy />}
|
|
70
|
+
/>
|
|
71
|
+
);
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export const MoveDownButton: IconButtonComponent = props => {
|
|
75
|
+
const {
|
|
76
|
+
registry: { translateString },
|
|
77
|
+
} = props;
|
|
78
|
+
return (
|
|
79
|
+
<BaseIconButton
|
|
80
|
+
title={translateString(TranslatableString.MoveDownButton)}
|
|
81
|
+
{...props}
|
|
82
|
+
icon={<IconCozLongArrowUp className="rotate-180" />}
|
|
83
|
+
/>
|
|
84
|
+
);
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export const MoveUpButton: IconButtonComponent = props => {
|
|
88
|
+
const {
|
|
89
|
+
registry: { translateString },
|
|
90
|
+
} = props;
|
|
91
|
+
return (
|
|
92
|
+
<BaseIconButton
|
|
93
|
+
title={translateString(TranslatableString.MoveUpButton)}
|
|
94
|
+
{...props}
|
|
95
|
+
icon={<IconCozLongArrowUp />}
|
|
96
|
+
/>
|
|
97
|
+
);
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
export const RemoveButton: IconButtonComponent = props => {
|
|
101
|
+
const {
|
|
102
|
+
registry: { translateString },
|
|
103
|
+
} = props;
|
|
104
|
+
return (
|
|
105
|
+
<BaseIconButton
|
|
106
|
+
title={translateString(TranslatableString.RemoveButton)}
|
|
107
|
+
{...props}
|
|
108
|
+
type="danger"
|
|
109
|
+
icon={<IconCozTrashCan />}
|
|
110
|
+
/>
|
|
111
|
+
);
|
|
112
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type TemplatesType } from '@rjsf/utils';
|
|
2
|
+
|
|
3
|
+
import TitleFieldTemplate from './title-field';
|
|
4
|
+
import SubmitButton from './submit';
|
|
5
|
+
import ObjectFieldTemplate from './object-field';
|
|
6
|
+
import {
|
|
7
|
+
AddButton,
|
|
8
|
+
CopyButton,
|
|
9
|
+
MoveDownButton,
|
|
10
|
+
MoveUpButton,
|
|
11
|
+
RemoveButton,
|
|
12
|
+
} from './icon-button';
|
|
13
|
+
import FieldErrorTemplate from './field-error';
|
|
14
|
+
import FieldTemplate from './field';
|
|
15
|
+
import ErrorListTemplate from './error-list';
|
|
16
|
+
import DescriptionFieldTemplate from './description-field';
|
|
17
|
+
import BaseInputTemplate from './base-input';
|
|
18
|
+
import ArrayFieldItemTemplate from './array-field-item';
|
|
19
|
+
import ArrayFieldTemplate from './array-field';
|
|
20
|
+
|
|
21
|
+
export const templates: Partial<TemplatesType> = {
|
|
22
|
+
ArrayFieldTemplate,
|
|
23
|
+
ArrayFieldItemTemplate,
|
|
24
|
+
BaseInputTemplate,
|
|
25
|
+
FieldTemplate,
|
|
26
|
+
ObjectFieldTemplate,
|
|
27
|
+
ButtonTemplates: {
|
|
28
|
+
AddButton,
|
|
29
|
+
CopyButton,
|
|
30
|
+
MoveDownButton,
|
|
31
|
+
MoveUpButton,
|
|
32
|
+
RemoveButton,
|
|
33
|
+
SubmitButton,
|
|
34
|
+
},
|
|
35
|
+
TitleFieldTemplate,
|
|
36
|
+
DescriptionFieldTemplate,
|
|
37
|
+
FieldErrorTemplate,
|
|
38
|
+
ErrorListTemplate,
|
|
39
|
+
};
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { isString, isObject, isNumber } from 'lodash-es';
|
|
4
|
+
import {
|
|
5
|
+
type FormContextType,
|
|
6
|
+
type GenericObjectType,
|
|
7
|
+
type ObjectFieldTemplateProps,
|
|
8
|
+
type ObjectFieldTemplatePropertyType,
|
|
9
|
+
type RJSFSchema,
|
|
10
|
+
type StrictRJSFSchema,
|
|
11
|
+
type UiSchema,
|
|
12
|
+
canExpand,
|
|
13
|
+
// descriptionId,
|
|
14
|
+
// getTemplate,
|
|
15
|
+
getUiOptions,
|
|
16
|
+
// titleId,
|
|
17
|
+
} from '@rjsf/utils';
|
|
18
|
+
import { Col, Row, TextArea } from '@coze-arch/coze-design';
|
|
19
|
+
|
|
20
|
+
// const DESCRIPTION_COL_STYLE = {
|
|
21
|
+
// paddingBottom: '8px',
|
|
22
|
+
// };
|
|
23
|
+
|
|
24
|
+
/** The `ObjectFieldTemplate` is the template to use to render all the inner properties of an object along with the
|
|
25
|
+
* title and description if available. If the object is expandable, then an `AddButton` is also rendered after all
|
|
26
|
+
* the properties.
|
|
27
|
+
*
|
|
28
|
+
* @param props - The `ObjectFieldTemplateProps` for this component
|
|
29
|
+
*/
|
|
30
|
+
export default function ObjectFieldTemplate<
|
|
31
|
+
T = unknown,
|
|
32
|
+
S extends StrictRJSFSchema = RJSFSchema,
|
|
33
|
+
F extends FormContextType = object,
|
|
34
|
+
>(props: ObjectFieldTemplateProps<T, S, F>) {
|
|
35
|
+
const {
|
|
36
|
+
// description,
|
|
37
|
+
disabled,
|
|
38
|
+
formContext,
|
|
39
|
+
formData,
|
|
40
|
+
idSchema,
|
|
41
|
+
onAddClick,
|
|
42
|
+
properties,
|
|
43
|
+
readonly,
|
|
44
|
+
// required,
|
|
45
|
+
registry,
|
|
46
|
+
schema,
|
|
47
|
+
// title,
|
|
48
|
+
uiSchema,
|
|
49
|
+
} = props;
|
|
50
|
+
// const uiOptions = getUiOptions<T, S, F>(uiSchema);
|
|
51
|
+
// const TitleFieldTemplate = getTemplate<'TitleFieldTemplate', T, S, F>(
|
|
52
|
+
// 'TitleFieldTemplate',
|
|
53
|
+
// registry,
|
|
54
|
+
// uiOptions,
|
|
55
|
+
// );
|
|
56
|
+
// const DescriptionFieldTemplate = getTemplate<
|
|
57
|
+
// 'DescriptionFieldTemplate',
|
|
58
|
+
// T,
|
|
59
|
+
// S,
|
|
60
|
+
// F
|
|
61
|
+
// >('DescriptionFieldTemplate', registry, uiOptions);
|
|
62
|
+
// Button templates are not overridden in the uiSchema
|
|
63
|
+
const {
|
|
64
|
+
ButtonTemplates: { AddButton },
|
|
65
|
+
} = registry.templates;
|
|
66
|
+
const { colSpan = 24, rowGutter = 24 } = formContext as GenericObjectType;
|
|
67
|
+
|
|
68
|
+
const findSchema = (element: ObjectFieldTemplatePropertyType): S =>
|
|
69
|
+
element.content.props.schema;
|
|
70
|
+
|
|
71
|
+
const findSchemaType = (element: ObjectFieldTemplatePropertyType) =>
|
|
72
|
+
findSchema(element).type;
|
|
73
|
+
|
|
74
|
+
const findUiSchema = (
|
|
75
|
+
element: ObjectFieldTemplatePropertyType,
|
|
76
|
+
): UiSchema<T, S, F> | undefined => element.content.props.uiSchema;
|
|
77
|
+
|
|
78
|
+
const findUiSchemaField = (element: ObjectFieldTemplatePropertyType) =>
|
|
79
|
+
getUiOptions(findUiSchema(element)).field;
|
|
80
|
+
|
|
81
|
+
const findUiSchemaWidget = (element: ObjectFieldTemplatePropertyType) =>
|
|
82
|
+
getUiOptions(findUiSchema(element)).widget;
|
|
83
|
+
|
|
84
|
+
const calculateColSpan = (element: ObjectFieldTemplatePropertyType) => {
|
|
85
|
+
const type = findSchemaType(element);
|
|
86
|
+
const field = findUiSchemaField(element);
|
|
87
|
+
const widget = findUiSchemaWidget(element);
|
|
88
|
+
|
|
89
|
+
const defaultColSpan =
|
|
90
|
+
properties.length < 2 || // Single or no field in object.
|
|
91
|
+
type === 'object' ||
|
|
92
|
+
type === 'array' ||
|
|
93
|
+
widget === 'textarea'
|
|
94
|
+
? 24
|
|
95
|
+
: 12;
|
|
96
|
+
|
|
97
|
+
if (isObject(colSpan)) {
|
|
98
|
+
const colSpanObj: GenericObjectType = colSpan;
|
|
99
|
+
if (isString(widget)) {
|
|
100
|
+
return colSpanObj[widget as string];
|
|
101
|
+
}
|
|
102
|
+
if (isString(field)) {
|
|
103
|
+
return colSpanObj[field as string];
|
|
104
|
+
}
|
|
105
|
+
if (isString(type)) {
|
|
106
|
+
return colSpanObj[type as string];
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
if (isNumber(colSpan)) {
|
|
110
|
+
return colSpan;
|
|
111
|
+
}
|
|
112
|
+
return defaultColSpan;
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
if (!props.properties.length) {
|
|
116
|
+
return <TextArea id={idSchema.$id} />;
|
|
117
|
+
}
|
|
118
|
+
return (
|
|
119
|
+
<fieldset
|
|
120
|
+
id={idSchema.$id}
|
|
121
|
+
className={'p-3 semi-card-bordered rounded-[4px]'}
|
|
122
|
+
>
|
|
123
|
+
<Row gutter={rowGutter}>
|
|
124
|
+
{/* {title ? (
|
|
125
|
+
<Col span={24}>
|
|
126
|
+
<TitleFieldTemplate
|
|
127
|
+
id={titleId<T>(idSchema)}
|
|
128
|
+
title={title}
|
|
129
|
+
required={required}
|
|
130
|
+
schema={schema}
|
|
131
|
+
uiSchema={uiSchema}
|
|
132
|
+
registry={registry}
|
|
133
|
+
/>
|
|
134
|
+
</Col>
|
|
135
|
+
) : null}
|
|
136
|
+
{description ? (
|
|
137
|
+
<Col span={24} style={DESCRIPTION_COL_STYLE}>
|
|
138
|
+
<DescriptionFieldTemplate
|
|
139
|
+
id={descriptionId<T>(idSchema)}
|
|
140
|
+
description={description}
|
|
141
|
+
schema={schema}
|
|
142
|
+
uiSchema={uiSchema}
|
|
143
|
+
registry={registry}
|
|
144
|
+
/>
|
|
145
|
+
</Col>
|
|
146
|
+
) : null} */}
|
|
147
|
+
{properties
|
|
148
|
+
.filter(e => !e.hidden)
|
|
149
|
+
.map((element: ObjectFieldTemplatePropertyType) => (
|
|
150
|
+
<Col key={element.name} span={calculateColSpan(element)}>
|
|
151
|
+
{element.content}
|
|
152
|
+
</Col>
|
|
153
|
+
))}
|
|
154
|
+
</Row>
|
|
155
|
+
|
|
156
|
+
{canExpand(schema, uiSchema, formData) && (
|
|
157
|
+
<Col span={24}>
|
|
158
|
+
<Row gutter={rowGutter} justify="end">
|
|
159
|
+
<Col span={6}>
|
|
160
|
+
<AddButton
|
|
161
|
+
className="object-property-expand"
|
|
162
|
+
disabled={disabled || readonly}
|
|
163
|
+
onClick={onAddClick(schema)}
|
|
164
|
+
uiSchema={uiSchema}
|
|
165
|
+
registry={registry}
|
|
166
|
+
/>
|
|
167
|
+
</Col>
|
|
168
|
+
</Row>
|
|
169
|
+
</Col>
|
|
170
|
+
)}
|
|
171
|
+
</fieldset>
|
|
172
|
+
);
|
|
173
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
getSubmitButtonOptions,
|
|
4
|
+
type FormContextType,
|
|
5
|
+
type RJSFSchema,
|
|
6
|
+
type StrictRJSFSchema,
|
|
7
|
+
type SubmitButtonProps,
|
|
8
|
+
} from '@rjsf/utils';
|
|
9
|
+
import { Button } from '@coze-arch/coze-design';
|
|
10
|
+
|
|
11
|
+
/** The `SubmitButton` renders a button that represent the `Submit` action on a form
|
|
12
|
+
*/
|
|
13
|
+
export default function SubmitButton<
|
|
14
|
+
T = unknown,
|
|
15
|
+
S extends StrictRJSFSchema = RJSFSchema,
|
|
16
|
+
F extends FormContextType = object,
|
|
17
|
+
>({ uiSchema }: SubmitButtonProps<T, S, F>) {
|
|
18
|
+
const {
|
|
19
|
+
submitText,
|
|
20
|
+
norender,
|
|
21
|
+
props: submitButtonProps,
|
|
22
|
+
} = getSubmitButtonOptions(uiSchema);
|
|
23
|
+
if (norender) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
return (
|
|
27
|
+
<Button type="primary" {...submitButtonProps} htmlType="submit">
|
|
28
|
+
{submitText}
|
|
29
|
+
</Button>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
type FormContextType,
|
|
4
|
+
type TitleFieldProps,
|
|
5
|
+
type RJSFSchema,
|
|
6
|
+
type StrictRJSFSchema,
|
|
7
|
+
getUiOptions,
|
|
8
|
+
} from '@rjsf/utils';
|
|
9
|
+
import { Typography } from '@coze-arch/coze-design';
|
|
10
|
+
|
|
11
|
+
/** The `TitleField` is the template to use to render the title of a field
|
|
12
|
+
*
|
|
13
|
+
* @param props - The `TitleFieldProps` for this component
|
|
14
|
+
*/
|
|
15
|
+
export default function TitleField<
|
|
16
|
+
T = unknown,
|
|
17
|
+
S extends StrictRJSFSchema = RJSFSchema,
|
|
18
|
+
F extends FormContextType = object,
|
|
19
|
+
>({ id, uiSchema, title }: TitleFieldProps<T, S, F>) {
|
|
20
|
+
const uiOptions = getUiOptions<T, S, F>(uiSchema);
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<div id={id} className="my-1">
|
|
24
|
+
<Typography.Title heading={5}>
|
|
25
|
+
{uiOptions.title || title}
|
|
26
|
+
</Typography.Title>
|
|
27
|
+
<hr className="border-0 bg-secondary" style={{ height: '1px' }} />
|
|
28
|
+
</div>
|
|
29
|
+
);
|
|
30
|
+
}
|