@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
|
@@ -1,137 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
-
var __spreadValues = (a, b) => {
|
|
14
|
-
for (var prop in b || (b = {}))
|
|
15
|
-
if (__hasOwnProp.call(b, prop))
|
|
16
|
-
__defNormalProp(a, prop, b[prop]);
|
|
17
|
-
if (__getOwnPropSymbols)
|
|
18
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
-
if (__propIsEnum.call(b, prop))
|
|
20
|
-
__defNormalProp(a, prop, b[prop]);
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Tooltip } from '@coze-arch/coze-design';
|
|
3
|
+
import { IconButtonContainer } from '../id-render/icon-button-container';
|
|
4
|
+
const activeColor = 'rgb(var(--coze-up-brand-9))';
|
|
5
|
+
const unActiveColor = 'var(--coz-fg-dim)';
|
|
6
|
+
export const IconSortArrow = ({ sortOrder, ...rest }) => {
|
|
7
|
+
let descendColor = 'currentColor';
|
|
8
|
+
let ascendColor = 'currentColor';
|
|
9
|
+
if (sortOrder === 'descend') {
|
|
10
|
+
descendColor = activeColor;
|
|
11
|
+
ascendColor = unActiveColor;
|
|
21
12
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
var __objRest = (source, exclude) => {
|
|
26
|
-
var target = {};
|
|
27
|
-
for (var prop in source)
|
|
28
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
29
|
-
target[prop] = source[prop];
|
|
30
|
-
if (source != null && __getOwnPropSymbols)
|
|
31
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
32
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
33
|
-
target[prop] = source[prop];
|
|
13
|
+
else if (sortOrder === 'ascend') {
|
|
14
|
+
descendColor = unActiveColor;
|
|
15
|
+
ascendColor = activeColor;
|
|
34
16
|
}
|
|
35
|
-
|
|
36
|
-
};
|
|
37
|
-
var __export = (target, all) => {
|
|
38
|
-
for (var name in all)
|
|
39
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
40
|
-
};
|
|
41
|
-
var __copyProps = (to, from, except, desc) => {
|
|
42
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
43
|
-
for (let key of __getOwnPropNames(from))
|
|
44
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
45
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
46
|
-
}
|
|
47
|
-
return to;
|
|
17
|
+
return (_jsxs("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", ...rest, children: [_jsx("path", { d: "M7.00012 1.99976C7.55241 1.99976 8.00012 2.44747 8.00012 2.99976V17.2677L9.6341 14.4376C9.91024 13.9593 10.5218 13.7954 11.0001 14.0715C11.4784 14.3477 11.6423 14.9593 11.3661 15.4376L7.8758 21.483C7.85628 21.5183 7.83468 21.5523 7.81118 21.5849C7.72727 21.7015 7.62174 21.7953 7.50337 21.8641C7.38229 21.9347 7.24502 21.9807 7.09848 21.995C7.06439 21.9984 7.03007 22 6.99566 21.9999C6.64882 22.0011 6.31102 21.8217 6.12517 21.4998L2.62517 15.4376C2.34903 14.9593 2.5129 14.3477 2.99119 14.0715C3.46949 13.7954 4.08108 13.9593 4.35722 14.4376L6.00012 17.2832V2.99976C6.00012 2.44747 6.44784 1.99976 7.00012 1.99976Z", fill: descendColor }), _jsx("path", { d: "M17.001 21.9999C16.4487 21.9999 16.001 21.5522 16.001 20.9999L16.001 6.73198L14.367 9.5621C14.0909 10.0404 13.4793 10.2043 13.001 9.92813C12.5227 9.65199 12.3589 9.04039 12.635 8.5621L16.1253 2.51665C16.1449 2.48135 16.1665 2.44735 16.19 2.41482C16.2739 2.29823 16.3794 2.20436 16.4978 2.13559C16.6189 2.06494 16.7561 2.019 16.9027 2.0047C16.9368 2.0013 16.9711 1.99964 17.0055 1.99977C17.3523 1.99854 17.6901 2.17802 17.876 2.49993L21.376 8.5621C21.6521 9.0404 21.4882 9.65199 21.0099 9.92813C20.5317 10.2043 19.9201 10.0404 19.6439 9.5621L18.001 6.71652L18.001 20.9999C18.001 21.5522 17.5533 21.9999 17.001 21.9999Z", fill: ascendColor })] }));
|
|
48
18
|
};
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
58
|
-
var sort_icon_exports = {};
|
|
59
|
-
__export(sort_icon_exports, {
|
|
60
|
-
IconSortArrow: () => IconSortArrow,
|
|
61
|
-
default: () => LoopTableSortIcon
|
|
62
|
-
});
|
|
63
|
-
module.exports = __toCommonJS(sort_icon_exports);
|
|
64
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
65
|
-
var import_coze_design = require("@coze-arch/coze-design");
|
|
66
|
-
var import_icon_button_container = __toESM(require("../id-render/icon-button-container"));
|
|
67
|
-
const activeColor = "rgb(var(--coze-up-brand-9))";
|
|
68
|
-
const unActiveColor = "var(--coz-fg-dim)";
|
|
69
|
-
const IconSortArrow = (_a) => {
|
|
70
|
-
var _b = _a, {
|
|
71
|
-
sortOrder
|
|
72
|
-
} = _b, rest = __objRest(_b, [
|
|
73
|
-
"sortOrder"
|
|
74
|
-
]);
|
|
75
|
-
let descendColor = "currentColor";
|
|
76
|
-
let ascendColor = "currentColor";
|
|
77
|
-
if (sortOrder === "descend") {
|
|
78
|
-
descendColor = activeColor;
|
|
79
|
-
ascendColor = unActiveColor;
|
|
80
|
-
} else if (sortOrder === "ascend") {
|
|
81
|
-
descendColor = unActiveColor;
|
|
82
|
-
ascendColor = activeColor;
|
|
83
|
-
}
|
|
84
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
85
|
-
"svg",
|
|
86
|
-
__spreadProps(__spreadValues({
|
|
87
|
-
width: "14",
|
|
88
|
-
height: "14",
|
|
89
|
-
viewBox: "0 0 24 24",
|
|
90
|
-
fill: "currentColor",
|
|
91
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
92
|
-
}, rest), {
|
|
93
|
-
children: [
|
|
94
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
95
|
-
"path",
|
|
96
|
-
{
|
|
97
|
-
d: "M7.00012 1.99976C7.55241 1.99976 8.00012 2.44747 8.00012 2.99976V17.2677L9.6341 14.4376C9.91024 13.9593 10.5218 13.7954 11.0001 14.0715C11.4784 14.3477 11.6423 14.9593 11.3661 15.4376L7.8758 21.483C7.85628 21.5183 7.83468 21.5523 7.81118 21.5849C7.72727 21.7015 7.62174 21.7953 7.50337 21.8641C7.38229 21.9347 7.24502 21.9807 7.09848 21.995C7.06439 21.9984 7.03007 22 6.99566 21.9999C6.64882 22.0011 6.31102 21.8217 6.12517 21.4998L2.62517 15.4376C2.34903 14.9593 2.5129 14.3477 2.99119 14.0715C3.46949 13.7954 4.08108 13.9593 4.35722 14.4376L6.00012 17.2832V2.99976C6.00012 2.44747 6.44784 1.99976 7.00012 1.99976Z",
|
|
98
|
-
fill: descendColor
|
|
99
|
-
}
|
|
100
|
-
),
|
|
101
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
102
|
-
"path",
|
|
103
|
-
{
|
|
104
|
-
d: "M17.001 21.9999C16.4487 21.9999 16.001 21.5522 16.001 20.9999L16.001 6.73198L14.367 9.5621C14.0909 10.0404 13.4793 10.2043 13.001 9.92813C12.5227 9.65199 12.3589 9.04039 12.635 8.5621L16.1253 2.51665C16.1449 2.48135 16.1665 2.44735 16.19 2.41482C16.2739 2.29823 16.3794 2.20436 16.4978 2.13559C16.6189 2.06494 16.7561 2.019 16.9027 2.0047C16.9368 2.0013 16.9711 1.99964 17.0055 1.99977C17.3523 1.99854 17.6901 2.17802 17.876 2.49993L21.376 8.5621C21.6521 9.0404 21.4882 9.65199 21.0099 9.92813C20.5317 10.2043 19.9201 10.0404 19.6439 9.5621L18.001 6.71652L18.001 20.9999C18.001 21.5522 17.5533 21.9999 17.001 21.9999Z",
|
|
105
|
-
fill: ascendColor
|
|
106
|
-
}
|
|
107
|
-
)
|
|
108
|
-
]
|
|
109
|
-
})
|
|
110
|
-
);
|
|
111
|
-
};
|
|
112
|
-
function LoopTableSortIcon({
|
|
113
|
-
sortOrder
|
|
114
|
-
}) {
|
|
115
|
-
let tooltip = "点击升序";
|
|
116
|
-
if (sortOrder === "ascend") {
|
|
117
|
-
tooltip = "点击降序";
|
|
118
|
-
} else if (sortOrder === "descend") {
|
|
119
|
-
tooltip = "点击恢复默认排序";
|
|
120
|
-
}
|
|
121
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_coze_design.Tooltip, { theme: "dark", content: tooltip, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex items-center", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
122
|
-
import_icon_button_container.default,
|
|
123
|
-
{
|
|
124
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
125
|
-
IconSortArrow,
|
|
126
|
-
{
|
|
127
|
-
sortOrder,
|
|
128
|
-
className: "text-[var(--coz-fg-secondary)]"
|
|
129
|
-
}
|
|
130
|
-
)
|
|
19
|
+
/** 表格排序专用图标 */
|
|
20
|
+
export default function LoopTableSortIcon({ sortOrder, }) {
|
|
21
|
+
let tooltip = '点击升序';
|
|
22
|
+
if (sortOrder === 'ascend') {
|
|
23
|
+
tooltip = '点击降序';
|
|
24
|
+
}
|
|
25
|
+
else if (sortOrder === 'descend') {
|
|
26
|
+
tooltip = '点击恢复默认排序';
|
|
131
27
|
}
|
|
132
|
-
|
|
28
|
+
return (_jsx(Tooltip, { theme: "dark", content: tooltip, children: _jsx("div", { className: "flex items-center", children: _jsx(IconButtonContainer, { icon: _jsx(IconSortArrow, { sortOrder: sortOrder, className: "text-[var(--coz-fg-secondary)]" }) }) }) }));
|
|
133
29
|
}
|
|
134
|
-
|
|
135
|
-
0 && (module.exports = {
|
|
136
|
-
IconSortArrow
|
|
137
|
-
});
|
|
30
|
+
//# sourceMappingURL=sort-icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sort-icon.js","sourceRoot":"","sources":["../../../src/table/sort-icon.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AAEzE,MAAM,WAAW,GAAG,6BAA6B,CAAC;AAClD,MAAM,aAAa,GAAG,mBAAmB,CAAC;AAE1C,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAC5B,SAAS,EACT,GAAG,IAAI,EAG0B,EAAE,EAAE;IACrC,IAAI,YAAY,GAAG,cAAc,CAAC;IAClC,IAAI,WAAW,GAAG,cAAc,CAAC;IACjC,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;QAC5B,YAAY,GAAG,WAAW,CAAC;QAC3B,WAAW,GAAG,aAAa,CAAC;IAC9B,CAAC;SAAM,IAAI,SAAS,KAAK,QAAQ,EAAE,CAAC;QAClC,YAAY,GAAG,aAAa,CAAC;QAC7B,WAAW,GAAG,WAAW,CAAC;IAC5B,CAAC;IAED,OAAO,CACL,eACE,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,cAAc,EACnB,KAAK,EAAC,4BAA4B,KAC9B,IAAI,aAER,eACE,CAAC,EAAC,ymBAAymB,EAC3mB,IAAI,EAAE,YAAY,GAClB,EACF,eACE,CAAC,EAAC,2mBAA2mB,EAC7mB,IAAI,EAAE,WAAW,GACjB,IACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe;AACf,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EACxC,SAAS,GAGV;IACC,IAAI,OAAO,GAAG,MAAM,CAAC;IACrB,IAAI,SAAS,KAAK,QAAQ,EAAE,CAAC;QAC3B,OAAO,GAAG,MAAM,CAAC;IACnB,CAAC;SAAM,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;QACnC,OAAO,GAAG,UAAU,CAAC;IACvB,CAAC;IACD,OAAO,CACL,KAAC,OAAO,IAAC,KAAK,EAAC,MAAM,EAAC,OAAO,EAAE,OAAO,YACpC,cAAK,SAAS,EAAC,mBAAmB,YAChC,KAAC,mBAAmB,IAClB,IAAI,EACF,KAAC,aAAa,IACZ,SAAS,EAAE,SAAS,EACpB,SAAS,EAAC,gCAAgC,GAC1C,GAEJ,GACE,GACE,CACX,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type Params, type PaginationResult } from 'ahooks/lib/usePagination/types';
|
|
2
|
+
import { type TableProps } from '@coze-arch/coze-design';
|
|
3
|
+
/** 获取本地存储的表格分页数量 */
|
|
4
|
+
export declare function getStoragePageSize(pageSizeStorageKey: string | undefined): number | undefined;
|
|
5
|
+
export declare const PAGE_SIZE_OPTIONS: number[];
|
|
6
|
+
export declare const DEFAULT_PAGE_SIZE = 20;
|
|
7
|
+
export type TableWithPaginationProps<RecordItem> = TableProps & {
|
|
8
|
+
heightFull?: boolean;
|
|
9
|
+
service: Pick<PaginationResult<{
|
|
10
|
+
total: number;
|
|
11
|
+
list: RecordItem[];
|
|
12
|
+
}, Params>, 'data' | 'pagination' | 'loading'>;
|
|
13
|
+
pageSizeOpts?: number[];
|
|
14
|
+
header?: React.ReactNode;
|
|
15
|
+
/** 该参数将插入到分页器左侧,共同作为 footer 的一部分 */
|
|
16
|
+
footerWithPagination?: React.ReactNode;
|
|
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;
|
|
@@ -1,146 +1,74 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
-
var __spreadValues = (a, b) => {
|
|
14
|
-
for (var prop in b || (b = {}))
|
|
15
|
-
if (__hasOwnProp.call(b, prop))
|
|
16
|
-
__defNormalProp(a, prop, b[prop]);
|
|
17
|
-
if (__getOwnPropSymbols)
|
|
18
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
-
if (__propIsEnum.call(b, prop))
|
|
20
|
-
__defNormalProp(a, prop, b[prop]);
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useMemo, useRef } from 'react';
|
|
3
|
+
import cls from 'classnames';
|
|
4
|
+
import { useSize } from 'ahooks';
|
|
5
|
+
import { CozPagination } from '@coze-arch/coze-design';
|
|
6
|
+
import LoopTableSortIcon from './sort-icon';
|
|
7
|
+
import { LoopTable } from './index';
|
|
8
|
+
/** 获取本地存储的表格分页数量 */
|
|
9
|
+
export function getStoragePageSize(pageSizeStorageKey) {
|
|
10
|
+
if (!pageSizeStorageKey) {
|
|
11
|
+
return undefined;
|
|
21
12
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
var __export = (target, all) => {
|
|
26
|
-
for (var name in all)
|
|
27
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
28
|
-
};
|
|
29
|
-
var __copyProps = (to, from, except, desc) => {
|
|
30
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
31
|
-
for (let key of __getOwnPropNames(from))
|
|
32
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
33
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
34
|
-
}
|
|
35
|
-
return to;
|
|
36
|
-
};
|
|
37
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
38
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
39
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
40
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
41
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
42
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
43
|
-
mod
|
|
44
|
-
));
|
|
45
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
46
|
-
var table_with_pagination_exports = {};
|
|
47
|
-
__export(table_with_pagination_exports, {
|
|
48
|
-
DEFAULT_PAGE_SIZE: () => DEFAULT_PAGE_SIZE,
|
|
49
|
-
PAGE_SIZE_OPTIONS: () => PAGE_SIZE_OPTIONS,
|
|
50
|
-
TableWithPagination: () => TableWithPagination
|
|
51
|
-
});
|
|
52
|
-
module.exports = __toCommonJS(table_with_pagination_exports);
|
|
53
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
54
|
-
var import_react = require("react");
|
|
55
|
-
var import_ahooks = require("ahooks");
|
|
56
|
-
var import_coze_design = require("@coze-arch/coze-design");
|
|
57
|
-
var import_sort_icon = __toESM(require("./sort-icon"));
|
|
58
|
-
var import_index = require("./index");
|
|
59
|
-
const PAGE_SIZE_OPTIONS = [10, 20, 50];
|
|
60
|
-
const DEFAULT_PAGE_SIZE = 10;
|
|
61
|
-
function TableWithPagination(props) {
|
|
62
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
63
|
-
const {
|
|
64
|
-
pageSizeOpts,
|
|
65
|
-
service,
|
|
66
|
-
header,
|
|
67
|
-
heightFull = false,
|
|
68
|
-
footerWithPagination
|
|
69
|
-
} = props;
|
|
70
|
-
const { columns } = (_a = props.tableProps) != null ? _a : {};
|
|
71
|
-
const tableContainerRef = (0, import_react.useRef)(null);
|
|
72
|
-
const size = (0, import_ahooks.useSize)(tableContainerRef.current);
|
|
73
|
-
const tableHeaderSize = (0, import_ahooks.useSize)(
|
|
74
|
-
(_b = tableContainerRef.current) == null ? void 0 : _b.querySelector(".semi-table-header")
|
|
75
|
-
);
|
|
76
|
-
const tablePagination = (0, import_react.useMemo)(
|
|
77
|
-
() => ({
|
|
78
|
-
currentPage: service.pagination.current,
|
|
79
|
-
pageSize: service.pagination.pageSize,
|
|
80
|
-
total: Number(service.pagination.total),
|
|
81
|
-
onChange: (page, pageSize) => {
|
|
82
|
-
service.pagination.onChange(page, pageSize);
|
|
83
|
-
},
|
|
84
|
-
showSizeChanger: true,
|
|
85
|
-
pageSizeOpts: pageSizeOpts != null ? pageSizeOpts : PAGE_SIZE_OPTIONS
|
|
86
|
-
}),
|
|
87
|
-
[service.pagination, pageSizeOpts]
|
|
88
|
-
);
|
|
89
|
-
(0, import_react.useEffect)(() => {
|
|
90
|
-
var _a2, _b2;
|
|
91
|
-
if (service.pagination.current > 1 && ((_b2 = (_a2 = service == null ? void 0 : service.data) == null ? void 0 : _a2.list) == null ? void 0 : _b2.length) === 0) {
|
|
92
|
-
service.pagination.changeCurrent(1);
|
|
13
|
+
const pageSize = localStorage.getItem(pageSizeStorageKey);
|
|
14
|
+
if (pageSize && !isNaN(Number(pageSize))) {
|
|
15
|
+
return Number(pageSize);
|
|
93
16
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
17
|
+
return undefined;
|
|
18
|
+
}
|
|
19
|
+
export const PAGE_SIZE_OPTIONS = [10, 20, 50];
|
|
20
|
+
export const DEFAULT_PAGE_SIZE = 20;
|
|
21
|
+
// eslint-disable-next-line complexity
|
|
22
|
+
export function TableWithPagination(props) {
|
|
23
|
+
const { pageSizeOpts, service, header, heightFull = false, footerWithPagination, pageSizeStorageKey, showSizeChanger = true, footerClassName, className, } = props;
|
|
24
|
+
const { columns } = props.tableProps ?? {};
|
|
25
|
+
const tableContainerRef = useRef(null);
|
|
26
|
+
const size = useSize(tableContainerRef.current);
|
|
27
|
+
const tableHeaderSize = useSize(tableContainerRef.current?.querySelector('.semi-table-header'));
|
|
28
|
+
const tablePagination = useMemo(() => ({
|
|
29
|
+
currentPage: service.pagination.current,
|
|
30
|
+
pageSize: getStoragePageSize(pageSizeStorageKey) || service.pagination.pageSize,
|
|
31
|
+
total: Number(service.pagination.total),
|
|
32
|
+
onChange: (page, pageSize) => {
|
|
33
|
+
service.pagination.onChange(page, pageSize);
|
|
34
|
+
},
|
|
35
|
+
onPageSizeChange(newPageSize) {
|
|
36
|
+
if (pageSizeStorageKey) {
|
|
37
|
+
localStorage.setItem(pageSizeStorageKey, String(newPageSize));
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
showSizeChanger,
|
|
41
|
+
pageSizeOpts: pageSizeOpts ?? PAGE_SIZE_OPTIONS,
|
|
42
|
+
}), [service.pagination, pageSizeOpts, pageSizeStorageKey, showSizeChanger]);
|
|
43
|
+
useEffect(() => {
|
|
44
|
+
if (service.pagination.current > 1 && service?.data?.list?.length === 0) {
|
|
45
|
+
service.pagination.changeCurrent(1);
|
|
46
|
+
}
|
|
47
|
+
}, [service.pagination.current, service?.data?.list]);
|
|
48
|
+
const tableHeaderHeight = tableHeaderSize?.height ?? 56;
|
|
49
|
+
return (_jsxs("div", { className: cls('flex flex-col gap-3 w-full', className, {
|
|
50
|
+
'h-full flex overflow-hidden': heightFull,
|
|
51
|
+
}), children: [header ? header : null, _jsx("div", { ref: tableContainerRef, className: heightFull ? 'flex-1 overflow-hidden' : '', children: _jsx(LoopTable, { ...props, tableProps: {
|
|
52
|
+
empty: _jsx(_Fragment, {}),
|
|
53
|
+
...(props.tableProps ?? {}),
|
|
54
|
+
scroll: {
|
|
55
|
+
// 表格容器的高度减去表格头的高度
|
|
56
|
+
y: size?.height === undefined || !heightFull
|
|
57
|
+
? undefined
|
|
58
|
+
: size.height - tableHeaderHeight - 2,
|
|
59
|
+
...(props.tableProps?.scroll ?? {}),
|
|
60
|
+
},
|
|
61
|
+
loading: service?.loading || props?.tableProps?.loading,
|
|
62
|
+
columns: columns
|
|
63
|
+
?.filter(column => column.hidden !== true && column.checked !== false)
|
|
64
|
+
?.map(column => ({
|
|
65
|
+
...column,
|
|
66
|
+
...(column.sorter && !column.sortIcon
|
|
67
|
+
? { sortIcon: LoopTableSortIcon }
|
|
68
|
+
: {}),
|
|
69
|
+
})),
|
|
70
|
+
dataSource: service?.data?.list ?? [],
|
|
71
|
+
} }) }), service.pagination.current > 1 ||
|
|
72
|
+
(service?.data?.list?.length && service?.data?.list?.length > 0) ? (_jsxs("div", { className: cls('shrink-0 flex flex-row-reverse justify-between items-center', footerClassName), children: [_jsx(CozPagination, { ...tablePagination, showTotal: true, showSizeChanger: true }), footerWithPagination] })) : null] }));
|
|
140
73
|
}
|
|
141
|
-
|
|
142
|
-
0 && (module.exports = {
|
|
143
|
-
DEFAULT_PAGE_SIZE,
|
|
144
|
-
PAGE_SIZE_OPTIONS,
|
|
145
|
-
TableWithPagination
|
|
146
|
-
});
|
|
74
|
+
//# sourceMappingURL=table-with-pagination.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-with-pagination.js","sourceRoot":"","sources":["../../../src/table/table-with-pagination.tsx"],"names":[],"mappings":"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"}
|
|
@@ -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;
|
|
@@ -1,108 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
};
|
|
37
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
38
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
39
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
40
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
41
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
42
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
43
|
-
mod
|
|
44
|
-
));
|
|
45
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
46
|
-
var table_without_pagniation_exports = {};
|
|
47
|
-
__export(table_without_pagniation_exports, {
|
|
48
|
-
DEFAULT_PAGE_SIZE: () => DEFAULT_PAGE_SIZE,
|
|
49
|
-
PAGE_SIZE_OPTIONS: () => PAGE_SIZE_OPTIONS,
|
|
50
|
-
TableWithoutPagination: () => TableWithoutPagination
|
|
51
|
-
});
|
|
52
|
-
module.exports = __toCommonJS(table_without_pagniation_exports);
|
|
53
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
54
|
-
var import_react = require("react");
|
|
55
|
-
var import_ahooks = require("ahooks");
|
|
56
|
-
var import_sort_icon = __toESM(require("./sort-icon"));
|
|
57
|
-
var import_index = require("./index");
|
|
58
|
-
const PAGE_SIZE_OPTIONS = [10, 20, 50];
|
|
59
|
-
const DEFAULT_PAGE_SIZE = 10;
|
|
60
|
-
function TableWithoutPagination(props) {
|
|
61
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
62
|
-
const { header, heightFull = false } = props;
|
|
63
|
-
const { columns } = (_a = props.tableProps) != null ? _a : {};
|
|
64
|
-
const tableContainerRef = (0, import_react.useRef)(null);
|
|
65
|
-
const size = (0, import_ahooks.useSize)(tableContainerRef.current);
|
|
66
|
-
const tableHeaderSize = (0, import_ahooks.useSize)(
|
|
67
|
-
(_b = tableContainerRef.current) == null ? void 0 : _b.querySelector(".semi-table-header")
|
|
68
|
-
);
|
|
69
|
-
const tableHeaderHeight = (_c = tableHeaderSize == null ? void 0 : tableHeaderSize.height) != null ? _c : 56;
|
|
70
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
71
|
-
"div",
|
|
72
|
-
{
|
|
73
|
-
className: `${heightFull ? "h-full flex overflow-hidden" : ""} flex flex-col gap-3`,
|
|
74
|
-
children: [
|
|
75
|
-
header ? header : null,
|
|
76
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
77
|
-
"div",
|
|
78
|
-
{
|
|
79
|
-
ref: tableContainerRef,
|
|
80
|
-
className: heightFull ? "flex-1 overflow-hidden" : "",
|
|
81
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
82
|
-
import_index.LoopTable,
|
|
83
|
-
__spreadProps(__spreadValues({}, props), {
|
|
84
|
-
tableProps: __spreadProps(__spreadValues({
|
|
85
|
-
empty: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {})
|
|
86
|
-
}, (_d = props.tableProps) != null ? _d : {}), {
|
|
87
|
-
scroll: __spreadValues({
|
|
88
|
-
// 表格容器的高度减去表格头的高度
|
|
89
|
-
y: (size == null ? void 0 : size.height) === void 0 || !heightFull ? void 0 : size.height - tableHeaderHeight - 2
|
|
90
|
-
}, (_f = (_e = props.tableProps) == null ? void 0 : _e.scroll) != null ? _f : {}),
|
|
91
|
-
columns: (_g = columns == null ? void 0 : columns.filter(
|
|
92
|
-
(column) => column.hidden !== true && column.checked !== false
|
|
93
|
-
)) == null ? void 0 : _g.map((column) => __spreadValues(__spreadValues({}, column), column.sorter && !column.sortIcon ? { sortIcon: import_sort_icon.default } : {}))
|
|
94
|
-
})
|
|
95
|
-
})
|
|
96
|
-
)
|
|
97
|
-
}
|
|
98
|
-
)
|
|
99
|
-
]
|
|
100
|
-
}
|
|
101
|
-
);
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/* eslint-disable complexity */
|
|
3
|
+
import { useRef } from 'react';
|
|
4
|
+
import cls from 'classnames';
|
|
5
|
+
import { useSize } from 'ahooks';
|
|
6
|
+
import LoopTableSortIcon from './sort-icon';
|
|
7
|
+
import { LoopTable } from './index';
|
|
8
|
+
export function TableWithoutPagination(props) {
|
|
9
|
+
const { header, heightFull = false, className } = props;
|
|
10
|
+
const { columns } = props.tableProps ?? {};
|
|
11
|
+
const tableContainerRef = useRef(null);
|
|
12
|
+
const size = useSize(tableContainerRef.current);
|
|
13
|
+
const tableHeaderSize = useSize(tableContainerRef.current?.querySelector('.semi-table-header'));
|
|
14
|
+
const tableHeaderHeight = tableHeaderSize?.height ?? 56;
|
|
15
|
+
return (_jsxs("div", { className: cls('flex flex-col gap-3 w-full', className, {
|
|
16
|
+
'h-full flex overflow-hidden': heightFull,
|
|
17
|
+
}), children: [header ? header : null, _jsx("div", { ref: tableContainerRef, className: heightFull ? 'flex-1 overflow-hidden' : '', children: _jsx(LoopTable, { ...props, tableProps: {
|
|
18
|
+
empty: _jsx(_Fragment, {}),
|
|
19
|
+
...(props.tableProps ?? {}),
|
|
20
|
+
scroll: {
|
|
21
|
+
// 表格容器的高度减去表格头的高度
|
|
22
|
+
y: size?.height === undefined || !heightFull
|
|
23
|
+
? undefined
|
|
24
|
+
: size.height - tableHeaderHeight - 2,
|
|
25
|
+
...(props.tableProps?.scroll ?? {}),
|
|
26
|
+
},
|
|
27
|
+
columns: columns
|
|
28
|
+
?.filter(column => column.hidden !== true && column.checked !== false)
|
|
29
|
+
?.map(column => ({
|
|
30
|
+
...column,
|
|
31
|
+
...(column.sorter && !column.sortIcon
|
|
32
|
+
? { sortIcon: LoopTableSortIcon }
|
|
33
|
+
: {}),
|
|
34
|
+
})),
|
|
35
|
+
} }) })] }));
|
|
102
36
|
}
|
|
103
|
-
|
|
104
|
-
0 && (module.exports = {
|
|
105
|
-
DEFAULT_PAGE_SIZE,
|
|
106
|
-
PAGE_SIZE_OPTIONS,
|
|
107
|
-
TableWithoutPagination
|
|
108
|
-
});
|
|
37
|
+
//# sourceMappingURL=table-without-pagniation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-without-pagniation.js","sourceRoot":"","sources":["../../../src/table/table-without-pagniation.tsx"],"names":[],"mappings":";AAAA,+BAA+B;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE/B,OAAO,GAAG,MAAM,YAAY,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAGjC,OAAO,iBAAiB,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAOpC,MAAM,UAAU,sBAAsB,CAAC,KAAkC;IACvE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,KAAK,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IACxD,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC,UAAU,IAAI,EAAE,CAAC;IAC3C,MAAM,iBAAiB,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IACvD,MAAM,IAAI,GAAG,OAAO,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAChD,MAAM,eAAe,GAAG,OAAO,CAC7B,iBAAiB,CAAC,OAAO,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAC/D,CAAC;IAEF,MAAM,iBAAiB,GAAG,eAAe,EAAE,MAAM,IAAI,EAAE,CAAC;IAExD,OAAO,CACL,eACE,SAAS,EAAE,GAAG,CAAC,4BAA4B,EAAE,SAAS,EAAE;YACtD,6BAA6B,EAAE,UAAU;SAC1C,CAAC,aAED,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,EACvB,cACE,GAAG,EAAE,iBAAiB,EACtB,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE,YAErD,KAAC,SAAS,OACJ,KAAK,EACT,UAAU,EAAE;wBACV,KAAK,EAAE,mBAAK;wBACZ,GAAG,CAAC,KAAK,CAAC,UAAU,IAAI,EAAE,CAAC;wBAC3B,MAAM,EAAE;4BACN,kBAAkB;4BAClB,CAAC,EACC,IAAI,EAAE,MAAM,KAAK,SAAS,IAAI,CAAC,UAAU;gCACvC,CAAC,CAAC,SAAS;gCACX,CAAC,CAAC,IAAI,CAAC,MAAM,GAAG,iBAAiB,GAAG,CAAC;4BACzC,GAAG,CAAC,KAAK,CAAC,UAAU,EAAE,MAAM,IAAI,EAAE,CAAC;yBACpC;wBACD,OAAO,EAAE,OAAO;4BACd,EAAE,MAAM,CACN,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,KAAK,IAAI,IAAI,MAAM,CAAC,OAAO,KAAK,KAAK,CAC7D;4BACD,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;4BACf,GAAG,MAAM;4BACT,GAAG,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ;gCACnC,CAAC,CAAC,EAAE,QAAQ,EAAE,iBAAiB,EAAE;gCACjC,CAAC,CAAC,EAAE,CAAC;yBACR,CAAC,CAAC;qBACN,GACD,GACE,IACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -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,14 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button } from '@coze-arch/coze-design';
|
|
3
|
+
/** 表格批量操作 */
|
|
4
|
+
export function TableBatchOperate({ actions, batchOperateStore, }) {
|
|
5
|
+
const { selectedItems, setSelectedItems, enableBatchOperate, setEnableBatchOperate, } = batchOperateStore;
|
|
6
|
+
if (!enableBatchOperate) {
|
|
7
|
+
return (_jsx(Button, { color: "primary", onClick: () => setEnableBatchOperate?.(true), children: "\u6279\u91CF\u9009\u62E9" }));
|
|
8
|
+
}
|
|
9
|
+
return (_jsxs("div", { className: "flex items-center gap-2", children: [_jsxs("div", { className: "text-xs", children: ["\u5DF2\u9009 ", selectedItems.length, " \u6761\u6570\u636E", _jsx("span", { className: "ml-1 text-[rgb(var(--coze-up-brand-9))] cursor-pointer", onClick: () => {
|
|
10
|
+
setSelectedItems([]);
|
|
11
|
+
setEnableBatchOperate?.(false);
|
|
12
|
+
}, children: "\u53D6\u6D88\u9009\u62E9" })] }), actions] }));
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=table-batch-operation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-batch-operation.js","sourceRoot":"","sources":["../../../src/table-batch-operate/table-batch-operation.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAWhD,aAAa;AACb,MAAM,UAAU,iBAAiB,CAAa,EAC5C,OAAO,EACP,iBAAiB,GACa;IAC9B,MAAM,EACJ,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,qBAAqB,GACtB,GAAG,iBAAiB,CAAC;IACtB,IAAI,CAAC,kBAAkB,EAAE,CAAC;QACxB,OAAO,CACL,KAAC,MAAM,IAAC,KAAK,EAAC,SAAS,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,qBAAqB,EAAE,CAAC,IAAI,CAAC,yCAE3D,CACV,CAAC;IACJ,CAAC;IACD,OAAO,CACL,eAAK,SAAS,EAAC,yBAAyB,aACtC,eAAK,SAAS,EAAC,SAAS,8BAClB,aAAa,CAAC,MAAM,yBACxB,eACE,SAAS,EAAC,wDAAwD,EAClE,OAAO,EAAE,GAAG,EAAE;4BACZ,gBAAgB,CAAC,EAAE,CAAC,CAAC;4BACrB,qBAAqB,EAAE,CAAC,KAAK,CAAC,CAAC;wBACjC,CAAC,yCAGI,IACH,EACL,OAAO,IACJ,CACP,CAAC;AACJ,CAAC"}
|