Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c1a25c5

Browse files
committed
refactor: rename openblocks to lowcoder
1 parent f75715f commit c1a25c5

File tree

36 files changed

+55
-55
lines changed

36 files changed

+55
-55
lines changed

‎client/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
Simply run below command to start a backend server.
1010

1111
```bash
12-
docker run -d --name openblocks -p 3000:3000 -v "$PWD/stacks:/lowcoder-stacks" lowcoderorg/lowcoder-ce
12+
docker run -d --name lowcoder -p 3000:3000 -v "$PWD/stacks:/lowcoder-stacks" lowcoderorg/lowcoder-ce
1313
```
1414

1515
For more information, view our [docs](../docs/self-hosting)
@@ -43,4 +43,4 @@ In addition, before submitting a pull request, please make sure the following is
4343

4444
1. If you’ve fixed a bug or added code that should be tested and add unit test suite.
4545
2. Run `yarn test` and ensure all test suites pass.
46-
3. If you add new dependency, use yarn workspace openblocks some-package to make sure yarn.lock is also updated.
46+
3. If you add new dependency, use yarn workspace lowcoder some-package to make sure yarn.lock is also updated.

‎client/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010
"node": "^14.18.0 || >=16.0.0"
1111
},
1212
"scripts": {
13-
"start": "yarn workspace openblocks start",
14-
"start:ee": "REACT_APP_EDITION=enterprise yarn workspace openblocks start",
15-
"start:ee-global": "REACT_APP_EDITION=enterprise-global yarn workspace openblocks start",
13+
"start": "yarn workspace lowcoder start",
14+
"start:ee": "REACT_APP_EDITION=enterprise yarn workspace lowcoder start",
15+
"start:ee-global": "REACT_APP_EDITION=enterprise-global yarn workspace lowcoder start",
1616
"build": "yarn node ./scripts/build.js",
1717
"test": "jest && yarn workspace lowcoder-comps test",
18-
"prepare": "yarn workspace openblocks prepare",
18+
"prepare": "yarn workspace lowcoder prepare",
1919
"build:core": "yarn workspace lowcoder-core build",
2020
"test:core": "yarn workspace lowcoder-core test"
2121
},

‎client/packages/create-openblocks-plugin/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ function executeNodeScript({ cwd, args }, data, source) {
8989
}
9090

