Skip to content

Commit 818fdf8

Browse files
committed
Merge branch 'dev' of github.com:lowcoder-org/lowcoder into profileDropdownv3
2 parents e202fcb + 854a10e commit 818fdf8

File tree

61 files changed

+593
-194
lines changed

Some content is hidden

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

61 files changed

+593
-194
lines changed

client/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.7.0
1+
2.7.2

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.7.0",
3+
"version": "2.7.2",
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.7.1",
3+
"version": "2.7.2",
44
"type": "module",
55
"license": "MIT",
66
"dependencies": {

client/packages/lowcoder-design/src/icons/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ export { ReactComponent as RecyclerIcon } from "./remix/delete-bin-line.svg";
255255
export { ReactComponent as MarketplaceIcon } from "./v1/icon-application-marketplace.svg";
256256
export { ReactComponent as FavoritesIcon } from "./v1/icon-application-favorites.svg";
257257
export { ReactComponent as HomeSettingIcon } from "./remix/settings-4-line.svg";
258-
export { ReactComponent as EnterpriseIcon } from "./remix/earth-line.svg";
258+
export { ReactComponent as EnterpriseIcon } from "./remix/shield-star-line.svg";
259259
export { ReactComponent as VerticalIcon } from "./remix/vertical.svg";
260260
export { ReactComponent as HorizontalIcon } from "./remix/horizontal.svg";
261261

client/packages/lowcoder-sdk-webpack-bundle/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "lowcoder-sdk-webpack-bundle",
33
"description": "",
4-
"version": "2.7.0",
4+
"version": "2.7.2",
55
"main": "index.jsx",
66
"scripts": {
77
"test": "echo \"Error: no test specified\" && exit 1",

client/packages/lowcoder-sdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lowcoder-sdk",
3-
"version": "2.7.0",
3+
"version": "2.7.2",
44
"type": "module",
55
"files": [
66
"src",

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.7.0",
3+
"version": "2.7.2",
44
"private": true,
55
"type": "module",
66
"main": "src/index.sdk.ts",

client/packages/lowcoder/src/api/newsApi.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export const getHubspotContent = async () => {
132132
};
133133
try {
134134
const result = await NewsApi.secureRequest(apiBody);
135-
return result?.data[0]?.hubspot?.length > 0 ? result.data[0].hubspot as any[] : [];
135+
return result?.data[0]?.results?.length > 0 ? result.data[0].results as any[] : [];
136136
} catch (error) {
137137
console.error("Error getting news:", error);
138138
throw error;

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import { IconControl } from "comps/controls/iconControl";
2525
import {
2626
clickEvent,
2727
eventHandlerControl,
28+
doubleClickEvent,
2829
} from "../controls/eventHandlerControl";
2930
import { Avatar, AvatarProps, Badge, Dropdown, Menu } from "antd";
3031
import { LeftRightControl, dropdownControl } from "../controls/dropdownControl";
@@ -34,6 +35,8 @@ import { BadgeBasicSection, badgeChildren } from "./badgeComp/badgeConstants";
3435
import { DropdownOptionControl } from "../controls/optionsControl";
3536
import { ReactElement, useContext, useEffect } from "react";
3637
import { CompNameContext, EditorContext } from "../editorState";
38+
import { useCompClickEventHandler } from "@lowcoder-ee/comps/utils/useCompClickEventHandler";
39+
3740

3841
const AvatarWrapper = styled(Avatar) <AvatarProps & { $cursorPointer?: boolean, $style: AvatarStyleType }>`
3942
background: ${(props) => props.$style.background};
@@ -106,7 +109,7 @@ padding: ${props=>props.$style.padding};
106109
background: ${props=>props.$style.background};
107110
text-decoration: ${props => props.$style.textDecoration};
108111
`
109-
const EventOptions = [clickEvent] as const;
112+
const EventOptions = [clickEvent, doubleClickEvent] as const;
110113
const sharpOptions = [
111114
{ label: trans("avatarComp.square"), value: "square" },
112115
{ label: trans("avatarComp.circle"), value: "circle" },
@@ -140,6 +143,8 @@ const childrenMap = {
140143
const AvatarView = (props: RecordConstructorToView<typeof childrenMap>) => {
141144
const { shape, title, src, iconSize } = props;
142145
const comp = useContext(EditorContext).getUICompByName(useContext(CompNameContext));
146+
const handleClickEvent = useCompClickEventHandler({onEvent: props.onEvent})
147+
143148
// const eventsCount = comp ? Object.keys(comp?.children.comp.children.onEvent.children).length : 0;
144149
const hasIcon = props.options.findIndex((option) => (option.prefixIcon as ReactElement)?.props.value) > -1;
145150
const items = props.options
@@ -181,8 +186,7 @@ const AvatarView = (props: RecordConstructorToView<typeof childrenMap>) => {
181186
shape={shape}
182187
$style={props.avatarStyle}
183188
src={src.value}
184-
// $cursorPointer={eventsCount > 0}
185-
onClick={() => props.onEvent("click")}
189+
onClick={handleClickEvent}
186190
>
187191
{title.value}
188192
</AvatarWrapper>

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { hiddenPropertyView } from "comps/utils/propertyUtils";
88
import { trans } from "i18n";
99
import { NumberControl, StringControl } from "comps/controls/codeControl";
1010
import { Avatar, Tooltip } from "antd";
11-
import { clickEvent, eventHandlerControl, refreshEvent } from "../controls/eventHandlerControl";
11+
import { clickEvent, doubleClickEvent, eventHandlerControl, refreshEvent } from "../controls/eventHandlerControl";
1212
import styled from "styled-components";
1313
import { useContext, ReactElement, useEffect } from "react";
1414
import { MultiCompBuilder, stateComp, withDefault } from "../generators";
@@ -19,6 +19,7 @@ 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 { useCompClickEventHandler } from "../utils/useCompClickEventHandler";
2223

2324
const MacaroneList = [
2425
'#fde68a',
@@ -77,7 +78,7 @@ const DropdownOption = new MultiCompBuilder(
7778
))
7879
.build();
7980

80-
const EventOptions = [clickEvent, refreshEvent] as const;
81+
const EventOptions = [clickEvent, refreshEvent, doubleClickEvent] as const;
8182

8283
export const alignOptions = [
8384
{ label: <AlignLeft />, value: "flex-start" },
@@ -105,6 +106,8 @@ const childrenMap = {
105106
};
106107

107108
const AvatarGroupView = (props: RecordConstructorToView<typeof childrenMap> & { dispatch: (action: CompAction) => void; }) => {
109+
const handleClickEvent = useCompClickEventHandler({onEvent: props.onEvent})
110+
108111
return (
109112
<Container
110113
$style={props.style}
@@ -125,7 +128,7 @@ const AvatarGroupView = (props: RecordConstructorToView<typeof childrenMap> & {
125128
}}
126129
size={props.avatarSize}
127130
onClick={() => {
128-
props.onEvent("click")
131+
handleClickEvent();
129132
props.dispatch(changeChildAction("currentAvatar", item as JSONObject, false));
130133
}}
131134
>

0 commit comments

Comments
 (0)