antdv-next 1.0.0-beta.3 → 1.0.0-rc.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/_util/PurePanel.mjs +4 -4
- package/dist/_util/hooks/useClosable.d.mts +0 -1
- package/dist/_util/hooks/useClosable.mjs +1 -1
- package/dist/_util/hooks/useMergeSemantic.d.mts +2 -3
- package/dist/_util/hooks/useMergeSemantic.mjs +9 -9
- package/dist/_util/tools.mjs +1 -1
- package/dist/_util/warning.d.mts +0 -1
- package/dist/affix/index.d.mts +3 -3
- package/dist/alert/Alert.d.mts +24 -7
- package/dist/alert/Alert.mjs +91 -28
- package/dist/anchor/Anchor.d.mts +18 -7
- package/dist/antd.css +1 -1
- package/dist/antd.js +101 -112
- package/dist/app/App.d.mts +2 -2
- package/dist/app/App.mjs +2 -2
- package/dist/auto-complete/index.d.mts +23 -11
- package/dist/auto-complete/index.mjs +1 -1
- package/dist/avatar/Avatar.d.mts +3 -3
- package/dist/avatar/AvatarGroup.d.mts +2 -2
- package/dist/avatar/style/index.mjs +2 -2
- package/dist/badge/Ribbon.d.mts +21 -5
- package/dist/badge/Ribbon.mjs +44 -23
- package/dist/badge/SingleNumber.mjs +2 -1
- package/dist/badge/index.d.mts +14 -7
- package/dist/badge/style/ribbon.mjs +1 -1
- package/dist/breadcrumb/Breadcrumb.d.mts +17 -6
- package/dist/breadcrumb/Breadcrumb.mjs +18 -3
- package/dist/breadcrumb/BreadcrumbItem.d.mts +1 -0
- package/dist/breadcrumb/BreadcrumbItem.mjs +29 -4
- package/dist/breadcrumb/style/index.mjs +5 -5
- package/dist/button/Button.d.mts +18 -10
- package/dist/button/buttonHelper.d.mts +0 -1
- package/dist/button/index.d.mts +1 -1
- package/dist/button/style/compact.mjs +28 -19
- package/dist/button/style/token.d.mts +0 -5
- package/dist/button/style/variant.mjs +27 -3
- package/dist/calendar/generateCalendar.d.mts +20 -7
- package/dist/calendar/generateCalendar.mjs +1 -1
- package/dist/calendar/index.d.mts +3 -3
- package/dist/card/Card.d.mts +23 -6
- package/dist/card/CardGrid.d.mts +2 -2
- package/dist/card/CardMeta.d.mts +20 -7
- package/dist/carousel/index.d.mts +3 -3
- package/dist/cascader/Panel.d.mts +3 -3
- package/dist/cascader/index.d.mts +31 -10
- package/dist/checkbox/Checkbox.d.mts +16 -7
- package/dist/checkbox/Checkbox.mjs +1 -1
- package/dist/checkbox/Group.d.mts +4 -3
- package/dist/checkbox/Group.mjs +11 -2
- package/dist/collapse/Collapse.d.mts +19 -6
- package/dist/collapse/Collapse.mjs +1 -1
- package/dist/color-picker/ColorPicker.d.mts +3 -3
- package/dist/color-picker/interface.d.mts +15 -7
- package/dist/color-picker/style/input.mjs +2 -0
- package/dist/components.d.mts +2 -3
- package/dist/config-provider/context.d.mts +58 -12
- package/dist/config-provider/context.mjs +3 -3
- package/dist/config-provider/define.d.mts +7 -1
- package/dist/config-provider/index.d.mts +3 -4
- package/dist/config-provider/index.mjs +82 -8
- package/dist/date-picker/generatePicker/index.d.mts +15 -15
- package/dist/date-picker/generatePicker/interface.d.mts +37 -10
- package/dist/date-picker/hooks/useMergedPickerSemantic.mjs +2 -2
- package/dist/date-picker/index.d.mts +25 -25
- package/dist/descriptions/Cell.mjs +5 -5
- package/dist/descriptions/DescriptionsContext.d.mts +13 -0
- package/dist/descriptions/Item.d.mts +3 -3
- package/dist/descriptions/hooks/useRow.mjs +7 -7
- package/dist/descriptions/index.d.mts +22 -7
- package/dist/divider/index.d.mts +15 -5
- package/dist/drawer/DrawerPanel.d.mts +28 -3
- package/dist/drawer/DrawerPanel.mjs +3 -3
- package/dist/drawer/index.d.mts +4 -4
- package/dist/drawer/index.mjs +4 -0
- package/dist/drawer/style/index.mjs +9 -2
- package/dist/dropdown/dropdown.d.mts +20 -7
- package/dist/empty/index.d.mts +18 -7
- package/dist/flex/index.d.mts +3 -3
- package/dist/float-button/BackTop.d.mts +3 -3
- package/dist/float-button/FloatButton.d.mts +6 -7
- package/dist/float-button/FloatButtonGroup.d.mts +25 -6
- package/dist/form/Form.d.mts +16 -7
- package/dist/form/FormItem/index.d.mts +3 -3
- package/dist/form/FormItem/index.mjs +1 -1
- package/dist/form/FormItemInput.d.mts +0 -1
- package/dist/grid/index.d.mts +2 -2
- package/dist/grid/row.d.mts +2 -2
- package/dist/image/PreviewGroup.d.mts +3 -5
- package/dist/image/index.d.mts +34 -14
- package/dist/index.d.mts +3 -4
- package/dist/input/Input.d.mts +17 -4
- package/dist/input/Input.mjs +2 -2
- package/dist/input/OTP/index.d.mts +13 -4
- package/dist/input/Password.mjs +3 -3
- package/dist/input/Search.d.mts +21 -9
- package/dist/input/TextArea.d.mts +16 -7
- package/dist/input/TextArea.mjs +2 -2
- package/dist/input/index.d.mts +11 -11
- package/dist/input/style/index.mjs +5 -2
- package/dist/input/style/variants.mjs +2 -1
- package/dist/input-number/index.d.mts +20 -7
- package/dist/layout/index.d.mts +6 -6
- package/dist/layout/layout.d.mts +2 -3
- package/dist/locale/index.d.mts +0 -1
- package/dist/masonry/Masonry.d.mts +14 -7
- package/dist/masonry/MasonryItem.mjs +2 -2
- package/dist/mentions/index.d.mts +18 -7
- package/dist/mentions/index.mjs +2 -2
- package/dist/mentions/style/index.mjs +2 -2
- package/dist/menu/MenuContext.d.mts +0 -1
- package/dist/menu/MenuDivider.d.mts +2 -2
- package/dist/menu/MenuItem.d.mts +3 -3
- package/dist/menu/MenuItem.mjs +4 -3
- package/dist/menu/SubMenu.d.mts +3 -3
- package/dist/menu/SubMenu.mjs +5 -0
- package/dist/menu/index.d.mts +5 -5
- package/dist/menu/menu.d.mts +42 -10
- package/dist/menu/menu.mjs +2 -2
- package/dist/menu/style/index.d.mts +1 -1
- package/dist/menu/style/vertical.mjs +1 -1
- package/dist/message/PurePanel.d.mts +5 -7
- package/dist/message/index.mjs +2 -2
- package/dist/message/interface.d.mts +20 -4
- package/dist/message/useMessage.d.mts +0 -1
- package/dist/modal/Modal.d.mts +3 -3
- package/dist/modal/confirm.mjs +8 -4
- package/dist/modal/interface.d.mts +22 -3
- package/dist/modal/style/index.mjs +11 -8
- package/dist/notification/PurePanel.d.mts +8 -8
- package/dist/notification/index.mjs +2 -2
- package/dist/notification/interface.d.mts +18 -5
- package/dist/notification/style/index.mjs +8 -8
- package/dist/notification/useNotification.d.mts +2 -3
- package/dist/package.d.mts +4 -0
- package/dist/package.mjs +1 -1
- package/dist/pagination/Pagination.d.mts +3 -3
- package/dist/pagination/Pagination.mjs +11 -10
- package/dist/pagination/interface.d.mts +14 -5
- package/dist/pagination/style/bordered.mjs +2 -2
- package/dist/pagination/style/index.d.mts +10 -5
- package/dist/pagination/style/index.mjs +52 -103
- package/dist/popconfirm/PurePanel.d.mts +5 -7
- package/dist/popconfirm/index.d.mts +8 -6
- package/dist/popconfirm/index.mjs +7 -3
- package/dist/popover/index.d.mts +16 -9
- package/dist/popover/index.mjs +8 -5
- package/dist/progress/Line.mjs +3 -3
- package/dist/progress/progress.d.mts +20 -7
- package/dist/qrcode/index.d.mts +3 -3
- package/dist/qrcode/index.mjs +2 -1
- package/dist/qrcode/interface.d.mts +11 -3
- package/dist/radio/group.mjs +3 -3
- package/dist/radio/index.d.mts +5 -5
- package/dist/radio/interface.d.mts +13 -3
- package/dist/radio/radio.d.mts +3 -3
- package/dist/radio/radio.mjs +1 -1
- package/dist/rate/index.d.mts +3 -3
- package/dist/result/index.d.mts +22 -7
- package/dist/result/index.mjs +11 -6
- package/dist/result/noFound.d.mts +2 -2
- package/dist/result/serverError.d.mts +2 -2
- package/dist/result/unauthorized.d.mts +2 -2
- package/dist/segmented/index.d.mts +18 -7
- package/dist/select/index.d.mts +48 -20
- package/dist/skeleton/Avatar.d.mts +2 -2
- package/dist/skeleton/Button.d.mts +2 -2
- package/dist/skeleton/Image.d.mts +2 -2
- package/dist/skeleton/Input.d.mts +2 -2
- package/dist/skeleton/Node.d.mts +3 -3
- package/dist/skeleton/Skeleton.d.mts +22 -7
- package/dist/slider/index.d.mts +19 -6
- package/dist/slider/index.mjs +4 -4
- package/dist/space/index.d.mts +18 -9
- package/dist/spin/Indicator/Progress.mjs +3 -3
- package/dist/spin/index.d.mts +19 -6
- package/dist/splitter/SplitBar.mjs +12 -12
- package/dist/splitter/Splitter.d.mts +3 -3
- package/dist/splitter/Splitter.mjs +1 -1
- package/dist/splitter/hooks/useItems.mjs +2 -2
- package/dist/splitter/hooks/useResizable.mjs +5 -5
- package/dist/splitter/hooks/useResize.mjs +2 -2
- package/dist/splitter/index.d.mts +2 -2
- package/dist/splitter/interface.d.mts +21 -7
- package/dist/splitter/style/index.mjs +2 -28
- package/dist/statistic/Statistic.d.mts +21 -6
- package/dist/statistic/Statistic.mjs +1 -1
- package/dist/statistic/Timer.d.mts +5 -5
- package/dist/statistic/index.d.mts +5 -5
- package/dist/steps/context.mjs +5 -2
- package/dist/steps/index.d.mts +31 -9
- package/dist/steps/index.mjs +3 -3
- package/dist/style/motion/fade.mjs +25 -0
- package/dist/switch/index.d.mts +14 -7
- package/dist/switch/index.mjs +2 -2
- package/dist/table/Column.d.mts +3 -3
- package/dist/table/ColumnGroup.d.mts +3 -3
- package/dist/table/InternalTable.d.mts +35 -13
- package/dist/table/InternalTable.mjs +12 -6
- package/dist/table/Table.d.mts +3 -3
- package/dist/table/TableMeasureRowContext.mjs +20 -0
- package/dist/table/hooks/useFilter/FilterDropdown.mjs +17 -12
- package/dist/table/hooks/useSelection.mjs +1 -1
- package/dist/table/interface.d.mts +1 -2
- package/dist/table/style/virtual.mjs +1 -1
- package/dist/tabs/TabPane.d.mts +3 -3
- package/dist/tabs/index.d.mts +27 -11
- package/dist/tabs/index.mjs +5 -5
- package/dist/tag/CheckableTag.d.mts +3 -3
- package/dist/tag/CheckableTagGroup.d.mts +3 -3
- package/dist/tag/index.d.mts +16 -7
- package/dist/tag/index.mjs +1 -1
- package/dist/tag/style/index.mjs +1 -1
- package/dist/theme/index.d.mts +1 -2
- package/dist/theme/interface/maps/index.d.mts +0 -1
- package/dist/theme/useToken.mjs +3 -3
- package/dist/theme/util/genStyleUtils.mjs +3 -2
- package/dist/time-picker/index.d.mts +38 -14
- package/dist/time-picker/index.mjs +1 -1
- package/dist/timeline/Timeline.d.mts +49 -14
- package/dist/timeline/Timeline.mjs +82 -11
- package/dist/timeline/index.d.mts +1 -2
- package/dist/timeline/style/horizontal.mjs +73 -0
- package/dist/timeline/style/index.d.mts +10 -5
- package/dist/timeline/style/index.mjs +93 -137
- package/dist/timeline/useItems.mjs +52 -0
- package/dist/tooltip/PurePanel.d.mts +2 -2
- package/dist/tooltip/UniqueProvider/index.d.mts +2 -2
- package/dist/tooltip/index.d.mts +17 -8
- package/dist/tooltip/index.mjs +11 -3
- package/dist/tooltip/style/index.d.mts +7 -1
- package/dist/tooltip/style/index.mjs +3 -2
- package/dist/tour/index.d.mts +3 -3
- package/dist/tour/index.mjs +1 -1
- package/dist/tour/interface.d.mts +29 -3
- package/dist/transfer/Actions.d.mts +2 -2
- package/dist/transfer/ListItem.mjs +4 -4
- package/dist/transfer/Section.d.mts +2 -2
- package/dist/transfer/Transfer.d.mts +3 -3
- package/dist/transfer/Transfer.mjs +4 -4
- package/dist/transfer/index.d.mts +1 -1
- package/dist/transfer/interface.d.mts +32 -7
- package/dist/transfer/search.d.mts +3 -3
- package/dist/tree/DirectoryTree.d.mts +3 -3
- package/dist/tree/Tree.d.mts +18 -7
- package/dist/tree/index.d.mts +0 -1
- package/dist/tree-select/index.d.mts +41 -12
- package/dist/tree-select/style/index.d.mts +1 -1
- package/dist/typography/Editable.mjs +4 -4
- package/dist/typography/Link.d.mts +3 -3
- package/dist/typography/Paragraph.d.mts +3 -3
- package/dist/typography/Text.d.mts +3 -3
- package/dist/typography/Title.d.mts +3 -3
- package/dist/typography/Typography.d.mts +3 -3
- package/dist/typography/Typography.mjs +2 -12
- package/dist/typography/index.d.mts +9 -10
- package/dist/typography/interface.d.mts +0 -2
- package/dist/typography/style/mixins.mjs +3 -3
- package/dist/upload/Dragger.d.mts +3 -3
- package/dist/upload/Upload.d.mts +3 -4
- package/dist/upload/index.d.mts +3 -3
- package/dist/upload/interface.d.mts +13 -4
- package/dist/watermark/index.d.mts +2 -2
- package/dist/watermark/index.mjs +3 -3
- package/package.json +45 -41
- package/web-tags.json +1918 -1873
- package/web-types.json +6815 -7198
- package/dist/timeline/TimelineItem.d.mts +0 -20
- package/dist/timeline/TimelineItem.mjs +0 -115
- package/dist/timeline/TimelineItemList.mjs +0 -158
|
@@ -3,13 +3,28 @@ import { SemanticClassNamesType, SemanticStylesType } from "../_util/hooks/useMe
|
|
|
3
3
|
import "../_util/hooks/index.mjs";
|
|
4
4
|
import { FormatConfig, valueType } from "./utils.mjs";
|
|
5
5
|
import { ComponentBaseProps } from "../config-provider/context.mjs";
|
|
6
|
-
import * as
|
|
6
|
+
import * as vue299 from "vue";
|
|
7
7
|
import { CSSProperties, SlotsType, VNodeChild } from "vue";
|
|
8
8
|
|
|
9
9
|
//#region src/statistic/Statistic.d.ts
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
interface StatisticSemanticClassNames {
|
|
11
|
+
root?: string;
|
|
12
|
+
content?: string;
|
|
13
|
+
title?: string;
|
|
14
|
+
header?: string;
|
|
15
|
+
prefix?: string;
|
|
16
|
+
suffix?: string;
|
|
17
|
+
}
|
|
18
|
+
interface StatisticSemanticStyles {
|
|
19
|
+
root?: CSSProperties;
|
|
20
|
+
content?: CSSProperties;
|
|
21
|
+
title?: CSSProperties;
|
|
22
|
+
header?: CSSProperties;
|
|
23
|
+
prefix?: CSSProperties;
|
|
24
|
+
suffix?: CSSProperties;
|
|
25
|
+
}
|
|
26
|
+
type StatisticClassNamesType = SemanticClassNamesType<StatisticProps, StatisticSemanticClassNames>;
|
|
27
|
+
type StatisticStylesType = SemanticStylesType<StatisticProps, StatisticSemanticStyles>;
|
|
13
28
|
type StatisticRectProps = FormatConfig & ComponentBaseProps & {
|
|
14
29
|
value?: valueType;
|
|
15
30
|
valueStyle?: CSSProperties;
|
|
@@ -33,7 +48,7 @@ interface StatisticSlots {
|
|
|
33
48
|
prefix: () => any;
|
|
34
49
|
suffix: () => any;
|
|
35
50
|
}
|
|
36
|
-
declare const Statistic:
|
|
51
|
+
declare const Statistic: vue299.DefineSetupFnComponent<StatisticRectProps, StatisticEmits, SlotsType<StatisticSlots>, FormatConfig & ComponentBaseProps & {
|
|
37
52
|
value?: valueType;
|
|
38
53
|
valueStyle?: CSSProperties;
|
|
39
54
|
valueRender?: (node: any) => VNodeChild;
|
|
@@ -45,6 +60,6 @@ declare const Statistic: vue304.DefineSetupFnComponent<StatisticRectProps, Stati
|
|
|
45
60
|
styles?: StatisticStylesType;
|
|
46
61
|
} & {
|
|
47
62
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
48
|
-
},
|
|
63
|
+
}, vue299.PublicProps>;
|
|
49
64
|
//#endregion
|
|
50
65
|
export { Statistic, StatisticClassNamesType, StatisticProps, StatisticSlots, StatisticStylesType };
|
|
@@ -62,7 +62,7 @@ const Statistic = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit,
|
|
|
62
62
|
"style": mergedStyles.value.header
|
|
63
63
|
}, [createVNode("div", {
|
|
64
64
|
"class": titleClassNames,
|
|
65
|
-
"style": mergedStyles.value.
|
|
65
|
+
"style": mergedStyles.value.title
|
|
66
66
|
}, [title])]), createVNode(skeleton_default, {
|
|
67
67
|
"paragraph": false,
|
|
68
68
|
"loading": loading,
|
|
@@ -2,7 +2,7 @@ import { VueNode } from "../_util/type.mjs";
|
|
|
2
2
|
import { FormatConfig, valueType } from "./utils.mjs";
|
|
3
3
|
import { StatisticClassNamesType, StatisticProps, StatisticSlots, StatisticStylesType } from "./Statistic.mjs";
|
|
4
4
|
import { ComponentBaseProps } from "../config-provider/context.mjs";
|
|
5
|
-
import * as
|
|
5
|
+
import * as vue295 from "vue";
|
|
6
6
|
import { SlotsType } from "vue";
|
|
7
7
|
|
|
8
8
|
//#region src/statistic/Timer.d.ts
|
|
@@ -19,10 +19,10 @@ interface StatisticTimeEmits {
|
|
|
19
19
|
change: (value?: valueType) => void;
|
|
20
20
|
[key: string]: (...args: any[]) => any;
|
|
21
21
|
}
|
|
22
|
-
declare const StatisticTimer:
|
|
22
|
+
declare const StatisticTimer: vue295.DefineSetupFnComponent<StatisticTimerProps, StatisticTimeEmits, SlotsType<StatisticSlots>, FormatConfig & ComponentBaseProps & {
|
|
23
23
|
value?: valueType;
|
|
24
|
-
valueStyle?:
|
|
25
|
-
valueRender?: (node: any) =>
|
|
24
|
+
valueStyle?: vue295.CSSProperties;
|
|
25
|
+
valueRender?: (node: any) => vue295.VNodeChild;
|
|
26
26
|
title?: VueNode;
|
|
27
27
|
prefix?: VueNode;
|
|
28
28
|
suffix?: VueNode;
|
|
@@ -34,6 +34,6 @@ declare const StatisticTimer: vue300.DefineSetupFnComponent<StatisticTimerProps,
|
|
|
34
34
|
format?: string;
|
|
35
35
|
} & {
|
|
36
36
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
37
|
-
},
|
|
37
|
+
}, vue295.PublicProps>;
|
|
38
38
|
//#endregion
|
|
39
39
|
export { StatisticTimeEmits, StatisticTimer, StatisticTimerProps, TimerType };
|
|
@@ -3,13 +3,13 @@ import { FormatConfig, valueType } from "./utils.mjs";
|
|
|
3
3
|
import { Statistic, StatisticClassNamesType, StatisticProps, StatisticSlots, StatisticStylesType } from "./Statistic.mjs";
|
|
4
4
|
import { StatisticTimeEmits, StatisticTimer as StatisticTimer$1, StatisticTimerProps, TimerType } from "./Timer.mjs";
|
|
5
5
|
import { ComponentBaseProps } from "../config-provider/context.mjs";
|
|
6
|
-
import * as
|
|
6
|
+
import * as vue165 from "vue";
|
|
7
7
|
|
|
8
8
|
//#region src/statistic/index.d.ts
|
|
9
|
-
declare const StatisticTimer:
|
|
9
|
+
declare const StatisticTimer: vue165.DefineSetupFnComponent<StatisticTimerProps, StatisticTimeEmits, vue165.SlotsType<StatisticSlots>, FormatConfig & ComponentBaseProps & {
|
|
10
10
|
value?: valueType;
|
|
11
|
-
valueStyle?:
|
|
12
|
-
valueRender?: (node: any) =>
|
|
11
|
+
valueStyle?: vue165.CSSProperties;
|
|
12
|
+
valueRender?: (node: any) => vue165.VNodeChild;
|
|
13
13
|
title?: VueNode;
|
|
14
14
|
prefix?: VueNode;
|
|
15
15
|
suffix?: VueNode;
|
|
@@ -21,7 +21,7 @@ declare const StatisticTimer: vue94.DefineSetupFnComponent<StatisticTimerProps,
|
|
|
21
21
|
format?: string;
|
|
22
22
|
} & {
|
|
23
23
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
24
|
-
},
|
|
24
|
+
}, vue165.PublicProps>;
|
|
25
25
|
declare const _default: typeof Statistic & {
|
|
26
26
|
Timer: typeof StatisticTimer$1;
|
|
27
27
|
};
|
package/dist/steps/context.mjs
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { inject, ref } from "vue";
|
|
1
|
+
import { inject, provide, ref } from "vue";
|
|
2
2
|
|
|
3
3
|
//#region src/steps/context.ts
|
|
4
4
|
const InternalContext = Symbol("InternalContext");
|
|
5
|
+
function provideInternalContext(value) {
|
|
6
|
+
provide(InternalContext, value);
|
|
7
|
+
}
|
|
5
8
|
/**
|
|
6
9
|
* When use this context. Will trade as sub component instead of root Steps component.
|
|
7
10
|
*/
|
|
@@ -10,4 +13,4 @@ function useInternalContext() {
|
|
|
10
13
|
}
|
|
11
14
|
|
|
12
15
|
//#endregion
|
|
13
|
-
export { useInternalContext };
|
|
16
|
+
export { provideInternalContext, useInternalContext };
|
package/dist/steps/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VueNode } from "../_util/type.mjs";
|
|
2
2
|
import { SemanticClassNamesType, SemanticStylesType } from "../_util/hooks/useMergeSemantic.mjs";
|
|
3
3
|
import "../_util/hooks/index.mjs";
|
|
4
|
-
import * as
|
|
4
|
+
import * as vue170 from "vue";
|
|
5
5
|
import { CSSProperties, SlotsType } from "vue";
|
|
6
6
|
import { StepsProps } from "@v-c/steps";
|
|
7
7
|
|
|
@@ -11,9 +11,32 @@ type IconRenderType = (params: {
|
|
|
11
11
|
oriNode: any;
|
|
12
12
|
info: Pick<RcIconRenderTypeInfo, 'index' | 'active' | 'item' | 'components'>;
|
|
13
13
|
}) => any;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
interface StepsSemanticClassNames {
|
|
15
|
+
root?: string;
|
|
16
|
+
item?: string;
|
|
17
|
+
itemWrapper?: string;
|
|
18
|
+
itemIcon?: string;
|
|
19
|
+
itemSection?: string;
|
|
20
|
+
itemHeader?: string;
|
|
21
|
+
itemTitle?: string;
|
|
22
|
+
itemSubtitle?: string;
|
|
23
|
+
itemContent?: string;
|
|
24
|
+
itemRail?: string;
|
|
25
|
+
}
|
|
26
|
+
interface StepsSemanticStyles {
|
|
27
|
+
root?: CSSProperties;
|
|
28
|
+
item?: CSSProperties;
|
|
29
|
+
itemWrapper?: CSSProperties;
|
|
30
|
+
itemIcon?: CSSProperties;
|
|
31
|
+
itemSection?: CSSProperties;
|
|
32
|
+
itemHeader?: CSSProperties;
|
|
33
|
+
itemTitle?: CSSProperties;
|
|
34
|
+
itemSubtitle?: CSSProperties;
|
|
35
|
+
itemContent?: CSSProperties;
|
|
36
|
+
itemRail?: CSSProperties;
|
|
37
|
+
}
|
|
38
|
+
type StepsClassNamesType = SemanticClassNamesType<StepsProps$1, StepsSemanticClassNames>;
|
|
39
|
+
type StepsStylesType = SemanticStylesType<StepsProps$1, StepsSemanticStyles>;
|
|
17
40
|
interface StepItem {
|
|
18
41
|
class?: string;
|
|
19
42
|
style?: CSSProperties;
|
|
@@ -34,8 +57,7 @@ type ProgressDotRender = (params: {
|
|
|
34
57
|
info: {
|
|
35
58
|
index: number;
|
|
36
59
|
status: NonNullable<StepsProps['status']>;
|
|
37
|
-
title: any;
|
|
38
|
-
/** @deprecated Please use `content` instead. */
|
|
60
|
+
title: any; /** @deprecated Please use `content` instead. */
|
|
39
61
|
description: any;
|
|
40
62
|
content: any;
|
|
41
63
|
};
|
|
@@ -80,8 +102,8 @@ interface StepsSlots {
|
|
|
80
102
|
default: () => any;
|
|
81
103
|
iconRender?: IconRenderType;
|
|
82
104
|
}
|
|
83
|
-
declare const Steps:
|
|
105
|
+
declare const Steps: vue170.DefineSetupFnComponent<StepsProps$1, StepsEmits, SlotsType<StepsSlots>, StepsProps$1 & {
|
|
84
106
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
85
|
-
},
|
|
107
|
+
}, vue170.PublicProps>;
|
|
86
108
|
//#endregion
|
|
87
|
-
export { Steps, StepsProps$1 as StepsProps };
|
|
109
|
+
export { StepItem, Steps, StepsProps$1 as StepsProps, StepsSemanticClassNames, StepsSemanticStyles };
|
package/dist/steps/index.mjs
CHANGED
|
@@ -172,9 +172,9 @@ const Steps = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) =>
|
|
|
172
172
|
"components": components.value,
|
|
173
173
|
"current": current,
|
|
174
174
|
"items": mergedItems.value,
|
|
175
|
-
"onChange": (current
|
|
176
|
-
onChange?.(current
|
|
177
|
-
emit("update:current", current
|
|
175
|
+
"onChange": (current) => {
|
|
176
|
+
onChange?.(current);
|
|
177
|
+
emit("update:current", current);
|
|
178
178
|
},
|
|
179
179
|
"iconRender": internalIconRender,
|
|
180
180
|
"itemRender": itemRender,
|
|
@@ -10,6 +10,31 @@ const fadeOut = new Keyframes("antFadeOut", {
|
|
|
10
10
|
"0%": { opacity: 1 },
|
|
11
11
|
"100%": { opacity: 0 }
|
|
12
12
|
});
|
|
13
|
+
/**
|
|
14
|
+
* Initialize fade motion styles
|
|
15
|
+
*
|
|
16
|
+
* Generates CSS styles for fade in/out transition animations when elements are shown/hidden.
|
|
17
|
+
* Supports enter, appear, and leave animation states.
|
|
18
|
+
*
|
|
19
|
+
* @param token - Object containing design tokens and CSS class prefix
|
|
20
|
+
* @param sameLevel - Controls CSS selector nesting behavior:
|
|
21
|
+
* - `false` (default): Generates descendant selectors like `.ant-fade-enter`, `.ant-fade-appear`
|
|
22
|
+
* - `true`: Generates same-level selectors with `&` prefix like `&.ant-fade-enter`, `&.ant-fade-appear`
|
|
23
|
+
* Use `true` when the motion classes are applied to the same element as the parent selector,
|
|
24
|
+
* Use `false` when the motion classes are applied to child elements
|
|
25
|
+
* @returns CSS interpolation object containing fade motion styles
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* // For child elements (default behavior)
|
|
30
|
+
* const fadeStyles = initFadeMotion(token);
|
|
31
|
+
* // Generates: .parent .ant-fade-enter { ... }
|
|
32
|
+
*
|
|
33
|
+
* // For same element
|
|
34
|
+
* const sameLevelFadeStyles = initFadeMotion(token, true);
|
|
35
|
+
* // Generates: .parent.ant-fade-enter { ... }
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
13
38
|
function initFadeMotion(token, sameLevel = false) {
|
|
14
39
|
const { antCls } = token;
|
|
15
40
|
const motionCls = `${antCls}-fade`;
|
package/dist/switch/index.d.mts
CHANGED
|
@@ -2,15 +2,22 @@ import { VueNode } from "../_util/type.mjs";
|
|
|
2
2
|
import { SemanticClassNamesType, SemanticStylesType } from "../_util/hooks/useMergeSemantic.mjs";
|
|
3
3
|
import "../_util/hooks/index.mjs";
|
|
4
4
|
import { ComponentBaseProps } from "../config-provider/context.mjs";
|
|
5
|
-
import * as
|
|
6
|
-
import { SlotsType } from "vue";
|
|
5
|
+
import * as vue172 from "vue";
|
|
6
|
+
import { CSSProperties, SlotsType } from "vue";
|
|
7
7
|
import { SwitchChangeEventHandler, SwitchClickEventHandler } from "@v-c/switch";
|
|
8
8
|
|
|
9
9
|
//#region src/switch/index.d.ts
|
|
10
10
|
type SwitchSize = 'small' | 'default';
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
interface SwitchSemanticClassNames {
|
|
12
|
+
root?: string;
|
|
13
|
+
content?: string;
|
|
14
|
+
}
|
|
15
|
+
interface SwitchSemanticStyles {
|
|
16
|
+
root?: CSSProperties;
|
|
17
|
+
content?: CSSProperties;
|
|
18
|
+
}
|
|
19
|
+
type SwitchClassNamesType = SemanticClassNamesType<SwitchProps, SwitchSemanticClassNames>;
|
|
20
|
+
type SwitchStylesType = SemanticStylesType<SwitchProps, SwitchSemanticStyles>;
|
|
14
21
|
interface SwitchProps extends ComponentBaseProps {
|
|
15
22
|
size?: SwitchSize;
|
|
16
23
|
checked?: boolean;
|
|
@@ -47,8 +54,8 @@ interface SwitchSlots {
|
|
|
47
54
|
checkedChildren: () => any;
|
|
48
55
|
unCheckedChildren: () => any;
|
|
49
56
|
}
|
|
50
|
-
declare const Switch:
|
|
57
|
+
declare const Switch: vue172.DefineSetupFnComponent<SwitchProps, SwitchEmits, SlotsType<SwitchSlots>, SwitchProps & {
|
|
51
58
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
52
|
-
},
|
|
59
|
+
}, vue172.PublicProps>;
|
|
53
60
|
//#endregion
|
|
54
61
|
export { Switch, SwitchEmits, SwitchProps, SwitchSize, SwitchSlots };
|
package/dist/switch/index.mjs
CHANGED
|
@@ -61,7 +61,7 @@ const Switch = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =
|
|
|
61
61
|
const unCheckedChildren = getSlotPropsFnRun(slots, props, "unCheckedChildren");
|
|
62
62
|
const { className, style, restAttrs } = getAttrStyleAndClass(attrs);
|
|
63
63
|
const loadingIcon = createVNode("div", { "class": `${prefixCls.value}-handle` }, [loading && createVNode(LoadingOutlined, { "class": `${prefixCls.value}-loading-icon` }, null)]);
|
|
64
|
-
const classes
|
|
64
|
+
const classes = clsx(contextClassName.value, {
|
|
65
65
|
[`${prefixCls.value}-small`]: mergedSize.value === "small",
|
|
66
66
|
[`${prefixCls.value}-loading`]: loading,
|
|
67
67
|
[`${prefixCls.value}-rtl`]: direction.value === "rtl"
|
|
@@ -81,7 +81,7 @@ const Switch = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =
|
|
|
81
81
|
"checked": checked.value,
|
|
82
82
|
"onChange": changeHandler,
|
|
83
83
|
"prefixCls": prefixCls.value,
|
|
84
|
-
"className": classes
|
|
84
|
+
"className": classes,
|
|
85
85
|
"style": mergedStyle,
|
|
86
86
|
"disabled": mergedDisabled.value,
|
|
87
87
|
"loadingIcon": loadingIcon,
|
package/dist/table/Column.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AnyObject, EmptyEmit } from "../_util/type.mjs";
|
|
2
2
|
import { ColumnType } from "./interface.mjs";
|
|
3
|
-
import * as
|
|
3
|
+
import * as vue382 from "vue";
|
|
4
4
|
import { SlotsType } from "vue";
|
|
5
5
|
|
|
6
6
|
//#region src/table/Column.d.ts
|
|
@@ -13,8 +13,8 @@ interface ColumnSlots {
|
|
|
13
13
|
/**
|
|
14
14
|
* Syntactic sugar for `columns` prop. HOC will not work on this.
|
|
15
15
|
*/
|
|
16
|
-
declare const Column:
|
|
16
|
+
declare const Column: vue382.DefineSetupFnComponent<ColumnProps<AnyObject>, EmptyEmit, SlotsType<ColumnSlots>, ColumnProps<AnyObject> & {
|
|
17
17
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
18
|
-
},
|
|
18
|
+
}, vue382.PublicProps>;
|
|
19
19
|
//#endregion
|
|
20
20
|
export { Column, ColumnProps };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AnyObject, EmptyEmit } from "../_util/type.mjs";
|
|
2
2
|
import { ColumnType } from "./interface.mjs";
|
|
3
3
|
import { ColumnProps } from "./Column.mjs";
|
|
4
|
-
import * as
|
|
4
|
+
import * as vue384 from "vue";
|
|
5
5
|
import { SlotsType } from "vue";
|
|
6
6
|
|
|
7
7
|
//#region src/table/ColumnGroup.d.ts
|
|
@@ -14,8 +14,8 @@ interface ColumnGroupSlots {
|
|
|
14
14
|
/**
|
|
15
15
|
* Syntactic sugar for `columns` prop. HOC will not work on this.
|
|
16
16
|
*/
|
|
17
|
-
declare const ColumnGroup:
|
|
17
|
+
declare const ColumnGroup: vue384.DefineSetupFnComponent<ColumnGroupProps<AnyObject>, EmptyEmit, SlotsType<ColumnGroupSlots>, ColumnGroupProps<AnyObject> & {
|
|
18
18
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
19
|
-
},
|
|
19
|
+
}, vue384.PublicProps>;
|
|
20
20
|
//#endregion
|
|
21
21
|
export { ColumnGroup };
|
|
@@ -1,26 +1,48 @@
|
|
|
1
1
|
import { SizeType } from "../config-provider/SizeContext.mjs";
|
|
2
2
|
import { AnyObject } from "../_util/type.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { SemanticClassNamesType, SemanticStylesType } from "../_util/hooks/useMergeSemantic.mjs";
|
|
4
4
|
import "../_util/hooks/index.mjs";
|
|
5
|
-
import {
|
|
5
|
+
import { PaginationSemanticClassNames, PaginationSemanticStyles } from "../pagination/interface.mjs";
|
|
6
6
|
import { ColumnType, ColumnsType, FilterDropdownProps, FilterValue, GetPopupContainer, Key, SortOrder, SorterResult, SorterTooltipProps, TableCurrentDataSource, TableLocale, TablePaginationConfig, TableRowSelection } from "./interface.mjs";
|
|
7
7
|
import { SpinProps } from "../spin/index.mjs";
|
|
8
8
|
import { ComponentBaseProps } from "../config-provider/context.mjs";
|
|
9
|
-
import { SlotsType } from "vue";
|
|
9
|
+
import { CSSProperties, SlotsType } from "vue";
|
|
10
10
|
import { TableProps } from "@v-c/table";
|
|
11
11
|
|
|
12
12
|
//#region src/table/InternalTable.d.ts
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
interface TableSemanticClassNames {
|
|
14
|
+
root?: string;
|
|
15
|
+
section?: string;
|
|
16
|
+
title?: string;
|
|
17
|
+
footer?: string;
|
|
18
|
+
content?: string;
|
|
19
|
+
}
|
|
20
|
+
interface TableSemanticStyles {
|
|
21
|
+
root?: CSSProperties;
|
|
22
|
+
section?: CSSProperties;
|
|
23
|
+
title?: CSSProperties;
|
|
24
|
+
footer?: CSSProperties;
|
|
25
|
+
content?: CSSProperties;
|
|
26
|
+
}
|
|
27
|
+
interface ComponentsSemanticClassNames {
|
|
28
|
+
wrapper?: string;
|
|
29
|
+
cell?: string;
|
|
30
|
+
row?: string;
|
|
31
|
+
}
|
|
32
|
+
interface ComponentsSemanticStyles {
|
|
33
|
+
wrapper?: CSSProperties;
|
|
34
|
+
cell?: CSSProperties;
|
|
35
|
+
row?: CSSProperties;
|
|
36
|
+
}
|
|
37
|
+
type TableClassNamesType<RecordType = AnyObject> = SemanticClassNamesType<TableProps$1<RecordType>, TableSemanticClassNames, {
|
|
38
|
+
body?: ComponentsSemanticClassNames;
|
|
39
|
+
header?: ComponentsSemanticClassNames;
|
|
40
|
+
pagination?: PaginationSemanticClassNames;
|
|
19
41
|
}>;
|
|
20
|
-
type TableStylesType<RecordType = AnyObject> = SemanticStylesType<TableProps$1<RecordType>,
|
|
21
|
-
body?:
|
|
22
|
-
header?:
|
|
23
|
-
pagination?:
|
|
42
|
+
type TableStylesType<RecordType = AnyObject> = SemanticStylesType<TableProps$1<RecordType>, TableSemanticStyles, {
|
|
43
|
+
body?: ComponentsSemanticStyles;
|
|
44
|
+
header?: ComponentsSemanticStyles;
|
|
45
|
+
pagination?: PaginationSemanticStyles;
|
|
24
46
|
}>;
|
|
25
47
|
interface TableProps$1<RecordType = AnyObject> extends ComponentBaseProps, Omit<TableProps<RecordType>, 'transformColumns' | 'internalHooks' | 'internalRefs' | 'data' | 'columns' | 'scroll' | 'emptyText' | 'className' | 'style' | 'classNames' | 'styles' | 'getPopupContainer' | 'onUpdate:expandedRowKeys' | 'onScroll'> {
|
|
26
48
|
classes?: TableClassNamesType<RecordType>;
|
|
@@ -18,6 +18,7 @@ import pagination_default from "../pagination/index.mjs";
|
|
|
18
18
|
import useSelection from "./hooks/useSelection.mjs";
|
|
19
19
|
import ExpandIcon_default from "./ExpandIcon.mjs";
|
|
20
20
|
import useContainerWidth from "./hooks/useContainerWidth.mjs";
|
|
21
|
+
import { TableMeasureRowContextProvider } from "./TableMeasureRowContext.mjs";
|
|
21
22
|
import useFilter, { collectFilterStates, generateFilterInfo, getFilterData, getMergedFilterStates } from "./hooks/useFilter/index.mjs";
|
|
22
23
|
import useLazyKVMap from "./hooks/useLazyKVMap.mjs";
|
|
23
24
|
import usePagination, { DEFAULT_PAGE_SIZE, getPaginationParam } from "./hooks/usePagination.mjs";
|
|
@@ -40,7 +41,11 @@ function resolvePanelRender(slots, props, key) {
|
|
|
40
41
|
if (slots[key] || props[key]) return (data) => getSlotPropsFnRun(slots, props, key, true, data);
|
|
41
42
|
}
|
|
42
43
|
const InternalTable = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs, expose }) => {
|
|
43
|
-
const { prefixCls, direction, getPrefixCls, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, renderEmpty, getPopupContainer: contextGetPopupContainer, virtual: contextVirtual, bodyCell: contextBodyCell, headerCell: contextHeaderCell } = useComponentBaseConfig("table", props, [
|
|
44
|
+
const { prefixCls, direction, getPrefixCls, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, renderEmpty, getPopupContainer: contextGetPopupContainer, virtual: contextVirtual, bodyCell: contextBodyCell, headerCell: contextHeaderCell, rowKey: contextRowKey } = useComponentBaseConfig("table", props, [
|
|
45
|
+
"bodyCell",
|
|
46
|
+
"headerCell",
|
|
47
|
+
"rowKey"
|
|
48
|
+
]);
|
|
44
49
|
const configCtx = useConfig();
|
|
45
50
|
const { classes, styles } = toPropsRefs(props, "classes", "styles");
|
|
46
51
|
const mergedSize = useSize(computed(() => props.size));
|
|
@@ -115,7 +120,8 @@ const InternalTable = /* @__PURE__ */ defineComponent((props, { slots, emit, att
|
|
|
115
120
|
const childrenColumnName = computed(() => mergedExpandable.value.childrenColumnName || "children");
|
|
116
121
|
const getRowKey = computed(() => {
|
|
117
122
|
if (typeof props.rowKey === "function") return props.rowKey;
|
|
118
|
-
|
|
123
|
+
if (!props.rowKey && contextRowKey.value && typeof contextRowKey.value === "function") return contextRowKey.value;
|
|
124
|
+
const rowKey = props.rowKey || contextRowKey.value || "key";
|
|
119
125
|
return (record) => record?.[rowKey];
|
|
120
126
|
});
|
|
121
127
|
if (isDev) devUseWarning("Table")(!(typeof props.rowKey === "function" && props.rowKey.length > 1), "usage", "`index` parameter of `rowKey` function is deprecated. There is no guarantee that it will work as expected.");
|
|
@@ -157,10 +163,10 @@ const InternalTable = /* @__PURE__ */ defineComponent((props, { slots, emit, att
|
|
|
157
163
|
const filterStateWarning = isDev ? devUseWarning("Table") : void 0;
|
|
158
164
|
const mergedFilterStates = computed(() => getMergedFilterStates(mergedColumns.value, filterStates.value, filterStateWarning));
|
|
159
165
|
const filters = computed(() => generateFilterInfo(mergedFilterStates.value));
|
|
160
|
-
const onFilterChange = (filters
|
|
166
|
+
const onFilterChange = (filters, filterStates) => {
|
|
161
167
|
triggerOnChange({
|
|
162
|
-
filters
|
|
163
|
-
filterStates
|
|
168
|
+
filters,
|
|
169
|
+
filterStates
|
|
164
170
|
}, "filter", true);
|
|
165
171
|
};
|
|
166
172
|
const mergedData = computed(() => getFilterData(sortedData.value, mergedFilterStates.value, childrenColumnName.value));
|
|
@@ -386,7 +392,7 @@ const InternalTable = /* @__PURE__ */ defineComponent((props, { slots, emit, att
|
|
|
386
392
|
"transformColumns": transformColumns,
|
|
387
393
|
"getContainerWidth": getContainerWidth,
|
|
388
394
|
"scroll": mergedScroll.value,
|
|
389
|
-
"measureRowRender": (measureRow) => createVNode(config_provider_default, { "getPopupContainer": (node) => node }, _isSlot(measureRow) ? measureRow : { default: () => [measureRow] }),
|
|
395
|
+
"measureRowRender": (measureRow) => createVNode(TableMeasureRowContextProvider, { "value": true }, { default: () => [createVNode(config_provider_default, { "getPopupContainer": (node) => node }, _isSlot(measureRow) ? measureRow : { default: () => [measureRow] })] }),
|
|
390
396
|
"title": title,
|
|
391
397
|
"footer": footer,
|
|
392
398
|
"summary": summary,
|
package/dist/table/Table.d.mts
CHANGED
|
@@ -3,14 +3,14 @@ import { SELECTION_ALL, SELECTION_COLUMN, SELECTION_INVERT, SELECTION_NONE } fro
|
|
|
3
3
|
import { Column } from "./Column.mjs";
|
|
4
4
|
import { ColumnGroup } from "./ColumnGroup.mjs";
|
|
5
5
|
import { TableEmits, TableProps as TableProps$1, TableSlots } from "./InternalTable.mjs";
|
|
6
|
-
import * as
|
|
6
|
+
import * as vue387 from "vue";
|
|
7
7
|
import { SlotsType } from "vue";
|
|
8
8
|
import { EXPAND_COLUMN, Summary } from "@v-c/table";
|
|
9
9
|
|
|
10
10
|
//#region src/table/Table.d.ts
|
|
11
|
-
declare const Table:
|
|
11
|
+
declare const Table: vue387.DefineSetupFnComponent<TableProps$1<AnyObject>, TableEmits<AnyObject>, SlotsType<TableSlots<AnyObject>>, TableProps$1<AnyObject> & {
|
|
12
12
|
[x: `on${Capitalize<string>}`]: ((...args: any[]) => any) | undefined;
|
|
13
|
-
},
|
|
13
|
+
}, vue387.PublicProps>;
|
|
14
14
|
declare const ForwardTable: typeof Table & {
|
|
15
15
|
displayName?: string;
|
|
16
16
|
SELECTION_COLUMN: typeof SELECTION_COLUMN;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { computed, defineComponent, inject, provide, ref } from "vue";
|
|
2
|
+
|
|
3
|
+
//#region src/table/TableMeasureRowContext.ts
|
|
4
|
+
const TableMeasureRowContextKey = Symbol("TableMeasureRowContextKey");
|
|
5
|
+
function useTableMeasureRowContext() {
|
|
6
|
+
return inject(TableMeasureRowContextKey, ref(false));
|
|
7
|
+
}
|
|
8
|
+
const TableMeasureRowContextProvider = defineComponent((props, { slots }) => {
|
|
9
|
+
provide(TableMeasureRowContextKey, computed(() => props.value));
|
|
10
|
+
return () => {
|
|
11
|
+
return slots?.default?.();
|
|
12
|
+
};
|
|
13
|
+
}, {
|
|
14
|
+
name: "TableMeasureRowContext",
|
|
15
|
+
inheritAttrs: false,
|
|
16
|
+
props: { value: Boolean }
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
export { TableMeasureRowContextProvider, useTableMeasureRowContext };
|
|
@@ -10,6 +10,7 @@ import dropdown_default from "../../../dropdown/index.mjs";
|
|
|
10
10
|
import radio_default from "../../../radio/index.mjs";
|
|
11
11
|
import checkbox_default from "../../../checkbox/index.mjs";
|
|
12
12
|
import tree_default from "../../../tree/index.mjs";
|
|
13
|
+
import { useTableMeasureRowContext } from "../../TableMeasureRowContext.mjs";
|
|
13
14
|
import FilterSearch_default from "./FilterSearch.mjs";
|
|
14
15
|
import FilterWrapper_default from "./FilterWrapper.mjs";
|
|
15
16
|
import { Fragment, computed, createVNode, defineComponent, isVNode, mergeDefaults, shallowRef, watch } from "vue";
|
|
@@ -53,11 +54,11 @@ function renderFilterItems({ filters, prefixCls, filteredKeys, filterMultiple, s
|
|
|
53
54
|
filterSearch
|
|
54
55
|
})
|
|
55
56
|
};
|
|
56
|
-
const Component
|
|
57
|
+
const Component = filterMultiple ? checkbox_default : radio_default;
|
|
57
58
|
const checked = filteredKeys.includes(key);
|
|
58
59
|
const item = {
|
|
59
60
|
key: filter.value !== void 0 ? key : index,
|
|
60
|
-
label: createVNode(Fragment, null, [createVNode(Component
|
|
61
|
+
label: createVNode(Fragment, null, [createVNode(Component, { "checked": checked }, null), createVNode("span", null, [filter.text])])
|
|
61
62
|
};
|
|
62
63
|
if (searchValue.trim()) {
|
|
63
64
|
if (typeof filterSearch === "function") return filterSearch(searchValue, filter) ? item : null;
|
|
@@ -80,6 +81,7 @@ const FilterDropdown = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
80
81
|
const { filterMode, filterSearch, column } = toPropsRefs(props, "filterSearch", "filterMode", "column");
|
|
81
82
|
const filterDropdownProps = computed(() => column?.value?.filterDropdownProps ?? {});
|
|
82
83
|
const visible = shallowRef(false);
|
|
84
|
+
const inMeasureRow = useTableMeasureRowContext();
|
|
83
85
|
const filtered = computed(() => {
|
|
84
86
|
const filterState = props.filterState;
|
|
85
87
|
return !!(filterState && (filterState.filteredKeys?.length || filterState.forceFiltered));
|
|
@@ -196,11 +198,12 @@ const FilterDropdown = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
196
198
|
});
|
|
197
199
|
return () => {
|
|
198
200
|
let _slot;
|
|
201
|
+
const { dropdownPrefixCls, prefixCls, tablePrefixCls } = props;
|
|
199
202
|
const renderEmpty = config.value.renderEmpty;
|
|
200
203
|
const getDropdownContent = () => {
|
|
201
|
-
let dropdownContent
|
|
204
|
+
let dropdownContent;
|
|
202
205
|
const baseDropdownProps = {
|
|
203
|
-
prefixCls: `${
|
|
206
|
+
prefixCls: `${dropdownPrefixCls}-custom`,
|
|
204
207
|
setSelectedKeys: (selectedKeys) => onSelectKeys({ selectedKeys }),
|
|
205
208
|
selectedKeys: filteredKeysSync.value,
|
|
206
209
|
confirm: doFilter,
|
|
@@ -225,9 +228,9 @@ const FilterDropdown = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
225
228
|
} else hasPropDropdownRender = false;
|
|
226
229
|
} else hasPropDropdownRender = false;
|
|
227
230
|
}
|
|
228
|
-
if (filterNode) dropdownContent
|
|
229
|
-
else if (typeof column.value.filterDropdown === "function") dropdownContent
|
|
230
|
-
else if (column.value.filterDropdown) dropdownContent
|
|
231
|
+
if (filterNode) dropdownContent = filterNode;
|
|
232
|
+
else if (typeof column.value.filterDropdown === "function") dropdownContent = column.value.filterDropdown({ ...baseDropdownProps });
|
|
233
|
+
else if (column.value.filterDropdown) dropdownContent = column.value.filterDropdown;
|
|
231
234
|
else {
|
|
232
235
|
const selectedKeys = filteredKeysSync.value || [];
|
|
233
236
|
const getFilterComponent = () => {
|
|
@@ -296,7 +299,7 @@ const FilterDropdown = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
296
299
|
if (column.value.filterResetToDefaultFilteredValue) return isEqual((column.value.defaultFilteredValue || []).map((key) => String(key)), selectedKeys, true);
|
|
297
300
|
return selectedKeys.length === 0;
|
|
298
301
|
};
|
|
299
|
-
dropdownContent
|
|
302
|
+
dropdownContent = createVNode(Fragment, null, [getFilterComponent(), createVNode("div", { "class": `${props.prefixCls}-dropdown-btns` }, [createVNode(button_default, {
|
|
300
303
|
"type": "link",
|
|
301
304
|
"size": "small",
|
|
302
305
|
"disabled": getResetDisabled(),
|
|
@@ -309,11 +312,11 @@ const FilterDropdown = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
309
312
|
}
|
|
310
313
|
if (filterDropdownDefined.value) {
|
|
311
314
|
const _dropdownContent = function() {
|
|
312
|
-
return dropdownContent
|
|
315
|
+
return dropdownContent;
|
|
313
316
|
}();
|
|
314
|
-
dropdownContent
|
|
317
|
+
dropdownContent = createVNode(OverrideProvider, { "value": { selectable: void 0 } }, _isSlot(dropdownContent) ? dropdownContent : { default: () => [_dropdownContent] });
|
|
315
318
|
}
|
|
316
|
-
return createVNode(FilterWrapper_default, { "className": `${props.prefixCls}-dropdown` }, _isSlot(dropdownContent
|
|
319
|
+
return createVNode(FilterWrapper_default, { "className": `${props.prefixCls}-dropdown` }, _isSlot(dropdownContent) ? dropdownContent : { default: () => [dropdownContent] });
|
|
317
320
|
};
|
|
318
321
|
const getDropdownTrigger = () => {
|
|
319
322
|
let filterIcon;
|
|
@@ -334,6 +337,8 @@ const FilterDropdown = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
334
337
|
}, [filterIcon]);
|
|
335
338
|
};
|
|
336
339
|
const getTitle = () => slots.default?.() ?? props.children;
|
|
340
|
+
const triggerNode = getDropdownTrigger();
|
|
341
|
+
if (inMeasureRow.value) return createVNode("div", { "class": `${prefixCls}-column` }, [createVNode("span", { "class": `${tablePrefixCls}-column-title` }, [getTitle()]), triggerNode]);
|
|
337
342
|
const dropdownContent = getDropdownContent();
|
|
338
343
|
const dropdownRootClassName = clsx(props.rootClassName, filterDropdownProps.value.rootClassName, filterDropdownProps.value.rootClass);
|
|
339
344
|
const mergedDropdownProps = extendsObject_default({
|
|
@@ -352,7 +357,7 @@ const FilterDropdown = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
352
357
|
return dropdownContent;
|
|
353
358
|
}
|
|
354
359
|
});
|
|
355
|
-
return createVNode("div", { "class": `${
|
|
360
|
+
return createVNode("div", { "class": `${prefixCls}-column` }, [createVNode("span", { "class": `${tablePrefixCls}-column-title` }, [getTitle()]), createVNode(dropdown_default, mergedDropdownProps, _isSlot(_slot = getDropdownTrigger()) ? _slot : { default: () => [_slot] })]);
|
|
356
361
|
};
|
|
357
362
|
}, { props: /* @__PURE__ */ mergeDefaults({
|
|
358
363
|
tablePrefixCls: {
|
|
@@ -248,7 +248,7 @@ function useSelection(config, rowSelection) {
|
|
|
248
248
|
checked: keySet.has(key),
|
|
249
249
|
...checkboxProps
|
|
250
250
|
};
|
|
251
|
-
}).filter(({ disabled
|
|
251
|
+
}).filter(({ disabled }) => disabled);
|
|
252
252
|
const allDisabled = !!allDisabledData.length && allDisabledData.length === flattedData.value.length;
|
|
253
253
|
const allDisabledAndChecked = allDisabled && allDisabledData.every(({ checked }) => checked);
|
|
254
254
|
const allDisabledSomeChecked = allDisabled && allDisabledData.some(({ checked }) => checked);
|
|
@@ -93,8 +93,7 @@ interface CoverableDropdownProps extends DropdownProps {
|
|
|
93
93
|
interface ColumnType<RecordType = AnyObject> extends Omit<_v_c_table0.ColumnType<RecordType>, 'title'> {
|
|
94
94
|
title?: ColumnTitle<RecordType>;
|
|
95
95
|
sorter?: boolean | CompareFn<RecordType> | {
|
|
96
|
-
compare?: CompareFn<RecordType>;
|
|
97
|
-
/** Config multiple sorter order priority */
|
|
96
|
+
compare?: CompareFn<RecordType>; /** Config multiple sorter order priority */
|
|
98
97
|
multiple?: number;
|
|
99
98
|
};
|
|
100
99
|
sortOrder?: SortOrder;
|
|
@@ -8,7 +8,7 @@ const genVirtualStyle = (token) => {
|
|
|
8
8
|
return { [`${componentCls}-wrapper`]: {
|
|
9
9
|
[`${componentCls}-tbody-virtual`]: {
|
|
10
10
|
[`${componentCls}-tbody-virtual-holder-inner`]: { [`
|
|
11
|
-
& > ${componentCls}-row,
|
|
11
|
+
& > ${componentCls}-row,
|
|
12
12
|
& > div:not(${componentCls}-row) > ${componentCls}-row
|
|
13
13
|
`]: {
|
|
14
14
|
display: "flex",
|