Skip to content

Commit 5bf8a7b

Browse files
fixed imported dependencies path
1 parent e659877 commit 5bf8a7b

File tree

11 files changed

+58
-19
lines changed

11 files changed

+58
-19
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ const ButtonTmpComp = (function () {
131131
prefixIcon: IconControl,
132132
suffixIcon: IconControl,
133133
style: ButtonStyleControl,
134-
animationStyle:styleControl(AnimationStyle),
134+
animationStyle: styleControl(AnimationStyle),
135135
viewRef: RefControl<HTMLElement>,
136136
};
137137
return new UICompBuilder(childrenMap, (props) => (

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import {
2323
} from "./buttonCompConstants";
2424
import { styleControl } from "@lowcoder-ee/comps/controls/styleControl";
2525

26-
2726
const StyledDropdownButton = styled(DropdownButton)`
2827
width: 100%;
2928

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ import { BoolCodeControl } from "comps/controls/codeControl";
1616
import { DisabledContext } from "comps/generators/uiCompBuilder";
1717
import React, { useContext } from "react";
1818
import { EditorContext } from "comps/editorState";
19-
import { styleControl } from "@lowcoder-ee/comps/controls/styleControl";
2019
import { AnimationStyle } from "@lowcoder-ee/comps/controls/styleControlConstants";
20+
import { styleControl } from "@lowcoder-ee/comps/controls/styleControl";
2121

2222
export const ContainerBaseComp = (function () {
2323
const childrenMap = {

client/packages/lowcoder/src/comps/comps/containerComp/pageLayoutComp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ import {
1818
ContainerCompBuilder,
1919
} from "../pageLayoutComp/pageLayoutCompBuilder";
2020
import { PageLayout } from "../pageLayoutComp/pageLayout";
21-
import { styleControl } from "@lowcoder-ee/comps/controls/styleControl";
2221
import { AnimationStyle } from "@lowcoder-ee/comps/controls/styleControlConstants";
22+
import { styleControl } from "@lowcoder-ee/comps/controls/styleControl";
2323

2424
export const ContainerBaseComp = (function () {
2525
const childrenMap = {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ function InnerCustomComponent(props: IProps) {
219219
const childrenMap = {
220220
model: jsonObjectStateControl(defaultModel),
221221
code: withDefault(StringControl, defaultCode),
222-
style:styleControl(CustomStyle),
222+
style: styleControl(CustomStyle),
223223
animationStyle:styleControl(AnimationStyle),
224224
};
225225

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ const childrenMap = {
8080
disableSubmit: BoolCodeControl,
8181
loading: BoolCodeControl,
8282
onEvent: eventHandlerControl(eventOptions),
83-
animationStyle:styleControl(AnimationStyle)
83+
animationStyle: styleControl(AnimationStyle)
8484
};
8585

8686
type FormProps = TriContainerViewProps &

client/packages/lowcoder/src/comps/comps/jsonComp/jsonExplorerComp.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import { hiddenPropertyView } from "comps/utils/propertyUtils";
1111
import { trans } from "i18n";
1212
import { EditorContext } from "comps/editorState";
1313
import { useContext } from "react";
14-
import { styleControl } from "@lowcoder-ee/comps/controls/styleControl";
1514
import { AnimationStyle, AnimationStyleType } from "@lowcoder-ee/comps/controls/styleControlConstants";
15+
import { styleControl } from "@lowcoder-ee/comps/controls/styleControl";
1616

1717
/**
1818
* JsonExplorer Comp
@@ -55,7 +55,7 @@ let JsonExplorerTmpComp = (function () {
5555
indent: withDefault(NumberControl, 4),
5656
expandToggle: BoolControl.DEFAULT_TRUE,
5757
theme: dropdownControl(themeOptions, 'shapeshifter:inverted'),
58-
animationStyle:styleControl(AnimationStyle),
58+
animationStyle: styleControl(AnimationStyle),
5959
};
6060
return new UICompBuilder(childrenMap, (props) => (
6161
<JsonExplorerContainer

client/packages/lowcoder/src/comps/comps/listViewComp/listView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ import {
1818
import { ContextContainerComp } from "./contextContainerComp";
1919
import { ListViewImplComp } from "./listViewComp";
2020
import { getCurrentItemParams, getData } from "./listViewUtils";
21-
import { AnimationStyleType } from "@lowcoder-ee/index.sdk";
2221
import { CompTypeContext } from "@lowcoder-ee/comps/utils/compTypeContext";
2322
import { ThemeContext } from "@lowcoder-ee/comps/utils/themeContext";
2423
import { setInitialCompStyles } from "@lowcoder-ee/comps/utils/themeUtil";
2524
import { childrenToProps } from "@lowcoder-ee/comps/generators/multi";
25+
import { AnimationStyleType } from "@lowcoder-ee/comps/controls/styleControlConstants";
2626

2727
const ListViewWrapper = styled.div<{ $style: any; $paddingWidth: string,$animationStyle:AnimationStyleType }>`
2828
height: 100%;

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

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@ import { NameConfig, NameConfigHidden, withExposingConfigs } from "../generators
99
import { hiddenPropertyView } from "comps/utils/propertyUtils";
1010
import { trans } from "i18n";
1111

12-
import { useContext } from "react";
12+
import { useContext, useEffect } from "react";
1313
import { EditorContext } from "comps/editorState";
14+
import { ThemeContext } from "../utils/themeContext";
15+
import { CompTypeContext } from "../utils/compTypeContext";
16+
import { setInitialCompStyles } from "../utils/themeUtil";
1417

1518
// TODO: after Update of ANTd, introduce Size attribute to ProgressCircle
1619

@@ -69,10 +72,27 @@ let ProgressCircleTmpComp = (function () {
6972
const childrenMap = {
7073
value: numberExposingStateControl("value", 60),
7174
// borderRadius property hidden as it's not valid for progress circle
72-
style: styleControl(CircleProgressStyle),
73-
animationStyle: styleControl(AnimationStyle),
75+
style: styleControl(CircleProgressStyle, 'style'),
76+
animationStyle: styleControl(AnimationStyle, 'animationStyle'),
7477
};
75-
return new UICompBuilder(childrenMap, (props) => {
78+
return new UICompBuilder(childrenMap, (props, dispatch) => {
79+
const theme = useContext(ThemeContext);
80+
const compType = useContext(CompTypeContext);
81+
const compTheme = theme?.theme?.components?.[compType];
82+
83+
const styleProps: Record<string, any> = {};
84+
['style', 'animationStyle'].forEach((key: string) => {
85+
styleProps[key] = (props as any)[key];
86+
});
87+
88+
useEffect(() => {
89+
setInitialCompStyles({
90+
dispatch,
91+
compTheme,
92+
styleProps,
93+
});
94+
}, []);
95+
7696
return (
7797
<StyledProgressCircle
7898
$style={props.style}

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

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@ import styled, { css } from "styled-components";
1010
import { hiddenPropertyView } from "comps/utils/propertyUtils";
1111
import { trans } from "i18n";
1212

13-
import { useContext } from "react";
13+
import { useContext, useEffect } from "react";
1414
import { EditorContext } from "comps/editorState";
15+
import { ThemeContext } from "../utils/themeContext";
16+
import { CompTypeContext } from "../utils/compTypeContext";
17+
import { setInitialCompStyles } from "../utils/themeUtil";
1518

1619
const getStyle = (style: ProgressStyleType) => {
1720
return css`
@@ -53,10 +56,27 @@ const ProgressBasicComp = (function () {
5356
const childrenMap = {
5457
value: numberExposingStateControl('value', 60),
5558
showInfo: BoolControl,
56-
style: styleControl(ProgressStyle),
57-
animationStyle: styleControl(AnimationStyle),
59+
style: styleControl(ProgressStyle, 'style'),
60+
animationStyle: styleControl(AnimationStyle, 'animationStyle'),
5861
};
59-
return new UICompBuilder(childrenMap, (props) => {
62+
return new UICompBuilder(childrenMap, (props, dispatch) => {
63+
const theme = useContext(ThemeContext);
64+
const compType = useContext(CompTypeContext);
65+
const compTheme = theme?.theme?.components?.[compType];
66+
67+
const styleProps: Record<string, any> = {};
68+
['style', 'animationStyle'].forEach((key: string) => {
69+
styleProps[key] = (props as any)[key];
70+
});
71+
72+
useEffect(() => {
73+
setInitialCompStyles({
74+
dispatch,
75+
compTheme,
76+
styleProps,
77+
});
78+
}, []);
79+
6080
return (
6181
<ProgressStyled
6282
percent={Math.round(props.value.value)}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { RefControl } from "comps/controls/refControl";
2222

2323
import { useContext } from "react";
2424
import { EditorContext } from "comps/editorState";
25-
import { withDefault } from "@lowcoder-ee/comps/generators/simpleGenerators";
25+
import { withDefault } from "@lowcoder-ee/comps/generators";
2626

2727
export const RadioLayoutOptions = [
2828
{ label: trans("radio.horizontal"), value: "horizontal" },
@@ -41,7 +41,7 @@ export const RadioChildrenMap = {
4141
labelStyle:styleControl(LabelStyle),
4242
layout: dropdownControl(RadioLayoutOptions, "horizontal"),
4343
viewRef: RefControl<HTMLDivElement>,
44-
inputFieldStyle:withDefault(styleControl(RadioStyle),{borderWidth: '1px'}),
44+
inputFieldStyle: withDefault(styleControl(RadioStyle),{borderWidth: '1px'}),
4545
animationStyle: styleControl(AnimationStyle),
4646
...SelectInputValidationChildren,
4747
...formDataChildren,

0 commit comments

Comments
 (0)