Skip to content

Commit da597a1

Browse files
authored
feat(wes): create Lit package for WES (#149)
1 parent c4e8acb commit da597a1

File tree

24 files changed

+1426
-20
lines changed

24 files changed

+1426
-20
lines changed

apps/documentation/docs/.vitepress/config.mts

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export default defineConfig({
5959
{ text: 'Usage', link: '/wes/usage' },
6060
{
6161
text: 'Components',
62-
items: [],
62+
items: [{ text: 'Create Run', link: '/wes/components/wes-create-run.md' }],
6363
},
6464
],
6565
},
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# Form Component <Badge type="warning" text="beta" />
2+
3+
<div class="component-name">&lt;ecc-client-lit-ga4gh-wes-create-run&gt;</div>
4+
This component is used to create workflows runs using WES API.
5+
<ClientOnly>
6+
<div :class="isDark ? 'component-dark component' : 'component-light component'">
7+
<ecc-client-lit-ga4gh-wes-create-run />
8+
9+
::: details Code Blocks
10+
::: code-group
11+
12+
```js [HTML]
13+
import "@elixir-cloud/lit-wes";
14+
15+
<ecc-utils-design-form />;
16+
```
17+
18+
<!-- ```jsx [React]
19+
20+
``` -->
21+
22+
:::
23+
24+
</div>
25+
</ClientOnly>
26+
27+
## Importing
28+
29+
```js [HTML]
30+
import "@elixir-cloud/lit-wes";
31+
```
32+
33+
## Properties
34+
35+
| Property | Required | Default | Type | Description |
36+
| --------------------- | -------- | ----------------------------------------- | -------- | ----------- |
37+
| [`baseURL`](#baseURL) | `false` | `https://prowes.rahtiapp.fi/ga4gh/wes/v1` | `String` | Base URL |
38+
39+
### baseURL
40+
41+
This property is used to give `POST` endpoint to create workflow. The provided baseURL is concatinated with `/runs` and is used as an endpoint to create a `POST` request.
42+
43+
## Parts
44+
45+
TODO:
46+
47+
<!-- | Part Name | Description |
48+
| --------------- | --------------------------------------------------------------------------------- |
49+
| `` | Component's internal form. | -->
50+
51+
## CSS Variables
52+
53+
## Examples
54+
55+
### With baseURL
56+
57+
<ClientOnly>
58+
<div :class="isDark ? 'component-dark component' : 'component-light component'">
59+
<!-- Render ecc-utils-design-form component only after the component is loaded -->
60+
<ecc-client-lit-ga4gh-wes-create-run
61+
baseURL="http://localhost:8090/ga4gh/wes/v1"
62+
/>
63+
64+
::: details Code Blocks
65+
::: code-group
66+
67+
```js [HTML]
68+
import "@elixir-cloud/lit-wes";
69+
70+
<ecc-client-lit-ga4gh-wes-create-run baseURL="http://localhost:8090/ga4gh/wes/v1" />;
71+
```
72+
73+
<!-- ```jsx [React]
74+
75+
``` -->
76+
77+
:::
78+
79+
</div>
80+
</ClientOnly>
81+
82+
> The baseURL provided is localhost:8090, for this to work, have a WES implementation running on PORT 8090 or locally deploy [proWES](https://github.com/elixir-cloud-aai/proWES).
83+
84+
<script setup>
85+
import { onMounted } from "vue";
86+
import { useData } from "vitepress";
87+
const { isDark } = useData();
88+
onMounted(() => {
89+
import("@elixir-cloud/lit-wes").then((module) => {
90+
renderComponent.value = false;
91+
renderComponent.value = true;
92+
document.querySelectorAll("ecc-client-lit-ga4gh-wes-create-run").forEach((element) => {
93+
element.addEventListener("form-submit", (e) => {
94+
console.log("form-submitted", e.detail);
95+
});
96+
});
97+
});
98+
});
99+
</script>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<!-- # Installation
2+
3+
`@elixir-cloud/wes` can be installed using npm as
4+
5+
```bash
6+
npm install @elixir-cloud/lit-wes
7+
``` -->
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Introduction
2+
3+
`@elixir-cloud/wes` package provides a collection of Web Components for interacting with [WES (Workflow Execution Service)](https://github.com/ga4gh/workflow-execution-service-schemas/blob/develop/openapi/workflow_execution_service.openapi.yaml). It offers functionalities for listing, creating, and deleting task runs. These components facilitate seamless integration and enhanced user experience when working with WES.

apps/documentation/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
},
1111
"dependencies": {
1212
"@elixir-cloud/design": "*",
13+
"@elixir-cloud/lit-wes": "*",
1314
"vitepress": "^1.0.0-rc.24",
1415
"vue": "3.3.5"
1516
},

0 commit comments

Comments
 (0)