antdv-next 1.8.1 → 1.8.2
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.js +1 -1
- package/dist/_util/hooks/index.js +1 -1
- package/dist/_util/hooks/useZIndex.js +14 -15
- package/dist/_util/vueNode.d.ts +6 -2
- package/dist/affix/index.js +25 -5
- package/dist/alert/Alert.d.ts +2 -2
- package/dist/alert/Alert.js +3 -3
- package/dist/alert/style/index.js +14 -8
- package/dist/anchor/Anchor.js +3 -1
- package/dist/antd-with-locales.esm.js +14079 -13978
- package/dist/antd-with-locales.js +111 -111
- package/dist/antd.css +1 -1
- package/dist/antd.esm.js +13053 -12954
- package/dist/antd.js +112 -112
- package/dist/app/App.js +2 -2
- package/dist/auto-complete/index.js +2 -2
- package/dist/avatar/Avatar.js +2 -2
- package/dist/avatar/AvatarGroup.js +1 -1
- package/dist/badge/Ribbon.js +1 -1
- package/dist/badge/index.js +2 -2
- package/dist/border-beam/BorderBeam.js +1 -1
- package/dist/breadcrumb/Breadcrumb.js +2 -2
- package/dist/button/Button.js +1 -1
- package/dist/button/buttonHelper.d.ts +1 -1
- package/dist/calendar/generateCalendar.js +2 -2
- package/dist/card/Card.js +2 -2
- package/dist/card/CardGrid.js +1 -1
- package/dist/card/CardMeta.js +1 -1
- package/dist/card/style/index.js +2 -2
- package/dist/carousel/index.js +2 -2
- package/dist/cascader/Panel.js +1 -1
- package/dist/cascader/index.js +4 -4
- package/dist/checkbox/Checkbox.js +2 -2
- package/dist/checkbox/Group.js +1 -1
- package/dist/collapse/Collapse.js +2 -2
- package/dist/color-picker/ColorPicker.js +2 -2
- package/dist/components.d.ts +2 -2
- package/dist/config-provider/context.d.ts +2 -0
- package/dist/config-provider/define.d.ts +5 -1
- package/dist/config-provider/index.js +38 -4
- package/dist/date-picker/generatePicker/generateRangePicker.js +3 -3
- package/dist/date-picker/generatePicker/generateSinglePicker.js +3 -3
- package/dist/date-picker/hooks/useMergedPickerSemantic.js +1 -1
- package/dist/date-picker/style/panel.js +3 -5
- package/dist/descriptions/hooks/useItems.d.ts +4 -4
- package/dist/descriptions/index.js +2 -2
- package/dist/divider/index.js +1 -1
- package/dist/drawer/DrawerPanel.js +1 -1
- package/dist/drawer/index.js +3 -3
- package/dist/dropdown/dropdown.js +3 -3
- package/dist/empty/index.js +2 -1
- package/dist/float-button/BackTop.js +2 -2
- package/dist/float-button/FloatButton.js +1 -1
- package/dist/float-button/FloatButtonGroup.js +2 -2
- package/dist/float-button/PurePanel.js +1 -1
- package/dist/form/ErrorList.js +1 -1
- package/dist/form/Form.js +2 -2
- package/dist/form/FormItem/ItemHolder.js +3 -3
- package/dist/form/FormItem/index.js +1 -1
- package/dist/form/FormItemLabel.js +1 -1
- package/dist/form/context.d.ts +1 -1
- package/dist/form/hooks/useVariant.js +1 -1
- package/dist/grid/col.js +1 -1
- package/dist/grid/row.js +1 -1
- package/dist/image/PreviewGroup.js +2 -2
- package/dist/image/hooks/usePreviewConfig.d.ts +4 -4
- package/dist/image/index.js +9 -5
- package/dist/index.d.ts +2 -2
- package/dist/input/Group.js +2 -2
- package/dist/input/Input.js +2 -2
- package/dist/input/OTP/OTPInput.js +1 -1
- package/dist/input/OTP/index.js +2 -2
- package/dist/input/Password.js +1 -1
- package/dist/input/Search.js +2 -2
- package/dist/input/TextArea.js +2 -2
- package/dist/input-number/index.js +3 -3
- package/dist/layout/Sider.js +2 -2
- package/dist/listy/index.js +1 -1
- package/dist/locale/id_ID.js +8 -6
- package/dist/locale/uz_UZ.js +12 -12
- package/dist/masonry/Masonry.js +1 -1
- package/dist/mentions/index.js +3 -3
- package/dist/menu/MenuDivider.js +1 -1
- package/dist/menu/menu.js +3 -3
- package/dist/message/PurePanel.js +2 -2
- package/dist/message/useMessage.js +2 -2
- package/dist/modal/ConfirmDialog.js +2 -2
- package/dist/modal/Modal.js +4 -4
- package/dist/modal/PurePanel.js +1 -1
- package/dist/modal/confirm.js +5 -6
- package/dist/notification/PurePanel.js +2 -2
- package/dist/notification/index.js +6 -7
- package/dist/notification/useNotification.js +2 -2
- package/dist/package.js +1 -1
- package/dist/pagination/Pagination.js +4 -4
- package/dist/popconfirm/index.js +2 -2
- package/dist/popover/PurePanel.js +2 -2
- package/dist/popover/index.js +1 -1
- package/dist/progress/progress.js +3 -3
- package/dist/qrcode/index.js +3 -3
- package/dist/radio/group.js +2 -2
- package/dist/radio/radio.js +2 -2
- package/dist/rate/index.js +2 -2
- package/dist/result/index.js +1 -1
- package/dist/segmented/index.js +1 -1
- package/dist/select/index.js +4 -4
- package/dist/skeleton/Avatar.js +1 -1
- package/dist/skeleton/Button.js +1 -1
- package/dist/skeleton/Element.js +1 -1
- package/dist/skeleton/Input.js +1 -1
- package/dist/skeleton/Node.js +1 -1
- package/dist/skeleton/Skeleton.js +1 -1
- package/dist/slider/index.js +1 -1
- package/dist/space/Addon.js +1 -1
- package/dist/space/index.js +1 -1
- package/dist/spin/index.js +2 -2
- package/dist/splitter/Splitter.js +2 -2
- package/dist/statistic/Statistic.js +1 -1
- package/dist/statistic/Timer.js +1 -1
- package/dist/steps/index.js +3 -3
- package/dist/switch/index.js +2 -2
- package/dist/table/InternalTable.js +10 -4
- package/dist/table/hooks/useFilter/FilterDropdown.js +1 -1
- package/dist/table/hooks/useSelection.js +1 -1
- package/dist/table/hooks/useSorter.js +22 -11
- package/dist/tabs/index.js +3 -3
- package/dist/tag/CheckableTag.js +1 -1
- package/dist/tag/CheckableTagGroup.d.ts +0 -1
- package/dist/tag/CheckableTagGroup.js +0 -4
- package/dist/tag/hooks/useColor.d.ts +1 -1
- package/dist/tag/index.js +1 -1
- package/dist/theme/themes/dark/index.js +1 -1
- package/dist/theme/useToken.js +2 -2
- package/dist/timeline/Timeline.js +1 -1
- package/dist/timeline/useItems.js +1 -1
- package/dist/tooltip/PurePanel.js +1 -1
- package/dist/tooltip/index.js +2 -2
- package/dist/tour/index.js +1 -1
- package/dist/transfer/Section.js +1 -1
- package/dist/transfer/Transfer.js +3 -3
- package/dist/tree/DirectoryTree.js +2 -2
- package/dist/tree/Tree.js +4 -4
- package/dist/tree-select/index.js +4 -4
- package/dist/typography/Base/index.js +2 -2
- package/dist/typography/Editable.js +6 -2
- package/dist/typography/Typography.js +1 -1
- package/dist/upload/Upload.js +11 -6
- package/dist/upload/UploadList/ListItem.js +1 -1
- package/dist/upload/UploadList/index.js +19 -12
- package/dist/version/token.json +1 -1
- package/dist/watermark/index.d.ts +13 -4
- package/dist/watermark/index.js +11 -7
- package/dist/watermark/useRafDebounce.js +1 -2
- package/package.json +6 -6
- package/web-tags.json +7 -3
- package/web-types.json +15 -6
|
@@ -191,24 +191,30 @@ function useSorter(props) {
|
|
|
191
191
|
const showSorterTooltip = computed(() => unref(rawShowSorterTooltip));
|
|
192
192
|
const globalLocale = computed(() => unref(rawGlobalLocale));
|
|
193
193
|
const sortStates = shallowRef(collectSortStates(collectColumns.value, true));
|
|
194
|
-
const
|
|
195
|
-
const newKeys = [];
|
|
194
|
+
const getColumnMap = (columns, pos, columnMap = /* @__PURE__ */ new Map()) => {
|
|
196
195
|
columns.forEach((item, index) => {
|
|
197
196
|
const columnPos = getColumnPos(index, pos);
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
newKeys.push(...childKeys);
|
|
197
|
+
if (item.sorter) {
|
|
198
|
+
const key = getColumnKey(item, columnPos);
|
|
199
|
+
if (!columnMap.has(key)) columnMap.set(key, item);
|
|
202
200
|
}
|
|
201
|
+
if (item.children) getColumnMap(item.children, columnPos, columnMap);
|
|
203
202
|
});
|
|
204
|
-
return
|
|
203
|
+
return columnMap;
|
|
205
204
|
};
|
|
206
205
|
const mergedSorterStates = computed(() => {
|
|
207
206
|
let validate = true;
|
|
208
|
-
|
|
207
|
+
let collectedStates = collectSortStates(collectColumns.value, false);
|
|
209
208
|
if (!collectedStates.length) {
|
|
210
|
-
const
|
|
211
|
-
|
|
209
|
+
const columnMap = getColumnMap(collectColumns.value);
|
|
210
|
+
collectedStates = sortStates.value.flatMap((state) => {
|
|
211
|
+
const column = columnMap.get(state.key);
|
|
212
|
+
return column?.sorter ? [{
|
|
213
|
+
...state,
|
|
214
|
+
column,
|
|
215
|
+
multiplePriority: getMultiplePriority(column)
|
|
216
|
+
}] : [];
|
|
217
|
+
});
|
|
212
218
|
}
|
|
213
219
|
const validateStates = [];
|
|
214
220
|
function patchStates(state) {
|
|
@@ -220,6 +226,10 @@ function useSorter(props) {
|
|
|
220
226
|
}
|
|
221
227
|
let multipleMode = null;
|
|
222
228
|
collectedStates.forEach((state) => {
|
|
229
|
+
if (!state.sortOrder) {
|
|
230
|
+
patchStates(state);
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
223
233
|
if (multipleMode === null) {
|
|
224
234
|
patchStates(state);
|
|
225
235
|
if (state.sortOrder) if (state.multiplePriority === false) validate = false;
|
|
@@ -245,7 +255,8 @@ function useSorter(props) {
|
|
|
245
255
|
});
|
|
246
256
|
const triggerSorter = (sortState) => {
|
|
247
257
|
let newSorterStates;
|
|
248
|
-
|
|
258
|
+
const activeSorterState = mergedSorterStates.value.find(({ sortOrder }) => sortOrder);
|
|
259
|
+
if (sortState.multiplePriority === false || !activeSorterState || activeSorterState.multiplePriority === false) newSorterStates = [sortState];
|
|
249
260
|
else newSorterStates = [...mergedSorterStates.value.filter(({ key }) => key !== sortState.key), sortState];
|
|
250
261
|
sortStates.value = newSorterStates;
|
|
251
262
|
onSorterChange(generateSorterInfo(newSorterStates), newSorterStates);
|
package/dist/tabs/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getAttrStyleAndClass, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
2
2
|
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
3
|
+
import { devUseWarning, isDev } from "../_util/warning.js";
|
|
3
4
|
import { useSize } from "../config-provider/hooks/useSize.js";
|
|
4
|
-
import { getAttrStyleAndClass, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
5
5
|
import { getSlotPropsFnRun, toPropsRefs } from "../_util/tools.js";
|
|
6
6
|
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
7
7
|
import useAnimateConfig from "./hooks/useAnimateConfig.js";
|
|
@@ -10,8 +10,8 @@ import useLegacyItems from "./hooks/useLegacyItems.js";
|
|
|
10
10
|
import style_default from "./style/index.js";
|
|
11
11
|
import { computed, createVNode, defineComponent, mergeProps, shallowRef, toRef } from "vue";
|
|
12
12
|
import { clsx } from "@v-c/util";
|
|
13
|
-
import { CloseOutlined, EllipsisOutlined, PlusOutlined } from "@antdv-next/icons";
|
|
14
13
|
import { omit as omit$1 } from "es-toolkit";
|
|
14
|
+
import { CloseOutlined, EllipsisOutlined, PlusOutlined } from "@antdv-next/icons";
|
|
15
15
|
import VcTabs from "@v-c/tabs";
|
|
16
16
|
//#region src/tabs/index.tsx
|
|
17
17
|
const InternalTabs = /* @__PURE__ */ defineComponent((props, { attrs, slots, emit, expose }) => {
|
package/dist/tag/CheckableTag.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useComponentBaseConfig, useConfig } from "../config-provider/context.js";
|
|
2
1
|
import { pureAttrs } from "../_util/hooks/useMergeSemantic.js";
|
|
2
|
+
import { useComponentBaseConfig, useConfig } from "../config-provider/context.js";
|
|
3
3
|
import { clsx, getSlotPropsFnRun, toPropsRefs } from "../_util/tools.js";
|
|
4
4
|
import { useDisabledContext } from "../config-provider/DisabledContext.js";
|
|
5
5
|
import style_default from "./style/index.js";
|
|
@@ -29,7 +29,6 @@ type CheckableTagGroupProps<CheckableTagValue = CheckableTagDefaultValue> = Comp
|
|
|
29
29
|
styles?: SemanticStyles<SemanticName>;
|
|
30
30
|
options?: (CheckableTagOption<CheckableTagValue> | CheckableTagValue)[];
|
|
31
31
|
id?: string;
|
|
32
|
-
role?: string;
|
|
33
32
|
disabled?: boolean;
|
|
34
33
|
} & (CheckableTagGroupSingleProps<CheckableTagValue> | CheckableTagGroupMultipleProps<CheckableTagValue>);
|
|
35
34
|
interface CheckableTagGroupRef {
|
|
@@ -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" | "filled" | "solid">, 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 };
|
package/dist/tag/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useComponentBaseConfig, useConfig } from "../config-provider/context.js";
|
|
2
1
|
import { normalizeStyle as normalizeStyle$1 } from "../_util/styleUtils.js";
|
|
3
2
|
import { pureAttrs, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
3
|
+
import { useComponentBaseConfig, useConfig } from "../config-provider/context.js";
|
|
4
4
|
import { getSlotPropsFnRun, toPropsRefs as toPropsRefs$1 } from "../_util/tools.js";
|
|
5
5
|
import { useDisabledContext } from "../config-provider/DisabledContext.js";
|
|
6
6
|
import useVariant from "../form/hooks/useVariant.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defaultPresetColors } from "../seed.js";
|
|
2
1
|
import { PresetColors } from "../../interface/presetColors.js";
|
|
2
|
+
import { defaultPresetColors } from "../seed.js";
|
|
3
3
|
import genColorMapToken from "../shared/genColorMapToken.js";
|
|
4
4
|
import derivative$1 from "../default/index.js";
|
|
5
5
|
import { generateColorPalettes, generateNeutralColorPalettes } from "./colors.js";
|
package/dist/theme/useToken.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { useConfig } from "../config-provider/context.js";
|
|
2
|
+
import version_default from "../version/index.js";
|
|
1
3
|
import seedToken from "./themes/seed.js";
|
|
2
4
|
import defaultTheme from "./themes/default/theme.js";
|
|
3
5
|
import { useDesignToken } from "./context.js";
|
|
4
|
-
import { useConfig } from "../config-provider/context.js";
|
|
5
|
-
import version_default from "../version/index.js";
|
|
6
6
|
import formatToken from "./util/alias.js";
|
|
7
7
|
import { computed, effectScope } from "vue";
|
|
8
8
|
import { createCacheToken, useGlobalCacheEntry, useStyleContext } from "@antdv-next/cssinjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
1
2
|
import { useBaseConfig, useComponentBaseConfig } from "../config-provider/context.js";
|
|
2
3
|
import { genCssVar } from "../theme/util/genStyleUtils.js";
|
|
3
|
-
import { useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
4
4
|
import { toPropsRefs as toPropsRefs$1 } from "../_util/tools.js";
|
|
5
5
|
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
6
6
|
import useVariant from "../form/hooks/useVariant.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { genCssVar } from "../theme/util/genStyleUtils.js";
|
|
2
1
|
import { normalizeStyle as normalizeStyle$1 } from "../_util/styleUtils.js";
|
|
2
|
+
import { genCssVar } from "../theme/util/genStyleUtils.js";
|
|
3
3
|
import { computed, createVNode } from "vue";
|
|
4
4
|
import { classNames } from "@v-c/util";
|
|
5
5
|
import { LoadingOutlined } from "@antdv-next/icons";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
2
1
|
import { useMergeSemantic, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
2
|
+
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
3
3
|
import { getSlotPropsFnRun, toPropsRefs } from "../_util/tools.js";
|
|
4
4
|
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
5
5
|
import style_default from "./style/index.js";
|
package/dist/tooltip/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
1
2
|
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
2
3
|
import useToken from "../theme/useToken.js";
|
|
3
|
-
import { ContextIsolator } from "../_util/ContextIsolator.js";
|
|
4
|
-
import { useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
5
4
|
import { ZIndexProvider } from "../_util/zindexContext.js";
|
|
6
5
|
import { useZIndex } from "../_util/hooks/useZIndex.js";
|
|
6
|
+
import { ContextIsolator } from "../_util/ContextIsolator.js";
|
|
7
7
|
import getPlacements from "../_util/placements.js";
|
|
8
8
|
import { getSlotPropsFnRun, toPropsRefs as toPropsRefs$1 } from "../_util/tools.js";
|
|
9
9
|
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
package/dist/tour/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { pureAttrs, resolveStyleOrClass, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
1
2
|
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
2
3
|
import useToken from "../theme/useToken.js";
|
|
3
|
-
import { pureAttrs, resolveStyleOrClass, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
4
4
|
import { ZIndexProvider } from "../_util/zindexContext.js";
|
|
5
5
|
import { useZIndex } from "../_util/hooks/useZIndex.js";
|
|
6
6
|
import getPlacements from "../_util/placements.js";
|
package/dist/transfer/Section.js
CHANGED
|
@@ -9,8 +9,8 @@ import TransferListBody from "./ListBody.js";
|
|
|
9
9
|
import { Fragment, computed, createVNode, defineComponent, isVNode, mergeProps, ref } from "vue";
|
|
10
10
|
import { clsx } from "@v-c/util";
|
|
11
11
|
import { filterEmpty } from "@v-c/util/dist/props-util";
|
|
12
|
-
import { DownOutlined } from "@antdv-next/icons";
|
|
13
12
|
import { omit as omit$1 } from "es-toolkit";
|
|
13
|
+
import { DownOutlined } from "@antdv-next/icons";
|
|
14
14
|
//#region src/transfer/Section.tsx
|
|
15
15
|
const defaultRender = () => null;
|
|
16
16
|
function isRenderResultPlainObject(result) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { devUseWarning, isDev } from "../_util/warning.js";
|
|
2
|
-
import { useFormItemInputContext } from "../form/context.js";
|
|
3
|
-
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
4
1
|
import { getAttrStyleAndClass, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
5
2
|
import { useMultipleSelect } from "../_util/hooks/useMultipleSelect.js";
|
|
3
|
+
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
4
|
+
import { devUseWarning, isDev } from "../_util/warning.js";
|
|
5
|
+
import { useFormItemInputContext } from "../form/context.js";
|
|
6
6
|
import { getSlotPropsFnRun, toPropsRefs as toPropsRefs$1 } from "../_util/tools.js";
|
|
7
7
|
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
8
8
|
import { useDisabledContext } from "../config-provider/DisabledContext.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
2
1
|
import { getAttrStyleAndClass } from "../_util/hooks/useMergeSemantic.js";
|
|
2
|
+
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
3
3
|
import Tree from "./Tree.js";
|
|
4
4
|
import { calcRangeKeys, convertDirectoryKeysToNodes } from "./utils/dictUtil.js";
|
|
5
5
|
import { computed, createVNode, defineComponent, mergeProps, shallowRef, watch } from "vue";
|
|
6
6
|
import { clsx } from "@v-c/util";
|
|
7
7
|
import { filterEmpty } from "@v-c/util/dist/props-util";
|
|
8
|
-
import { FileOutlined, FolderOpenOutlined, FolderOutlined } from "@antdv-next/icons";
|
|
9
8
|
import { omit as omit$1 } from "es-toolkit";
|
|
9
|
+
import { FileOutlined, FolderOpenOutlined, FolderOutlined } from "@antdv-next/icons";
|
|
10
10
|
import { conductExpandParent, convertDataToEntities, convertTreeToData } from "@v-c/tree";
|
|
11
11
|
//#region src/tree/DirectoryTree.tsx
|
|
12
12
|
function getIcon(props) {
|
package/dist/tree/Tree.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { devUseWarning, isDev } from "../_util/warning.js";
|
|
2
|
-
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
3
|
-
import useToken from "../theme/useToken.js";
|
|
4
1
|
import { normalizeStyle as normalizeStyle$1 } from "../_util/styleUtils.js";
|
|
5
2
|
import { getAttrStyleAndClass, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
3
|
+
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
4
|
+
import useToken from "../theme/useToken.js";
|
|
5
|
+
import { devUseWarning, isDev } from "../_util/warning.js";
|
|
6
6
|
import { getSlotPropsFnRun, toPropsRefs } from "../_util/tools.js";
|
|
7
7
|
import initCollapseMotion from "../_util/motion.js";
|
|
8
8
|
import { useDisabledContext } from "../config-provider/DisabledContext.js";
|
|
@@ -11,8 +11,8 @@ import dropIndicatorRender from "./utils/dropIndicator.js";
|
|
|
11
11
|
import SwitcherIconCom from "./utils/iconUtil.js";
|
|
12
12
|
import { computed, createVNode, defineComponent, mergeDefaults, mergeProps, shallowRef } from "vue";
|
|
13
13
|
import { clsx } from "@v-c/util";
|
|
14
|
-
import { HolderOutlined } from "@antdv-next/icons";
|
|
15
14
|
import { omit as omit$1 } from "es-toolkit";
|
|
15
|
+
import { HolderOutlined } from "@antdv-next/icons";
|
|
16
16
|
import VcTree from "@v-c/tree";
|
|
17
17
|
//#region src/tree/Tree.tsx
|
|
18
18
|
const Tree = /* @__PURE__ */ defineComponent((props, { slots, emit, expose, attrs }) => {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { getAttrStyleAndClass, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
2
|
+
import { useComponentBaseConfig, useConfig } from "../config-provider/context.js";
|
|
3
|
+
import useToken from "../theme/useToken.js";
|
|
1
4
|
import { devUseWarning, isDev } from "../_util/warning.js";
|
|
5
|
+
import { useZIndex } from "../_util/hooks/useZIndex.js";
|
|
2
6
|
import { useFormItemInputContext } from "../form/context.js";
|
|
3
|
-
import { useComponentBaseConfig, useConfig } from "../config-provider/context.js";
|
|
4
7
|
import { useSize } from "../config-provider/hooks/useSize.js";
|
|
5
|
-
import useToken from "../theme/useToken.js";
|
|
6
8
|
import { useCompactItemContext } from "../space/Compact.js";
|
|
7
|
-
import { getAttrStyleAndClass, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
8
|
-
import { useZIndex } from "../_util/hooks/useZIndex.js";
|
|
9
9
|
import { getSlotPropsFnRun, toPropsRefs } from "../_util/tools.js";
|
|
10
10
|
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
11
11
|
import { useDisabledContext } from "../config-provider/DisabledContext.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { getAttrStyleAndClass, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../../_util/hooks/useMergeSemantic.js";
|
|
1
2
|
import { useComponentBaseConfig } from "../../config-provider/context.js";
|
|
2
3
|
import { genCssVar } from "../../theme/util/genStyleUtils.js";
|
|
3
|
-
import { getAttrStyleAndClass, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../../_util/hooks/useMergeSemantic.js";
|
|
4
4
|
import { toPropsRefs as toPropsRefs$1 } from "../../_util/tools.js";
|
|
5
5
|
import InternalTooltip from "../../tooltip/index.js";
|
|
6
6
|
import useLocale from "../../locale/useLocale.js";
|
|
@@ -354,7 +354,7 @@ const Base = /* @__PURE__ */ defineComponent((props, { slots, attrs, emit }) =>
|
|
|
354
354
|
"aria-busy": enableShimmer.value ? !props.disabled : void 0,
|
|
355
355
|
"aria-disabled": enableShimmer.value && props.disabled ? true : void 0,
|
|
356
356
|
"rootClass": props.rootClass
|
|
357
|
-
}, restAttrs), { default: () => [createVNode(Ellipsis, mergeProps({
|
|
357
|
+
}, { id: props.id }, restAttrs), { default: () => [createVNode(Ellipsis, mergeProps({
|
|
358
358
|
"enableMeasure": mergedEnableEllipsis.value && !cssEllipsis.value,
|
|
359
359
|
"text": children,
|
|
360
360
|
"rows": rows.value,
|
|
@@ -3,7 +3,7 @@ import { toPropsRefs } from "../_util/tools.js";
|
|
|
3
3
|
import { cloneElement } from "../_util/vueNode.js";
|
|
4
4
|
import InternalTextArea from "../input/TextArea.js";
|
|
5
5
|
import style_default from "./style/index.js";
|
|
6
|
-
import { createVNode, defineComponent, mergeDefaults, onMounted, shallowRef, watch } from "vue";
|
|
6
|
+
import { createVNode, defineComponent, mergeDefaults, onBeforeUnmount, onMounted, shallowRef, watch } from "vue";
|
|
7
7
|
import { clsx } from "@v-c/util";
|
|
8
8
|
import { EnterOutlined } from "@antdv-next/icons";
|
|
9
9
|
import KeyCode from "@v-c/util/dist/KeyCode";
|
|
@@ -11,6 +11,10 @@ import KeyCode from "@v-c/util/dist/KeyCode";
|
|
|
11
11
|
const Editable = /* @__PURE__ */ defineComponent((props) => {
|
|
12
12
|
const { prefixCls, direction, maxLength, autoSize } = toPropsRefs(props, "prefixCls", "direction", "maxLength", "autoSize");
|
|
13
13
|
const ref = shallowRef();
|
|
14
|
+
let isUnmounting = false;
|
|
15
|
+
onBeforeUnmount(() => {
|
|
16
|
+
isUnmounting = true;
|
|
17
|
+
});
|
|
14
18
|
const inComposition = shallowRef(false);
|
|
15
19
|
const lastKeyCode = shallowRef(null);
|
|
16
20
|
const current = shallowRef(props.value);
|
|
@@ -49,7 +53,7 @@ const Editable = /* @__PURE__ */ defineComponent((props) => {
|
|
|
49
53
|
} else if (keyCode === KeyCode.ESC) props?.onCancel?.();
|
|
50
54
|
};
|
|
51
55
|
const onBlur = () => {
|
|
52
|
-
confirmChange();
|
|
56
|
+
if (!isUnmounting) confirmChange();
|
|
53
57
|
};
|
|
54
58
|
const [hashId, cssVarCls] = style_default(prefixCls);
|
|
55
59
|
const icon = props.enterIcon === void 0 ? createVNode(EnterOutlined, null, null) : props.enterIcon;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
2
1
|
import { getAttrStyleAndClass } from "../_util/hooks/useMergeSemantic.js";
|
|
2
|
+
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
3
3
|
import { toPropsRefs } from "../_util/tools.js";
|
|
4
4
|
import style_default from "./style/index.js";
|
|
5
5
|
import { createVNode, defineComponent, mergeProps, resolveDynamicComponent, shallowRef } from "vue";
|
package/dist/upload/Upload.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { devUseWarning, isDev } from "../_util/warning.js";
|
|
2
|
-
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
3
1
|
import { getAttrStyleAndClass, useMergeSemantic, useSemanticRootStyle, useToArr, useToProps } from "../_util/hooks/useMergeSemantic.js";
|
|
2
|
+
import { useComponentBaseConfig } from "../config-provider/context.js";
|
|
3
|
+
import { devUseWarning, isDev } from "../_util/warning.js";
|
|
4
|
+
import fallbackProp from "../_util/fallbackProp.js";
|
|
4
5
|
import { toPropsRefs as toPropsRefs$1 } from "../_util/tools.js";
|
|
5
6
|
import useCSSVarCls from "../config-provider/hooks/useCSSVarCls.js";
|
|
6
7
|
import { useDisabledContext } from "../config-provider/DisabledContext.js";
|
|
@@ -19,7 +20,11 @@ function _isSlot(s) {
|
|
|
19
20
|
}
|
|
20
21
|
const LIST_IGNORE = `__LIST_IGNORE_${Date.now()}__`;
|
|
21
22
|
const InternalUpload = /* @__PURE__ */ defineComponent((props, { slots, attrs, expose, emit }) => {
|
|
22
|
-
const { prefixCls, direction, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, customRequest: contextCustomRequest, progress: contextProgress } = useComponentBaseConfig("upload", props, [
|
|
23
|
+
const { prefixCls, direction, class: contextClassName, style: contextStyle, classes: contextClassNames, styles: contextStyles, customRequest: contextCustomRequest, progress: contextProgress, accept: contextAccept } = useComponentBaseConfig("upload", props, [
|
|
24
|
+
"customRequest",
|
|
25
|
+
"progress",
|
|
26
|
+
"accept"
|
|
27
|
+
]);
|
|
23
28
|
const { disabled: customDisabled, classes, styles, rootClass } = toPropsRefs$1(props, "disabled", "classes", "styles", "rootClass");
|
|
24
29
|
const disabled = useDisabledContext();
|
|
25
30
|
const mergedDisabled = computed(() => customDisabled.value ?? disabled.value);
|
|
@@ -28,6 +33,7 @@ const InternalUpload = /* @__PURE__ */ defineComponent((props, { slots, attrs, e
|
|
|
28
33
|
...contextProgress.value,
|
|
29
34
|
...props.progress
|
|
30
35
|
} : void 0);
|
|
36
|
+
const mergedAccept = computed(() => fallbackProp(props.accept, contextAccept.value, ""));
|
|
31
37
|
const internalFileList = shallowRef(props?.fileList ?? props?.defaultFileList ?? []);
|
|
32
38
|
watch(() => props.fileList, () => {
|
|
33
39
|
internalFileList.value = props?.fileList ?? [];
|
|
@@ -244,7 +250,7 @@ const InternalUpload = /* @__PURE__ */ defineComponent((props, { slots, attrs, e
|
|
|
244
250
|
}, null);
|
|
245
251
|
};
|
|
246
252
|
return () => {
|
|
247
|
-
const { type, multiple, action,
|
|
253
|
+
const { type, multiple, action, supportServerRender, hasControlInside, openFileDialogOnClick, withCredentials, id, name } = props;
|
|
248
254
|
const children = filterEmpty(slots.default?.() ?? []);
|
|
249
255
|
const hasChildren = children.length > 0;
|
|
250
256
|
const { className, restAttrs } = getAttrStyleAndClass(attrs);
|
|
@@ -268,7 +274,7 @@ const InternalUpload = /* @__PURE__ */ defineComponent((props, { slots, attrs, e
|
|
|
268
274
|
data: props.data ?? {},
|
|
269
275
|
multiple: multiple ?? false,
|
|
270
276
|
action: action ?? "",
|
|
271
|
-
accept:
|
|
277
|
+
accept: mergedAccept.value,
|
|
272
278
|
supportServerRender: supportServerRender ?? true,
|
|
273
279
|
prefixCls: prefixCls.value,
|
|
274
280
|
disabled: mergedDisabled.value,
|
|
@@ -502,7 +508,6 @@ const InternalUpload = /* @__PURE__ */ defineComponent((props, { slots, attrs, e
|
|
|
502
508
|
type: "select",
|
|
503
509
|
data: {},
|
|
504
510
|
multiple: false,
|
|
505
|
-
accept: "",
|
|
506
511
|
hasControlInside: true,
|
|
507
512
|
action: "",
|
|
508
513
|
supportServerRender: true
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useComponentBaseConfig } from "../../config-provider/context.js";
|
|
2
1
|
import { getAttrStyleAndClass } from "../../_util/hooks/useMergeSemantic.js";
|
|
2
|
+
import { useComponentBaseConfig } from "../../config-provider/context.js";
|
|
3
3
|
import InternalTooltip from "../../tooltip/index.js";
|
|
4
4
|
import { isRenderable } from "../../_util/is.js";
|
|
5
5
|
import progress_default from "../../progress/index.js";
|
|
@@ -76,18 +76,25 @@ const UploadList = /* @__PURE__ */ defineComponent((props, { slots }) => {
|
|
|
76
76
|
callback();
|
|
77
77
|
if (customIcon?.props?.onClick) customIcon.props.onClick(e);
|
|
78
78
|
};
|
|
79
|
-
if (isVNode(customIcon))
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
79
|
+
if (isVNode(customIcon)) {
|
|
80
|
+
const clonedIcon = cloneVNode(customIcon);
|
|
81
|
+
clonedIcon.props = {
|
|
82
|
+
...clonedIcon.props,
|
|
83
|
+
onClick: void 0
|
|
84
|
+
};
|
|
85
|
+
return createVNode(button_default, mergeProps({
|
|
86
|
+
"type": "text",
|
|
87
|
+
"size": "small"
|
|
88
|
+
}, {
|
|
89
|
+
"title": title,
|
|
90
|
+
"aria-label": title || void 0
|
|
91
|
+
}, {
|
|
92
|
+
"class": `${actionPrefixCls}-list-item-action`,
|
|
93
|
+
"disabled": mergedDisabled,
|
|
94
|
+
"onClick": handleClick,
|
|
95
|
+
"icon": clonedIcon
|
|
96
|
+
}), null);
|
|
97
|
+
}
|
|
91
98
|
return createVNode(button_default, mergeProps({
|
|
92
99
|
"type": "text",
|
|
93
100
|
"size": "small"
|