@vef-framework-react/components 2.12.0 → 2.13.1
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/dist/cjs/index.cjs +1 -1
- package/dist/cjs/pro-search/components/advanced-search-toggler.cjs +1 -1
- package/dist/cjs/pro-search/styles.cjs +1 -1
- package/dist/cjs/select/hooks/index.cjs +1 -1
- package/dist/cjs/select/hooks/use-code-set-options-select.cjs +1 -0
- package/dist/cjs/select/index.cjs +1 -1
- package/dist/es/_base/constants/breakpoints.js +1 -1
- package/dist/es/_base/constants/common.js +1 -1
- package/dist/es/_base/constants/css-vars.js +1 -1
- package/dist/es/_base/constants/event.js +1 -1
- package/dist/es/_base/constants/index.js +1 -1
- package/dist/es/_base/constants/symbols.js +1 -1
- package/dist/es/_base/constants/theme.js +1 -1
- package/dist/es/_base/globals.js +1 -1
- package/dist/es/_base/helpers/breakpoints.js +1 -1
- package/dist/es/_base/helpers/color.js +1 -1
- package/dist/es/_base/helpers/common.js +1 -1
- package/dist/es/_base/helpers/event.js +1 -1
- package/dist/es/_base/helpers/index.js +1 -1
- package/dist/es/_base/helpers/message.js +1 -1
- package/dist/es/_base/helpers/modal.js +1 -1
- package/dist/es/_base/helpers/notification.js +1 -1
- package/dist/es/_base/helpers/props.js +1 -1
- package/dist/es/_base/helpers/react.js +1 -1
- package/dist/es/_base/hooks/index.js +1 -1
- package/dist/es/_base/hooks/use-theme-tokens.js +1 -1
- package/dist/es/_base/index.js +1 -1
- package/dist/es/_base/styles/common.js +1 -1
- package/dist/es/_base/styles/index.js +1 -1
- package/dist/es/_base/types/breakpoints.js +1 -1
- package/dist/es/_base/types/common.js +1 -1
- package/dist/es/_base/types/index.js +1 -1
- package/dist/es/action-button/index.js +1 -1
- package/dist/es/action-button/use-action-button.js +1 -1
- package/dist/es/action-group/index.js +1 -1
- package/dist/es/action-group/use-action-group.js +1 -1
- package/dist/es/action-group/use-computed-action-buttons.js +1 -1
- package/dist/es/affix/index.js +1 -1
- package/dist/es/alert/index.js +1 -1
- package/dist/es/anchor/index.js +1 -1
- package/dist/es/auto-complete/index.js +1 -1
- package/dist/es/avatar/index.js +1 -1
- package/dist/es/badge/index.js +1 -1
- package/dist/es/bool/index.js +1 -1
- package/dist/es/border-beam/index.js +1 -1
- package/dist/es/breadcrumb/index.js +1 -1
- package/dist/es/button/index.js +1 -1
- package/dist/es/calendar/index.js +1 -1
- package/dist/es/card/index.js +1 -1
- package/dist/es/carousel/index.js +1 -1
- package/dist/es/cascader/index.js +1 -1
- package/dist/es/center/index.js +1 -1
- package/dist/es/charts/chart.js +1 -1
- package/dist/es/charts/helpers/group.js +1 -1
- package/dist/es/charts/helpers/index.js +1 -1
- package/dist/es/charts/hooks/index.js +1 -1
- package/dist/es/charts/hooks/use-chart.js +1 -1
- package/dist/es/charts/index.js +1 -1
- package/dist/es/charts/themes/index.js +1 -1
- package/dist/es/charts/themes/walden-dark.js +1 -1
- package/dist/es/charts/themes/walden.js +1 -1
- package/dist/es/charts/themes/wonderland-dark.js +1 -1
- package/dist/es/charts/themes/wonderland.js +1 -1
- package/dist/es/checkbox/index.js +1 -1
- package/dist/es/code-editor/completions.js +1 -1
- package/dist/es/code-editor/format.js +1 -1
- package/dist/es/code-editor/index.js +1 -1
- package/dist/es/code-highlighter/index.js +1 -1
- package/dist/es/col/index.js +1 -1
- package/dist/es/collapse/index.js +1 -1
- package/dist/es/color-picker/index.js +1 -1
- package/dist/es/compact/index.js +1 -1
- package/dist/es/config-provider/app.js +1 -1
- package/dist/es/config-provider/constants.js +1 -1
- package/dist/es/config-provider/context-holder.js +1 -1
- package/dist/es/config-provider/css-vars.js +1 -1
- package/dist/es/config-provider/dark-mode-context.js +1 -1
- package/dist/es/config-provider/error-fallback.js +1 -1
- package/dist/es/config-provider/global-style.js +1 -1
- package/dist/es/config-provider/index.js +1 -1
- package/dist/es/config-provider/theme-config.js +1 -1
- package/dist/es/config-provider/use-config-provider.js +1 -1
- package/dist/es/crud/components/action-button-group.js +1 -1
- package/dist/es/crud/components/index.js +1 -1
- package/dist/es/crud/components/main.js +1 -1
- package/dist/es/crud/components/mutation-holder.js +1 -1
- package/dist/es/crud/components/operation-button-group.js +1 -1
- package/dist/es/crud/components/scene-form.js +1 -1
- package/dist/es/crud/components/selection-indicator.js +1 -1
- package/dist/es/crud/components/toolbar-actions.js +1 -1
- package/dist/es/crud/components/toolbar.js +1 -1
- package/dist/es/crud/event.js +1 -1
- package/dist/es/crud/helpers.js +1 -1
- package/dist/es/crud/hooks/index.js +1 -1
- package/dist/es/crud/hooks/use-query-observer.js +1 -1
- package/dist/es/crud/hooks/use-search-values.js +1 -1
- package/dist/es/crud/hooks/use-selected-rows.js +1 -1
- package/dist/es/crud/index.js +1 -1
- package/dist/es/crud/store.js +1 -1
- package/dist/es/crud/styles.js +1 -1
- package/dist/es/crud-page/index.js +1 -1
- package/dist/es/date-picker/index.js +1 -1
- package/dist/es/descriptions/index.js +1 -1
- package/dist/es/divider/index.js +1 -1
- package/dist/es/drawer/index.js +1 -1
- package/dist/es/dropdown/index.js +1 -1
- package/dist/es/dynamic-icon/index.js +1 -1
- package/dist/es/dynamic-icon/load-icon-node.js +1 -1
- package/dist/es/dynamic-icon/placeholder-icon.js +1 -1
- package/dist/es/dynamic-icon/unknown-icon.js +1 -1
- package/dist/es/editable-table/components/add-row-button.js +1 -1
- package/dist/es/editable-table/components/editable-cell.js +1 -1
- package/dist/es/editable-table/components/editable-row-actions.js +1 -1
- package/dist/es/editable-table/components/index.js +1 -1
- package/dist/es/editable-table/helpers.js +1 -1
- package/dist/es/editable-table/hooks/index.js +1 -1
- package/dist/es/editable-table/hooks/use-editable-actions.js +1 -1
- package/dist/es/editable-table/hooks/use-editable-columns.js +1 -1
- package/dist/es/editable-table/index.js +1 -1
- package/dist/es/editable-table/store.js +1 -1
- package/dist/es/empty/empty.js +1 -1
- package/dist/es/empty/index.js +1 -1
- package/dist/es/file-preview/index.js +1 -1
- package/dist/es/file-upload/helpers.js +1 -1
- package/dist/es/file-upload/index.js +1 -1
- package/dist/es/flex/index.js +1 -1
- package/dist/es/flex-card/index.js +1 -1
- package/dist/es/flex-card/styles.js +1 -1
- package/dist/es/flex-tabs/index.js +1 -1
- package/dist/es/flex-tabs/styles.js +1 -1
- package/dist/es/flip-text/index.js +1 -1
- package/dist/es/float-button/index.js +1 -1
- package/dist/es/form/components/form.js +1 -1
- package/dist/es/form/components/index.js +1 -1
- package/dist/es/form/components/reset-button.js +1 -1
- package/dist/es/form/components/submit-button.js +1 -1
- package/dist/es/form/contexts/form-context.js +1 -1
- package/dist/es/form/contexts/form-layout.js +1 -1
- package/dist/es/form/contexts/index.js +1 -1
- package/dist/es/form/fields/auto-complete/index.js +1 -1
- package/dist/es/form/fields/bool/index.js +1 -1
- package/dist/es/form/fields/cascader/index.js +1 -1
- package/dist/es/form/fields/checkbox/index.js +1 -1
- package/dist/es/form/fields/code-editor/index.js +1 -1
- package/dist/es/form/fields/color-picker/index.js +1 -1
- package/dist/es/form/fields/date-picker/index.js +1 -1
- package/dist/es/form/fields/date-range-picker/index.js +1 -1
- package/dist/es/form/fields/icon-picker/index.js +1 -1
- package/dist/es/form/fields/index.js +1 -1
- package/dist/es/form/fields/input/index.js +1 -1
- package/dist/es/form/fields/input-number/index.js +1 -1
- package/dist/es/form/fields/mentions/index.js +1 -1
- package/dist/es/form/fields/password/index.js +1 -1
- package/dist/es/form/fields/radio/index.js +1 -1
- package/dist/es/form/fields/rate/index.js +1 -1
- package/dist/es/form/fields/select/index.js +1 -1
- package/dist/es/form/fields/slider/index.js +1 -1
- package/dist/es/form/fields/textarea/index.js +1 -1
- package/dist/es/form/fields/time-picker/index.js +1 -1
- package/dist/es/form/fields/time-range-picker/index.js +1 -1
- package/dist/es/form/fields/transfer/index.js +1 -1
- package/dist/es/form/fields/tree-select/index.js +1 -1
- package/dist/es/form/fields/upload/index.js +1 -1
- package/dist/es/form/form-actions.js +1 -1
- package/dist/es/form/form.js +1 -1
- package/dist/es/form/helpers/create-field.js +1 -1
- package/dist/es/form/helpers/index.js +1 -1
- package/dist/es/form/helpers/with-form-item.js +1 -1
- package/dist/es/form/hooks/use-form-item-props.js +1 -1
- package/dist/es/form/hooks/use-label-width.js +1 -1
- package/dist/es/form/index.js +1 -1
- package/dist/es/form/use-form.js +1 -1
- package/dist/es/form-drawer/index.js +1 -1
- package/dist/es/form-modal/index.js +1 -1
- package/dist/es/generic-select/index.js +1 -1
- package/dist/es/grid/context.js +1 -1
- package/dist/es/grid/grid-item.js +1 -1
- package/dist/es/grid/hooks/index.js +1 -1
- package/dist/es/grid/hooks/use-container-breakpoints.js +1 -1
- package/dist/es/grid/hooks/use-container-width.js +1 -1
- package/dist/es/grid/hooks/use-grid-collapsed.js +1 -1
- package/dist/es/grid/hooks/use-normalized-gap.js +1 -1
- package/dist/es/grid/hooks/use-responsive-breakpoint.js +1 -1
- package/dist/es/grid/hooks/use-responsive-value.js +1 -1
- package/dist/es/grid/index.js +1 -1
- package/dist/es/grid/styles.js +1 -1
- package/dist/es/group/index.js +1 -1
- package/dist/es/icon/index.js +1 -1
- package/dist/es/icon-button/index.js +1 -1
- package/dist/es/icon-picker/icon-grid.js +1 -1
- package/dist/es/icon-picker/index.js +1 -1
- package/dist/es/image/index.js +1 -1
- package/dist/es/index.js +4 -4
- package/dist/es/input/index.js +1 -1
- package/dist/es/input-number/index.js +1 -1
- package/dist/es/keyboard/index.js +1 -1
- package/dist/es/labeled/index.js +1 -1
- package/dist/es/labels/index.js +1 -1
- package/dist/es/list/index.js +1 -1
- package/dist/es/loader/index.js +1 -1
- package/dist/es/logo-icon/index.js +1 -1
- package/dist/es/mentions/index.js +1 -1
- package/dist/es/menu/index.js +1 -1
- package/dist/es/modal/index.js +1 -1
- package/dist/es/modal/modal.js +1 -1
- package/dist/es/operation-button/index.js +1 -1
- package/dist/es/page/components/aside-panel.js +1 -1
- package/dist/es/page/components/index.js +1 -1
- package/dist/es/page/components/resize-handle.js +1 -1
- package/dist/es/page/components/scroll-content.js +1 -1
- package/dist/es/page/entrance.js +1 -1
- package/dist/es/page/hooks/index.js +1 -1
- package/dist/es/page/hooks/use-page-key.js +1 -1
- package/dist/es/page/hooks/use-resize.js +1 -1
- package/dist/es/page/index.js +1 -1
- package/dist/es/page/styles.js +1 -1
- package/dist/es/page/viewport-context.js +1 -1
- package/dist/es/pagination/index.js +1 -1
- package/dist/es/permission-gate/index.js +1 -1
- package/dist/es/popconfirm/index.js +1 -1
- package/dist/es/popover/index.js +1 -1
- package/dist/es/pro-search/components/advanced-search-toggler.js +2 -2
- package/dist/es/pro-search/components/advanced-search.js +1 -1
- package/dist/es/pro-search/components/index.js +1 -1
- package/dist/es/pro-search/components/search-actions.js +1 -1
- package/dist/es/pro-search/index.js +1 -1
- package/dist/es/pro-search/styles.js +12 -7
- package/dist/es/pro-table/components/column-setting-item.js +1 -1
- package/dist/es/pro-table/components/column-settings-panel.js +1 -1
- package/dist/es/pro-table/components/column-settings.js +1 -1
- package/dist/es/pro-table/components/index.js +1 -1
- package/dist/es/pro-table/components/operation-button-group.js +1 -1
- package/dist/es/pro-table/components/ref.js +1 -1
- package/dist/es/pro-table/components/table-subscriber.js +1 -1
- package/dist/es/pro-table/components/table-summary.js +1 -1
- package/dist/es/pro-table/components/table-title.js +1 -1
- package/dist/es/pro-table/components/table.js +1 -1
- package/dist/es/pro-table/components/width-popover.js +1 -1
- package/dist/es/pro-table/context.js +1 -1
- package/dist/es/pro-table/event.js +1 -1
- package/dist/es/pro-table/hooks/index.js +1 -1
- package/dist/es/pro-table/hooks/use-column-settings-persistence.js +1 -1
- package/dist/es/pro-table/hooks/use-row-selection.js +1 -1
- package/dist/es/pro-table/hooks/use-table-columns.js +1 -1
- package/dist/es/pro-table/index.js +1 -1
- package/dist/es/pro-table/store.js +1 -1
- package/dist/es/progress/index.js +1 -1
- package/dist/es/qrcode/index.js +1 -1
- package/dist/es/radio/index.js +1 -1
- package/dist/es/rate/index.js +1 -1
- package/dist/es/result/index.js +1 -1
- package/dist/es/row/index.js +1 -1
- package/dist/es/scroll-area/index.js +1 -1
- package/dist/es/scroll-area/styles.js +1 -1
- package/dist/es/segmented/index.js +1 -1
- package/dist/es/select/hooks/index.js +4 -4
- package/dist/es/select/hooks/use-code-set-options-select.js +55 -0
- package/dist/es/select/hooks/use-data-options-select.js +1 -1
- package/dist/es/select/index.js +4 -4
- package/dist/es/skeleton/index.js +1 -1
- package/dist/es/slider/index.js +1 -1
- package/dist/es/space/index.js +1 -1
- package/dist/es/space/space.js +1 -1
- package/dist/es/sparkles-text/index.js +1 -1
- package/dist/es/sparkles-text/sparkle.js +1 -1
- package/dist/es/spin/index.js +1 -1
- package/dist/es/split-text/index.js +1 -1
- package/dist/es/splitter/index.js +1 -1
- package/dist/es/stack/index.js +1 -1
- package/dist/es/statistic/index.js +1 -1
- package/dist/es/steps/index.js +1 -1
- package/dist/es/switch/index.js +1 -1
- package/dist/es/table/index.js +1 -1
- package/dist/es/table/use-pagination-props.js +1 -1
- package/dist/es/tabs/index.js +1 -1
- package/dist/es/tag/index.js +1 -1
- package/dist/es/time-picker/index.js +1 -1
- package/dist/es/timeline/index.js +1 -1
- package/dist/es/tooltip/index.js +1 -1
- package/dist/es/tour/index.js +1 -1
- package/dist/es/transfer/index.js +1 -1
- package/dist/es/tree/hooks/index.js +1 -1
- package/dist/es/tree/hooks/use-data-options-tree.js +1 -1
- package/dist/es/tree/index.js +1 -1
- package/dist/es/tree-select/hooks/index.js +1 -1
- package/dist/es/tree-select/hooks/use-data-options-tree-select.js +1 -1
- package/dist/es/tree-select/index.js +1 -1
- package/dist/es/typing-animation/index.js +1 -1
- package/dist/es/typography/index.js +1 -1
- package/dist/es/upload/helpers.js +1 -1
- package/dist/es/upload/index.js +1 -1
- package/dist/es/watermark/index.js +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/select/hooks/index.d.ts +1 -1
- package/dist/types/select/hooks/use-code-set-options-select.d.ts +14 -0
- package/dist/types/select/index.d.ts +1 -1
- package/package.json +4 -4
- package/dist/cjs/select/hooks/use-dictionary-options-select.cjs +0 -1
- package/dist/es/select/hooks/use-dictionary-options-select.js +0 -55
- package/dist/types/select/hooks/use-dictionary-options-select.d.ts +0 -14
package/dist/es/steps/index.js
CHANGED
package/dist/es/switch/index.js
CHANGED
package/dist/es/table/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.
|
|
1
|
+
/*! @vef-framework-react/components v2.13.1 made by Venus | 2026-07-28T11:21:20.717Z */
|
|
2
2
|
import { globalCssVars as e } from "../_base/constants/css-vars.js";
|
|
3
3
|
import { fullHeight as t } from "../_base/styles/common.js";
|
|
4
4
|
import { pageSizeOptions as n, usePaginationProps as r } from "./use-pagination-props.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.
|
|
1
|
+
/*! @vef-framework-react/components v2.13.1 made by Venus | 2026-07-28T11:21:20.717Z */
|
|
2
2
|
import { Fragment as e, jsx as t, jsxs as n } from "@emotion/react/jsx-runtime";
|
|
3
3
|
import { useMemo as r } from "react";
|
|
4
4
|
//#region src/table/use-pagination-props.tsx
|
package/dist/es/tabs/index.js
CHANGED
package/dist/es/tag/index.js
CHANGED
package/dist/es/tooltip/index.js
CHANGED
package/dist/es/tour/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.
|
|
1
|
+
/*! @vef-framework-react/components v2.13.1 made by Venus | 2026-07-28T11:21:20.717Z */
|
|
2
2
|
import { useDataOptionsTree as e } from "./use-data-options-tree.js";
|
|
3
3
|
export { e as useDataOptionsTree };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.
|
|
1
|
+
/*! @vef-framework-react/components v2.13.1 made by Venus | 2026-07-28T11:21:20.717Z */
|
|
2
2
|
import { filterTreeWithAncestors as e, isString as t } from "@vef-framework-react/shared";
|
|
3
3
|
import { useDataOptionsQuery as n } from "@vef-framework-react/hooks";
|
|
4
4
|
import { useEffect as r, useEffectEvent as i, useMemo as a, useState as o } from "react";
|
package/dist/es/tree/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.
|
|
1
|
+
/*! @vef-framework-react/components v2.13.1 made by Venus | 2026-07-28T11:21:20.717Z */
|
|
2
2
|
import { useDataOptionsTree as e } from "./hooks/use-data-options-tree.js";
|
|
3
3
|
import { Tree as t } from "antd";
|
|
4
4
|
export { t as Tree, e as useDataOptionsTree };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.
|
|
1
|
+
/*! @vef-framework-react/components v2.13.1 made by Venus | 2026-07-28T11:21:20.717Z */
|
|
2
2
|
import { useDataOptionsTreeSelect as e } from "./use-data-options-tree-select.js";
|
|
3
3
|
export { e as useDataOptionsTreeSelect };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.
|
|
1
|
+
/*! @vef-framework-react/components v2.13.1 made by Venus | 2026-07-28T11:21:20.717Z */
|
|
2
2
|
import { Loader as e } from "../../loader/index.js";
|
|
3
3
|
import { jsx as t } from "@emotion/react/jsx-runtime";
|
|
4
4
|
import { isString as n } from "@vef-framework-react/shared";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.
|
|
1
|
+
/*! @vef-framework-react/components v2.13.1 made by Venus | 2026-07-28T11:21:20.717Z */
|
|
2
2
|
import { useDataOptionsTreeSelect as e } from "./hooks/use-data-options-tree-select.js";
|
|
3
3
|
import { TreeSelect as t } from "antd";
|
|
4
4
|
export { t as TreeSelect, e as useDataOptionsTreeSelect };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.
|
|
1
|
+
/*! @vef-framework-react/components v2.13.1 made by Venus | 2026-07-28T11:21:20.717Z */
|
|
2
2
|
import { jsx as e } from "@emotion/react/jsx-runtime";
|
|
3
3
|
import { Children as t, useEffect as n, useRef as r, useState as i } from "react";
|
|
4
4
|
import { motion as a, useInView as o } from "@vef-framework-react/core";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.
|
|
1
|
+
/*! @vef-framework-react/components v2.13.1 made by Venus | 2026-07-28T11:21:20.717Z */
|
|
2
2
|
import { Typography as e } from "antd";
|
|
3
3
|
//#region src/typography/index.ts
|
|
4
4
|
var { Text: t, Link: n, Title: r, Paragraph: i } = e;
|
package/dist/es/upload/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.
|
|
1
|
+
/*! @vef-framework-react/components v2.13.1 made by Venus | 2026-07-28T11:21:20.717Z */
|
|
2
2
|
import { showWarningMessage as e } from "../_base/helpers/message.js";
|
|
3
3
|
import { mergeProps as t } from "../_base/helpers/props.js";
|
|
4
4
|
import { Button as n } from "../button/index.js";
|
package/dist/types/index.d.ts
CHANGED
|
@@ -81,7 +81,7 @@ export { Result, type ResultProps } from './result';
|
|
|
81
81
|
export { Row, type RowProps } from './row';
|
|
82
82
|
export { ScrollArea, type ScrollAreaProps, type ScrollAreaScrollbars } from './scroll-area';
|
|
83
83
|
export { Segmented, type SegmentedOption, type SegmentedProps } from './segmented';
|
|
84
|
-
export { Select,
|
|
84
|
+
export { Select, useCodeSetOptionsSelect, useDataOptionsSelect, type SelectOption, type SelectProps, type UseCodeSetOptionsSelectOptions, type UseCodeSetOptionsSelectResult, type UseDataOptionsSelectOptions } from './select';
|
|
85
85
|
export { Skeleton, type SkeletonButtonProps, type SkeletonImageProps, type SkeletonInputProps, type SkeletonNodeProps, type SkeletonParagraphProps, type SkeletonProps, type SkeletonTitleProps } from './skeleton';
|
|
86
86
|
export { Slider, type SliderProps, type SliderRangeProps, type SliderSingleProps } from './slider';
|
|
87
87
|
export { Space, type SpaceProps } from './space';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
+
export { useCodeSetOptionsSelect, type UseCodeSetOptionsSelectOptions, type UseCodeSetOptionsSelectResult } from './use-code-set-options-select';
|
|
1
2
|
export { useDataOptionsSelect, type UseDataOptionsSelectOptions } from './use-data-options-select';
|
|
2
|
-
export { useDictionaryOptionsSelect, type UseDictionaryOptionsSelectOptions, type UseDictionaryOptionsSelectResult } from './use-dictionary-options-select';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DataOption, DataOptionWithPinyin } from '@vef-framework-react/core';
|
|
2
|
+
import { CodeSetAliasMap } from '@vef-framework-react/hooks';
|
|
3
|
+
import { Key } from '@vef-framework-react/shared';
|
|
4
|
+
import { SelectProps } from '..';
|
|
5
|
+
export interface UseCodeSetOptionsSelectOptions {
|
|
6
|
+
/**
|
|
7
|
+
* Whether each select should enable search.
|
|
8
|
+
*
|
|
9
|
+
* @default false
|
|
10
|
+
*/
|
|
11
|
+
filterable?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export type UseCodeSetOptionsSelectResult<T extends CodeSetAliasMap> = Record<Extract<keyof T, string>, SelectProps<Key, DataOptionWithPinyin<DataOption>>>;
|
|
14
|
+
export declare function useCodeSetOptionsSelect<const T extends CodeSetAliasMap>(keys: T, options?: UseCodeSetOptionsSelectOptions): UseCodeSetOptionsSelectResult<T>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DefaultOptionType } from 'antd/es/select';
|
|
2
|
-
export {
|
|
2
|
+
export { useCodeSetOptionsSelect, useDataOptionsSelect, type UseCodeSetOptionsSelectOptions, type UseCodeSetOptionsSelectResult, type UseDataOptionsSelectOptions } from './hooks';
|
|
3
3
|
export { Select } from 'antd';
|
|
4
4
|
export type SelectOption = DefaultOptionType;
|
|
5
5
|
export type { SelectProps } from 'antd';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vef-framework-react/components",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.13.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Components for VEF Framework",
|
|
6
6
|
"keywords": [
|
|
@@ -75,9 +75,9 @@
|
|
|
75
75
|
"react-error-boundary": "^6.1.2",
|
|
76
76
|
"react-syntax-highlighter": "^16.1.1",
|
|
77
77
|
"tslib": "^2.8.1",
|
|
78
|
-
"@vef-framework-react/
|
|
79
|
-
"@vef-framework-react/
|
|
80
|
-
"@vef-framework-react/
|
|
78
|
+
"@vef-framework-react/hooks": "2.13.1",
|
|
79
|
+
"@vef-framework-react/shared": "2.13.1",
|
|
80
|
+
"@vef-framework-react/core": "2.13.1"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
83
|
"@types/react-syntax-highlighter": "^15.5.13",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("../../loader/index.cjs");let t=require("@emotion/react/jsx-runtime"),n=require("@vef-framework-react/shared"),r=require("@vef-framework-react/hooks"),i=require("react"),a=require("@emotion/react");var o={label:`label`,value:`value`,options:`children`,groupLabel:`label`},s=280,c=(0,t.jsx)(`div`,{css:(0,a.css)({height:s/2},process.env.NODE_ENV===`production`?``:`/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInVzZS1kaWN0aW9uYXJ5LW9wdGlvbnMtc2VsZWN0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF1Q08iLCJmaWxlIjoidXNlLWRpY3Rpb25hcnktb3B0aW9ucy1zZWxlY3QudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHR5cGUgeyBEYXRhT3B0aW9uLCBEYXRhT3B0aW9uV2l0aFBpbnlpbiB9IGZyb20gXCJAdmVmLWZyYW1ld29yay1yZWFjdC9jb3JlXCI7XG5pbXBvcnQgdHlwZSB7IERpY3Rpb25hcnlBbGlhc01hcCB9IGZyb20gXCJAdmVmLWZyYW1ld29yay1yZWFjdC9ob29rc1wiO1xuaW1wb3J0IHR5cGUgeyBL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pXG4gICAgfHwgbGFiZWxQaW55aW4uaW5jbHVkZXMoaW5wdXQpXG4gICAgfHwgbGFiZWxQaW55aW5Jbml0aWFscy5pbmNsdWRlcyhpbnB1dClcbiAgICB8fCBkZXNjcmlwdGlvbj8uaW5jbHVkZXMoaW5wdXQpXG4gICAgfHwgZGVzY3JpcHRpb25QaW55aW4/LmluY2x1ZGVzKGlucHV0KVxuICAgIHx8IGRlc2NyaXB0aW9uUGlueWluSW5pdGlhbHM/LmluY2x1ZGVzKGlucHV0KVxuICApID8/IGZhbHNlO1xufVxuIl19 */`),children:(0,t.jsx)(e.Loader,{})});function l(e,t){let{filterable:n=!1}=t??{},{data:a,isFetching:l}=(0,r.useDictionaryQuery)(e);return(0,i.useMemo)(()=>Object.fromEntries(Object.entries(e).map(([e,t])=>{let r=typeof t==`string`?n:t.filterable??n;return[e,{options:u(a?.[e]??[]),loading:l,fieldNames:o,maxTagCount:`responsive`,listHeight:s,notFoundContent:l?c:void 0,showSearch:r,filterOption:r&&f}]})),[a,e,l,n])}function u(e){return e.map(e=>d(e))}function d(e){let{children:t,...r}=e,i=Array.isArray(t)&&t.length>0?t.map(e=>d(e)):void 0,a={...r,...(0,n.isArray)(i)&&{children:i}};return(0,n.withPinyin)(a,`label`,`description`)}function f(e,t){if(!t)return!1;let{label:n,labelPinyin:r,labelPinyinInitials:i,description:a,descriptionPinyin:o,descriptionPinyinInitials:s}=t;return(n.includes(e)||r.includes(e)||i.includes(e)||a?.includes(e)||o?.includes(e)||s?.includes(e))??!1}exports.useDictionaryOptionsSelect=l;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/*! @vef-framework-react/components v2.12.0 made by Venus | 2026-07-17T09:22:46.001Z */
|
|
2
|
-
import { Loader as e } from "../../loader/index.js";
|
|
3
|
-
import { jsx as t } from "@emotion/react/jsx-runtime";
|
|
4
|
-
import { isArray as n, withPinyin as r } from "@vef-framework-react/shared";
|
|
5
|
-
import { useDictionaryQuery as i } from "@vef-framework-react/hooks";
|
|
6
|
-
import { useMemo as a } from "react";
|
|
7
|
-
import { css as o } from "@emotion/react";
|
|
8
|
-
//#region src/select/hooks/use-dictionary-options-select.tsx
|
|
9
|
-
var s = {
|
|
10
|
-
label: "label",
|
|
11
|
-
value: "value",
|
|
12
|
-
options: "children",
|
|
13
|
-
groupLabel: "label"
|
|
14
|
-
}, c = 280, l = /* @__PURE__ */ t("div", {
|
|
15
|
-
css: /*#__PURE__*/ o({ height: c / 2 }, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInVzZS1kaWN0aW9uYXJ5LW9wdGlvbnMtc2VsZWN0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF1Q08iLCJmaWxlIjoidXNlLWRpY3Rpb25hcnktb3B0aW9ucy1zZWxlY3QudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHR5cGUgeyBEYXRhT3B0aW9uLCBEYXRhT3B0aW9uV2l0aFBpbnlpbiB9IGZyb20gXCJAdmVmLWZyYW1ld29yay1yZWFjdC9jb3JlXCI7XG5pbXBvcnQgdHlwZSB7IERpY3Rpb25hcnlBbGlhc01hcCB9IGZyb20gXCJAdmVmLWZyYW1ld29yay1yZWFjdC9ob29rc1wiO1xuaW1wb3J0IHR5cGUgeyBLZXkgfSBmcm9tIFwiQHZlZi1mcmFtZXdvcmstcmVhY3Qvc2hhcmVkXCI7XG5cbmltcG9ydCB0eXBlIHsgU2VsZWN0UHJvcHMgfSBmcm9tIFwiLi5cIjtcbmltcG9ydCB0eXBlIHsgR2V0UHJvcCB9IGZyb20gXCIuLi8uLi9fYmFzZVwiO1xuXG5pbXBvcnQgeyB1c2VEaWN0aW9uYXJ5UXVlcnkgfSBmcm9tIFwiQHZlZi1mcmFtZXdvcmstcmVhY3QvaG9va3NcIjtcbmltcG9ydCB7IGlzQXJyYXksIHdpdGhQaW55aW4gfSB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children: /* @__PURE__ */ t(e, {})
|
|
17
|
-
});
|
|
18
|
-
function u(e, t) {
|
|
19
|
-
let { filterable: n = !1 } = t ?? {}, { data: r, isFetching: o } = i(e);
|
|
20
|
-
return a(() => Object.fromEntries(Object.entries(e).map(([e, t]) => {
|
|
21
|
-
let i = typeof t == "string" ? n : t.filterable ?? n;
|
|
22
|
-
return [e, {
|
|
23
|
-
options: d(r?.[e] ?? []),
|
|
24
|
-
loading: o,
|
|
25
|
-
fieldNames: s,
|
|
26
|
-
maxTagCount: "responsive",
|
|
27
|
-
listHeight: c,
|
|
28
|
-
notFoundContent: o ? l : void 0,
|
|
29
|
-
showSearch: i,
|
|
30
|
-
filterOption: i && p
|
|
31
|
-
}];
|
|
32
|
-
})), [
|
|
33
|
-
r,
|
|
34
|
-
e,
|
|
35
|
-
o,
|
|
36
|
-
n
|
|
37
|
-
]);
|
|
38
|
-
}
|
|
39
|
-
function d(e) {
|
|
40
|
-
return e.map((e) => f(e));
|
|
41
|
-
}
|
|
42
|
-
function f(e) {
|
|
43
|
-
let { children: t, ...i } = e, a = Array.isArray(t) && t.length > 0 ? t.map((e) => f(e)) : void 0;
|
|
44
|
-
return r({
|
|
45
|
-
...i,
|
|
46
|
-
...n(a) && { children: a }
|
|
47
|
-
}, "label", "description");
|
|
48
|
-
}
|
|
49
|
-
function p(e, t) {
|
|
50
|
-
if (!t) return !1;
|
|
51
|
-
let { label: n, labelPinyin: r, labelPinyinInitials: i, description: a, descriptionPinyin: o, descriptionPinyinInitials: s } = t;
|
|
52
|
-
return (n.includes(e) || r.includes(e) || i.includes(e) || a?.includes(e) || o?.includes(e) || s?.includes(e)) ?? !1;
|
|
53
|
-
}
|
|
54
|
-
//#endregion
|
|
55
|
-
export { u as useDictionaryOptionsSelect };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { DataOption, DataOptionWithPinyin } from '@vef-framework-react/core';
|
|
2
|
-
import { DictionaryAliasMap } from '@vef-framework-react/hooks';
|
|
3
|
-
import { Key } from '@vef-framework-react/shared';
|
|
4
|
-
import { SelectProps } from '..';
|
|
5
|
-
export interface UseDictionaryOptionsSelectOptions {
|
|
6
|
-
/**
|
|
7
|
-
* Whether each select should enable search.
|
|
8
|
-
*
|
|
9
|
-
* @default false
|
|
10
|
-
*/
|
|
11
|
-
filterable?: boolean;
|
|
12
|
-
}
|
|
13
|
-
export type UseDictionaryOptionsSelectResult<T extends DictionaryAliasMap> = Record<Extract<keyof T, string>, SelectProps<Key, DataOptionWithPinyin<DataOption>>>;
|
|
14
|
-
export declare function useDictionaryOptionsSelect<const T extends DictionaryAliasMap>(keys: T, options?: UseDictionaryOptionsSelectOptions): UseDictionaryOptionsSelectResult<T>;
|