Skip to content

Commit bc32155

Browse files
upgrade antd version to 5.19.4
1 parent 1bf4a84 commit bc32155

File tree

12 files changed

+334
-221
lines changed

12 files changed

+334
-221
lines changed

client/packages/lowcoder-design/src/components/Dropdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ export function Dropdown<T extends OptionsType>(props: DropdownProps<T>) {
235235
<SegmentedWrapper $placement={placement}>
236236
<Segmented
237237
block={true}
238-
onChange={(value) => props.onChange(value.toString())}
238+
onChange={(value) => props.onChange(String(value))}
239239
defaultValue={props.defaultValue}
240240
value={props.value}
241241
options={props.options as any}

client/packages/lowcoder-design/src/components/button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ const TacoButton = forwardRef(
181181
props: Omit<ButtonProps, "type"> & {
182182
buttonType?: TacoButtonType;
183183
},
184-
ref: React.Ref<HTMLElement>
184+
ref: React.Ref<HTMLButtonElement>
185185
) => {
186186
const { buttonType, ...restProps } = props;
187187
let loadingBackground;

client/packages/lowcoder/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"@types/react-test-renderer": "^18.0.0",
3838
"@types/react-virtualized": "^9.21.21",
3939
"animate.css": "^4.1.1",
40-
"antd": "5.13.2",
40+
"antd": "^5.19.4",
4141
"axios": "^1.6.2",
4242
"buffer": "^6.0.3",
4343
"clsx": "^2.0.0",

client/packages/lowcoder/src/components/Segmented.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import { default as AntdSegmented } from "antd/es/segmented";
2+
import type { SegmentedProps } from "antd/es/segmented";
23
import styled from "styled-components";
34

4-
type PropsType<T extends React.ForwardRefExoticComponent<any>> =
5-
T extends React.ForwardRefExoticComponent<infer R> ? R : never;
6-
type SegmentedProps = PropsType<typeof AntdSegmented>;
5+
// type PropsType<T extends React.ForwardRefExoticComponent<any>> =
6+
// T extends React.ForwardRefExoticComponent<infer R> ? R : never;
7+
// type SegmentedProps = PropsType<typeof AntdSegmented>;
78

8-
const StyledSegmented = styled(AntdSegmented)<PropsType<typeof AntdSegmented>>`
9+
const StyledSegmented = styled(AntdSegmented)<SegmentedProps>`
910
width: 100%;
1011
height: 28px;
1112
border-radius: 6px;

client/packages/lowcoder/src/comps/comps/buttonComp/scannerComp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { trans } from "i18n";
2121
import React, { Suspense, useEffect, useRef, useState, useContext } from "react";
2222
import { arrayStringExposingStateControl } from "comps/controls/codeStateControl";
2323
import { BoolControl } from "comps/controls/boolControl";
24-
import type { ItemType } from "antd/es/menu/hooks/useItems";
24+
import type { ItemType } from "antd/es/menu/interface";
2525
import { RefControl } from "comps/controls/refControl";
2626
import { EditorContext } from "comps/editorState";
2727
import { useMergeCompStyles } from "@lowcoder-ee/util/hooks";

client/packages/lowcoder/src/comps/comps/dateComp/dateComp.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,14 @@ import { dateRefMethods, disabledTime, handleDateChange } from "comps/comps/date
4545
import { DateUIView } from "./dateUIView";
4646
import { useIsMobile } from "util/hooks";
4747
import { RefControl } from "comps/controls/refControl";
48-
import { CommonPickerMethods } from "antd/es/date-picker/generatePicker/interface";
48+
// import { CommonPickerMethods } from "antd/es/date-picker/generatePicker/interface";
49+
import type { DatePickerType } from "antd/es/date-picker";
4950
import { DateRangeUIView } from "comps/comps/dateComp/dateRangeUIView";
5051
import { EditorContext } from "comps/editorState";
5152
import { useMergeCompStyles } from "@lowcoder-ee/util/hooks";
53+
import { DatePicker } from "antd";
54+
55+
const CommonPickerMethods = _.pick(DatePicker, 'ref');
5256

5357
const defaultStyle = {
5458
borderStyle: 'solid',
@@ -184,7 +188,7 @@ export const datePickerControl = new UICompBuilder(childrenMap, (props, dispatch
184188
animationStyle:props.animationStyle,
185189
children: (
186190
<DateUIView
187-
viewRef={props.viewRef}
191+
// viewRef={props.viewRef}
188192
disabledTime={() => disabledTime(props.minTime, props.maxTime)}
189193
$style={props.inputFieldStyle}
190194
disabled={props.disabled}

client/packages/lowcoder/src/pages/ApplicationV2/CreateDropdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
TacoButton,
1212
} from "lowcoder-design";
1313
import React, { FunctionComponent, useState } from "react";
14-
import type { ItemType } from "antd/es/menu/hooks/useItems";
14+
import type { ItemType } from "antd/es/menu/interface";
1515
import { HomeResInfo } from "../../util/homeResUtils";
1616
import { createAppItemClass } from "../tutorials/HomeTutorialsV2";
1717
import styled from "styled-components";

client/packages/lowcoder/src/pages/common/profileDropdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import { trans } from "i18n";
2727
import { showSwitchOrg } from "@lowcoder-ee/pages/common/customerService";
2828
import { checkIsMobile } from "util/commonUtils";
2929
import { selectSystemConfig } from "redux/selectors/configSelectors";
30-
import type { ItemType } from "antd/es/menu/hooks/useItems";
30+
import type { ItemType } from "antd/es/menu/interface";
3131

3232
const { Item } = Menu;
3333

client/packages/lowcoder/src/pages/editor/LeftLayersContent.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ import {
3939
saveCollisionStatus,
4040
} from "util/localStorageUtil";
4141
import { default as DownOutlined } from "@ant-design/icons/DownOutlined";
42-
import type { ItemType } from "antd/es/menu/hooks/useItems";
4342
import ThemeSettingsSelector from "components/ThemeSettingsSelector";
4443

4544
export type DisabledCollisionStatus = "true" | "false"; // "true" means collision is not enabled - Layering works, "false" means collision is enabled - Layering does not work

client/packages/lowcoder/src/pages/setting/theme/themeList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ function ThemeList(props: ThemeListProp) {
146146
<Column
147147
key="id"
148148
dataIndex="id"
149-
render={(value, theme) =>
149+
render={(value, theme: ThemeType) =>
150150
isAdmin && (
151151
<ControlCol>
152152
<EditButton

client/packages/lowcoder/src/pages/userAuth/authComponents.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ export const ConfirmButton = (props: {
175175
style?: CSSProperties;
176176
loading?: boolean;
177177
}) => {
178-
const ref = useRef<HTMLElement>(null);
178+
const ref = useRef<HTMLButtonElement>(null);
179179
return (
180180
<>
181181
<ReactHotkeys

0 commit comments

Comments
 (0)