Skip to content

Commit ac418a7

Browse files
committed
Reviewed Changes
1 parent 775b7a1 commit ac418a7

File tree

20 files changed

+52
-520
lines changed

20 files changed

+52
-520
lines changed

client/package.json

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -72,25 +72,14 @@
7272
"eslint-plugin-only-ascii@^0.0.0": "patch:eslint-plugin-only-ascii@npm%3A0.0.0#./.yarn/patches/eslint-plugin-only-ascii-npm-0.0.0-29e3417685.patch"
7373
},
7474
"dependencies": {
75-
"@emotion/react": "^11.14.0",
76-
"@emotion/styled": "^11.14.0",
77-
"@jsonforms/core": "3.5.1",
78-
"@jsonforms/material-renderers": "^3.5.1",
79-
"@jsonforms/react": "3.5.1",
8075
"@lottiefiles/react-lottie-player": "^3.5.3",
8176
"@remixicon/react": "^4.1.1",
82-
"@rjsf/antd": "^6.0.0-beta.10",
83-
"@rjsf/core": "^6.0.0-beta.10",
84-
"@rjsf/utils": "^6.0.0-beta.10",
85-
"@rjsf/validator-ajv8": "^6.0.0-beta.10",
8677
"@supabase/supabase-js": "^2.45.4",
8778
"@testing-library/react": "^14.1.2",
8879
"@testing-library/user-event": "^14.5.1",
8980
"@types/styled-components": "^5.1.34",
90-
"antd": "^5.25.3",
9181
"antd-mobile": "^5.34.0",
9282
"chalk": "4",
93-
"dayjs": "^1.11.13",
9483
"flag-icons": "^7.2.1",
9584
"number-precision": "^1.6.0",
9685
"react-countup": "^6.5.3",
@@ -99,7 +88,6 @@
9988
"resize-observer-polyfill": "^1.5.1",
10089
"rollup": "^4.22.5",
10190
"simplebar": "^6.2.5",
102-
"styled-components": "^6.1.18",
10391
"tui-image-editor": "^3.15.3"
10492
}
10593
}

client/packages/lowcoder-comps/src/comps/calendarComp/calendarConstants.tsx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import {
2828
SlotLabelContentArg,
2929
ViewContentArg,
3030
} from "@fullcalendar/core";
31-
import { default as Form, FormProps } from "antd/es/form";
31+
import { default as Form } from "antd/es/form";
3232

