lowcoder-comps 0.0.10 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/index.js +91355 -0
  2. package/package.json +5 -3
  3. package/README.md +0 -27
  4. package/index.html +0 -26
  5. package/index.tsx +0 -19
  6. package/jest.config.js +0 -5
  7. package/src/__test__/allComp.test.tsx +0 -61
  8. package/src/app-env.d.ts +0 -3
  9. package/src/comps/calendarComp/calendarComp.tsx +0 -442
  10. package/src/comps/calendarComp/calendarConstants.tsx +0 -897
  11. package/src/comps/chartComp/chartComp.tsx +0 -249
  12. package/src/comps/chartComp/chartConfigs/barChartConfig.tsx +0 -51
  13. package/src/comps/chartComp/chartConfigs/cartesianAxisConfig.tsx +0 -307
  14. package/src/comps/chartComp/chartConfigs/chartUrls.tsx +0 -6
  15. package/src/comps/chartComp/chartConfigs/legendConfig.tsx +0 -55
  16. package/src/comps/chartComp/chartConfigs/lineChartConfig.tsx +0 -96
  17. package/src/comps/chartComp/chartConfigs/pieChartConfig.tsx +0 -83
  18. package/src/comps/chartComp/chartConfigs/scatterChartConfig.tsx +0 -62
  19. package/src/comps/chartComp/chartConstants.tsx +0 -243
  20. package/src/comps/chartComp/chartPropertyView.tsx +0 -161
  21. package/src/comps/chartComp/chartUtils.ts +0 -240
  22. package/src/comps/chartComp/reactEcharts/core.tsx +0 -187
  23. package/src/comps/chartComp/reactEcharts/index.ts +0 -20
  24. package/src/comps/chartComp/reactEcharts/types.ts +0 -70
  25. package/src/comps/chartComp/seriesComp.tsx +0 -119
  26. package/src/comps/imageEditorComp/imageEditorClass.tsx +0 -52
  27. package/src/comps/imageEditorComp/imageEditorConstants.tsx +0 -109
  28. package/src/comps/imageEditorComp/index.tsx +0 -184
  29. package/src/comps/mermaidComp/index.tsx +0 -44
  30. package/src/comps/mermaidComp/mermaid.tsx +0 -29
  31. package/src/global.ts +0 -1
  32. package/src/i18n/comps/index.tsx +0 -29
  33. package/src/i18n/comps/locales/en.ts +0 -142
  34. package/src/i18n/comps/locales/enObj.tsx +0 -120
  35. package/src/i18n/comps/locales/index.ts +0 -7
  36. package/src/i18n/comps/locales/types.tsx +0 -9
  37. package/src/i18n/comps/locales/zh.ts +0 -4
  38. package/src/i18n/comps/locales/zhObj.tsx +0 -4
  39. package/src/index.ts +0 -9
  40. package/tsconfig.json +0 -22
  41. package/vite.config.js +0 -10
