@platforma-sdk/ui-vue 1.44.15 → 1.45.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 +29 -18
- package/.turbo/turbo-type-check.log +1 -1
- package/CHANGELOG.md +22 -0
- package/dist/AgGridVue/useAgGridOptions.js +3 -2
- package/dist/AgGridVue/useAgGridOptions.js.map +1 -1
- package/dist/components/PlAgCsvExporter/export-csv.js +10 -9
- package/dist/components/PlAgCsvExporter/export-csv.js.map +1 -1
- package/dist/components/PlAgDataTable/PlAgRowCount.vue.js +8 -7
- package/dist/components/PlAgDataTable/PlAgRowCount.vue.js.map +1 -1
- package/dist/components/PlAgRowNumCheckbox/PlAgRowNumCheckbox.vue.js +10 -9
- package/dist/components/PlAgRowNumCheckbox/PlAgRowNumCheckbox.vue.js.map +1 -1
- package/dist/components/PlAgRowNumHeader.vue.js +3 -2
- package/dist/components/PlAgRowNumHeader.vue.js.map +1 -1
- package/dist/components/PlAnnotations/components/AnnotationsSidebar.vue.d.ts +4 -4
- package/dist/components/PlAnnotations/components/AnnotationsSidebar.vue2.js.map +1 -1
- package/dist/components/PlAnnotations/components/DynamicForm.vue.d.ts +5 -4
- package/dist/components/PlAnnotations/components/DynamicForm.vue2.js +64 -61
- package/dist/components/PlAnnotations/components/DynamicForm.vue2.js.map +1 -1
- package/dist/components/PlAnnotations/components/FilterSidebar.vue.d.ts +13 -12
- package/dist/components/PlAnnotations/components/FilterSidebar.vue2.js +49 -48
- package/dist/components/PlAnnotations/components/FilterSidebar.vue2.js.map +1 -1
- package/dist/components/PlAnnotations/components/PlAnnotations.vue.d.ts +19 -0
- package/dist/components/PlAnnotations/components/PlAnnotations.vue.js +10 -0
- package/dist/components/PlAnnotations/components/PlAnnotations.vue.js.map +1 -0
- package/dist/components/PlAnnotations/components/PlAnnotations.vue2.js +66 -0
- package/dist/components/PlAnnotations/components/PlAnnotations.vue2.js.map +1 -0
- package/dist/components/PlAnnotations/components/PlAnnotations.vue3.js +13 -0
- package/dist/components/PlAnnotations/components/PlAnnotations.vue3.js.map +1 -0
- package/dist/components/PlAnnotations/components/PlAnnotationsModal.vue.d.ts +6 -13
- package/dist/components/PlAnnotations/components/PlAnnotationsModal.vue2.js +35 -78
- package/dist/components/PlAnnotations/components/PlAnnotationsModal.vue2.js.map +1 -1
- package/dist/components/PlAnnotations/index.d.ts +1 -0
- package/dist/components/PlAnnotations/types.d.ts +12 -6
- package/dist/components/PlAnnotations/utils.d.ts +4 -4
- package/dist/components/PlAnnotations/utils.js +2 -11
- package/dist/components/PlAnnotations/utils.js.map +1 -1
- package/dist/components/PlBtnExportArchive/Item.vue.d.ts +6 -0
- package/dist/components/PlBtnExportArchive/Item.vue.js +10 -0
- package/dist/components/PlBtnExportArchive/Item.vue.js.map +1 -0
- package/dist/components/PlBtnExportArchive/Item.vue2.js +43 -0
- package/dist/components/PlBtnExportArchive/Item.vue2.js.map +1 -0
- package/dist/components/PlBtnExportArchive/Item.vue3.js +15 -0
- package/dist/components/PlBtnExportArchive/Item.vue3.js.map +1 -0
- package/dist/components/PlBtnExportArchive/PlBtnExportArchive.vue.d.ts +34 -0
- package/dist/components/PlBtnExportArchive/PlBtnExportArchive.vue.js +10 -0
- package/dist/components/PlBtnExportArchive/PlBtnExportArchive.vue.js.map +1 -0
- package/dist/components/PlBtnExportArchive/PlBtnExportArchive.vue2.js +154 -0
- package/dist/components/PlBtnExportArchive/PlBtnExportArchive.vue2.js.map +1 -0
- package/dist/components/PlBtnExportArchive/PlBtnExportArchive.vue3.js +13 -0
- package/dist/components/PlBtnExportArchive/PlBtnExportArchive.vue3.js.map +1 -0
- package/dist/components/PlBtnExportArchive/Summary.vue.d.ts +10 -0
- package/dist/components/PlBtnExportArchive/Summary.vue.js +10 -0
- package/dist/components/PlBtnExportArchive/Summary.vue.js.map +1 -0
- package/dist/components/PlBtnExportArchive/Summary.vue2.js +42 -0
- package/dist/components/PlBtnExportArchive/Summary.vue2.js.map +1 -0
- package/dist/components/PlBtnExportArchive/Summary.vue3.js +13 -0
- package/dist/components/PlBtnExportArchive/Summary.vue3.js.map +1 -0
- package/dist/components/PlBtnExportArchive/index.d.ts +2 -0
- package/dist/components/PlBtnExportArchive/types.d.ts +14 -0
- package/dist/index.js +44 -40
- package/dist/index.js.map +1 -1
- package/dist/lib/util/helpers/dist/prettyBytes.js +68 -0
- package/dist/lib/util/helpers/dist/prettyBytes.js.map +1 -0
- package/dist/lib.d.ts +1 -0
- package/package.json +6 -4
- package/src/components/PlAgCsvExporter/export-csv.ts +8 -2
- package/src/components/PlAnnotations/components/AnnotationsSidebar.vue +2 -2
- package/src/components/PlAnnotations/components/DynamicForm.vue +16 -9
- package/src/components/PlAnnotations/components/FilterSidebar.vue +23 -13
- package/src/components/PlAnnotations/components/PlAnnotations.vue +92 -0
- package/src/components/PlAnnotations/components/PlAnnotationsModal.vue +19 -77
- package/src/components/PlAnnotations/index.ts +1 -0
- package/src/components/PlAnnotations/types.ts +7 -6
- package/src/components/PlAnnotations/utils.ts +5 -13
- package/src/components/PlBtnExportArchive/Item.vue +66 -0
- package/src/components/PlBtnExportArchive/PlBtnExportArchive.vue +235 -0
- package/src/components/PlBtnExportArchive/Summary.vue +56 -0
- package/src/components/PlBtnExportArchive/index.ts +2 -0
- package/src/components/PlBtnExportArchive/types.ts +17 -0
- package/src/lib.ts +2 -0
- package/dist/components/PlAnnotations/components/PlAnnotationCreateDialog.vue.d.ts +0 -18
- package/dist/components/PlAnnotations/components/PlAnnotationCreateDialog.vue.js +0 -73
- package/dist/components/PlAnnotations/components/PlAnnotationCreateDialog.vue.js.map +0 -1
- package/dist/components/PlAnnotations/components/PlAnnotationCreateDialog.vue2.js +0 -5
- package/dist/components/PlAnnotations/components/PlAnnotationCreateDialog.vue2.js.map +0 -1
- package/src/components/PlAnnotations/components/PlAnnotationCreateDialog.vue +0 -64
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
<script setup lang="ts" generic="T extends
|
|
1
|
+
<script setup lang="ts" generic="T extends FilterSpec = FilterSpec">
|
|
2
2
|
import { computed, watch } from 'vue';
|
|
3
|
-
|
|
4
|
-
import type { FilterUiType } from '@platforma-sdk/model';
|
|
3
|
+
|
|
5
4
|
import { isNil } from '@milaboratories/helpers';
|
|
6
|
-
import {
|
|
7
|
-
import { getFilterUiTypeOptions,
|
|
8
|
-
import type { SimplifiedUniversalPColumnEntry } from '
|
|
5
|
+
import type { FilterSpecTypeFieldRecord } from '@milaboratories/uikit';
|
|
6
|
+
import { getFilterUiMetadata, getFilterUiTypeOptions, PlCheckbox, PlDropdown, PlNumberField, PlTextField } from '@milaboratories/uikit';
|
|
7
|
+
import type { SimplifiedUniversalPColumnEntry, SUniversalPColumnId } from '@platforma-sdk/model';
|
|
8
|
+
|
|
9
|
+
import type { FilterSpec, FilterSpecType } from '../types';
|
|
9
10
|
|
|
10
11
|
type ObjectEntries<T, K extends keyof T = keyof T> = [K, T[K]][];
|
|
11
12
|
|
|
@@ -13,7 +14,7 @@ const formData = defineModel<T>({ default: () => ({}) });
|
|
|
13
14
|
|
|
14
15
|
const props = defineProps<{
|
|
15
16
|
columns: SimplifiedUniversalPColumnEntry[];
|
|
16
|
-
formMetadata:
|
|
17
|
+
formMetadata: FilterSpecTypeFieldRecord<T>;
|
|
17
18
|
}>();
|
|
18
19
|
|
|
19
20
|
const columnSpecRef = computed(() => {
|
|
@@ -66,6 +67,12 @@ watch(() => props.formMetadata, (newForm) => {
|
|
|
66
67
|
{ immediate: true, deep: true },
|
|
67
68
|
);
|
|
68
69
|
|
|
70
|
+
function isFilterType(type: string | undefined): boolean {
|
|
71
|
+
return type === 'FilterType'
|
|
72
|
+
// @deprecated version
|
|
73
|
+
|| type === 'FilterUiType';
|
|
74
|
+
}
|
|
75
|
+
|
|
69
76
|
</script>
|
|
70
77
|
|
|
71
78
|
<template>
|
|
@@ -81,9 +88,9 @@ watch(() => props.formMetadata, (newForm) => {
|
|
|
81
88
|
@update:model-value="setFieldValue(fieldName, $event as T[keyof T])"
|
|
82
89
|
/>
|
|
83
90
|
</template>
|
|
84
|
-
<template v-else-if="field.fieldType
|
|
91
|
+
<template v-else-if="isFilterType(field.fieldType)">
|
|
85
92
|
<PlDropdown
|
|
86
|
-
:model-value="formData[fieldName] as
|
|
93
|
+
:model-value="formData[fieldName] as FilterSpecType"
|
|
87
94
|
:label="field.label ?? fieldName"
|
|
88
95
|
:options="filterUiTypeOptions"
|
|
89
96
|
@update:model-value="setFieldValue(fieldName, $event as T[keyof T])"
|
|
@@ -1,25 +1,33 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
export type Props = {
|
|
3
|
+
columns: SimplifiedUniversalPColumnEntry[];
|
|
4
|
+
hasSelectedColumns?: boolean;
|
|
5
|
+
getValuesForSelectedColumns?: () => Promise<undefined | { columnId: PObjectId; values: string[] }>;
|
|
6
|
+
};
|
|
7
|
+
</script>
|
|
1
8
|
<script setup lang="ts">
|
|
2
9
|
import { isNil, randomInt } from '@milaboratories/helpers';
|
|
3
10
|
import {
|
|
11
|
+
getFilterUiMetadata,
|
|
4
12
|
PlBtnSecondary,
|
|
5
13
|
PlEditableTitle,
|
|
6
14
|
PlElementList,
|
|
7
15
|
PlSidebarItem,
|
|
8
16
|
} from '@milaboratories/uikit';
|
|
9
|
-
import type {
|
|
10
|
-
import {
|
|
11
|
-
import type {
|
|
17
|
+
import type { PObjectId, SimplifiedUniversalPColumnEntry, SUniversalPColumnId } from '@platforma-sdk/model';
|
|
18
|
+
import { computed } from 'vue';
|
|
19
|
+
import type { Filter, FilterSpec } from '../types';
|
|
12
20
|
import { createDefaultFilterMetadata } from '../utils';
|
|
13
21
|
import DynamicForm from './DynamicForm.vue';
|
|
14
22
|
|
|
15
23
|
// Models
|
|
16
|
-
const step = defineModel<
|
|
24
|
+
const step = defineModel<Filter>('step', { required: true });
|
|
17
25
|
// Props
|
|
18
|
-
const props = defineProps<
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
26
|
+
const props = defineProps<Props>();
|
|
27
|
+
// State
|
|
28
|
+
const withSelection = computed(() => {
|
|
29
|
+
return props.hasSelectedColumns !== undefined && props.getValuesForSelectedColumns !== undefined;
|
|
30
|
+
});
|
|
23
31
|
// Actions
|
|
24
32
|
const addFilterPlaceholder = () => {
|
|
25
33
|
step.value.filter.filters.push({
|
|
@@ -30,6 +38,8 @@ const addFilterPlaceholder = () => {
|
|
|
30
38
|
};
|
|
31
39
|
|
|
32
40
|
async function addFilterFromSelected() {
|
|
41
|
+
if (props.hasSelectedColumns === undefined || props.getValuesForSelectedColumns === undefined) return;
|
|
42
|
+
|
|
33
43
|
const data = await props.getValuesForSelectedColumns();
|
|
34
44
|
if (!data || data.values.length === 0) return;
|
|
35
45
|
|
|
@@ -50,18 +60,18 @@ async function addFilterFromSelected() {
|
|
|
50
60
|
}
|
|
51
61
|
|
|
52
62
|
// Getters
|
|
53
|
-
const getColumnLabel = (filter:
|
|
63
|
+
const getColumnLabel = (filter: FilterSpec) => {
|
|
54
64
|
if (!isNil(filter.name)) return filter.name;
|
|
55
65
|
return props.columns
|
|
56
66
|
.find((c) => 'column' in filter ? c.id === filter.column : false)?.label
|
|
57
67
|
?? filter.type;
|
|
58
68
|
};
|
|
59
69
|
|
|
60
|
-
const getFormMetadata = (filter:
|
|
70
|
+
const getFormMetadata = (filter: FilterSpec) => {
|
|
61
71
|
return !isNil(filter.type) ? getFilterUiMetadata(filter.type).form : createDefaultFilterMetadata();
|
|
62
72
|
};
|
|
63
73
|
|
|
64
|
-
const getFilterValues = (filter:
|
|
74
|
+
const getFilterValues = (filter: FilterSpec) => {
|
|
65
75
|
if (filter.type === 'or' || filter.type === 'and') {
|
|
66
76
|
return filter.filters.map((f) => 'value' in f && !isNil(f.value) ? f.value : null).filter((v) => !isNil(v)).join (', ');
|
|
67
77
|
}
|
|
@@ -87,7 +97,7 @@ const getFilterValues = (filter: FilterUi) => {
|
|
|
87
97
|
<PlBtnSecondary style="width: 100%;" icon="add" @click="addFilterPlaceholder">
|
|
88
98
|
Filter
|
|
89
99
|
</PlBtnSecondary>
|
|
90
|
-
<PlBtnSecondary style="width: 100%;" icon="add" :disabled="!props.hasSelectedColumns" @click="addFilterFromSelected">
|
|
100
|
+
<PlBtnSecondary v-if="withSelection" style="width: 100%;" icon="add" :disabled="!props.hasSelectedColumns" @click="addFilterFromSelected">
|
|
91
101
|
From selection
|
|
92
102
|
</PlBtnSecondary>
|
|
93
103
|
</div>
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Props as BaseProps } from './FilterSidebar.vue';
|
|
3
|
+
export type Props = BaseProps & {
|
|
4
|
+
onDeleteSchema?: () => void;
|
|
5
|
+
};
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<script setup lang="ts">
|
|
9
|
+
import { computed, effect, shallowRef } from 'vue';
|
|
10
|
+
|
|
11
|
+
import { isNil } from '@milaboratories/helpers';
|
|
12
|
+
import { PlSidebarGroup, useConfirm } from '@milaboratories/uikit';
|
|
13
|
+
|
|
14
|
+
import type { Annotation } from '../types';
|
|
15
|
+
import AnnotationsSidebar from './AnnotationsSidebar.vue';
|
|
16
|
+
import FilterSidebar from './FilterSidebar.vue';
|
|
17
|
+
|
|
18
|
+
// Models
|
|
19
|
+
const annotation = defineModel<Annotation>('annotation', { required: true });
|
|
20
|
+
// Props
|
|
21
|
+
const props = defineProps<Props>();
|
|
22
|
+
// State
|
|
23
|
+
const selectedStepId = shallowRef<number | undefined>(undefined);
|
|
24
|
+
const selectedStep = computed(() => {
|
|
25
|
+
return isNil(selectedStepId.value) || isNil(annotation.value)
|
|
26
|
+
? undefined
|
|
27
|
+
: annotation.value.steps.find((step) => step.id === selectedStepId.value);
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
// Watchers
|
|
31
|
+
effect(function setDefaultStepId() {
|
|
32
|
+
if (selectedStepId.value === undefined && annotation.value.steps.length > 0) {
|
|
33
|
+
selectedStepId.value = annotation.value.steps[0].id;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
// Hooks
|
|
37
|
+
const confirmResetSchema = useConfirm({
|
|
38
|
+
title: 'Reset Schema',
|
|
39
|
+
message: 'Are you sure you want to reset the schema? This action cannot be undone.',
|
|
40
|
+
confirmLabel: 'Yes, reset',
|
|
41
|
+
cancelLabel: 'No, cancel',
|
|
42
|
+
});
|
|
43
|
+
// Actions
|
|
44
|
+
async function handleDeleteSchema() {
|
|
45
|
+
if (await confirmResetSchema()) {
|
|
46
|
+
selectedStepId.value = undefined;
|
|
47
|
+
props.onDeleteSchema?.();
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
</script>
|
|
52
|
+
|
|
53
|
+
<template>
|
|
54
|
+
<PlSidebarGroup :class="$style.sidebarGroup">
|
|
55
|
+
<template #item-0>
|
|
56
|
+
<AnnotationsSidebar
|
|
57
|
+
v-model:annotation="annotation"
|
|
58
|
+
v-model:selectedStepId="selectedStepId"
|
|
59
|
+
:class="$style.sidebarItem"
|
|
60
|
+
:columns="props.columns"
|
|
61
|
+
@delete-schema="handleDeleteSchema"
|
|
62
|
+
/>
|
|
63
|
+
</template>
|
|
64
|
+
<template #item-1>
|
|
65
|
+
<FilterSidebar
|
|
66
|
+
v-if="selectedStep"
|
|
67
|
+
v-model:step="selectedStep"
|
|
68
|
+
:class="$style.sidebarItem"
|
|
69
|
+
:columns="props.columns"
|
|
70
|
+
:selectedStepId="selectedStepId"
|
|
71
|
+
:hasSelectedColumns="props.hasSelectedColumns"
|
|
72
|
+
:getValuesForSelectedColumns="props.getValuesForSelectedColumns"
|
|
73
|
+
/>
|
|
74
|
+
</template>
|
|
75
|
+
</PlSidebarGroup>
|
|
76
|
+
</template>
|
|
77
|
+
|
|
78
|
+
<style lang="scss" module>
|
|
79
|
+
.modal {
|
|
80
|
+
display: flex;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.sidebarGroup {
|
|
84
|
+
width: 100%;
|
|
85
|
+
height: 100%;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.sidebarItem {
|
|
89
|
+
width: 100%;
|
|
90
|
+
height: 100%;
|
|
91
|
+
}
|
|
92
|
+
</style>
|
|
@@ -1,99 +1,41 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
import type {
|
|
7
|
-
import
|
|
8
|
-
import AnnotationsSidebar from './AnnotationsSidebar.vue';
|
|
9
|
-
import FilterSidebar from './FilterSidebar.vue';
|
|
10
|
-
import PlAnnotationCreateDialog from './PlAnnotationCreateDialog.vue';
|
|
2
|
+
import { PlPureSlideModal } from '@milaboratories/uikit';
|
|
3
|
+
import { effect, shallowRef } from 'vue';
|
|
4
|
+
|
|
5
|
+
import type { Annotation } from '../types';
|
|
6
|
+
import type { Props } from './PlAnnotations.vue';
|
|
7
|
+
import PlAnnotations from './PlAnnotations.vue';
|
|
11
8
|
|
|
12
9
|
// Models
|
|
13
|
-
const annotation = defineModel<
|
|
10
|
+
const annotation = defineModel<Annotation>('annotation', { required: true });
|
|
14
11
|
const opened = defineModel<boolean>('opened', { required: true });
|
|
15
12
|
// Props
|
|
16
|
-
const props = defineProps<
|
|
17
|
-
columns: SimplifiedUniversalPColumnEntry[];
|
|
18
|
-
hasSelectedColumns: boolean;
|
|
19
|
-
getValuesForSelectedColumns: () => Promise<undefined | { columnId: PObjectId; values: string[] }>;
|
|
20
|
-
}>();
|
|
13
|
+
const props = defineProps<Props>();
|
|
21
14
|
// State
|
|
22
15
|
const selectedStepId = shallowRef<number | undefined>(undefined);
|
|
23
|
-
const selectedStep = computed(() => {
|
|
24
|
-
return isNil(selectedStepId.value) || isNil(annotation.value)
|
|
25
|
-
? undefined
|
|
26
|
-
: annotation.value.steps.find((step) => step.id === selectedStepId.value);
|
|
27
|
-
});
|
|
28
|
-
const hasAnnotation = computed(() => annotation.value.isCreated === true);
|
|
29
|
-
|
|
30
|
-
const openedDialog = computed({
|
|
31
|
-
get: () => !hasAnnotation.value && opened.value,
|
|
32
|
-
set: (value: boolean) => (opened.value = value),
|
|
33
|
-
});
|
|
34
|
-
const openedModal = computed({
|
|
35
|
-
get: () => hasAnnotation.value && opened.value,
|
|
36
|
-
set: (value: boolean) => (opened.value = value),
|
|
37
|
-
});
|
|
38
16
|
// Watchers
|
|
39
17
|
effect(function setDefaultStepId() {
|
|
40
18
|
if (selectedStepId.value === undefined && annotation.value.steps.length > 0) {
|
|
41
19
|
selectedStepId.value = annotation.value.steps[0].id;
|
|
42
20
|
}
|
|
43
21
|
});
|
|
44
|
-
// Hooks
|
|
45
|
-
const confirmResetSchema = useConfirm({
|
|
46
|
-
title: 'Reset Schema',
|
|
47
|
-
message: 'Are you sure you want to reset the schema? This action cannot be undone.',
|
|
48
|
-
confirmLabel: 'Yes, reset',
|
|
49
|
-
cancelLabel: 'No, cancel',
|
|
50
|
-
});
|
|
51
22
|
// Actions
|
|
52
|
-
function handleCreateAnnotation(props: { type: 'byClonotype' | 'bySampleAndClonotype'; name: string }) {
|
|
53
|
-
annotation.value.isCreated = true;
|
|
54
|
-
annotation.value.mode = props.type;
|
|
55
|
-
annotation.value.title = props.name;
|
|
56
|
-
annotation.value.steps = [];
|
|
57
|
-
}
|
|
58
|
-
|
|
59
23
|
async function handleDeleteSchema() {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
annotation.value.title = '';
|
|
63
|
-
annotation.value.mode = 'byClonotype';
|
|
64
|
-
annotation.value.steps = [];
|
|
65
|
-
opened.value = false;
|
|
66
|
-
selectedStepId.value = undefined;
|
|
67
|
-
}
|
|
24
|
+
opened.value = false;
|
|
25
|
+
props.onDeleteSchema?.();
|
|
68
26
|
}
|
|
69
|
-
|
|
70
27
|
</script>
|
|
71
28
|
|
|
72
29
|
<template>
|
|
73
|
-
<
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
@delete-schema="handleDeleteSchema"
|
|
83
|
-
/>
|
|
84
|
-
</template>
|
|
85
|
-
<template #item-1>
|
|
86
|
-
<FilterSidebar
|
|
87
|
-
v-if="selectedStep"
|
|
88
|
-
v-model:step="selectedStep"
|
|
89
|
-
:class="$style.sidebarItem"
|
|
90
|
-
:columns="props.columns"
|
|
91
|
-
:selectedStepId="selectedStepId"
|
|
92
|
-
:hasSelectedColumns="props.hasSelectedColumns"
|
|
93
|
-
:getValuesForSelectedColumns="props.getValuesForSelectedColumns"
|
|
94
|
-
/>
|
|
95
|
-
</template>
|
|
96
|
-
</PlSidebarGroup>
|
|
30
|
+
<PlPureSlideModal v-model="opened" :class="$style.modal" width="768px">
|
|
31
|
+
<PlAnnotations
|
|
32
|
+
v-model:annotation="annotation"
|
|
33
|
+
:class="$style.sidebarItem"
|
|
34
|
+
:columns="props.columns"
|
|
35
|
+
:has-selected-columns="props.hasSelectedColumns"
|
|
36
|
+
:getValuesForSelectedColumns="props.getValuesForSelectedColumns"
|
|
37
|
+
@delete-schema="handleDeleteSchema"
|
|
38
|
+
/>
|
|
97
39
|
</PlPureSlideModal>
|
|
98
40
|
</template>
|
|
99
41
|
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { FilterSpec as _FilterSpec, AnnotationSpecUi, FilterSpecLeaf, FilterSpecUi } from '@platforma-sdk/model';
|
|
2
|
+
export type { FilterSpecType } from '@platforma-sdk/model';
|
|
2
3
|
|
|
3
|
-
export type
|
|
4
|
+
export type FilterSpec = _FilterSpec<FilterSpecLeaf, { id?: number; name?: string; isExpanded?: boolean }>;
|
|
4
5
|
|
|
5
|
-
export type
|
|
6
|
-
id:
|
|
7
|
-
label: string;
|
|
8
|
-
obj: SimplifiedPColumnSpec;
|
|
6
|
+
export type Filter = FilterSpecUi<Extract<FilterSpec, { type: 'and' | 'or' }>> & {
|
|
7
|
+
id: number;
|
|
9
8
|
};
|
|
9
|
+
|
|
10
|
+
export type Annotation = AnnotationSpecUi<Filter>;
|
|
@@ -1,15 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { FilterSpecTypeFieldRecord } from '@milaboratories/uikit';
|
|
2
|
+
import type { FilterSpec } from './types';
|
|
2
3
|
|
|
3
|
-
export function
|
|
4
|
-
return {
|
|
5
|
-
isCreated: false,
|
|
6
|
-
title: 'My Annotation',
|
|
7
|
-
mode: 'byClonotype',
|
|
8
|
-
steps: [],
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export function createDefaultFilterMetadata<T extends Extract<FilterUi, { column: unknown }>>(): TypeFieldRecord<T> {
|
|
4
|
+
export function createDefaultFilterMetadata<T extends Extract<FilterSpec, { column: unknown }>>(): FilterSpecTypeFieldRecord<T> {
|
|
13
5
|
return {
|
|
14
6
|
column: {
|
|
15
7
|
label: 'Column',
|
|
@@ -18,8 +10,8 @@ export function createDefaultFilterMetadata<T extends Extract<FilterUi, { column
|
|
|
18
10
|
},
|
|
19
11
|
type: {
|
|
20
12
|
label: 'Predicate',
|
|
21
|
-
fieldType: '
|
|
13
|
+
fieldType: 'FilterType',
|
|
22
14
|
defaultValue: () => undefined,
|
|
23
15
|
},
|
|
24
|
-
} as
|
|
16
|
+
} as FilterSpecTypeFieldRecord<T>;
|
|
25
17
|
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { ExportItem } from './types';
|
|
3
|
+
import { prettyBytes } from '@milaboratories/helpers';
|
|
4
|
+
|
|
5
|
+
defineProps<{
|
|
6
|
+
item: ExportItem;
|
|
7
|
+
}>();
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<template>
|
|
11
|
+
<div
|
|
12
|
+
:class="$style.item"
|
|
13
|
+
>
|
|
14
|
+
<div :class="$style.name">{{ item.fileName }}</div>
|
|
15
|
+
<div v-if="item.status === 'in-progress'" :class="$style.details">
|
|
16
|
+
<span>{{ prettyBytes(item.current, {}) }}</span>
|
|
17
|
+
<span>/</span>
|
|
18
|
+
<span>{{ prettyBytes(item.size, {}) }}</span>
|
|
19
|
+
</div>
|
|
20
|
+
<div v-else-if="item.status === 'completed'" :class="$style.details">
|
|
21
|
+
Done <span>{{ prettyBytes(item.size, {}) }}</span>
|
|
22
|
+
</div>
|
|
23
|
+
<div v-else-if="item.status === 'error'" :class="$style.error">
|
|
24
|
+
<span>{{ item.error }}</span>
|
|
25
|
+
</div>
|
|
26
|
+
<div v-else :class="$style.details">
|
|
27
|
+
Pending
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
31
|
+
|
|
32
|
+
<style module>
|
|
33
|
+
.item {
|
|
34
|
+
display: flex;
|
|
35
|
+
flex-direction: column;
|
|
36
|
+
margin-bottom: 8px;
|
|
37
|
+
overflow: hidden;
|
|
38
|
+
--name-font-size: 12px;
|
|
39
|
+
--details-font-size: 10px;
|
|
40
|
+
}
|
|
41
|
+
.name {
|
|
42
|
+
white-space: nowrap;
|
|
43
|
+
overflow: hidden;
|
|
44
|
+
text-overflow: ellipsis;
|
|
45
|
+
font-size: var(--name-font-size);
|
|
46
|
+
font-weight: 600;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.details {
|
|
50
|
+
font-size: var(--details-font-size);
|
|
51
|
+
font-weight: 400;
|
|
52
|
+
color: rgba(255, 255, 255, 0.6);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.error {
|
|
56
|
+
font-size: var(--details-font-size);
|
|
57
|
+
font-weight: 400;
|
|
58
|
+
color: var(--txt-error);
|
|
59
|
+
span {
|
|
60
|
+
white-space: nowrap;
|
|
61
|
+
overflow: hidden;
|
|
62
|
+
text-overflow: ellipsis;
|
|
63
|
+
max-width: 100%;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
</style>
|