@platforma-sdk/ui-vue 1.44.15 → 1.45.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/.turbo/turbo-build.log +28 -17
- package/.turbo/turbo-type-check.log +1 -1
- package/CHANGELOG.md +16 -0
- package/dist/AgGridVue/useAgGridOptions.js +3 -2
- package/dist/AgGridVue/useAgGridOptions.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/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
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { defineComponent as p, createElementBlock as i, openBlock as n, normalizeClass as s, createElementVNode as t, createTextVNode as o, createCommentVNode as d, toDisplayString as m, unref as a } from "vue";
|
|
2
|
+
import { prettyBytes as r } from "../../lib/util/helpers/dist/prettyBytes.js";
|
|
3
|
+
const v = /* @__PURE__ */ p({
|
|
4
|
+
__name: "Summary",
|
|
5
|
+
props: {
|
|
6
|
+
item: {}
|
|
7
|
+
},
|
|
8
|
+
emits: ["cancel"],
|
|
9
|
+
setup(u, { emit: y }) {
|
|
10
|
+
return (e, l) => (n(), i("div", {
|
|
11
|
+
class: s(e.$style.summary)
|
|
12
|
+
}, [
|
|
13
|
+
t("div", {
|
|
14
|
+
class: s(e.$style.name)
|
|
15
|
+
}, [
|
|
16
|
+
o(m(e.item.fileName), 1),
|
|
17
|
+
d("", !0)
|
|
18
|
+
], 2),
|
|
19
|
+
e.item.status === "in-progress" ? (n(), i("div", {
|
|
20
|
+
key: 0,
|
|
21
|
+
class: s(e.$style.details)
|
|
22
|
+
}, [
|
|
23
|
+
t("span", null, m(a(r)(e.item.current, {})), 1),
|
|
24
|
+
l[1] || (l[1] = t("span", null, "/", -1)),
|
|
25
|
+
t("span", null, m(a(r)(e.item.size, {})), 1)
|
|
26
|
+
], 2)) : e.item.status === "completed" ? (n(), i("div", {
|
|
27
|
+
key: 1,
|
|
28
|
+
class: s(e.$style.details)
|
|
29
|
+
}, [
|
|
30
|
+
l[2] || (l[2] = o(" Done ")),
|
|
31
|
+
t("span", null, m(a(r)(e.item.size, {})), 1)
|
|
32
|
+
], 2)) : (n(), i("div", {
|
|
33
|
+
key: 2,
|
|
34
|
+
class: s(e.$style.details)
|
|
35
|
+
}, " Pending ", 2))
|
|
36
|
+
], 2));
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
export {
|
|
40
|
+
v as default
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=Summary.vue2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Summary.vue2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("._summary_s5gm9_2{display:flex;flex-direction:column;margin-bottom:8px;border-bottom:1px solid rgba(255,255,255,.1);padding-bottom:8px;--name-font-size: 14px;--details-font-size: 12px}._name_s5gm9_12{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:var(--name-font-size);font-weight:600}._details_s5gm9_19{font-size:var(--details-font-size);font-weight:400;color:#fff9}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
+
const s = "_summary_s5gm9_2", m = "_name_s5gm9_12", a = "_details_s5gm9_19", t = {
|
|
3
|
+
summary: s,
|
|
4
|
+
name: m,
|
|
5
|
+
details: a
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
t as default,
|
|
9
|
+
a as details,
|
|
10
|
+
m as name,
|
|
11
|
+
s as summary
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=Summary.vue3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Summary.vue3.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ImportFileHandle, RemoteBlobHandleAndSize } from '@platforma-sdk/model';
|
|
2
|
+
export type FileExportEntry = {
|
|
3
|
+
importHandle: ImportFileHandle;
|
|
4
|
+
blobHandle: RemoteBlobHandleAndSize;
|
|
5
|
+
fileName?: string;
|
|
6
|
+
};
|
|
7
|
+
export type ExportItem = {
|
|
8
|
+
fileName: string;
|
|
9
|
+
current: number;
|
|
10
|
+
size: number;
|
|
11
|
+
status: 'pending' | 'in-progress' | 'completed' | 'error';
|
|
12
|
+
error?: unknown;
|
|
13
|
+
};
|
|
14
|
+
export type ExportsMap = Map<string, ExportItem>;
|
package/dist/index.js
CHANGED
|
@@ -5,17 +5,17 @@
|
|
|
5
5
|
.pl-ag-chart-stacked-bar-cell{height:100%;display:flex;flex-direction:row;align-items:center}.pl-ag-chart-stacked-bar-cell__not-ready{color:var(--txt-03)!important}`)),document.head.appendChild(r)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
6
6
|
|
|
7
7
|
import { default as m } from "./components/BlockLayout.vue.js";
|
|
8
|
-
import { default as
|
|
8
|
+
import { default as p, default as u } from "./components/PlAgDataTable/PlAgDataTableV2.vue.js";
|
|
9
9
|
import { default as i } from "./components/PlAgDataTable/PlAgOverlayLoading.vue.js";
|
|
10
10
|
import { default as x } from "./components/PlAgDataTable/PlAgOverlayNoRows.vue.js";
|
|
11
11
|
|
|
12
12
|
import { default as A } from "./components/ValueOrErrorsComponent.vue.js";
|
|
13
|
-
import { useAgGridOptions as
|
|
13
|
+
import { useAgGridOptions as C } from "./AgGridVue/useAgGridOptions.js";
|
|
14
14
|
import { createAgGridColDef as b } from "./AgGridVue/createAgGridColDef.js";
|
|
15
15
|
import { deselectAll as w, getSelectedRowsCount as R, getTotalRowsCount as S, isSelectionEnabled as T, selectAll as D } from "./AgGridVue/selection.js";
|
|
16
|
-
import { default as
|
|
17
|
-
import { default as
|
|
18
|
-
import { default as
|
|
16
|
+
import { default as v } from "./components/PlAgColumnHeader/PlAgColumnHeader.vue.js";
|
|
17
|
+
import { default as O } from "./components/PlAgCellFile/PlAgCellFile.vue.js";
|
|
18
|
+
import { default as G } from "./components/PlAgCellProgress/PlAgCellProgress.vue.js";
|
|
19
19
|
import { default as k } from "./components/PlAgCellStatusTag/PlAgCellStatusTag.vue.js";
|
|
20
20
|
|
|
21
21
|
import { default as B } from "./components/PlAgChartHistogramCell/PlAgChartHistogramCell.vue.js";
|
|
@@ -31,67 +31,71 @@ import { default as $ } from "./components/PlAgTextAndButtonCell/PlAgTextAndButt
|
|
|
31
31
|
import { default as re } from "./components/PlAgGridColumnManager/PlAgGridColumnManager.vue.js";
|
|
32
32
|
import { default as te } from "./components/PlTableFilters/PlTableFiltersV2.vue.js";
|
|
33
33
|
import { default as ae } from "./components/PlMultiSequenceAlignment/PlMultiSequenceAlignment.vue.js";
|
|
34
|
-
import { default as me } from "./components/PlAnnotations/components/
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
34
|
+
import { default as me } from "./components/PlAnnotations/components/PlAnnotations.vue.js";
|
|
35
|
+
import { default as pe } from "./components/PlAnnotations/components/PlAnnotationsModal.vue.js";
|
|
36
|
+
import { default as de } from "./components/PlBtnExportArchive/PlBtnExportArchive.vue.js";
|
|
37
|
+
import { defineApp as ne, useSdkPlugin as xe } from "./defineApp.js";
|
|
38
|
+
import { createModel as Ae } from "./createModel.js";
|
|
39
|
+
import { defineStore as Ce } from "./defineStore.js";
|
|
40
|
+
import { AgGridTheme as be, activateAgGrid as Ee } from "./aggrid.js";
|
|
41
|
+
import { MultiError as Re, UnresolvedError as Se, ensureError as Te, formatZodError as De, identity as Ve, isDefined as ve, isZodError as Me, unwrapValueOrErrors as Oe, wrapOptionalResult as he, wrapValueOrErrors as Ge } from "./utils.js";
|
|
42
|
+
import { objectHash as ke } from "./objectHash.js";
|
|
43
|
+
import { computedResult as Be } from "./computedResult.js";
|
|
44
|
+
import { ReactiveFileContent as He } from "./composition/fileContent.js";
|
|
43
45
|
export * from "@milaboratories/uikit";
|
|
44
46
|
export {
|
|
45
|
-
|
|
47
|
+
be as AgGridTheme,
|
|
46
48
|
m as BlockLayout,
|
|
47
49
|
J as DeferredCircular,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
50
|
+
Re as MultiError,
|
|
51
|
+
O as PlAgCellFile,
|
|
52
|
+
G as PlAgCellProgress,
|
|
51
53
|
k as PlAgCellStatusTag,
|
|
52
54
|
B as PlAgChartHistogramCell,
|
|
53
55
|
H as PlAgChartStackedBarCell,
|
|
54
|
-
|
|
56
|
+
v as PlAgColumnHeader,
|
|
55
57
|
Y as PlAgCsvExporter,
|
|
56
58
|
j as PlAgDataTableRowNumberColId,
|
|
57
|
-
|
|
59
|
+
p as PlAgDataTableV2,
|
|
58
60
|
re as PlAgGridColumnManager,
|
|
59
61
|
i as PlAgOverlayLoading,
|
|
60
62
|
x as PlAgOverlayNoRows,
|
|
61
63
|
$ as PlAgTextAndButtonCell,
|
|
62
|
-
me as
|
|
63
|
-
|
|
64
|
+
me as PlAnnotations,
|
|
65
|
+
pe as PlAnnotationsModal,
|
|
66
|
+
de as PlBtnExportArchive,
|
|
67
|
+
u as PlDataTableV2,
|
|
64
68
|
ae as PlMultiSequenceAlignment,
|
|
65
69
|
te as PlTableFiltersV2,
|
|
66
|
-
|
|
67
|
-
|
|
70
|
+
He as ReactiveFileContent,
|
|
71
|
+
Se as UnresolvedError,
|
|
68
72
|
A as ValueOrErrorsComponent,
|
|
69
|
-
|
|
73
|
+
Ee as activateAgGrid,
|
|
70
74
|
q as autoSizeRowNumberColumn,
|
|
71
|
-
|
|
75
|
+
Be as computedResult,
|
|
72
76
|
b as createAgGridColDef,
|
|
73
|
-
|
|
77
|
+
Ae as createModel,
|
|
74
78
|
W as defaultMainMenuItems,
|
|
75
|
-
|
|
76
|
-
|
|
79
|
+
ne as defineApp,
|
|
80
|
+
Ce as defineStore,
|
|
77
81
|
w as deselectAll,
|
|
78
|
-
|
|
82
|
+
Te as ensureError,
|
|
79
83
|
K as ensureNodeVisible,
|
|
80
|
-
|
|
84
|
+
De as formatZodError,
|
|
81
85
|
R as getSelectedRowsCount,
|
|
82
86
|
S as getTotalRowsCount,
|
|
83
|
-
|
|
84
|
-
|
|
87
|
+
Ve as identity,
|
|
88
|
+
ve as isDefined,
|
|
85
89
|
T as isSelectionEnabled,
|
|
86
|
-
|
|
90
|
+
Me as isZodError,
|
|
87
91
|
z as makeRowNumberColDef,
|
|
88
|
-
|
|
92
|
+
ke as objectHash,
|
|
89
93
|
D as selectAll,
|
|
90
|
-
|
|
91
|
-
|
|
94
|
+
Oe as unwrapValueOrErrors,
|
|
95
|
+
C as useAgGridOptions,
|
|
92
96
|
L as usePlDataTableSettingsV2,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
97
|
+
xe as useSdkPlugin,
|
|
98
|
+
he as wrapOptionalResult,
|
|
99
|
+
Ge as wrapValueOrErrors
|
|
96
100
|
};
|
|
97
101
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
const f = [
|
|
2
|
+
"B",
|
|
3
|
+
"kB",
|
|
4
|
+
"MB",
|
|
5
|
+
"GB",
|
|
6
|
+
"TB",
|
|
7
|
+
"PB",
|
|
8
|
+
"EB",
|
|
9
|
+
"ZB",
|
|
10
|
+
"YB"
|
|
11
|
+
], o = [
|
|
12
|
+
"B",
|
|
13
|
+
"kiB",
|
|
14
|
+
"MiB",
|
|
15
|
+
"GiB",
|
|
16
|
+
"TiB",
|
|
17
|
+
"PiB",
|
|
18
|
+
"EiB",
|
|
19
|
+
"ZiB",
|
|
20
|
+
"YiB"
|
|
21
|
+
], b = [
|
|
22
|
+
"b",
|
|
23
|
+
"kbit",
|
|
24
|
+
"Mbit",
|
|
25
|
+
"Gbit",
|
|
26
|
+
"Tbit",
|
|
27
|
+
"Pbit",
|
|
28
|
+
"Ebit",
|
|
29
|
+
"Zbit",
|
|
30
|
+
"Ybit"
|
|
31
|
+
], T = [
|
|
32
|
+
"b",
|
|
33
|
+
"kibit",
|
|
34
|
+
"Mibit",
|
|
35
|
+
"Gibit",
|
|
36
|
+
"Tibit",
|
|
37
|
+
"Pibit",
|
|
38
|
+
"Eibit",
|
|
39
|
+
"Zibit",
|
|
40
|
+
"Yibit"
|
|
41
|
+
], n = (i, t) => {
|
|
42
|
+
let B = String(i);
|
|
43
|
+
return typeof t == "string" || Array.isArray(t) ? B = i.toLocaleString(t) : t === !0 && (B = i.toLocaleString(void 0)), B;
|
|
44
|
+
};
|
|
45
|
+
function y(i, t) {
|
|
46
|
+
if (i = typeof i == "bigint" ? Number(i) : i, !Number.isFinite(i))
|
|
47
|
+
throw new TypeError(`Expected a finite number, got ${typeof i}: ${i}`);
|
|
48
|
+
Object.assign({
|
|
49
|
+
bits: !1,
|
|
50
|
+
binary: !1
|
|
51
|
+
}, t);
|
|
52
|
+
const B = t.bits ? t.binary ? T : b : t.binary ? o : f;
|
|
53
|
+
if (t.signed && i === 0)
|
|
54
|
+
return ` 0 ${B[0]}`;
|
|
55
|
+
const e = i < 0, r = e ? "-" : t.signed ? "+" : "";
|
|
56
|
+
if (e && (i = -i), i < 1) {
|
|
57
|
+
const g = n(i, t.locale);
|
|
58
|
+
return r + g + " " + B[0];
|
|
59
|
+
}
|
|
60
|
+
const a = Math.min(Math.floor(t.binary ? Math.log(i) / Math.log(1024) : Math.log10(i) / 3), B.length - 1);
|
|
61
|
+
i /= (t.binary ? 1024 : 1e3) ** a, i = Number(i.toPrecision(3));
|
|
62
|
+
const s = n(Number(i), t.locale), c = B[a];
|
|
63
|
+
return r + s + " " + c;
|
|
64
|
+
}
|
|
65
|
+
export {
|
|
66
|
+
y as prettyBytes
|
|
67
|
+
};
|
|
68
|
+
//# sourceMappingURL=prettyBytes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prettyBytes.js","sources":["../../../../../../../lib/util/helpers/src/prettyBytes.ts"],"sourcesContent":["const BYTE_UNITS = [\n 'B',\n 'kB',\n 'MB',\n 'GB',\n 'TB',\n 'PB',\n 'EB',\n 'ZB',\n 'YB',\n];\n\nconst BIBYTE_UNITS = [\n 'B',\n 'kiB',\n 'MiB',\n 'GiB',\n 'TiB',\n 'PiB',\n 'EiB',\n 'ZiB',\n 'YiB',\n];\n\nconst BIT_UNITS = [\n 'b',\n 'kbit',\n 'Mbit',\n 'Gbit',\n 'Tbit',\n 'Pbit',\n 'Ebit',\n 'Zbit',\n 'Ybit',\n];\n\nconst BIBIT_UNITS = [\n 'b',\n 'kibit',\n 'Mibit',\n 'Gibit',\n 'Tibit',\n 'Pibit',\n 'Eibit',\n 'Zibit',\n 'Yibit',\n];\n\ntype Options = {\n bits?: boolean;\n binary?: boolean;\n signed?: boolean;\n locale?: string;\n};\n\n/*\nFormats the given number using `Number#toLocaleString`.\n- If locale is a string, the value is expected to be a locale-key (for example: `de`).\n- If locale is true, the system default locale is used for translation.\n- If no value for locale is specified, the number is returned unmodified.\n*/\nconst toLocaleString = (number: number, locale: string | undefined) => {\n let result = String(number);\n if (typeof locale === 'string' || Array.isArray(locale)) {\n result = number.toLocaleString(locale);\n } else if (locale === true) {\n result = number.toLocaleString(undefined);\n }\n\n return result;\n};\n\nexport function prettyBytes(number: number | bigint, options: Options) {\n number = typeof number === 'bigint' ? Number(number) : number;\n\n if (!Number.isFinite(number)) {\n throw new TypeError(`Expected a finite number, got ${typeof number}: ${number}`);\n }\n\n Object.assign({\n bits: false,\n binary: false,\n }, options);\n\n const UNITS = options.bits\n ? (options.binary ? BIBIT_UNITS : BIT_UNITS)\n : (options.binary ? BIBYTE_UNITS : BYTE_UNITS);\n\n if (options.signed && number === 0) {\n return ` 0 ${UNITS[0]}`;\n }\n\n const isNegative = number < 0;\n const prefix = isNegative ? '-' : (options.signed ? '+' : '');\n\n if (isNegative) {\n number = -number;\n }\n\n let localeOptions;\n\n if (number < 1) {\n const numberString = toLocaleString(number, options.locale);\n return prefix + numberString + ' ' + UNITS[0];\n }\n\n const exponent = Math.min(Math.floor(options.binary ? Math.log(number) / Math.log(1024) : Math.log10(number) / 3), UNITS.length - 1);\n number /= (options.binary ? 1024 : 1000) ** exponent;\n\n if (!localeOptions) {\n number = Number(number.toPrecision(3));\n }\n\n const numberString = toLocaleString(Number(number), options.locale);\n\n const unit = UNITS[exponent];\n\n return prefix + numberString + ' ' + unit;\n}\n"],"names":["BYTE_UNITS","BIBYTE_UNITS","BIT_UNITS","BIBIT_UNITS","toLocaleString","number","locale","result","prettyBytes","options","UNITS","isNegative","prefix","numberString","exponent","unit"],"mappings":"AAAA,MAAMA,IAAa;AAAA,EACjB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAEKC,IAAe;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAEKC,IAAY;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAEKC,IAAc;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAeKC,IAAiB,CAACC,GAAgBC,MAA8B;AACpE,MAAIC,IAAS,OAAOF,CAAM;AAC1B,SAAI,OAAOC,KAAW,YAAY,MAAM,QAAQA,CAAM,IACpDC,IAASF,EAAO,eAAeC,CAAM,IAC5BA,MAAW,OACpBC,IAASF,EAAO,eAAe,MAAS,IAGnCE;AACT;AAEM,SAAUC,EAAYH,GAAyBI,GAAgB;AAGnE,MAFAJ,IAAS,OAAOA,KAAW,WAAW,OAAOA,CAAM,IAAIA,GAEnD,CAAC,OAAO,SAASA,CAAM;AACzB,UAAM,IAAI,UAAU,iCAAiC,OAAOA,CAAM,KAAKA,CAAM,EAAE;AAGjF,SAAO,OAAO;AAAA,IACZ,MAAM;AAAA,IACN,QAAQ;AAAA,EACT,GAAEI,CAAO;AAEV,QAAMC,IAAQD,EAAQ,OACjBA,EAAQ,SAASN,IAAcD,IAC/BO,EAAQ,SAASR,IAAeD;AAErC,MAAIS,EAAQ,UAAUJ,MAAW;AAC/B,WAAO,MAAMK,EAAM,CAAC,CAAC;AAGvB,QAAMC,IAAaN,IAAS,GACtBO,IAASD,IAAa,MAAOF,EAAQ,SAAS,MAAM;AAQ1D,MANIE,MACFN,IAAS,CAACA,IAKRA,IAAS,GAAG;AACd,UAAMQ,IAAeT,EAAeC,GAAQI,EAAQ,MAAM;AAC1D,WAAOG,IAASC,IAAe,MAAMH,EAAM,CAAC;AAAA,EAC9C;AAEA,QAAMI,IAAW,KAAK,IAAI,KAAK,MAAML,EAAQ,SAAS,KAAK,IAAIJ,CAAM,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,MAAMA,CAAM,IAAI,CAAC,GAAGK,EAAM,SAAS,CAAC;AACnI,EAAAL,MAAWI,EAAQ,SAAS,OAAO,QAASK,GAG1CT,IAAS,OAAOA,EAAO,YAAY,CAAC,CAAC;AAGvC,QAAMQ,IAAeT,EAAe,OAAOC,CAAM,GAAGI,EAAQ,MAAM,GAE5DM,IAAOL,EAAMI,CAAQ;AAE3B,SAAOF,IAASC,IAAe,MAAME;AACvC;"}
|
package/dist/lib.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export * from './components/PlAgGridColumnManager';
|
|
|
18
18
|
export * from './components/PlTableFilters';
|
|
19
19
|
export * from './components/PlMultiSequenceAlignment';
|
|
20
20
|
export * from './components/PlAnnotations';
|
|
21
|
+
export * from './components/PlBtnExportArchive';
|
|
21
22
|
export * from './defineApp';
|
|
22
23
|
export * from './createModel';
|
|
23
24
|
export * from './types';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@platforma-sdk/ui-vue",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.45.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"styles": "dist/index.js",
|
|
@@ -25,9 +25,11 @@
|
|
|
25
25
|
"@vueuse/integrations": "^13.3.0",
|
|
26
26
|
"d3-format": "^3.1.0",
|
|
27
27
|
"zod": "~3.23.8",
|
|
28
|
+
"@zip.js/zip.js": "^2.8.2",
|
|
29
|
+
"@milaboratories/ptabler-expression-js": "1.1.0",
|
|
30
|
+
"@milaboratories/uikit": "2.5.0",
|
|
28
31
|
"@milaboratories/biowasm-tools": "2.0.0",
|
|
29
|
-
"@
|
|
30
|
-
"@platforma-sdk/model": "1.44.14"
|
|
32
|
+
"@platforma-sdk/model": "1.45.0"
|
|
31
33
|
},
|
|
32
34
|
"devDependencies": {
|
|
33
35
|
"happy-dom": "^15.11.7",
|
|
@@ -43,9 +45,9 @@
|
|
|
43
45
|
"fast-json-patch": "^3.1.1",
|
|
44
46
|
"@faker-js/faker": "^9.2.0",
|
|
45
47
|
"@milaboratories/ts-configs": "1.0.6",
|
|
48
|
+
"@milaboratories/helpers": "1.12.0",
|
|
46
49
|
"@milaboratories/build-configs": "1.0.8",
|
|
47
50
|
"@milaboratories/ts-builder": "1.0.5",
|
|
48
|
-
"@milaboratories/helpers": "1.12.0",
|
|
49
51
|
"@milaboratories/eslint-config": "1.0.4"
|
|
50
52
|
},
|
|
51
53
|
"scripts": {
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
PlElementList,
|
|
8
8
|
PlSidebarItem,
|
|
9
9
|
} from '@milaboratories/uikit';
|
|
10
|
-
import type {
|
|
10
|
+
import type { Annotation } from '../types';
|
|
11
11
|
|
|
12
12
|
// Models
|
|
13
|
-
const annotation = defineModel<
|
|
13
|
+
const annotation = defineModel<Annotation>('annotation', { required: true });
|
|
14
14
|
const selectedStepId = defineModel<undefined | number>('selectedStepId');
|
|
15
15
|
// Emits
|
|
16
16
|
const emits = defineEmits<{
|
|
@@ -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>
|