Skip to content

Adding eCharts Wordcloud Support #420

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .DS_Store
Binary file not shown.
18 changes: 18 additions & 0 deletions client/packages/lowcoder-comps/icons/mermaidchart.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 13 additions & 4 deletions client/packages/lowcoder-comps/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lowcoder-comps",
"version": "0.0.13",
"version": "0.0.15",
"type": "module",
"license": "MIT",
"dependencies": {
Expand All @@ -15,6 +15,7 @@
"@types/react-dom": "17",
"big.js": "^6.2.1",
"echarts-extension-gmap": "^1.6.0",
"echarts-wordcloud": "^2.1.0",
"lowcoder-cli": "workspace:^",
"lowcoder-sdk": "workspace:^",
"mermaid": "^10.2.4",
Expand All @@ -29,16 +30,16 @@
"name": "Chart",
"icon": "./icons/icon-chart.svg",
"layoutInfo": {
"w": 11,
"h": 35
"w": 15,
"h": 40
}
},
"imageEditor": {
"name": "Image Editor",
"icon": "./icons/icon-chart.svg",
"layoutInfo": {
"w": 15,
"h": 60
"h": 40
}
},
"calendar": {
Expand All @@ -48,6 +49,14 @@
"w": 15,
"h": 60
}
},
"mermaid": {
"name": "Mermaid",
"icon": "./icons/mermaidchart.svg",
"layoutInfo": {
"w": 15,
"h": 40
}
}
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as echarts from "echarts";
import "echarts-wordcloud";
import { EChartsReactProps, EChartsInstance, EChartsOptionWithMap } from "./types";
import EChartsReactCore from "./core";

Expand Down
2 changes: 2 additions & 0 deletions client/packages/lowcoder-comps/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { ChartCompWithDefault } from "./comps/chartComp/chartComp";
import { ImageEditorComp } from "./comps/imageEditorComp/index";
import { CalendarComp } from "./comps/calendarComp/calendarComp";
import { MermaidComp } from "comps/mermaidComp";

export default {
chart: ChartCompWithDefault,
imageEditor: ImageEditorComp,
calendar: CalendarComp,
mermaid: MermaidComp,
};
18 changes: 18 additions & 0 deletions client/packages/lowcoder-design/src/icons/icon-mermaid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions client/packages/lowcoder-design/src/icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ export { ReactComponent as GraphqlIcon } from "./icon-query-Graphql.svg";
export { ReactComponent as SnowflakeIcon } from "./icon-query-snowflake.svg";
export { ReactComponent as MariaDBIcon } from "./icon-query-MariaDB.svg";
export { ReactComponent as imageEditorIcon } from "./icon-insert-imageEditor.svg";
export { ReactComponent as MermaidIcon } from "./icon-mermaid.svg";
export { ReactComponent as HomeSettingsIcon } from "./icon-home-settings.svg";
export { ReactComponent as HomeSettingsActiveIcon } from "./icon-home-settings-active.svg";
export { ReactComponent as HelpGithubIcon } from "./icon-help-github.svg";
Expand Down
1 change: 1 addition & 0 deletions client/packages/lowcoder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"copy-to-clipboard": "^3.3.3",
"core-js": "^3.25.2",
"echarts": "^5.4.2",
"echarts-wordcloud": "^2.1.0",
"eslint4b-prebuilt-2": "^7.32.0",
"file-saver": "^2.0.5",
"github-markdown-css": "^5.1.0",
Expand Down
14 changes: 14 additions & 0 deletions client/packages/lowcoder/src/comps/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ import {
MentionIcon,
AutoCompleteCompIcon,
ResponsiveLayoutCompIcon,
MermaidIcon,
} from "lowcoder-design";

import { defaultFormData, FormComp } from "./comps/formComp/formComp";
Expand Down Expand Up @@ -841,6 +842,19 @@ const uiCompMap: Registry = {
h: 60,
},
},
mermaid: {
name: trans("uiComp.mermaidCompName"),
enName: "Mermaid Charts",
comp: remoteComp({ ...builtInRemoteComps, compName: "mermaid" }),
description: trans("uiComp.mermaidCompDesc"),
categories: ["dataDisplay"],
icon: MermaidIcon,
keywords: trans("uiComp.mermaidCompKeywords"),
layoutInfo: {
w: 15,
h: 60,
},
},
scanner: {
name: trans("uiComp.scannerCompName"),
enName: "Scanner",
Expand Down
1 change: 1 addition & 0 deletions client/packages/lowcoder/src/comps/uiCompRegistry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ export type UICompType =
| "progress"
| "progressCircle"
| "chart"
| "mermaid" //Added By Falk Wolsky
| "fileViewer"
| "divider"
| "qrCode"
Expand Down
3 changes: 3 additions & 0 deletions client/packages/lowcoder/src/i18n/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -870,6 +870,9 @@ export const en = {
imageEditorCompName: "Image Editor",
imageEditorCompDesc: "Image Editor component",
imageEditorCompKeywords: "",
mermaidCompName: "Mermaid Charts",
mermaidCompDesc: "Render Mermaid Charts based on text",
mermaidCompKeywords: "",
calendarCompName: "Calendar",
calendarCompDesc: "Calendar component",
calendarCompKeywords: "",
Expand Down
3 changes: 3 additions & 0 deletions client/packages/lowcoder/src/i18n/locales/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,9 @@ uiComp: {
imageEditorCompName: "图片编辑器",
imageEditorCompDesc: "图片编辑器组件",
imageEditorCompKeywords: "",
mermaidCompName: "美人鱼图表",
mermaidCompDesc: "根据文本渲染美人鱼图表",
mermaidCompKeywords: "",
calendarCompName: "日历",
calendarCompDesc: "日历组件",
calendarCompKeywords: "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,9 @@ export const CompStateIcon: {
jsonSchemaForm: <LeftJsonEditor />,
container: <LeftContainer />,
meeting: <LeftMeeting />,
mermaid: <LeftChart />,
videocomponent: <LeftMeeting />,
controlButton: <LeftMeeting />,
controlButton: <LeftButton />,
tabbedContainer: <LeftContainer />,
modal: <LeftModal />,
listView: <LeftListView />,
Expand Down
11 changes: 11 additions & 0 deletions client/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7776,6 +7776,15 @@ __metadata:
languageName: node
linkType: hard

"echarts-wordcloud@npm:^2.1.0":
version: 2.1.0
resolution: "echarts-wordcloud@npm:2.1.0"
peerDependencies:
echarts: ^5.0.1
checksum: d6e8996bb1267fbaa3fde23a121918a662a46ddd9ccd00ba0829aa4bd95b1a7b5cab64e3f4fe7241d605caaba7ad7b8e68eeaa9e1ad4adbf43cc0551deb14e33
languageName: node
linkType: hard

"echarts@npm:^5.4.2":
version: 5.4.2
resolution: "echarts@npm:5.4.2"
Expand Down Expand Up @@ -11818,6 +11827,7 @@ __metadata:
"@types/react-dom": 17
big.js: ^6.2.1
echarts-extension-gmap: ^1.6.0
echarts-wordcloud: ^2.1.0
jest: 29.3.0
lowcoder-cli: "workspace:^"
lowcoder-sdk: "workspace:^"
Expand Down Expand Up @@ -11990,6 +12000,7 @@ __metadata:
core-js: ^3.25.2
dotenv: ^16.0.3
echarts: ^5.4.2
echarts-wordcloud: ^2.1.0
eslint: ^8.0.0
eslint-config-react-app: ^7.0.1
eslint-plugin-only-ascii: ^0.0.0
Expand Down