@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.
Files changed (86) hide show
  1. package/.turbo/turbo-build.log +29 -18
  2. package/.turbo/turbo-type-check.log +1 -1
  3. package/CHANGELOG.md +22 -0
  4. package/dist/AgGridVue/useAgGridOptions.js +3 -2
  5. package/dist/AgGridVue/useAgGridOptions.js.map +1 -1
  6. package/dist/components/PlAgCsvExporter/export-csv.js +10 -9
  7. package/dist/components/PlAgCsvExporter/export-csv.js.map +1 -1
  8. package/dist/components/PlAgDataTable/PlAgRowCount.vue.js +8 -7
  9. package/dist/components/PlAgDataTable/PlAgRowCount.vue.js.map +1 -1
  10. package/dist/components/PlAgRowNumCheckbox/PlAgRowNumCheckbox.vue.js +10 -9
  11. package/dist/components/PlAgRowNumCheckbox/PlAgRowNumCheckbox.vue.js.map +1 -1
  12. package/dist/components/PlAgRowNumHeader.vue.js +3 -2
  13. package/dist/components/PlAgRowNumHeader.vue.js.map +1 -1
  14. package/dist/components/PlAnnotations/components/AnnotationsSidebar.vue.d.ts +4 -4
  15. package/dist/components/PlAnnotations/components/AnnotationsSidebar.vue2.js.map +1 -1
  16. package/dist/components/PlAnnotations/components/DynamicForm.vue.d.ts +5 -4
  17. package/dist/components/PlAnnotations/components/DynamicForm.vue2.js +64 -61
  18. package/dist/components/PlAnnotations/components/DynamicForm.vue2.js.map +1 -1
  19. package/dist/components/PlAnnotations/components/FilterSidebar.vue.d.ts +13 -12
  20. package/dist/components/PlAnnotations/components/FilterSidebar.vue2.js +49 -48
  21. package/dist/components/PlAnnotations/components/FilterSidebar.vue2.js.map +1 -1
  22. package/dist/components/PlAnnotations/components/PlAnnotations.vue.d.ts +19 -0
  23. package/dist/components/PlAnnotations/components/PlAnnotations.vue.js +10 -0
  24. package/dist/components/PlAnnotations/components/PlAnnotations.vue.js.map +1 -0
  25. package/dist/components/PlAnnotations/components/PlAnnotations.vue2.js +66 -0
  26. package/dist/components/PlAnnotations/components/PlAnnotations.vue2.js.map +1 -0
  27. package/dist/components/PlAnnotations/components/PlAnnotations.vue3.js +13 -0
  28. package/dist/components/PlAnnotations/components/PlAnnotations.vue3.js.map +1 -0
  29. package/dist/components/PlAnnotations/components/PlAnnotationsModal.vue.d.ts +6 -13
  30. package/dist/components/PlAnnotations/components/PlAnnotationsModal.vue2.js +35 -78
  31. package/dist/components/PlAnnotations/components/PlAnnotationsModal.vue2.js.map +1 -1
  32. package/dist/components/PlAnnotations/index.d.ts +1 -0
  33. package/dist/components/PlAnnotations/types.d.ts +12 -6
  34. package/dist/components/PlAnnotations/utils.d.ts +4 -4
  35. package/dist/components/PlAnnotations/utils.js +2 -11
  36. package/dist/components/PlAnnotations/utils.js.map +1 -1
  37. package/dist/components/PlBtnExportArchive/Item.vue.d.ts +6 -0
  38. package/dist/components/PlBtnExportArchive/Item.vue.js +10 -0
  39. package/dist/components/PlBtnExportArchive/Item.vue.js.map +1 -0
  40. package/dist/components/PlBtnExportArchive/Item.vue2.js +43 -0
  41. package/dist/components/PlBtnExportArchive/Item.vue2.js.map +1 -0
  42. package/dist/components/PlBtnExportArchive/Item.vue3.js +15 -0
  43. package/dist/components/PlBtnExportArchive/Item.vue3.js.map +1 -0
  44. package/dist/components/PlBtnExportArchive/PlBtnExportArchive.vue.d.ts +34 -0
  45. package/dist/components/PlBtnExportArchive/PlBtnExportArchive.vue.js +10 -0
  46. package/dist/components/PlBtnExportArchive/PlBtnExportArchive.vue.js.map +1 -0
  47. package/dist/components/PlBtnExportArchive/PlBtnExportArchive.vue2.js +154 -0
  48. package/dist/components/PlBtnExportArchive/PlBtnExportArchive.vue2.js.map +1 -0
  49. package/dist/components/PlBtnExportArchive/PlBtnExportArchive.vue3.js +13 -0
  50. package/dist/components/PlBtnExportArchive/PlBtnExportArchive.vue3.js.map +1 -0
  51. package/dist/components/PlBtnExportArchive/Summary.vue.d.ts +10 -0
  52. package/dist/components/PlBtnExportArchive/Summary.vue.js +10 -0
  53. package/dist/components/PlBtnExportArchive/Summary.vue.js.map +1 -0
  54. package/dist/components/PlBtnExportArchive/Summary.vue2.js +42 -0
  55. package/dist/components/PlBtnExportArchive/Summary.vue2.js.map +1 -0
  56. package/dist/components/PlBtnExportArchive/Summary.vue3.js +13 -0
  57. package/dist/components/PlBtnExportArchive/Summary.vue3.js.map +1 -0
  58. package/dist/components/PlBtnExportArchive/index.d.ts +2 -0
  59. package/dist/components/PlBtnExportArchive/types.d.ts +14 -0
  60. package/dist/index.js +44 -40
  61. package/dist/index.js.map +1 -1
  62. package/dist/lib/util/helpers/dist/prettyBytes.js +68 -0
  63. package/dist/lib/util/helpers/dist/prettyBytes.js.map +1 -0
  64. package/dist/lib.d.ts +1 -0
  65. package/package.json +6 -4
  66. package/src/components/PlAgCsvExporter/export-csv.ts +8 -2
  67. package/src/components/PlAnnotations/components/AnnotationsSidebar.vue +2 -2
  68. package/src/components/PlAnnotations/components/DynamicForm.vue +16 -9
  69. package/src/components/PlAnnotations/components/FilterSidebar.vue +23 -13
  70. package/src/components/PlAnnotations/components/PlAnnotations.vue +92 -0
  71. package/src/components/PlAnnotations/components/PlAnnotationsModal.vue +19 -77
  72. package/src/components/PlAnnotations/index.ts +1 -0
  73. package/src/components/PlAnnotations/types.ts +7 -6
  74. package/src/components/PlAnnotations/utils.ts +5 -13
  75. package/src/components/PlBtnExportArchive/Item.vue +66 -0
  76. package/src/components/PlBtnExportArchive/PlBtnExportArchive.vue +235 -0
  77. package/src/components/PlBtnExportArchive/Summary.vue +56 -0
  78. package/src/components/PlBtnExportArchive/index.ts +2 -0
  79. package/src/components/PlBtnExportArchive/types.ts +17 -0
  80. package/src/lib.ts +2 -0
  81. package/dist/components/PlAnnotations/components/PlAnnotationCreateDialog.vue.d.ts +0 -18
  82. package/dist/components/PlAnnotations/components/PlAnnotationCreateDialog.vue.js +0 -73
  83. package/dist/components/PlAnnotations/components/PlAnnotationCreateDialog.vue.js.map +0 -1
  84. package/dist/components/PlAnnotations/components/PlAnnotationCreateDialog.vue2.js +0 -5
  85. package/dist/components/PlAnnotations/components/PlAnnotationCreateDialog.vue2.js.map +0 -1
  86. package/src/components/PlAnnotations/components/PlAnnotationCreateDialog.vue +0 -64
