Skip to content

Commit 2e603d7

Browse files
salihudicksonSalihu Baba-saliu
andauthored
fix: improve ts support (#378)
Co-authored-by: Salihu Baba-saliu <salihubaba-saliu@Salihus-MacBook-Pro.local> Co-authored-by: Salihu <salihudickson@gmail.com>
1 parent a664ba5 commit 2e603d7

4 files changed

Lines changed: 30 additions & 17 deletions

File tree

packages/ecc-client-ga4gh-tes/src/components/create-run/create-run.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ export interface postTaskForm {
5757
* @summary This component is used to create task runs using TES API.
5858
* @since 1.0.0
5959
*
60-
* @property {string} baseURL - Base URL
60+
* @property {string} baseURL - Base URL of the TES instance/gateway
6161
*
6262
*/
6363

6464
export default class ECCCLientGa4ghTesCreateRun extends LitElement {
65-
@property({ type: String }) private baseURL =
65+
@property({ type: String, reflect: true }) baseURL =
6666
"https://protes.rahtiapp.fi/ga4gh/tes/v1";
6767

6868
@state() form: postTaskForm = {

packages/ecc-client-ga4gh-tes/src/components/runs/runs.ts

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,18 @@ import EccUtilsDesignDetails, {
1212
} from "@elixir-cloud/design/dist/components/details";
1313
import { deleteTask, fetchTask, fetchTasks } from "../../API/Task/tesGet.js";
1414

15+
/**
16+
* @summary This component is used to display data from task runs using TES API.
17+
* @since 1.0.0
18+
*
19+
* @property {number} pageSize - Number of runs per page
20+
* @property {string} baseUrl - Base URL of the TES instance/gateway
21+
* @property {boolean} filter - Determines if the runs filter field should be rendered
22+
* @property {boolean} search - Determines if the search field should be rendered
23+
* @property {array} fields - Configuration for what fields to display
24+
* @property {boolean} extendFields - Extend default fields instead of overriding
25+
*
26+
*/
1527
export default class ECCClientGa4ghTesRuns extends LitElement {
1628
static styles = css``;
1729
static defaultFields: Field[] = [
@@ -141,14 +153,14 @@ export default class ECCClientGa4ghTesRuns extends LitElement {
141153
},
142154
];
143155

144-
@property({ type: Number }) private pageSize = 5;
145-
@property({ type: String }) private baseURL =
156+
@property({ type: Number, reflect: true }) pageSize = 5;
157+
@property({ type: String, reflect: true }) baseURL =
146158
"https://protes.rahtiapp.fi/ga4gh/tes/v1";
147159

148-
@property({ type: Boolean }) private filter = true;
149-
@property({ type: Boolean }) private search = true;
150-
@property({ type: Array }) private fields: Field[] = [];
151-
@property({ type: Boolean }) private extendFields = false;
160+
@property({ type: Boolean, reflect: true }) filter = true;
161+
@property({ type: Boolean, reflect: true }) search = true;
162+
@property({ type: Array, reflect: true }) fields: Field[] = [];
163+
@property({ type: Boolean, reflect: true }) extendFields = false;
152164

153165
@state() private filters: FilterProp[] = [
154166
{

packages/ecc-client-ga4gh-wes/src/components/create-run/create-run.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ import { postWorkflow } from "../../API/Workflow/wesGet.js";
1010
* @summary This component is used to create task runs using WES API.
1111
* @since 1.0.0
1212
*
13-
* @property {string} baseURL - Base URL
13+
* @property {string} baseURL - Base URL of the WES instance/gateway
1414
*
1515
*/
1616

1717
export default class ECCClientGa4ghWesCreateRuns extends LitElement {
1818
@state() private form: FormData = new FormData();
19-
@property({ type: String }) private baseURL =
19+
@property({ type: String, reflect: true }) baseURL =
2020
"https://prowes.rahtiapp.fi/ga4gh/wes/v1";
2121

2222
@state() fields: Field[] = [

packages/ecc-client-ga4gh-wes/src/components/runs/runs.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@ import {
2020
* @summary This component facilitates browsing workflow runs via WES API.
2121
* @since 1.0.0
2222
*
23-
* @property {string} baseURL - Base URL
23+
* @property {string} baseURL - Base URL of the WES instance/gateway
2424
* @property {number} pageSize - Number of runs per page
25-
* @property {array} fields - Configuration based on which data will be rendered in groups
26-
* @property {boolean} filter - Defines the rendering of the filter-by-state bar.
25+
* @property {array} fields - Configuration for what fields to display
26+
* @property {boolean} filter - Determines if the runs filter field should be rendered
27+
* @property {boolean} extendFields - Extend default fields instead of overriding
2728
*
2829
*/
2930

@@ -158,12 +159,12 @@ export default class ECCClientGa4ghWesRuns extends LitElement {
158159
},
159160
];
160161

161-
@property({ type: Number }) private pageSize = 5;
162-
@property({ type: String }) private baseURL =
162+
@property({ type: Number, reflect: true }) pageSize = 5;
163+
@property({ type: String, reflect: true }) baseURL =
163164
"https://prowes.rahtiapp.fi/ga4gh/wes/v1";
164165

165-
@property({ type: Array }) private fields: Field[] = [];
166-
@property({ type: Boolean }) private extendFields = false;
166+
@property({ type: Array, reflect: true }) fields: Field[] = [];
167+
@property({ type: Boolean, reflect: true }) extendFields = false;
167168

168169
@state() private filters: FilterProp[] = [
169170
{

0 commit comments

Comments
 (0)