@cozeloop/components 0.0.1 → 0.0.3-beta-1769665914778
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/README.md +82 -1
- package/dist/es/index.css +645 -0
- package/dist/es/index.mjs +6089 -0
- package/dist/es/loopIcons.mjs +3 -0
- package/dist/es/rslib-runtime.mjs +40 -0
- package/dist/es/static/svg/select.svg +1 -0
- package/dist/lib/base-search-select/base-search-select.d.ts +12 -0
- package/dist/lib/base-search-select/index.d.ts +3 -0
- package/dist/{base-search-select → lib/base-search-select}/types.d.ts +6 -3
- package/dist/{base-search-select → lib/base-search-select}/utils.d.ts +1 -1
- package/dist/lib/basic-card/index.d.ts +7 -0
- package/dist/lib/card-pane/index.d.ts +5 -0
- package/dist/lib/chip-select/index.d.ts +2 -0
- package/dist/lib/code-editor-with-loading/index.d.ts +10 -0
- package/dist/lib/codemirror-editor/code-editor.d.ts +23 -0
- package/dist/lib/codemirror-editor/index.d.ts +6 -0
- package/dist/lib/codemirror-editor/json-editor.d.ts +19 -0
- package/dist/lib/codemirror-editor/raw-code-editor.d.ts +20 -0
- package/dist/lib/codemirror-editor/raw-text-editor.d.ts +11 -0
- package/dist/lib/codemirror-editor/text-editor.d.ts +23 -0
- package/dist/lib/codemirror-editor/themes/coze-dark.d.ts +1 -0
- package/dist/lib/codemirror-editor/themes/coze-light.d.ts +1 -0
- package/dist/{collapse-card → lib/collapse-card}/index.d.ts +3 -2
- package/dist/lib/collapse-item/index.d.ts +7 -0
- package/dist/{column-manage-storage → lib/column-manage-storage}/index.d.ts +1 -1
- package/dist/lib/copyable/index.d.ts +5 -0
- package/dist/{edit-icon-button → lib/edit-icon-button}/index.d.ts +2 -2
- package/dist/lib/footer-actions/index.d.ts +15 -0
- package/dist/lib/hooks/use-unsave-leave-warning.d.ts +15 -0
- package/dist/{id-render → lib/id-render}/icon-button-container.d.ts +3 -1
- package/dist/lib/index-controller/record-navigation.d.ts +6 -0
- package/dist/lib/index-controller/use-item-index-controller.d.ts +47 -0
- package/dist/lib/index.d.ts +71 -0
- package/dist/lib/info-tooltip/index.d.ts +9 -0
- package/dist/lib/input-components/radio-button.d.ts +14 -0
- package/dist/{input-slider → lib/input-slider}/index.d.ts +1 -0
- package/dist/lib/input-with-count/index.d.ts +2 -0
- package/dist/{jump-button → lib/jump-button}/jump-icon-button.d.ts +1 -1
- package/dist/lib/layout/content.d.ts +7 -0
- package/dist/lib/layout/header.d.ts +7 -0
- package/dist/lib/layout/index.d.ts +12 -0
- package/dist/lib/layout/tabs.d.ts +6 -0
- package/dist/lib/lazy-load-component/index.d.ts +5 -0
- package/dist/lib/logic-editor/index.d.ts +3 -0
- package/dist/lib/logic-editor/logic-editor.d.ts +15 -0
- package/dist/lib/logic-editor/logic-left-render.d.ts +3 -0
- package/dist/lib/logic-editor/logic-operator-render.d.ts +3 -0
- package/dist/lib/logic-editor/logic-right-render.d.ts +3 -0
- package/dist/lib/logic-editor/logic-types.d.ts +53 -0
- package/dist/lib/logic-editor/utils.d.ts +2 -0
- package/dist/lib/logic-expr/consts.d.ts +2 -0
- package/dist/lib/loop-icons/index.d.ts +1 -0
- package/dist/lib/loop-radio-group/index.d.ts +2 -0
- package/dist/lib/multi-part-editor/components/image-item-renderer.d.ts +14 -0
- package/dist/lib/multi-part-editor/components/multipart-item-renderer.d.ts +10 -0
- package/dist/lib/multi-part-editor/components/url-input-modal.d.ts +14 -0
- package/dist/lib/multi-part-editor/components/video-item-renderer.d.ts +14 -0
- package/dist/lib/multi-part-editor/index.d.ts +3 -0
- package/dist/lib/multi-part-editor/multi-part-render.d.ts +10 -0
- package/dist/lib/multi-part-editor/type.d.ts +81 -0
- package/dist/lib/multi-part-editor/upload-button.d.ts +23 -0
- package/dist/lib/multi-part-editor/utils.d.ts +16 -0
- package/dist/lib/primary-page/primary-header.d.ts +14 -0
- package/dist/lib/primary-title/index.d.ts +6 -0
- package/dist/lib/resizable-side-sheet/index.d.ts +10 -0
- package/dist/{resize-sidesheet → lib/resize-sidesheet}/index.d.ts +1 -0
- package/dist/{resize-sidesheet → lib/resize-sidesheet}/use-drag.d.ts +1 -0
- package/dist/lib/schema-editor/index.d.ts +11 -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.d.ts +6 -0
- package/dist/lib/semi-schema-form/components/tmpls/base-input.d.ts +8 -0
- package/dist/lib/semi-schema-form/components/tmpls/description-field.d.ts +6 -0
- package/dist/lib/semi-schema-form/components/tmpls/error-list.d.ts +6 -0
- package/dist/lib/semi-schema-form/components/tmpls/field-error.d.ts +6 -0
- package/dist/lib/semi-schema-form/components/tmpls/field.d.ts +7 -0
- package/dist/lib/semi-schema-form/components/tmpls/icon-button.d.ts +11 -0
- package/dist/lib/semi-schema-form/components/tmpls/index.d.ts +2 -0
- package/dist/lib/semi-schema-form/components/tmpls/object-field.d.ts +8 -0
- package/dist/lib/semi-schema-form/components/tmpls/submit.d.ts +4 -0
- package/dist/lib/semi-schema-form/components/tmpls/title-field.d.ts +6 -0
- package/dist/lib/semi-schema-form/components/widgets/checkbox.d.ts +7 -0
- package/dist/lib/semi-schema-form/components/widgets/checkboxs.d.ts +7 -0
- package/dist/lib/semi-schema-form/components/widgets/index.d.ts +2 -0
- package/dist/lib/semi-schema-form/components/widgets/radio.d.ts +7 -0
- package/dist/lib/semi-schema-form/components/widgets/range.d.ts +7 -0
- package/dist/lib/semi-schema-form/components/widgets/select.d.ts +7 -0
- package/dist/lib/semi-schema-form/components/widgets/textarea.d.ts +6 -0
- package/dist/lib/semi-schema-form/index.d.ts +4 -0
- package/dist/lib/sentinel-form/enum.d.ts +8 -0
- package/dist/lib/sentinel-form/index.d.ts +20 -0
- package/dist/lib/step-nav/index.d.ts +12 -0
- package/dist/{table → lib/table}/sort-icon.d.ts +3 -3
- package/dist/{table → lib/table}/table-with-pagination.d.ts +10 -3
- package/dist/lib/table/table-without-pagniation.d.ts +6 -0
- package/dist/lib/table-batch-operate/table-batch-operation.d.ts +9 -0
- package/dist/lib/table-batch-operate/use-batch-operate.d.ts +30 -0
- package/dist/lib/table-col-actions/index.d.ts +24 -0
- package/dist/lib/table-cols-config/index.d.ts +11 -0
- package/dist/lib/table-cols-config/type.d.ts +6 -0
- package/dist/lib/table-cols-config/use-hidden-col-keys.d.ts +5 -0
- package/dist/lib/table-cols-config/util.d.ts +3 -0
- package/dist/lib/table-empty/index.d.ts +2 -0
- package/dist/{table-header → lib/table-header}/index.d.ts +4 -2
- package/dist/lib/text-area-pro/index.d.ts +6 -0
- package/dist/lib/title-with-sub/index.d.ts +7 -0
- package/dist/{tooltip-with-disabled → lib/tooltip-when-disabled}/index.d.ts +2 -1
- package/dist/lib/tooltip-with-disabled/index.d.ts +5 -0
- package/dist/{user-profile → lib/user-profile}/index.d.ts +2 -1
- package/dist/{utils → lib/utils}/basic.d.ts +1 -0
- package/package.json +46 -32
- package/dist/base-search-select/base-search-form-select.js +0 -6
- package/dist/base-search-select/base-search-form-select.js.map +0 -1
- package/dist/base-search-select/base-search-select.d.ts +0 -9
- package/dist/base-search-select/base-search-select.js +0 -125
- package/dist/base-search-select/base-search-select.js.map +0 -1
- package/dist/base-search-select/index.d.ts +0 -3
- package/dist/base-search-select/index.js +0 -3
- package/dist/base-search-select/index.js.map +0 -1
- package/dist/base-search-select/types.js +0 -2
- package/dist/base-search-select/types.js.map +0 -1
- package/dist/base-search-select/utils.js +0 -48
- package/dist/base-search-select/utils.js.map +0 -1
- package/dist/code-editor/index.js +0 -6
- package/dist/code-editor/index.js.map +0 -1
- package/dist/collapse-card/index.js +0 -31
- package/dist/collapse-card/index.js.map +0 -1
- package/dist/collapsible-card/index.js +0 -13
- package/dist/collapsible-card/index.js.map +0 -1
- package/dist/column-manage-storage/index.js +0 -48
- package/dist/column-manage-storage/index.js.map +0 -1
- package/dist/columns-select/index.js +0 -79
- package/dist/columns-select/index.js.map +0 -1
- package/dist/edit-icon-button/index.js +0 -13
- package/dist/edit-icon-button/index.js.map +0 -1
- 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/index.js +0 -66
- 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/hooks/use-infinite-scroll.js +0 -133
- package/dist/hooks/use-infinite-scroll.js.map +0 -1
- package/dist/hooks/use-mouse-down-offset.js +0 -39
- package/dist/hooks/use-mouse-down-offset.js.map +0 -1
- package/dist/id-render/icon-button-container.js +0 -6
- package/dist/id-render/icon-button-container.js.map +0 -1
- package/dist/id-render/index.js +0 -21
- package/dist/id-render/index.js.map +0 -1
- package/dist/index.d.ts +0 -19
- package/dist/index.js +0 -22
- package/dist/index.js.map +0 -1
- package/dist/infinite-scroll-table/index.js +0 -34
- package/dist/infinite-scroll-table/index.js.map +0 -1
- package/dist/info-tooltip/index.d.ts +0 -6
- package/dist/info-tooltip/index.js +0 -6
- package/dist/info-tooltip/index.js.map +0 -1
- package/dist/input-slider/index.js +0 -81
- package/dist/input-slider/index.js.map +0 -1
- package/dist/jump-button/jump-icon-button.js +0 -7
- package/dist/jump-button/jump-icon-button.js.map +0 -1
- package/dist/large-txt-render/index.js +0 -26
- package/dist/large-txt-render/index.js.map +0 -1
- package/dist/lib/collapsible-card/index.js +0 -79
- package/dist/lib/collapsible-card/index.module.js +0 -25
- package/dist/lib/collapsible-card/index_module.css +0 -48
- package/dist/lib/column-manage-storage/index.js +0 -98
- package/dist/lib/columns-select/index.js +0 -241
- package/dist/lib/hooks/use-infinite-scroll.js +0 -195
- package/dist/lib/hooks/use-mouse-down-offset.js +0 -65
- package/dist/lib/id-render/icon-button-container.js +0 -89
- package/dist/lib/id-render/index.js +0 -112
- package/dist/lib/index.js +0 -110
- package/dist/lib/infinite-scroll-table/index.js +0 -126
- package/dist/lib/input-slider/index.js +0 -154
- package/dist/lib/input-slider/index.module.js +0 -25
- package/dist/lib/input-slider/index_module.css +0 -21
- package/dist/lib/large-txt-render/index.js +0 -62
- package/dist/lib/page-content/index.js +0 -136
- package/dist/lib/primary-page/index.js +0 -28
- package/dist/lib/primary-page/primary-header.js +0 -72
- package/dist/lib/resize-sidesheet/index.js +0 -129
- package/dist/lib/resize-sidesheet/index.module.js +0 -25
- package/dist/lib/resize-sidesheet/index_module.css +0 -9
- package/dist/lib/resize-sidesheet/use-drag.js +0 -55
- package/dist/lib/table/index.js +0 -88
- package/dist/lib/table/index.module.js +0 -25
- package/dist/lib/table/index_module.css +0 -90
- package/dist/lib/table/sort-icon.js +0 -137
- package/dist/lib/table/table-with-pagination.js +0 -146
- package/dist/lib/table/table-without-pagniation.js +0 -108
- package/dist/lib/table-col-actions/index.js +0 -123
- package/dist/lib/table-header/index.js +0 -96
- 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.js +0 -74
- package/dist/lib/tabs/index.module.js +0 -25
- package/dist/lib/tabs/index_module.css +0 -37
- package/dist/lib/text-with-copy/index.js +0 -105
- package/dist/lib/tooltip-with-disabled/index.js +0 -71
- package/dist/lib/utils/basic.js +0 -78
- package/dist/lib/utils/rect.js +0 -65
- package/dist/logic-expr/consts.d.ts +0 -4
- package/dist/logic-expr/consts.js +0 -5
- package/dist/logic-expr/consts.js.map +0 -1
- package/dist/logic-expr/expr-group-render.js +0 -60
- package/dist/logic-expr/expr-group-render.js.map +0 -1
- package/dist/logic-expr/expr-render.js +0 -84
- package/dist/logic-expr/expr-render.js.map +0 -1
- package/dist/logic-expr/index.js +0 -2
- package/dist/logic-expr/index.js.map +0 -1
- package/dist/logic-expr/logic-expr.js +0 -187
- package/dist/logic-expr/logic-expr.js.map +0 -1
- package/dist/logic-expr/logic-not.js +0 -20
- package/dist/logic-expr/logic-not.js.map +0 -1
- package/dist/logic-expr/logic-toggle.js +0 -32
- package/dist/logic-expr/logic-toggle.js.map +0 -1
- package/dist/logic-expr/types.js +0 -2
- package/dist/logic-expr/types.js.map +0 -1
- package/dist/open-detail-button/index.js +0 -11
- package/dist/open-detail-button/index.js.map +0 -1
- package/dist/page-content/index.js +0 -23
- package/dist/page-content/index.js.map +0 -1
- package/dist/primary-page/index.js +0 -2
- package/dist/primary-page/index.js.map +0 -1
- package/dist/primary-page/primary-header.d.ts +0 -10
- package/dist/primary-page/primary-header.js +0 -4
- package/dist/primary-page/primary-header.js.map +0 -1
- package/dist/resize-sidesheet/index.js +0 -15
- package/dist/resize-sidesheet/index.js.map +0 -1
- package/dist/resize-sidesheet/use-drag.js +0 -25
- package/dist/resize-sidesheet/use-drag.js.map +0 -1
- package/dist/route/route-back-action.d.ts +0 -6
- package/dist/route/route-back-action.js +0 -29
- package/dist/route/route-back-action.js.map +0 -1
- package/dist/table/index.js +0 -6
- package/dist/table/index.js.map +0 -1
- package/dist/table/sort-icon.js +0 -30
- package/dist/table/sort-icon.js.map +0 -1
- package/dist/table/table-with-pagination.js +0 -55
- package/dist/table/table-with-pagination.js.map +0 -1
- package/dist/table/table-without-pagniation.d.ts +0 -8
- package/dist/table/table-without-pagniation.js +0 -36
- package/dist/table/table-without-pagniation.js.map +0 -1
- package/dist/table-col-actions/index.d.ts +0 -17
- package/dist/table-col-actions/index.js +0 -24
- package/dist/table-col-actions/index.js.map +0 -1
- package/dist/table-header/index.js +0 -10
- package/dist/table-header/index.js.map +0 -1
- package/dist/tabs/index.js +0 -9
- package/dist/tabs/index.js.map +0 -1
- package/dist/text-with-copy/index.js +0 -21
- package/dist/text-with-copy/index.js.map +0 -1
- package/dist/tooltip-with-disabled/index.js +0 -9
- package/dist/tooltip-with-disabled/index.js.map +0 -1
- package/dist/tsconfig.build.tsbuildinfo +0 -1
- package/dist/types/collapsible-card/index.d.ts +0 -22
- package/dist/types/column-manage-storage/index.d.ts +0 -11
- package/dist/types/columns-select/index.d.ts +0 -29
- package/dist/types/hooks/use-infinite-scroll.d.ts +0 -23
- 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/infinite-scroll-table/index.d.ts +0 -19
- package/dist/types/input-slider/index.d.ts +0 -14
- package/dist/types/large-txt-render/index.d.ts +0 -4
- 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/index.d.ts +0 -6
- package/dist/types/resize-sidesheet/use-drag.d.ts +0 -10
- package/dist/types/table/index.d.ts +0 -2
- 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/tabs/index.d.ts +0 -2
- 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
- package/dist/upload/index.js +0 -25
- package/dist/upload/index.js.map +0 -1
- package/dist/user-profile/index.js +0 -16
- package/dist/user-profile/index.js.map +0 -1
- package/dist/user-select/index.d.ts +0 -0
- package/dist/user-select/index.js +0 -188
- package/dist/user-select/index.js.map +0 -1
- package/dist/user-select/user-info.d.ts +0 -8
- package/dist/user-select/user-info.js +0 -16
- package/dist/user-select/user-info.js.map +0 -1
- package/dist/utils/basic.js +0 -24
- package/dist/utils/basic.js.map +0 -1
- package/dist/utils/rect.d.ts +0 -10
- package/dist/utils/rect.js +0 -35
- package/dist/utils/rect.js.map +0 -1
- package/dist/version-list/version-descriptions.js +0 -14
- package/dist/version-list/version-descriptions.js.map +0 -1
- package/dist/version-list/version-item.js +0 -6
- package/dist/version-list/version-item.js.map +0 -1
- package/dist/version-list/version-list.js +0 -11
- package/dist/version-list/version-list.js.map +0 -1
- package/dist/version-list/version-switch-panel.js +0 -10
- package/dist/version-list/version-switch-panel.js.map +0 -1
- /package/dist/{base-search-select → lib/base-search-select}/base-search-form-select.d.ts +0 -0
- /package/dist/{code-editor → lib/code-editor}/index.d.ts +0 -0
- /package/dist/{collapsible-card → lib/collapsible-card}/index.d.ts +0 -0
- /package/dist/{columns-select → lib/columns-select}/index.d.ts +0 -0
- /package/dist/{hooks → lib/hooks}/use-infinite-scroll.d.ts +0 -0
- /package/dist/{hooks → lib/hooks}/use-mouse-down-offset.d.ts +0 -0
- /package/dist/{id-render → lib/id-render}/index.d.ts +0 -0
- /package/dist/{infinite-scroll-table → lib/infinite-scroll-table}/index.d.ts +0 -0
- /package/dist/{large-txt-render → lib/large-txt-render}/index.d.ts +0 -0
- /package/dist/{logic-expr → lib/logic-expr}/expr-group-render.d.ts +0 -0
- /package/dist/{logic-expr → lib/logic-expr}/expr-render.d.ts +0 -0
- /package/dist/{logic-expr → lib/logic-expr}/index.d.ts +0 -0
- /package/dist/{logic-expr → lib/logic-expr}/logic-expr.d.ts +0 -0
- /package/dist/{logic-expr → lib/logic-expr}/logic-not.d.ts +0 -0
- /package/dist/{logic-expr → lib/logic-expr}/logic-toggle.d.ts +0 -0
- /package/dist/{logic-expr → lib/logic-expr}/types.d.ts +0 -0
- /package/dist/{open-detail-button → lib/open-detail-button}/index.d.ts +0 -0
- /package/dist/{page-content → lib/page-content}/index.d.ts +0 -0
- /package/dist/{primary-page → lib/primary-page}/index.d.ts +0 -0
- /package/dist/{table → lib/table}/index.d.ts +0 -0
- /package/dist/{tabs → lib/tabs}/index.d.ts +0 -0
- /package/dist/{text-with-copy → lib/text-with-copy}/index.d.ts +0 -0
- /package/dist/{upload → lib/upload}/index.d.ts +0 -0
- /package/dist/{version-list → lib/version-list}/version-descriptions.d.ts +0 -0
- /package/dist/{version-list → lib/version-list}/version-item.d.ts +0 -0
- /package/dist/{version-list → lib/version-list}/version-list.d.ts +0 -0
- /package/dist/{version-list → lib/version-list}/version-switch-panel.d.ts +0 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { type Expr, type ExprGroup } from '../logic-expr';
|
|
2
|
+
export interface LogicOperation {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
}
|
|
6
|
+
export type LogicFilterLeft = string | string[];
|
|
7
|
+
export type LogicFilter = ExprGroup<LogicFilterLeft, string, any>;
|
|
8
|
+
export interface RenderProps {
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
fields: LogicField[];
|
|
11
|
+
/** 开启级联模式,佐治会变成数组 */
|
|
12
|
+
enableCascadeMode?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/** 逻辑编辑器的字段 */
|
|
15
|
+
export interface LogicField {
|
|
16
|
+
/** 字段标题 */
|
|
17
|
+
title: React.ReactNode;
|
|
18
|
+
/** 字段名称 */
|
|
19
|
+
name: string;
|
|
20
|
+
/** 字段类型 */
|
|
21
|
+
type: 'string' | 'number' | 'options' | 'custom';
|
|
22
|
+
setterProps?: Record<string, unknown>;
|
|
23
|
+
/** 自定义操作符右边的输入编辑器 */
|
|
24
|
+
setter?: LogicSetter;
|
|
25
|
+
/** 禁用操作符列表 */
|
|
26
|
+
disabledOperations?: string[];
|
|
27
|
+
/** operator 自定义属性 */
|
|
28
|
+
operatorProps?: Record<string, unknown>;
|
|
29
|
+
/** 自定义操作符列表,会覆盖原有列表 */
|
|
30
|
+
customOperations?: LogicOperation[];
|
|
31
|
+
/** 子字段 */
|
|
32
|
+
children?: LogicField[];
|
|
33
|
+
}
|
|
34
|
+
export interface DataTypeSetterProps<T = any> {
|
|
35
|
+
[key: string]: unknown;
|
|
36
|
+
value: T;
|
|
37
|
+
expr: Expr | undefined;
|
|
38
|
+
field: LogicField;
|
|
39
|
+
disabled: boolean;
|
|
40
|
+
onChange: (val: T) => void;
|
|
41
|
+
}
|
|
42
|
+
export type LogicSetter = (props: DataTypeSetterProps) => JSX.Element | null;
|
|
43
|
+
export interface LogicDataType {
|
|
44
|
+
type: 'string' | 'number' | 'date' | 'options';
|
|
45
|
+
operations: LogicOperation[];
|
|
46
|
+
setter: LogicSetter;
|
|
47
|
+
}
|
|
48
|
+
export declare const baseOperations: () => LogicOperation[];
|
|
49
|
+
export declare const stringOperations: () => LogicOperation[];
|
|
50
|
+
export declare const numberOperations: () => LogicOperation[];
|
|
51
|
+
export declare const dateOperations: () => LogicOperation[];
|
|
52
|
+
export declare const selectOperations: () => LogicOperation[];
|
|
53
|
+
export declare function useDataTypeList(): LogicDataType[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@arco-iconbox/react-cozeloop-icons';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type MultipartItem } from '../type';
|
|
3
|
+
interface ImageItemRendererProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
style?: React.CSSProperties;
|
|
6
|
+
spaceID?: Int64;
|
|
7
|
+
item: MultipartItem;
|
|
8
|
+
readonly?: boolean;
|
|
9
|
+
onRemove: () => void;
|
|
10
|
+
onChange: (item: MultipartItem) => void;
|
|
11
|
+
uploadFile?: (params: unknown) => Promise<string>;
|
|
12
|
+
}
|
|
13
|
+
export declare const ImageItemRenderer: React.FC<ImageItemRendererProps>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type MultipartItem } from '../type';
|
|
3
|
+
interface MultipartItemRendererProps {
|
|
4
|
+
item: MultipartItem;
|
|
5
|
+
readonly?: boolean;
|
|
6
|
+
onChange: (item: MultipartItem) => void;
|
|
7
|
+
onRemove: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const MultipartItemRenderer: React.FC<MultipartItemRendererProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type Image as ImageProps } from '@cozeloop/api-schema/evaluation';
|
|
3
|
+
import { type UploadAttachmentDetail } from '../type';
|
|
4
|
+
interface UrlInputModalProps {
|
|
5
|
+
visible: boolean;
|
|
6
|
+
onConfirm: (results: ImageProps[]) => void;
|
|
7
|
+
onCancel: () => void;
|
|
8
|
+
maxCount?: number;
|
|
9
|
+
uploadImageUrl?: (urls: string[]) => Promise<UploadAttachmentDetail[] | undefined>;
|
|
10
|
+
uploadType?: 'image' | 'video';
|
|
11
|
+
intranetUrlValidator?: (url: string) => boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const UrlInputModal: React.FC<UrlInputModalProps>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type MultipartItem } from '../type';
|
|
3
|
+
interface VideoItemRendererProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
style?: React.CSSProperties;
|
|
6
|
+
spaceID?: Int64;
|
|
7
|
+
item: MultipartItem;
|
|
8
|
+
readonly?: boolean;
|
|
9
|
+
onRemove: () => void;
|
|
10
|
+
onChange: (item: MultipartItem) => void;
|
|
11
|
+
uploadFile?: (params: unknown) => Promise<string>;
|
|
12
|
+
}
|
|
13
|
+
export declare const VideoItemRenderer: React.FC<VideoItemRendererProps>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ContentPartLoop } from './type';
|
|
2
|
+
interface MultiPartRenderProps {
|
|
3
|
+
fileParts?: ContentPartLoop[];
|
|
4
|
+
readonly?: boolean;
|
|
5
|
+
className?: string;
|
|
6
|
+
onDeleteFilePart?: (part: ContentPartLoop) => void;
|
|
7
|
+
onFilePartsChange?: (part: ContentPartLoop) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function MultiPartRender({ fileParts, onDeleteFilePart, onFilePartsChange, readonly, className, }: MultiPartRenderProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { type ContentPart } from '@cozeloop/api-schema/prompt';
|
|
2
|
+
import { type Content, type Image, type ContentType } from '@cozeloop/api-schema/evaluation';
|
|
3
|
+
import { ItemErrorType, type MultiModalSpec } from '@cozeloop/api-schema/data';
|
|
4
|
+
export declare enum ImageStatus {
|
|
5
|
+
Loading = "loading",
|
|
6
|
+
Success = "success",
|
|
7
|
+
Error = "error"
|
|
8
|
+
}
|
|
9
|
+
export type FileItemStatus = 'success' | 'uploadFail' | 'validateFail' | 'validating' | 'uploading' | 'wait';
|
|
10
|
+
export interface ContentPartLoop extends ContentPart {
|
|
11
|
+
uid?: string;
|
|
12
|
+
status?: FileItemStatus;
|
|
13
|
+
}
|
|
14
|
+
export declare const getErrorTypeMap: () => {
|
|
15
|
+
1: string;
|
|
16
|
+
2: string;
|
|
17
|
+
3: string;
|
|
18
|
+
4: string;
|
|
19
|
+
5: string;
|
|
20
|
+
100: string;
|
|
21
|
+
6: string;
|
|
22
|
+
7: string;
|
|
23
|
+
8: string;
|
|
24
|
+
9: string;
|
|
25
|
+
10: string;
|
|
26
|
+
11: string;
|
|
27
|
+
12: string;
|
|
28
|
+
13: string;
|
|
29
|
+
103: string;
|
|
30
|
+
};
|
|
31
|
+
export type MultipartItemContentType = ContentType | 'Video';
|
|
32
|
+
export interface MultipartItem extends Omit<Content, 'content_type'> {
|
|
33
|
+
uid?: string;
|
|
34
|
+
sourceImage?: {
|
|
35
|
+
status: ImageStatus;
|
|
36
|
+
file?: File;
|
|
37
|
+
};
|
|
38
|
+
sourceVideo?: {
|
|
39
|
+
status: ImageStatus;
|
|
40
|
+
file?: File;
|
|
41
|
+
};
|
|
42
|
+
video?: Image;
|
|
43
|
+
content_type: MultipartItemContentType;
|
|
44
|
+
config?: {
|
|
45
|
+
image_resolution?: string;
|
|
46
|
+
video_fps?: number;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
export interface ImageField {
|
|
50
|
+
name?: string;
|
|
51
|
+
url?: string;
|
|
52
|
+
uri?: string;
|
|
53
|
+
thumb_url?: string;
|
|
54
|
+
}
|
|
55
|
+
export interface UploadAttachmentDetail {
|
|
56
|
+
contentType?: ContentType;
|
|
57
|
+
originImage?: ImageField;
|
|
58
|
+
image?: ImageField;
|
|
59
|
+
errorType?: ItemErrorType;
|
|
60
|
+
errMsg?: string;
|
|
61
|
+
}
|
|
62
|
+
export type MultipartEditorConfig = MultiModalSpec & {
|
|
63
|
+
imageEnabled?: boolean;
|
|
64
|
+
imageSupportedFormats?: string[];
|
|
65
|
+
videoEnabled?: boolean;
|
|
66
|
+
videoSupportedFormats?: string[];
|
|
67
|
+
maxVideoSize?: number;
|
|
68
|
+
};
|
|
69
|
+
export interface MultipartEditorProps {
|
|
70
|
+
spaceID?: Int64;
|
|
71
|
+
className?: string;
|
|
72
|
+
value?: MultipartItem[];
|
|
73
|
+
multipartConfig?: MultipartEditorConfig;
|
|
74
|
+
readonly?: boolean;
|
|
75
|
+
onChange?: (contents: MultipartItem[]) => void;
|
|
76
|
+
uploadFile?: (params: any) => Promise<string>;
|
|
77
|
+
uploadImageUrl?: (urls: string[]) => Promise<UploadAttachmentDetail[] | undefined>;
|
|
78
|
+
imageHidden?: boolean;
|
|
79
|
+
videoHidden?: boolean;
|
|
80
|
+
intranetUrlValidator?: (url: string) => boolean;
|
|
81
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Upload } from '@coze-arch/coze-design';
|
|
2
|
+
import { type ContentPartLoop } from './type';
|
|
3
|
+
interface UploadBtnProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
4
|
+
spaceID: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
maxImageSize?: number;
|
|
7
|
+
maxVideoSize?: number;
|
|
8
|
+
maxFileCount?: number;
|
|
9
|
+
imageEnabled?: boolean;
|
|
10
|
+
videoEnabled?: boolean;
|
|
11
|
+
imageSupportedFormats?: string[];
|
|
12
|
+
videoSupportedFormats?: string[];
|
|
13
|
+
fileLimit?: number;
|
|
14
|
+
fileParts?: ContentPartLoop[];
|
|
15
|
+
uploadFile?: (params: any) => Promise<string>;
|
|
16
|
+
onFilePartsChange?: (part: ContentPartLoop) => void;
|
|
17
|
+
}
|
|
18
|
+
export interface UploadButtonRef {
|
|
19
|
+
getUploadImage: () => Upload | null;
|
|
20
|
+
getUploadVideo: () => Upload | null;
|
|
21
|
+
}
|
|
22
|
+
export declare const UploadButton: import("react").ForwardRefExoticComponent<UploadBtnProps & import("react").RefAttributes<UploadButtonRef>>;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type MultipartEditorConfig } from './type';
|
|
2
|
+
export declare const DEFAULT_FILE_SIZE: number;
|
|
3
|
+
export declare const DEFAULT_FILE_COUNT = 20;
|
|
4
|
+
export declare const DEFAULT_PART_COUNT = 50;
|
|
5
|
+
export declare const DEFAULT_SUPPORTED_FORMATS: string[];
|
|
6
|
+
export declare const DEFAULT_VIDEO_SUPPORTED_FORMATS: string[];
|
|
7
|
+
export declare const getMultipartConfig: (multipartConfig?: MultipartEditorConfig) => {
|
|
8
|
+
maxFileCount: number;
|
|
9
|
+
maxPartCount: number;
|
|
10
|
+
maxFileSize: number;
|
|
11
|
+
imageEnabled: boolean | undefined;
|
|
12
|
+
videoEnabled: boolean | undefined;
|
|
13
|
+
imageSupportedFormats: string;
|
|
14
|
+
videoSupportedFormats: string;
|
|
15
|
+
maxVideoSize: number | undefined;
|
|
16
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
interface PrimaryPageHeaderProps {
|
|
3
|
+
pageTitle?: ReactNode;
|
|
4
|
+
renderCustomHeader?: ReactNode;
|
|
5
|
+
filterSlot?: ReactNode;
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
headerClassName?: string;
|
|
8
|
+
titleClassName?: string;
|
|
9
|
+
contentClassName?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
titleSlot?: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export declare const PrimaryPage: ({ pageTitle, renderCustomHeader, filterSlot, children, contentClassName, className, headerClassName, titleClassName, titleSlot, ...restProps }: PrimaryPageHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type SideSheetReactProps } from '@coze-arch/coze-design';
|
|
2
|
+
interface ResizableSideSheetProps extends SideSheetReactProps {
|
|
3
|
+
minSize?: number;
|
|
4
|
+
maxSize?: number;
|
|
5
|
+
defaultSize?: number;
|
|
6
|
+
onResizeEnd?: (size: number) => void;
|
|
7
|
+
}
|
|
8
|
+
/** 仅支持 left 模式 */
|
|
9
|
+
export declare const ResizableSideSheet: (props: ResizableSideSheetProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface SchemaEditorProps {
|
|
2
|
+
value?: string;
|
|
3
|
+
readOnly?: boolean;
|
|
4
|
+
onChange?: (value?: string) => void;
|
|
5
|
+
language?: string;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
showLineNumbs?: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const SchemaEditor: ({ value, onChange, placeholder, readOnly, language, className, }: SchemaEditorProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ArrayFieldTemplateItemType, type FormContextType, type RJSFSchema, type StrictRJSFSchema } from '@rjsf/utils';
|
|
2
|
+
/** The `ArrayFieldItemTemplate` component is the template used to render an items of an array.
|
|
3
|
+
*
|
|
4
|
+
* @param props - The `ArrayFieldTemplateItemType` props for the component
|
|
5
|
+
*/
|
|
6
|
+
export default function ArrayFieldItemTemplate<T = unknown, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = object>(props: ArrayFieldTemplateItemType<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ArrayFieldTemplateProps, type FormContextType, type RJSFSchema, type StrictRJSFSchema } from '@rjsf/utils';
|
|
2
|
+
/** The `ArrayFieldTemplate` component is the template used to render all items in an array.
|
|
3
|
+
*
|
|
4
|
+
* @param props - The `ArrayFieldTemplateItemType` props for the component
|
|
5
|
+
*/
|
|
6
|
+
export default function ArrayFieldTemplate<T = unknown, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = object>(props: ArrayFieldTemplateProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type BaseInputTemplateProps, type FormContextType, type RJSFSchema, type StrictRJSFSchema } from '@rjsf/utils';
|
|
2
|
+
/** The `BaseInputTemplate` is the template to use to render the basic `<input>` component for the `core` theme.
|
|
3
|
+
* It is used as the template for rendering many of the <input> based widgets that differ by `type` and callbacks only.
|
|
4
|
+
* It can be customized/overridden for other themes or individual implementations as needed.
|
|
5
|
+
*
|
|
6
|
+
* @param props - The `WidgetProps` for this template
|
|
7
|
+
*/
|
|
8
|
+
export default function BaseInputTemplate<T = unknown, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = object>(props: BaseInputTemplateProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type DescriptionFieldProps, type FormContextType, type RJSFSchema, type StrictRJSFSchema } from '@rjsf/utils';
|
|
2
|
+
/** The `DescriptionField` is the template to use to render the description of a field
|
|
3
|
+
*
|
|
4
|
+
* @param props - The `DescriptionFieldProps` for this component
|
|
5
|
+
*/
|
|
6
|
+
export default function DescriptionField<T = unknown, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = object>(props: DescriptionFieldProps<T, S, F>): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ErrorListProps, type FormContextType, type RJSFSchema, type StrictRJSFSchema } from '@rjsf/utils';
|
|
2
|
+
/** The `ErrorList` component is the template that renders the all the errors associated with the fields in the `Form`
|
|
3
|
+
*
|
|
4
|
+
* @param props - The `ErrorListProps` for this component
|
|
5
|
+
*/
|
|
6
|
+
export default function ErrorList<T = unknown, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = object>({ errors, registry }: ErrorListProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type FieldErrorProps, type FormContextType, type RJSFSchema, type StrictRJSFSchema } from '@rjsf/utils';
|
|
2
|
+
/** The `FieldErrorTemplate` component renders the errors local to the particular field
|
|
3
|
+
*
|
|
4
|
+
* @param props - The `FieldErrorProps` for the errors being rendered
|
|
5
|
+
*/
|
|
6
|
+
export default function FieldErrorTemplate<T = unknown, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = object>(props: FieldErrorProps<T, S, F>): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type FieldTemplateProps, type FormContextType, type RJSFSchema, type StrictRJSFSchema } from '@rjsf/utils';
|
|
2
|
+
/** The `FieldTemplate` component is the template used by `SchemaField` to render any field. It renders the field
|
|
3
|
+
* content, (label, description, children, errors and help) inside of a `WrapIfAdditional` component.
|
|
4
|
+
*
|
|
5
|
+
* @param props - The `FieldTemplateProps` for this component
|
|
6
|
+
*/
|
|
7
|
+
export default function FieldTemplate<T = unknown, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = object>(props: FieldTemplateProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type FormContextType, type IconButtonProps, type RJSFSchema, type StrictRJSFSchema } from '@rjsf/utils';
|
|
2
|
+
import { type IconButtonProps as SemiIconBaseButtonProps } from '@coze-arch/coze-design';
|
|
3
|
+
export type BaseIconButtonProps<T = unknown, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = object> = Omit<IconButtonProps<T, S, F>, 'type' | 'color'>;
|
|
4
|
+
type IconButtonComponent = <T = unknown, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = object>(props: BaseIconButtonProps<T, S, F>) => JSX.Element;
|
|
5
|
+
export default function BaseIconButton<T = unknown, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = object>(props: BaseIconButtonProps<T, S, F> & SemiIconBaseButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const AddButton: IconButtonComponent;
|
|
7
|
+
export declare const CopyButton: IconButtonComponent;
|
|
8
|
+
export declare const MoveDownButton: IconButtonComponent;
|
|
9
|
+
export declare const MoveUpButton: IconButtonComponent;
|
|
10
|
+
export declare const RemoveButton: IconButtonComponent;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type FormContextType, type ObjectFieldTemplateProps, type RJSFSchema, type StrictRJSFSchema } from '@rjsf/utils';
|
|
2
|
+
/** The `ObjectFieldTemplate` is the template to use to render all the inner properties of an object along with the
|
|
3
|
+
* title and description if available. If the object is expandable, then an `AddButton` is also rendered after all
|
|
4
|
+
* the properties.
|
|
5
|
+
*
|
|
6
|
+
* @param props - The `ObjectFieldTemplateProps` for this component
|
|
7
|
+
*/
|
|
8
|
+
export default function ObjectFieldTemplate<T = unknown, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = object>(props: ObjectFieldTemplateProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type FormContextType, type RJSFSchema, type StrictRJSFSchema, type SubmitButtonProps } from '@rjsf/utils';
|
|
2
|
+
/** The `SubmitButton` renders a button that represent the `Submit` action on a form
|
|
3
|
+
*/
|
|
4
|
+
export default function SubmitButton<T = unknown, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = object>({ uiSchema }: SubmitButtonProps<T, S, F>): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type FormContextType, type TitleFieldProps, type RJSFSchema, type StrictRJSFSchema } from '@rjsf/utils';
|
|
2
|
+
/** The `TitleField` is the template to use to render the title of a field
|
|
3
|
+
*
|
|
4
|
+
* @param props - The `TitleFieldProps` for this component
|
|
5
|
+
*/
|
|
6
|
+
export default function TitleField<T = unknown, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = object>({ id, uiSchema, title }: TitleFieldProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type FormContextType, type RJSFSchema, type StrictRJSFSchema, type WidgetProps } from '@rjsf/utils';
|
|
2
|
+
/** The `CheckBoxWidget` is a widget for rendering boolean properties.
|
|
3
|
+
* It is typically used to represent a boolean.
|
|
4
|
+
*
|
|
5
|
+
* @param props - The `WidgetProps` for this component
|
|
6
|
+
*/
|
|
7
|
+
export default function CheckboxWidget<T = unknown, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = object>(props: WidgetProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type FormContextType, type WidgetProps, type RJSFSchema, type StrictRJSFSchema } from '@rjsf/utils';
|
|
2
|
+
/** The `CheckboxesWidget` is a widget for rendering checkbox groups.
|
|
3
|
+
* It is typically used to represent an array of enums.
|
|
4
|
+
*
|
|
5
|
+
* @param props - The `WidgetProps` for this component
|
|
6
|
+
*/
|
|
7
|
+
export default function CheckboxesWidget<T = unknown, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = object>({ autofocus, disabled, formContext, id, onBlur, onChange, onFocus, options, readonly, value, }: WidgetProps<T, S, F>): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type FormContextType, type RJSFSchema, type StrictRJSFSchema, type WidgetProps } from '@rjsf/utils';
|
|
2
|
+
/** The `RadioWidget` is a widget for rendering a radio group.
|
|
3
|
+
* It is typically used with a string property constrained with enum options.
|
|
4
|
+
*
|
|
5
|
+
* @param props - The `WidgetProps` for this component
|
|
6
|
+
*/
|
|
7
|
+
export default function RadioWidget<T = unknown, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = object>({ autofocus, disabled, formContext, id, onBlur, onChange, onFocus, options, readonly, value, }: WidgetProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type FormContextType, type RJSFSchema, type StrictRJSFSchema, type WidgetProps } from '@rjsf/utils';
|
|
2
|
+
/** The `RangeWidget` component uses the `BaseInputTemplate` changing the type to `range` and wrapping the result
|
|
3
|
+
* in a div, with the value along side it.
|
|
4
|
+
*
|
|
5
|
+
* @param props - The `WidgetProps` for this component
|
|
6
|
+
*/
|
|
7
|
+
export default function RangeWidget<T = unknown, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = object>(props: WidgetProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type FormContextType, type RJSFSchema, type StrictRJSFSchema, type WidgetProps } from '@rjsf/utils';
|
|
2
|
+
/** The `SelectWidget` is a widget for rendering dropdowns.
|
|
3
|
+
* It is typically used with string properties constrained with enum options.
|
|
4
|
+
*
|
|
5
|
+
* @param props - The `WidgetProps` for this component
|
|
6
|
+
*/
|
|
7
|
+
export default function SelectWidget<T = unknown, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = object>({ autofocus, disabled, formContext, id, multiple, onBlur, onChange, onFocus, options, placeholder, readonly, value, }: WidgetProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type FormContextType, type RJSFSchema, type StrictRJSFSchema, type WidgetProps } from '@rjsf/utils';
|
|
2
|
+
/** The `TextareaWidget` is a widget for rendering input fields as textarea.
|
|
3
|
+
*
|
|
4
|
+
* @param props - The `WidgetProps` for this component
|
|
5
|
+
*/
|
|
6
|
+
export default function TextareaWidget<T = unknown, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = object>({ disabled, formContext, id, onBlur, onChange, onFocus, options, placeholder, readonly, value, }: WidgetProps<T, S, F>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type Form from '@rjsf/core';
|
|
2
|
+
export { default as schemaValidators } from '@rjsf/validator-ajv8';
|
|
3
|
+
export declare const SemiSchemaForm: import("react").ComponentType<import("@rjsf/core").FormProps<any, import("@rjsf/utils").RJSFSchema, any>>;
|
|
4
|
+
export type SemiSchemaFormInstance = Form;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare enum EventNames {
|
|
2
|
+
INIT_LOOP_FORM = "init_loop_form",
|
|
3
|
+
LOOP_FORM_FIELD_VALIDATE_ERROR = "loop_form_field_validate_error",// 表单项报错次数
|
|
4
|
+
LOOP_FORM_SUBMIT_INTERFACE_ERROR = "loop_form_submit_interface_error",// 提交接口报错次数
|
|
5
|
+
LOOP_FORM_SUBMIT_SUCCESS = "loop_form_submit_success",// 提交成功
|
|
6
|
+
LOOP_FORM_FIELD_CHANGE_TIMELINE = "loop_form_field_change_timeline",// 表单项变更时间轴
|
|
7
|
+
LOOP_FORM_CLOSE = "loop_form_close"
|
|
8
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Ref } from 'react';
|
|
2
|
+
import { type BaseFormProps, Form, type FormApi } from '@coze-arch/coze-design';
|
|
3
|
+
export interface SentinelFormProps<T extends Record<string, any>> extends BaseFormProps<any> {
|
|
4
|
+
/**
|
|
5
|
+
* 表单ID,用于快速定位该表单的用户,命名规范:[业务模块]-[业务名称]-[表单名称]
|
|
6
|
+
* 示例:数据引擎-AIDP-表单创建
|
|
7
|
+
*/
|
|
8
|
+
formID: string;
|
|
9
|
+
onSubmit?: (values: T, e?: React.FormEvent<HTMLFormElement>) => void;
|
|
10
|
+
onValueChange?: (values: T, changed: Partial<T>) => void;
|
|
11
|
+
}
|
|
12
|
+
export type SentinelFormRef<T extends Record<string, any>> = Form<T> & {
|
|
13
|
+
submitLog?: (isInterfaceError?: boolean, error?: any) => Promise<void>;
|
|
14
|
+
};
|
|
15
|
+
export type SentinelFormApi<T extends Record<string, any>> = FormApi<T> & {
|
|
16
|
+
submitLog?: (isInterfaceError?: boolean, error?: any) => Promise<void>;
|
|
17
|
+
};
|
|
18
|
+
export declare const SentinelForm: <T extends Record<string, any>>(props: SentinelFormProps<T> & {
|
|
19
|
+
ref?: Ref<SentinelFormRef<T>>;
|
|
20
|
+
}) => JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface StepNavProps {
|
|
2
|
+
currentStep: string;
|
|
3
|
+
stepItems: {
|
|
4
|
+
key: string;
|
|
5
|
+
label: string;
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
}[];
|
|
8
|
+
onStepChange?: (step: string) => void;
|
|
9
|
+
clickToChange?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare function StepNav({ currentStep, stepItems, onStepChange, clickToChange, }: StepNavProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -3,6 +3,6 @@ export declare const IconSortArrow: ({ sortOrder, ...rest }: {
|
|
|
3
3
|
sortOrder?: "ascend" | "descend" | boolean;
|
|
4
4
|
} & SVGAttributes<HTMLOrSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
/** 表格排序专用图标 */
|
|
6
|
-
export
|
|
7
|
-
sortOrder?:
|
|
8
|
-
})
|
|
6
|
+
export declare const createLoopTableSortIcon: () => ({ sortOrder }: {
|
|
7
|
+
sortOrder?: "ascend" | "descend" | boolean;
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { type Params, type PaginationResult } from 'ahooks/lib/usePagination/types';
|
|
2
2
|
import { type TableProps } from '@coze-arch/coze-design';
|
|
3
|
+
/** 获取本地存储的表格分页数量 */
|
|
4
|
+
export declare function getStoragePageSize(pageSizeStorageKey: string | undefined): number | undefined;
|
|
3
5
|
export declare const PAGE_SIZE_OPTIONS: number[];
|
|
4
|
-
export declare const DEFAULT_PAGE_SIZE =
|
|
5
|
-
export
|
|
6
|
+
export declare const DEFAULT_PAGE_SIZE = 20;
|
|
7
|
+
export type TableWithPaginationProps<RecordItem> = TableProps & {
|
|
6
8
|
heightFull?: boolean;
|
|
7
9
|
service: Pick<PaginationResult<{
|
|
8
10
|
total: number;
|
|
@@ -10,5 +12,10 @@ export declare function TableWithPagination<RecordItem>(props: TableProps & {
|
|
|
10
12
|
}, Params>, 'data' | 'pagination' | 'loading'>;
|
|
11
13
|
pageSizeOpts?: number[];
|
|
12
14
|
header?: React.ReactNode;
|
|
15
|
+
/** 该参数将插入到分页器左侧,共同作为 footer 的一部分 */
|
|
13
16
|
footerWithPagination?: React.ReactNode;
|
|
14
|
-
|
|
17
|
+
pageSizeStorageKey?: string;
|
|
18
|
+
showSizeChanger?: boolean;
|
|
19
|
+
footerClassName?: string;
|
|
20
|
+
};
|
|
21
|
+
export declare function TableWithPagination<RecordItem>(props: TableWithPaginationProps<RecordItem>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type TableProps } from '@coze-arch/coze-design';
|
|
2
|
+
export type TableWithoutPaginationProps = TableProps & {
|
|
3
|
+
heightFull?: boolean;
|
|
4
|
+
header?: React.ReactNode;
|
|
5
|
+
};
|
|
6
|
+
export declare function TableWithoutPagination(props: TableWithoutPaginationProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type BatchOperateStore } from './use-batch-operate';
|
|
2
|
+
export interface BatchOperateProps<RecordItem> {
|
|
3
|
+
/** 批量操作接口 */
|
|
4
|
+
batchOperateStore: BatchOperateStore<RecordItem>;
|
|
5
|
+
/** 自定义批量操作按钮 */
|
|
6
|
+
actions?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
/** 表格批量操作 */
|
|
9
|
+
export declare function TableBatchOperate<RecordItem>({ actions, batchOperateStore, }: BatchOperateProps<RecordItem>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type RowSelection } from '@coze-arch/coze-design';
|
|
2
|
+
/** 批量操作接口 */
|
|
3
|
+
export interface BatchOperateStore<RecordItem> {
|
|
4
|
+
/** 表格行选择器 */
|
|
5
|
+
rowSelection: RowSelection<RecordItem>;
|
|
6
|
+
/** 已选择的表格行记录数据 */
|
|
7
|
+
selectedItems: RecordItem[];
|
|
8
|
+
/** 设置已选择的表格行记录数据 */
|
|
9
|
+
setSelectedItems: (items: RecordItem[]) => void;
|
|
10
|
+
/** 批量操作状态 */
|
|
11
|
+
enableBatchOperate: boolean;
|
|
12
|
+
/** 设置批量操作状态 */
|
|
13
|
+
setEnableBatchOperate: (enable: boolean) => void;
|
|
14
|
+
/** 取消批量操作 */
|
|
15
|
+
onCancelBatchOperate: () => void;
|
|
16
|
+
}
|
|
17
|
+
/** 批量操作配置 */
|
|
18
|
+
export interface BatchOperateOptions<RecordItem> {
|
|
19
|
+
/** 表格行记录数据的唯一ID字段,默认 `id` */
|
|
20
|
+
recordKey?: keyof RecordItem;
|
|
21
|
+
/** 最大可选数量,默认不限制 */
|
|
22
|
+
maxSelectionCount?: number;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* 表格批量操作状态管理。
|
|
26
|
+
* 支持跨分页选择数据。
|
|
27
|
+
* @param recordKey 表格行记录数据的唯一ID字段,默认 `id`
|
|
28
|
+
* @returns 批量操作接口
|
|
29
|
+
*/
|
|
30
|
+
export declare function useBatchOperate<RecordItem>({ recordKey, maxSelectionCount, }?: BatchOperateOptions<RecordItem>): BatchOperateStore<RecordItem>;
|