@platforma-open/milaboratories.antibody-sequence-liabilities.ui 2.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.
@@ -0,0 +1,13 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta http-equiv="Content-Security-Policy" content="script-src 'self' blob:">
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">
9
+ </head>
10
+ <body>
11
+ <div id="app"></div>
12
+ </body>
13
+ </html>
@@ -0,0 +1,4 @@
1
+ import { ui } from '@platforma-sdk/eslint-config';
2
+
3
+ /** @type {import('eslint').Linter.Config[]} */
4
+ export default [...ui];
package/index.html ADDED
@@ -0,0 +1,12 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta http-equiv="Content-Security-Policy" content="script-src 'self' blob:">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ </head>
8
+ <body>
9
+ <div id="app"></div>
10
+ <script type="module" src="/src/main.ts"></script>
11
+ </body>
12
+ </html>
package/package.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "@platforma-open/milaboratories.antibody-sequence-liabilities.ui",
3
+ "version": "2.0.0",
4
+ "type": "module",
5
+ "dependencies": {
6
+ "@platforma-sdk/ui-vue": "^1.29.17",
7
+ "@platforma-sdk/model": "^1.29.17",
8
+ "vue": "^3.5.12",
9
+ "@platforma-open/milaboratories.antibody-sequence-liabilities.model": "2.0.0"
10
+ },
11
+ "devDependencies": {
12
+ "@vitejs/plugin-vue": "^5.1.4",
13
+ "typescript": "~5.5.4",
14
+ "vite": "^5.4.11",
15
+ "vue-tsc": "^2.1.6",
16
+ "@platforma-sdk/eslint-config": "^1.0.3"
17
+ },
18
+ "scripts": {
19
+ "dev": "vite",
20
+ "watch": "vue-tsc && vite build --watch",
21
+ "build": "vue-tsc -b && vite build",
22
+ "lint": "eslint .",
23
+ "preview": "vite preview"
24
+ }
25
+ }
package/src/app.ts ADDED
@@ -0,0 +1,13 @@
1
+ import { model } from '@platforma-open/milaboratories.antibody-sequence-liabilities.model';
2
+ import { defineApp } from '@platforma-sdk/ui-vue';
3
+ import MainPage from './pages/MainPage.vue';
4
+
5
+ export const sdkPlugin = defineApp(model, () => {
6
+ return {
7
+ routes: {
8
+ '/': () => MainPage,
9
+ },
10
+ };
11
+ });
12
+
13
+ export const useApp = sdkPlugin.useApp;
package/src/main.ts ADDED
@@ -0,0 +1,6 @@
1
+ import { BlockLayout } from '@platforma-sdk/ui-vue';
2
+ import '@platforma-sdk/ui-vue/styles';
3
+ import { createApp } from 'vue';
4
+ import { sdkPlugin } from './app';
5
+
6
+ createApp(BlockLayout).use(sdkPlugin).mount('#app');
@@ -0,0 +1,68 @@
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';
5
+ import { plRefsEqual } from '@platforma-sdk/model';
6
+ import { computed, ref } from 'vue';
7
+ import { useApp } from '../app';
8
+
9
+ const app = useApp();
10
+
11
+ function setInput(inputRef?: PlRef) {
12
+ if (!inputRef) return;
13
+ app.model.args.inputAnchor = inputRef;
14
+ app.model.args.clonotypingRunId = inputRef?.blockId;
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
+ }
25
+
26
+ // Set title to dataset label
27
+ app.model.args.title = title;
28
+ }
29
+
30
+ const tableSettings = computed<PlDataTableSettings>(() => ({
31
+ sourceType: 'ptable',
32
+ pTable: app.model.outputs.pt?.table,
33
+ // sheets: app.model.outputs.pt?.sheets,
34
+ }));
35
+
36
+ const settingsIsShown = ref(app.model.args.inputAnchor === undefined);
37
+
38
+ </script>
39
+
40
+ <template>
41
+ <PlBlockPage>
42
+ <template #title> Antibody sequence liabilities </template>
43
+ <template #append>
44
+ <PlBtnGhost @click.stop="settingsIsShown = true">
45
+ Settings
46
+ <template #append>
47
+ <PlMaskIcon24 name="settings" />
48
+ </template>
49
+ </PlBtnGhost>
50
+ </template>
51
+ <PlAgDataTable v-model="app.model.ui.tableState" :settings="tableSettings" show-export-button />
52
+
53
+ {{ app.model.args.isSingleCell }}
54
+ </PlBlockPage>
55
+
56
+ <PlSlideModal v-model="settingsIsShown">
57
+ <template #title>Settings</template>
58
+
59
+ <PlDropdownRef
60
+ v-model="app.model.args.inputAnchor"
61
+ :options="app.model.outputs.inputOptions ?? []"
62
+ label="Select dataset"
63
+ required
64
+ @update:model-value="setInput"
65
+ />
66
+
67
+ </PlSlideModal>
68
+ </template>
@@ -0,0 +1,26 @@
1
+ {
2
+ "compilerOptions": {
3
+ "composite": false,
4
+ "target": "ES2020",
5
+ "useDefineForClassFields": true,
6
+ "module": "ESNext",
7
+ "lib": ["ES2020", "DOM", "DOM.Iterable"],
8
+ "skipLibCheck": true,
9
+
10
+ /* Bundler mode */
11
+ "moduleResolution": "bundler",
12
+ "allowImportingTsExtensions": true,
13
+ "resolveJsonModule": true,
14
+ "isolatedModules": true,
15
+ "moduleDetection": "force",
16
+ "noEmit": true,
17
+ "jsx": "preserve",
18
+
19
+ /* Linting */
20
+ "strict": true,
21
+ // "noUnusedLocals": true,
22
+ // "noUnusedParameters": true,
23
+ "noFallthroughCasesInSwitch": true
24
+ },
25
+ "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"]
26
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "files": [],
3
+ "references": [
4
+ {
5
+ "path": "./tsconfig.app.json"
6
+ },
7
+ {
8
+ "path": "./tsconfig.node.json"
9
+ }
10
+ ]
11
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "compilerOptions": {
3
+ "composite": false,
4
+ "skipLibCheck": true,
5
+ "module": "ESNext",
6
+ "moduleResolution": "bundler",
7
+ "allowSyntheticDefaultImports": true,
8
+ "strict": true,
9
+ "noEmit": true
10
+ },
11
+ "include": ["vite.config.ts"]
12
+ }
package/vite.config.ts ADDED
@@ -0,0 +1,11 @@
1
+ import { defineConfig } from 'vite';
2
+ import vue from '@vitejs/plugin-vue';
3
+
4
+ // https://vitejs.dev/config/
5
+ export default defineConfig({
6
+ plugins: [vue()],
7
+ base: './',
8
+ build: {
9
+ sourcemap: true,
10
+ },
11
+ });