@@ -0,0 +1,154 @@
1
+ import { defineComponent as W, reactive as O, computed as k, ref as V, createElementBlock as N, openBlock as f, Fragment as S, createVNode as x, createBlock as T, unref as z, withModifiers as $, normalizeClass as g, withCtx as R, renderSlot as A, Teleport as M, createCommentVNode as Z, createElementVNode as G, renderList as L } from "vue";
2
+ import { useClickOutside as _, PlBtnGhost as j, PlIcon24 as J, PlIcon16 as K } from "@milaboratories/uikit";
3
+ import { ZipWriter as Q } from "@zip.js/zip.js";
4
+ import U from "./Item.vue.js";
5
+ import { getFileNameFromHandle as X, ChunkedStreamReader as Y, getRawPlatformaInstance as ee } from "@platforma-sdk/model";
6
+ import { uniqueId as te } from "../../lib/util/helpers/dist/strings.js";
7
+ import se from "./Summary.vue.js";
8
+ const ce = /* @__PURE__ */ W({
9
+ __name: "PlBtnExportArchive",
10
+ props: {
11
+ fileExports: {},
12
+ suggestedFileName: {},
13
+ disabled: { type: Boolean },
14
+ filePickerTypes: {},
15
+ strategy: {},
16
+ debugFn: { type: Function }
17
+ },
18
+ setup(B) {
19
+ const r = B, t = O({
20
+ loading: !1,
21
+ name: "",
22
+ exports: void 0,
23
+ showExports: !1
24
+ }), q = (e, s) => {
25
+ var o, y;
26
+ const a = (o = t.exports) == null ? void 0 : o.get(e);
27
+ a && ((y = t.exports) == null || y.set(e, { ...a, ...s }));
28
+ }, F = k(() => r.fileExports !== void 0 && !r.disabled), p = k(() => {
29
+ var e;
30
+ return Array.from(((e = t.exports) == null ? void 0 : e.values()) ?? []);
31
+ }), D = k(() => ({
32
+ fileName: t.name,
33
+ current: p.value.reduce((e, s) => e + s.current, 0),
34
+ size: p.value.reduce((e, s) => e + s.size, 0),
35
+ status: p.value.some((e) => e.status === "in-progress") ? "in-progress" : p.value.every((e) => e.status === "completed") ? "completed" : "pending",
36
+ hasErrors: p.value.some((e) => e.status === "error")
37
+ })), H = async () => {
38
+ var o;
39
+ if (t.loading) {
40
+ t.showExports = !0;
41
+ return;
42
+ }
43
+ if (!F.value || !r.fileExports)
44
+ return;
45
+ const e = `${(/* @__PURE__ */ new Date()).toISOString().split("T")[0]}_Export.zip`, s = [{
46
+ description: "ZIP files",
47
+ accept: {
48
+ "application/zip": [".zip"]
49
+ }
50
+ }], a = await window.showSaveFilePicker({
51
+ types: r.filePickerTypes || s,
52
+ suggestedName: r.suggestedFileName || e
53
+ });
54
+ t.loading = !0, t.name = a.name, t.showExports = !0, t.exports = /* @__PURE__ */ new Map();
55
+ try {
56
+ const y = await a.createWritable(), P = new Q(y, { keepOrder: !0, zip64: !0, bufferedWrite: !1 });
57
+ try {
58
+ const u = [];
59
+ for (const c of r.fileExports) {
60
+ const { importHandle: w, blobHandle: h, fileName: E } = c, d = E ?? X(w), { handle: m, size: n } = h, l = te();
61
+ (o = t.exports) == null || o.set(l, { fileName: d, current: 0, size: n, status: "pending" });
62
+ const v = Y.create({
63
+ fetchChunk: async ({ from: i, to: b }) => (r.debugFn && await r.debugFn(d), await ee().blobDriver.getContent(m, { from: i, to: b })),
64
+ totalSize: n,
65
+ onError: async (i) => (q(l, { status: "error", error: i }), await new Promise((b) => setTimeout(b, 1e3)), "continue")
66
+ });
67
+ u.push({ id: l, fileName: d, size: n, stream: v });
68
+ }
69
+ const I = async (c) => {
70
+ const { id: w, fileName: h, size: E, stream: d } = c, m = (n) => {
71
+ var v, i;
72
+ const l = (v = t.exports) == null ? void 0 : v.get(w);
73
+ l && ((i = t.exports) == null || i.set(w, { ...l, ...n }));
74
+ };
75
+ await P.add(h, d, {
76
+ bufferedWrite: !0,
77
+ onstart: () => {
78
+ m({ status: "in-progress" });
79
+ },
80
+ onprogress: (n) => {
81
+ m({ current: n, status: "in-progress" });
82
+ },
83
+ onend() {
84
+ m({ current: E, status: "completed" });
85
+ }
86
+ });
87
+ };
88
+ if (r.strategy === "parallel")
89
+ await Promise.all(u.map(I));
90
+ else
91
+ for (const c of u)
92
+ await I(c);
93
+ } finally {
94
+ await P.close().catch((u) => {
95
+ console.error("Error closing zip", u);
96
+ });
97
+ }
98
+ } finally {
99
+ t.loading = !1;
100
+ }
101
+ }, C = V();
102
+ return _([C], () => {
103
+ t.showExports = !1;
104
+ }), (e, s) => {
105
+ var a;
106
+ return f(), N(S, null, [
107
+ x(z(j), {
108
+ disabled: !F.value,
109
+ loading: t.loading,
110
+ class: g({ [e.$style["has-exports"]]: t.exports }),
111
+ onClick: $(H, ["stop"])
112
+ }, {
113
+ append: R(() => [
114
+ x(z(J), {
115
+ class: g(e.$style.icon),
116
+ name: "download"
117
+ }, null, 8, ["class"])
118
+ ]),
119
+ default: R(() => [
120
+ A(e.$slots, "default")
121
+ ]),
122
+ _: 3
123
+ }, 8, ["disabled", "loading", "class"]),
124
+ (f(), T(M, { to: "body" }, [
125
+ t.exports && t.showExports ? (f(), N("div", {
126
+ key: 0,
127
+ ref_key: "progressesRef",
128
+ ref: C,
129
+ class: g(e.$style.progresses)
130
+ }, [
131
+ x(z(K), {
132
+ class: g(e.$style.close),
133
+ name: "close",
134
+ onClick: s[0] || (s[0] = $((o) => t.showExports = !1, ["stop"]))
135
+ }, null, 8, ["class"]),
136
+ x(se, { item: D.value }, null, 8, ["item"]),
137
+ G("div", {
138
+ class: g([e.$style.itemsContainer, "pl-scrollable-y"])
139
+ }, [
140
+ (f(!0), N(S, null, L((a = t.exports) == null ? void 0 : a.values(), (o) => (f(), T(U, {
141
+ key: o.fileName,
142
+ item: o
143
+ }, null, 8, ["item"]))), 128))
144
+ ], 2)
145
+ ], 2)) : Z("", !0)
146
+ ]))
147
+ ], 64);
148
+ };
149
+ }
150
+ });
151
+ export {
152
+ ce as default
153
+ };
154
+ //# sourceMappingURL=PlBtnExportArchive.vue2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PlBtnExportArchive.vue2.js","sources":["../../../src/components/PlBtnExportArchive/PlBtnExportArchive.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n PlBtnGhost,\n PlIcon16,\n PlIcon24,\n useClickOutside,\n} from '@milaboratories/uikit';\nimport { ZipWriter } from '@zip.js/zip.js';\nimport { reactive, computed, ref } from 'vue';\nimport type { ExportItem, ExportsMap, FileExportEntry } from './types';\nimport Item from './Item.vue';\nimport { getFileNameFromHandle, ChunkedStreamReader } from '@platforma-sdk/model';\nimport { getRawPlatformaInstance } from '@platforma-sdk/model';\nimport { uniqueId } from '@milaboratories/helpers';\nimport Summary from './Summary.vue';\n\ntype FilePickerAcceptType = {\n description?: string;\n accept?: Record<string, string[]>;\n};\n\nconst props = defineProps<{\n fileExports?: FileExportEntry[];\n suggestedFileName?: string;\n disabled?: boolean;\n filePickerTypes?: FilePickerAcceptType[];\n strategy?: 'parallel'; // default is sequential\n debugFn?: (fileName: string) => Promise<void>;\n}>();\n\nconst defaultData = () => ({\n loading: false,\n name: '',\n exports: undefined as ExportsMap | undefined,\n showExports: false,\n});\n\nconst data = reactive(defaultData());\n\nconst updateExportsItem = (id: string, partial: Partial<ExportItem>) => {\n const it = data.exports?.get(id);\n if (it) {\n data.exports?.set(id, { ...it, ...partial });\n }\n};\n\nconst isReadyToExport = computed(() => {\n return props.fileExports !== undefined && !props.disabled;\n});\n\nconst items = computed(() => {\n return Array.from(data.exports?.values() ?? []);\n});\n\nconst archive = computed<ExportItem>(() => {\n return {\n fileName: data.name,\n current: items.value.reduce((acc, item) => acc + item.current, 0),\n size: items.value.reduce((acc, item) => acc + item.size, 0),\n status: items.value.some((item) => item.status === 'in-progress') ? 'in-progress' : items.value.every((item) => item.status === 'completed') ? 'completed' : 'pending',\n hasErrors: items.value.some((item) => item.status === 'error'),\n };\n});\n\ntype ZipRequest = {\n id: string;\n fileName: string;\n size: number;\n stream: ReadableStream<Uint8Array>;\n};\n\nconst exportRawTsvs = async () => {\n if (data.loading) {\n data.showExports = true;\n return;\n }\n\n if (!isReadyToExport.value || !props.fileExports) {\n return;\n }\n\n const defaultFileName = `${new Date().toISOString().split('T')[0]}_Export.zip`;\n const defaultTypes = [{\n description: 'ZIP files',\n accept: {\n 'application/zip': ['.zip'],\n },\n }];\n\n // @ts-expect-error - type definition issue TODO: fix this\n const newHandle = await window.showSaveFilePicker({\n types: props.filePickerTypes || defaultTypes,\n suggestedName: props.suggestedFileName || defaultFileName,\n });\n\n data.loading = true;\n data.name = newHandle.name;\n data.showExports = true;\n data.exports = new Map();\n\n try {\n const writableStream = await newHandle.createWritable();\n const zip = new ZipWriter(writableStream, { keepOrder: true, zip64: true, bufferedWrite: false });\n try {\n const requests = [] as ZipRequest[];\n\n for (const entry of props.fileExports) {\n const { importHandle, blobHandle, fileName: customFileName } = entry;\n const fileName = customFileName ?? getFileNameFromHandle(importHandle);\n const { handle, size } = blobHandle;\n\n const id = uniqueId();\n\n data.exports?.set(id, { fileName, current: 0, size, status: 'pending' });\n\n const stream = ChunkedStreamReader.create({\n fetchChunk: async ({ from, to }) => {\n if (props.debugFn) {\n await props.debugFn(fileName);\n }\n\n return await getRawPlatformaInstance().blobDriver.getContent(handle, { from, to });\n },\n totalSize: size,\n onError: async (error) => {\n updateExportsItem(id, { status: 'error', error });\n await new Promise((resolve) => setTimeout(resolve, 1000)); // primitive for now\n return 'continue';\n },\n });\n\n // Create a chunked stream reader for efficient streaming\n requests.push({ id, fileName, size, stream });\n }\n\n const processRequest = async (request: ZipRequest) => {\n const { id, fileName, size, stream } = request;\n const update = (partial: Partial<ExportItem>) => {\n const it = data.exports?.get(id);\n if (it) {\n data.exports?.set(id, { ...it, ...partial });\n }\n };\n await zip.add(fileName, stream, {\n bufferedWrite: true,\n onstart: () => {\n update({ status: 'in-progress' });\n return undefined;\n },\n onprogress: (current: number) => {\n update({ current, status: 'in-progress' });\n return undefined;\n },\n onend() {\n update({ current: size, status: 'completed' });\n return undefined;\n },\n });\n };\n\n if (props.strategy === 'parallel') {\n await Promise.all(requests.map(processRequest));\n } else {\n for (const request of requests) {\n await processRequest(request);\n }\n }\n } finally {\n await zip.close().catch((error) => {\n console.error('Error closing zip', error);\n });\n }\n } finally {\n data.loading = false;\n }\n};\n\nconst progressesRef = ref();\n\nuseClickOutside([progressesRef], () => {\n data.showExports = false;\n});\n</script>\n\n<template>\n <PlBtnGhost\n :disabled=\"!isReadyToExport\" :loading=\"data.loading\" :class=\"{ [$style['has-exports']]: data.exports }\"\n @click.stop=\"exportRawTsvs\"\n >\n <slot />\n <template #append>\n <PlIcon24 :class=\"$style.icon\" name=\"download\" />\n </template>\n </PlBtnGhost>\n <Teleport to=\"body\">\n <div v-if=\"data.exports && data.showExports\" ref=\"progressesRef\" :class=\"$style.progresses\">\n <PlIcon16 :class=\"$style.close\" name=\"close\" @click.stop=\"data.showExports = false\" />\n <Summary :item=\"archive\" />\n <div :class=\"$style.itemsContainer\" class=\"pl-scrollable-y\">\n <Item v-for=\"item in data.exports?.values()\" :key=\"item.fileName\" :item=\"item\" />\n </div>\n </div>\n </Teleport>\n</template>\n\n<style module>\n.progresses {\n position: fixed;\n top: 8px;\n right: 8px;\n width: 350px;\n height: auto;\n max-height: 400px;\n overflow: auto;\n background: rgba(0, 0, 0, 0.85);\n border-radius: 8px;\n padding: 20px 8px 8px 20px;\n color: white;\n font-size: 12px;\n font-weight: 600;\n z-index: 1000;\n\n .itemsContainer {\n max-height: 300px;\n }\n\n .close {\n position: absolute;\n top: 8px;\n right: 8px;\n cursor: pointer;\n --icon-color: white;\n }\n}\n</style>\n"],"names":["props","__props","data","reactive","updateExportsItem","id","partial","it","_a","_b","isReadyToExport","computed","items","archive","acc","item","exportRawTsvs","defaultFileName","defaultTypes","newHandle","writableStream","zip","ZipWriter","requests","entry","importHandle","blobHandle","customFileName","fileName","getFileNameFromHandle","handle","size","uniqueId","stream","ChunkedStreamReader","from","to","getRawPlatformaInstance","error","resolve","processRequest","request","update","current","progressesRef","ref","useClickOutside"],"mappings":";;;;;;;;;;;;;;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,0 +1,13 @@
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("._progresses_h5njb_2{position:fixed;top:8px;right:8px;width:350px;height:auto;max-height:400px;overflow:auto;background:#000000d9;border-radius:8px;padding:20px 8px 8px 20px;color:#fff;font-size:12px;font-weight:600;z-index:1000}._progresses_h5njb_2 ._itemsContainer_h5njb_18{max-height:300px}._progresses_h5njb_2 ._close_h5njb_22{position:absolute;top:8px;right:8px;cursor:pointer;--icon-color: white}")),document.head.appendChild(e)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
+ const s = "_progresses_h5njb_2", e = "_itemsContainer_h5njb_18", o = "_close_h5njb_22", n = {
3
+ progresses: s,
4
+ itemsContainer: e,
5
+ close: o
6
+ };
7
+ export {
8
+ o as close,
9
+ n as default,
10
+ e as itemsContainer,
11
+ s as progresses
12
+ };
13
+ //# sourceMappingURL=PlBtnExportArchive.vue3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PlBtnExportArchive.vue3.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -0,0 +1,10 @@
1
+ import { ExportItem } from './types';
2
+ type __VLS_Props = {
3
+ item: ExportItem;
4
+ };
5
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
6
+ cancel: () => any;
7
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
8
+ onCancel?: (() => any) | undefined;
9
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
10
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import s from "./Summary.vue2.js";
2
+ import o from "./Summary.vue3.js";
3
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = {
5
+ $style: o
6
+ }, f = /* @__PURE__ */ t(s, [["__cssModules", m]]);
7
+ export {
8
+ f as default
9
+ };
10
+ //# sourceMappingURL=Summary.vue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Summary.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -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,2 @@
1
+ export { default as PlBtnExportArchive } from './PlBtnExportArchive.vue';
2
+ export type { FileExportEntry } from './types';
@@ -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 u, default as p } from "./components/PlAgDataTable/PlAgDataTableV2.vue.js";
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 P } from "./AgGridVue/useAgGridOptions.js";
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 M } from "./components/PlAgColumnHeader/PlAgColumnHeader.vue.js";
17
- import { default as v } from "./components/PlAgCellFile/PlAgCellFile.vue.js";
18
- import { default as N } from "./components/PlAgCellProgress/PlAgCellProgress.vue.js";
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/PlAnnotationsModal.vue.js";
35
- import { defineApp as ue, useSdkPlugin as pe } from "./defineApp.js";
36
- import { createModel as ie } from "./createModel.js";
37
- import { defineStore as xe } from "./defineStore.js";
38
- import { AgGridTheme as Ae, activateAgGrid as Ce } from "./aggrid.js";
39
- import { MultiError as ce, UnresolvedError as be, ensureError as Ee, formatZodError as we, identity as Re, isDefined as Se, isZodError as Te, unwrapValueOrErrors as De, wrapOptionalResult as Ve, wrapValueOrErrors as Me } from "./utils.js";
40
- import { objectHash as ve } from "./objectHash.js";
41
- import { computedResult as Ne } from "./computedResult.js";
42
- import { ReactiveFileContent as ke } from "./composition/fileContent.js";
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
- Ae as AgGridTheme,
47
+ be as AgGridTheme,
46
48
  m as BlockLayout,
47
49
  J as DeferredCircular,
48
- ce as MultiError,
49
- v as PlAgCellFile,
50
- N as PlAgCellProgress,
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
- M as PlAgColumnHeader,
56
+ v as PlAgColumnHeader,
55
57
  Y as PlAgCsvExporter,
56
58
  j as PlAgDataTableRowNumberColId,
57
- u as PlAgDataTableV2,
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 PlAnnotationsModal,
63
- p as PlDataTableV2,
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
- ke as ReactiveFileContent,
67
- be as UnresolvedError,
70
+ He as ReactiveFileContent,
71
+ Se as UnresolvedError,
68
72
  A as ValueOrErrorsComponent,
69
- Ce as activateAgGrid,
73
+ Ee as activateAgGrid,
70
74
  q as autoSizeRowNumberColumn,
71
- Ne as computedResult,
75
+ Be as computedResult,
72
76
  b as createAgGridColDef,
73
- ie as createModel,
77
+ Ae as createModel,
74
78
  W as defaultMainMenuItems,
75
- ue as defineApp,
76
- xe as defineStore,
79
+ ne as defineApp,
80
+ Ce as defineStore,
77
81
  w as deselectAll,
78
- Ee as ensureError,
82
+ Te as ensureError,
79
83
  K as ensureNodeVisible,
