Skip to content

Commit 4896e48

Browse files
authored
Merge pull request #1611 from lowcoder-org/dev
Dev -> Main 2.6.5
2 parents 9fa16f3 + cda8b6d commit 4896e48

File tree

19 files changed

+257
-172
lines changed

19 files changed

+257
-172
lines changed

client/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.6.4
1+
2.6.5

client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lowcoder-frontend",
3-
"version": "2.6.4",
3+
"version": "2.6.5",
44
"type": "module",
55
"private": true,
66
"workspaces": [

client/packages/lowcoder-comps/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lowcoder-comps",
3-
"version": "2.6.5",
3+
"version": "2.6.6",
44
"type": "module",
55
"license": "MIT",
66
"dependencies": {

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

Lines changed: 83 additions & 94 deletions
Large diffs are not rendered by default.

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

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ import {
1515
lightenColor,
1616
toHex,
1717
UnderlineCss,
18-
EventModalStyleType
18+
EventModalStyleType,
19+
DateParser,
20+
isValidColor,
21+
Theme,
1922
} from "lowcoder-sdk";
2023
import styled from "styled-components";
2124
import dayjs from "dayjs";
@@ -27,6 +30,10 @@ import {
2730
} from "@fullcalendar/core";
2831
import { default as Form } from "antd/es/form";
2932

33+
type Theme = typeof Theme;
34+
type EventModalStyleType = typeof EventModalStyleType;
35+
type CalendarStyleType = typeof CalendarStyleType;
36+
3037
export const Wrapper = styled.div<{
3138
$editable?: boolean;
3239
$style?: CalendarStyleType;
@@ -1135,3 +1142,32 @@ export const viewClassNames = (info: ViewContentArg) => {
11351142
return className;
11361143
};
11371144

1145+
export const formattedEvents = (events: EventType[], theme?: Theme) => {
1146+
return events.map((item: EventType) => {
1147+
return {
1148+
title: item.label,
1149+
label: item.label,
1150+
id: item.id,
1151+
start: dayjs(item.start, DateParser).format(),
1152+
end: dayjs(item.end, DateParser).format(),
1153+
allDay: item.allDay,
1154+
...(item.resourceId ? { resourceId: item.resourceId } : {}),
1155+
...(item.groupId ? { groupId: item.groupId } : {}),
1156+
backgroundColor: item.backgroundColor,
1157+
extendedProps: { // Ensure color is in extendedProps
1158+
color: isValidColor(item.color || "") ? item.color : theme?.theme?.primary,
1159+
detail: item.detail,
1160+
titleColor: item.titleColor,
1161+
detailColor: item.detailColor,
1162+
titleFontWeight: item.titleFontWeight,
1163+
titleFontStyle: item.titleFontStyle,
1164+
detailFontWeight: item.detailFontWeight,
1165+
detailFontStyle: item.detailFontStyle,
1166+
animation: item?.animation,
1167+
animationDelay: item?.animationDelay,
1168+
animationDuration: item?.animationDuration,
1169+
animationIterationCount: item?.animationIterationCount
1170+
}
1171+
}
1172+
})
1173+
}

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ export const KeyValueList = (props: {
9696
onDelete: (item: ReactNode, index: number) => void;
9797
isStatic?: boolean;
9898
indicatorForAll?: boolean;
99+
allowDeletingAll?: boolean;
99100
}) => {
100101
return (
101102
<>
@@ -105,8 +106,8 @@ export const KeyValueList = (props: {
105106
{item}
106107
{!props.isStatic &&
107108
<DelIcon
108-
onClick={() => props.list.length > 1 && props.onDelete(item, index)}
109-
$forbidden={props.list.length === 1}
109+
onClick={() => (props.allowDeletingAll || (!props.allowDeletingAll && props.list.length > 1)) && props.onDelete(item, index)}
110+
$forbidden={!props.allowDeletingAll && props.list.length === 1}
110111
/>
111112
}
112113
</KeyValueListItem>

client/packages/lowcoder/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lowcoder",
3-
"version": "2.6.4",
3+
"version": "2.6.5",
44
"private": true,
55
"type": "module",
66
"main": "src/index.sdk.ts",

client/packages/lowcoder/src/appView/bootstrapAt.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import { loadComps } from "comps";
22
import type { AppViewInstanceOptions } from "./AppViewInstance";
33
import { createRoot } from "react-dom/client";
44

5-
loadComps();
6-
75
export async function bootstrapAppAt<I>(
86
appId: string,
97
node: Element | null,
@@ -14,6 +12,8 @@ export async function bootstrapAppAt<I>(
1412
return;
1513
}
1614

15+
loadComps();
16+
1717
const { AppViewInstance } = await import("./AppViewInstance");
1818
return new AppViewInstance(appId, node, createRoot(node), options);
1919
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,8 @@ function InnerCustomComponent(props: IProps) {
191191
iframe.addEventListener("load", handleIFrameLoad);
192192

193193
// in dev, load from sdk bundle and on prod load from build package
194-
const src = import.meta.env.DEV
194+
const src = (REACT_APP_BUNDLE_TYPE && REACT_APP_BUNDLE_TYPE === 'sdk')
195+
|| (import.meta.env && import.meta.env.DEV)
195196
? trans('customComponent.entryUrl')
196197
: `${window.location.origin}/custom_component/custom_component.html`;
197198

client/packages/lowcoder/src/comps/comps/tableComp/tableCompView.tsx

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ const TableWrapper = styled.div<{
243243
position: -webkit-sticky;
244244
// top: ${props.$fixedToolbar ? '47px' : '0'};
245245
top: 0;
246-
z-index: 99;
246+
z-index: 2;
247247
`
248248
}
249249
> tr {
@@ -256,7 +256,14 @@ const TableWrapper = styled.div<{
256256
color: ${(props) => props.$headerStyle.headerText};
257257
// border-inline-end: ${(props) => `${props.$headerStyle.borderWidth} solid ${props.$headerStyle.border}`} !important;
258258
259-
259+
/* Proper styling for fixed header cells */
260+
&.ant-table-cell-fix-left, &.ant-table-cell-fix-right {
261+
z-index: 1;
262+
background: ${(props) => props.$headerStyle.headerBackground};
263+
}
264+
265+
266+
260267
> div {
261268
margin: ${(props) => props.$headerStyle.margin};
262269
@@ -295,7 +302,27 @@ const TableWrapper = styled.div<{
295302
296303
td {
297304
padding: 0px 0px;
298-
// ${(props) => props.$showHRowGridBorder ?'border-bottom: 1px solid #D7D9E0 !important;': `border-bottom: 0px;`}
305+
// ${(props) => props.$showHRowGridBorder ? 'border-bottom: 1px solid #D7D9E0 !important;': `border-bottom: 0px;`}
306+
307+
/* Proper styling for Fixed columns in the table body */
308+
&.ant-table-cell-fix-left, &.ant-table-cell-fix-right {
309+
z-index: 1;
310+
background: inherit;
311+
background-color: ${(props) => props.$style.background};
312+
transition: background-color 0.3s;
313+
}
314+
315+
}
316+
317+
/* Fix for selected and hovered rows */
318+
tr.ant-table-row-selected td.ant-table-cell-fix-left,
319+
tr.ant-table-row-selected td.ant-table-cell-fix-right {
320+
background-color: ${(props) => props.$rowStyle?.selectedRowBackground || '#e6f7ff'} !important;
321+
}
322+
323+
tr.ant-table-row:hover td.ant-table-cell-fix-left,
324+
tr.ant-table-row:hover td.ant-table-cell-fix-right {
325+
background-color: ${(props) => props.$rowStyle?.hoverRowBackground || '#f5f5f5'} !important;
299326
}
300327
301328
thead > tr:first-child {
@@ -428,7 +455,7 @@ const TableTd = styled.td<{
428455
}
429456
430457
&:active {
431-
color: ${(props) => props.$linkStyle?.activeText}};
458+
color: ${(props) => props.$linkStyle?.activeText};
432459
}
433460
}
434461
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy