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

Skip to content

Commit 2f5a085

Browse files
committed
refactor: rename Openblocks to Lowcoder
1 parent c1a25c5 commit 2f5a085

File tree

26 files changed

+72
-72
lines changed

26 files changed

+72
-72
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="UTF-8" />
55
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>Openblocks Comp Playground</title>
7+
<title>Lowcoder Comp Playground</title>
88
<style>
99
#root {
1010
height: 100vh;

‎client/packages/openblocks-cli/config/vite.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default defineConfig({
2020
define: {
2121
...define,
2222
"process.env.NODE_ENV": JSON.stringify(process.env.NODE_ENV || "development"),
23-
__OPENBLOCKS_DEV__: JSON.stringify({}),
23+
__LOWCODER_ORG__: JSON.stringify({}),
2424
},
2525
assetsInclude: ["**/*.md"],
2626
resolve: {

‎client/packages/openblocks-cli/global.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
declare global {
22
interface Window {
33
printPerf: () => void;
4-
__OPENBLOCKS_DEV__?: {};
4+
__LOWCODER_ORG__?: {};
55
}
66
}
77

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="UTF-8" />
55
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>Openblocks Comp Playground</title>
7+
<title>Lowcoder Comp Playground</title>
88
<style>
99
#root {
1010
height: 100vh;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@
3434
"import": "./lib/index.js",
3535
"require": "./lib/index.cjs"
3636
},
37-
"author": "Openblocks"
37+
"author": "Lowcoder"
3838
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.0.5",
44
"license": "MIT",
55
"type": "module",
6-
"description": "Openblocks dev utils for lowcoder build process and lowcoder-cli",
6+
"description": "Lowcoder dev utils for lowcoder build process and lowcoder-cli",
77
"keywords": [
88
"lowcoder"
99
]

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="UTF-8" />
55
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>Openblocks Comp Playground</title>
7+
<title>Lowcoder Comp Playground</title>
88
<style>
99
#root {
1010
height: 100vh;

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ import "lowcoder-sdk/dist/style.css";
2929
### For react app:
3030

3131
```ts
32-
import { OpenblocksAppView } from "lowcoder-sdk";
32+
import { LowcoderAppView } from "lowcoder-sdk";
3333

34-
<OpenblocksAppView appId="{YOUR_APPLICATION_ID}" />;
34+
<LowcoderAppView appId="{YOUR_APPLICATION_ID}" />;
3535
```
3636

37-
#### OpenblocksViewProps
37+
#### LowcoderViewProps
3838

3939
| Name | Type | Description | Default value |
4040
|------------------------|-----------------------------|-----------------------------------------------------------------------------------------|---------------|
@@ -47,13 +47,13 @@ import { OpenblocksAppView } from "lowcoder-sdk";
4747

4848
```tsx
4949
import { useRef } from "ref";
50-
import { OpenblocksAppView } from "lowcoder-sdk";
50+
import { LowcoderAppView } from "lowcoder-sdk";
5151

5252
function MyExistingAppPage() {
5353
const appRef = useRef();
5454
return (
5555
<div>
56-
<OpenblocksAppView appId={YOUR_APPLICATION_ID} ref={appRef} />;
56+
<LowcoderAppView appId={YOUR_APPLICATION_ID} ref={appRef} />;
5757
<button onClick={() => appRef.current?.invokeMethod("some-method-name")}>
5858
Invoke method
5959
</button>

‎client/packages/openblocks-sdk/index.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export interface AppViewInstanceOptions<I = any> {
1818
baseUrl?: string;
1919
}
2020

21-
export interface OpenblocksAppViewProps<I, O> extends AppViewInstanceOptions<I> {
21+
export interface LowcoderAppViewProps<I, O> extends AppViewInstanceOptions<I> {
2222
appId: string;
2323
className?: string;
2424
onModuleOutputChange?: OutputChangeHandler<O>;
@@ -31,8 +31,8 @@ export interface AppViewInstance<I, O> {
3131
invokeMethod(methodName: string, params?: any[]): void;
3232
}
3333

34-
export declare const OpenblocksAppView: React.ForwardRefExoticComponent<
35-
OpenblocksAppViewProps<unknown, unknown> &
34+
export declare const LowcoderAppView: React.ForwardRefExoticComponent<
35+
LowcoderAppViewProps<unknown, unknown> &
3636
React.RefAttributes<AppViewInstance<unknown, unknown> | undefined>
3737
>;
3838

‎client/packages/openblocks-sdk/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="UTF-8" />
55
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>Openblocks SDK</title>
7+
<title>Lowcoder SDK</title>
88
<style>
99
.demo-title {
1010
text-align: center;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useRef } from "react";
22
import ReactDOM, { flushSync } from "react-dom";
3-
import { AppViewInstance, bootstrapAppAt, OpenblocksAppView } from "./src/index";
3+
import { AppViewInstance, bootstrapAppAt, LowcoderAppView } from "./src/index";
44

55
const url = new URL(location.href);
66
const appId = url.searchParams.get("appId");
@@ -13,7 +13,7 @@ function ReactDemoApp() {
1313
}
1414
return (
1515
<div>
16-
<OpenblocksAppView
16+
<LowcoderAppView
1717
ref={ref}
1818
appId={appId}
1919
baseUrl={baseUrl}

‎client/packages/openblocks-sdk/vite.config.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const viteConfig: UserConfig = {
3333
lib: {
3434
formats: ["es"],
3535
entry: "./src/index.ts",
36-
name: "Openblocks",
36+
name: "Lowcoder",
3737
fileName: "lowcoder-sdk",
3838
},
3939
rollupOptions: {

‎client/packages/openblocks/src/appView/AppView.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ import { ExternalEditorContext } from "util/context/ExternalEditorContext";
1010

1111
const browserHistory = createBrowserHistory();
1212

13-
export interface OpenblocksAppBootStrapOptions {
13+
export interface LowcoderAppBootStrapOptions {
1414
/**
1515
* where to load application dsl and static assets
1616
*/
1717
baseUrl?: string;
1818
}
1919

20-
export interface OpenblocksAppViewProps
20+
export interface LowcoderAppViewProps
2121
extends HTMLAttributes<HTMLDivElement>,
22-
OpenblocksAppBootStrapOptions {
22+
LowcoderAppBootStrapOptions {
2323
appId: string;
2424
}
2525

‎client/packages/openblocks/src/appView/OpenblocksAppView.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ import {
77
} from "./AppViewInstance";
88
import { bootstrapAppAt } from "./bootstrapAt";
99

10-
export interface OpenblocksAppViewProps<I, O> extends AppViewInstanceOptions<I> {
10+
export interface LowcoderAppViewProps<I, O> extends AppViewInstanceOptions<I> {
1111
appId: string;
1212
className?: string;
1313
onModuleOutputChange?: OutputChangeHandler<O>;
1414
onModuleEventTriggered?: EventTriggerHandler;
1515
}
1616

17-
function OpenblocksAppViewBase<I = any, O = any>(
18-
props: OpenblocksAppViewProps<I, O>,
17+
function LowcoderAppViewBase<I = any, O = any>(
18+
props: LowcoderAppViewProps<I, O>,
1919
ref: React.Ref<AppViewInstance | undefined>
2020
) {
2121
const { appId, className, onModuleEventTriggered, onModuleOutputChange, ...options } = props;
@@ -51,4 +51,4 @@ function OpenblocksAppViewBase<I = any, O = any>(
5151
return <div ref={nodeRef} className={className}></div>;
5252
}
5353

54-
export const OpenblocksAppView = React.forwardRef(OpenblocksAppViewBase);
54+
export const LowcoderAppView = React.forwardRef(LowcoderAppViewBase);

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import { PageType } from "../constants/pageConstants";
1313
import { SizeType } from "antd/lib/config-provider/SizeContext";
1414
import { Datasource } from "@lowcoder-ee/constants/datasourceConstants";
1515
import {
16-
OPENBLOCKS_API_ID,
17-
OPENBLOCKS_API_INFO,
16+
LOWCODER_API_ID,
17+
LOWCODER_API_INFO,
1818
QUICK_GRAPHQL_ID,
1919
QUICK_REST_API_ID,
2020
} from "../constants/datasourceConstants";
@@ -170,12 +170,12 @@ const ResButton = (props: {
170170
},
171171
},
172172
lowcoderApi: {
173-
icon: OPENBLOCKS_API_INFO.icon,
174-
label: OPENBLOCKS_API_INFO.name,
173+
icon: LOWCODER_API_INFO.icon,
174+
label: LOWCODER_API_INFO.name,
175175
type: BottomResTypeEnum.Query,
176176
extra: {
177177
compType: "lowcoderApi",
178-
dataSourceId: OPENBLOCKS_API_ID,
178+
dataSourceId: LOWCODER_API_ID,
179179
},
180180
},
181181
};

‎client/packages/openblocks/src/comps/controls/actionSelector/actionSelectorControl.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ function ActionSelectorControlPropertyView(props: PropertyViewProps) {
158158
lineHeight={300}
159159
value={comp.children.compType.getView()}
160160
options={ActionOptions.filter((i) => {
161-
if (window.__OPENBLOCKS_DEV__) {
161+
if (window.__LOWCODER_ORG__) {
162162
return devActions.includes(i.value);
163163
}
164164
if (editorState?.isModule()) {

‎client/packages/openblocks/src/comps/controls/eventHandlerControl.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ const EventHandlerControlPropertyView = (props: {
155155
const messageHandler = {
156156
compType: "message",
157157
};
158-
const isInDevIde = !!window.__OPENBLOCKS_DEV__;
158+
const isInDevIde = !!window.__LOWCODER_ORG__;
159159
const newHandler = {
160160
name: eventConfigs[0].value,
161161
handler: isInDevIde ? messageHandler : queryExecHandler,

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { OLD_OPENBLOCKS_DATASOURCE } from "@lowcoder-ee/constants/datasourceConstants";
1+
import { OLD_LOWCODER_DATASOURCE } from "@lowcoder-ee/constants/datasourceConstants";
22
import { manualTriggerResource, ResourceType } from "@lowcoder-ee/constants/queryConstants";
33
import { PreparedStatementConfig } from "api/datasourceApi";
44
import { isCompWithPropertyView } from "comps/utils/propertyUtils";
55
import {
6-
OPENBLOCKS_API_ID,
6+
LOWCODER_API_ID,
77
QUICK_GRAPHQL_ID,
88
QUICK_REST_API_ID,
99
} from "constants/datasourceConstants";
@@ -175,22 +175,22 @@ export const QueryGeneralPropertyView = (props: {
175175
comp.children.datasourceId.dispatchChangeValueAction(QUICK_REST_API_ID);
176176
}
177177

178-
// transfer old Openblocks API datasource to new
179-
const oldOpenblocksId = useMemo(
178+
// transfer old Lowcoder API datasource to new
179+
const oldLowcoderId = useMemo(
180180
() =>
181181
datasource.find(
182182
(d) =>
183-
d.datasource.creationSource === 2 && OLD_OPENBLOCKS_DATASOURCE.includes(d.datasource.type)
183+
d.datasource.creationSource === 2 && OLD_LOWCODER_DATASOURCE.includes(d.datasource.type)
184184
)?.datasource.id,
185185
[datasource]
186186
);
187-
if (datasourceId === oldOpenblocksId) {
188-
datasourceId = OPENBLOCKS_API_ID;
187+
if (datasourceId === oldLowcoderId) {
188+
datasourceId = LOWCODER_API_ID;
189189
datasourceType = "lowcoderApi";
190190
dispatch(
191191
comp.changeValueAction({
192192
...comp.toJsonValue(),
193-
datasourceId: OPENBLOCKS_API_ID,
193+
datasourceId: LOWCODER_API_ID,
194194
compType: "lowcoderApi",
195195
} as any)
196196
);
@@ -366,7 +366,7 @@ function useDatasourceStatus(datasourceId: string, datasourceType: ResourceType)
366366
datasourceType === "libraryQuery" ||
367367
datasourceId === QUICK_REST_API_ID ||
368368
datasourceId === QUICK_GRAPHQL_ID ||
369-
datasourceId === OPENBLOCKS_API_ID
369+
datasourceId === LOWCODER_API_ID
370370
) {
371371
return "";
372372
}

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import { getBottomResIcon } from "@lowcoder-ee/util/bottomResUtils";
1212
import { trans } from "i18n";
1313
import { DatasourceType, ResourceType } from "@lowcoder-ee/constants/queryConstants";
1414
import {
15-
OPENBLOCKS_API_ID,
16-
OPENBLOCKS_API_INFO,
15+
LOWCODER_API_ID,
16+
LOWCODER_API_INFO,
1717
QUICK_GRAPHQL_ID,
1818
QUICK_REST_API_ID,
1919
} from "constants/datasourceConstants";
@@ -95,8 +95,8 @@ const QuickGraphqlValue: ResourceOptionValue = {
9595
type: "graphql",
9696
};
9797

98-
const OpenblocksAPIValue: ResourceOptionValue = {
99-
id: OPENBLOCKS_API_ID,
98+
const LowcoderAPIValue: ResourceOptionValue = {
99+
id: LOWCODER_API_ID,
100100
type: "lowcoderApi",
101101
};
102102

@@ -267,13 +267,13 @@ export const ResourceDropdown = (props: ResourceDropdownProps) => {
267267
{context?.placement !== "queryLibrary" && (
268268
<>
269269
<SelectOption
270-
key={JSON.stringify(OpenblocksAPIValue)}
271-
label={OPENBLOCKS_API_INFO.name}
272-
value={JSON.stringify(OpenblocksAPIValue)}
270+
key={JSON.stringify(LowcoderAPIValue)}
271+
label={LOWCODER_API_INFO.name}
272+
value={JSON.stringify(LowcoderAPIValue)}
273273
>
274274
<SelectOptionContains>
275-
{OPENBLOCKS_API_INFO.icon}
276-
<SelectOptionLabel>{OPENBLOCKS_API_INFO.name} </SelectOptionLabel>
275+
{LOWCODER_API_INFO.icon}
276+
<SelectOptionLabel>{LOWCODER_API_INFO.name} </SelectOptionLabel>
277277
</SelectOptionContains>
278278
</SelectOption>
279279

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ export interface Datasource {
4242

4343
export const QUICK_REST_API_ID = "#QUICK_REST_API";
4444
export const QUICK_GRAPHQL_ID = "#QUICK_GRAPHQL";
45-
export const OPENBLOCKS_API_ID = "#OPENBLOCKS_API";
46-
export const OPENBLOCKS_API_INFO = {
45+
export const LOWCODER_API_ID = "#LOWCODER_API";
46+
export const LOWCODER_API_INFO = {
4747
icon: getBottomResIcon("lowcoderApi"),
4848
name: trans("query.lowcoderAPI"),
4949
};
50-
export const OLD_OPENBLOCKS_DATASOURCE: Partial<DatasourceType>[] = [];
50+
export const OLD_LOWCODER_DATASOURCE: Partial<DatasourceType>[] = [];

‎client/packages/openblocks/src/global.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ export {};
33
declare global {
44
interface Window {
55
printPerf: () => void;
6-
__OPENBLOCKS_DEV__?: {};
6+
__LOWCODER_ORG__?: {};
77
}
88
}

0 commit comments

Comments
 (0)