80
- we as formatZodError,
84
+ De as formatZodError,
81
85
  R as getSelectedRowsCount,
82
86
  S as getTotalRowsCount,
83
- Re as identity,
84
- Se as isDefined,
87
+ Ve as identity,
88
+ ve as isDefined,
85
89
  T as isSelectionEnabled,
86
- Te as isZodError,
90
+ Me as isZodError,
87
91
  z as makeRowNumberColDef,
88
- ve as objectHash,
92
+ ke as objectHash,
89
93
  D as selectAll,
90
- De as unwrapValueOrErrors,
91
- P as useAgGridOptions,
94
+ Oe as unwrapValueOrErrors,
95
+ C as useAgGridOptions,
92
96
  L as usePlDataTableSettingsV2,
93
- pe as useSdkPlugin,
94
- Ve as wrapOptionalResult,
95
- Me as wrapValueOrErrors
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;AA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@ 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.44.15",
3
+ "version": "1.45.5",
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",
28
29
  "@milaboratories/biowasm-tools": "2.0.0",
29
- "@milaboratories/uikit": "2.4.30",
30
- "@platforma-sdk/model": "1.44.14"
30
+ "@milaboratories/ptabler-expression-js": "1.1.0",
31
+ "@milaboratories/uikit": "2.5.0",
32
+ "@platforma-sdk/model": "1.45.0"
31
33
  },
