@vef-framework/components 1.0.7 → 1.0.9
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 +1 -1
- package/dist/index.d.ts +15 -2
- package/dist/index.js +2 -2
- package/dist/internal/index.js +1 -1
- package/dist/internal/utils.js +1 -1
- package/dist/vef-access-denied/access-denied-icon.d.ts +1 -1
- package/dist/vef-access-denied/access-denied-icon.js +1 -1
- package/dist/vef-access-denied/index.js +1 -1
- package/dist/vef-action-buttons/index.js +1 -1
- package/dist/vef-app/helper.d.ts +10 -0
- package/dist/vef-app/helper.js +3 -0
- package/dist/vef-app/index.d.ts +5 -0
- package/dist/vef-app/index.js +3 -0
- package/dist/vef-app/props.d.ts +7 -0
- package/dist/vef-auto-sizer/index.d.ts +5 -0
- package/dist/vef-auto-sizer/index.js +3 -0
- package/dist/vef-auto-sizer/props.d.ts +5 -0
- package/dist/vef-avatar/index.d.ts +5 -0
- package/dist/vef-avatar/index.js +3 -0
- package/dist/vef-avatar/props.d.ts +11 -0
- package/dist/vef-avatar-group/index.d.ts +5 -0
- package/dist/vef-avatar-group/index.js +3 -0
- package/dist/vef-avatar-group/props.d.ts +15 -0
- package/dist/vef-badge/index.js +1 -1
- package/dist/vef-bool/hooks/use-bool-instance.js +1 -1
- package/dist/vef-bool/index.js +1 -1
- package/dist/vef-button/components/base-button.js +1 -1
- package/dist/vef-button/index.js +1 -1
- package/dist/vef-card/index.js +1 -1
- package/dist/vef-card-meta/index.js +1 -1
- package/dist/vef-checkbox/hooks/use-checkbox-instance.js +1 -1
- package/dist/vef-checkbox/hooks/use-data-options.d.ts +1 -1
- package/dist/vef-checkbox/hooks/use-data-options.js +1 -1
- package/dist/vef-checkbox/index.js +1 -1
- package/dist/vef-col/index.js +1 -1
- package/dist/vef-color-picker/index.js +1 -1
- package/dist/vef-compact/index.js +1 -1
- package/dist/vef-config-provider/hooks/use-ui-config.d.ts +3 -5
- package/dist/vef-config-provider/hooks/use-ui-config.js +2 -2
- package/dist/vef-config-provider/index.js +15 -23
- package/dist/vef-config-provider/reset-style.js +1 -1
- package/dist/vef-config-provider/store.d.ts +14 -9
- package/dist/vef-config-provider/store.js +2 -2
- package/dist/vef-container/index.js +1 -1
- package/dist/vef-crud-page/components/crud-actions.js +1 -1
- package/dist/vef-crud-page/components/crud-filter.js +1 -1
- package/dist/vef-crud-page/components/crud-footer.js +4 -4
- package/dist/vef-crud-page/components/crud-form-modal.js +1 -1
- package/dist/vef-crud-page/components/crud-header.js +1 -1
- package/dist/vef-crud-page/components/crud-table.d.ts +2 -2
- package/dist/vef-crud-page/components/crud-table.js +2 -2
- package/dist/vef-crud-page/hooks/use-action-buttons.js +2 -2
- package/dist/vef-crud-page/hooks/use-crud-context.js +1 -1
- package/dist/vef-crud-page/hooks/use-crud-schema.d.ts +2 -2
- package/dist/vef-crud-page/hooks/use-crud-schema.js +1 -1
- package/dist/vef-crud-page/hooks/use-operation-buttons.js +2 -2
- package/dist/vef-crud-page/index.d.ts +3 -3
- package/dist/vef-crud-page/index.js +1 -1
- package/dist/vef-crud-page/props.d.ts +1 -1
- package/dist/vef-crud-page/store.js +1 -1
- package/dist/vef-divider/index.js +2 -2
- package/dist/vef-divider/props.d.ts +3 -3
- package/dist/vef-drawer/components/action-button-wrapper.d.ts +1 -2
- package/dist/vef-drawer/components/action-button-wrapper.js +1 -1
- package/dist/vef-drawer/components/button-props.js +1 -1
- package/dist/vef-drawer/components/cancel-action-button.js +1 -1
- package/dist/vef-drawer/components/ok-action-button.js +2 -2
- package/dist/vef-drawer/context.js +1 -1
- package/dist/vef-drawer/index.js +1 -1
- package/dist/vef-dropdown/index.d.ts +4 -1
- package/dist/vef-dropdown/index.js +2 -2
- package/dist/vef-dropdown/props.d.ts +28 -35
- package/dist/vef-dynamic-icon/index.d.ts +5 -0
- package/dist/vef-dynamic-icon/index.js +3 -0
- package/dist/vef-dynamic-icon/props.d.ts +20 -0
- package/dist/vef-dynamic-icon/props.js +3 -0
- package/dist/vef-empty/index.d.ts +1 -1
- package/dist/vef-empty/index.js +2 -2
- package/dist/vef-empty/props.d.ts +16 -1
- package/dist/vef-empty-placeholder/index.js +5 -5
- package/dist/vef-error/error-icon.d.ts +1 -1
- package/dist/vef-error/error-icon.js +1 -1
- package/dist/vef-error/index.js +1 -1
- package/dist/vef-filter/components/action-buttons.js +7 -7
- package/dist/vef-filter/components/advanced-filter.js +4 -4
- package/dist/vef-filter/components/basic-filter.js +1 -1
- package/dist/vef-filter/components/fields/index.js +1 -1
- package/dist/vef-filter/components/fields/input-number.js +1 -1
- package/dist/vef-filter/components/fields/input.js +1 -1
- package/dist/vef-filter/components/filter-field.js +1 -1
- package/dist/vef-filter/components/filter-item.d.ts +1 -1
- package/dist/vef-filter/components/filter-item.js +1 -1
- package/dist/vef-filter/event.js +1 -1
- package/dist/vef-filter/helper.js +1 -1
- package/dist/vef-filter/hooks/use-action-handlers.js +1 -1
- package/dist/vef-filter/hooks/use-computed-values.js +1 -1
- package/dist/vef-filter/hooks/use-filter-context.js +1 -1
- package/dist/vef-filter/hooks/use-filter-initialization.d.ts +1 -1
- package/dist/vef-filter/hooks/use-filter-initialization.js +1 -1
- package/dist/vef-filter/hooks/use-filter-instance.js +1 -1
- package/dist/vef-filter/hooks/use-filter-items.js +1 -1
- package/dist/vef-filter/hooks/use-filter-values-change.d.ts +1 -1
- package/dist/vef-filter/hooks/use-filter-values-change.js +1 -1
- package/dist/vef-filter/hooks/use-label-config.js +1 -1
- package/dist/vef-filter/index.d.ts +3 -4
- package/dist/vef-filter/index.js +1 -1
- package/dist/vef-filter/props.d.ts +2 -3
- package/dist/vef-filter/store.d.ts +1 -1
- package/dist/vef-filter/store.js +1 -1
- package/dist/vef-flex/index.js +1 -1
- package/dist/vef-float-button/index.js +1 -1
- package/dist/vef-float-button-group/index.js +1 -1
- package/dist/vef-form/components/fields/index.js +1 -1
- package/dist/vef-form/components/fields/input-number.js +1 -1
- package/dist/vef-form/components/fields/input.js +1 -1
- package/dist/vef-form/components/form-actions.js +1 -1
- package/dist/vef-form/components/form-content.d.ts +6 -1
- package/dist/vef-form/components/form-content.js +4 -4
- package/dist/vef-form/components/form-field.js +1 -1
- package/dist/vef-form/components/form-group.d.ts +3 -3
- package/dist/vef-form/components/form-group.js +1 -1
- package/dist/vef-form/components/form-hidden-item.js +1 -1
- package/dist/vef-form/components/form-item.d.ts +1 -1
- package/dist/vef-form/components/form-item.js +1 -1
- package/dist/vef-form/components/form-row.d.ts +2 -2
- package/dist/vef-form/components/form-row.js +1 -1
- package/dist/vef-form/event.js +1 -1
- package/dist/vef-form/helper.js +1 -1
- package/dist/vef-form/hooks/use-action-handlers.js +1 -1
- package/dist/vef-form/hooks/use-columns-layout.d.ts +2 -2
- package/dist/vef-form/hooks/use-columns-layout.js +1 -1
- package/dist/vef-form/hooks/use-computed-values.js +1 -1
- package/dist/vef-form/hooks/use-form-context.js +1 -1
- package/dist/vef-form/hooks/use-form-initialization.d.ts +1 -1
- package/dist/vef-form/hooks/use-form-initialization.js +1 -1
- package/dist/vef-form/hooks/use-form-instance.js +1 -1
- package/dist/vef-form/hooks/use-form-values-change.d.ts +1 -1
- package/dist/vef-form/hooks/use-form-values-change.js +1 -1
- package/dist/vef-form/hooks/use-label-width.js +1 -1
- package/dist/vef-form/index.d.ts +3 -4
- package/dist/vef-form/index.js +4 -4
- package/dist/vef-form/props.d.ts +3 -4
- package/dist/vef-form/store.js +1 -1
- package/dist/vef-form/types.d.ts +10 -10
- package/dist/vef-form/validation-rules.d.ts +1 -1
- package/dist/vef-form/validation-rules.js +1 -1
- package/dist/vef-form-drawer/index.d.ts +2 -2
- package/dist/vef-form-drawer/index.js +1 -1
- package/dist/vef-form-modal/index.d.ts +2 -2
- package/dist/vef-form-modal/index.js +1 -1
- package/dist/vef-generic-select/index.d.ts +4 -0
- package/dist/vef-generic-select/index.js +3 -0
- package/dist/vef-generic-select/props.d.ts +60 -0
- package/dist/vef-grid/index.js +1 -1
- package/dist/vef-grid/props.js +1 -1
- package/dist/vef-grid-item/index.js +1 -1
- package/dist/vef-icon/index.js +2 -2
- package/dist/vef-icon/props.d.ts +6 -2
- package/dist/vef-icon-select/index.d.ts +5 -0
- package/dist/vef-icon-select/index.js +42 -0
- package/dist/vef-icon-select/props.d.ts +43 -0
- package/dist/vef-input/hooks/use-input-instance.js +2 -2
- package/dist/vef-input/index.js +1 -1
- package/dist/vef-input/props.d.ts +8 -0
- package/dist/vef-input-number/hooks/use-input-number-instance.js +1 -1
- package/dist/vef-input-number/index.js +1 -1
- package/dist/vef-layout/components/content.d.ts +3 -0
- package/dist/vef-layout/components/content.js +3 -0
- package/dist/vef-layout/components/font-size.d.ts +3 -0
- package/dist/vef-layout/components/font-size.js +6 -0
- package/dist/vef-layout/components/fullscreen.d.ts +3 -0
- package/dist/vef-layout/components/fullscreen.js +6 -0
- package/dist/vef-layout/components/header-action-icons.d.ts +3 -0
- package/dist/vef-layout/components/header-action-icons.js +17 -0
- package/dist/vef-layout/components/header-content.d.ts +3 -0
- package/dist/vef-layout/components/header-content.js +8 -0
- package/dist/vef-layout/components/header.d.ts +2 -0
- package/dist/vef-layout/components/header.js +14 -0
- package/dist/vef-layout/components/sider.d.ts +13 -0
- package/dist/vef-layout/components/sider.js +51 -0
- package/dist/vef-layout/components/title.d.ts +16 -0
- package/dist/vef-layout/components/title.js +38 -0
- package/dist/vef-layout/components/user-avatar.d.ts +3 -0
- package/dist/vef-layout/components/user-avatar.js +20 -0
- package/dist/vef-layout/index.d.ts +4 -0
- package/dist/vef-layout/index.js +7 -0
- package/dist/vef-layout/logo.svg.js +3 -0
- package/dist/vef-layout/props.d.ts +19 -0
- package/dist/vef-layout/store.d.ts +16 -0
- package/dist/vef-layout/store.js +3 -0
- package/dist/vef-loading-placeholder/index.js +1 -1
- package/dist/vef-login/index.js +11 -8
- package/dist/vef-login/login-icon.d.ts +1 -1
- package/dist/vef-login/login-icon.js +1 -1
- package/dist/vef-menu/index.d.ts +5 -0
- package/dist/vef-menu/index.js +3 -0
- package/dist/vef-menu/props.d.ts +74 -0
- package/dist/vef-modal/components/action-button-wrapper.d.ts +1 -2
- package/dist/vef-modal/components/action-button-wrapper.js +1 -1
- package/dist/vef-modal/components/button-props.js +1 -1
- package/dist/vef-modal/components/cancel-action-button.js +1 -1
- package/dist/vef-modal/components/ok-action-button.js +2 -2
- package/dist/vef-modal/context.js +1 -1
- package/dist/vef-modal/index.js +3 -3
- package/dist/vef-not-found/index.js +1 -1
- package/dist/vef-not-found/not-found-icon.d.ts +1 -1
- package/dist/vef-not-found/not-found-icon.js +1 -1
- package/dist/vef-page/index.js +3 -3
- package/dist/vef-pagination/index.js +1 -1
- package/dist/vef-pagination/props.js +1 -1
- package/dist/vef-paragraph/index.js +1 -1
- package/dist/vef-password/hooks/use-password-instance.js +1 -1
- package/dist/vef-password/index.js +1 -1
- package/dist/vef-popconfirm/index.d.ts +1 -2
- package/dist/vef-popconfirm/index.js +2 -2
- package/dist/vef-popconfirm/props.d.ts +12 -4
- package/dist/vef-popover/index.d.ts +1 -2
- package/dist/vef-popover/index.js +2 -2
- package/dist/vef-popover/props.d.ts +14 -1
- package/dist/vef-radio/hooks/use-data-options.d.ts +1 -1
- package/dist/vef-radio/hooks/use-data-options.js +1 -1
- package/dist/vef-radio/hooks/use-radio-instance.js +1 -1
- package/dist/vef-radio/index.js +1 -1
- package/dist/vef-rate/hooks/use-rate-instance.js +1 -1
- package/dist/vef-rate/index.js +1 -1
- package/dist/vef-responsive-container/index.d.ts +1 -1
- package/dist/vef-responsive-container/index.js +1 -1
- package/dist/vef-responsive-item/index.d.ts +1 -1
- package/dist/vef-responsive-item/index.js +1 -1
- package/dist/vef-ribbon/index.js +1 -1
- package/dist/vef-row/index.js +1 -1
- package/dist/vef-scroll-area/components/scrollbar.js +1 -1
- package/dist/vef-scroll-area/index.js +7 -4
- package/dist/vef-scroll-area/props.d.ts +26 -2
- package/dist/vef-select/components/option.js +1 -1
- package/dist/vef-select/hooks/use-data-options.d.ts +2 -2
- package/dist/vef-select/hooks/use-data-options.js +1 -1
- package/dist/vef-select/hooks/use-field-names.js +1 -1
- package/dist/vef-select/hooks/{use-label-render.d.ts → use-render-label.d.ts} +3 -3
- package/dist/vef-select/hooks/{use-label-render.js → use-render-label.js} +2 -2
- package/dist/vef-select/hooks/use-render-option.d.ts +11 -0
- package/dist/vef-select/hooks/{use-option-render.js → use-render-option.js} +2 -2
- package/dist/vef-select/hooks/use-select-instance.js +1 -1
- package/dist/vef-select/index.js +2 -2
- package/dist/vef-select/props.d.ts +4 -3
- package/dist/vef-slider/hooks/use-slider-instance.js +1 -1
- package/dist/vef-slider/index.js +1 -1
- package/dist/vef-sortable-list/components/overlay-item.js +1 -1
- package/dist/vef-sortable-list/components/sortable-item.js +1 -1
- package/dist/vef-sortable-list/hooks/use-merged-items.d.ts +1 -1
- package/dist/vef-sortable-list/hooks/use-merged-items.js +1 -1
- package/dist/vef-sortable-list/index.d.ts +2 -2
- package/dist/vef-sortable-list/index.js +2 -2
- package/dist/vef-sortable-list/props.d.ts +3 -3
- package/dist/vef-space/index.js +1 -1
- package/dist/vef-spin/index.js +1 -1
- package/dist/vef-splitter/index.js +2 -2
- package/dist/vef-splitter/props.d.ts +3 -3
- package/dist/vef-splitter-panel/index.js +1 -1
- package/dist/vef-status/index.js +1 -1
- package/dist/vef-table/components/columns/bool.js +2 -2
- package/dist/vef-table/components/columns/code.js +1 -1
- package/dist/vef-table/components/columns/data-dictionary.js +2 -2
- package/dist/vef-table/components/columns/enum.js +2 -2
- package/dist/vef-table/components/columns/file.js +1 -1
- package/dist/vef-table/components/columns/icon.js +1 -1
- package/dist/vef-table/components/columns/id.js +1 -1
- package/dist/vef-table/components/columns/image.js +1 -1
- package/dist/vef-table/components/columns/index.js +1 -1
- package/dist/vef-table/components/columns/markdown.js +1 -1
- package/dist/vef-table/components/columns/number.js +1 -1
- package/dist/vef-table/components/columns/render.js +1 -1
- package/dist/vef-table/components/columns/rich-text.js +1 -1
- package/dist/vef-table/components/columns/text.js +1 -1
- package/dist/vef-table/components/columns-settings.js +2 -2
- package/dist/vef-table/components/operation-buttons.js +2 -2
- package/dist/vef-table/components/settings-icon.js +4 -4
- package/dist/vef-table/components/table-footer.js +1 -1
- package/dist/vef-table/helper.js +1 -1
- package/dist/vef-table/hooks/use-computed-batch-buttons.js +1 -1
- package/dist/vef-table/hooks/use-computed-columns.js +1 -1
- package/dist/vef-table/hooks/use-computed-values.js +1 -1
- package/dist/vef-table/hooks/use-data.d.ts +1 -1
- package/dist/vef-table/hooks/use-data.js +2 -2
- package/dist/vef-table/hooks/use-default-column-configs.js +1 -1
- package/dist/vef-table/hooks/use-display-value.js +1 -1
- package/dist/vef-table/hooks/use-helper-columns.d.ts +1 -1
- package/dist/vef-table/hooks/use-helper-columns.js +1 -1
- package/dist/vef-table/hooks/use-operation-column-width.d.ts +1 -1
- package/dist/vef-table/hooks/use-operation-column-width.js +1 -1
- package/dist/vef-table/hooks/use-pagination-props.js +1 -1
- package/dist/vef-table/hooks/use-row-props.js +2 -2
- package/dist/vef-table/hooks/use-row-selection-config.d.ts +3 -3
- package/dist/vef-table/hooks/use-row-selection-config.js +2 -2
- package/dist/vef-table/hooks/use-selected-rows.d.ts +10 -0
- package/dist/vef-table/hooks/use-selected-rows.js +3 -0
- package/dist/vef-table/hooks/use-table-columns.d.ts +1 -1
- package/dist/vef-table/hooks/use-table-columns.js +1 -1
- package/dist/vef-table/hooks/use-table-context.d.ts +1 -1
- package/dist/vef-table/hooks/use-table-context.js +1 -1
- package/dist/vef-table/hooks/use-table-instance.js +1 -1
- package/dist/vef-table/hooks/use-table-summary.d.ts +1 -1
- package/dist/vef-table/hooks/use-table-summary.js +1 -1
- package/dist/vef-table/hooks/use-table-width.js +1 -1
- package/dist/vef-table/index.d.ts +2 -2
- package/dist/vef-table/index.js +3 -3
- package/dist/vef-table/props.d.ts +15 -193
- package/dist/vef-table/store.d.ts +2 -2
- package/dist/vef-table/store.js +2 -2
- package/dist/vef-tabs/index.js +1 -1
- package/dist/vef-tag/index.js +1 -1
- package/dist/vef-temporal-picker/helper.js +1 -1
- package/dist/vef-temporal-picker/hooks/use-dayjs-value.d.ts +1 -1
- package/dist/vef-temporal-picker/hooks/use-dayjs-value.js +1 -1
- package/dist/vef-temporal-picker/hooks/use-temporal-limit.js +1 -1
- package/dist/vef-temporal-picker/hooks/use-temporal-picker-instance.js +1 -1
- package/dist/vef-temporal-picker/index.js +1 -1
- package/dist/vef-temporal-range-picker/helper.js +1 -1
- package/dist/vef-temporal-range-picker/hooks/use-dayjs-values.d.ts +1 -1
- package/dist/vef-temporal-range-picker/hooks/use-dayjs-values.js +1 -1
- package/dist/vef-temporal-range-picker/hooks/use-temporal-limit.js +1 -1
- package/dist/vef-temporal-range-picker/hooks/use-temporal-range-picker-instance.js +1 -1
- package/dist/vef-temporal-range-picker/index.js +1 -1
- package/dist/vef-temporal-range-picker/props.js +1 -1
- package/dist/vef-text/index.js +1 -1
- package/dist/vef-textarea/hooks/use-textarea-instance.js +1 -1
- package/dist/vef-textarea/index.js +1 -1
- package/dist/vef-title/index.js +2 -2
- package/dist/vef-tooltip/index.d.ts +1 -2
- package/dist/vef-tooltip/index.js +2 -2
- package/dist/vef-tooltip/props.d.ts +14 -1
- package/dist/vef-tree-select/hooks/use-change-handler.d.ts +1 -1
- package/dist/vef-tree-select/hooks/use-change-handler.js +1 -1
- package/dist/vef-tree-select/hooks/use-data-options.d.ts +1 -1
- package/dist/vef-tree-select/hooks/use-data-options.js +1 -1
- package/dist/vef-tree-select/hooks/use-tree-select-instance.js +1 -1
- package/dist/vef-tree-select/index.js +1 -1
- package/dist/vef-virtual-grid/index.d.ts +6 -0
- package/dist/vef-virtual-grid/index.js +14 -0
- package/dist/vef-virtual-grid/props.d.ts +83 -0
- package/dist/vef-virtual-list/index.d.ts +6 -0
- package/dist/vef-virtual-list/index.js +20 -0
- package/dist/vef-virtual-list/props.d.ts +111 -0
- package/package.json +19 -20
- package/dist/vef-config-provider/fonts/din/bold.woff2.js +0 -3
- package/dist/vef-config-provider/fonts/din/regular.woff2.js +0 -3
- package/dist/vef-select/hooks/use-option-render.d.ts +0 -11
- package/dist/vef-table/hooks/use-merged-value.d.ts +0 -10
- package/dist/vef-table/hooks/use-merged-value.js +0 -3
package/dist/vef-table/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
2
|
-
import{jsx as e}from"@emotion/react/jsx-runtime";import{css as o}from"@emotion/react";import{themeVariables as t,isEqual as n,isNumber as l}from"@vef-framework/shared";import{Table as i}from"antd";import{useMemo as
|
|
1
|
+
/*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
|
|
2
|
+
import{jsx as e}from"@emotion/react/jsx-runtime";import{css as o}from"@emotion/react";import{themeVariables as t,isEqual as n,isNumber as l}from"@vef-framework/shared";import{Table as i}from"antd";import{useMemo as r,useState as a,useDeferredValue as s,forwardRef as c,memo as m}from"react";import"../internal/index.js";import u from"./components/table-footer.js";import{useComputedBatchActionButtons as f}from"./hooks/use-computed-batch-buttons.js";import{useComputedColumns as d}from"./hooks/use-computed-columns.js";import{useData as p}from"./hooks/use-data.js";import{useDefaultColumnConfigs as h}from"./hooks/use-default-column-configs.js";import{useHelperColumns as b}from"./hooks/use-helper-columns.js";import{usePaginationProps as w}from"./hooks/use-pagination-props.js";import{useRowProps as g}from"./hooks/use-row-props.js";import{useRowSelectionConfig as C}from"./hooks/use-row-selection-config.js";import{useTableColumns as k}from"./hooks/use-table-columns.js";import{TableContextProvider as x}from"./hooks/use-table-context.js";import{useTableInstance as S}from"./hooks/use-table-instance.js";import{useTableSummary as y}from"./hooks/use-table-summary.js";import{useTableWidth as R}from"./hooks/use-table-width.js";import{convertBasicSizeToUiSize as j}from"../internal/utils.js";const v=o`
|
|
3
3
|
height: 100%;
|
|
4
4
|
|
|
5
5
|
> .vef-spin-nested-loading {
|
|
@@ -52,5 +52,5 @@ import{jsx as e}from"@emotion/react/jsx-runtime";import{css as o}from"@emotion/r
|
|
|
52
52
|
scrollbar-width: thin;
|
|
53
53
|
scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
|
|
54
54
|
}
|
|
55
|
-
`;const
|
|
55
|
+
`;const K=c((function({columns:o,defaultColumnConfigMap:t,rowNumberColumn:c,operationColumn:m,bordered:h=!1,size:b="medium",rowKey:K="id",height:N,virtual:M=!1,selectedKeys:A,defaultSelectedKeys:F,selectable:z=!1,multipleSelection:T,showSelectAllCheckbox:V,disabledSelection:O,enableRowClick:P,enableRowClickForSelection:D,rowBackgroundColor:L,batchActionButtons:$,selectionSummary:E,externalContext:H,onRowSelectionChange:X,onRowSelect:q,onRowDeselect:G,onRowClick:I,...J},Q){const{paginated:U=!1,...W}=J,{paginationProps:Y,paginationParams:Z}=w(U,b),{data:_,isFetching:ee,isLoading:oe,total:te,refetch:ne}=p(W,U,Z),le=r((()=>({...Y,total:te})),[Y,te]),[ie,re]=a((()=>new Map(t))),ae=s(ie),se=d(o,ae),{rowSelectionConfig:ce,handleRowClickSelection:me,selectedKeys:ue,selectedRecords:fe}=C({selectedKeys:A,defaultSelectedKeys:F,selectable:z,multipleSelection:T,disabledSelection:O,enableRowClick:P,enableRowClickForSelection:D,onRowSelect:q,onRowDeselect:G,onRowSelectionChange:X,rowKey:K}),de=g({enableRowClick:P,enableRowClickForSelection:D,onRowClick:I,disabledSelection:O,handleRowClickSelection:me}),pe=r((()=>({externalContext:H,isFetching:ee,refetch:ne,selectedKeys:ue,selectedRecords:fe.current,defaultColumnConfigMap:t,columnConfigMap:ie,setColumnConfigMap:re,columnConfigMapHasChanged:!n(t,ie)})),[H,ee,ne,ue,fe,t,ie]),he=k(se,c,m),be=R(he,z),we=r((()=>({x:be,y:"auto"===N?"auto":N,scrollToFirstRowOnChange:!0})),[N,be]),ge=S(Q,_??[],ne),Ce=y(se),{computedBatchActionButtons:ke,batchActionButtonContext:xe}=f($??[],pe),Se=r((()=>{if(oe||0===_?.length||!U&&!1===E&&0===ke.length)return;const o=e(u,{batchActionButtonContext:xe,batchActionButtons:ke,paginationProps:le,selectionSummary:E,size:b});return()=>o}),[xe,ke,_?.length,oe,le,U,E,b]);return e(x,{value:pe,children:e(i,{ref:ge,bordered:h,columns:he,css:"auto"===N?v:B,dataSource:_,footer:Se,loading:ee,pagination:!1,rowKey:K,rowSelection:ce,scroll:we,size:j(b),summary:Ce,tableLayout:"fixed",virtual:l(N)&&N>0&&M,onRow:de})})}));K.displayName="VefTableBase";const N=m(c((function({schema:o,showRowNumber:t,operationButtons:n,maxVisibleOperationButtons:l,...i},a){const{size:s}=i,c=r((()=>o.filter((e=>e.show??!0)).map((e=>({...e,dependentColumnNames:[...new Set([e.name,...e.dependentColumnNames??[]])]})))),[o]);if(0===c.length)throw new Error("The showed columns of VefTable component cannot be empty");const m=h(c),{rowNumberColumn:u,operationColumn:f}=b({showRowNumber:t,operationButtons:n,maxVisibleOperationButtons:l,size:s});return e(K,{ref:a,columns:c,defaultColumnConfigMap:m,operationColumn:f,rowNumberColumn:u,...i})})),n);N.displayName="VefTable";export{N as default};
|
|
56
56
|
/*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
|
|
@@ -22,7 +22,7 @@ export type OnChangeHandler<T extends ObjectType> = NonNullable<TableProps<T>["o
|
|
|
22
22
|
/**
|
|
23
23
|
* The props of VefTable component.
|
|
24
24
|
*/
|
|
25
|
-
export type VefTableProps<T extends ObjectType = ObjectValue, P extends ObjectType = EmptyObject, R = T, C extends ObjectType = EmptyObject> =
|
|
25
|
+
export type VefTableProps<T extends ObjectType = ObjectValue, P extends ObjectType = EmptyObject, R = T, C extends ObjectType = EmptyObject> = VefDefaultTableProps<T, P, R, C> | VefPaginatedTableProps<T, P, R, C>;
|
|
26
26
|
/**
|
|
27
27
|
* The base props of VefTable component.
|
|
28
28
|
*/
|
|
@@ -105,119 +105,40 @@ interface VefBaseTableProps<T extends ObjectType = ObjectValue, C extends Object
|
|
|
105
105
|
* The external context of the table.
|
|
106
106
|
*/
|
|
107
107
|
externalContext?: C;
|
|
108
|
-
/**
|
|
109
|
-
* The callback function when the row is clicked.
|
|
110
|
-
* Only works when `enableRowClick` is true and `enableRowClickForSelection` is false.
|
|
111
|
-
*/
|
|
112
|
-
onRowClick?: BiConsumer<T, number>;
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* The props of VefTable component without pagination.
|
|
116
|
-
*/
|
|
117
|
-
interface VefDefaultTableProps<T extends ObjectType = ObjectValue, P extends ObjectType = EmptyObject, R = T, C extends ObjectType = EmptyObject> extends VefBaseTableProps<T, C>, QueryConfig<T[], P, R[]> {
|
|
118
|
-
/**
|
|
119
|
-
* Whether to allow pagination.
|
|
120
|
-
*/
|
|
121
|
-
paginated?: false;
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* The props of VefTable component without pagination and no selection.
|
|
125
|
-
*/
|
|
126
|
-
interface VefNoSelectionDefaultTableProps<T extends ObjectType = ObjectValue, P extends ObjectType = EmptyObject, R = T, C extends ObjectType = EmptyObject> extends VefDefaultTableProps<T, P, R, C> {
|
|
127
108
|
/**
|
|
128
109
|
* The value of the table.
|
|
129
110
|
*/
|
|
130
|
-
|
|
111
|
+
selectedKeys?: IdValue[];
|
|
131
112
|
/**
|
|
132
|
-
* The default
|
|
113
|
+
* The default selected keys of the table.
|
|
133
114
|
*/
|
|
134
|
-
|
|
115
|
+
defaultSelectedKeys?: IdValue[];
|
|
135
116
|
/**
|
|
136
|
-
*
|
|
117
|
+
* The callback function when the selected keys is changed.
|
|
137
118
|
*/
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* Whether to allow multiple selection.
|
|
141
|
-
*/
|
|
142
|
-
multipleSelection?: never;
|
|
143
|
-
/**
|
|
144
|
-
* The callback function when the value is changed.
|
|
145
|
-
*/
|
|
146
|
-
onChange?: never;
|
|
119
|
+
onRowSelectionChange?: BiConsumer<IdValue[], T[]>;
|
|
147
120
|
/**
|
|
148
121
|
* The callback function when the row is selected.
|
|
149
122
|
*/
|
|
150
|
-
|
|
123
|
+
onRowSelect?: BiConsumer<IdValue, T>;
|
|
151
124
|
/**
|
|
152
125
|
* The callback function when the row is deselected.
|
|
153
126
|
*/
|
|
154
|
-
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* The props of VefTable component without pagination and single selection.
|
|
158
|
-
*/
|
|
159
|
-
interface VefSingleSelectionDefaultTableProps<T extends ObjectType = ObjectValue, P extends ObjectType = EmptyObject, R = T, C extends ObjectType = EmptyObject> extends VefDefaultTableProps<T, P, R, C> {
|
|
160
|
-
/**
|
|
161
|
-
* The value of the table.
|
|
162
|
-
*/
|
|
163
|
-
value?: IdValue;
|
|
164
|
-
/**
|
|
165
|
-
* The default value of the table.
|
|
166
|
-
*/
|
|
167
|
-
defaultValue?: IdValue;
|
|
168
|
-
/**
|
|
169
|
-
* Whether to allow selection.
|
|
170
|
-
*/
|
|
171
|
-
selectable: true;
|
|
127
|
+
onRowDeselect?: BiConsumer<IdValue, T>;
|
|
172
128
|
/**
|
|
173
|
-
*
|
|
174
|
-
|
|
175
|
-
multipleSelection?: false;
|
|
176
|
-
/**
|
|
177
|
-
* The callback function when the value is changed.
|
|
178
|
-
*/
|
|
179
|
-
onChange?: BiConsumer<IdValue, T>;
|
|
180
|
-
/**
|
|
181
|
-
* The callback function when the row is selected.
|
|
182
|
-
*/
|
|
183
|
-
onSelect?: never;
|
|
184
|
-
/**
|
|
185
|
-
* The callback function when the row is deselected.
|
|
129
|
+
* The callback function when the row is clicked.
|
|
130
|
+
* Only works when `enableRowClick` is true and `enableRowClickForSelection` is false.
|
|
186
131
|
*/
|
|
187
|
-
|
|
132
|
+
onRowClick?: BiConsumer<T, number>;
|
|
188
133
|
}
|
|
189
134
|
/**
|
|
190
|
-
* The props of VefTable component without pagination
|
|
135
|
+
* The props of VefTable component without pagination.
|
|
191
136
|
*/
|
|
192
|
-
interface
|
|
193
|
-
/**
|
|
194
|
-
* The value of the table.
|
|
195
|
-
*/
|
|
196
|
-
value?: IdValue[];
|
|
197
|
-
/**
|
|
198
|
-
* The default value of the table.
|
|
199
|
-
*/
|
|
200
|
-
defaultValue?: IdValue[];
|
|
201
|
-
/**
|
|
202
|
-
* Whether to allow selection.
|
|
203
|
-
*/
|
|
204
|
-
selectable: true;
|
|
205
|
-
/**
|
|
206
|
-
* Whether to allow multiple selection.
|
|
207
|
-
*/
|
|
208
|
-
multipleSelection: true;
|
|
209
|
-
/**
|
|
210
|
-
* The callback function when the value is changed.
|
|
211
|
-
*/
|
|
212
|
-
onChange?: BiConsumer<IdValue[], T[]>;
|
|
213
|
-
/**
|
|
214
|
-
* The callback function when the row is selected.
|
|
215
|
-
*/
|
|
216
|
-
onSelect?: BiConsumer<IdValue, T>;
|
|
137
|
+
interface VefDefaultTableProps<T extends ObjectType = ObjectValue, P extends ObjectType = EmptyObject, R = T, C extends ObjectType = EmptyObject> extends VefBaseTableProps<T, C>, QueryConfig<T[], P, R[]> {
|
|
217
138
|
/**
|
|
218
|
-
*
|
|
139
|
+
* Whether to allow pagination.
|
|
219
140
|
*/
|
|
220
|
-
|
|
141
|
+
paginated?: false;
|
|
221
142
|
}
|
|
222
143
|
/**
|
|
223
144
|
* The props of VefTable component with pagination.
|
|
@@ -228,103 +149,4 @@ interface VefPaginatedTableProps<T extends ObjectType = ObjectValue, P extends O
|
|
|
228
149
|
*/
|
|
229
150
|
paginated: true;
|
|
230
151
|
}
|
|
231
|
-
/**
|
|
232
|
-
* The props of VefTable component with pagination and no selection.
|
|
233
|
-
*/
|
|
234
|
-
interface VefNoSelectionPaginatedTableProps<T extends ObjectType = ObjectValue, P extends ObjectType = EmptyObject, R = T, C extends ObjectType = EmptyObject> extends VefPaginatedTableProps<T, P, R, C> {
|
|
235
|
-
/**
|
|
236
|
-
* The value of the table.
|
|
237
|
-
*/
|
|
238
|
-
value?: never;
|
|
239
|
-
/**
|
|
240
|
-
* The default value of the table.
|
|
241
|
-
*/
|
|
242
|
-
defaultValue?: never;
|
|
243
|
-
/**
|
|
244
|
-
* Whether to allow selection.
|
|
245
|
-
*/
|
|
246
|
-
selectable?: false;
|
|
247
|
-
/**
|
|
248
|
-
* Whether to allow multiple selection.
|
|
249
|
-
*/
|
|
250
|
-
multipleSelection?: never;
|
|
251
|
-
/**
|
|
252
|
-
* The callback function when the value is changed.
|
|
253
|
-
*/
|
|
254
|
-
onChange?: never;
|
|
255
|
-
/**
|
|
256
|
-
* The callback function when the row is selected.
|
|
257
|
-
*/
|
|
258
|
-
onSelect?: never;
|
|
259
|
-
/**
|
|
260
|
-
* The callback function when the row is deselected.
|
|
261
|
-
*/
|
|
262
|
-
onDeselect?: never;
|
|
263
|
-
}
|
|
264
|
-
/**
|
|
265
|
-
* The props of VefTable component with pagination and single selection.
|
|
266
|
-
*/
|
|
267
|
-
interface VefSingleSelectionPaginatedTableProps<T extends ObjectType = ObjectValue, P extends ObjectType = EmptyObject, R = T, C extends ObjectType = EmptyObject> extends VefPaginatedTableProps<T, P, R, C> {
|
|
268
|
-
/**
|
|
269
|
-
* The value of the table.
|
|
270
|
-
*/
|
|
271
|
-
value?: IdValue;
|
|
272
|
-
/**
|
|
273
|
-
* The default value of the table.
|
|
274
|
-
*/
|
|
275
|
-
defaultValue?: IdValue;
|
|
276
|
-
/**
|
|
277
|
-
* Whether to allow selection.
|
|
278
|
-
*/
|
|
279
|
-
selectable: true;
|
|
280
|
-
/**
|
|
281
|
-
* Whether to allow multiple selection.
|
|
282
|
-
*/
|
|
283
|
-
multipleSelection?: false;
|
|
284
|
-
/**
|
|
285
|
-
* The callback function when the value is changed.
|
|
286
|
-
*/
|
|
287
|
-
onChange?: BiConsumer<IdValue, T>;
|
|
288
|
-
/**
|
|
289
|
-
* The callback function when the row is selected.
|
|
290
|
-
*/
|
|
291
|
-
onSelect?: never;
|
|
292
|
-
/**
|
|
293
|
-
* The callback function when the row is deselected.
|
|
294
|
-
*/
|
|
295
|
-
onDeselect?: never;
|
|
296
|
-
}
|
|
297
|
-
/**
|
|
298
|
-
* The props of VefTable component with pagination and multiple selection.
|
|
299
|
-
*/
|
|
300
|
-
interface VefMultipleSelectionPaginatedTableProps<T extends ObjectType = ObjectValue, P extends ObjectType = EmptyObject, R = T, C extends ObjectType = EmptyObject> extends VefPaginatedTableProps<T, P, R, C> {
|
|
301
|
-
/**
|
|
302
|
-
* The value of the table.
|
|
303
|
-
*/
|
|
304
|
-
value?: IdValue[];
|
|
305
|
-
/**
|
|
306
|
-
* The default value of the table.
|
|
307
|
-
*/
|
|
308
|
-
defaultValue?: IdValue[];
|
|
309
|
-
/**
|
|
310
|
-
* Whether to allow selection.
|
|
311
|
-
*/
|
|
312
|
-
selectable: true;
|
|
313
|
-
/**
|
|
314
|
-
* Whether to allow multiple selection.
|
|
315
|
-
*/
|
|
316
|
-
multipleSelection: true;
|
|
317
|
-
/**
|
|
318
|
-
* The callback function when the value is changed.
|
|
319
|
-
*/
|
|
320
|
-
onChange?: BiConsumer<IdValue[], T[]>;
|
|
321
|
-
/**
|
|
322
|
-
* The callback function when the row is selected.
|
|
323
|
-
*/
|
|
324
|
-
onSelect?: BiConsumer<IdValue, T>;
|
|
325
|
-
/**
|
|
326
|
-
* The callback function when the row is deselected.
|
|
327
|
-
*/
|
|
328
|
-
onDeselect?: BiConsumer<IdValue, T>;
|
|
329
|
-
}
|
|
330
152
|
export {};
|
|
@@ -17,5 +17,5 @@ export interface TableState {
|
|
|
17
17
|
*/
|
|
18
18
|
columnConfigMap: Map<string, TableColumnConfig>;
|
|
19
19
|
}
|
|
20
|
-
declare const
|
|
21
|
-
export {
|
|
20
|
+
declare const TableStoreProvider: import("react").FC<import("@vef-framework/shared").StoreProviderProps<Pick<TableState, "size">>>, useTableStore: <T>(selector: import("@vef-framework/shared").Mapper<TableState, T>) => T, useTableStoreApi: () => import("zustand").StoreApi<TableState>;
|
|
21
|
+
export { TableStoreProvider, useTableStore, useTableStoreApi, };
|
package/dist/vef-table/store.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
2
|
-
import{
|
|
1
|
+
/*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
|
|
2
|
+
import{createComponentStore as e}from"@vef-framework/shared";import{createStore as r}from"zustand";const{StoreProvider:o,useStore:t,useStoreApi:n}=e("table",(function(e){return r((r=>({changeSize:e=>r({size:e}),columnConfigMap:new Map,...e})))}));export{o as TableStoreProvider,t as useTableStore,n as useTableStoreApi};
|
|
3
3
|
/*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
|
package/dist/vef-tabs/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
|
|
2
2
|
import{jsx as t}from"@emotion/react/jsx-runtime";import{Tabs as i}from"antd";import"../internal/index.js";import{convertBasicSizeToUiSize as r}from"../internal/utils.js";const e={inkBar:!0,tabPane:!0},n=({size:n,...a})=>t(i,{animated:e,size:r(n),...a});export{n as VefTabs,n as default};
|
|
3
3
|
/*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
|
package/dist/vef-tag/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
|
|
2
2
|
import{jsx as o}from"@emotion/react/jsx-runtime";import{Tag as r}from"antd";import{useMemo as e}from"react";const t=({closable:t=!1,color:n,inverse:c=!1,...i})=>{const l=e((()=>c?`${n}-inverse`:n),[n,c]);return o(r,{closeIcon:t?null:void 0,color:l,...i})};export{t as default};
|
|
3
3
|
/*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
|
|
2
2
|
const Y=["YYYY"],M=["YYYY-Q季度"],m=["YYYY-MM","YYYY/MM","YYYY.MM","YYYYMM"],D=["YYYY-wo"],H=["YYYY-MM-DD","YYYY/MM/DD","YYYY.MM.DD","YYYYMMDD","YY/MM/DD","YY.MM.DD","YYMMDD"],s=["HH:mm:ss","HH.mm.ss","HHmmss"],e=["HH"],t=["HH:mm","HH.mm","HHmm"],r=["YYYY-MM-DD HH:mm:ss","YYYY/MM/DD HH:mm:ss","YYYY.MM.DD HH.mm.ss","YYYYMMDDHHmmss","YY/MM/DD HH:mm:ss","YY.MM.DD HH:mm:ss","YY.MM.DD HH.mm.ss","YYMMDDHHmmss"];function n(n){return"year"===n?Y:"quarter"===n?M:"month"===n?m:"week"===n?D:"datetime"===n?r:"date"===n?H:"time"===n?s:"hour"===n?e:"minute"===n?t:[]}export{n as getTemporalFormats};
|
|
3
3
|
/*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
|
|
2
2
|
import{isNullish as r,isArray as o}from"@vef-framework/shared";import m from"dayjs";import{useMemo as t}from"react";function e(e,f){return t((()=>r(e)?e:o(e)?e.map((r=>m(r,f))):m(e,f)),[e,f])}export{e as useDayjsValue};
|
|
3
3
|
/*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
|
|
2
2
|
import{isFunction as e}from"@vef-framework/shared";import a from"dayjs";import{useMemo as t}from"react";function r({maxDate:r,minDate:i,disabledDate:o,disabledTime:m}){const[d,f]=t((()=>[i?a(i):void 0,r?a(r):void 0]),[i,r]);return{minDateValue:d,maxDateValue:f,disabledTimeValue:t((()=>{if(e(m))return e=>m(e.toDate())}),[m]),disabledDateValue:t((()=>{if(e(o))return(e,{from:a})=>o(e.toDate(),a?.toDate())}),[o])}}export{r as useTemporalLimit};
|
|
3
3
|
/*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
|
|
2
2
|
import{useRef as r,useImperativeHandle as t}from"react";function u(u){const c=r(null);return t(u,(()=>({blur:()=>{c.current?.blur()},focus:()=>{c.current?.focus({preventScroll:!0})}}))),c}export{u as useTemporalPickerInstance};
|
|
3
3
|
/*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
|
|
2
2
|
import{jsx as e}from"@emotion/react/jsx-runtime";import{isFunction as a,isArray as t}from"@vef-framework/shared";import{TimePicker as i,DatePicker as l}from"antd";import{useMemo as o,memo as m,forwardRef as r}from"react";import"../internal/index.js";import{getTemporalFormats as u}from"./helper.js";import{useDayjsValue as n}from"./hooks/use-dayjs-value.js";import{useTemporalLimit as s}from"./hooks/use-temporal-limit.js";import{useTemporalPickerInstance as d}from"./hooks/use-temporal-picker-instance.js";import{convertBasicSizeToUiSize as p}from"../internal/utils.js";const f=m(r((function({defaultValue:m,value:r,clearable:f,size:D,mode:h="date",multiple:c=!1,minDate:b,maxDate:V,disabledTime:j,disabledDate:k,hourStep:x,minuteStep:S,secondStep:v,onChange:C,...w},T){const g=u(h),z=n(r,g),y=n(m,g),{minDateValue:N,maxDateValue:P,disabledTimeValue:q,disabledDateValue:A}=s({maxDate:V,minDate:b,disabledTime:j,disabledDate:k}),B=d(T),E=o((()=>{if(a(C))return(e,a)=>{if(!e)return void C(null,null);const i=t(e)?e.map((e=>e.toDate())):e.toDate();C(a,i)}}),[C]);return"time"===h||"hour"===h||"minute"===h?e(i,{ref:B,allowClear:f,defaultValue:y,disabledTime:q,format:g,hourStep:x,minuteStep:S,multiple:c,secondStep:v,showNow:"hour"!==h,size:p(D),value:z,onChange:E,...w}):e(l,"datetime"===h?{ref:B,allowClear:f,defaultValue:y,disabledDate:A,disabledTime:q,format:g,hourStep:x,maxDate:P,minDate:N,minuteStep:S,multiple:c,picker:"date",size:p(D),value:z,onChange:E,...w}:{ref:B,allowClear:f,defaultValue:y,disabledDate:A,format:g,maxDate:P,minDate:N,multiple:c,picker:h,size:p(D),value:z,onChange:E,...w})})));f.displayName="VefTemporalPicker";export{f as default};
|
|
3
3
|
/*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
|
|
2
2
|
const Y=["YYYY"],M=["YYYY-Q季度"],m=["YYYY-MM","YYYY/MM","YYYY.MM","YYYYMM"],D=["YYYY-wo"],H=["YYYY-MM-DD","YYYY/MM/DD","YYYY.MM.DD","YYYYMMDD","YY/MM/DD","YY.MM.DD","YYMMDD"],s=["HH:mm:ss","HH.mm.ss","HHmmss"],e=["HH"],t=["HH:mm","HH.mm","HHmm"],r=["YYYY-MM-DD HH:mm:ss","YYYY/MM/DD HH:mm:ss","YYYY.MM.DD HH.mm.ss","YYYYMMDDHHmmss","YY/MM/DD HH:mm:ss","YY.MM.DD HH:mm:ss","YY.MM.DD HH.mm.ss","YYMMDDHHmmss"];function n(n){return"year"===n?Y:"quarter"===n?M:"month"===n?m:"week"===n?D:"datetime"===n?r:"date"===n?H:"time"===n?s:"hour"===n?e:"minute"===n?t:[]}export{n as getTemporalFormats};
|
|
3
3
|
/*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
|
|
2
2
|
import{isNullish as r,isArray as o}from"@vef-framework/shared";import t from"dayjs";import{useMemo as m}from"react";import{stringFormatSeparator as e}from"../props.js";function f(f,p){return m((()=>{if(r(f))return f;if(o(f))return f.map((r=>t(r,p)));const[m,i]=f.split(e);return[t(m,p),t(i,p)]}),[f,p])}export{f as useDayjsValues};
|
|
3
3
|
/*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
|
|
2
2
|
import{isFunction as e}from"@vef-framework/shared";import a from"dayjs";import{useMemo as t}from"react";function r({maxDate:r,minDate:i,disabledDate:o,disabledTime:m}){const[d,f]=t((()=>[i?a(i):void 0,r?a(r):void 0]),[i,r]);return{minDateValue:d,maxDateValue:f,disabledTimeValue:t((()=>{if(e(m))return e=>m(e.toDate())}),[m]),disabledDateValue:t((()=>{if(e(o))return(e,{from:a})=>o(e.toDate(),a?.toDate())}),[o])}}export{r as useTemporalLimit};
|
|
3
3
|
/*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
|
|
2
2
|
import{useRef as r,useImperativeHandle as t}from"react";function u(u){const c=r(null);return t(u,(()=>({blur:()=>{c.current?.blur()},focus:()=>{c.current?.focus({preventScroll:!0})}}))),c}export{u as useTemporalRangePickerInstance};
|
|
3
3
|
/*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
|
|
2
2
|
import{jsx as e}from"@emotion/react/jsx-runtime";import{isFunction as a}from"@vef-framework/shared";import{TimePicker as t,DatePicker as i}from"antd";import{useMemo as r,memo as o,forwardRef as m}from"react";import"../internal/index.js";import{getTemporalFormats as l}from"./helper.js";import{useDayjsValues as n}from"./hooks/use-dayjs-values.js";import{useTemporalLimit as s}from"./hooks/use-temporal-limit.js";import{useTemporalRangePickerInstance as d}from"./hooks/use-temporal-range-picker-instance.js";import{stringFormatSeparator as u}from"./props.js";import{convertBasicSizeToUiSize as p}from"../internal/utils.js";const f=o(m((function({defaultValue:o,value:m,clearable:f,mode:c="date",size:D,useStringFormat:h=!1,maxDate:b,minDate:j,disabledTime:k,disabledDate:S,hourStep:g,minuteStep:V,secondStep:x,onChange:v,...C},T){const w=l(c),z=n(m,w),P=n(m,w),{minDateValue:R,maxDateValue:y,disabledTimeValue:F,disabledDateValue:N}=s({maxDate:b,minDate:j,disabledTime:k,disabledDate:S}),q=d(T),A=r((()=>{if(a(v))return(e,a)=>{if(!e)return void v(null,null);const t=[e[0].toDate(),e[1].toDate()];v(h?a.join(u):a,t)}}),[v,h]);return"time"===c||"hour"===c||"minute"===c?e(t.RangePicker,{ref:q,allowClear:f,defaultValue:P,disabledTime:F,format:w,hourStep:g,minuteStep:V,secondStep:x,size:p(D),value:z,onChange:A,...C}):e(i.RangePicker,"datetime"===c?{ref:q,showTime:!0,allowClear:f,defaultValue:P,disabledDate:N,disabledTime:F,format:w,hourStep:g,maxDate:y,minDate:R,minuteStep:V,picker:"date",secondStep:x,size:p(D),value:z,onChange:A,...C}:{ref:q,allowClear:f,defaultValue:P,disabledDate:N,format:w,maxDate:y,minDate:R,picker:c,size:p(D),value:z,onChange:A,...C})})));f.displayName="VefTemporalRangePicker";export{f as default};
|
|
3
3
|
/*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
|
|
2
2
|
const o="_";export{o as stringFormatSeparator};
|
|
3
3
|
/*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
|
package/dist/vef-text/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
|
|
2
2
|
import{jsx as e}from"@emotion/react/jsx-runtime";import{useColorTokens as o}from"@vef-framework/hooks";import{Typography as t}from"antd";import{useMemo as r}from"react";const{Text:i}=t,l=({variant:t,color:l,bold:n,ellipsis:s,ellipsisTip:p,ellipsisTipPlacement:c,copyable:a,copiedText:m,onCopy:d,...f})=>{const u=r((()=>{if(s)return{tooltip:p??f.children,placement:c}}),[s,p,c,f.children]),y=o(),h=r((()=>{const e={};return"shortcut"===t?e.keyboard=!0:"strikethrough"===t?e.delete=!0:t&&(e[t]=!0),"secondary"===l?e.type="secondary":l&&(e.css={color:y.get(l)}),n&&(e.strong=!0),e}),[n,l,y,t]),x=r((()=>{if(a)return{format:"text/plain",text:m,onCopy:d}}),[a,m,d]);return e(i,{copyable:x,ellipsis:u,...h,...f})};export{l as default};
|
|
3
3
|
/*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
|
|
2
2
|
import{useRef as r,useImperativeHandle as t}from"react";function u(u){const c=r(null);return t(u,(()=>({blur:()=>c.current?.blur(),focus:()=>c.current?.focus({preventScroll:!0})}))),c}export{u as useTextareaInstance};
|
|
3
3
|
/*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
|
|
2
2
|
import{jsx as e}from"@emotion/react/jsx-runtime";import{isFunction as o}from"@vef-framework/shared";import{Input as r}from"antd";import{forwardRef as t,useMemo as a}from"react";import"../internal/index.js";import{useTextareaInstance as n}from"./hooks/use-textarea-instance.js";import{convertBasicSizeToUiSize as u}from"../internal/utils.js";const{TextArea:l}=r;function s(e){return""===e?null:e}const i=t((({defaultValue:r,value:t,size:i,clearable:m,showCount:f,onChange:v,onEnterKeyPress:c,onBlur:d,onFocus:p,...g},h)=>{const x=a((()=>({onChange:o(v)?e=>v(s(e.target.value)):void 0,onPressEnter:o(c)?e=>c(s(e.target.value)):void 0,onBlur:o(d)?e=>d(s(e.target.value)):void 0,onFocus:o(p)?e=>p(s(e.target.value)):void 0})),[v,c,d,p]),C=n(h);return e(l,{ref:C,allowClear:m,defaultValue:r,showCount:f,size:u(i),value:t,...g,...x})}));export{i as default};
|
|
3
3
|
/*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
|
package/dist/vef-title/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
|
|
2
2
|
import{jsxs as e,Fragment as r,jsx as t}from"@emotion/react/jsx-runtime";import{css as o}from"@emotion/react";import{useColorTokens as i}from"@vef-framework/hooks";import{themeVariables as n}from"@vef-framework/shared";import{Typography as a}from"antd";import{useMemo as l}from"react";import s from"../vef-divider/index.js";const{Title:m}=a,f=o`
|
|
3
3
|
margin: ${n.marginSm} 0 ${n.marginLg};
|
|
4
4
|
`,p=o`
|
|
@@ -11,5 +11,5 @@ import{jsxs as e,Fragment as r,jsx as t}from"@emotion/react/jsx-runtime";import{
|
|
|
11
11
|
background: linear-gradient(to top, ${n.colorPrimary}, ${n.blue5});
|
|
12
12
|
margin-right: ${n.paddingSm};
|
|
13
13
|
}
|
|
14
|
-
`,c=({showLeftBar:o,showBottomLine:n,noPaddingBottom:a,variant:c,color:d,ellipsis:h,ellipsisTip:g,...v})=>{const{level:u}=v,y=l((()=>{if(h)return{tooltip:g??v.children}}),[h,g,v.children]),b=i(),$=l((()=>{const e={};if("secondary"===d)e.type="secondary";else{const r=[];d&&r.push({color:b.get(d)}),o&&r.push(p),e.css=r}return c&&(e[c]=!0),o&&(e.style={"--vef-title-left-bar-height":`calc(var(--vef-font-size-heading-${u}) * 0.8)`}),a&&(e.style={...e.style,"--vef-typography-title-margin-bottom":0}),e}),[d,c,o,b,u,a]);return e(r,{children:[t(m,{ellipsis:y,...$,...v}),n&&t(s,{css:f})]})};export{c as default};
|
|
14
|
+
`,c=({showLeftBar:o,showBottomLine:n,noPaddingBottom:a,variant:c,color:d,ellipsis:h,ellipsisTip:g,...v})=>{const{level:u=1}=v,y=l((()=>{if(h)return{tooltip:g??v.children}}),[h,g,v.children]),b=i(),$=l((()=>{const e={};if("secondary"===d)e.type="secondary";else{const r=[];d&&r.push({color:b.get(d)}),o&&r.push(p),e.css=r}return c&&(e[c]=!0),o&&(e.style={"--vef-title-left-bar-height":`calc(var(--vef-font-size-heading-${u}) * 0.8)`}),a&&(e.style={...e.style,"--vef-typography-title-margin-bottom":0}),e}),[d,c,o,b,u,a]);return e(r,{children:[t(m,{ellipsis:y,...$,...v}),n&&t(s,{css:f})]})};export{c as default};
|
|
15
15
|
/*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { MaybeUndefined } from "@vef-framework/shared";
|
|
2
1
|
import type { VefTooltipProps } from "./props";
|
|
3
|
-
declare const VefTooltip: import("react").ForwardRefExoticComponent<VefTooltipProps & import("react").RefAttributes<
|
|
2
|
+
declare const VefTooltip: import("react").ForwardRefExoticComponent<VefTooltipProps & import("react").RefAttributes<HTMLElement>>;
|
|
4
3
|
export type { VefTooltipProps };
|
|
5
4
|
export default VefTooltip;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
2
|
-
import{jsx as
|
|
1
|
+
/*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
|
|
2
|
+
import{jsx as e}from"@emotion/react/jsx-runtime";import{Tooltip as r}from"antd";import{forwardRef as t,useRef as n,useImperativeHandle as o}from"react";const a=t((({content:t,trigger:a="hover",arrow:m=!0,delay:p=.1,defaultOpened:i,opened:l,onOpenedChange:d,...u},f)=>{const c=n(null);return o(f,(()=>c.current.nativeElement)),e(r,{ref:c,arrow:m,defaultOpen:i,mouseEnterDelay:p,open:l,title:t,trigger:a,onOpenChange:d,...u})}));export{a as default};
|
|
3
3
|
/*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Consumer } from "@vef-framework/shared";
|
|
1
2
|
import type { TooltipProps } from "antd";
|
|
2
3
|
import type { ReactNode } from "react";
|
|
3
4
|
/**
|
|
@@ -7,7 +8,7 @@ export type TooltipTrigger = "hover" | "click" | "focus";
|
|
|
7
8
|
/**
|
|
8
9
|
* The props of the VefTooltip component.
|
|
9
10
|
*/
|
|
10
|
-
export interface VefTooltipProps extends Pick<TooltipProps, "placement" | "
|
|
11
|
+
export interface VefTooltipProps extends Pick<TooltipProps, "placement" | "children"> {
|
|
11
12
|
/**
|
|
12
13
|
* The content of the tooltip.
|
|
13
14
|
*/
|
|
@@ -27,4 +28,16 @@ export interface VefTooltipProps extends Pick<TooltipProps, "placement" | "open"
|
|
|
27
28
|
* @default 0.1
|
|
28
29
|
*/
|
|
29
30
|
delay?: number;
|
|
31
|
+
/**
|
|
32
|
+
* The default opened state of the tooltip.
|
|
33
|
+
*/
|
|
34
|
+
defaultOpened?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Whether the tooltip is opened.
|
|
37
|
+
*/
|
|
38
|
+
opened?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* The callback function when the tooltip is opened.
|
|
41
|
+
*/
|
|
42
|
+
onOpenedChange?: Consumer<boolean>;
|
|
30
43
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type DataOption, type IdValue, type MaybeArray, type MaybeNull, type NormalizedDataOption } from "@vef-framework/shared";
|
|
2
2
|
import type { VefTreeSelectProps } from "../props";
|
|
3
3
|
/**
|
|
4
4
|
* The change handler of the tree select.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
|
|
2
2
|
import{isFunction as e,isArray as r}from"@vef-framework/shared";import{useMemo as t}from"react";function n(n,o){const u=t((()=>o.reduce(((e,r)=>(e.set(r.value,r),e)),new Map)),[o]);return t((()=>{if(e(n))return e=>{e?r(e)?n(e,e.map((e=>u.get(e)))):n(e,u.get(e)):n(null,null)}}),[n,u])}export{n as useChangeHandler};
|
|
3
3
|
/*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type DataOption, type EmptyObject, type Except, type ObjectType, type PureDataOption } from "@vef-framework/shared";
|
|
2
2
|
import type { VefTreeSelectProps } from "../props";
|
|
3
3
|
/**
|
|
4
4
|
* The hook to use data options.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
|
|
2
2
|
import{useComputedOptions as o}from"@vef-framework/hooks";import{isArray as a,isFunction as e,isNullish as i}from"@vef-framework/shared";import{useLayoutEffect as n}from"react";function r({value:r,multiple:t=!1,onChange:l,...s}){const{onFilterKeywordChange:p,normalizedOptions:d,defaultOption:f,isLoading:m,fallbackOptions:c,isFallbackOptionsLoading:u}=o({...s,selectedOptionValues:a(r)?r:r?[r]:[]});return n((()=>{f&&e(l)&&i(r)&&l(t?[f.value]:f.value,t?[f]:f)}),[f,t,l,r]),{onFilterKeywordChange:p,normalizedOptions:d,isLoading:m,fallbackOptions:c,isFallbackOptionsLoading:u}}export{r as useDataOptions};
|
|
3
3
|
/*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
|
|
2
2
|
import{useRef as r,useImperativeHandle as t}from"react";function n(n,o){const u=r(null);return t(n,(()=>({blur:()=>{u.current?.blur()},focus:()=>{u.current?.focus({preventScroll:!0})},getDataOptions:()=>o}))),u}export{n as useTreeSelectInstance};
|
|
3
3
|
/*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
|
|
2
2
|
import{jsx as e}from"@emotion/react/jsx-runtime";import{useOptionFilter as o}from"@vef-framework/hooks";import{styles as r}from"@vef-framework/shared";import{TreeSelect as t}from"antd";import{memo as l,forwardRef as a}from"react";import"../internal/index.js";import i from"../vef-loading-placeholder/index.js";import{useChangeHandler as n}from"./hooks/use-change-handler.js";import{useDataOptions as s}from"./hooks/use-data-options.js";import{useTreeSelectInstance as m}from"./hooks/use-tree-select-instance.js";import{convertBasicSizeToUiSize as d}from"../internal/utils.js";const f=e("div",{css:{height:140},children:e(i,{})}),c={showLeafIcon:!1};const u=l(a((function({defaultValue:l,value:a,size:i,clearable:u,disabled:h,placeholder:p,variant:v,onClear:g,onBlur:C,onFocus:j,onChange:k,onSelect:b,onDeselect:w,multiple:x=!1,filterable:F=!0,filterFromRemote:S=!1,...z},D){const{normalizedOptions:L,isLoading:T}=s({value:a,multiple:x,onChange:k,filterable:F,filterFromRemote:S,...z}),V=o(F,!1),B=n(k,L),N=m(D,L);return e(t,{ref:N,allowClear:u,css:r.fullWidth,defaultValue:l,disabled:h,filterTreeNode:V,listHeight:280,loading:T,maxTagCount:x?"responsive":void 0,multiple:x,notFoundContent:T?f:void 0,placeholder:p,showSearch:F,size:d(i),treeCheckable:x,treeData:L,treeLine:c,value:a,variant:v,onBlur:C,onChange:B,onClear:g,onDeselect:w,onFocus:j,onSelect:b})})));u.displayName="VefTreeSelect";export{u as default};
|
|
3
3
|
/*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type FC } from "react";
|
|
2
|
+
import type { VefVirtualGridProps, VirtualGridItem } from "./props";
|
|
3
|
+
declare function VefVirtualGridBase<T>({ className, style, items, renderItem, itemClassName, itemStyle, rowHeight, columnWidth, gap, ...restProps }: VefVirtualGridProps<T>): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare const VefVirtualGrid: typeof VefVirtualGridBase & Pick<FC, "displayName">;
|
|
5
|
+
export type { VefVirtualGridProps, VirtualGridItem };
|
|
6
|
+
export default VefVirtualGrid;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
|
|
2
|
+
import{jsx as t}from"@emotion/react/jsx-runtime";import{css as e}from"@emotion/react";import{useVirtualizer as i}from"@tanstack/react-virtual";import{useGapSizeNormalizer as r}from"@vef-framework/hooks";import{isArray as a,isNumber as l}from"@vef-framework/shared";import{useMemo as o,memo as n,useRef as m,Fragment as s,createElement as d}from"react";import v from"../vef-auto-sizer/index.js";import h from"../vef-scroll-area/index.js";const f={willChange:"transform"},g=e`
|
|
3
|
+
position: relative;
|
|
4
|
+
width: var(--vef-virtual-grid-width);
|
|
5
|
+
height: var(--vef-virtual-grid-height);
|
|
6
|
+
`,u=e`
|
|
7
|
+
position: absolute;
|
|
8
|
+
top: 0;
|
|
9
|
+
left: 0;
|
|
10
|
+
width: var(--vef-virtual-grid-item-width);
|
|
11
|
+
height: var(--vef-virtual-grid-item-height);
|
|
12
|
+
transform: translateX(var(--vef-virtual-grid-item-x)) translateY(var(--vef-virtual-grid-item-y));
|
|
13
|
+
`;const c=n((function({className:e,style:c,items:p,renderItem:x,itemClassName:w,itemStyle:z,rowHeight:S,columnWidth:y,gap:k,...$}){const I=o((()=>n(x)),[x]),N=m(null),T=r(),[V,j]=o((()=>{if(a(k))return[T(k[0]),T(k[1])];if(k){const t=T(k);return[t,t]}return[0,0]}),[k,T]),b=i({count:p.length,getScrollElement:()=>N.current,estimateSize:l(S)?()=>S:S,overscan:2,gap:V}),C=i({horizontal:!0,count:p[0]?.length??0,getScrollElement:()=>N.current,estimateSize:l(y)?()=>y:y,overscan:2,gap:j}),E=o((()=>({"--vef-virtual-grid-height":`${b.getTotalSize()}px`,"--vef-virtual-grid-width":`${C.getTotalSize()}px`})),[b.getTotalSize(),C.getTotalSize()]),G=(i,r)=>t(h,{className:e,height:i,scrollbarSize:"small",style:c,viewportRef:N,viewportStyle:f,width:r,children:t("div",{css:g,style:E,children:b.getVirtualItems().map((e=>t(s,{children:C.getVirtualItems().map((i=>{const r=p[e.index][i.index];return t("div",{className:w,css:u,style:{...z,"--vef-virtual-grid-item-width":`${i.size}px`,"--vef-virtual-grid-item-height":`${e.size}px`,"--vef-virtual-grid-item-x":`${i.start}px`,"--vef-virtual-grid-item-y":`${e.start}px`},children:r&&d(I,{item:r,rowIndex:e.index,columnIndex:i.index})},i.key)}))},e.key)))})});if(!$.autoSize){const{height:t,width:e}=$;return G(t,e)}return t(v,{children:({height:t,width:e})=>G(t,e)})}));c.displayName="VefVirtualGrid";export{c as default};
|
|
14
|
+
/*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
|