@@ -1,109 +0,0 @@
1
- import styled from "styled-components";
2
- import { Button } from "antd";
3
- import { EventConfigType } from "lowcoder-sdk";
4
- import { trans } from "i18n/comps";
5
-
6
- export const saveEvent: EventConfigType = {
7
- label: trans("imageEditor.save"),
8
- value: "save",
9
- description: trans("imageEditor.saveDesc"),
10
- };
11
-
12
- export const Container = styled.div`
13
- height: 100%;
14
- width: 100%;
15
- display: flex;
16
- align-items: center;
17
- justify-content: center;
18
- .tui-image-editor-container.top .tui-image-editor-controls-logo {
19
- display: none;
20
- }
21
- .tui-image-editor-container .tui-image-editor-header-logo,
22
- .tui-image-editor-container .tui-image-editor-controls-logo {
23
- display: none;
24
- }
25
- .tui-image-editor-container .tui-image-editor-header-buttons button,
26
- .tui-image-editor-container .tui-image-editor-header-buttons div,
27
- .tui-image-editor-container .tui-image-editor-controls-buttons button,
28
- .tui-image-editor-container .tui-image-editor-controls-buttons div {
29
- display: none;
30
- }
31
- .tie-btn-hand {
32
- display: none !important;
33
- }
34
- .tui-image-editor-container .tui-image-editor-menu,
35
- .tui-image-editor-container .tui-image-editor-help-menu {
36
- background-color: #f3f4f6 !important;
37
- }
38
- `;
39
-
40
- export const EmbeddedButton = styled(Button)`
41
- position: absolute;
42
- right: 8px;
43
- bottom: 4px;
44
- z-index: 100;
45
- `;
46
-
47
- export const customTheme = {
48
- // image
49
- "common.bi.image": "",
50
- "common.bisize.width": "0px",
51
- "common.bisize.height": "0px",
52
- "common.backgroundImage": "none",
53
- "common.backgroundColor": "#f3f4f6",
54
- "common.border": "1px solid #444",
55
-
56
- // header
57
- "header.backgroundImage": "none",
58
- "header.backgroundColor": "#f3f4f6",
59
- "header.border": "0px",
60
- "header.display": "none",
61
-
62
- // icons default
63
- "menu.normalIcon.color": "#8a8a8a",
64
- "menu.activeIcon.color": "#555555",
65
- "menu.disabledIcon.color": "#434343",
66
- "menu.hoverIcon.color": "#e9e9e9",
67
- "submenu.normalIcon.color": "#8a8a8a",
68
- "submenu.activeIcon.color": "#e9e9e9",
69
-
70
- "menu.iconSize.width": "24px",
71
- "menu.iconSize.height": "24px",
72
- "submenu.iconSize.width": "32px",
73
- "submenu.iconSize.height": "32px",
74
-
75
- // submenu primary color
76
- "submenu.backgroundColor": "#1e1e1e",
77
- "submenu.partition.color": "#858585",
78
-
79
- // submenu labels
80
- "submenu.normalLabel.color": "#858585",
81
- "submenu.normalLabel.fontWeight": "lighter",
82
- "submenu.activeLabel.color": "#fff",
83
- "submenu.activeLabel.fontWeight": "lighter",
84
-
85
- // checkbox style
86
- "checkbox.border": "1px solid #ccc",
87
- "checkbox.backgroundColor": "#fff",
88
-
89
- // rango style
90
- "range.pointer.color": "#fff",
91
- "range.bar.color": "#666",
92
- "range.subbar.color": "#d1d1d1",
93
-
94
- "range.disabledPointer.color": "#414141",
95
- "range.disabledBar.color": "#282828",
96
- "range.disabledSubbar.color": "#414141",
97
-
98
- "range.value.color": "#fff",
99
- "range.value.fontWeight": "lighter",
100
- "range.value.fontSize": "11px",
101
- "range.value.border": "1px solid #353535",
102
- "range.value.backgroundColor": "#151515",
103
- "range.title.color": "#fff",
104
- "range.title.fontWeight": "lighter",
105
-
106
- // colorpicker style
107
- "colorpicker.button.border": "1px solid #1e1e1e",
108
- "colorpicker.title.color": "#fff",
109
- };
@@ -1,184 +0,0 @@
1
- import {
2
- BoolControl,
3
- hiddenPropertyView,
4
- NameConfig,
5
- Section,
6
- sectionNames,
7
- StringStateControl,
8
- UICompBuilder,
9
- withDefault,
10
- withExposingConfigs,
11
- eventHandlerControl,
12
- NameConfigHidden,
13
- stringExposingStateControl,
14
- } from "lowcoder-sdk";
15
- import { useRef } from "react";
16
- import ReactResizeDetector from "react-resize-detector";
17
- import _ from "lodash";
18
- import { RecordConstructorToView } from "lowcoder-core";
19
- import { Container, customTheme, EmbeddedButton, saveEvent } from "./imageEditorConstants";
20
- import { ImageEditor } from "./imageEditorClass";
21
- import { i18nObjs, trans } from "i18n/comps";
22
-
23
- const childrenMap = {
24
- src: withDefault(StringStateControl, trans("imageEditor.defaultSrc")),
25
- name: withDefault(StringStateControl, "Example"),
26
- crop: withDefault(BoolControl, true),
27
- flip: withDefault(BoolControl, true),
28
- rotate: withDefault(BoolControl, true),
29
- draw: withDefault(BoolControl, true),
30
- shape: withDefault(BoolControl, true),
31
- icon: withDefault(BoolControl, true),
32
- text: withDefault(BoolControl, true),
33
- mask: withDefault(BoolControl, true),
34
- filter: withDefault(BoolControl, true),
35
- dataURI: stringExposingStateControl("dataURI"),
36
- data: stringExposingStateControl("data"),
37
- onEvent: eventHandlerControl([saveEvent] as const),
38
- buttonText: withDefault(StringStateControl, trans("imageEditor.save")),
39
- };
40
-
41
- const ContainerImageEditor = (props: RecordConstructorToView<typeof childrenMap>) => {
42
- const editorRef = useRef<any>(null);
43
- const conRef = useRef<HTMLDivElement>(null);
44
-
45
- const menu = ["crop", "flip", "rotate", "draw", "shape", "icon", "text", "mask", "filter"];
46
- const menuMap = new Map<string, boolean>();
47
- menuMap.set("crop", props.crop);
48
- menuMap.set("flip", props.flip);
49
- menuMap.set("rotate", props.rotate);
50
- menuMap.set("draw", props.draw);
51
- menuMap.set("shape", props.shape);
52
- menuMap.set("icon", props.icon);
53
- menuMap.set("text", props.text);
54
- menuMap.set("mask", props.mask);
55
- menuMap.set("filter", props.filter);
56
- let filteredMenu = menu.filter((ele) => {
57
- return menuMap.get(ele);
58
- });
59
- const onResize = () => {
60
- const editor = editorRef.current;
61
- const container = conRef.current;
62
- editor.imageEditorInst.ui.resizeEditor({
63
- uiSize: { width: container?.clientWidth, height: container?.clientHeight },
64
- });
65
- };
66
-
67
- const saveImage = () => {
68
- let imageEditorInst = editorRef.current.imageEditorInst;
69
- let dataURL = imageEditorInst.toDataURL();
70
- props.dataURI.onChange(dataURL);
71
- props.data.onChange(dataURL.split(",")[1]);
72
- };
73
- return (
74
- <Container ref={conRef}>
75
- <EmbeddedButton
76
- type="primary"
77
- onClick={() => {
78
- saveImage();
79
- props.onEvent("save");
80
- }}
81
- >
82
- {props.buttonText.value}
83
- </EmbeddedButton>
84
- <ReactResizeDetector onResize={onResize}>
85
- <div style={{ width: "100%", height: "100%" }}>
86
- <ImageEditor
87
- ref={editorRef}
88
- includeUI={{
89
- loadImage: {
90
- path: props.src.value,
91
- name: props.name.value,
92
- },
93
- menu: filteredMenu,
94
- theme: customTheme,
95
- uiSize: {
96
- width: "100%",
97
- height: "100%",
98
- },
99
- menuBarPosition: "bottom",
100
- locale: i18nObjs.imageEditorLocale ?? {},
101
- }}
102
- cssMaxWidth={document.documentElement.clientWidth}
103
- cssMaxHeight={document.documentElement.clientHeight}
104
- selectionStyle={{
105
- cornerSize: 50,
106
- rotatingPointOffset: 100,
107
- }}
108
- usageStatistics={false}
109
- />
110
- </div>
111
- </ReactResizeDetector>
112
- </Container>
113
- );
114
- };
115
- let ImageEditorBasicComp = (function () {
116
- return new UICompBuilder(childrenMap, (props) => {
117
- return <ContainerImageEditor {...props} />;
118
- })
119
- .setPropertyViewFn((children) => {
120
- return (
121
- <>
122
- <Section name={sectionNames.basic}>
123
- {children.src.propertyView({
124
- label: trans("imageEditor.src"),
125
- placeholder: "http://xxx.jpg",
126
- })}
127
- {children.name.propertyView({
128
- label: trans("imageEditor.name"),
129
- })}
130
- {children.buttonText.propertyView({
131
- label: trans("imageEditor.buttonText"),
132
- })}
133
- </Section>
134
- <Section name={sectionNames.interaction}>{children.onEvent.getPropertyView()}</Section>
135
- <Section name={sectionNames.advanced}>
136
- {children.crop.propertyView({
137
- label: "Crop",
138
- })}
139
- {children.flip.propertyView({
140
- label: "Flip",
141
- })}
142
- {children.rotate.propertyView({
143
- label: "Rotate",
144
- })}
145
- {children.draw.propertyView({
146
- label: "Draw",
147
- })}
148
- {children.shape.propertyView({
149
- label: "Shape",
150
- })}
151
- {children.icon.propertyView({
152
- label: "Icon",
153
- })}
154
- {children.text.propertyView({
155
- label: "Text",
156
- })}
157
- {children.mask.propertyView({
158
- label: "Mask",
159
- })}
160
- {children.filter.propertyView({
161
- label: "Filter",
162
- })}
163
- </Section>
164
- <Section name={sectionNames.layout}>{hiddenPropertyView(children)}</Section>
165
- </>
166
- );
167
- })
168
- .build();
169
- })();
170
-
171
- ImageEditorBasicComp = class extends ImageEditorBasicComp {
172
- override autoHeight(): boolean {
173
- return false;
174
- }
175
- };
176
-
177
- export const ImageEditorComp = withExposingConfigs(ImageEditorBasicComp, [
178
- new NameConfig("src", trans("imageEditor.srcDesc")),
179
- new NameConfig("name", trans("imageEditor.nameDesc")),
180
- new NameConfig("dataURI", trans("imageEditor.dataURIDesc")),
181
- new NameConfig("data", trans("imageEditor.dataDesc")),
182
- new NameConfig("buttonText", trans("imageEditor.buttonTextDesc")),
183
- NameConfigHidden,
184
- ]);
@@ -1,44 +0,0 @@
1
- import {
2
- UICompBuilder,
3
- Section,
4
- withExposingConfigs,
5
- stringExposingStateControl,
6
- NameConfig,
7
- eventHandlerControl,
8
- withMethodExposing,
9
- } from "lowcoder-sdk";
10
-
11
- import Mermaid from "./mermaid";
12
-
13
- const childrenMap = {
14
- code: stringExposingStateControl(
15
- "code",
16
- `graph LR
17
- Start --> Stop`
18
- ),
19
- onEvent: eventHandlerControl([
20
- {
21
- label: "onChange",
22
- value: "change",
23
- description: "",
24
- },
25
- ]),
26
- };
27
-
28
- const CompBase = new UICompBuilder(childrenMap, (props: any) => {
29
- const code = props.code.value;
30
- return <Mermaid code={code} />;
31
- })
32
- .setPropertyViewFn((children: any) => {
33
- return (
34
- <>
35
- <Section name="Basic">{children.code.propertyView({ label: "code" })}</Section>
36
- <Section name="Interaction">{children.onEvent.propertyView()}</Section>
37
- </>
38
- );
39
- })
40
- .build();
41
-
42
- const AppViewCompTemp = withMethodExposing(CompBase, []);
43
-
44
- export const MermaidComp = withExposingConfigs(AppViewCompTemp, [new NameConfig("code", "")]);
@@ -1,29 +0,0 @@
1
- import React, { useEffect, useState } from "react";
2
- import mermaid from "mermaid";
3
-
4
- function escape(str: string): string {
5
- const entries: { [index: string]: any } = { lt: "<", gt: ">", nbsp: " ", amp: "&", quot: '"' };
6
- return str
7
- .replace(/&(lt|gt|nbsp|amp|quot);/gi, function (_, t) {
8
- return entries[t];
9
- })
10
- .trim();
11
- }
12
-
13
- export default ({ id = "graphDiv", code = "" }) => {
14
- const [svg, setSvg] = useState("");
15
-
16
- useEffect(() => {
17
- mermaid.initialize({ startOnLoad: false });
18
- }, []);
19
-
20
- useEffect(() => {
21
- if (!code) return;
22
-
23
- mermaid.mermaidAPI.render(id, escape(code)).then((res) => {
24
- setSvg(res.svg);
25
- });
26
- }, [code, setSvg]);
27
-
28
- return <pre className="mermaid" dangerouslySetInnerHTML={{ __html: svg }}></pre>;
29
- };
package/src/global.ts DELETED
@@ -1 +0,0 @@
1
- import "../../lowcoder/src/global";
@@ -1,29 +0,0 @@
1
- import { getI18nObjects, getValueByLocale, Translator } from "lowcoder-core";
2
- import * as localeData from "./locales";
3
- import { I18nObjects } from "./locales/types";
4
-
5
- export const { trans, language } = new Translator<typeof localeData.en>(
6
- localeData,
7
- REACT_APP_LANGUAGES
8
- );
9
- export const i18nObjs = getI18nObjects<I18nObjects>(localeData, REACT_APP_LANGUAGES);
10
-
11
- export function getEchartsLocale() {
12
- return getValueByLocale("EN", (locale) => {
13
- switch (locale.language) {
14
- case "en":
15
- return "EN";
16
- case "zh":
17
- return "ZH";
18
- }
19
- });
20
- }
21
-
22
- export function getCalendarLocale() {
23
- switch (language) {
24
- case "zh":
25
- return "zh-cn";
26
- default:
27
- return "en-gb";
28
- }
29
- }
@@ -1,142 +0,0 @@
1
- export const en = {
2
- chart: {
3
- delete: "Delete",
4
- data: "Data",
5
- mode: "Mode",
6
- config: "Configuration",
7
- UIMode: "UI Mode",
8
- chartType: "Chart type",
9
- xAxis: "X-axis",
10
- chartSeries: "Chart series",
11
- customSeries: "Custom series",
12
- add: "Add",
13
- confirmDelete: "Confirm Delete: ",
14
- seriesName: "Series Name",
15
- dataColumns: "Data columns",
16
- title: "Title",
17
- xAxisDirection: "X axis direction",
18
- xAxisName: "X axis name",
19
- xAxisType: "X axis type",
20
- xAxisTypeTooltip:
21
- "By default, it will be automatically detected according to X-axis data. For the type description, please refer to: ",
22
- logBase: "LogBase",
23
- yAxisName: "Y axis name",
24
- yAxisType: "Y axis type",
25
- yAxisDataFormat: "Y axis data type",
26
- yAxisDataFormatTooltip: `Value indicates the value of each coordinate. Example: '{{value * 100 + "%"}}'`,
27
- basicBar: "Basic bar",
28
- stackedBar: "Stacked bar",
29
- barType: "Bar chart type",
30
- categoryAxis: "Category axis",
31
- valueAxis: "Value axis",
32
- timeAxis: "Time axis",
33
- logAxis: "Log axis",
34
- auto: "Default",
35
- legendPosition: "Legend position",
36
- basicLine: "Basic line",
37
- stackedLine: "Stacked line",
38
- areaLine: "Area line",
39
- smooth: "Smooth curve",
40
- lineType: "Line chart type",
41
- basicPie: "Basic pie",
42
- doughnutPie: "Doughnut pie",
43
- rosePie: "Rose pie",
44
- pieType: "Pie chart type",
45
- spending: "Spending",
46
- budget: "Budget",
47
- bar: "Bar chart",
48
- line: "Line chart",
49
- scatter: "Scatter chart",
50
- pie: "Pie chart",
51
- horizontal: "Horizontal",
52
- vertical: "Vertical",
53
- noData: "No data",
54
- unknown: "Unknown",
55
- select: "Select",
56
- unSelect: "Unselect",
57
- echartsOptionLabel: "Option",
58
- echartsOptionTooltip: "ECharts option",
59
- echartsOptionExamples: "ECharts examples",
60
- selectDesc: "Triggered when the user selects part of the data in the chart",
61
- unselectDesc: "Triggered when the user unselects part of the data in the chart",
62
- selectedPointsDesc: "Selected points",
63
- dataDesc: "The raw data used in the current chart",
64
- titleDesc: "Current chart title",
65
- scatterShape: "Scatter shape",
66
- circle: "Circle",
67
- rect: "Rect",
68
- triangle: "Triangle",
69
- diamond: "Diamond",
70
- pin: "Pin",
71
- arrow: "Arrow",
72
- pointColorLabel: "Point color",
73
- pointColorTooltip: `Set the point color according to the series name and current point value, optional variables: seriesName, value. Example: '{{value < 25000 ? "red" : "green"}}'`,
74
- },
75
- imageEditor: {
76
- defaultSrc: "",
77
- save: "Save",
78
- saveDesc: "Save image",
79
- src: "Image source",
80
- name: "Image name",
81
- buttonText: "Button text",
82
- srcDesc: "Image source",
83
- nameDesc: "Image name",
84
- dataURIDesc: "Image data URI",
85
- dataDesc: "Image data",
86
- buttonTextDesc: "Button text",
87
- },
88
- calendar: {
89
- events: "Events data",
90
- editable: "Editable",
91
- defaultDate: "Default date",
92
- defaultDateTooltip: "The date that the calendar initially displays",
93
- defaultView: "Default view",
94
- defaultViewTooltip: "The view that the calendar initially displays",
95
- showEventTime: "Show event times",
96
- showEventTimeTooltip: "Whether to display the time text of the event",
97
- showWeekends: "Show weekends",
98
- showAllDay: "Show all-day",
99
- showAllDayTooltip: "Whether to display the all-day slot in the week and day views",
100
- dayMaxEvents: "Day max events",
101
- dayMaxEventsTooltip:
102
- "The maximum number of events to display in the month view per day, with 0 being limited to the height of the cell",
103
- eventMaxStack: "Event max stack",
104
- eventMaxStackTooltip:
105
- "The maximum number of events to stack horizontally in the week and day views, with 0 being no limit",
106
- selectInterval: "The interval selected on the calendar",
107
- selectEvent: "Selected event",
108
- changeSet:
109
- "The event object changed by dragging in the calendar, the key is the eventId, and the value is the event",
110
- headerBtnBackground: "Button background",
111
- btnText: "Button text",
112
- title: "Title",
113
- selectBackground: "Selected background",
114
- today: "Today",
115
- month: "Month",
116
- week: "Week",
117
- day: "Day",
118
- list: "List",
119
- monday: "Monday",
120
- tuesday: "Tuesday",
121
- wednesday: "Wednesday",
122
- thursday: "Thursday",
123
- friday: "Friday",
124
- saturday: "Saturday",
125
- sunday: "Sunday",
126
- startWeek: "Start from",
127
- creatEvent: "Create event",
128
- editEvent: "Edit event",
129
- eventName: "Event name",
130
- eventColor: "Event color",
131
- eventGroupId: "Group ID",
132
- groupIdTooltip:
133
- "Group ID is used to group different events, and events in the same group can be dragged and resized together.",
134
- more: "more",
135
- allDay: "All day",
136
- eventNameRequire: "Please enter Event name",
137
- eventId: "Event ID",
138
- eventIdRequire: "Please enter Event ID",
139
- eventIdTooltip: "Unique ID for each event",
140
- eventIdExist: "ID already exists",
141
- },
142
- };
@@ -1,120 +0,0 @@
1
- import { I18nObjects } from "./types";
2
- import { chartColorPalette } from "lowcoder-sdk";
3
-
4
- export const enObj: I18nObjects = {
5
- defaultDataSource: [
6
- {
7
- date: "2021-09",
8
- department: "Administration",
9
- spending: 9003,
10
- budget: 8000,
11
- },
12
- {
13
- date: "2021-09",
14
- department: "Finance",
15
- spending: 3033,
16
- budget: 4000,
17
- },
18
- {
19
- date: "2021-09",
20
- department: "Sales",
21
- spending: 9230,
22
- budget: 8000,
23
- },
24
- {
25
- date: "2021-10",
26
- department: "Administration",
27
- spending: 13032,
28
- budget: 15000,
29
- },
30
- {
31
- date: "2021-10",
32
- department: "Finance",
33
- spending: 2300,
34
- budget: 5000,
35
- },
36
- {
37
- date: "2021-10",
38
- department: "Sales",
39
- spending: 7323.5,
40
- budget: 8000,
41
- },
42
- {
43
- date: "2021-11",
44
- department: "Administration",
45
- spending: 13000,
46
- budget: 16023,
47
- },
48
- {
49
- date: "2021-11",
50
- department: "Finance",
51
- spending: 3569.5,
52
- budget: 3000,
53
- },
54
- {
55
- date: "2021-11",
56
- department: "Sales",
57
- spending: 10000,
58
- budget: 9932,
59
- },
60
- {
61
- date: "2021-12",
62
- department: "Administration",
63
- spending: 18033,
64
- budget: 20000,
65
- },
66
- {
67
- date: "2021-12",
68
- department: "Finance",
69
- spending: 4890,
70
- budget: 4500,
71
- },
72
- {
73
- date: "2021-12",
74
- department: "Sales",
75
- spending: 9322,
76
- budget: 8000,
77
- },
78
- ],
79
-
80
- defaultEchartsJsonOption: {
81
- title: {
82
- text: "Funnel Chart",
83
- left: "center",
84
- },
85
- backgroundColor: "#ffffff",
86
- color: chartColorPalette,
87
- tooltip: {
88
- trigger: "item",
89
- formatter: "{a} <br/>{b} : {c}%",
90
- },
91
- legend: {
92
- data: ["Show", "Click", "Visit", "Query", "Buy"],
93
- top: "bottom",
94
- },
95
- series: [
96
- {
97
- name: "Funnel",
98
- type: "funnel",
99
- left: "10%",
100
- top: 60,
101
- bottom: 60,
102
- width: "80%",
103
- min: 0,
104
- max: 100,
105
- gap: 2,
106
- label: {
107
- show: true,
108
- position: "inside",
109
- },
110
- data: [
111
- { value: 100, name: "Show" },
112
- { value: 80, name: "Click" },
113
- { value: 60, name: "Visit" },
114
- { value: 40, name: "Query" },
115
- { value: 20, name: "Buy" },
116
- ],
117
- },
118
- ],
119
- },
120
- };
@@ -1,7 +0,0 @@
1
- // file examples: en, enGB, zh, zhHK
2
- // fallback example: current locale is zh-HK, fallback order is zhHK => zh => en
3
- export * from "./en";
4
- export * from "./zh";
5
-
6
- export * from "./enObj";
7
- export * from "./zhObj";
@@ -1,9 +0,0 @@
1
- import { JSONObject } from "lowcoder-sdk";
2
- import { XAXisComponentOption } from "echarts";
3
-
4
- export type I18nObjects = {
5
- defaultDataSource: JSONObject[];
6
- defaultEchartsJsonOption: Record<string, unknown>;
7
- timeXAxisLabel?: XAXisComponentOption["axisLabel"];
8
- imageEditorLocale?: Record<string, string>;
9
- };
@@ -1,4 +0,0 @@
1
- import { en } from "./en";
2
-
3
- export const zh: typeof en | undefined = undefined;
4
-
@@ -1,4 +0,0 @@
1
- import { I18nObjects } from "./types";
2
-
3
- export const zhObj: I18nObjects | undefined = undefined;
4
-