antdv-next 1.8.2 → 1.8.4
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/hooks/index.d.ts +2 -1
- package/dist/_util/hooks/index.js +2 -1
- package/dist/_util/hooks/useClosable.d.ts +3 -3
- package/dist/_util/hooks/useClosable.js +9 -9
- package/dist/_util/hooks/useScopeId.d.ts +7 -0
- package/dist/_util/hooks/useScopeId.js +15 -0
- package/dist/_util/scrollTo.js +1 -1
- package/dist/_util/statusUtils.js +1 -1
- package/dist/_util/vueNode.d.ts +2 -6
- package/dist/affix/index.js +2 -7
- package/dist/anchor/Anchor.js +4 -2
- package/dist/antd-with-locales.esm.js +17314 -16799
- package/dist/antd-with-locales.js +81 -81
- package/dist/antd.css +1 -1
- package/dist/antd.esm.js +14978 -14467
- package/dist/antd.js +81 -81
- package/dist/badge/SingleNumber.js +11 -2
- package/dist/badge/index.d.ts +4 -1
- package/dist/badge/index.js +4 -4
- package/dist/button/buttonHelper.d.ts +1 -1
- package/dist/button/style/index.js +8 -2
- package/dist/calendar/generateCalendar.d.ts +5 -4
- package/dist/calendar/generateCalendar.js +4 -7
- package/dist/card/Card.d.ts +4 -1
- package/dist/card/Card.js +24 -18
- package/dist/card/index.d.ts +2 -2
- package/dist/cascader/index.d.ts +5 -2
- package/dist/cascader/index.js +10 -7
- package/dist/checkbox/Checkbox.js +3 -0
- package/dist/checkbox/Group.d.ts +2 -1
- package/dist/checkbox/Group.js +3 -7
- package/dist/color-picker/ColorPicker.js +4 -0
- package/dist/color-picker/ColorPickerPanel.js +4 -0
- package/dist/color-picker/components/ColorSlider.js +12 -4
- package/dist/color-picker/components/PanelPicker/GradientColorBar.js +2 -0
- package/dist/components.d.ts +13 -9
- package/dist/components.js +3 -3
- package/dist/config-provider/context.d.ts +3 -3
- package/dist/config-provider/context.js +3 -3
- package/dist/date-picker/generatePicker/generateRangePicker.js +4 -5
- package/dist/date-picker/generatePicker/generateSinglePicker.js +4 -6
- package/dist/descriptions/hooks/useItems.d.ts +6 -6
- package/dist/descriptions/hooks/useRow.js +1 -1
- package/dist/float-button/FloatButtonGroup.js +3 -1
- package/dist/float-button/style/button.js +2 -2
- package/dist/form/Form.d.ts +17 -44
- package/dist/form/Form.js +54 -5
- package/dist/form/FormItem/ItemHolder.js +1 -1
- package/dist/form/FormItem/index.d.ts +3 -3
- package/dist/form/FormItem/index.js +4 -0
- package/dist/form/context.d.ts +3 -3
- package/dist/form/hooks/useForm.d.ts +4 -5
- package/dist/form/index.d.ts +29 -3
- package/dist/form/index.js +6 -6
- package/dist/form/types.d.ts +15 -7
- package/dist/image/hooks/usePreviewConfig.d.ts +6 -6
- package/dist/image/index.d.ts +5 -5
- package/dist/index.d.ts +15 -8
- package/dist/index.js +2 -2
- package/dist/input/Group.d.ts +3 -2
- package/dist/input/Group.js +23 -19
- package/dist/input/Input.d.ts +8 -1
- package/dist/input/Input.js +4 -0
- package/dist/input/OTP/OTPInput.js +4 -0
- package/dist/input/Password.js +4 -0
- package/dist/input/Search.js +4 -0
- package/dist/input/TextArea.d.ts +2 -0
- package/dist/input/TextArea.js +8 -0
- package/dist/input/index.d.ts +2 -2
- package/dist/input-number/style/index.js +3 -2
- package/dist/layout/layout.js +2 -3
- package/dist/listy/index.js +4 -3
- package/dist/locale/ko_KR.js +25 -23
- package/dist/locale/pt_BR.js +9 -7
- package/dist/mentions/index.js +10 -1
- package/dist/menu/MenuItem.js +1 -1
- package/dist/menu/index.d.ts +2 -1
- package/dist/menu/index.js +29 -5
- package/dist/menu/menu.js +41 -15
- package/dist/message/index.js +11 -9
- package/dist/modal/confirm.js +2 -3
- package/dist/modal/index.d.ts +2 -2
- package/dist/modal/interface.d.ts +1 -1
- package/dist/modal/useModal/index.js +9 -4
- package/dist/notification/index.js +3 -7
- package/dist/package.js +1 -1
- package/dist/package.json.d.ts +1 -0
- package/dist/pagination/Pagination.js +3 -1
- package/dist/radio/group.d.ts +1 -0
- package/dist/radio/group.js +2 -5
- package/dist/radio/interface.d.ts +1 -1
- package/dist/segmented/style/index.js +3 -2
- package/dist/select/index.d.ts +1 -0
- package/dist/select/index.js +3 -7
- package/dist/select/useIcons.d.ts +3 -1
- package/dist/select/useIcons.js +5 -2
- package/dist/skeleton/style/index.js +9 -13
- package/dist/slider/SliderTooltip.js +0 -1
- package/dist/slider/index.d.ts +2 -0
- package/dist/slider/index.js +4 -0
- package/dist/splitter/Splitter.d.ts +2 -3
- package/dist/splitter/Splitter.js +18 -34
- package/dist/splitter/interface.d.ts +17 -8
- package/dist/statistic/Timer.d.ts +2 -2
- package/dist/steps/index.js +2 -1
- package/dist/table/hooks/useFilter/FilterDropdown.js +1 -1
- package/dist/table/hooks/usePagination.d.ts +1 -2
- package/dist/table/hooks/usePagination.js +1 -3
- package/dist/table/hooks/useSorter.js +4 -8
- package/dist/table/style/index.js +1 -0
- package/dist/table/style/size.js +1 -0
- package/dist/tabs/style/index.js +5 -1
- package/dist/tag/hooks/useColor.d.ts +1 -1
- package/dist/theme/themes/dark/colors.d.ts +2 -1
- package/dist/theme/themes/dark/colors.js +19 -3
- package/dist/theme/themes/dark/index.js +2 -3
- package/dist/tour/index.js +4 -1
- package/dist/tour/style/index.js +6 -6
- package/dist/transfer/ListItem.js +1 -0
- package/dist/transfer/Section.js +1 -0
- package/dist/transfer/hooks/useSelection.js +2 -1
- package/dist/tree/DirectoryTree.js +11 -6
- package/dist/tree/utils/dictUtil.js +5 -8
- package/dist/typography/Base/EllipsisTooltip.js +5 -1
- package/dist/typography/Base/index.js +11 -8
- package/dist/typography/Base/util.js +2 -1
- package/dist/upload/Dragger.js +0 -8
- package/dist/upload/Upload.d.ts +2 -0
- package/dist/upload/Upload.js +23 -22
- package/dist/upload/UploadList/ListItem.js +4 -0
- package/dist/upload/UploadList/index.js +6 -1
- package/dist/upload/interface.d.ts +4 -2
- package/dist/version/token.json +1 -1
- package/dist/watermark/utils.js +1 -1
- package/package.json +44 -43
- package/web-tags.json +22 -14
- package/web-types.json +64 -31
package/dist/select/index.js
CHANGED
|
@@ -21,7 +21,7 @@ import style_default from "./style/index.js";
|
|
|
21
21
|
import useIcons, { getCustomSuffix } from "./useIcons.js";
|
|
22
22
|
import usePopupRender from "./usePopupRender.js";
|
|
23
23
|
import useShowArrow from "./useShowArrow.js";
|
|
24
|
-
import { computed, createVNode, defineComponent, mergeDefaults, mergeProps, shallowRef
|
|
24
|
+
import { computed, createVNode, defineComponent, mergeDefaults, mergeProps, shallowRef } from "vue";
|
|
25
25
|
import { clsx } from "@v-c/util";
|
|
26
26
|
import { getTransitionName } from "@v-c/util/dist/utils/transition";
|
|
27
27
|
import VcSelect, { OptGroup, Option } from "@v-c/select";
|
|
@@ -65,10 +65,6 @@ const Select = /* @__PURE__ */ defineComponent((props, { slots, emit, expose, at
|
|
|
65
65
|
const configCtx = useConfig();
|
|
66
66
|
const { listItemHeight: customListItemHeight, direction: propDirection, variant: customizeVariant, bordered, size: customizeSize, classes, styles } = toPropsRefs(props, "listItemHeight", "direction", "variant", "bordered", "size", "classes", "styles");
|
|
67
67
|
const [, token] = useToken();
|
|
68
|
-
const value = shallowRef(props.value ?? props?.defaultValue);
|
|
69
|
-
watch(() => props.value, () => {
|
|
70
|
-
value.value = props.value;
|
|
71
|
-
});
|
|
72
68
|
const listItemHeight = computed(() => customListItemHeight.value ?? token?.value?.controlHeight);
|
|
73
69
|
const rootPrefixCls = computed(() => getPrefixCls());
|
|
74
70
|
const direction = computed(() => propDirection.value ?? contextDirection.value);
|
|
@@ -277,7 +273,7 @@ const Select = /* @__PURE__ */ defineComponent((props, { slots, emit, expose, at
|
|
|
277
273
|
"placement": memoPlacement.value,
|
|
278
274
|
"direction": direction.value,
|
|
279
275
|
"prefix": prefix,
|
|
280
|
-
"value":
|
|
276
|
+
"value": props.value,
|
|
281
277
|
"suffix": mergedSuffix,
|
|
282
278
|
"menuItemSelectedIcon": itemIcon,
|
|
283
279
|
"removeIcon": removeIcon,
|
|
@@ -297,7 +293,7 @@ const Select = /* @__PURE__ */ defineComponent((props, { slots, emit, expose, at
|
|
|
297
293
|
"tagRender": isMultiple.value ? tagRender : void 0,
|
|
298
294
|
"popupRender": mergedPopupRender,
|
|
299
295
|
"onPopupVisibleChange": mergedOnOpenChange
|
|
300
|
-
}),
|
|
296
|
+
}), { default: slots?.default });
|
|
301
297
|
};
|
|
302
298
|
}, {
|
|
303
299
|
props: /*@__PURE__*/ mergeDefaults({
|
|
@@ -16,7 +16,7 @@ interface SelectSuffixRenderInfo {
|
|
|
16
16
|
declare function getCustomSuffix(slots: Record<string, any>, props: {
|
|
17
17
|
suffix?: any;
|
|
18
18
|
}): any;
|
|
19
|
-
declare function useIcons({ suffix, contextSuffix, clearIcon, menuItemSelectedIcon, removeIcon, loading, loadingIcon, multiple, hasFeedback, showSuffix, feedbackIcon, showArrow, componentName }: {
|
|
19
|
+
declare function useIcons({ suffix, contextSuffix, clearIcon, menuItemSelectedIcon, removeIcon, loading, loadingIcon, searchIcon, contextSearchIcon, multiple, hasFeedback, showSuffix, feedbackIcon, showArrow, componentName }: {
|
|
20
20
|
suffix?: RenderNode;
|
|
21
21
|
contextSuffix?: RenderNode;
|
|
22
22
|
clearIcon?: RenderNode;
|
|
@@ -24,6 +24,8 @@ declare function useIcons({ suffix, contextSuffix, clearIcon, menuItemSelectedIc
|
|
|
24
24
|
removeIcon?: RenderNode;
|
|
25
25
|
loading?: boolean;
|
|
26
26
|
loadingIcon?: any;
|
|
27
|
+
searchIcon?: RenderNode;
|
|
28
|
+
contextSearchIcon?: RenderNode;
|
|
27
29
|
multiple?: boolean;
|
|
28
30
|
hasFeedback?: boolean;
|
|
29
31
|
feedbackIcon?: VueNode;
|
package/dist/select/useIcons.js
CHANGED
|
@@ -20,7 +20,7 @@ function getCustomSuffix(slots, props) {
|
|
|
20
20
|
};
|
|
21
21
|
return props.suffix;
|
|
22
22
|
}
|
|
23
|
-
function useIcons({ suffix, contextSuffix, clearIcon, menuItemSelectedIcon, removeIcon, loading, loadingIcon, multiple, hasFeedback, showSuffix, feedbackIcon, showArrow, componentName }) {
|
|
23
|
+
function useIcons({ suffix, contextSuffix, clearIcon, menuItemSelectedIcon, removeIcon, loading, loadingIcon, searchIcon, contextSearchIcon, multiple, hasFeedback, showSuffix, feedbackIcon, showArrow, componentName }) {
|
|
24
24
|
if (isDev) devUseWarning(componentName).deprecated(!clearIcon, "clearIcon", "allowClear={{ clearIcon: VueNode }}");
|
|
25
25
|
const mergedClearIcon = clearIcon ?? createVNode(CloseCircleFilled, null, null);
|
|
26
26
|
const getSuffixNode = (suffixNode) => {
|
|
@@ -35,7 +35,10 @@ function useIcons({ suffix, contextSuffix, clearIcon, menuItemSelectedIcon, remo
|
|
|
35
35
|
}, null));
|
|
36
36
|
else mergedSuffix = (props) => {
|
|
37
37
|
const { open, showSearch } = props;
|
|
38
|
-
if (open && showSearch)
|
|
38
|
+
if (open && showSearch) {
|
|
39
|
+
const mergedSearchIcon = fallbackProp(searchIcon, contextSearchIcon, createVNode(SearchOutlined, { "aria-hidden": "true" }, null));
|
|
40
|
+
return getSuffixNode(isFunction(mergedSearchIcon) ? mergedSearchIcon() : mergedSearchIcon);
|
|
41
|
+
}
|
|
39
42
|
const fallbackSuffix = fallbackProp(contextSuffix, createVNode(DownOutlined, { "aria-hidden": "true" }, null));
|
|
40
43
|
return getSuffixNode(isFunction(fallbackSuffix) ? fallbackSuffix(props) : fallbackSuffix);
|
|
41
44
|
};
|
|
@@ -78,19 +78,15 @@ const genSkeletonElementNode = (token) => {
|
|
|
78
78
|
};
|
|
79
79
|
const genSkeletonElementImage = (token) => {
|
|
80
80
|
const { skeletonImageCls, imageSizeBase, calc } = token;
|
|
81
|
-
return {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
[`${skeletonImageCls}-svg${skeletonImageCls}-svg-circle`]: { borderRadius: "50%" }
|
|
91
|
-
},
|
|
92
|
-
[`${skeletonImageCls}${skeletonImageCls}-circle`]: { borderRadius: "50%" }
|
|
93
|
-
};
|
|
81
|
+
return { [skeletonImageCls]: {
|
|
82
|
+
...genSkeletonElementShape(token),
|
|
83
|
+
[`${skeletonImageCls}-path`]: { fill: "#bfbfbf" },
|
|
84
|
+
[`${skeletonImageCls}-svg`]: {
|
|
85
|
+
...genSkeletonElementSize(imageSizeBase),
|
|
86
|
+
maxWidth: calc(imageSizeBase).mul(4).equal(),
|
|
87
|
+
maxHeight: calc(imageSizeBase).mul(4).equal()
|
|
88
|
+
}
|
|
89
|
+
} };
|
|
94
90
|
};
|
|
95
91
|
function genSkeletonElementButtonShape(token, size, buttonCls) {
|
|
96
92
|
const { skeletonButtonCls } = token;
|
package/dist/slider/index.d.ts
CHANGED
|
@@ -75,6 +75,8 @@ interface SliderBaseProps {
|
|
|
75
75
|
}
|
|
76
76
|
interface SliderInternalProps extends SliderBaseProps, SliderEmitsProps {
|
|
77
77
|
range?: boolean | SliderRange;
|
|
78
|
+
/** The start value of the highlighted track in single mode. Defaults to `min` */
|
|
79
|
+
startPoint?: number;
|
|
78
80
|
value?: number | number[];
|
|
79
81
|
defaultValue?: number | number[];
|
|
80
82
|
/** @deprecated Please use `styles.handle` instead */
|
package/dist/slider/index.js
CHANGED
|
@@ -188,6 +188,10 @@ const Slider = /* @__PURE__ */ defineComponent((props, { attrs, emit, expose, sl
|
|
|
188
188
|
required: false,
|
|
189
189
|
default: void 0
|
|
190
190
|
},
|
|
191
|
+
startPoint: {
|
|
192
|
+
type: Number,
|
|
193
|
+
required: false
|
|
194
|
+
},
|
|
191
195
|
value: {
|
|
192
196
|
type: [Number, Array],
|
|
193
197
|
required: false
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { SplitterEmits, SplitterProps, SplitterSlots } from "./interface.js";
|
|
1
|
+
import { SplitterEmits, SplitterEmitsProps, SplitterProps, SplitterSlots } from "./interface.js";
|
|
2
2
|
import { SlotsType } from "vue";
|
|
3
3
|
//#region src/splitter/Splitter.d.ts
|
|
4
4
|
interface InternalSplitterProps extends SplitterProps, SplitterEmitsProps {}
|
|
5
|
-
interface SplitterEmitsProps {}
|
|
6
5
|
interface SplitterRef {
|
|
7
6
|
nativeElement: HTMLDivElement;
|
|
8
7
|
}
|
|
9
8
|
declare const Splitter: import("vue").DefineSetupFnComponent<InternalSplitterProps, SplitterEmits, SlotsType<SplitterSlots>, InternalSplitterProps, import("vue").PublicProps>;
|
|
10
9
|
//#endregion
|
|
11
|
-
export { InternalSplitterProps,
|
|
10
|
+
export { InternalSplitterProps, SplitterRef, Splitter as default };
|
|
@@ -16,7 +16,7 @@ import { clsx } from "@v-c/util";
|
|
|
16
16
|
import { omit as omit$1 } from "es-toolkit";
|
|
17
17
|
import ResizeObserver from "@v-c/resize-observer";
|
|
18
18
|
//#region src/splitter/Splitter.tsx
|
|
19
|
-
const Splitter = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose }) => {
|
|
19
|
+
const Splitter = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose, emit }) => {
|
|
20
20
|
const { prefixCls, rootPrefixCls, direction, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles } = useComponentBaseConfig("splitter", props);
|
|
21
21
|
const { classes, styles, orientation, layout, vertical } = toPropsRefs(props, "classes", "styles", "orientation", "layout", "vertical");
|
|
22
22
|
const rootCls = useCSSVarCls(prefixCls);
|
|
@@ -45,24 +45,24 @@ const Splitter = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose
|
|
|
45
45
|
const [onOffsetStart, onOffsetUpdate, onOffsetEnd, onCollapse, movingIndex] = useResize(items, resizableInfos, itemPtgSizes, containerSize, updateSizes, isRTL);
|
|
46
46
|
const onInternalResizeStart = (index) => {
|
|
47
47
|
onOffsetStart(index);
|
|
48
|
-
|
|
48
|
+
emit("resizeStart", itemPxSizes.value);
|
|
49
49
|
};
|
|
50
50
|
const onInternalResizeUpdate = (index, offset, lazyEnd) => {
|
|
51
51
|
const nextSizes = onOffsetUpdate(index, offset);
|
|
52
|
-
if (lazyEnd)
|
|
53
|
-
else
|
|
52
|
+
if (lazyEnd) emit("resizeEnd", nextSizes);
|
|
53
|
+
else emit("resize", nextSizes);
|
|
54
54
|
};
|
|
55
55
|
const onInternalResizeEnd = (lazyEnd) => {
|
|
56
56
|
onOffsetEnd();
|
|
57
|
-
if (!lazyEnd)
|
|
57
|
+
if (!lazyEnd) emit("resizeEnd", itemPxSizes.value);
|
|
58
58
|
};
|
|
59
59
|
const onInternalCollapse = (index, type) => {
|
|
60
60
|
const nextSizes = onCollapse(index, type);
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
emit("resize", nextSizes);
|
|
62
|
+
emit("resizeEnd", nextSizes);
|
|
63
63
|
const collapsed = nextSizes.map((size) => Math.abs(size) < Number.EPSILON);
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
emit("collapse", collapsed, nextSizes);
|
|
65
|
+
emit("update:collapse", collapsed);
|
|
66
66
|
};
|
|
67
67
|
const mergedProps = computed(() => {
|
|
68
68
|
return {
|
|
@@ -141,7 +141,7 @@ const Splitter = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose
|
|
|
141
141
|
"endCollapsible": resizableInfo.endCollapsible,
|
|
142
142
|
"showStartCollapsibleIcon": resizableInfo.showStartCollapsibleIcon,
|
|
143
143
|
"showEndCollapsibleIcon": resizableInfo.showEndCollapsibleIcon,
|
|
144
|
-
"onDraggerDoubleClick":
|
|
144
|
+
"onDraggerDoubleClick": (index) => emit("draggerDoubleClick", index),
|
|
145
145
|
"onOffsetStart": onInternalResizeStart,
|
|
146
146
|
"onOffsetUpdate": (index, offsetX, offsetY, lazyEnd) => {
|
|
147
147
|
let offset = isVertical.value ? offsetY : offsetX;
|
|
@@ -207,30 +207,6 @@ const Splitter = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose
|
|
|
207
207
|
type: Object,
|
|
208
208
|
required: false
|
|
209
209
|
},
|
|
210
|
-
onDraggerDoubleClick: {
|
|
211
|
-
type: Function,
|
|
212
|
-
required: false
|
|
213
|
-
},
|
|
214
|
-
onResizeStart: {
|
|
215
|
-
type: Function,
|
|
216
|
-
required: false
|
|
217
|
-
},
|
|
218
|
-
onResize: {
|
|
219
|
-
type: Function,
|
|
220
|
-
required: false
|
|
221
|
-
},
|
|
222
|
-
onResizeEnd: {
|
|
223
|
-
type: Function,
|
|
224
|
-
required: false
|
|
225
|
-
},
|
|
226
|
-
onCollapse: {
|
|
227
|
-
type: Function,
|
|
228
|
-
required: false
|
|
229
|
-
},
|
|
230
|
-
"onUpdate:collapse": {
|
|
231
|
-
type: Function,
|
|
232
|
-
required: false
|
|
233
|
-
},
|
|
234
210
|
lazy: {
|
|
235
211
|
type: Boolean,
|
|
236
212
|
required: false,
|
|
@@ -245,6 +221,14 @@ const Splitter = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose
|
|
|
245
221
|
required: false
|
|
246
222
|
}
|
|
247
223
|
},
|
|
224
|
+
emits: [
|
|
225
|
+
"resizeStart",
|
|
226
|
+
"resize",
|
|
227
|
+
"resizeEnd",
|
|
228
|
+
"collapse",
|
|
229
|
+
"update:collapse",
|
|
230
|
+
"draggerDoubleClick"
|
|
231
|
+
],
|
|
248
232
|
name: "ASplitter",
|
|
249
233
|
inheritAttrs: false
|
|
250
234
|
});
|
|
@@ -67,15 +67,24 @@ interface SplitterProps extends ComponentBaseProps {
|
|
|
67
67
|
start?: VueNode;
|
|
68
68
|
end?: VueNode;
|
|
69
69
|
};
|
|
70
|
-
onDraggerDoubleClick?: (index: number) => void;
|
|
71
|
-
onResizeStart?: (sizes: number[]) => void;
|
|
72
|
-
onResize?: (sizes: number[]) => void;
|
|
73
|
-
onResizeEnd?: (sizes: number[]) => void;
|
|
74
|
-
onCollapse?: (collapsed: boolean[], sizes: number[]) => void;
|
|
75
|
-
'onUpdate:collapse'?: (collapsed: boolean[]) => void;
|
|
76
70
|
lazy?: boolean;
|
|
77
71
|
}
|
|
78
|
-
interface SplitterEmits {
|
|
72
|
+
interface SplitterEmits {
|
|
73
|
+
'resizeStart': (sizes: number[]) => void;
|
|
74
|
+
'resize': (sizes: number[]) => void;
|
|
75
|
+
'resizeEnd': (sizes: number[]) => void;
|
|
76
|
+
'collapse': (collapsed: boolean[], sizes: number[]) => void;
|
|
77
|
+
'update:collapse': (collapsed: boolean[]) => void;
|
|
78
|
+
'draggerDoubleClick': (index: number) => void;
|
|
79
|
+
}
|
|
80
|
+
interface SplitterEmitsProps {
|
|
81
|
+
onDraggerDoubleClick?: SplitterEmits['draggerDoubleClick'];
|
|
82
|
+
onResizeStart?: SplitterEmits['resizeStart'];
|
|
83
|
+
onResize?: SplitterEmits['resize'];
|
|
84
|
+
onResizeEnd?: SplitterEmits['resizeEnd'];
|
|
85
|
+
onCollapse?: SplitterEmits['collapse'];
|
|
86
|
+
'onUpdate:collapse'?: SplitterEmits['update:collapse'];
|
|
87
|
+
}
|
|
79
88
|
interface SplitterSlots {
|
|
80
89
|
draggerIcon?: () => any;
|
|
81
90
|
collapsibleIconStart?: () => any;
|
|
@@ -151,4 +160,4 @@ interface UseCollapsible {
|
|
|
151
160
|
setOldBasics: () => void;
|
|
152
161
|
}
|
|
153
162
|
//#endregion
|
|
154
|
-
export { DraggerSemantic, DraggerSemanticClassNames, DraggerSemanticStyles, InternalPanelProps, PanelProps, SplitterClassNamesType, SplitterEmits, SplitterLocale, SplitterProps, SplitterSemanticClassNames, SplitterSemanticDraggerClassNames, SplitterSemanticName, SplitterSemanticStyles, SplitterSlots, SplitterStylesType, UseCollapsible, UseCollapsibleProps, UseHandle, UseHandleProps, UseResize, UseResizeProps };
|
|
163
|
+
export { DraggerSemantic, DraggerSemanticClassNames, DraggerSemanticStyles, InternalPanelProps, PanelProps, SplitterClassNamesType, SplitterEmits, SplitterEmitsProps, SplitterLocale, SplitterProps, SplitterSemanticClassNames, SplitterSemanticDraggerClassNames, SplitterSemanticName, SplitterSemanticStyles, SplitterSlots, SplitterStylesType, UseCollapsible, UseCollapsibleProps, UseHandle, UseHandleProps, UseResize, UseResizeProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FormatConfig
|
|
1
|
+
import { FormatConfig } from "./utils.js";
|
|
2
2
|
import { StatisticProps, StatisticSlots } from "./Statistic.js";
|
|
3
3
|
import { SlotsType } from "vue";
|
|
4
4
|
//#region src/statistic/Timer.d.ts
|
|
@@ -12,7 +12,7 @@ interface StatisticTimeEmits {
|
|
|
12
12
|
* Only to be called when the type is `countdown`.
|
|
13
13
|
*/
|
|
14
14
|
finish: () => void;
|
|
15
|
-
change: (value
|
|
15
|
+
change: (value: number) => void;
|
|
16
16
|
}
|
|
17
17
|
interface InternalStatisticTimerProps extends StatisticTimerProps, StatisticTimeEmitsProps {}
|
|
18
18
|
interface StatisticTimeEmitsProps {
|
package/dist/steps/index.js
CHANGED
|
@@ -5,6 +5,7 @@ import { devUseWarning, isDev } from "../_util/warning.js";
|
|
|
5
5
|
import { useSize } from "../config-provider/hooks/useSize.js";
|
|
6
6
|
import { getSlotPropsFnRun, toPropsRefs } from "../_util/tools.js";
|
|
7
7
|
import InternalTooltip from "../tooltip/index.js";
|
|
8
|
+
import { isRenderable } from "../_util/is.js";
|
|
8
9
|
import useVariant from "../form/hooks/useVariant.js";
|
|
9
10
|
import { TARGET_CLS } from "../_util/wave/interface.js";
|
|
10
11
|
import wave_default from "../_util/wave/index.js";
|
|
@@ -105,7 +106,7 @@ const Steps = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) =>
|
|
|
105
106
|
const mappedIndex = originIndex !== void 0 && originIndex >= 0 ? mergedInitial.value + originIndex : index;
|
|
106
107
|
const { status, icon } = item;
|
|
107
108
|
let iconContent;
|
|
108
|
-
if (isDot.value || icon) iconContent = icon;
|
|
109
|
+
if (isDot.value || isRenderable(icon)) iconContent = icon;
|
|
109
110
|
else switch (status) {
|
|
110
111
|
case "finish":
|
|
111
112
|
iconContent = createVNode(CheckOutlined, { "class": `${itemIconCls.value}-finish` }, null);
|
|
@@ -62,7 +62,7 @@ function renderFilterItems(options) {
|
|
|
62
62
|
label: createVNode(Fragment, null, [createVNode(Component, { "checked": checked }, null), createVNode("span", null, [filter.text])])
|
|
63
63
|
};
|
|
64
64
|
if (normalizedSearchValue) {
|
|
65
|
-
if (typeof filterSearch === "function") return filterSearch(
|
|
65
|
+
if (typeof filterSearch === "function") return filterSearch(searchValue, filter) ? item : null;
|
|
66
66
|
return searchValueMatched(normalizedSearchValue, filter.text) ? item : null;
|
|
67
67
|
}
|
|
68
68
|
return item;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { PaginationOnChangeInfo } from "../../pagination/index.js";
|
|
2
1
|
import { TablePaginationConfig } from "../interface.js";
|
|
3
2
|
import { Ref } from "vue";
|
|
4
3
|
//#region src/table/hooks/usePagination.d.ts
|
|
5
4
|
declare const DEFAULT_PAGE_SIZE = 10;
|
|
6
5
|
declare function getPaginationParam(mergedPagination: TablePaginationConfig, pagination?: TablePaginationConfig | boolean): any;
|
|
7
6
|
type MaybeRef<T> = T | Ref<T>;
|
|
8
|
-
declare function usePagination(total: MaybeRef<number>, onChange: (current: number, pageSize: number
|
|
7
|
+
declare function usePagination(total: MaybeRef<number>, onChange: (current: number, pageSize: number) => void, pagination?: MaybeRef<TablePaginationConfig | false>): readonly [import("vue").ComputedRef<TablePaginationConfig>, (current?: number, pageSize?: number) => void];
|
|
9
8
|
//#endregion
|
|
10
9
|
export { DEFAULT_PAGE_SIZE, usePagination as default, getPaginationParam };
|
|
@@ -40,9 +40,7 @@ function usePagination(total, onChange, pagination) {
|
|
|
40
40
|
if (paginationRef.value && typeof paginationRef.value === "object") if (info) paginationRef.value.onChange?.(current, pageSize, info);
|
|
41
41
|
else paginationRef.value.onChange?.(current, pageSize);
|
|
42
42
|
refreshPagination(current, pageSize);
|
|
43
|
-
|
|
44
|
-
if (info) onChange(current, mergedPageSize, info);
|
|
45
|
-
else onChange(current, mergedPageSize);
|
|
43
|
+
onChange(current, pageSize || mergedPagination.value.pageSize || 10);
|
|
46
44
|
};
|
|
47
45
|
return [computed(() => {
|
|
48
46
|
if (paginationRef.value === false) return {};
|
|
@@ -25,27 +25,23 @@ function nextSortDirection(sortDirections, current) {
|
|
|
25
25
|
}
|
|
26
26
|
function collectSortStates(columns, init, pos) {
|
|
27
27
|
let sortStates = [];
|
|
28
|
-
const pushState = (column, columnPos) => {
|
|
28
|
+
const pushState = (column, columnPos, sortOrder = column.sortOrder) => {
|
|
29
29
|
sortStates.push({
|
|
30
30
|
column,
|
|
31
31
|
key: getColumnKey(column, columnPos),
|
|
32
32
|
multiplePriority: getMultiplePriority(column),
|
|
33
|
-
sortOrder
|
|
33
|
+
sortOrder
|
|
34
34
|
});
|
|
35
35
|
};
|
|
36
36
|
(columns || []).forEach((column, index) => {
|
|
37
37
|
const columnPos = getColumnPos(index, pos);
|
|
38
38
|
if (column.children) {
|
|
39
39
|
if ("sortOrder" in column) pushState(column, columnPos);
|
|
40
|
+
else if (init && column.sorter && column.defaultSortOrder) pushState(column, columnPos, column.defaultSortOrder);
|
|
40
41
|
sortStates = [...sortStates, ...collectSortStates(column.children, init, columnPos)];
|
|
41
42
|
} else if (column.sorter) {
|
|
42
43
|
if ("sortOrder" in column) pushState(column, columnPos);
|
|
43
|
-
else if (init && column.defaultSortOrder)
|
|
44
|
-
column,
|
|
45
|
-
key: getColumnKey(column, columnPos),
|
|
46
|
-
multiplePriority: getMultiplePriority(column),
|
|
47
|
-
sortOrder: column.defaultSortOrder
|
|
48
|
-
});
|
|
44
|
+
else if (init && column.defaultSortOrder) pushState(column, columnPos, column.defaultSortOrder);
|
|
49
45
|
}
|
|
50
46
|
});
|
|
51
47
|
return sortStates;
|
package/dist/table/style/size.js
CHANGED
|
@@ -14,6 +14,7 @@ const genSizeStyle = (token) => {
|
|
|
14
14
|
tfoot > tr > th,
|
|
15
15
|
tfoot > tr > td
|
|
16
16
|
`]: { padding: `${unit(paddingVertical)} ${unit(paddingHorizontal)}` },
|
|
17
|
+
[`${componentCls}-thead > tr > ${componentCls}-cell-scrollbar`]: { paddingInline: 0 },
|
|
17
18
|
[`${componentCls}-filter-trigger`]: { marginInlineEnd: unit(calc(paddingHorizontal).div(2).mul(-1).equal()) },
|
|
18
19
|
[`${componentCls}-expanded-row-fixed`]: { margin: `${unit(calc(paddingVertical).mul(-1).equal())} ${unit(calc(paddingHorizontal).mul(-1).equal())}` },
|
|
19
20
|
[`${componentCls}-tbody`]: { [`${componentCls}-wrapper:only-child ${componentCls}`]: {
|
package/dist/tabs/style/index.js
CHANGED
|
@@ -14,7 +14,11 @@ const genCardStyle = (token) => {
|
|
|
14
14
|
padding: tabsCardPadding,
|
|
15
15
|
background: cardBg,
|
|
16
16
|
border: `${unit(token.lineWidth)} ${token.lineType} ${colorBorderSecondary}`,
|
|
17
|
-
transition:
|
|
17
|
+
transition: [
|
|
18
|
+
"color",
|
|
19
|
+
"background-color",
|
|
20
|
+
"border-color"
|
|
21
|
+
].map((prop) => `${prop} ${token.motionDurationSlow} ${token.motionEaseInOut}`).join(", ")
|
|
18
22
|
},
|
|
19
23
|
[`${componentCls}-tab-active`]: {
|
|
20
24
|
color: itemSelectedColor,
|
|
@@ -9,6 +9,6 @@ declare function useColor(props: {
|
|
|
9
9
|
color: Ref<TagProps['color']>;
|
|
10
10
|
variant: Ref<TagProps['variant']>;
|
|
11
11
|
bordered: Ref<TagProps['bordered']>;
|
|
12
|
-
}, contextVariant?: Ref<TagProps['variant']>): readonly [import("vue").ComputedRef<"outlined" | "
|
|
12
|
+
}, contextVariant?: Ref<TagProps['variant']>): readonly [import("vue").ComputedRef<"outlined" | "solid" | "filled">, import("vue").ComputedRef<string | undefined>, import("vue").ComputedRef<boolean>, import("vue").ComputedRef<boolean>, import("vue").ComputedRef<CSSProperties>];
|
|
13
13
|
//#endregion
|
|
14
14
|
export { useColor as default };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { GenerateColorMap, GenerateNeutralColorMap } from "../ColorMap.js";
|
|
2
2
|
//#region src/theme/themes/dark/colors.d.ts
|
|
3
|
+
declare function generateDarkPalette(baseColor: string): string[];
|
|
3
4
|
declare const generateColorPalettes: GenerateColorMap;
|
|
4
5
|
declare const generateNeutralColorPalettes: GenerateNeutralColorMap;
|
|
5
6
|
//#endregion
|
|
6
|
-
export { generateColorPalettes, generateNeutralColorPalettes };
|
|
7
|
+
export { generateColorPalettes, generateDarkPalette, generateNeutralColorPalettes };
|
|
@@ -1,8 +1,24 @@
|
|
|
1
1
|
import { getAlphaColor, getSolidColor } from "./colorAlgorithm.js";
|
|
2
|
-
import { generate } from "@ant-design/colors";
|
|
2
|
+
import { generate, presetDarkPalettes, presetPrimaryColors } from "@ant-design/colors";
|
|
3
3
|
//#region src/theme/themes/dark/colors.ts
|
|
4
|
+
let presetDarkPaletteMap;
|
|
5
|
+
function generateDarkPalette(baseColor) {
|
|
6
|
+
if (!presetDarkPaletteMap) {
|
|
7
|
+
presetDarkPaletteMap = /* @__PURE__ */ new Map();
|
|
8
|
+
const map = presetDarkPaletteMap;
|
|
9
|
+
Object.keys(presetPrimaryColors).forEach((colorKey) => {
|
|
10
|
+
const primaryColor = presetPrimaryColors[colorKey];
|
|
11
|
+
const darkPalette = presetDarkPalettes[colorKey];
|
|
12
|
+
if (!primaryColor || !darkPalette) return;
|
|
13
|
+
const palette = [...darkPalette];
|
|
14
|
+
map.set(primaryColor, palette);
|
|
15
|
+
map.set(primaryColor.toLowerCase(), palette);
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return presetDarkPaletteMap.get(baseColor) ?? generate(baseColor, { theme: "dark" });
|
|
19
|
+
}
|
|
4
20
|
const generateColorPalettes = (baseColor) => {
|
|
5
|
-
const colors =
|
|
21
|
+
const colors = generateDarkPalette(baseColor);
|
|
6
22
|
return {
|
|
7
23
|
1: colors[0],
|
|
8
24
|
2: colors[1],
|
|
@@ -45,4 +61,4 @@ const generateNeutralColorPalettes = (bgBaseColor, textBaseColor, shadowColor) =
|
|
|
45
61
|
};
|
|
46
62
|
};
|
|
47
63
|
//#endregion
|
|
48
|
-
export { generateColorPalettes, generateNeutralColorPalettes };
|
|
64
|
+
export { generateColorPalettes, generateDarkPalette, generateNeutralColorPalettes };
|
|
@@ -2,12 +2,11 @@ import { PresetColors } from "../../interface/presetColors.js";
|
|
|
2
2
|
import { defaultPresetColors } from "../seed.js";
|
|
3
3
|
import genColorMapToken from "../shared/genColorMapToken.js";
|
|
4
4
|
import derivative$1 from "../default/index.js";
|
|
5
|
-
import { generateColorPalettes, generateNeutralColorPalettes } from "./colors.js";
|
|
6
|
-
import { generate } from "@ant-design/colors";
|
|
5
|
+
import { generateColorPalettes, generateDarkPalette, generateNeutralColorPalettes } from "./colors.js";
|
|
7
6
|
//#region src/theme/themes/dark/index.ts
|
|
8
7
|
const derivative = (token, mapToken) => {
|
|
9
8
|
const colorPalettes = Object.keys(defaultPresetColors).map((colorKey) => {
|
|
10
|
-
const colors =
|
|
9
|
+
const colors = generateDarkPalette(token[colorKey]);
|
|
11
10
|
return Array.from({ length: 10 }, () => 1).reduce((prev, _, i) => {
|
|
12
11
|
prev[`${colorKey}-${i + 1}`] = colors[i];
|
|
13
12
|
prev[`${colorKey}${i + 1}`] = colors[i];
|
package/dist/tour/index.js
CHANGED
|
@@ -218,7 +218,10 @@ const Tour = /* @__PURE__ */ defineComponent((props, { slots, emit, attrs }) =>
|
|
|
218
218
|
type: String,
|
|
219
219
|
required: false
|
|
220
220
|
},
|
|
221
|
-
gap: {
|
|
221
|
+
gap: {
|
|
222
|
+
type: Object,
|
|
223
|
+
required: false
|
|
224
|
+
},
|
|
222
225
|
animated: {
|
|
223
226
|
type: [Boolean, Object],
|
|
224
227
|
required: false,
|
package/dist/tour/style/index.js
CHANGED
|
@@ -128,12 +128,12 @@ const genBaseStyle = (token) => {
|
|
|
128
128
|
},
|
|
129
129
|
[`${componentCls}-mask`]: { [`${componentCls}-placeholder-animated`]: { transition: `all ${motionDurationSlow}` } },
|
|
130
130
|
[[
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
131
|
+
`${componentCls}-placement-left`,
|
|
132
|
+
`${componentCls}-placement-leftTop`,
|
|
133
|
+
`${componentCls}-placement-leftBottom`,
|
|
134
|
+
`${componentCls}-placement-right`,
|
|
135
|
+
`${componentCls}-placement-rightTop`,
|
|
136
|
+
`${componentCls}-placement-rightBottom`
|
|
137
137
|
].join(",")]: { [`${componentCls}-section`]: { borderRadius: token.min(tourBorderRadius, 8) } }
|
|
138
138
|
}, getArrowStyle(token, varRef("arrow-background-color"))];
|
|
139
139
|
};
|
|
@@ -37,6 +37,7 @@ const ListItem = /* @__PURE__ */ defineComponent((props) => {
|
|
|
37
37
|
"title": title,
|
|
38
38
|
"onClick": mergedDisabled ? void 0 : (event) => onClick(item, event)
|
|
39
39
|
}, [createVNode(checkbox_default, {
|
|
40
|
+
"skipGroup": true,
|
|
40
41
|
"class": clsx(`${prefixCls}-checkbox`, classNames.itemIcon),
|
|
41
42
|
"style": styles.itemIcon,
|
|
42
43
|
"checked": checked,
|
package/dist/transfer/Section.js
CHANGED
|
@@ -140,6 +140,7 @@ const TransferSection = /* @__PURE__ */ defineComponent((props) => {
|
|
|
140
140
|
};
|
|
141
141
|
return () => {
|
|
142
142
|
const checkBox = createVNode(checkbox_default, {
|
|
143
|
+
"skipGroup": true,
|
|
143
144
|
"disabled": !filteredItems.value.filterItems.some((d) => !d.disabled) || props.disabled,
|
|
144
145
|
"checked": checkStatus.value === "all",
|
|
145
146
|
"indeterminate": checkStatus.value === "part",
|
|
@@ -17,7 +17,8 @@ function useSelection(leftDataSource, rightDataSource, selectedKeys) {
|
|
|
17
17
|
const rightKeys = computed(() => new Set(unref(rightDataSource).map((src) => src?.key)));
|
|
18
18
|
const sourceSelectedKeys = computed(() => filterKeys(mergedSelectedKeys.value, leftKeys.value));
|
|
19
19
|
const targetSelectedKeys = computed(() => filterKeys(mergedSelectedKeys.value, rightKeys.value));
|
|
20
|
-
watch(() =>
|
|
20
|
+
watch([() => flattenKeys(leftKeys.value), () => flattenKeys(rightKeys.value)], () => {
|
|
21
|
+
if (unref(selectedKeys) !== void 0) return;
|
|
21
22
|
mergedSelectedKeys.value = [...filterKeys(mergedSelectedKeys.value, leftKeys.value), ...filterKeys(mergedSelectedKeys.value, rightKeys.value)];
|
|
22
23
|
});
|
|
23
24
|
const setMergedSelectedKeys = (nextKeys) => {
|
|
@@ -29,13 +29,18 @@ const DirectoryTree = /* @__PURE__ */ defineComponent((props, { slots, emit, exp
|
|
|
29
29
|
...props,
|
|
30
30
|
children: _children
|
|
31
31
|
}), { fieldNames: props.fieldNames });
|
|
32
|
+
if (props.expandedKeys !== void 0) {
|
|
33
|
+
const controlledKeys = props.expandedKeys ?? [];
|
|
34
|
+
return props.autoExpandParent || defaultExpandParent ? conductExpandParent(controlledKeys, keyEntities) : controlledKeys;
|
|
35
|
+
}
|
|
32
36
|
let initExpandedKeys;
|
|
33
37
|
if (defaultExpandAll) initExpandedKeys = Object.values(keyEntities).map(({ key }) => key);
|
|
34
|
-
else if (defaultExpandParent) initExpandedKeys = conductExpandParent(props.
|
|
35
|
-
else initExpandedKeys = props
|
|
38
|
+
else if (defaultExpandParent) initExpandedKeys = conductExpandParent(props.defaultExpandedKeys || [], keyEntities);
|
|
39
|
+
else initExpandedKeys = props.defaultExpandedKeys || [];
|
|
36
40
|
return initExpandedKeys;
|
|
37
41
|
};
|
|
38
|
-
const selectedKeys = shallowRef(props?.
|
|
42
|
+
const selectedKeys = shallowRef(props?.defaultSelectedKeys || []);
|
|
43
|
+
const mergedSelectedKeys = computed(() => props.selectedKeys !== void 0 ? props.selectedKeys : selectedKeys.value);
|
|
39
44
|
const expandedKeys = shallowRef(getInitExpandedKeys());
|
|
40
45
|
watch(() => props.selectedKeys, () => {
|
|
41
46
|
if (props.selectedKeys !== selectedKeys.value) selectedKeys.value = props?.selectedKeys || [];
|
|
@@ -85,7 +90,7 @@ const DirectoryTree = /* @__PURE__ */ defineComponent((props, { slots, emit, exp
|
|
|
85
90
|
cachedSelectedKeys.value = newSelectedKeys;
|
|
86
91
|
newEvent.selectedNodes = convertDirectoryKeysToNodes(treeData, newSelectedKeys, fieldNames);
|
|
87
92
|
}
|
|
88
|
-
selectedKeys.value = newSelectedKeys;
|
|
93
|
+
if (props.selectedKeys === void 0) selectedKeys.value = newSelectedKeys;
|
|
89
94
|
emit("update:selectedKeys", newSelectedKeys);
|
|
90
95
|
emit("select", newSelectedKeys, newEvent);
|
|
91
96
|
};
|
|
@@ -98,7 +103,7 @@ const DirectoryTree = /* @__PURE__ */ defineComponent((props, { slots, emit, exp
|
|
|
98
103
|
const { showIcon = true, expandAction = "click", ...otherProps } = props;
|
|
99
104
|
const { className, style, restAttrs } = getAttrStyleAndClass(attrs);
|
|
100
105
|
const connectClassName = clsx(`${prefixCls.value}-directory`, { [`${prefixCls.value}-directory-rtl`]: direction.value === "rtl" }, className);
|
|
101
|
-
return createVNode(Tree, mergeProps({ "ref": treeRef }, restAttrs, omit$1(otherProps, ["prefixCls"]), {
|
|
106
|
+
return createVNode(Tree, mergeProps({ "ref": treeRef }, restAttrs, omit$1(otherProps, ["prefixCls", "defaultExpandAll"]), {
|
|
102
107
|
onCheck(checked, info) {
|
|
103
108
|
emit("check", checked, info);
|
|
104
109
|
emit("update:checkedKeys", Array.isArray(checked) ? checked : checked?.checked ?? []);
|
|
@@ -168,7 +173,7 @@ const DirectoryTree = /* @__PURE__ */ defineComponent((props, { slots, emit, exp
|
|
|
168
173
|
"class": connectClassName,
|
|
169
174
|
"style": style,
|
|
170
175
|
"expandedKeys": expandedKeys.value,
|
|
171
|
-
"selectedKeys":
|
|
176
|
+
"selectedKeys": mergedSelectedKeys.value,
|
|
172
177
|
"onSelect": onSelect,
|
|
173
178
|
"onExpand": onExpand
|
|
174
179
|
}), slots);
|
|
@@ -19,6 +19,7 @@ function calcRangeKeys({ treeData, expandedKeys, startKey, endKey, fieldNames })
|
|
|
19
19
|
let record = RECORD_NONE;
|
|
20
20
|
if (!isNonNullable(startKey) || !isNonNullable(endKey)) return [];
|
|
21
21
|
if (startKey === endKey) return [startKey];
|
|
22
|
+
const expandedKeySet = new Set(expandedKeys);
|
|
22
23
|
function matchKey(key) {
|
|
23
24
|
return key === startKey || key === endKey;
|
|
24
25
|
}
|
|
@@ -32,20 +33,16 @@ function calcRangeKeys({ treeData, expandedKeys, startKey, endKey, fieldNames })
|
|
|
32
33
|
return false;
|
|
33
34
|
}
|
|
34
35
|
} else if (record === RECORD_START && !node.disabled && node.selectable !== false) keys.push(key);
|
|
35
|
-
return
|
|
36
|
+
return expandedKeySet.has(key);
|
|
36
37
|
}, fillFieldNames(fieldNames));
|
|
37
38
|
return keys;
|
|
38
39
|
}
|
|
39
40
|
function convertDirectoryKeysToNodes(treeData, keys, fieldNames) {
|
|
40
|
-
const restKeys =
|
|
41
|
+
const restKeys = new Set(keys);
|
|
41
42
|
const nodes = [];
|
|
42
43
|
traverseNodesKey(treeData, (key, node) => {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
nodes.push(node);
|
|
46
|
-
restKeys.splice(index, 1);
|
|
47
|
-
}
|
|
48
|
-
return !!restKeys.length;
|
|
44
|
+
if (key !== null && restKeys.delete(key)) nodes.push(node);
|
|
45
|
+
return restKeys.size > 0;
|
|
49
46
|
}, fillFieldNames(fieldNames));
|
|
50
47
|
return nodes;
|
|
51
48
|
}
|