Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5639011

Browse files
remove useMergeCompStyles hook from comps
1 parent2f3329d commit5639011

File tree

64 files changed

+51
-249
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+51
-249
lines changed

‎client/packages/lowcoder/src/comps/comps/autoCompleteComp/autoCompleteComp.tsx‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ import {
5555
autocompleteIconColor,
5656
componentSize,
5757
}from"./autoCompleteConstants";
58-
import{useMergeCompStyles}from"@lowcoder-ee/util/hooks";
59-
6058

6159
constInputStyle=styled(Input)<{$style:InputLikeStyleType}>`
6260
box-shadow:${props=>`${props.$style?.boxShadow}${props.$style?.boxShadowColor}`};
@@ -104,9 +102,7 @@ const getValidate = (value: any): "" | "warning" | "error" | undefined => {
104102
};
105103

106104
letAutoCompleteCompBase=(function(){
107-
returnnewUICompBuilder(childrenMap,(props,dispatch)=>{
108-
useMergeCompStyles(propsasRecord<string,any>,dispatch);
109-
105+
returnnewUICompBuilder(childrenMap,(props)=>{
110106
const{
111107
items,
112108
onEvent,

‎client/packages/lowcoder/src/comps/comps/avatar.tsx‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ import { BadgeBasicSection, badgeChildren } from "./badgeComp/badgeConstants";
3434
import{DropdownOptionControl}from"../controls/optionsControl";
3535
import{ReactElement,useContext,useEffect}from"react";
3636
import{CompNameContext,EditorContext}from"../editorState";
37-
import{useMergeCompStyles}from"@lowcoder-ee/util/hooks";
3837

3938
constAvatarWrapper=styled(Avatar)<AvatarProps&{$cursorPointer?:boolean,$style:AvatarStyleType}>`
4039
background:${(props)=>props.$style.background};
@@ -198,9 +197,7 @@ const AvatarView = (props: RecordConstructorToView<typeof childrenMap>) => {
198197
};
199198

