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

Commit41171dc

Browse files
authored
Merge branch 'dev' into deployment_updates
2 parentsb99f183 +1fc4e6c commit41171dc

File tree

47 files changed

+321
-80
lines changed

Some content is hidden

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

47 files changed

+321
-80
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import {
2020
importstyled,{css}from"styled-components";
2121
import{UICompBuilder}from"../../generators";
2222
import{FormDataPropertyView}from"../formComp/formDataConstants";
23-
import{jsonControl}from"comps/controls/codeControl";
23+
import{jsonControl,NumberControl}from"comps/controls/codeControl";
2424
import{dropdownControl}from"comps/controls/dropdownControl";
2525
import{
2626
getStyle,
@@ -92,6 +92,7 @@ const childrenMap = {
9292
inputFieldStyle:styleControl(InputLikeStyle,'inputFieldStyle'),
9393
childrenInputFieldStyle:styleControl(ChildrenMultiSelectStyle,'childrenInputFieldStyle'),
9494
animationStyle:styleControl(AnimationStyle,'animationStyle'),
95+
tabIndex:NumberControl,
9596
};
9697

9798
constgetValidate=(value:any):""|"warning"|"error"|undefined=>{
@@ -271,6 +272,7 @@ let AutoCompleteCompBase = (function () {
271272
suffix={hasIcon(props.suffixIcon)&&props.suffixIcon}
272273
status={getValidate(validateState)}
273274
onPressEnter={undefined}
275+
tabIndex={typeofprops.tabIndex==='number' ?props.tabIndex :undefined}
274276
/>
275277
</AutoComplete>
276278
</>
@@ -354,6 +356,9 @@ let AutoCompleteCompBase = (function () {
354356
>
355357
{children.animationStyle.getPropertyView()}
356358
</Section>
359+
<Sectionname={sectionNames.advanced}>
360+
{children.tabIndex.propertyView({label:trans("prop.tabIndex")})}
361+
</Section>
357362
</>
358363
);
359364
})

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

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ const ColWrapper = styled(Col)<{
7272
$minWidth?:string,
7373
$matchColumnsHeight:boolean,
7474
}>`
75+
min-width:${(props)=>props.$minWidth||'auto'};
7576
> div {
7677
height:${(props)=>props.$matchColumnsHeight ?`calc(100% -${props.$style?.padding||0} -${props.$style?.padding||0})` :'auto'};
7778
border-radius:${(props)=>props.$style?.radius};
@@ -122,6 +123,53 @@ const ColumnContainer = (props: ColumnContainerProps) => {
122123
);
123124
};
124125

126+
// Function to apply min-widths to grid template columns
127+
constapplyMinWidthsToGridColumns=(columnsDef:string,minWidths:(string|null)[]=[])=>{
128+
// Handle empty case
129+
if(!columnsDef?.trim())return'';
130+
131+
// Handle repeat() functions with special parsing
132+
if(columnsDef.includes('repeat(')){
133+
// For complex repeat patterns, we should return as-is to avoid breaking the layout
134+
// A more complex parser would be needed to fully support repeat with minmax
135+
returncolumnsDef;
136+
}
137+
138+
constcolumns=columnsDef.trim().split(/\s+/);
139+
140+
constnewColumns=columns.map((col,index)=>{
141+
constminWidth=minWidths[index];
142+
143+
// Skip if no minWidth provided for this column
144+
if(!minWidth){
145+
returncol;
146+
}
147+
148+
// Keywords that should never be wrapped in minmax()
149+
constkeywords=['auto','min-content','max-content','fit-content','subgrid'];
150+
if(keywords.some(keyword=>col===keyword)){
151+
returncol;
152+
}
153+
154+
// Functions that should never be wrapped in minmax()
155+
if(col.includes('(')&&col.includes(')')){
156+
// Already includes a function like calc(), minmax(), etc.
157+
returncol;
158+
}
159+
160+
// Determine if column is flexible and can be wrapped with minmax
161+
// - fr units (e.g., "1fr", "2.5fr")
162+
// - percentage values (e.g., "50%")
163+
// - length values (px, em, rem, etc.)
164+
constisFlexible=/fr$/.test(col)||
165+
/%$/.test(col)||
166+
/^\d+(\.\d+)?(px|em|rem|vh|vw|vmin|vmax|cm|mm|in|pt|pc)$/.test(col);
167+
168+
returnisFlexible ?`minmax(${minWidth},${col})` :col;
169+
});
170+
171+
returnnewColumns.join(' ');
172+
};
125173

126174
constColumnLayout=(props:ColumnLayoutProps)=>{
127175
let{
@@ -138,6 +186,12 @@ const ColumnLayout = (props: ColumnLayoutProps) => {
138186
mainScrollbar
139187
}=props;
140188

189+
// Extract minWidths from columns
190+
constminWidths=columns.map(column=>column.minWidth||null);
191+
192+
// Apply min-widths to grid template columns
193+
constgridTemplateColumns=applyMinWidthsToGridColumns(templateColumns,minWidths);
194+
141195
return(
142196
<BackgroundColorContext.Providervalue={props.style.background}>
143197
<DisabledContext.Providervalue={props.disabled}>
@@ -146,7 +200,7 @@ const ColumnLayout = (props: ColumnLayoutProps) => {
146200
<ContainWrapper$style={{
147201
...props.style,
148202
display:"grid",
149-
gridTemplateColumns:templateColumns,
203+
gridTemplateColumns:gridTemplateColumns,
150204
columnGap,
151205
gridTemplateRows:templateRows,
152206
rowGap,

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,8 @@ export const PageLayoutComp = withMethodExposing(PageLayoutCompTmP, [
141141
params:[{name:"collapsed",type:"boolean"}],
142142
},
143143
execute:(comp,values)=>{
144-
constpage=values[0]asnumber;
145-
if(page&&page>0){
146-
// comp.children.pagination.children.pageNo.dispatchChangeValueAction(page);
147-
}
144+
constcollapsed=!!values[0];// Ensure boolean value
145+
comp.children.container.children.siderCollapsed.dispatchChangeValueAction(collapsed);
148146
},
149147
}
150148
]);

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { RecordConstructorToComp, RecordConstructorToView } from "lowcoder-core"
44
import{
55
BoolCodeControl,
66
CustomRuleControl,
7+
NumberControl,
78
RangeControl,
89
StringControl,
910
}from"../../controls/codeControl";
@@ -99,6 +100,7 @@ const commonChildren = {
99100
childrenInputFieldStyle:styleControl(ChildrenMultiSelectStyle,'childrenInputFieldStyle'),
100101
timeZone:dropdownControl(timeZoneOptions,Intl.DateTimeFormat().resolvedOptions().timeZone),
101102
pickerMode:dropdownControl(PickerModeOptions,'date'),
103+
tabIndex:NumberControl,
102104
};
103105
typeCommonChildrenType=RecordConstructorToComp<typeofcommonChildren>;
104106

@@ -185,6 +187,7 @@ export type DateCompViewProps = Pick<
185187
disabledTime:()=>ReturnType<typeofdisabledTime>;
186188
suffixIcon:ReactNode;
187189
placeholder?:string|[string,string];
190+
tabIndex?:number;
188191
};
189192

190193
constgetFormattedDate=(
@@ -281,6 +284,7 @@ const DatePickerTmpCmp = new UICompBuilder(childrenMap, (props) => {
281284
onFocus={()=>props.onEvent("focus")}
282285
onBlur={()=>props.onEvent("blur")}
283286
suffixIcon={hasIcon(props.suffixIcon)&&props.suffixIcon}
287+
tabIndex={typeofprops.tabIndex==='number' ?props.tabIndex :undefined}
284288
/>
285289
),
286290
showValidationWhenEmpty:props.showValidationWhenEmpty,
@@ -340,6 +344,7 @@ const DatePickerTmpCmp = new UICompBuilder(childrenMap, (props) => {
340344
<><Sectionname={sectionNames.advanced}>
341345
{timeFields(children,isMobile)}
342346
{children.suffixIcon.propertyView({label:trans("button.suffixIcon")})}
347+
{children.tabIndex.propertyView({label:trans("prop.tabIndex")})}
343348
</Section></>
344349
)}
345350
{(useContext(EditorContext).editorModeStatus==="logic"||useContext(EditorContext).editorModeStatus==="both")&&!isMobile&&commonAdvanceSection(children)}
@@ -475,7 +480,9 @@ let DateRangeTmpCmp = (function () {
475480
}}
476481
onFocus={()=>props.onEvent("focus")}
477482
onBlur={()=>props.onEvent("blur")}
478-
suffixIcon={hasIcon(props.suffixIcon)&&props.suffixIcon}/>
483+
suffixIcon={hasIcon(props.suffixIcon)&&props.suffixIcon}
484+
tabIndex={typeofprops.tabIndex==='number' ?props.tabIndex :undefined}
485+
/>
479486
);
480487

481488
conststartResult=validate({ ...props,value:props.start});
@@ -553,6 +560,7 @@ let DateRangeTmpCmp = (function () {
553560
<><Sectionname={sectionNames.advanced}>
554561
{timeFields(children,isMobile)}
555562
{children.suffixIcon.propertyView({label:trans("button.suffixIcon")})}
563+
{children.tabIndex.propertyView({label:trans("prop.tabIndex")})}
556564
</Section></>
557565
)}
558566
{(useContext(EditorContext).editorModeStatus==="logic"||useContext(EditorContext).editorModeStatus==="both")&&commonAdvanceSection(children)}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ export interface DateRangeUIViewProps extends DateCompViewProps {
4444
placeholder?:string|[string,string];
4545
onChange:(start?:dayjs.Dayjs|null,end?:dayjs.Dayjs|null)=>void;
4646
onPanelChange:(value:any,mode:[string,string])=>void;
47-
onClickDateRangeTimeZone:(value:any)=>void
47+
onClickDateRangeTimeZone:(value:any)=>void;
48+
tabIndex?:number;
4849
}
4950

5051
exportconstDateRangeUIView=(props:DateRangeUIViewProps)=>{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export interface DataUIViewProps extends DateCompViewProps {
3939
onChange:DatePickerProps<Dayjs>['onChange'];
4040
onPanelChange:()=>void;
4141
onClickDateTimeZone:(value:any)=>void;
42-
42+
tabIndex?:number;
4343
}
4444

4545
constDateMobileUIView=React.lazy(()=>

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { RecordConstructorToComp, RecordConstructorToView } from "lowcoder-core"
44
import{
55
BoolCodeControl,
66
CustomRuleControl,
7+
NumberControl,
78
RangeControl,
89
StringControl,
910
}from"../../controls/codeControl";
@@ -92,6 +93,7 @@ const commonChildren = {
9293
suffixIcon:withDefault(IconControl,"/icon:regular/clock"),
9394
timeZone:dropdownControl(timeZoneOptions,Intl.DateTimeFormat().resolvedOptions().timeZone),
9495
viewRef:RefControl<CommonPickerMethods>,
96+
tabIndex:NumberControl,
9597
...validationChildren,
9698
};
9799

@@ -212,6 +214,7 @@ const TimePickerTmpCmp = new UICompBuilder(childrenMap, (props) => {
212214
onFocus={()=>props.onEvent("focus")}
213215
onBlur={()=>props.onEvent("blur")}
214216
suffixIcon={hasIcon(props.suffixIcon)&&props.suffixIcon}
217+
tabIndex={typeofprops.tabIndex==='number' ?props.tabIndex :undefined}
215218
/>
216219
),
217220
showValidationWhenEmpty:props.showValidationWhenEmpty,
@@ -263,6 +266,7 @@ const TimePickerTmpCmp = new UICompBuilder(childrenMap, (props) => {
263266
{commonAdvanceSection(children)}
264267
{children.use12Hours.propertyView({label:trans("prop.use12Hours")})}
265268
{children.suffixIcon.propertyView({label:trans("button.suffixIcon")})}
269+
{children.tabIndex.propertyView({label:trans("prop.tabIndex")})}
266270
</Section>
267271
)}
268272

@@ -368,6 +372,7 @@ const TimeRangeTmpCmp = (function () {
368372
onFocus={()=>props.onEvent("focus")}
369373
onBlur={()=>props.onEvent("blur")}
370374
suffixIcon={hasIcon(props.suffixIcon)&&props.suffixIcon}
375+
tabIndex={typeofprops.tabIndex==='number' ?props.tabIndex :undefined}
371376
/>
372377
);
373378

@@ -439,6 +444,7 @@ const TimeRangeTmpCmp = (function () {
439444
{commonAdvanceSection(children)}
440445
{children.use12Hours.propertyView({label:trans("prop.use12Hours")})}
441446
{children.suffixIcon.propertyView({label:trans("button.suffixIcon")})}
447+
{children.tabIndex.propertyView({label:trans("prop.tabIndex")})}
442448
</Section>
443449
)}
444450

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export interface TimeRangeUIViewProps extends TimeCompViewProps {
3939
placeholder?:string|[string,string];
4040
onChange:(start?:dayjs.Dayjs|null,end?:dayjs.Dayjs|null)=>void;
4141
handleTimeRangeZoneChange:(value:any)=>void;
42+
tabIndex?:number;
4243
}
4344

4445
exportconstTimeRangeUIView=(props:TimeRangeUIViewProps)=>{

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export interface TimeUIViewProps extends TimeCompViewProps {
3434
value:dayjs.Dayjs|null;
3535
onChange:(value:dayjs.Dayjs|null)=>void;
3636
handleTimeZoneChange:(value:any)=>void;
37+
tabIndex?:number;
3738
}
3839

3940
exportconstTimeUIView=(props:TimeUIViewProps)=>{

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ import { messageInstance } from "lowcoder-design/src/components/GlobalInstances"
6060
import{styled}from"styled-components";
6161
import{styleControl}from"@lowcoder-ee/comps/controls/styleControl";
6262
import{AnimationStyle}from"@lowcoder-ee/comps/controls/styleControlConstants";
63+
import{StringControl}from"comps/controls/codeControl";
6364

6465
constFormWrapper=styled.div`
6566
height: 100%;
@@ -80,7 +81,8 @@ const childrenMap = {
8081
disableSubmit:BoolCodeControl,
8182
loading:BoolCodeControl,
8283
onEvent:eventHandlerControl(eventOptions),
83-
animationStyle:styleControl(AnimationStyle)
84+
animationStyle:styleControl(AnimationStyle),
85+
invalidFormMessage:StringControl
8486
};
8587

8688
typeFormProps=TriContainerViewProps&
@@ -230,6 +232,7 @@ const FormBaseComp = (function () {
230232
{(useContext(EditorContext).editorModeStatus==="logic"||useContext(EditorContext).editorModeStatus==="both")&&(
231233
<Sectionname={sectionNames.advanced}>
232234
{children.initialData.propertyView({label:trans("formComp.initialData")})}
235+
{children.invalidFormMessage.propertyView({label:trans("formComp.invalidFormMessage")})}
233236
</Section>
234237
)}
235238

@@ -363,7 +366,8 @@ let FormTmpComp = class extends FormBaseComp implements IForm {
363366
returnPromise.resolve();
364367
});
365368
}else{
366-
messageInstance.error(trans("formComp.notValidForm"));
369+
constcustomMessage=this.children.invalidFormMessage.getView();
370+
messageInstance.error(customMessage||trans("formComp.notValidForm"));
367371
returnPromise.reject("formComp.notValidForm");
368372
}
369373
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp