@vef-framework/components 1.0.5
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 +27 -0
- package/dist/index.d.ts +65 -0
- package/dist/index.js +3 -0
- package/dist/internal/index.d.ts +1 -0
- package/dist/internal/index.js +3 -0
- package/dist/internal/utils.d.ts +9 -0
- package/dist/internal/utils.js +3 -0
- package/dist/vef-access-denied/access-denied-icon.d.ts +4 -0
- package/dist/vef-access-denied/access-denied-icon.js +3 -0
- package/dist/vef-access-denied/index.d.ts +5 -0
- package/dist/vef-access-denied/index.js +29 -0
- package/dist/vef-access-denied/props.d.ts +18 -0
- package/dist/vef-action-buttons/index.d.ts +6 -0
- package/dist/vef-action-buttons/index.js +3 -0
- package/dist/vef-action-buttons/props.d.ts +23 -0
- package/dist/vef-badge/index.d.ts +5 -0
- package/dist/vef-badge/index.js +3 -0
- package/dist/vef-badge/props.d.ts +28 -0
- package/dist/vef-bool/hooks/use-bool-instance.d.ts +6 -0
- package/dist/vef-bool/hooks/use-bool-instance.js +3 -0
- package/dist/vef-bool/index.d.ts +4 -0
- package/dist/vef-bool/index.js +3 -0
- package/dist/vef-bool/props.d.ts +63 -0
- package/dist/vef-button/components/base-button.d.ts +9 -0
- package/dist/vef-button/components/base-button.js +3 -0
- package/dist/vef-button/index.d.ts +4 -0
- package/dist/vef-button/index.js +3 -0
- package/dist/vef-button/props.d.ts +79 -0
- package/dist/vef-card/index.d.ts +5 -0
- package/dist/vef-card/index.js +3 -0
- package/dist/vef-card/props.d.ts +27 -0
- package/dist/vef-card-meta/index.d.ts +5 -0
- package/dist/vef-card-meta/index.js +3 -0
- package/dist/vef-card-meta/props.d.ts +7 -0
- package/dist/vef-checkbox/hooks/use-checkbox-instance.d.ts +11 -0
- package/dist/vef-checkbox/hooks/use-checkbox-instance.js +3 -0
- package/dist/vef-checkbox/hooks/use-data-options.d.ts +34 -0
- package/dist/vef-checkbox/hooks/use-data-options.js +3 -0
- package/dist/vef-checkbox/index.d.ts +6 -0
- package/dist/vef-checkbox/index.js +5 -0
- package/dist/vef-checkbox/props.d.ts +41 -0
- package/dist/vef-col/index.d.ts +5 -0
- package/dist/vef-col/index.js +3 -0
- package/dist/vef-col/props.d.ts +5 -0
- package/dist/vef-color-picker/index.d.ts +5 -0
- package/dist/vef-color-picker/index.js +3 -0
- package/dist/vef-color-picker/props.d.ts +28 -0
- package/dist/vef-compact/index.d.ts +5 -0
- package/dist/vef-compact/index.js +3 -0
- package/dist/vef-compact/props.d.ts +11 -0
- package/dist/vef-config-provider/fonts/din/bold.woff2.js +3 -0
- package/dist/vef-config-provider/fonts/din/regular.woff2.js +3 -0
- package/dist/vef-config-provider/hooks/use-ui-config.d.ts +46 -0
- package/dist/vef-config-provider/hooks/use-ui-config.js +3 -0
- package/dist/vef-config-provider/index.d.ts +5 -0
- package/dist/vef-config-provider/index.js +111 -0
- package/dist/vef-config-provider/props.d.ts +24 -0
- package/dist/vef-config-provider/reset-style.d.ts +4 -0
- package/dist/vef-config-provider/reset-style.js +257 -0
- package/dist/vef-config-provider/store.d.ts +12 -0
- package/dist/vef-config-provider/store.js +3 -0
- package/dist/vef-container/index.d.ts +5 -0
- package/dist/vef-container/index.js +3 -0
- package/dist/vef-container/props.d.ts +6 -0
- package/dist/vef-crud-page/components/crud-actions.d.ts +21 -0
- package/dist/vef-crud-page/components/crud-actions.js +3 -0
- package/dist/vef-crud-page/components/crud-filter.d.ts +31 -0
- package/dist/vef-crud-page/components/crud-filter.js +3 -0
- package/dist/vef-crud-page/components/crud-footer.d.ts +31 -0
- package/dist/vef-crud-page/components/crud-footer.js +9 -0
- package/dist/vef-crud-page/components/crud-form-modal.d.ts +18 -0
- package/dist/vef-crud-page/components/crud-form-modal.js +3 -0
- package/dist/vef-crud-page/components/crud-header.d.ts +32 -0
- package/dist/vef-crud-page/components/crud-header.js +3 -0
- package/dist/vef-crud-page/components/crud-table.d.ts +57 -0
- package/dist/vef-crud-page/components/crud-table.js +3 -0
- package/dist/vef-crud-page/hooks/use-action-buttons.d.ts +16 -0
- package/dist/vef-crud-page/hooks/use-action-buttons.js +3 -0
- package/dist/vef-crud-page/hooks/use-crud-context.d.ts +8 -0
- package/dist/vef-crud-page/hooks/use-crud-context.js +3 -0
- package/dist/vef-crud-page/hooks/use-crud-schema.d.ts +17 -0
- package/dist/vef-crud-page/hooks/use-crud-schema.js +3 -0
- package/dist/vef-crud-page/hooks/use-operation-buttons.d.ts +11 -0
- package/dist/vef-crud-page/hooks/use-operation-buttons.js +3 -0
- package/dist/vef-crud-page/index.d.ts +6 -0
- package/dist/vef-crud-page/index.js +3 -0
- package/dist/vef-crud-page/props.d.ts +84 -0
- package/dist/vef-crud-page/store.d.ts +119 -0
- package/dist/vef-crud-page/store.js +3 -0
- package/dist/vef-crud-page/types.d.ts +173 -0
- package/dist/vef-divider/index.d.ts +5 -0
- package/dist/vef-divider/index.js +3 -0
- package/dist/vef-divider/props.d.ts +25 -0
- package/dist/vef-drawer/components/action-button-wrapper.d.ts +14 -0
- package/dist/vef-drawer/components/action-button-wrapper.js +3 -0
- package/dist/vef-drawer/components/button-props.d.ts +15 -0
- package/dist/vef-drawer/components/button-props.js +2 -0
- package/dist/vef-drawer/components/cancel-action-button.d.ts +4 -0
- package/dist/vef-drawer/components/cancel-action-button.js +3 -0
- package/dist/vef-drawer/components/ok-action-button.d.ts +4 -0
- package/dist/vef-drawer/components/ok-action-button.js +3 -0
- package/dist/vef-drawer/context.d.ts +27 -0
- package/dist/vef-drawer/context.js +3 -0
- package/dist/vef-drawer/index.d.ts +5 -0
- package/dist/vef-drawer/index.js +10 -0
- package/dist/vef-drawer/props.d.ts +97 -0
- package/dist/vef-dropdown/index.d.ts +4 -0
- package/dist/vef-dropdown/index.js +3 -0
- package/dist/vef-dropdown/props.d.ts +68 -0
- package/dist/vef-empty/index.d.ts +5 -0
- package/dist/vef-empty/index.js +3 -0
- package/dist/vef-empty/props.d.ts +7 -0
- package/dist/vef-empty-placeholder/index.d.ts +5 -0
- package/dist/vef-empty-placeholder/index.js +7 -0
- package/dist/vef-empty-placeholder/props.d.ts +6 -0
- package/dist/vef-error/error-icon.d.ts +4 -0
- package/dist/vef-error/error-icon.js +3 -0
- package/dist/vef-error/index.d.ts +5 -0
- package/dist/vef-error/index.js +30 -0
- package/dist/vef-error/props.d.ts +18 -0
- package/dist/vef-filter/components/action-buttons.d.ts +3 -0
- package/dist/vef-filter/components/action-buttons.js +21 -0
- package/dist/vef-filter/components/advanced-filter.d.ts +13 -0
- package/dist/vef-filter/components/advanced-filter.js +11 -0
- package/dist/vef-filter/components/basic-filter.d.ts +14 -0
- package/dist/vef-filter/components/basic-filter.js +21 -0
- package/dist/vef-filter/components/fields/index.d.ts +9 -0
- package/dist/vef-filter/components/fields/index.js +3 -0
- package/dist/vef-filter/components/fields/input-number.d.ts +4 -0
- package/dist/vef-filter/components/fields/input-number.js +3 -0
- package/dist/vef-filter/components/fields/input.d.ts +4 -0
- package/dist/vef-filter/components/fields/input.js +3 -0
- package/dist/vef-filter/components/fields/props.d.ts +32 -0
- package/dist/vef-filter/components/filter-field.d.ts +4 -0
- package/dist/vef-filter/components/filter-field.js +3 -0
- package/dist/vef-filter/components/filter-item.d.ts +15 -0
- package/dist/vef-filter/components/filter-item.js +3 -0
- package/dist/vef-filter/event.d.ts +12 -0
- package/dist/vef-filter/event.js +3 -0
- package/dist/vef-filter/helper.d.ts +10 -0
- package/dist/vef-filter/helper.js +3 -0
- package/dist/vef-filter/hooks/use-action-handlers.d.ts +20 -0
- package/dist/vef-filter/hooks/use-action-handlers.js +3 -0
- package/dist/vef-filter/hooks/use-computed-values.d.ts +42 -0
- package/dist/vef-filter/hooks/use-computed-values.js +3 -0
- package/dist/vef-filter/hooks/use-filter-context.d.ts +8 -0
- package/dist/vef-filter/hooks/use-filter-context.js +3 -0
- package/dist/vef-filter/hooks/use-filter-initialization.d.ts +7 -0
- package/dist/vef-filter/hooks/use-filter-initialization.js +3 -0
- package/dist/vef-filter/hooks/use-filter-instance.d.ts +10 -0
- package/dist/vef-filter/hooks/use-filter-instance.js +3 -0
- package/dist/vef-filter/hooks/use-filter-items.d.ts +13 -0
- package/dist/vef-filter/hooks/use-filter-items.js +3 -0
- package/dist/vef-filter/hooks/use-filter-values-change.d.ts +11 -0
- package/dist/vef-filter/hooks/use-filter-values-change.js +3 -0
- package/dist/vef-filter/hooks/use-label-config.d.ts +14 -0
- package/dist/vef-filter/hooks/use-label-config.js +3 -0
- package/dist/vef-filter/index.d.ts +8 -0
- package/dist/vef-filter/index.js +10 -0
- package/dist/vef-filter/props.d.ts +106 -0
- package/dist/vef-filter/store.d.ts +77 -0
- package/dist/vef-filter/store.js +3 -0
- package/dist/vef-filter/types.d.ts +224 -0
- package/dist/vef-flex/index.d.ts +5 -0
- package/dist/vef-flex/index.js +3 -0
- package/dist/vef-flex/props.d.ts +12 -0
- package/dist/vef-float-button/index.d.ts +5 -0
- package/dist/vef-float-button/index.js +3 -0
- package/dist/vef-float-button/props.d.ts +26 -0
- package/dist/vef-float-button-group/index.d.ts +5 -0
- package/dist/vef-float-button-group/index.js +3 -0
- package/dist/vef-float-button-group/props.d.ts +11 -0
- package/dist/vef-form/components/fields/index.d.ts +10 -0
- package/dist/vef-form/components/fields/index.js +3 -0
- package/dist/vef-form/components/fields/input-number.d.ts +5 -0
- package/dist/vef-form/components/fields/input-number.js +3 -0
- package/dist/vef-form/components/fields/input.d.ts +5 -0
- package/dist/vef-form/components/fields/input.js +3 -0
- package/dist/vef-form/components/fields/props.d.ts +33 -0
- package/dist/vef-form/components/form-actions.d.ts +20 -0
- package/dist/vef-form/components/form-actions.js +5 -0
- package/dist/vef-form/components/form-content.d.ts +18 -0
- package/dist/vef-form/components/form-content.js +6 -0
- package/dist/vef-form/components/form-field.d.ts +5 -0
- package/dist/vef-form/components/form-field.js +3 -0
- package/dist/vef-form/components/form-group.d.ts +22 -0
- package/dist/vef-form/components/form-group.js +13 -0
- package/dist/vef-form/components/form-hidden-item.d.ts +14 -0
- package/dist/vef-form/components/form-hidden-item.js +3 -0
- package/dist/vef-form/components/form-item.d.ts +18 -0
- package/dist/vef-form/components/form-item.js +3 -0
- package/dist/vef-form/components/form-row.d.ts +26 -0
- package/dist/vef-form/components/form-row.js +3 -0
- package/dist/vef-form/event.d.ts +15 -0
- package/dist/vef-form/event.js +3 -0
- package/dist/vef-form/helper.d.ts +11 -0
- package/dist/vef-form/helper.js +3 -0
- package/dist/vef-form/hooks/use-action-handlers.d.ts +14 -0
- package/dist/vef-form/hooks/use-action-handlers.js +3 -0
- package/dist/vef-form/hooks/use-columns-layout.d.ts +12 -0
- package/dist/vef-form/hooks/use-columns-layout.js +3 -0
- package/dist/vef-form/hooks/use-computed-values.d.ts +42 -0
- package/dist/vef-form/hooks/use-computed-values.js +3 -0
- package/dist/vef-form/hooks/use-form-context.d.ts +6 -0
- package/dist/vef-form/hooks/use-form-context.js +3 -0
- package/dist/vef-form/hooks/use-form-initialization.d.ts +14 -0
- package/dist/vef-form/hooks/use-form-initialization.js +3 -0
- package/dist/vef-form/hooks/use-form-instance.d.ts +10 -0
- package/dist/vef-form/hooks/use-form-instance.js +3 -0
- package/dist/vef-form/hooks/use-form-values-change.d.ts +11 -0
- package/dist/vef-form/hooks/use-form-values-change.js +3 -0
- package/dist/vef-form/hooks/use-label-width.d.ts +9 -0
- package/dist/vef-form/hooks/use-label-width.js +3 -0
- package/dist/vef-form/index.d.ts +8 -0
- package/dist/vef-form/index.js +5 -0
- package/dist/vef-form/props.d.ts +158 -0
- package/dist/vef-form/store.d.ts +89 -0
- package/dist/vef-form/store.js +3 -0
- package/dist/vef-form/types.d.ts +335 -0
- package/dist/vef-form/validation-rules.d.ts +175 -0
- package/dist/vef-form/validation-rules.js +3 -0
- package/dist/vef-form-drawer/index.d.ts +9 -0
- package/dist/vef-form-drawer/index.js +3 -0
- package/dist/vef-form-drawer/props.d.ts +17 -0
- package/dist/vef-form-modal/index.d.ts +9 -0
- package/dist/vef-form-modal/index.js +3 -0
- package/dist/vef-form-modal/props.d.ts +20 -0
- package/dist/vef-grid/index.d.ts +5 -0
- package/dist/vef-grid/index.js +14 -0
- package/dist/vef-grid/props.d.ts +25 -0
- package/dist/vef-grid/props.js +3 -0
- package/dist/vef-grid-item/index.d.ts +5 -0
- package/dist/vef-grid-item/index.js +3 -0
- package/dist/vef-grid-item/props.d.ts +34 -0
- package/dist/vef-icon/index.d.ts +4 -0
- package/dist/vef-icon/index.js +3 -0
- package/dist/vef-icon/props.d.ts +12 -0
- package/dist/vef-input/hooks/use-input-instance.d.ts +12 -0
- package/dist/vef-input/hooks/use-input-instance.js +3 -0
- package/dist/vef-input/index.d.ts +4 -0
- package/dist/vef-input/index.js +3 -0
- package/dist/vef-input/props.d.ts +67 -0
- package/dist/vef-input-number/hooks/use-input-number-instance.d.ts +12 -0
- package/dist/vef-input-number/hooks/use-input-number-instance.js +3 -0
- package/dist/vef-input-number/index.d.ts +4 -0
- package/dist/vef-input-number/index.js +3 -0
- package/dist/vef-input-number/props.d.ts +124 -0
- package/dist/vef-loading-placeholder/index.d.ts +5 -0
- package/dist/vef-loading-placeholder/index.js +7 -0
- package/dist/vef-loading-placeholder/props.d.ts +6 -0
- package/dist/vef-login/index.d.ts +5 -0
- package/dist/vef-login/index.js +53 -0
- package/dist/vef-login/login-icon.d.ts +4 -0
- package/dist/vef-login/login-icon.js +3 -0
- package/dist/vef-login/props.d.ts +57 -0
- package/dist/vef-modal/components/action-button-wrapper.d.ts +14 -0
- package/dist/vef-modal/components/action-button-wrapper.js +3 -0
- package/dist/vef-modal/components/button-props.d.ts +15 -0
- package/dist/vef-modal/components/button-props.js +2 -0
- package/dist/vef-modal/components/cancel-action-button.d.ts +4 -0
- package/dist/vef-modal/components/cancel-action-button.js +3 -0
- package/dist/vef-modal/components/ok-action-button.d.ts +4 -0
- package/dist/vef-modal/components/ok-action-button.js +3 -0
- package/dist/vef-modal/context.d.ts +27 -0
- package/dist/vef-modal/context.js +3 -0
- package/dist/vef-modal/index.d.ts +5 -0
- package/dist/vef-modal/index.js +6 -0
- package/dist/vef-modal/props.d.ts +88 -0
- package/dist/vef-not-found/index.d.ts +5 -0
- package/dist/vef-not-found/index.js +30 -0
- package/dist/vef-not-found/not-found-icon.d.ts +4 -0
- package/dist/vef-not-found/not-found-icon.js +3 -0
- package/dist/vef-not-found/props.d.ts +18 -0
- package/dist/vef-page/index.d.ts +5 -0
- package/dist/vef-page/index.js +59 -0
- package/dist/vef-page/props.d.ts +29 -0
- package/dist/vef-pagination/index.d.ts +4 -0
- package/dist/vef-pagination/index.js +3 -0
- package/dist/vef-pagination/props.d.ts +59 -0
- package/dist/vef-pagination/props.js +3 -0
- package/dist/vef-paragraph/index.d.ts +5 -0
- package/dist/vef-paragraph/index.js +3 -0
- package/dist/vef-paragraph/props.d.ts +55 -0
- package/dist/vef-password/hooks/use-password-instance.d.ts +13 -0
- package/dist/vef-password/hooks/use-password-instance.js +3 -0
- package/dist/vef-password/index.d.ts +4 -0
- package/dist/vef-password/index.js +3 -0
- package/dist/vef-password/props.d.ts +58 -0
- package/dist/vef-popconfirm/index.d.ts +5 -0
- package/dist/vef-popconfirm/index.js +3 -0
- package/dist/vef-popconfirm/props.d.ts +33 -0
- package/dist/vef-popover/index.d.ts +5 -0
- package/dist/vef-popover/index.js +3 -0
- package/dist/vef-popover/props.d.ts +29 -0
- package/dist/vef-radio/hooks/use-data-options.d.ts +35 -0
- package/dist/vef-radio/hooks/use-data-options.js +3 -0
- package/dist/vef-radio/hooks/use-radio-instance.d.ts +11 -0
- package/dist/vef-radio/hooks/use-radio-instance.js +3 -0
- package/dist/vef-radio/index.d.ts +7 -0
- package/dist/vef-radio/index.js +5 -0
- package/dist/vef-radio/props.d.ts +59 -0
- package/dist/vef-rate/hooks/use-rate-instance.d.ts +12 -0
- package/dist/vef-rate/hooks/use-rate-instance.js +3 -0
- package/dist/vef-rate/index.d.ts +4 -0
- package/dist/vef-rate/index.js +3 -0
- package/dist/vef-rate/props.d.ts +25 -0
- package/dist/vef-responsive-container/index.d.ts +4 -0
- package/dist/vef-responsive-container/index.js +7 -0
- package/dist/vef-responsive-container/props.d.ts +21 -0
- package/dist/vef-responsive-item/index.d.ts +4 -0
- package/dist/vef-responsive-item/index.js +5 -0
- package/dist/vef-responsive-item/props.d.ts +12 -0
- package/dist/vef-ribbon/index.d.ts +5 -0
- package/dist/vef-ribbon/index.js +3 -0
- package/dist/vef-ribbon/props.d.ts +15 -0
- package/dist/vef-row/index.d.ts +5 -0
- package/dist/vef-row/index.js +3 -0
- package/dist/vef-row/props.d.ts +7 -0
- package/dist/vef-scroll-area/components/scrollbar.d.ts +2 -0
- package/dist/vef-scroll-area/components/scrollbar.js +34 -0
- package/dist/vef-scroll-area/index.d.ts +4 -0
- package/dist/vef-scroll-area/index.js +10 -0
- package/dist/vef-scroll-area/props.d.ts +24 -0
- package/dist/vef-select/components/option.d.ts +7 -0
- package/dist/vef-select/components/option.js +11 -0
- package/dist/vef-select/hooks/use-data-options.d.ts +37 -0
- package/dist/vef-select/hooks/use-data-options.js +3 -0
- package/dist/vef-select/hooks/use-field-names.d.ts +9 -0
- package/dist/vef-select/hooks/use-field-names.js +3 -0
- package/dist/vef-select/hooks/use-label-render.d.ts +11 -0
- package/dist/vef-select/hooks/use-label-render.js +10 -0
- package/dist/vef-select/hooks/use-option-render.d.ts +11 -0
- package/dist/vef-select/hooks/use-option-render.js +3 -0
- package/dist/vef-select/hooks/use-select-instance.d.ts +11 -0
- package/dist/vef-select/hooks/use-select-instance.js +3 -0
- package/dist/vef-select/index.d.ts +7 -0
- package/dist/vef-select/index.js +3 -0
- package/dist/vef-select/props.d.ts +153 -0
- package/dist/vef-slider/hooks/use-slider-instance.d.ts +12 -0
- package/dist/vef-slider/hooks/use-slider-instance.js +3 -0
- package/dist/vef-slider/index.d.ts +4 -0
- package/dist/vef-slider/index.js +3 -0
- package/dist/vef-slider/props.d.ts +72 -0
- package/dist/vef-sortable-list/components/overlay-item.d.ts +9 -0
- package/dist/vef-sortable-list/components/overlay-item.js +7 -0
- package/dist/vef-sortable-list/components/sortable-item.d.ts +21 -0
- package/dist/vef-sortable-list/components/sortable-item.js +7 -0
- package/dist/vef-sortable-list/hooks/use-merged-items.d.ts +10 -0
- package/dist/vef-sortable-list/hooks/use-merged-items.js +3 -0
- package/dist/vef-sortable-list/index.d.ts +7 -0
- package/dist/vef-sortable-list/index.js +3 -0
- package/dist/vef-sortable-list/props.d.ts +77 -0
- package/dist/vef-space/index.d.ts +5 -0
- package/dist/vef-space/index.js +3 -0
- package/dist/vef-space/props.d.ts +12 -0
- package/dist/vef-spin/index.d.ts +5 -0
- package/dist/vef-spin/index.js +3 -0
- package/dist/vef-spin/props.d.ts +12 -0
- package/dist/vef-splitter/index.d.ts +5 -0
- package/dist/vef-splitter/index.js +3 -0
- package/dist/vef-splitter/props.d.ts +16 -0
- package/dist/vef-splitter-panel/index.d.ts +5 -0
- package/dist/vef-splitter-panel/index.js +3 -0
- package/dist/vef-splitter-panel/props.d.ts +6 -0
- package/dist/vef-status/index.d.ts +5 -0
- package/dist/vef-status/index.js +3 -0
- package/dist/vef-status/props.d.ts +17 -0
- package/dist/vef-table/components/columns/bool.d.ts +5 -0
- package/dist/vef-table/components/columns/bool.js +3 -0
- package/dist/vef-table/components/columns/code.d.ts +4 -0
- package/dist/vef-table/components/columns/code.js +3 -0
- package/dist/vef-table/components/columns/data-dictionary.d.ts +4 -0
- package/dist/vef-table/components/columns/data-dictionary.js +3 -0
- package/dist/vef-table/components/columns/enum.d.ts +4 -0
- package/dist/vef-table/components/columns/enum.js +3 -0
- package/dist/vef-table/components/columns/file.d.ts +4 -0
- package/dist/vef-table/components/columns/file.js +3 -0
- package/dist/vef-table/components/columns/icon.d.ts +4 -0
- package/dist/vef-table/components/columns/icon.js +3 -0
- package/dist/vef-table/components/columns/id.d.ts +4 -0
- package/dist/vef-table/components/columns/id.js +3 -0
- package/dist/vef-table/components/columns/image.d.ts +4 -0
- package/dist/vef-table/components/columns/image.js +3 -0
- package/dist/vef-table/components/columns/index.d.ts +31 -0
- package/dist/vef-table/components/columns/index.js +3 -0
- package/dist/vef-table/components/columns/markdown.d.ts +4 -0
- package/dist/vef-table/components/columns/markdown.js +3 -0
- package/dist/vef-table/components/columns/number.d.ts +4 -0
- package/dist/vef-table/components/columns/number.js +3 -0
- package/dist/vef-table/components/columns/props.d.ts +24 -0
- package/dist/vef-table/components/columns/render.d.ts +4 -0
- package/dist/vef-table/components/columns/render.js +3 -0
- package/dist/vef-table/components/columns/rich-text.d.ts +4 -0
- package/dist/vef-table/components/columns/rich-text.js +3 -0
- package/dist/vef-table/components/columns/text.d.ts +4 -0
- package/dist/vef-table/components/columns/text.js +3 -0
- package/dist/vef-table/components/columns-settings.d.ts +2 -0
- package/dist/vef-table/components/columns-settings.js +54 -0
- package/dist/vef-table/components/operation-buttons.d.ts +22 -0
- package/dist/vef-table/components/operation-buttons.js +12 -0
- package/dist/vef-table/components/settings-icon.d.ts +2 -0
- package/dist/vef-table/components/settings-icon.js +5 -0
- package/dist/vef-table/components/table-footer.d.ts +34 -0
- package/dist/vef-table/components/table-footer.js +19 -0
- package/dist/vef-table/helper.d.ts +12 -0
- package/dist/vef-table/helper.js +3 -0
- package/dist/vef-table/hooks/use-computed-batch-buttons.d.ts +13 -0
- package/dist/vef-table/hooks/use-computed-batch-buttons.js +3 -0
- package/dist/vef-table/hooks/use-computed-columns.d.ts +10 -0
- package/dist/vef-table/hooks/use-computed-columns.js +3 -0
- package/dist/vef-table/hooks/use-computed-values.d.ts +45 -0
- package/dist/vef-table/hooks/use-computed-values.js +3 -0
- package/dist/vef-table/hooks/use-data.d.ts +11 -0
- package/dist/vef-table/hooks/use-data.js +3 -0
- package/dist/vef-table/hooks/use-default-column-configs.d.ts +9 -0
- package/dist/vef-table/hooks/use-default-column-configs.js +3 -0
- package/dist/vef-table/hooks/use-display-value.d.ts +32 -0
- package/dist/vef-table/hooks/use-display-value.js +3 -0
- package/dist/vef-table/hooks/use-helper-columns.d.ts +6 -0
- package/dist/vef-table/hooks/use-helper-columns.js +3 -0
- package/dist/vef-table/hooks/use-merged-value.d.ts +10 -0
- package/dist/vef-table/hooks/use-merged-value.js +3 -0
- package/dist/vef-table/hooks/use-operation-column-width.d.ts +11 -0
- package/dist/vef-table/hooks/use-operation-column-width.js +3 -0
- package/dist/vef-table/hooks/use-pagination-props.d.ts +17 -0
- package/dist/vef-table/hooks/use-pagination-props.js +3 -0
- package/dist/vef-table/hooks/use-row-props.d.ts +11 -0
- package/dist/vef-table/hooks/use-row-props.js +3 -0
- package/dist/vef-table/hooks/use-row-selection-config.d.ts +11 -0
- package/dist/vef-table/hooks/use-row-selection-config.js +3 -0
- package/dist/vef-table/hooks/use-table-columns.d.ts +12 -0
- package/dist/vef-table/hooks/use-table-columns.js +3 -0
- package/dist/vef-table/hooks/use-table-context.d.ts +9 -0
- package/dist/vef-table/hooks/use-table-context.js +3 -0
- package/dist/vef-table/hooks/use-table-instance.d.ts +10 -0
- package/dist/vef-table/hooks/use-table-instance.js +3 -0
- package/dist/vef-table/hooks/use-table-summary.d.ts +10 -0
- package/dist/vef-table/hooks/use-table-summary.js +3 -0
- package/dist/vef-table/hooks/use-table-width.d.ts +9 -0
- package/dist/vef-table/hooks/use-table-width.js +3 -0
- package/dist/vef-table/index.d.ts +7 -0
- package/dist/vef-table/index.js +56 -0
- package/dist/vef-table/props.d.ts +330 -0
- package/dist/vef-table/store.d.ts +21 -0
- package/dist/vef-table/store.js +3 -0
- package/dist/vef-table/types.d.ts +481 -0
- package/dist/vef-tabs/index.d.ts +5 -0
- package/dist/vef-tabs/index.js +3 -0
- package/dist/vef-tabs/props.d.ts +12 -0
- package/dist/vef-tag/index.d.ts +5 -0
- package/dist/vef-tag/index.js +3 -0
- package/dist/vef-tag/props.d.ts +20 -0
- package/dist/vef-temporal-picker/hooks/use-dayjs-value.d.ts +10 -0
- package/dist/vef-temporal-picker/hooks/use-dayjs-value.js +3 -0
- package/dist/vef-temporal-picker/hooks/use-temporal-formats.d.ts +8 -0
- package/dist/vef-temporal-picker/hooks/use-temporal-formats.js +3 -0
- package/dist/vef-temporal-picker/hooks/use-temporal-limit.d.ts +13 -0
- package/dist/vef-temporal-picker/hooks/use-temporal-limit.js +3 -0
- package/dist/vef-temporal-picker/hooks/use-temporal-picker-instance.d.ts +12 -0
- package/dist/vef-temporal-picker/hooks/use-temporal-picker-instance.js +3 -0
- package/dist/vef-temporal-picker/index.d.ts +5 -0
- package/dist/vef-temporal-picker/index.js +3 -0
- package/dist/vef-temporal-picker/props.d.ts +101 -0
- package/dist/vef-temporal-range-picker/hooks/use-dayjs-values.d.ts +10 -0
- package/dist/vef-temporal-range-picker/hooks/use-dayjs-values.js +3 -0
- package/dist/vef-temporal-range-picker/hooks/use-temporal-formats.d.ts +8 -0
- package/dist/vef-temporal-range-picker/hooks/use-temporal-formats.js +3 -0
- package/dist/vef-temporal-range-picker/hooks/use-temporal-limit.d.ts +13 -0
- package/dist/vef-temporal-range-picker/hooks/use-temporal-limit.js +3 -0
- package/dist/vef-temporal-range-picker/hooks/use-temporal-range-picker-instance.d.ts +12 -0
- package/dist/vef-temporal-range-picker/hooks/use-temporal-range-picker-instance.js +3 -0
- package/dist/vef-temporal-range-picker/index.d.ts +5 -0
- package/dist/vef-temporal-range-picker/index.js +3 -0
- package/dist/vef-temporal-range-picker/props.d.ts +82 -0
- package/dist/vef-temporal-range-picker/props.js +3 -0
- package/dist/vef-text/index.d.ts +5 -0
- package/dist/vef-text/index.js +3 -0
- package/dist/vef-text/props.d.ts +47 -0
- package/dist/vef-textarea/hooks/use-textarea-instance.d.ts +13 -0
- package/dist/vef-textarea/hooks/use-textarea-instance.js +3 -0
- package/dist/vef-textarea/index.d.ts +4 -0
- package/dist/vef-textarea/index.js +3 -0
- package/dist/vef-textarea/props.d.ts +58 -0
- package/dist/vef-title/index.d.ts +5 -0
- package/dist/vef-title/index.js +15 -0
- package/dist/vef-title/props.d.ts +39 -0
- package/dist/vef-tooltip/index.d.ts +5 -0
- package/dist/vef-tooltip/index.js +3 -0
- package/dist/vef-tooltip/props.d.ts +30 -0
- package/dist/vef-tree-select/hooks/use-change-handler.d.ts +10 -0
- package/dist/vef-tree-select/hooks/use-change-handler.js +3 -0
- package/dist/vef-tree-select/hooks/use-data-options.d.ts +36 -0
- package/dist/vef-tree-select/hooks/use-data-options.js +3 -0
- package/dist/vef-tree-select/hooks/use-tree-select-instance.d.ts +11 -0
- package/dist/vef-tree-select/hooks/use-tree-select-instance.js +3 -0
- package/dist/vef-tree-select/index.d.ts +7 -0
- package/dist/vef-tree-select/index.js +3 -0
- package/dist/vef-tree-select/props.d.ts +142 -0
- package/package.json +56 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, 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 a,useState as r,useDeferredValue as s,forwardRef as m,memo as c}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 p}from"./hooks/use-computed-columns.js";import{useData as d}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 g}from"./hooks/use-pagination-props.js";import{useRowProps as C}from"./hooks/use-row-props.js";import{useRowSelectionConfig as w}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 v}from"./hooks/use-table-summary.js";import{useTableWidth as y}from"./hooks/use-table-width.js";import{convertBasicSizeToUiSize as j}from"../internal/utils.js";const R=o`
|
|
3
|
+
height: 100%;
|
|
4
|
+
|
|
5
|
+
> .vef-spin-nested-loading {
|
|
6
|
+
height: 100%;
|
|
7
|
+
|
|
8
|
+
> .vef-spin-container {
|
|
9
|
+
height: 100%;
|
|
10
|
+
|
|
11
|
+
> .vef-table {
|
|
12
|
+
height: 100%;
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
|
|
16
|
+
> .vef-table-container {
|
|
17
|
+
flex: 1;
|
|
18
|
+
min-height: 0;
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
|
|
22
|
+
> .vef-table-header {
|
|
23
|
+
flex-shrink: 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
> .vef-table-body {
|
|
27
|
+
flex: 1;
|
|
28
|
+
scrollbar-width: thin;
|
|
29
|
+
scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
|
|
30
|
+
min-height: 200px;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
> .vef-table-title {
|
|
35
|
+
flex-shrink: 0;
|
|
36
|
+
padding: ${t.paddingSm};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
> .vef-table-footer {
|
|
40
|
+
flex-shrink: 0;
|
|
41
|
+
padding: ${t.paddingXs}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&.vef-table-empty > .vef-table-container > .vef-table-body > table {
|
|
45
|
+
min-height: 100%;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
`,B=o`
|
|
51
|
+
.vef-table-content {
|
|
52
|
+
scrollbar-width: thin;
|
|
53
|
+
scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
|
|
54
|
+
}
|
|
55
|
+
`;const N=m((function({columns:o,defaultColumnConfigMap:t,rowNumberColumn:m,operationColumn:c,bordered:h=!1,size:b="medium",rowKey:N="id",height:V,virtual:M=!1,value:A,defaultValue:F,selectable:z=!1,multipleSelection:T,showSelectAllCheckbox:K,disabledSelection:O,enableRowClick:P,enableRowClickForSelection:D,rowBackgroundColor:L,batchActionButtons:$,selectionSummary:E,externalContext:H,onRowClick:X,onChange:q,onSelect:G,onDeselect:I,...J},Q){const{paginated:U=!1,...W}=J,{paginationProps:Y,paginationParams:Z}=g(U,b),{data:_,isFetching:ee,isLoading:oe,total:te,refetch:ne}=d(W,U,Z),le=a((()=>({...Y,total:te})),[Y,te]),[ie,ae]=r((()=>new Map(t))),re=s(ie),se=p(o,re),{rowSelectionConfig:me,handleRowClickSelection:ce,mergedValue:ue,selectedRecords:fe}=w({value:A,defaultValue:F,selectable:z,multipleSelection:T,disabledSelection:O,enableRowClick:P,enableRowClickForSelection:D,onSelect:G,onDeselect:I,onChange:q,rowKey:N}),pe=C({enableRowClick:P,enableRowClickForSelection:D,onRowClick:X,disabledSelection:O,handleRowClickSelection:ce}),de=a((()=>({externalContext:H,isFetching:ee,refetch:ne,selectedKeys:ue,selectedRecords:fe.current,defaultColumnConfigMap:t,columnConfigMap:ie,setColumnConfigMap:ae,columnConfigMapHasChanged:!n(t,ie)})),[H,ee,ne,ue,fe,t,ie]),he=k(se,m,c),be=y(he,z),ge=a((()=>({x:be,y:"auto"===V?"auto":V,scrollToFirstRowOnChange:!0})),[V,be]),Ce=S(Q,_??[],ne),we=v(se),{computedBatchActionButtons:ke,batchActionButtonContext:xe}=f($??[],de),Se=a((()=>{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:de,children:e(i,{ref:Ce,bordered:h,columns:he,css:"auto"===V?R:B,dataSource:_,footer:Se,loading:ee,pagination:!1,rowKey:N,rowSelection:me,scroll:ge,size:j(b),summary:we,tableLayout:"fixed",virtual:l(V)&&V>0&&M,onRow:pe})})}));N.displayName="VefTableBase";const V=c(m((function({schema:o,showRowNumber:t,operationButtons:n,maxVisibleOperationButtons:l,...i},r){const{size:s}=i,m=a((()=>o.filter((e=>e.show??!0)).map((e=>({...e,dependentColumnNames:[...new Set([e.name,...e.dependentColumnNames??[]])]})))),[o]);if(0===m.length)throw new Error("The showed columns of VefTable component cannot be empty");const c=h(m),{rowNumberColumn:u,operationColumn:f}=b({showRowNumber:t,operationButtons:n,maxVisibleOperationButtons:l,size:s});return e(N,{ref:r,columns:m,defaultColumnConfigMap:c,operationColumn:f,rowNumberColumn:u,...i})})),n);V.displayName="VefTable";export{V as default};
|
|
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 */
|
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
import type { ActionButton, BasicSize, BiConsumer, BiMapper, ColorType, EmptyObject, IdValue, Mapper, ObjectType, ObjectValue, PaginationParams, PaginationResult, Provider, QueryConfig, StringKey } from "@vef-framework/shared";
|
|
2
|
+
import type { TableProps } from "antd";
|
|
3
|
+
import type { ReactNode } from "react";
|
|
4
|
+
import type { BatchActionButtonContext, OperationButtonContext, TableHeight, TableSchema } from "./types";
|
|
5
|
+
/**
|
|
6
|
+
* The instance of VefTable component.
|
|
7
|
+
*/
|
|
8
|
+
export interface VefTableInstance<T extends ObjectType> {
|
|
9
|
+
/**
|
|
10
|
+
* Get the table data.
|
|
11
|
+
*/
|
|
12
|
+
getData: Provider<T[]>;
|
|
13
|
+
/**
|
|
14
|
+
* Refetch the table data.
|
|
15
|
+
*/
|
|
16
|
+
refetch: Provider<Promise<void>>;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The onChange handler type of table.
|
|
20
|
+
*/
|
|
21
|
+
export type OnChangeHandler<T extends ObjectType> = NonNullable<TableProps<T>["onChange"]>;
|
|
22
|
+
/**
|
|
23
|
+
* The props of VefTable component.
|
|
24
|
+
*/
|
|
25
|
+
export type VefTableProps<T extends ObjectType = ObjectValue, P extends ObjectType = EmptyObject, R = T, C extends ObjectType = EmptyObject> = VefNoSelectionDefaultTableProps<T, P, R, C> | VefSingleSelectionDefaultTableProps<T, P, R, C> | VefMultipleSelectionDefaultTableProps<T, P, R, C> | VefNoSelectionPaginatedTableProps<T, P, R, C> | VefSingleSelectionPaginatedTableProps<T, P, R, C> | VefMultipleSelectionPaginatedTableProps<T, P, R, C>;
|
|
26
|
+
/**
|
|
27
|
+
* The base props of VefTable component.
|
|
28
|
+
*/
|
|
29
|
+
interface VefBaseTableProps<T extends ObjectType = ObjectValue, C extends ObjectType = EmptyObject> extends Pick<TableProps<T>, "bordered"> {
|
|
30
|
+
/**
|
|
31
|
+
* The schema of the table.
|
|
32
|
+
*/
|
|
33
|
+
schema: TableSchema<T>;
|
|
34
|
+
/**
|
|
35
|
+
* The key of the row.
|
|
36
|
+
*/
|
|
37
|
+
rowKey?: StringKey<T> | Mapper<T, string>;
|
|
38
|
+
/**
|
|
39
|
+
* The size of the table.
|
|
40
|
+
*/
|
|
41
|
+
size?: BasicSize;
|
|
42
|
+
/**
|
|
43
|
+
* The height of the table.
|
|
44
|
+
*/
|
|
45
|
+
height?: TableHeight;
|
|
46
|
+
/**
|
|
47
|
+
* Whether to enable virtual scrolling.
|
|
48
|
+
* Only works when `height` is number and greater than 0.
|
|
49
|
+
*/
|
|
50
|
+
virtual?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Whether to allow pagination.
|
|
53
|
+
*/
|
|
54
|
+
paginated?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Whether to show the row number.
|
|
57
|
+
*/
|
|
58
|
+
showRowNumber?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Whether to allow selection.
|
|
61
|
+
*/
|
|
62
|
+
selectable?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Whether to allow multiple selection.
|
|
65
|
+
*/
|
|
66
|
+
multipleSelection?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Whether to show the select all checkbox.
|
|
69
|
+
* Only works when `allowSelect` is true and `multipleSelection` is true.
|
|
70
|
+
*/
|
|
71
|
+
showSelectAllCheckbox?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Whether to disable selection.
|
|
74
|
+
*/
|
|
75
|
+
disabledSelection?: Mapper<T, boolean>;
|
|
76
|
+
/**
|
|
77
|
+
* The text of the selection summary.
|
|
78
|
+
*/
|
|
79
|
+
selectionSummary?: false | Mapper<T[], ReactNode>;
|
|
80
|
+
/**
|
|
81
|
+
* Whether to enable row click event.
|
|
82
|
+
*/
|
|
83
|
+
enableRowClick?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Whether to click row for selection.
|
|
86
|
+
*/
|
|
87
|
+
enableRowClickForSelection?: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* The background color of the row.
|
|
90
|
+
*/
|
|
91
|
+
rowBackgroundColor?: BiMapper<T, number, ColorType>;
|
|
92
|
+
/**
|
|
93
|
+
* The operation buttons of the table.
|
|
94
|
+
*/
|
|
95
|
+
operationButtons?: Array<ActionButton<OperationButtonContext<T, C>>>;
|
|
96
|
+
/**
|
|
97
|
+
* The maximum number of visible operation buttons.
|
|
98
|
+
*/
|
|
99
|
+
maxVisibleOperationButtons?: number;
|
|
100
|
+
/**
|
|
101
|
+
* The batch action buttons of the table.
|
|
102
|
+
*/
|
|
103
|
+
batchActionButtons?: Array<ActionButton<BatchActionButtonContext<T, C>>>;
|
|
104
|
+
/**
|
|
105
|
+
* The external context of the table.
|
|
106
|
+
*/
|
|
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
|
+
/**
|
|
128
|
+
* The value of the table.
|
|
129
|
+
*/
|
|
130
|
+
value?: never;
|
|
131
|
+
/**
|
|
132
|
+
* The default value of the table.
|
|
133
|
+
*/
|
|
134
|
+
defaultValue?: never;
|
|
135
|
+
/**
|
|
136
|
+
* Whether to allow selection.
|
|
137
|
+
*/
|
|
138
|
+
selectable?: false;
|
|
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;
|
|
147
|
+
/**
|
|
148
|
+
* The callback function when the row is selected.
|
|
149
|
+
*/
|
|
150
|
+
onSelect?: never;
|
|
151
|
+
/**
|
|
152
|
+
* The callback function when the row is deselected.
|
|
153
|
+
*/
|
|
154
|
+
onDeselect?: never;
|
|
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;
|
|
172
|
+
/**
|
|
173
|
+
* Whether to allow multiple selection.
|
|
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.
|
|
186
|
+
*/
|
|
187
|
+
onDeselect?: never;
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* The props of VefTable component without pagination and multiple selection.
|
|
191
|
+
*/
|
|
192
|
+
interface VefMultipleSelectionDefaultTableProps<T extends ObjectType = ObjectValue, P extends ObjectType = EmptyObject, R = T, C extends ObjectType = EmptyObject> extends VefDefaultTableProps<T, P, R, C> {
|
|
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>;
|
|
217
|
+
/**
|
|
218
|
+
* The callback function when the row is deselected.
|
|
219
|
+
*/
|
|
220
|
+
onDeselect?: BiConsumer<IdValue, T>;
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* The props of VefTable component with pagination.
|
|
224
|
+
*/
|
|
225
|
+
interface VefPaginatedTableProps<T extends ObjectType = ObjectValue, P extends ObjectType = EmptyObject, R = T, C extends ObjectType = EmptyObject> extends VefBaseTableProps<T, C>, QueryConfig<PaginationResult<T>, P & PaginationParams, PaginationResult<R>> {
|
|
226
|
+
/**
|
|
227
|
+
* Whether to allow pagination.
|
|
228
|
+
*/
|
|
229
|
+
paginated: true;
|
|
230
|
+
}
|
|
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
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type Consumer, type Size } from "@vef-framework/shared";
|
|
2
|
+
import type { TableColumnConfig } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* The state of the table component.
|
|
5
|
+
*/
|
|
6
|
+
export interface TableState {
|
|
7
|
+
/**
|
|
8
|
+
* The size of the table.
|
|
9
|
+
*/
|
|
10
|
+
size: Size;
|
|
11
|
+
/**
|
|
12
|
+
* The callback function when the size is changed.
|
|
13
|
+
*/
|
|
14
|
+
changeSize: Consumer<Size>;
|
|
15
|
+
/**
|
|
16
|
+
* The map of the column configs.
|
|
17
|
+
*/
|
|
18
|
+
columnConfigMap: Map<string, TableColumnConfig>;
|
|
19
|
+
}
|
|
20
|
+
declare const TableStoreContext: import("react").Context<import("@vef-framework/shared").MaybeNull<import("zustand").StoreApi<TableState>>>, 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 { TableStoreContext, TableStoreProvider, useTableStore, useTableStoreApi, };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, made by Venus. */
|
|
2
|
+
import{VefError as e,createComponentStore as t}from"@vef-framework/shared";import{createStore as r}from"zustand";const{StoreContext:o,StoreProvider:i,useStore:n,useStoreApi:a}=t("table",(function(t){if(!t)throw new e(-2,"The initial state of the table store is required");return r((e=>({changeSize:t=>e({size:t}),columnConfigMap:new Map,...t})))}));export{o as TableStoreContext,i as TableStoreProvider,n as useTableStore,a as useTableStoreApi};
|
|
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 */
|