9191
/**
92-
* create openblocks comps project
92+
* create lowcoder comps project
9393
* 1. create dir
9494
* 2. create package.json
9595
* 3. install lowcoder-cli

‎client/packages/create-openblocks-plugin/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
},
1313
"license": "MIT",
1414
"keywords": [
15-
"openblocks"
15+
"lowcoder"
1616
]
1717
}

‎client/packages/openblocks-cli-template-typescript/README-template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# openblocks comp lib
1+
# lowcoder comp lib
22

33
## Start
44

‎client/packages/openblocks-cli-template-typescript/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import ReactDOM from "react-dom";
22
import { CompIDE } from "lowcoder-sdk";
3-
import { name, version, openblocks } from "./package.json";
3+
import { name, version, lowcoder } from "./package.json";
44
import compMap from "./src/index";
55

66
import "lowcoder-sdk/dist/style.css";

‎client/packages/openblocks-cli-template-typescript/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"start": "vite",
77
"build": "lowcoder-cli build"
88
},
9-
"openblocks": {
9+
"lowcoder": {
1010
"description": "",
1111
"comps": {
1212
"hello_world": {
@@ -22,7 +22,7 @@
2222
"vite": "^3.2.4"
2323
},
2424
"keywords": [
25-
"openblocks"
25+
"lowcoder"
2626
],
2727
"license": "MIT"
2828
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# lowcoder-cli
22

3-
CLI tool used to start build and publish openblocks component library.
3+
CLI tool used to start build and publish lowcoder component library.

‎client/packages/openblocks-cli/actions/build.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ function validPackageJSON() {
1717
if (!packageJSON.version) {
1818
return "- package version is required";
1919
}
20-
if (!packageJSON.openblocks) {
21-
return "- openblocks field is required in package.json";
20+
if (!packageJSON.lowcoder) {
21+
return "- lowcoder field is required in package.json";
2222
}
23-
const openblocks = packageJSON.openblocks;
23+
const lowcoder = packageJSON.lowcoder;
2424
if (!lowcoder.comps || Object.keys(lowcoder.comps).length === 0) {
2525
return "- not found any comps to build";
2626
}

‎client/packages/openblocks-cli/actions/init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export default async function initAction(options) {
7474
const templatePackageJson = fs.readJsonSync(templatePackageJsonFile);
7575
const appPackageJson = fs.readJsonSync(paths.appPackageJson);
7676

77-
appPackageJson.openblocks = templatePackageJson.openblocks || {};
77+
appPackageJson.lowcoder = templatePackageJson.lowcoder || {};
7878
appPackageJson.scripts = {
7979
start: "vite",
8080
build: "lowcoder-cli build",

‎client/packages/openblocks-cli/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lowcoder-cli",
3-
"description": "CLI tool used to start build publish openblocks components",
3+
"description": "CLI tool used to start build publish lowcoder components",
44
"version": "0.0.24",
55
"license": "MIT",
66
"bin": "./index.js",
@@ -46,6 +46,6 @@
4646
"lowcoder-sdk": "*"
4747
},
4848
"keywords": [
49-
"openblocks"
49+
"lowcoder"
5050
]
5151
}

‎client/packages/openblocks-comps/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# openblocks comp lib
1+
# lowcoder comp lib
22

33
## Start
44

‎client/packages/openblocks-comps/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import ReactDOM from "react-dom";
22
import { CompIDE } from "lowcoder-sdk";
3-
import { name, version, openblocks } from "./package.json";
3+
import { name, version, lowcoder } from "./package.json";
44
import compMap from "./src/index";
55

66
import "lowcoder-sdk/dist/style.css";

‎client/packages/openblocks-comps/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"react-dom": "17",
2222
"typescript": "4.8.4"
2323
},
24-
"openblocks": {
24+
"lowcoder": {
2525
"description": "",
2626
"comps": {
2727
"chart": {

‎client/packages/openblocks-comps/src/comps/chartComp/chartConstants.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { ScatterChartConfig } from "./chartConfigs/scatterChartConfig";
1515
import { SeriesListComp } from "./seriesComp";
1616
import { EChartsOption } from "echarts";
1717
import { i18nObjs, trans } from "i18n/comps";
18-
import { JSONValue } from "openblocks";
18+
import { JSONValue } from "lowcoder";
1919

2020
export const ChartTypeOptions = [
2121
{

‎client/packages/openblocks-core/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
"lodash": "^4.17.21",
2222
"lru-cache": "^7.14.1"
2323
},
24-
"description": "lowcoder-core is a JavaScript library for building new components in openblocks",
24+
"description": "lowcoder-core is a JavaScript library for building new components in lowcoder",
2525
"keywords": [
26-
"openblocks",
26+
"lowcoder",
2727
"components"
2828
],
2929
"types": "lib/index.d.ts",

‎client/packages/openblocks-dev-utils/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"version": "0.0.5",
44
"license": "MIT",
55
"type": "module",
6-
"description": "Openblocks dev utils for openblocks build process and lowcoder-cli",
6+
"description": "Openblocks dev utils for lowcoder build process and lowcoder-cli",
77
"keywords": [
8-
"openblocks"
8+
"lowcoder"
99
]
1010
}

‎client/packages/openblocks-plugin-demo/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# openblocks comp lib
1+
# lowcoder comp lib
22

33
## Start
44

‎client/packages/openblocks-plugin-demo/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import ReactDOM from "react-dom";
22
import { CompIDE } from "lowcoder-sdk";
3-
import { name, version, openblocks } from "./package.json";
3+
import { name, version, lowcoder } from "./package.json";
44
import compMap from "./src/index";
55

66
import "lowcoder-sdk/dist/style.css";

‎client/packages/openblocks-plugin-demo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"publishConfig": {
1313
"registry": "https://registry.npmjs.com"
1414
},
15-
"openblocks": {
15+
"lowcoder": {
1616
"description": "",
1717
"comps": {
1818
"hello_world": {

‎client/packages/openblocks-sdk/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"react-dom": ">=17"
5454
},
5555
"keywords": [
56-
"openblocks"
56+
"lowcoder"
5757
],
5858
"license": "MIT"
5959
}
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// @ts-nocheck
22
import "../../lowcoder/src/index.less";
33
import "virtual:globals";
4-
import * as sdk from "openblocks";
5-
export * from "openblocks";
4+
import * as sdk from "lowcoder";
5+
export * from "lowcoder";
66

7-
window.$openblocks_sdk = sdk;
7+
window.$lowcoder_sdk = sdk;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# openblocks
1+
# lowcoder
22

33
The main app of lowcoder.

‎client/packages/openblocks/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "openblocks",
2+
"name": "lowcoder",
33
"version": "0.1.0",
44
"private": true,
55
"type": "module",

‎client/packages/openblocks/src/components/ResCreatePanel.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,12 +169,12 @@ const ResButton = (props: {
169169
dataSourceId: QUICK_GRAPHQL_ID,
170170
},
171171
},
172-
openblocksApi: {
172+
lowcoderApi: {
173173
icon: OPENBLOCKS_API_INFO.icon,
174174
label: OPENBLOCKS_API_INFO.name,
175175
type: BottomResTypeEnum.Query,
176176
extra: {
177-
compType: "openblocksApi",
177+
compType: "lowcoderApi",
178178
dataSourceId: OPENBLOCKS_API_ID,
179179
},
180180
},
@@ -320,7 +320,7 @@ export function ResCreatePanel(props: ResCreateModalProps) {
320320
<ResButton size={buttonSize} identifier={"restApi"} onSelect={onSelect} />
321321
<ResButton size={buttonSize} identifier={"graphql"} onSelect={onSelect} />
322322
{placement === "editor" && (
323-
<ResButton size={buttonSize} identifier={"openblocksApi"} onSelect={onSelect} />
323+
<ResButton size={buttonSize} identifier={"lowcoderApi"} onSelect={onSelect} />
324324
)}
325325

326326
{datasource.map((i) => (

‎client/packages/openblocks/src/comps/queries/queryComp/queryPropertyView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,12 +186,12 @@ export const QueryGeneralPropertyView = (props: {
186186
);
187187
if (datasourceId === oldOpenblocksId) {
188188
datasourceId = OPENBLOCKS_API_ID;
189-
datasourceType = "openblocksApi";
189+
datasourceType = "lowcoderApi";
190190
dispatch(
191191
comp.changeValueAction({
192192
...comp.toJsonValue(),
193193
datasourceId: OPENBLOCKS_API_ID,
194-
compType: "openblocksApi",
194+
compType: "lowcoderApi",
195195
} as any)
196196
);
197197
}

‎client/packages/openblocks/src/comps/queries/resourceDropdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ const QuickGraphqlValue: ResourceOptionValue = {
9797

9898
const OpenblocksAPIValue: ResourceOptionValue = {
9999
id: OPENBLOCKS_API_ID,
100-
type: "openblocksApi",
100+
type: "lowcoderApi",
101101
};
102102

103103
interface ResourceDropdownProps {

‎client/packages/openblocks/src/comps/utils/gridCompOperator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ export class GridCompOperator {
240240
return;
241241
}
242242

243-
if (!latestVersion.openblocks?.comps?.[compInfo.compName]) {
243+
if (!latestVersion.lowcoder?.comps?.[compInfo.compName]) {
244244
message.error(trans("comp.compNotFoundInLatestVersion"));
245245
return;
246246
}

‎client/packages/openblocks/src/constants/datasourceConstants.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export const QUICK_REST_API_ID = "#QUICK_REST_API";
4444
export const QUICK_GRAPHQL_ID = "#QUICK_GRAPHQL";
4545
export const OPENBLOCKS_API_ID = "#OPENBLOCKS_API";
4646
export const OPENBLOCKS_API_INFO = {
47-
icon: getBottomResIcon("openblocksApi"),
48-
name: trans("query.openblocksAPI"),
47+
icon: getBottomResIcon("lowcoderApi"),
48+
name: trans("query.lowcoderAPI"),
4949
};
5050
export const OLD_OPENBLOCKS_DATASOURCE: Partial<DatasourceType>[] = [];

‎client/packages/openblocks/src/constants/queryConstants.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export type DatasourceType =
1919
| "mongodb"
2020
| "restApi"
2121
| "postgres"
22-
| "openblocksApi"
22+
| "lowcoderApi"
2323
| "redis"
2424
| "es"
2525
| "mssql"
@@ -39,7 +39,7 @@ export const QueryMap = {
3939
restApi: HttpQuery,
4040
mongodb: MongoQuery,
4141
postgres: SQLQuery,
42-
openblocksApi: OpenBlocksQuery,
42+
lowcoderApi: OpenBlocksQuery,
4343
redis: RedisQuery,
4444
es: EsQuery,
4545
mssql: SQLQuery,

‎client/packages/openblocks/src/i18n/locales/en.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ export const en = {
409409
transformer: "Transformer",
410410
quickRestAPI: "REST Query",
411411
quickGraphql: "GraphQL Query",
412-
openblocksAPI: "Openblocks API",
412+
lowcoderAPI: "Openblocks API",
413413
executeJSCode: "Run JavaScript Code",
414414
importFromQueryLibrary: "Import from Query Library",
415415
importFromFile: "Import from File",

‎client/packages/openblocks/src/pages/editor/right/PluginPanel/PluginItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export function PluginItem(props: PluginViewProps) {
6262
);
6363
const currentVersion = useSelector((state: AppState) => state.npmPlugin.packageVersion[name]);
6464
const versions = useMemo(() => packageMeta?.versions || {}, [packageMeta?.versions]);
65-
const comps = versions[currentVersion]?.openblocks?.comps || {};
65+
const comps = versions[currentVersion]?.lowcoder?.comps || {};
6666
const compNames = Object.keys(comps);
6767

6868
useEffect(() => {

‎client/packages/openblocks/src/types/remoteComp.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export interface OpenblocksMeta {
1515
export interface NpmVersionMeta {
1616
name: string;
1717
version: string;
18-
openblocks: OpenblocksMeta;
18+
lowcoder: OpenblocksMeta;
1919
}
2020

2121
export interface NpmPackageMeta {

‎client/packages/openblocks/src/util/bottomResUtils.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ export const getBottomResIcon = (
131131
return <GoogleSheetsIcon />;
132132
case "graphql":
133133
return <GraphqlIcon />;
134-
case "openblocksApi":
134+
case "lowcoderApi":
135135
return <OpenBlocksQueryIcon />;
136136
case "snowflake":
137137
return <SnowflakeIcon />;

‎client/scripts/build.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ buildVars.forEach(({ name, defaultValue }) => {
8383
shell.env[name] = shell.env[name] ?? defaultValue;
8484
});
8585

86-
shell.exec(`BUILD_TARGET=browserCheck yarn workspace openblocks build`, { fatal: true });
87-
shell.exec(`yarn workspace openblocks build`, { fatal: true });
86+
shell.exec(`BUILD_TARGET=browserCheck yarn workspace lowcoder build`, { fatal: true });
87+
shell.exec(`yarn workspace lowcoder build`, { fatal: true });
8888

8989
if (process.env.REACT_APP_BUNDLE_BUILTIN_PLUGIN) {
9090
for (const pluginName of builtinPlugins) {

‎client/yarn.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14457,9 +14457,9 @@ __metadata:
1445714457
languageName: unknown
1445814458
linkType: soft
1445914459

14460-
"openblocks@workspace:packages/lowcoder":
14460+
"lowcoder@workspace:packages/lowcoder":
1446114461
version: 0.0.0-use.local
14462-
resolution: "openblocks@workspace:packages/lowcoder"
14462+
resolution: "lowcoder@workspace:packages/lowcoder"
1446314463
dependencies:
1446414464
"@ant-design/icons": ^4.7.0
1446514465
"@ant-design/pro-form": ^1.52.9

0 commit comments

Comments
 (0)