@platforma-open/milaboratories.antibody-sequence-liabilities.ui 2.0.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.html CHANGED
@@ -4,8 +4,8 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta http-equiv="Content-Security-Policy" content="script-src 'self' blob:">
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <script type="module" crossorigin src="./assets/index-D2wArqhC.js"></script>
8
- <link rel="stylesheet" crossorigin href="./assets/index-DfRnlNGM.css">
7
+ <script type="module" crossorigin src="./assets/index-BFZxW8OZ.js"></script>
8
+ <link rel="stylesheet" crossorigin href="./assets/index-CdQHukgY.css">
9
9
  </head>
10
10
  <body>
11
11
  <div id="app"></div>
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@platforma-open/milaboratories.antibody-sequence-liabilities.ui",
3
- "version": "2.0.0",
3
+ "version": "3.0.0",
4
4
  "type": "module",
5
5
  "dependencies": {
6
- "@platforma-sdk/ui-vue": "^1.29.17",
7
- "@platforma-sdk/model": "^1.29.17",
6
+ "@platforma-sdk/ui-vue": "^1.30.26",
7
+ "@platforma-sdk/model": "^1.30.26",
8
8
  "vue": "^3.5.12",
9
- "@platforma-open/milaboratories.antibody-sequence-liabilities.model": "2.0.0"
9
+ "@platforma-open/milaboratories.antibody-sequence-liabilities.model": "3.0.0"
10
10
  },
11
11
  "devDependencies": {
12
12
  "@vitejs/plugin-vue": "^5.1.4",
@@ -1,8 +1,9 @@
1
1
  <script setup lang="ts">
2
- // @ts-nocheck - Disable TypeScript checking for this file
3
- import { PlBlockPage, PlDropdownRef, PlAgDataTable, PlSlideModal, PlBtnGhost, PlMaskIcon24 } from '@platforma-sdk/ui-vue';
4
- import type { PlRef, PlDataTableSettings } from '@platforma-sdk/model';
2
+ import { liabilityTypes } from '@platforma-open/milaboratories.antibody-sequence-liabilities.model';
3
+ import type { PlRef } from '@platforma-sdk/model';
5
4
  import { plRefsEqual } from '@platforma-sdk/model';
5
+ import type { PlAgDataTableSettings } from '@platforma-sdk/ui-vue';
6
+ import { PlAgDataTableV2, PlBlockPage, PlBtnGhost, PlDropdownMulti, PlDropdownRef, PlMaskIcon24, PlSlideModal } from '@platforma-sdk/ui-vue';
6
7
  import { computed, ref } from 'vue';
7
8
  import { useApp } from '../app';
8
9
 
@@ -11,30 +12,34 @@ const app = useApp();
11
12
  function setInput(inputRef?: PlRef) {
12
13
  if (!inputRef) return;
13
14
  app.model.args.inputAnchor = inputRef;
14
- app.model.args.clonotypingRunId = inputRef?.blockId;
15
15
 
16
- const title = app.model.outputs.inputOptions?.find((o) => plRefsEqual(o.ref, inputRef))?.label;
17
-
18
- if ((inputRef.name.split('/')[1] == 'abundance') || (inputRef.name.split('/')[1] == 'read-count')) {
19
- app.model.args.isSingleCell = true;
20
- app.model.args.chain = undefined;
21
- } else {
22
- app.model.args.isSingleCell = false;
23
- app.model.args.chain = inputRef.name.split('/')[1];
24
- }
16
+ const label = app.model.outputs.inputOptions?.find((o) => plRefsEqual(o.ref, inputRef))?.label ?? '';
25
17
 
26
18
  // Set title to dataset label
27
- app.model.args.title = title;
19
+ app.model.ui.title = 'Antibody Sequence Liabilities - ' + label;
28
20
  }
29
21
 
30
- const tableSettings = computed<PlDataTableSettings>(() => ({
31
- sourceType: 'ptable',
32
- pTable: app.model.outputs.pt?.table,
33
- // sheets: app.model.outputs.pt?.sheets,
34
- }));
22
+ const tableSettings = computed<PlAgDataTableSettings>(() => {
23
+ const pTable = app.model.outputs.pt;
24
+ if (pTable === undefined && !app.model.outputs.isRunning) {
25
+ // special case: when block is not yet started at all (no table calculated)
26
+ return undefined;
27
+ }
28
+ return {
29
+ sourceType: 'ptable',
30
+ model: pTable,
31
+ };
32
+ });
35
33
 
36
34
  const settingsIsShown = ref(app.model.args.inputAnchor === undefined);
37
35
 
36
+ const liabilityTypesModel = computed({
37
+ get: () => (app.model.args.liabilityTypes ?? []),
38
+ set: (value) => {
39
+ app.model.args.liabilityTypes = value ?? [];
40
+ },
41
+ });
42
+
38
43
  </script>
39
44
 
40
45
  <template>
@@ -48,9 +53,7 @@ const settingsIsShown = ref(app.model.args.inputAnchor === undefined);
48
53
  </template>
49
54
  </PlBtnGhost>
50
55
  </template>
51
- <PlAgDataTable v-model="app.model.ui.tableState" :settings="tableSettings" show-export-button />
52
-
53
- {{ app.model.args.isSingleCell }}
56
+ <PlAgDataTableV2 v-model="app.model.ui.tableState" :settings="tableSettings" show-export-button />
54
57
  </PlBlockPage>
55
58
 
56
59
  <PlSlideModal v-model="settingsIsShown">
@@ -63,6 +66,10 @@ const settingsIsShown = ref(app.model.args.inputAnchor === undefined);
63
66
  required
64
67
  @update:model-value="setInput"
65
68
  />
66
-
69
+ <PlDropdownMulti v-model="liabilityTypesModel" label="Liability types" :options="liabilityTypes" >
70
+ <template #tooltip>
71
+ Select the liability types to include in the analysis.
72
+ </template>
73
+ </PlDropdownMulti>
67
74
  </PlSlideModal>
68
75
  </template>