3333
type Theme = typeof Theme;
3434
type EventModalStyleType = typeof EventModalStyleType;
@@ -776,11 +776,9 @@ export const Event = styled.div<{
776776
}
777777
`;
778778

779-
export const FormWrapper = styled(Form)<
780-
FormProps & {
781-
$modalStyle?: EventModalStyleType;
782-
}
783-
>`
779+
export const FormWrapper = styled(Form)<{
780+
$modalStyle?: EventModalStyleType
781+
}>`
784782
.ant-form-item-label {
785783
width: 125px;
786784
text-align: left;
@@ -789,12 +787,12 @@ export const FormWrapper = styled(Form)<
789787
label:not(.ant-form-item-required) {
790788
margin-left: 2px;
791789
}
792-
label.ant-form-item-required{
790+
label.ant-form-item-required{
793791
margin-left: 2px;
794792
}
795793
label span {
796794
${UnderlineCss}
797-
795+
798796
}
799797
}
800798

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { default as Form, FormProps } from "antd/es/form";
1+
import { default as Form } from "antd/es/form";
22
import { default as AntdFormItem, FormItemProps as AntdFormItemProps} from "antd/es/form/FormItem";
33
import { default as Input, InputProps } from "antd/es/input";
44
import { default as TextArea, TextAreaProps } from "antd/es/input/TextArea";
@@ -429,7 +429,7 @@ export const FormKeyValueItem = (props: FormItemProps) => (
429429
</FormItemContain>
430430
);
431431

432-
export const DatasourceForm = styled(Form)<FormProps>`
432+
export const DatasourceForm = styled(Form)`
433433
display: flex;
434434
flex-direction: column;
435435
gap: 8px;

client/packages/lowcoder/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"@fortawesome/free-regular-svg-icons": "^6.5.1",
2525
"@fortawesome/free-solid-svg-icons": "^6.5.1",
2626
"@fortawesome/react-fontawesome": "latest",
27+
"@jsonforms/core": "^3.5.1",
2728
"@lottiefiles/dotlottie-react": "^0.13.0",
2829
"@manaflair/redux-batch": "^1.0.0",
2930
"@rjsf/antd": "^5.24.9",
@@ -45,6 +46,7 @@
4546
"coolshapes-react": "lowcoder-org/coolshapes-react",
4647
"copy-to-clipboard": "^3.3.3",
4748
"core-js": "^3.25.2",
49+
"dayjs": "^1.11.13",
4850
"echarts": "^5.4.3",
4951
"echarts-for-react": "^3.0.2",
5052
"echarts-wordcloud": "^2.1.0",

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,7 @@ const JSLibraryCollapse = styled(Collapse)<{ $mode: "row" | "column" }>`
134134
}
135135
136136
.lib-label-name {
137-
${css`
138-
overflow: hidden;
139-
text-overflow: ellipsis;
140-
white-space: nowrap;
141-
`}
137+
${EllipsisTextCss};
142138
}
143139
`;
144140

client/packages/lowcoder/src/comps/comps/selectInputComp/checkboxComp.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@ import { AnimationStyle, CheckboxStyle, CheckboxStyleType, InputFieldStyle, Labe
1919
import { RadioLayoutOptions, RadioPropertyView } from "./radioCompConstants";
2020
import { dropdownControl } from "../../controls/dropdownControl";
2121
import { ValueFromOption, lightenColor } from "lowcoder-design";
22+
import { EllipsisTextCss } from "lowcoder-design";
2223
import { trans } from "i18n";
2324
import { RefControl } from "comps/controls/refControl";
2425
import { migrateOldData } from "comps/generators/simpleGenerators";
2526
import { fixOldInputCompData } from "../textInputComp/textInputConstants";
27+
import Tooltip from "antd/es/tooltip";
2628
import { useCallback, useRef, useEffect, memo } from "react";
2729

2830
export const getStyle = (style: CheckboxStyleType) => {
@@ -32,10 +34,7 @@ export const getStyle = (style: CheckboxStyleType) => {
3234
max-width: calc(100% - 8px);
3335
3436
span:not(.ant-checkbox) {
35-
text-overflow: ellipsis;
36-
overflow: hidden;
37-
white-space: nowrap;
38-
}
37+
${EllipsisTextCss};
3938
}
4039
4140
.ant-checkbox .ant-checkbox-checked > .ant-checkbox-inner {
@@ -80,6 +79,8 @@ export const getStyle = (style: CheckboxStyleType) => {
8079
${style.hoverBackground && `border-color: ${style.hoverBackground}`};
8180
}
8281
82+
83+
8384
&:hover .ant-checkbox-inner,
8485
.ant-checkbox:hover .ant-checkbox-inner,
8586
.ant-checkbox-input:focus + .ant-checkbox-inner {
@@ -93,6 +94,8 @@ export const getStyle = (style: CheckboxStyleType) => {
9394
}
9495
}
9596
97+
98+
9699
.ant-checkbox-group-item {
97100
font-family:${style.fontFamily};
98101
font-size:${style.textSize};

client/packages/lowcoder/src/comps/comps/selectInputComp/radioComp.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,22 @@ import {
99
SelectInputInvalidConfig,
1010
useSelectInputValidate,
1111
} from "./selectInputConstants";
12-
import { ValueFromOption } from "lowcoder-design";
12+
import { EllipsisTextCss, ValueFromOption } from "lowcoder-design";
1313
import { trans } from "i18n";
1414
import { fixOldInputCompData } from "../textInputComp/textInputConstants";
1515
import { migrateOldData } from "comps/generators/simpleGenerators";
16+
import Tooltip from "antd/es/tooltip";
1617
import { useCallback, useRef, useEffect, memo } from "react";
1718

1819
const getStyle = (style: RadioStyleType, inputFieldStyle?:RadioStyleType ) => {
1920
return css`
2021
.ant-radio-wrapper:not(.ant-radio-wrapper-disabled) {
2122
color: ${inputFieldStyle?.staticText};
23+
// height: 22px;
2224
max-width: calc(100% - 8px);
2325
padding: ${inputFieldStyle?.padding};
2426
span:not(.ant-radio) {
25-
text-overflow: ellipsis;
26-
overflow: hidden;
27-
white-space: nowrap;
27+
${EllipsisTextCss};
2828
font-family:${inputFieldStyle?.fontFamily};
2929
font-size:${inputFieldStyle?.textSize};
3030
font-weight:${inputFieldStyle?.textWeight};

client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnMarkdownComp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { markdownCompCss, TacoMarkDown } from "lowcoder-design";
1111
import styled from "styled-components";
1212

1313
const Wrapper = styled.div`
14-
${markdownCompCss as any};
14+
${markdownCompCss};
1515
max-height: 32px;
1616
1717
> .markdown-body {

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ import { AnimationStyle, AnimationStyleType, TextStyle, TextStyleType, heightCal
1414
import { hiddenPropertyView, showDataLoadingIndicatorsPropertyView } from "comps/utils/propertyUtils";
1515
import { trans } from "i18n";
1616
import { alignWithJustifyControl } from "comps/controls/alignControl";
17+
1718
import { MarginControl } from "../controls/marginControl";
1819
import { PaddingControl } from "../controls/paddingControl";
20+
1921
import React, { useContext, useEffect, useRef, useMemo } from "react";
2022
import { EditorContext } from "comps/editorState";
2123
import { clickEvent, eventHandlerControl } from "../controls/eventHandlerControl";
@@ -100,7 +102,7 @@ const TextContainer = React.memo(styled.div<{
100102
`};
101103
${(props) => props.$styleConfig && getStyle(props.$styleConfig)}
102104
display: flex;
103-
${markdownCompCss as any};
105+
${markdownCompCss};
104106
overflow-wrap: anywhere;
105107
.markdown-body {
106108
overflow-wrap: anywhere;

client/packages/lowcoder/src/comps/controls/multiSelectControl.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ const LabelWrapper = styled.div<{ $placement: ControlPlacement }>`
1515
`;
1616

1717
const DropDownItemLabel = styled.div`
18-
overflow: hidden;
19-
text-overflow: ellipsis;
20-
white-space: nowrap;
18+
${EllipsisTextCss};
2119
width: 100%;
2220
font-size: 13px;
2321
line-height: 15px;

client/packages/lowcoder/src/comps/queries/esQuery.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
} from "lowcoder-core";
1111
import {
1212
Dropdown,
13+
EllipsisTextCss,
1314
QueryConfigItemWrapper,
1415
QueryConfigLabel,
1516
QueryConfigWrapper,
@@ -114,9 +115,7 @@ const ReadOnlyField = styled.div`
114115
height: 32px;
115116
line-height: 32px;
116117
width: 100%;
117-
overflow: hidden;
118-
text-overflow: ellipsis;
119-
white-space: nowrap;
118+
${EllipsisTextCss};
120119
`;
121120
const InputField = styled.div`
122121
flex-grow: 1;
@@ -257,7 +256,7 @@ const EsQueryPropertyView = (props: {
257256
children.path.propertyView({})
258257
) : (
259258
<ReadOnlyField>
260-
{JSON.stringify(children.path.toJsonValue())}
259+
<>{children.path.toJsonValue()}</>
261260
</ReadOnlyField>
262261
)}
263262
</InputField>

client/packages/lowcoder/src/comps/queries/resourceDropdown.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { useSelector } from "react-redux";
44
import React, { useContext, useMemo, useState } from "react";
55
import { DataSourceTypeInfo } from "api/datasourceApi";
66
import styled from "styled-components";
7-
import { CustomSelect } from "lowcoder-design";
7+
import { CustomSelect, EllipsisTextCss } from "lowcoder-design";
88
import { DatasourceModal } from "pages/datasource/datasourceModal";
99
import { InputStatus } from "antd/es/_util/statusUtils";
1010
import { getDataSource, getDataSourceTypes } from "redux/selectors/datasourceSelectors";
@@ -30,9 +30,7 @@ const SelectOptionLabel = styled.div`
3030
font-size: 13px;
3131
display: inline-block;
3232
flex-grow: 1;
33-
overflow: hidden;
34-
text-overflow: ellipsis;
35-
white-space: nowrap;
33+
${EllipsisTextCss};
3634
`;
3735
const SelectOptionContains = styled.div`
3836
display: flex;

client/packages/lowcoder/src/layout/compSelectionWrapper.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import React, {
1818
} from "react";
1919
import { ResizePayload, useResizeDetector } from "react-resize-detector";
2020
import styled, { css } from "styled-components";
21+
import { EllipsisTextCss } from "lowcoder-design";
2122
import { draggingUtils } from "./draggingUtils";
2223
import type { ResizeHandleAxis } from "./gridLayoutPropTypes";
2324
import { isEqual } from "lodash";
@@ -56,9 +57,7 @@ const NameDiv = styled.div<{
5657
`;
5758
const NameLabel = styled.span`
5859
max-width: 208px;
59-
overflow: hidden;
60-
text-overflow: ellipsis;
61-
white-space: nowrap;
60+
${EllipsisTextCss};
6261
`;
6362

6463
export const GRID_ITEM_BORDER_WIDTH = 1.5;

client/packages/lowcoder/src/pages/ApplicationV2/components/CreateApiKeyModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const FormStyled = styled(Form)`
3838
font-size: 13px;
3939
line-height: 19px;
4040
.has-tip {
41-
${UnderlineCss as any};
41+
${UnderlineCss};
4242
}
4343
}
4444

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Header from "components/layout/Header";
33
import { SHARE_TITLE } from "constants/apiConstants";
44
import { ALL_APPLICATIONS_URL, APPLICATION_VIEW_URL, AUTH_LOGIN_URL } from "constants/routesURL";
55
import { User } from "constants/userConstants";
6-
import { isDarkColor, TacoButton, TextEditIcon } from "lowcoder-design";
6+
import { EllipsisTextCss, isDarkColor, TacoButton, TextEditIcon } from "lowcoder-design";
77
import { useSelector } from "react-redux";
88
import { currentApplication, getTemplateId, isPublicApplication } from "redux/selectors/applicationSelector";
99
import { getUser, isFetchingUser } from "redux/selectors/usersSelectors";
@@ -38,9 +38,7 @@ const HeaderFont = styled.div<{ $bgColor: string }>`
3838
margin-right: 8px;
3939
margin-left: 20px;
4040
max-width: 264px;
41-
overflow: hidden;
42-
text-overflow: ellipsis;
43-
white-space: nowrap;
41+
${EllipsisTextCss};
4442
`;
4543

4644
const StyledLink = styled.a`

client/packages/lowcoder/src/pages/queryLibrary/LeftNav.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
BluePlusIcon,
55
CustomModal,
66
EditPopover,
7+
EllipsisTextCss,
78
PointIcon,
89
ScrollBar,
910
Search,
@@ -123,9 +124,7 @@ const QueryType = styled.div`
123124
font-size: 13px;
124125
`;
125126
const QueryName = styled.div`
126-
overflow: hidden;
127-
text-overflow: ellipsis;
128-
white-space: nowrap;
127+
${EllipsisTextCss};
129128
font-weight: 500;
130129
font-size: 13px;
131130
`;

client/packages/lowcoder/src/pages/setting/idSource/styledComponents.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import styled, { css } from "styled-components";
22
import { Table } from "components/Table";
33
import { default as Button } from "antd/es/button";
4-
import { default as Checkbox } from "antd/es/checkbox";
5-
import { default as Form, FormProps } from "antd/es/form";
4+
import { default as Checkbox} from "antd/es/checkbox";
5+
import { default as Form, FormInstance } from "antd/es/form";
66
import { UnderlineCss } from "lowcoder-design";
77
import Steps from "antd/es/steps";
88

@@ -153,7 +153,7 @@ export const SaveButton = styled(Button)`
153153
}
154154
`;
155155

156-
export const FormStyled = styled(Form)<FormProps>`
156+
export const FormStyled = styled(Form)`
157157
.ant-form-item-control-input-content > input,
158158
.ant-input-password {
159159
&:hover {
@@ -170,10 +170,7 @@ export const FormStyled = styled(Form)<FormProps>`
170170
font-size: 13px;
171171
line-height: 19px;
172172
.has-tip {
173-
text-decoration: underline;
174-
text-decoration-style: dotted;
175-
text-underline-offset: 4px;
176-
cursor: help;
173+
${UnderlineCss};
177174
}
178175
}
179176

0 commit comments

Comments
 (0)