@platforma-sdk/ui-vue 1.42.4 → 1.42.5
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/.turbo/turbo-build.log +10 -10
- package/.turbo/turbo-type-check.log +1 -1
- package/CHANGELOG.md +6 -0
- package/dist/components/PlMultiSequenceAlignment/MultiSequenceAlignmentView.vue.d.ts.map +1 -1
- package/dist/components/PlMultiSequenceAlignment/MultiSequenceAlignmentView.vue2.js +37 -29
- package/dist/components/PlMultiSequenceAlignment/MultiSequenceAlignmentView.vue2.js.map +1 -1
- package/dist/components/PlMultiSequenceAlignment/MultiSequenceAlignmentView.vue3.js +18 -14
- package/dist/components/PlMultiSequenceAlignment/MultiSequenceAlignmentView.vue3.js.map +1 -1
- package/dist/components/PlMultiSequenceAlignment/PlMultiSequenceAlignment.vue.d.ts.map +1 -1
- package/dist/components/PlMultiSequenceAlignment/PlMultiSequenceAlignment.vue2.js +100 -98
- package/dist/components/PlMultiSequenceAlignment/PlMultiSequenceAlignment.vue2.js.map +1 -1
- package/dist/components/PlMultiSequenceAlignment/data.d.ts +1 -1
- package/dist/components/PlMultiSequenceAlignment/data.js +18 -18
- package/dist/components/PlMultiSequenceAlignment/data.js.map +1 -1
- package/package.json +6 -6
- package/src/components/PlMultiSequenceAlignment/MultiSequenceAlignmentView.vue +65 -18
- package/src/components/PlMultiSequenceAlignment/PlMultiSequenceAlignment.vue +16 -11
- package/src/components/PlMultiSequenceAlignment/data.ts +10 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platforma-sdk/ui-vue",
|
|
3
|
-
"version": "1.42.
|
|
3
|
+
"version": "1.42.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/lib.js",
|
|
6
6
|
"styles": "dist/lib.js",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"@vueuse/integrations": "^13.3.0",
|
|
26
26
|
"d3-format": "^3.1.0",
|
|
27
27
|
"zod": "~3.23.8",
|
|
28
|
+
"@milaboratories/uikit": "2.3.27",
|
|
28
29
|
"@milaboratories/biowasm-tools": "^1.1.0",
|
|
29
|
-
"@platforma-sdk/model": "~1.42.4"
|
|
30
|
-
"@milaboratories/uikit": "2.3.27"
|
|
30
|
+
"@platforma-sdk/model": "~1.42.4"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"happy-dom": "^15.11.7",
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
"yarpm": "^1.2.0",
|
|
44
44
|
"fast-json-patch": "^3.1.1",
|
|
45
45
|
"@faker-js/faker": "^9.2.0",
|
|
46
|
-
"@milaboratories/build-configs": "1.0.5",
|
|
47
|
-
"@milaboratories/helpers": "^1.6.19",
|
|
48
46
|
"@milaboratories/ts-configs": "1.0.5",
|
|
49
|
-
"@milaboratories/
|
|
47
|
+
"@milaboratories/build-configs": "1.0.5",
|
|
48
|
+
"@milaboratories/eslint-config": "^1.0.4",
|
|
49
|
+
"@milaboratories/helpers": "^1.6.19"
|
|
50
50
|
},
|
|
51
51
|
"scripts": {
|
|
52
52
|
"test": "vitest run --passWithNoTests",
|
|
@@ -36,7 +36,9 @@ const sequenceLengths = computed(() =>
|
|
|
36
36
|
<template>
|
|
37
37
|
<div ref="rootRef" :class="$style.root">
|
|
38
38
|
<div :class="['pl-scrollable', $style.table]">
|
|
39
|
-
<div :class="$style.corner"
|
|
39
|
+
<div :class="$style.corner">
|
|
40
|
+
<div :class="$style['label-scroll-indicator']" />
|
|
41
|
+
</div>
|
|
40
42
|
<div :class="$style.header">
|
|
41
43
|
<div v-if="sequenceNames.length > 1" :class="$style['sequence-names']">
|
|
42
44
|
<span
|
|
@@ -52,15 +54,17 @@ const sequenceLengths = computed(() =>
|
|
|
52
54
|
<SeqLogo v-if="widgets.includes('seqLogo')" :residue-counts />
|
|
53
55
|
</div>
|
|
54
56
|
<div :class="$style.labels">
|
|
55
|
-
<
|
|
56
|
-
<
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
57
|
+
<div :class="$style['labels-grid']">
|
|
58
|
+
<template v-for="(labelRow, rowIndex) of labelRows">
|
|
59
|
+
<div
|
|
60
|
+
v-for="(label, labelIndex) of labelRow"
|
|
61
|
+
:key="labelIndex"
|
|
62
|
+
:style="{ gridRow: rowIndex + 1 }"
|
|
63
|
+
>
|
|
64
|
+
{{ label }}
|
|
65
|
+
</div>
|
|
66
|
+
</template>
|
|
67
|
+
</div>
|
|
64
68
|
</div>
|
|
65
69
|
<div :class="$style.sequences">
|
|
66
70
|
<div
|
|
@@ -86,15 +90,25 @@ const sequenceLengths = computed(() =>
|
|
|
86
90
|
min-block-size: 0;
|
|
87
91
|
-webkit-print-color-adjust: exact;
|
|
88
92
|
print-color-adjust: exact;
|
|
93
|
+
|
|
94
|
+
&[data-pre-print] {
|
|
95
|
+
.table {
|
|
96
|
+
container-type: unset;
|
|
97
|
+
}
|
|
98
|
+
.labels {
|
|
99
|
+
max-inline-size: unset;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
89
102
|
}
|
|
90
103
|
|
|
91
104
|
.table {
|
|
105
|
+
container-type: inline-size;
|
|
92
106
|
display: grid;
|
|
93
107
|
grid-template-areas:
|
|
94
108
|
"corner header"
|
|
95
109
|
"labels sequences";
|
|
96
|
-
text-wrap: nowrap;
|
|
97
110
|
justify-content: start;
|
|
111
|
+
timeline-scope: --msa-labels-scroll;
|
|
98
112
|
@media print {
|
|
99
113
|
overflow: visible;
|
|
100
114
|
}
|
|
@@ -102,16 +116,28 @@ const sequenceLengths = computed(() =>
|
|
|
102
116
|
|
|
103
117
|
.corner {
|
|
104
118
|
grid-area: corner;
|
|
105
|
-
background-color:
|
|
119
|
+
background-color: #fff;
|
|
106
120
|
position: sticky;
|
|
107
121
|
inset-inline-start: 0;
|
|
108
122
|
inset-block-start: 0;
|
|
109
123
|
z-index: 2;
|
|
110
124
|
}
|
|
111
125
|
|
|
126
|
+
.label-scroll-indicator {
|
|
127
|
+
position: absolute;
|
|
128
|
+
inset-inline-end: 0;
|
|
129
|
+
block-size: 100cqb;
|
|
130
|
+
inline-size: 8px;
|
|
131
|
+
animation-name: hide;
|
|
132
|
+
animation-timeline: --msa-labels-scroll;
|
|
133
|
+
visibility: hidden;
|
|
134
|
+
background: #fff;
|
|
135
|
+
box-shadow: -4px 0 4px -2px rgba(0, 0, 0, 0.10);
|
|
136
|
+
}
|
|
137
|
+
|
|
112
138
|
.header {
|
|
113
139
|
grid-area: header;
|
|
114
|
-
background-color:
|
|
140
|
+
background-color: #fff;
|
|
115
141
|
position: sticky;
|
|
116
142
|
inset-block-start: 0;
|
|
117
143
|
z-index: 1;
|
|
@@ -127,16 +153,28 @@ const sequenceLengths = computed(() =>
|
|
|
127
153
|
|
|
128
154
|
.labels {
|
|
129
155
|
grid-area: labels;
|
|
130
|
-
|
|
131
|
-
grid-auto-flow: dense;
|
|
132
|
-
column-gap: 12px;
|
|
133
|
-
background-color: white;
|
|
156
|
+
background-color: #fff;
|
|
134
157
|
position: sticky;
|
|
135
158
|
inset-inline-start: 0;
|
|
136
159
|
z-index: 1;
|
|
137
|
-
|
|
160
|
+
inline-size: max-content;
|
|
161
|
+
max-inline-size: 30cqi;
|
|
162
|
+
overflow: scroll;
|
|
163
|
+
scrollbar-width: none;
|
|
164
|
+
overscroll-behavior-inline: none;
|
|
165
|
+
scroll-timeline: --msa-labels-scroll inline;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.labels-grid {
|
|
169
|
+
display: grid;
|
|
170
|
+
grid-auto-flow: dense;
|
|
138
171
|
font-family: Spline Sans Mono;
|
|
139
172
|
line-height: 24px;
|
|
173
|
+
text-wrap: nowrap;
|
|
174
|
+
|
|
175
|
+
> * {
|
|
176
|
+
padding-inline-end: 12px;
|
|
177
|
+
}
|
|
140
178
|
}
|
|
141
179
|
|
|
142
180
|
.sequences {
|
|
@@ -153,4 +191,13 @@ const sequenceLengths = computed(() =>
|
|
|
153
191
|
background-repeat: no-repeat;
|
|
154
192
|
background-size: calc(100% - 5.8px) 100%;
|
|
155
193
|
}
|
|
194
|
+
|
|
195
|
+
@keyframes hide {
|
|
196
|
+
from {
|
|
197
|
+
visibility: visible;
|
|
198
|
+
}
|
|
199
|
+
to {
|
|
200
|
+
visibility: hidden;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
156
203
|
</style>
|
|
@@ -78,7 +78,7 @@ const markupColumns = reactive(useMarkupColumnsOptions(() => ({
|
|
|
78
78
|
})));
|
|
79
79
|
|
|
80
80
|
const multipleAlignmentData = reactive(useMultipleAlignmentData(() => ({
|
|
81
|
-
|
|
81
|
+
pFrame: props.pFrame,
|
|
82
82
|
sequenceColumnIds: settings.sequenceColumnIds,
|
|
83
83
|
labelColumnIds: settings.labelColumnIds,
|
|
84
84
|
selection: props.selection,
|
|
@@ -147,18 +147,20 @@ watchEffect(() => {
|
|
|
147
147
|
watchEffect(() => {
|
|
148
148
|
const settingsToReset: (keyof PlMultiSequenceAlignmentSettings)[] = [];
|
|
149
149
|
if (
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
150
|
+
!sequenceColumns.isLoading
|
|
151
|
+
&& settings.sequenceColumnIds?.some((id) =>
|
|
152
|
+
(sequenceColumns.data?.options ?? []).every(
|
|
153
|
+
({ value }) => !isJsonEqual(value, id),
|
|
153
154
|
),
|
|
154
155
|
)
|
|
155
156
|
) {
|
|
156
157
|
settingsToReset.push('sequenceColumnIds');
|
|
157
158
|
}
|
|
158
159
|
if (
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
160
|
+
!labelColumns.isLoading
|
|
161
|
+
&& settings.labelColumnIds?.some((id) =>
|
|
162
|
+
(labelColumns.data?.options ?? []).every(
|
|
163
|
+
({ value }) => !isJsonEqual(value, id),
|
|
162
164
|
),
|
|
163
165
|
)
|
|
164
166
|
) {
|
|
@@ -170,9 +172,10 @@ watchEffect(() => {
|
|
|
170
172
|
: undefined;
|
|
171
173
|
|
|
172
174
|
if (
|
|
173
|
-
|
|
174
|
-
&&
|
|
175
|
-
|
|
175
|
+
!markupColumns.isLoading
|
|
176
|
+
&& markupColumnId
|
|
177
|
+
&& (markupColumns.data ?? []).every(
|
|
178
|
+
({ value }) => !isJsonEqual(value, markupColumnId),
|
|
176
179
|
)
|
|
177
180
|
) {
|
|
178
181
|
settingsToReset.push('colorScheme');
|
|
@@ -209,7 +212,9 @@ async function exportPdf() {
|
|
|
209
212
|
position: fixed;
|
|
210
213
|
}
|
|
211
214
|
}`);
|
|
212
|
-
|
|
215
|
+
const msaClone = msaRoot.cloneNode(true) as HTMLElement;
|
|
216
|
+
msaClone.dataset.prePrint = '';
|
|
217
|
+
printTarget.replaceChildren(msaClone);
|
|
213
218
|
document.body.appendChild(printTarget);
|
|
214
219
|
const { height, width } = printTarget.getBoundingClientRect();
|
|
215
220
|
const margin = CSS.cm(1);
|
|
@@ -68,7 +68,7 @@ async function getSequenceColumnsOptions({
|
|
|
68
68
|
const options = columns.values()
|
|
69
69
|
.filter((column) => sequenceColumnPredicate(column))
|
|
70
70
|
.map(({ spec, columnId }) => ({
|
|
71
|
-
label: spec.annotations?.['pl7.app/label'] ?? '
|
|
71
|
+
label: spec.annotations?.['pl7.app/label'] ?? 'Unlabeled column',
|
|
72
72
|
value: columnId,
|
|
73
73
|
}))
|
|
74
74
|
.toArray();
|
|
@@ -111,7 +111,7 @@ async function getLabelColumnsOptions({
|
|
|
111
111
|
: canonicalizeJson({ type: 'axis', id: axisId }),
|
|
112
112
|
labelColumn?.spec.annotations?.['pl7.app/label']
|
|
113
113
|
?? axisSpec.annotations?.['pl7.app/label']
|
|
114
|
-
?? '
|
|
114
|
+
?? 'Unlabeled axis',
|
|
115
115
|
);
|
|
116
116
|
}
|
|
117
117
|
|
|
@@ -128,7 +128,7 @@ async function getLabelColumnsOptions({
|
|
|
128
128
|
if (optionMap.has(columnIdJson)) continue;
|
|
129
129
|
optionMap.set(
|
|
130
130
|
columnIdJson,
|
|
131
|
-
spec.annotations?.['pl7.app/label'] ?? '
|
|
131
|
+
spec.annotations?.['pl7.app/label'] ?? 'Unlabeled column',
|
|
132
132
|
);
|
|
133
133
|
}
|
|
134
134
|
|
|
@@ -175,30 +175,30 @@ async function getMarkupColumnsOptions({
|
|
|
175
175
|
) => column.spec.domain?.[key] === value),
|
|
176
176
|
).map(({ columnId, spec }) => ({
|
|
177
177
|
value: columnId,
|
|
178
|
-
label: spec.annotations?.['pl7.app/label'] ?? '
|
|
178
|
+
label: spec.annotations?.['pl7.app/label'] ?? 'Unlabeled column',
|
|
179
179
|
}))
|
|
180
180
|
.toArray();
|
|
181
181
|
}
|
|
182
182
|
|
|
183
183
|
async function getMultipleAlignmentData({
|
|
184
|
-
|
|
184
|
+
pFrame,
|
|
185
185
|
sequenceColumnIds,
|
|
186
186
|
labelColumnIds,
|
|
187
187
|
selection,
|
|
188
188
|
colorScheme,
|
|
189
189
|
alignmentParams,
|
|
190
190
|
}: {
|
|
191
|
-
|
|
191
|
+
pFrame: PFrameHandle | undefined;
|
|
192
192
|
sequenceColumnIds: PObjectId[] | undefined;
|
|
193
193
|
labelColumnIds: PTableColumnId[] | undefined;
|
|
194
194
|
selection: PlSelectionModel | undefined;
|
|
195
195
|
colorScheme: PlMultiSequenceAlignmentColorSchemeOption;
|
|
196
196
|
alignmentParams: PlMultiSequenceAlignmentSettings['alignmentParams'];
|
|
197
197
|
}): Promise<MultipleAlignmentData | undefined> {
|
|
198
|
-
if (!
|
|
198
|
+
if (!pFrame || !sequenceColumnIds?.length || !labelColumnIds) return;
|
|
199
199
|
|
|
200
200
|
const pFrameDriver = getPFrameDriver();
|
|
201
|
-
const columns = await pFrameDriver.listColumns(
|
|
201
|
+
const columns = await pFrameDriver.listColumns(pFrame);
|
|
202
202
|
const linkerColumns = columns.filter((column) => isLinkerColumn(column.spec));
|
|
203
203
|
|
|
204
204
|
const filterColumn = createRowSelectionColumn({ selection });
|
|
@@ -280,7 +280,7 @@ async function getMultipleAlignmentData({
|
|
|
280
280
|
};
|
|
281
281
|
|
|
282
282
|
const table = await pFrameDriver.calculateTableData(
|
|
283
|
-
|
|
283
|
+
pFrame,
|
|
284
284
|
JSON.parse(JSON.stringify(request)),
|
|
285
285
|
{
|
|
286
286
|
offset: 0,
|
|
@@ -339,7 +339,7 @@ async function getMultipleAlignmentData({
|
|
|
339
339
|
);
|
|
340
340
|
|
|
341
341
|
const sequenceNames = sequenceColumns.map((column) =>
|
|
342
|
-
column.spec.spec.annotations?.['pl7.app/label'] ?? '
|
|
342
|
+
column.spec.spec.annotations?.['pl7.app/label'] ?? 'Unlabeled column',
|
|
343
343
|
);
|
|
344
344
|
|
|
345
345
|
const labels = Array.from(
|