2.4.4 • Published 1 year ago

lowcoder-sdk v2.4.4

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

lowcoder-sdk

Usage

yarn:

yarn add lowcoder-sdk

npm:

npm install lowcoder-sdk

Integrate Lowcoder's app/module into existing app page

  1. Publish your app/module in Lowcoder.
  2. Set the app/module's access privilege as public.
  3. Add code in your existing app as below.

Import style

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

For react app:

import { LowcoderAppView } from "lowcoder-sdk";

<LowcoderAppView appId="{YOUR_APPLICATION_ID}" />;

LowcoderViewProps

NameTypeDescriptionDefault value
appIdstringThe app's id in Lowcoder. Required!--
baseUrlstringLowcoder's api base url--
onModuleEventTriggered(eventName: string) => voidTriggered when module's custom event is triggered. Works only when the app is a module.--
onModuleOutputChange(output: any) => voidTriggered when module's outputs change. Works only when the app is a module.--

Invoke module methods

import { useRef } from "ref";
import { LowcoderAppView } from "lowcoder-sdk";

function MyExistingAppPage() {
  const appRef = useRef();
  return (
    <div>
      <LowcoderAppView appId={YOUR_APPLICATION_ID} ref={appRef} />;
      <button onClick={() => appRef.current?.invokeMethod("some-method-name")}>
        Invoke method
      </button>
    </div>
  );
}

For vanilla js:

import { bootstrapAppAt } from "lowcoder-sdk";

const node = document.querySelector("#my-app");

async function bootstrap() {
  const instance = await bootstrapAppAt(YOUR_APPLICATION_ID, node);

  // set module inputs
  instance.setModuleInputs({ input1: "xxx", input2: "xxx" });

  // invoke module methods
  instance.setModuleInputs({ input1: "xxx", input2: "xxx" });

  // listen module event trigger
  instance.on("moduleEventTriggered", (eventName) => {
    console.info("event triggered:", eventName);
  });

  // listen module output change
  instance.on("moduleOutputChange", (data) => {
    console.info("output data:", data);
  });
}
@everything-registry/sub-chunk-2104lowcoder-comp-geo-dev-devtarayicitest-lowcoder-hello-world-pluginlowcoder-comp-qrcode-scanappgflowcoder-comp-qrcode-scanapphtlowcoder-comp-qrcode-scanappnbyusuf-comp-qrcode-scanappmeenam-comp-gantt-chartmeenams-comp-gantt-chartmeenams-comp-kanbanmeenams-kanban-2meenams-kanban-3meenams-kanban-4meenams-kanban-5meenams-kanban-6meenams-kanban-7meenams-kanban-s1meenams-kanban-s2meenams-kanban-s3meenams-kanban-updated-component-kanbanmeenams-kanban-updated-component-kanban-1meenams-kanban-updated-component-kanban-2meenams-kanban-updated-component-kanban-3meenams-kanban-updated-component-kanban-4meenams-kanban-updated-component-kanban-5raheel-compsraheel-excalidraw@ledangtruongdat/primereact-lowcoder-componentsgrid-plugin-demohubs-custom-htmlhubs-lowcoder-pluginhubserviceslowcoder-candlestick-chartlowcoder-cli-template-typescriptlowcoder-comp-agora-meetinglowcoder-comp-bpmn-iolowcoder-comp-cf-turnstilelowcoder-comp-derivcharts-pluginlowcoder-comp-excalidrawlowcoder-comp-gant-chartlowcoder-comp-gantt-chartlowcoder-comp-stone-parcel-inputlowcoder-compslowcoder-comp-geolowcoder-comp-geo-devlowcoder-comp-hillchartslowcoder-comp-infinite-listlowcoder-comp-kanbanlowcoder-comp-qrcode-scanapplowcoder-comp-qrcode-scanapptestlowcoder-comp-reactpivottablelowcoder-excel-chartlowcoder-formilylowcoder-formily-formmeenams-comp-excalidraw@vietdanh1899/bvh-lowcoder-plugin@vietdanh1899/lowcoder-comps@vuminhduc52/custom-plugin1@vuminhduc52/my-pluginalis-kanbanalis-kanban2alis-kanban3alis-kanban4alis-kanban5alis-kanban6alis-kanban7alis-kanban8ali-comp-gantt-chartali-comp-gantt-chart1ali-comp-gantt-chart2cloudladder-ui-comp-demo
2.6.1

5 months ago

2.6.0

5 months ago

2.6.3

5 months ago

2.6.2

5 months ago

2.5.5

5 months ago

2.4.17

7 months ago

2.5.2

6 months ago

2.5.1

7 months ago

2.5.4

5 months ago

2.4.16

8 months ago

2.5.3

6 months ago

2.4.15

8 months ago

2.6.5

4 months ago

2.6.4

4 months ago

2.4.14

9 months ago

2.4.13

10 months ago

2.4.12

10 months ago

2.4.5

12 months ago

2.4.4

1 year ago

2.4.10

11 months ago

2.4.11

11 months ago

2.4.7

12 months ago

2.4.6

12 months ago

2.4.8

12 months ago

2.4.3

1 year ago

2.4.2

1 year ago

2.4.1

1 year ago

2.4.0

1 year ago

2.4.0-beta-5

1 year ago

2.4.0-beta-3

1 year ago

2.4.0-beta-4

1 year ago

2.4.0-beta-2

1 year ago

2.4.0-beta-1

1 year ago

2.4.0-beta

1 year ago

2.3.2

1 year ago

2.3.4

1 year ago

2.3.3

1 year ago

2.3.1

1 year ago

2.3.0

1 year ago

2.1.11

1 year ago

2.1.10

2 years ago

2.1.9

2 years ago

2.1.6

2 years ago

2.1.7

2 years ago

2.1.2

2 years ago

2.1.1

2 years ago

2.1.4

2 years ago

2.1.3

2 years ago

2.1.5

2 years ago

2.1.0

2 years ago

0.0.41

2 years ago

0.0.40

2 years ago