200199
letAvatarBasicComp=(function(){
201-
returnnewUICompBuilder(childrenMap,(props,dispatch)=>{
202-
useMergeCompStyles(propsasRecord<string,any>,dispatch);
203-
200+
returnnewUICompBuilder(childrenMap,(props)=>{
204201
return(<AvatarView{...props}/>)})
205202
.setPropertyViewFn((children)=>(
206203
<>

‎client/packages/lowcoder/src/comps/comps/avatarGroup.tsx‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import { optionsControl } from "../controls/optionsControl";
1919
import{BoolControl}from"../controls/boolControl";
2020
import{dropdownControl}from"../controls/dropdownControl";
2121
import{JSONObject}from"util/jsonTypes";
22-
import{useMergeCompStyles}from"@lowcoder-ee/util/hooks";
2322

2423
constMacaroneList=[
2524
'#fde68a',
@@ -143,9 +142,7 @@ const AvatarGroupView = (props: RecordConstructorToView<typeof childrenMap> & {
143142
};
144143

145144
letAvatarGroupBasicComp=(function(){
146-
returnnewUICompBuilder(childrenMap,(props,dispatch)=>{
147-
useMergeCompStyles(propsasRecord<string,any>,dispatch);
148-
145+
returnnewUICompBuilder(childrenMap,(props,dispatch)=>{
149146
return(<AvatarGroupView{...props}dispatch={dispatch}/>
150147
)})
151148
.setPropertyViewFn((children)=>(

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import { RefControl } from "comps/controls/refControl";
2727
importReact,{useContext,useEffect}from"react";
2828
import{AnimationStyle}from"@lowcoder-ee/comps/controls/styleControlConstants";
2929
import{styleControl}from"@lowcoder-ee/comps/controls/styleControl";
30-
import{useMergeCompStyles}from"@lowcoder-ee/util/hooks";
3130

3231
constFormLabel=styled(CommonBlueLabel)`
3332
font-size: 13px;
@@ -135,9 +134,7 @@ const ButtonTmpComp = (function () {
135134
animationStyle:styleControl(AnimationStyle,'animationStyle'),
136135
viewRef:RefControl<HTMLElement>,
137136
};
138-
returnnewUICompBuilder(childrenMap,(props,dispatch)=>{
139-
useMergeCompStyles(propsasRecord<string,any>,dispatch);
140-
137+
returnnewUICompBuilder(childrenMap,(props)=>{
141138
return(
142139
<ButtonCompWrapperdisabled={props.disabled}>
143140
<EditorContext.Consumer>

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import {
2222
getButtonStyle,
2323
}from"./buttonCompConstants";
2424
import{styleControl}from"@lowcoder-ee/comps/controls/styleControl";
25-
import{useMergeCompStyles}from"@lowcoder-ee/util/hooks";
2625

2726
constStyledDropdownButton=styled(DropdownButton)`
2827
width: 100%;
@@ -90,9 +89,7 @@ const DropdownTmpComp = (function () {
9089
onEvent:ButtonEventHandlerControl,
9190
style:styleControl(DropdownStyle,'style'),
9291
};
93-
returnnewUICompBuilder(childrenMap,(props,dispatch)=>{
94-
useMergeCompStyles(propsasRecord<string,any>,dispatch);
95-
92+
returnnewUICompBuilder(childrenMap,(props)=>{
9693
consthasIcon=
9794
props.options.findIndex((option)=>(option.prefixIconasReactElement)?.props.value)>-1;
9895
constitems=props.options

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import styled from "styled-components";
1717
import{ButtonEventHandlerControl}from"comps/controls/eventHandlerControl";
1818
import{manualOptionsControl}from"comps/controls/optionsControl";
1919
import{useContext,useEffect}from"react";
20-
import{useMergeCompStyles}from"@lowcoder-ee/util/hooks";
2120

2221
constStyledFloatButton=styled(FloatButton)<{
2322
$animationStyle:AnimationStyleType;
@@ -133,8 +132,7 @@ const FloatButtonView = (props: RecordConstructorToView<typeof childrenMap>) =>
133132
};
134133

135134
letFloatButtonBasicComp=(function(){
136-
returnnewUICompBuilder(childrenMap,(props,dispatch)=>{
137-
useMergeCompStyles(props,dispatch);
135+
returnnewUICompBuilder(childrenMap,(props)=>{
138136
return(
139137
<FloatButtonView{...props}/>
140138
)})

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

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

2323
import{EditorContext}from"comps/editorState";
2424
importReact,{useContext,useEffect}from"react";
25-
import{useMergeCompStyles}from"@lowcoder-ee/util/hooks";
2625

2726
constLink=styled(Button)<{
2827
$style:LinkStyleType;
@@ -92,10 +91,7 @@ const LinkTmpComp = (function () {
9291
suffixIcon:IconControl,
9392
viewRef:RefControl<HTMLElement>,
9493
};
95-
returnnewUICompBuilder(childrenMap,(props,dispatch)=>{
96-
useMergeCompStyles(propsasRecord<string,any>,dispatch);
97-
98-
94+
returnnewUICompBuilder(childrenMap,(props)=>{
9995
// chrome86 bug: button children should not contain only empty span
10096
consthasChildren=hasIcon(props.prefixIcon)||!!props.text||hasIcon(props.suffixIcon);
10197
return(

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import { BoolControl } from "comps/controls/boolControl";
2424
importtype{ItemType}from"antd/es/menu/interface";
2525
import{RefControl}from"comps/controls/refControl";
2626
import{EditorContext}from"comps/editorState";
27-
import{useMergeCompStyles}from"@lowcoder-ee/util/hooks";
2827

2928
constError=styled.div`
3029
color: #f5222d;
@@ -74,9 +73,7 @@ const ScannerTmpComp = (function () {
7473
style:styleControl(DropdownStyle,'style'),
7574
viewRef:RefControl<HTMLElement>,
7675
};
77-
returnnewUICompBuilder(childrenMap,(props,dispatch)=>{
78-
useMergeCompStyles(propsasRecord<string,any>,dispatch);
79-
76+
returnnewUICompBuilder(childrenMap,(props)=>{
8077
const[showModal,setShowModal]=useState(false);
8178
const[errMessage,setErrMessage]=useState("");
8279
const[videoConstraints,setVideoConstraints]=useState<MediaTrackConstraints>({

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import { BoolControl } from "comps/controls/boolControl";
2525
import{RefControl}from"comps/controls/refControl";
2626
importReact,{useContext,useEffect}from"react";
2727
import{EditorContext}from"comps/editorState";
28-
import{useMergeCompStyles}from"@lowcoder-ee/util/hooks";
2928

3029
constIconWrapper=styled.div`
3130
display: flex;
@@ -66,11 +65,10 @@ const ToggleTmpComp = (function () {
6665
showBorder:withDefault(BoolControl,true),
6766
viewRef:RefControl<HTMLElement>,
6867
};
69-
returnnewUICompBuilder(childrenMap,(props,dispatch)=>{
68+
returnnewUICompBuilder(childrenMap,(props)=>{
7069
consttext=props.showText
7170
?(props.value.value ?props.trueText :props.falseText)||undefined
7271
:undefined;
73-
useMergeCompStyles(propsasRecord<string,any>,dispatch);
7472

7573
return(
7674
<ButtonCompWrapperStyled

‎client/packages/lowcoder/src/comps/comps/carouselComp.tsx‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import { AnimationStyle, AnimationStyleType, CarouselStyle } from "comps/control
1717

1818
import{useContext}from"react";
1919
import{EditorContext}from"comps/editorState";
20-
import{useMergeCompStyles}from"@lowcoder-ee/util/hooks";
2120

2221
// TODO: dots at top position needs proper margin (should be the same as bottom position)
2322

@@ -49,9 +48,7 @@ let CarouselBasicComp = (function () {
4948
animationStyle:styleControl(AnimationStyle,'animationStyle'),
5049
...formDataChildren,
5150
};
52-
returnnewUICompBuilder(childrenMap,(props,dispatch)=>{
53-
useMergeCompStyles(propsasRecord<string,any>,dispatch);
54-
51+
returnnewUICompBuilder(childrenMap,(props)=>{
5552
constcontainerRef=useRef<HTMLDivElement>(null);
5653
const[height,setHeight]=useState(0);
5754
constonResize=()=>{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp