@vef-framework/components 1.0.8 → 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 +18 -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
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import "
|
|
1
|
+
import { type BasicSize, type Consumer, type DefaultColorType, type LiteralUnion } from "@vef-framework/shared";
|
|
2
|
+
import type { AppConfig } from "./hooks/use-ui-config";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* The state of the app.
|
|
5
5
|
*/
|
|
6
|
-
export interface
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
export interface AppState extends Required<AppConfig> {
|
|
7
|
+
/**
|
|
8
|
+
* Set the font size.
|
|
9
|
+
*/
|
|
10
|
+
setFontSize: Consumer<Exclude<BasicSize, "small">>;
|
|
11
|
+
/**
|
|
12
|
+
* Set the primary color.
|
|
13
|
+
*/
|
|
14
|
+
setPrimaryColor: Consumer<LiteralUnion<DefaultColorType, string>>;
|
|
10
15
|
}
|
|
11
|
-
declare const
|
|
12
|
-
export {
|
|
16
|
+
declare const ConfigStoreProvider: import("react").FC<import("@vef-framework/shared").StoreProviderProps<Partial<AppState>>>, useConfigStore: <T>(selector: import("@vef-framework/shared").Mapper<AppState, T>) => T, useConfigStoreApi: () => import("zustand").StoreApi<AppState>;
|
|
17
|
+
export { ConfigStoreProvider, useConfigStore, useConfigStoreApi, };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
2
|
-
import{createComponentStore as
|
|
1
|
+
/*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
|
|
2
|
+
import{createComponentStore as r}from"@vef-framework/shared";import{createStore as o}from"zustand";const{StoreProvider:e,useStore:t,useStoreApi:i}=r("Config",(function({fontSize:r="large",primaryColor:e="#0064fa"}){return o((o=>({fontSize:r,primaryColor:e,setFontSize:r=>o({fontSize:r}),setPrimaryColor:r=>o({primaryColor:r})})))}));export{e as ConfigStoreProvider,t as useConfigStore,i as useConfigStoreApi};
|
|
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{jsxs as e,jsx as r}from"@emotion/react/jsx-runtime";import{FloatButton as o}from"antd";import t from"../vef-scroll-area/index.js";const{BackTop:a}=o,s=({className:o,style:s,children:m})=>e(t,{className:o,style:s,children:[m,r(a,{})]});export{s 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{jsx as o}from"@emotion/react/jsx-runtime";import{DisabledContextProvider as t}from"@vef-framework/hooks";import{useMemo as r}from"react";import e from"../../vef-action-buttons/index.js";import{useActionButtons as s}from"../hooks/use-action-buttons.js";import{useCrudContext as i}from"../hooks/use-crud-context.js";import{useCrudStore as n}from"../store.js";function m({tableApi:m,tableApiParams:a,actionButtons:u}){const c=n((o=>o.confirmedFilterValues)),f=m.useIsFetching(r((()=>({...a,...c})),[a,c])),p=i(),l=s(u);return o(t,{value:f,children:o(e,{buttons:l,context:p,useFlexContainer:!1})})}export{m 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{jsx as t}from"@emotion/react/jsx-runtime";import{useMemo as e,useCallback as o}from"react";import r from"../../vef-action-buttons/index.js";import i from"../../vef-filter/index.js";import n from"../../vef-title/index.js";import{useActionButtons as s}from"../hooks/use-action-buttons.js";import{useCrudContext as m}from"../hooks/use-crud-context.js";import{useCrudStore as a}from"../store.js";function f({title:f,tableApi:l,tableApiParams:u,filterSchema:c,actionButtons:p}){const[d,x,h]=a((t=>[t.setFilterValues,t.confirmedFilterValues,t.setConfirmedFilterValues])),j=l.useIsFetching(e((()=>({...u,...x})),[u,x])),b=m(),F=s(p),g=o((()=>h(null)),[h]);return t(i,{loading:j,prefix:t(n,{noPaddingBottom:!0,showLeftBar:!0,level:5,children:f}),schema:c,extraActionButtons:t(r,{buttons:F,context:b,useFlexContainer:!1}),onChange:d,onConfirm:h,onReset:g})}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,9 +1,9 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
2
|
-
import{jsx as e,jsxs as t,Fragment as o}from"@emotion/react/jsx-runtime";import{
|
|
1
|
+
/*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
|
|
2
|
+
import{jsx as e,jsxs as t,Fragment as o}from"@emotion/react/jsx-runtime";import{css as r}from"@emotion/react";import{useApiContext as i}from"@vef-framework/core";import{DisabledContextProvider as n}from"@vef-framework/hooks";import{themeVariables as c,isNullish as s,showSuccessMessage as m,isFunction as a}from"@vef-framework/shared";import{Trash2Icon as l}from"lucide-react";import{useMemo as d,useCallback as f,memo as p}from"react";import u from"../../vef-action-buttons/index.js";import h from"../../vef-button/index.js";import x from"../../vef-divider/index.js";import v from"../../vef-flex/index.js";import b from"../../vef-icon/index.js";import y from"../../vef-text/index.js";import{useCrudContext as g}from"../hooks/use-crud-context.js";import{useCrudStore as j}from"../store.js";const k=r`
|
|
3
3
|
height: 100%;
|
|
4
4
|
display: flex;
|
|
5
5
|
justify-content: space-between;
|
|
6
6
|
align-items: center;
|
|
7
|
-
padding: ${
|
|
8
|
-
`;const
|
|
7
|
+
padding: ${c.padding};
|
|
8
|
+
`;const A=p((function({tableApi:r,tableApiParams:c,batchDeletionApi:p,batchActionButtons:A,selectionSummary:w}){const{useApiMutation:C,stubMutationApi:F}=i(),I=C(p??F),[M,D,K]=j((e=>[e.selectedInfo,e.confirmedFilterValues,e.setSelectedInfo])),{selectedKeys:R,selectedRecords:S}=M,q=d((()=>s(p)?A??[]:[...A??[],{key:"_batchDeletion",label:"批量删除",icon:e(b,{children:e(l,{})}),color:"error",permissions:[p.key],requireConfirmation:!0,confirmationMode:"detailed",onClick:async({refetch:e})=>{const{message:t}=await I.mutate(S);m(t),e()}}]),[A,p,I,S]),B=g(),P=d((()=>({...B,...M})),[B,M]),V=r.useIsFetching(d((()=>({...c,...D})),[c,D])),$=f((()=>{K({selectedKeys:[],selectedRecords:[]})}),[K]),_=d((()=>{if(a(w))return w(S)}),[S,w]);return 0===R.length?null:t("div",{css:k,children:[t(y,{color:"secondary",children:["已选择"," ",e(y,{bold:!0,color:"primary",children:R.length})," ","项",_&&t(o,{children:[e(x,{orientation:"vertical"}),_]})]}),e(n,{value:V,children:t(v,{align:"center",gap:"medium",children:[e(h,{color:"primary",variant:"text",onClick:$,children:"取消选择"}),e(u,{buttons:q,context:P,useFlexContainer:!1})]})})]})}));export{A as default};
|
|
9
9
|
/*! 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 o}from"@emotion/react/jsx-runtime";import e from"../../vef-form-modal/index.js";import{useCrudStore as r}from"../store.js";function t({formSchema:t,formApis:n}){const[i,{scene:m,title:s,width:c},{onBeforeSubmit:f,onSubmitSuccess:u},a,p,l]=r((o=>[o.isFormOpen,o.currentFormInfo,o.currentFormEventHandlers,o.currentFormInitialValues,o.isFormLoading,o.closeForm])),d=n[m];if(!d)throw new Error(`Form api for scene ${m} not found, please check the formApis props of VefCrudPage component.`);return o(e,{initialValues:a,loading:p,open:i,scene:m,schema:t,submitApi:d,title:s,width:c,onBeforeSubmit:f,onClose:l,onSubmitSuccess:u})}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
|
import{jsx as t}from"@emotion/react/jsx-runtime";import{memo as e}from"react";import r from"./crud-filter.js";const i=e((function({title:e,tableApi:i,tableApiParams:a,filterItems:o,actionButtons:l}){return o.length>0?t(r,{actionButtons:l,filterSchema:o,tableApi:i,tableApiParams:a,title:e}):null}));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 */
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { Except, MutationApi, ObjectType, PaginationParams, PaginationResult, QueryApi, QueryConfig, StringKey } from "@vef-framework/shared";
|
|
2
|
-
import type { TableSchema, VefTableProps } from "../../vef-table";
|
|
3
2
|
import type { CrudContext, CrudFilterVirtualKeys, CrudFormApis, CrudSchema } from "../types";
|
|
3
|
+
import { type TableSchema, type VefTableProps } from "../../vef-table";
|
|
4
4
|
/**
|
|
5
5
|
* The base props of VefCrudTable component.
|
|
6
6
|
*/
|
|
7
|
-
type BaseCrudTableProps<Record extends ObjectType, Params extends ObjectType, FilterKeys extends ReadonlyArray<StringKey<Record>>, FormKeys extends ReadonlyArray<StringKey<Record>>, FormResult, Schema extends CrudSchema<Record, FilterKeys, FormKeys> = CrudSchema<Record, FilterKeys, FormKeys>, FormApis extends CrudFormApis<Record, FormKeys, FormResult, Schema> = CrudFormApis<Record, FormKeys, FormResult, Schema>> = Except<VefTableProps<Record, Params, Record, CrudContext<Record, FilterKeys, FormKeys, FormResult, Schema, FormApis>>, "schema" | "paginated" | "multipleSelection" | "showSelectAllCheckbox" | "enableRowClick" | "enableRowClickForSelection" | "
|
|
7
|
+
type BaseCrudTableProps<Record extends ObjectType, Params extends ObjectType, FilterKeys extends ReadonlyArray<StringKey<Record>>, FormKeys extends ReadonlyArray<StringKey<Record>>, FormResult, Schema extends CrudSchema<Record, FilterKeys, FormKeys> = CrudSchema<Record, FilterKeys, FormKeys>, FormApis extends CrudFormApis<Record, FormKeys, FormResult, Schema> = CrudFormApis<Record, FormKeys, FormResult, Schema>> = Except<VefTableProps<Record, Params, Record, CrudContext<Record, FilterKeys, FormKeys, FormResult, Schema, FormApis>>, "schema" | "paginated" | "multipleSelection" | "showSelectAllCheckbox" | "enableRowClick" | "enableRowClickForSelection" | "selectedKeys" | "defaultSelectedKeys" | "onRowSelectionChange" | "onRowSelect" | "onRowDeselect" | "onRowClick" | keyof QueryConfig> & {
|
|
8
8
|
/**
|
|
9
9
|
* The schema of the table.
|
|
10
10
|
*/
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
2
|
-
import{jsx as e}from"@emotion/react/jsx-runtime";import{useMemo as t,useCallback 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{useMemo as t,useCallback as o,useRef as s,useEffect as a,memo as n}from"react";import r from"../../vef-table/index.js";import{useCrudContext as l}from"../hooks/use-crud-context.js";import{useOperationButtons as i}from"../hooks/use-operation-buttons.js";import{useCrudStore as c,useCrudStoreApi as m}from"../store.js";const p=n((function({api:n,apiParams:p,deletionApi:d,paginated:u,schema:f,selectable:x,operationButtons:S,...h}){const[y,b,j]=c((e=>[e.confirmedFilterValues,e.selectedInfo,e.setSelectedInfo])),K=t((()=>({...p,...y})),[p,y]),g=o(((e,t)=>{j({selectedKeys:e,selectedRecords:t})}),[j]),C=i(d,S),R=s(null),I=m();a((()=>{I.setState({tableInstanceRef:R})}),[I]);const P=l();return e(r,u?{ref:R,multipleSelection:!0,paginated:!0,api:n,apiParams:K,externalContext:P,operationButtons:C,schema:f,selectable:x,selectedKeys:b.selectedKeys,selectionSummary:!1,onRowSelectionChange:g,...h}:{ref:R,multipleSelection:!0,api:n,apiParams:K,externalContext:P,schema:f,selectable:x,selectedKeys:b.selectedKeys,selectionSummary:!1,onRowSelectionChange:g,...h})}));export{p 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.
|
|
2
|
-
import{jsx as e}from"@emotion/react/jsx-runtime";import{
|
|
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{creationFormScene as r}from"@vef-framework/shared";import{PlusIcon as o}from"lucide-react";import{useMemo as t}from"react";import i from"../../vef-icon/index.js";import{useCrudStore as m}from"../store.js";function c(c){const n=m((e=>e.formApiKeys)),f=Reflect.has(n,r),s=Reflect.get(n,r);return t((()=>f?[...c??[],{label:"创建",key:`_${r}`,icon:e(i,{children:e(o,{})}),color:"primary",permissions:[s],onClick:({openForm:e,refetch:o})=>e({scene:r,title:"创建",onSubmitSuccess:()=>{o()}})}]:c??[]),[f,c,s])}export{c as useActionButtons};
|
|
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{useMemo as e}from"react";import{useCrudStore as r}from"../store.js";function t(){const[t,o,n]=r((e=>[e.openForm,e.filterValues,e.tableInstanceRef]));return e((()=>({openForm:t,filterValues:o,refetch:async()=>{await(n.current?.refetch())}})),[t,o,n])}export{t as useCrudContext};
|
|
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 ObjectType, type StringKey } from "@vef-framework/shared";
|
|
2
2
|
import type { FilterItem } from "../../vef-filter";
|
|
3
3
|
import type { FormGroup } from "../../vef-form";
|
|
4
4
|
import type { TableSchema } from "../../vef-table";
|
|
@@ -12,6 +12,6 @@ import type { CrudSchema } from "../types";
|
|
|
12
12
|
export declare function useCrudSchema<T extends ObjectType, FilterKeys extends ReadonlyArray<StringKey<T>>, FormKeys extends ReadonlyArray<StringKey<T>>>(schema: CrudSchema<T, FilterKeys, FormKeys>): {
|
|
13
13
|
tableSchema: TableSchema<T>;
|
|
14
14
|
filterItems: FilterItem<Pick<T, FilterKeys[number]>>[];
|
|
15
|
-
formGroups: FormGroup<Pick<T, FormKeys[number]>, import("../..").FormScene>[];
|
|
15
|
+
formGroups: FormGroup<Pick<T, FormKeys[number]>, FormKeys[number], import("../..").FormScene>[];
|
|
16
16
|
filterValueAsDefaultKeys: FormKeys[number][];
|
|
17
17
|
};
|
|
@@ -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 e,isString as t}from"@vef-framework/shared";import{useMemo as o}from"react";function r(r){return o((()=>{const o=[],s=[],n=new Set,c={};for(const a of r){const{filter:r,form:f,...l}=a,{name:u,title:p}=l;if(o.push(l),r){const{label:o,advanced:n,...c}=r,a={name:u,label:n&&e(o)?p:o,advanced:n,...c};("Input"===a.type||"InputNumber"===a.type)&&e(o)&&e(a.placeholder)&&(a.placeholder=t(p)?`请输入${p}`:"请输入"),s.push(a)}if(f){const{group:t,row:o,column:r,filterValueAsDefault:s,label:a,...l}=f,m=`${t??1}`,i=c[m]??{};c[m]||(c[m]=i);const d=`${o??1}`,h=i[d]??{};i[d]||(i[d]=h);const y=`${r??1}`,b=h[y]??[];h[y]||(h[y]=b),"Hidden"===l.type?b.push({name:u,...l}):b.push({name:u,label:e(a)?p:a,...l}),s&&n.add(u)}}const a=[],f=Object.keys(c).sort();for(const e of f){const t=c[e],o=[],r=Object.keys(t).sort();for(const e of r){const r=t[e],s=[],n=Object.keys(r).sort();for(const e of n){const t={key:e,items:r[e]};s.push(t)}o.push({key:e,columns:s})}a.push({key:e,rows:o})}return{tableSchema:o,filterItems:s,formGroups:a,filterValueAsDefaultKeys:Array.from(n)}}),[r])}export{r as useCrudSchema};
|
|
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.
|
|
2
|
-
import{jsx as o}from"@emotion/react/jsx-runtime";import{
|
|
1
|
+
/*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
|
|
2
|
+
import{jsx as o}from"@emotion/react/jsx-runtime";import{useApiContext as r}from"@vef-framework/core";import{modificationFormScene as e,showSuccessMessage as i}from"@vef-framework/shared";import{PencilIcon as t,TrashIcon as n}from"lucide-react";import{useMemo as c}from"react";import m from"../../vef-icon/index.js";import{useCrudStore as a}from"../store.js";function s(s,f){const{useApiMutation:l,stubMutationApi:p}=r(),u=l(s??p),d=a((o=>o.formApiKeys)),h=Reflect.has(d,e);return c((()=>{const r=[...f??[]];return h&&r.push({key:"_modification",label:"修改",icon:o(m,{children:o(t,{})}),color:"primary",onClick:({record:o,openForm:r,refetch:i})=>{r({scene:e,title:"修改",initialValues:o,onSubmitSuccess:()=>{i()}})}}),s&&r.push({key:"_deletion",label:"删除",icon:o(m,{children:o(n,{})}),color:"error",requireConfirmation:!0,confirmationMode:"simple",onClick:async({record:o,refetch:r})=>{const{message:e}=await u.mutate(o);i(e),r()}}),r}),[s,u,f,h])}export{s as useOperationButtons};
|
|
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,6 +1,6 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type AnyValue, type EmptyObject, type ObjectType, type ObjectValue, type StringKey } from "@vef-framework/shared";
|
|
2
2
|
import type { VefCrudPageProps } from "./props";
|
|
3
|
-
import type { CrudFormApis, CrudSchema } from "./types";
|
|
3
|
+
import type { BatchActionButtonContext, CrudContext, CrudFormApis, CrudItem, CrudSchema } from "./types";
|
|
4
4
|
declare function VefCrudPage<Record extends ObjectType = ObjectValue, Params extends ObjectType = EmptyObject, FilterKeys extends ReadonlyArray<StringKey<Record>> = [], FormKeys extends ReadonlyArray<StringKey<Record>> = [], FormResult = AnyValue, Schema extends CrudSchema<Record, FilterKeys, FormKeys> = CrudSchema<Record, FilterKeys, FormKeys>, FormApis extends CrudFormApis<Record, FormKeys, FormResult, Schema> = CrudFormApis<Record, FormKeys, FormResult, Schema>>({ schema, formApis, onFormOpen, onBeforeSubmit, onSubmitSuccess, ...restProps }: VefCrudPageProps<Record, Params, FilterKeys, FormKeys, FormResult, Schema, FormApis>): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
5
|
-
export type { VefCrudPageProps };
|
|
5
|
+
export type { BatchActionButtonContext, CrudContext, CrudItem, CrudSchema, VefCrudPageProps };
|
|
6
6
|
export default VefCrudPage;
|
|
@@ -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,jsxs as t}from"@emotion/react/jsx-runtime";import{isNullish as o}from"@vef-framework/shared";import{useMemo as r}from"react";import s from"../vef-card/index.js";import i from"../vef-page/index.js";import m from"./components/crud-actions.js";import a from"./components/crud-footer.js";import n from"./components/crud-form-modal.js";import c from"./components/crud-header.js";import l from"./components/crud-table.js";import{useCrudSchema as p}from"./hooks/use-crud-schema.js";import{useCrudStore as f,CrudStoreProvider as u}from"./store.js";function b({title:r,actionButtons:p,batchActionButtons:u,tableSchema:b,filterItems:h,formGroups:d,tableApiParams:A,formApis:j,deletionApi:S,batchDeletionApi:y,selectionSummary:B,...g}){const{selectedKeys:P}=f((e=>e.selectedInfo)),k=!o(y)||!o(u)&&u.length>0;let w;if(g.paginated){const{tableApi:t,...o}=g;w=e(l,{showRowNumber:!0,api:t,apiParams:A,deletionApi:S,schema:b,selectable:k,...o})}else{const{tableApi:t,...o}=g;w=e(l,{showRowNumber:!0,api:t,apiParams:A,deletionApi:S,schema:b,selectable:k,...o})}const{tableApi:I}=g;return e(i,{scrollable:!0,title:r,actions:e(m,{actionButtons:p,tableApi:I,tableApiParams:A}),footer:P.length>0&&e(a,{batchActionButtons:u,batchDeletionApi:y,selectionSummary:B,tableApi:I,tableApiParams:A}),header:e(c,{actionButtons:p,filterItems:h,tableApi:I,tableApiParams:A,title:r}),children:t(s,{children:[w,j&&Object.keys(j).length>0&&d.length>0&&e(n,{formApis:j,formSchema:d})]})})}function h({schema:t,formApis:o,onFormOpen:s,onBeforeSubmit:i,onSubmitSuccess:m,...a}){const{tableSchema:n,filterItems:c,formGroups:l,filterValueAsDefaultKeys:f}=p(t),h=r((()=>{const e=o??{};return Object.keys(e).reduce(((t,o)=>(e[o]&&(t[o]=e[o].key),t)),{})}),[o]);return e(u,{filterValueAsDefaultKeys:f,formApiKeys:h,onBeforeSubmit:i,onFormOpen:s,onSubmitSuccess:m,children:e(b,{filterItems:c,formApis:o,formGroups:l,tableSchema:n,...a})})}export{h 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 */
|
|
@@ -10,7 +10,7 @@ export type VefCrudPageProps<Record extends ObjectType = ObjectValue, Params ext
|
|
|
10
10
|
/**
|
|
11
11
|
* The base props of VefCrudPage component.
|
|
12
12
|
*/
|
|
13
|
-
type VefBaseCrudPageProps<Record extends ObjectType = ObjectValue, Params extends ObjectType = EmptyObject, FilterKeys extends ReadonlyArray<StringKey<Record>> = [], FormKeys extends ReadonlyArray<StringKey<Record>> = [], FormResult = AnyValue, Schema extends CrudSchema<Record, FilterKeys, FormKeys> = CrudSchema<Record, FilterKeys, FormKeys>, FormApis extends CrudFormApis<Record, FormKeys, FormResult, Schema> = CrudFormApis<Record, FormKeys, FormResult, Schema>> = Except<VefTableProps<Record, Params, Record, CrudContext<Record, FilterKeys, FormKeys, FormResult, Schema, FormApis>>, "schema" | "paginated" | "selectable" | "multipleSelection" | "showSelectAllCheckbox" | "enableRowClick" | "enableRowClickForSelection" | "selectionSummary" | "
|
|
13
|
+
type VefBaseCrudPageProps<Record extends ObjectType = ObjectValue, Params extends ObjectType = EmptyObject, FilterKeys extends ReadonlyArray<StringKey<Record>> = [], FormKeys extends ReadonlyArray<StringKey<Record>> = [], FormResult = AnyValue, Schema extends CrudSchema<Record, FilterKeys, FormKeys> = CrudSchema<Record, FilterKeys, FormKeys>, FormApis extends CrudFormApis<Record, FormKeys, FormResult, Schema> = CrudFormApis<Record, FormKeys, FormResult, Schema>> = Except<VefTableProps<Record, Params, Record, CrudContext<Record, FilterKeys, FormKeys, FormResult, Schema, FormApis>>, "schema" | "paginated" | "selectable" | "multipleSelection" | "showSelectAllCheckbox" | "enableRowClick" | "enableRowClickForSelection" | "selectionSummary" | "selectedKeys" | "defaultSelectedKeys" | "batchActionButtons" | "onRowSelectionChange" | "onRowSelect" | "onRowDeselect" | "onRowClick" | keyof QueryConfig> & FormEventHandlers<Pick<Record, FormKeys[number]>, FormResult, CrudFormScene<FormApis>> & {
|
|
14
14
|
/**
|
|
15
15
|
* The schema of the crud page.
|
|
16
16
|
*/
|
|
@@ -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{useSingleton as e,useUpdateEffect as r}from"@vef-framework/hooks";import{creationFormScene as o,isNullish as n,isFunction as t,mergeFns as s,showSuccessMessage as i,showSuccessAlert as u,invokeMaybeAsyncFn as m,isEqual as l}from"@vef-framework/shared";import{createContext as a,createElement as c,useContext as f}from"react";import{createStore as d}from"zustand";import{useStoreWithEqualityFn as F}from"zustand/traditional";const S=a(null);function p({filterValueAsDefaultKeys:l,formApiKeys:a,onFormOpen:f,onBeforeSubmit:F,onSubmitSuccess:p,children:b}){const V=e((()=>function({filterValueAsDefaultKeys:e,formApiKeys:r,onFormOpen:l,onBeforeSubmit:a,onSubmitSuccess:c}){return d(((f,d)=>({onFormOpen:l,onBeforeSubmit:a,onSubmitSuccess:c,currentFormInfo:{scene:o,title:"创建",width:"medium"},currentFormEventHandlers:{},currentFormInitialValues:{},isFormOpen:!1,openForm:async({initialValues:r,width:o,onBeforeSubmit:l,onSubmitSuccess:a,showSuccessTip:c=!0,successTipType:F="message",...S})=>{const{filterValues:p,onFormOpen:b,closeForm:V,onBeforeSubmit:y,onSubmitSuccess:I,setIsFormLoading:w}=d(),K={...e.reduce(((e,r)=>{const o=p[r];return n(o)||(e[r]=o),e}),{}),...r},v=t(l)||t(y)?async(e,r)=>{const o=await(l?.(e,r));return await(y?.(o??e,r))??o}:void 0,A=t(a)||t(I)?s((({message:e})=>{c&&("message"===F?i(e):u(e)),V()}),a,I):void 0;f({isFormOpen:!0,currentFormInfo:{...S,width:o??"medium"},currentFormEventHandlers:{onBeforeSubmit:v,onSubmitSuccess:A},isFormLoading:Boolean(b)}),b?await m(b,{onSuccess:e=>{f({currentFormInitialValues:e})},onFinally:()=>{w(!1)}},K,p,S.scene):f({currentFormInitialValues:K})},closeForm:()=>{f({isFormOpen:!1,currentFormInitialValues:{},currentFormEventHandlers:{}})},isFormLoading:!1,setIsFormLoading:e=>{f({isFormLoading:e})},filterValueAsDefaultKeys:e,filterValues:{},setFilterValues:e=>{f({filterValues:e})},confirmedFilterValues:null,setConfirmedFilterValues:e=>{f({confirmedFilterValues:e})},selectedInfo:{selectedKeys:[],selectedRecords:[]},setSelectedInfo:e=>{f({selectedInfo:e})},formApiKeys:r,tableInstanceRef:{current:null}})))}({filterValueAsDefaultKeys:l,onFormOpen:f,formApiKeys:a,onBeforeSubmit:F,onSubmitSuccess:p})));return r((()=>{V.setState({filterValueAsDefaultKeys:l,formApiKeys:a,onFormOpen:f,onBeforeSubmit:F,onSubmitSuccess:p})}),[l,a,f,F,p]),c(S.Provider,{value:V},b)}function b(){const e=f(S);if(!e)throw new Error("CrudStore can be used only inside CrudStoreProvider");return e}function V(e){return F(b(),e,l)}export{p as CrudStoreProvider,V as useCrudStore,b as useCrudStoreApi};
|
|
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.
|
|
2
|
-
import{jsx as t}from"@emotion/react/jsx-runtime";import{Divider as i}from"antd";const o=({
|
|
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{Divider as i}from"antd";const o=({orientation:o,title:e,titlePosition:n,titleEdgeMargin:r,...a})=>t(i,{children:e,orientation:n,orientationMargin:r,type:o,...a});export{o 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,13 +1,13 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Except, Orientation } from "@vef-framework/shared";
|
|
2
2
|
import type { DividerProps } from "antd";
|
|
3
3
|
/**
|
|
4
4
|
* The props for the VefDivider component.
|
|
5
5
|
*/
|
|
6
6
|
export interface VefDividerProps extends Except<DividerProps, "dashed" | "type" | "orientation" | "orientationMargin" | "children"> {
|
|
7
7
|
/**
|
|
8
|
-
* The
|
|
8
|
+
* The orientation of the divider.
|
|
9
9
|
*/
|
|
10
|
-
|
|
10
|
+
orientation?: Orientation;
|
|
11
11
|
/**
|
|
12
12
|
* The title of the divider.
|
|
13
13
|
*/
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type FC, type ReactElement } from "react";
|
|
2
|
-
import type { VefButtonProps } from "../../vef-button";
|
|
3
|
-
import type VefButton from "../../vef-button";
|
|
2
|
+
import type { default as VefButton, VefButtonProps } from "../../vef-button";
|
|
4
3
|
/**
|
|
5
4
|
* The props of the vef drawer action button wrapper.
|
|
6
5
|
*/
|
|
@@ -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,Fragment as r}from"@emotion/react/jsx-runtime";import{invokeMaybeAsyncFn as e}from"@vef-framework/shared";import{useState as i,useMemo as t,cloneElement as n}from"react";import{useDrawerContextSelector as a}from"../context.js";const s=({children:s})=>{const[l,d]=a((o=>[o.isDisabled,o.setIsDisabled])),[m,c]=i(!1),{disabled:f,loading:p,onClick:b}=s.props,k=t((()=>{if(b)return async o=>{await e(b,{beforeInvoke:()=>{c(!0),d(!0)},onFinally:()=>{c(!1),d(!1)}},o)}}),[b,d]),u=n(s,{disabled:l||f,loading:m||p,onClick:k});return o(r,{children:u})};export{s 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,2 +1,2 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
|
|
2
2
|
/*! 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 t}from"@emotion/react/jsx-runtime";import o from"../../vef-button/index.js";import r from"./action-button-wrapper.js";const e=({text:e,onClick:i})=>t(r,{children:t(o,{color:"default",variant:"text",onClick:i,children:e})});export{e 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.
|
|
2
|
-
import{jsx as o}from"@emotion/react/jsx-runtime";import{
|
|
1
|
+
/*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
|
|
2
|
+
import{jsx as o}from"@emotion/react/jsx-runtime";import{CheckIcon as r}from"lucide-react";import i from"../../vef-button/index.js";import t from"../../vef-icon/index.js";import e from"./action-button-wrapper.js";const n=({text:n,onClick:c})=>o(e,{children:o(i,{color:"primary",icon:o(t,{children:o(r,{})}),onClick:c,children:n})});export{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 */
|
|
@@ -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{createSelectableContext as e,noop as s}from"@vef-framework/shared";const{ContextProvider:o,useContext:t,useContextSelector:r}=e({isDisabled:!1,setIsDisabled:s,isFullyOpened:!1,isFullyClosed:!1});export{o as DrawerContextProvider,t as useDrawerContext,r as useDrawerContextSelector};
|
|
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-drawer/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{jsx as e,jsxs as o,Fragment as t}from"@emotion/react/jsx-runtime";import{css as n}from"@emotion/react";import{themeVariables as l,isFunction as s}from"@vef-framework/shared";import{Drawer as r}from"antd";import{useMemo as i,useState as a,useLayoutEffect as c,useCallback as d,memo as m}from"react";import p from"./components/cancel-action-button.js";import f from"./components/ok-action-button.js";import{DrawerContextProvider as u}from"./context.js";export{default as VefDrawerActionButtonWrapper}from"./components/action-button-wrapper.js";const C=n`
|
|
3
3
|
.vef-drawer-footer {
|
|
4
4
|
display: flex;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import { type MenuItem } from "@vef-framework/shared";
|
|
2
|
+
import { type FC } from "react";
|
|
1
3
|
import type { VefDropdownProps } from "./props";
|
|
2
|
-
declare
|
|
4
|
+
declare function VefDropdownBase<T extends readonly MenuItem[] = readonly MenuItem[]>({ className, disabled, placement, children, items, trigger, selectable, deselectable, multiple, defaultSelectedKeys, selectedKeys, onChange, onSelect, onDeselect, onClick, }: VefDropdownProps<T>): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare const VefDropdown: typeof VefDropdownBase & Pick<FC, "displayName">;
|
|
3
6
|
export type { VefDropdownProps };
|
|
4
7
|
export default VefDropdown;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
2
|
-
import{jsx as e}from"@emotion/react/jsx-runtime";import{useNormalizedMenuItems 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{useNormalizedMenuItems as t,useDeepCompareMemo as o}from"@vef-framework/hooks";import{isFunction as l}from"@vef-framework/shared";import{Dropdown as a}from"antd";import{useMemo as s,memo as r}from"react";const n=r((function({className:r,disabled:n,placement:c,children:i,items:m,trigger:d="hover",selectable:p=!1,deselectable:f=!1,multiple:y=!1,defaultSelectedKeys:k,selectedKeys:u,onChange:h,onSelect:v,onDeselect:g,onClick:b}){const K=s((()=>[d]),[d]),P=t(m),S=o((()=>({items:P,selectable:p,unselectable:f?"on":"off",multiple:y,defaultSelectedKeys:k,selectedKeys:u,onSelect:l(h)||l(v)?({key:e,keyPath:t,selectedKeys:o,domEvent:l})=>{l.stopPropagation(),h?.(o),v?.(e,t)}:void 0,onDeselect:l(h)||l(g)?({key:e,keyPath:t,selectedKeys:o,domEvent:l})=>{l.stopPropagation(),h?.(o),g?.(e,t)}:void 0,onClick:l(b)?({key:e,keyPath:t,domEvent:o})=>{o.stopPropagation(),b(e,t)}:void 0})),[k,y,P,h,b,g,v,p,u,f]);return e(a,{className:r,disabled:n,menu:S,placement:c,trigger:K,children:i})}));n.displayName="VefDropdown";export{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 */
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { BiConsumer, Consumer, MenuItem, MenuItemKey } from "@vef-framework/shared";
|
|
2
2
|
import type { DropDownProps } from "antd";
|
|
3
3
|
/**
|
|
4
4
|
* The trigger mode of the dropdown.
|
|
5
5
|
*/
|
|
6
6
|
export type DropdownTrigger = "hover" | "click" | "contextMenu";
|
|
7
7
|
/**
|
|
8
|
-
* The
|
|
8
|
+
* The props of the VefDropdown component.
|
|
9
9
|
*/
|
|
10
|
-
interface
|
|
10
|
+
export interface VefDropdownProps<T extends readonly MenuItem[] = readonly MenuItem[]> extends Pick<DropDownProps, "className" | "disabled" | "placement" | "children"> {
|
|
11
11
|
/**
|
|
12
12
|
* The items of the dropdown.
|
|
13
13
|
*/
|
|
14
|
-
items:
|
|
14
|
+
items: T;
|
|
15
15
|
/**
|
|
16
16
|
* The trigger mode of the dropdown.
|
|
17
17
|
* @default "hover"
|
|
@@ -21,48 +21,41 @@ interface VefBaseDropdownProps extends Pick<DropDownProps, "disabled" | "placeme
|
|
|
21
21
|
* Whether to enable selection.
|
|
22
22
|
* @default false
|
|
23
23
|
*/
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* The callback function when the dropdown item is clicked.
|
|
27
|
-
*/
|
|
28
|
-
onClick?: Consumer<string>;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* The props of the VefDropdown component in default mode.
|
|
32
|
-
*/
|
|
33
|
-
interface VefDefaultDropdownProps extends VefBaseDropdownProps {
|
|
24
|
+
selectable?: boolean;
|
|
34
25
|
/**
|
|
35
|
-
* Whether to enable
|
|
26
|
+
* Whether to enable deselectable.
|
|
36
27
|
* @default false
|
|
37
28
|
*/
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* The props of the VefDropdown component in selection mode.
|
|
42
|
-
*/
|
|
43
|
-
interface VefSelectionDropdownProps extends VefBaseDropdownProps {
|
|
29
|
+
deselectable?: boolean;
|
|
44
30
|
/**
|
|
45
|
-
* Whether to enable selection.
|
|
46
|
-
* @default
|
|
31
|
+
* Whether to enable multiple selection.
|
|
32
|
+
* @default false
|
|
47
33
|
*/
|
|
48
|
-
|
|
34
|
+
multiple?: boolean;
|
|
49
35
|
/**
|
|
50
|
-
* The default selected
|
|
36
|
+
* The default selected keys of the dropdown.
|
|
51
37
|
* Used in uncontrolled mode.
|
|
52
38
|
*/
|
|
53
|
-
|
|
39
|
+
defaultSelectedKeys?: Array<MenuItemKey<T>>;
|
|
54
40
|
/**
|
|
55
|
-
* The selected
|
|
41
|
+
* The selected keys of the dropdown.
|
|
56
42
|
* Used in controlled mode.
|
|
57
43
|
*/
|
|
58
|
-
|
|
44
|
+
selectedKeys?: Array<MenuItemKey<T>>;
|
|
45
|
+
/**
|
|
46
|
+
* The callback function when the selected keys are changed.
|
|
47
|
+
*/
|
|
48
|
+
onChange?: Consumer<Array<MenuItemKey<T>>>;
|
|
59
49
|
/**
|
|
60
|
-
* The callback function when the
|
|
50
|
+
* The callback function when the dropdown item is selected.
|
|
61
51
|
*/
|
|
62
|
-
|
|
52
|
+
onSelect?: BiConsumer<MenuItemKey<T>, Array<MenuItemKey<T>>>;
|
|
53
|
+
/**
|
|
54
|
+
* The callback function when the dropdown item is deselected.
|
|
55
|
+
*/
|
|
56
|
+
onDeselect?: BiConsumer<MenuItemKey<T>, Array<MenuItemKey<T>>>;
|
|
57
|
+
/**
|
|
58
|
+
* The callback function when the dropdown item is clicked.
|
|
59
|
+
*/
|
|
60
|
+
onClick?: BiConsumer<MenuItemKey<T>, Array<MenuItemKey<T>>>;
|
|
63
61
|
}
|
|
64
|
-
/**
|
|
65
|
-
* The props of the VefDropdown component.
|
|
66
|
-
*/
|
|
67
|
-
export type VefDropdownProps = VefDefaultDropdownProps | VefSelectionDropdownProps;
|
|
68
|
-
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type ForwardRefExoticComponent, type RefAttributes } from "react";
|
|
2
|
+
import type { DynamicIconName, VefDynamicIconProps } from "./props";
|
|
3
|
+
declare const VefDynamicIcon: ForwardRefExoticComponent<VefDynamicIconProps & RefAttributes<HTMLSpanElement>>;
|
|
4
|
+
export type { DynamicIconName, VefDynamicIconProps };
|
|
5
|
+
export default VefDynamicIcon;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
|
|
2
|
+
import{jsx as o}from"@emotion/react/jsx-runtime";import{useThemeTokens as r}from"@vef-framework/hooks";import e from"lucide-react/dynamicIconImports";import{forwardRef as t,lazy as i,Suspense as n}from"react";import m from"../vef-icon/index.js";function c(){const{colorFillContent:e}=r();return o("svg",{"aria-label":"Loading icon",height:"1em",role:"img",viewBox:"0 0 100 100",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:o("rect",{fill:e,height:"100",rx:"20",width:"100"})})}const a=o(c,{}),l=new Map,f=t((({name:r,...t},c)=>{if(!l.has(r)){const o=i(e[r]);l.set(r,o)}const f=l.get(r);return o(m,{ref:c,...t,children:o(n,{fallback:a,children:o(f,{})})})}));export{f as default};
|
|
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,20 @@
|
|
|
1
|
+
import type { Except } from "@vef-framework/shared";
|
|
2
|
+
import dynamicIconImports from "lucide-react/dynamicIconImports";
|
|
3
|
+
import type { VefIconProps } from "../vef-icon";
|
|
4
|
+
/**
|
|
5
|
+
* The name of the icon.
|
|
6
|
+
*/
|
|
7
|
+
export type DynamicIconName = keyof typeof dynamicIconImports;
|
|
8
|
+
/**
|
|
9
|
+
* The props of the VefDynamicIcon component.
|
|
10
|
+
*/
|
|
11
|
+
export interface VefDynamicIconProps extends Except<VefIconProps, "ref" | "children"> {
|
|
12
|
+
/**
|
|
13
|
+
* The name of the icon.
|
|
14
|
+
*/
|
|
15
|
+
name: DynamicIconName;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The names of the icons.
|
|
19
|
+
*/
|
|
20
|
+
export declare const dynamicIconNames: DynamicIconName[];
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! VefFramework version: 1.0.9, build time: 2024-12-19T05:12:56.660Z, made by Venus. */
|
|
2
|
+
import c from"lucide-react/dynamicIconImports";const o=Object.keys(c);export{o as dynamicIconNames};
|
|
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-empty/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
2
|
-
import{jsx as t}from"@emotion/react/jsx-runtime";import{Empty as
|
|
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{isNullish as e}from"@vef-framework/shared";import{Empty as r}from"antd";import{useMemo as o}from"react";const{PRESENTED_IMAGE_DEFAULT:m,PRESENTED_IMAGE_SIMPLE:a}=r,i=({icon:i,iconStyle:E,presetIcon:f="default",...n})=>{const c=o((()=>e(i)?"default"===f?m:a:i),[i,f]);return t(r,{image:c,imageStyle:E,...n})};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 */
|
|
@@ -1,7 +1,22 @@
|
|
|
1
1
|
import type { Except } from "@vef-framework/shared";
|
|
2
2
|
import type { EmptyProps } from "antd";
|
|
3
|
+
import type { CSSProperties, ReactNode } from "react";
|
|
3
4
|
/**
|
|
4
5
|
* The props of VefEmpty component.
|
|
5
6
|
*/
|
|
6
|
-
export interface VefEmptyProps extends Except<EmptyProps, "prefixCls" | "rootClassName"> {
|
|
7
|
+
export interface VefEmptyProps extends Except<EmptyProps, "prefixCls" | "rootClassName" | "image" | "imageStyle"> {
|
|
8
|
+
/**
|
|
9
|
+
* The icon to display.
|
|
10
|
+
* When is string, it will be used as the `image` src.
|
|
11
|
+
* When is set, the `presetIcon` will be ignored.
|
|
12
|
+
*/
|
|
13
|
+
icon?: string | ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* The style of the icon.
|
|
16
|
+
*/
|
|
17
|
+
iconStyle?: CSSProperties;
|
|
18
|
+
/**
|
|
19
|
+
* The preset icon to display.
|
|
20
|
+
*/
|
|
21
|
+
presetIcon?: "default" | "simple";
|
|
7
22
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
2
|
-
import{jsx as e}from"@emotion/react/jsx-runtime";import{css as r}from"@emotion/react";import{themeVariables 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 r}from"@emotion/react";import{themeVariables as t,styles as m}from"@vef-framework/shared";import o from"../vef-empty/index.js";const i=r`
|
|
3
3
|
height: 100%;
|
|
4
|
-
padding: ${
|
|
5
|
-
${
|
|
6
|
-
`,
|
|
4
|
+
padding: ${t.paddingLg};
|
|
5
|
+
${m.flexCenter}
|
|
6
|
+
`,s=({className:r,style:t,...m})=>e("div",{className:r,css:i,style:t,children:e(o,{...m})});export{s as default};
|
|
7
7
|
/*! 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 SVGProps } from "react";
|
|
2
2
|
declare function SvgErrorIcon(props: SVGProps<SVGSVGElement>): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
3
3
|
declare const Memo: import("react").MemoExoticComponent<typeof SvgErrorIcon>;
|
|
4
4
|
export default Memo;
|