32
34
  "devDependencies": {
33
35
  "happy-dom": "^15.11.7",
@@ -44,8 +46,8 @@
44
46
  "@faker-js/faker": "^9.2.0",
45
47
  "@milaboratories/ts-configs": "1.0.6",
46
48
  "@milaboratories/build-configs": "1.0.8",
47
- "@milaboratories/ts-builder": "1.0.5",
48
49
  "@milaboratories/helpers": "1.12.0",
50
+ "@milaboratories/ts-builder": "1.0.5",
49
51
  "@milaboratories/eslint-config": "1.0.4"
50
52
  },
51
53
  "scripts": {
@@ -36,6 +36,7 @@ export async function exportCsv(gridApi: GridApi, completed: () => void) {
36
36
  return completed();
37
37
  }
38
38
 
39
+ let exportStarted = false;
39
40
  const gridDiv = createGridDiv();
40
41
  const gridOptions: GridOptions = {
41
42
  rowModelType: 'serverSide',
@@ -51,7 +52,12 @@ export async function exportCsv(gridApi: GridApi, completed: () => void) {
51
52
  cacheBlockSize: state[0].rowCount,
52
53
  onModelUpdated: (event) => {
53
54
  const state = event.api.getServerSideGroupLevelState();
54
- if (state.length > 0 && state[0].rowCount === state[0].cacheBlockSize) {
55
+ if (
56
+ !exportStarted
57
+ && state.length > 0
58
+ && state[0].rowCount === state[0].cacheBlockSize
59
+ ) {
60
+ exportStarted = true;
55
61
  event.api.exportDataAsCsv();
56
62
  destroyGridDiv(gridDiv);
57
63
  return completed();
@@ -67,4 +73,4 @@ export async function exportCsv(gridApi: GridApi, completed: () => void) {
67
73
  throw Error(`exportCsv unsupported for rowModelType = ${rowModel}`);
68
74
  }
69
75
  }
70
- };
76
+ }
@@ -7,10 +7,10 @@ import {
7
7
  PlElementList,
8
8
  PlSidebarItem,
9
9
  } from '@milaboratories/uikit';
10
- import type { AnnotationScriptUi } from '@platforma-sdk/model';
10
+ import type { Annotation } from '../types';
11
11
 
12
12
  // Models
13
- const annotation = defineModel<AnnotationScriptUi>('annotation', { required: true });
13
+ const annotation = defineModel<Annotation>('annotation', { required: true });
14
14
  const selectedStepId = defineModel<undefined | number>('selectedStepId');
15
15
  // Emits
16
16
  const emits = defineEmits<{