@platforma-sdk/ui-vue 1.44.14 → 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.
Files changed (83) hide show
  1. package/.turbo/turbo-build.log +27 -16
  2. package/.turbo/turbo-type-check.log +1 -1
  3. package/CHANGELOG.md +24 -0
  4. package/dist/AgGridVue/useAgGridOptions.js +3 -2
  5. package/dist/AgGridVue/useAgGridOptions.js.map +1 -1
  6. package/dist/components/PlAgDataTable/PlAgRowCount.vue.js +8 -7
  7. package/dist/components/PlAgDataTable/PlAgRowCount.vue.js.map +1 -1
  8. package/dist/components/PlAgRowNumCheckbox/PlAgRowNumCheckbox.vue.js +10 -9
  9. package/dist/components/PlAgRowNumCheckbox/PlAgRowNumCheckbox.vue.js.map +1 -1
  10. package/dist/components/PlAgRowNumHeader.vue.js +3 -2
  11. package/dist/components/PlAgRowNumHeader.vue.js.map +1 -1
  12. package/dist/components/PlAnnotations/components/AnnotationsSidebar.vue.d.ts +4 -4
  13. package/dist/components/PlAnnotations/components/AnnotationsSidebar.vue2.js.map +1 -1
  14. package/dist/components/PlAnnotations/components/DynamicForm.vue.d.ts +5 -4
  15. package/dist/components/PlAnnotations/components/DynamicForm.vue2.js +64 -61
  16. package/dist/components/PlAnnotations/components/DynamicForm.vue2.js.map +1 -1
  17. package/dist/components/PlAnnotations/components/FilterSidebar.vue.d.ts +13 -12
  18. package/dist/components/PlAnnotations/components/FilterSidebar.vue2.js +49 -48
  19. package/dist/components/PlAnnotations/components/FilterSidebar.vue2.js.map +1 -1
  20. package/dist/components/PlAnnotations/components/PlAnnotations.vue.d.ts +19 -0
  21. package/dist/components/PlAnnotations/components/PlAnnotations.vue.js +10 -0
  22. package/dist/components/PlAnnotations/components/PlAnnotations.vue.js.map +1 -0
  23. package/dist/components/PlAnnotations/components/PlAnnotations.vue2.js +66 -0
  24. package/dist/components/PlAnnotations/components/PlAnnotations.vue2.js.map +1 -0
  25. package/dist/components/PlAnnotations/components/PlAnnotations.vue3.js +13 -0
  26. package/dist/components/PlAnnotations/components/PlAnnotations.vue3.js.map +1 -0
  27. package/dist/components/PlAnnotations/components/PlAnnotationsModal.vue.d.ts +6 -13
  28. package/dist/components/PlAnnotations/components/PlAnnotationsModal.vue2.js +35 -78
  29. package/dist/components/PlAnnotations/components/PlAnnotationsModal.vue2.js.map +1 -1
  30. package/dist/components/PlAnnotations/index.d.ts +1 -0
  31. package/dist/components/PlAnnotations/types.d.ts +12 -6
  32. package/dist/components/PlAnnotations/utils.d.ts +4 -4
  33. package/dist/components/PlAnnotations/utils.js +2 -11
  34. package/dist/components/PlAnnotations/utils.js.map +1 -1
  35. package/dist/components/PlBtnExportArchive/Item.vue.d.ts +6 -0
  36. package/dist/components/PlBtnExportArchive/Item.vue.js +10 -0
  37. package/dist/components/PlBtnExportArchive/Item.vue.js.map +1 -0
  38. package/dist/components/PlBtnExportArchive/Item.vue2.js +43 -0
  39. package/dist/components/PlBtnExportArchive/Item.vue2.js.map +1 -0
  40. package/dist/components/PlBtnExportArchive/Item.vue3.js +15 -0
  41. package/dist/components/PlBtnExportArchive/Item.vue3.js.map +1 -0
  42. package/dist/components/PlBtnExportArchive/PlBtnExportArchive.vue.d.ts +34 -0
  43. package/dist/components/PlBtnExportArchive/PlBtnExportArchive.vue.js +10 -0
  44. package/dist/components/PlBtnExportArchive/PlBtnExportArchive.vue.js.map +1 -0
  45. package/dist/components/PlBtnExportArchive/PlBtnExportArchive.vue2.js +154 -0
  46. package/dist/components/PlBtnExportArchive/PlBtnExportArchive.vue2.js.map +1 -0
  47. package/dist/components/PlBtnExportArchive/PlBtnExportArchive.vue3.js +13 -0
  48. package/dist/components/PlBtnExportArchive/PlBtnExportArchive.vue3.js.map +1 -0
  49. package/dist/components/PlBtnExportArchive/Summary.vue.d.ts +10 -0
  50. package/dist/components/PlBtnExportArchive/Summary.vue.js +10 -0
  51. package/dist/components/PlBtnExportArchive/Summary.vue.js.map +1 -0
  52. package/dist/components/PlBtnExportArchive/Summary.vue2.js +42 -0
  53. package/dist/components/PlBtnExportArchive/Summary.vue2.js.map +1 -0
  54. package/dist/components/PlBtnExportArchive/Summary.vue3.js +13 -0
  55. package/dist/components/PlBtnExportArchive/Summary.vue3.js.map +1 -0
  56. package/dist/components/PlBtnExportArchive/index.d.ts +2 -0
  57. package/dist/components/PlBtnExportArchive/types.d.ts +14 -0
  58. package/dist/index.js +44 -40
  59. package/dist/index.js.map +1 -1
  60. package/dist/lib/util/helpers/dist/prettyBytes.js +68 -0
  61. package/dist/lib/util/helpers/dist/prettyBytes.js.map +1 -0
  62. package/dist/lib.d.ts +1 -0
  63. package/package.json +8 -6
  64. package/src/components/PlAnnotations/components/AnnotationsSidebar.vue +2 -2
  65. package/src/components/PlAnnotations/components/DynamicForm.vue +16 -9
  66. package/src/components/PlAnnotations/components/FilterSidebar.vue +23 -13
  67. package/src/components/PlAnnotations/components/PlAnnotations.vue +92 -0
  68. package/src/components/PlAnnotations/components/PlAnnotationsModal.vue +19 -77
  69. package/src/components/PlAnnotations/index.ts +1 -0
  70. package/src/components/PlAnnotations/types.ts +7 -6
  71. package/src/components/PlAnnotations/utils.ts +5 -13
  72. package/src/components/PlBtnExportArchive/Item.vue +66 -0
  73. package/src/components/PlBtnExportArchive/PlBtnExportArchive.vue +235 -0
  74. package/src/components/PlBtnExportArchive/Summary.vue +56 -0
  75. package/src/components/PlBtnExportArchive/index.ts +2 -0
  76. package/src/components/PlBtnExportArchive/types.ts +17 -0
  77. package/src/lib.ts +2 -0
  78. package/dist/components/PlAnnotations/components/PlAnnotationCreateDialog.vue.d.ts +0 -18
  79. package/dist/components/PlAnnotations/components/PlAnnotationCreateDialog.vue.js +0 -73
  80. package/dist/components/PlAnnotations/components/PlAnnotationCreateDialog.vue.js.map +0 -1
  81. package/dist/components/PlAnnotations/components/PlAnnotationCreateDialog.vue2.js +0 -5
  82. package/dist/components/PlAnnotations/components/PlAnnotationCreateDialog.vue2.js.map +0 -1
  83. package/src/components/PlAnnotations/components/PlAnnotationCreateDialog.vue +0 -64
@@ -1,94 +1,51 @@
1
- import { defineComponent as I, mergeModels as F, useModel as S, shallowRef as M, computed as u, effect as A, createElementBlock as w, openBlock as C, Fragment as B, createVNode as d, unref as y, normalizeClass as i, withCtx as c, createBlock as D, createCommentVNode as U } from "vue";
2
- import { isNil as g } from "../../../lib/util/helpers/dist/utils.js";
3
- import { useConfirm as $, PlPureSlideModal as k, PlSidebarGroup as N } from "@milaboratories/uikit";
4
- import { getDefaultAnnotationScript as P } from "../utils.js";
5
- import R from "./AnnotationsSidebar.vue.js";
6
- import q from "./FilterSidebar.vue.js";
7
- import G from "./PlAnnotationCreateDialog.vue.js";
8
- const H = /* @__PURE__ */ I({
1
+ import { defineComponent as c, mergeModels as r, useModel as d, shallowRef as p, effect as f, createBlock as S, openBlock as v, unref as h, normalizeClass as i, withCtx as C, createVNode as V } from "vue";
2
+ import { PlPureSlideModal as y } from "@milaboratories/uikit";
3
+ import g from "./PlAnnotations.vue.js";
4
+ const B = /* @__PURE__ */ c({
9
5
  __name: "PlAnnotationsModal",
10
- props: /* @__PURE__ */ F({
6
+ props: /* @__PURE__ */ r({
11
7
  columns: {},
12
8
  hasSelectedColumns: { type: Boolean },
13
- getValuesForSelectedColumns: { type: Function }
9
+ getValuesForSelectedColumns: { type: Function },
10
+ onDeleteSchema: { type: Function }
14
11
  }, {
15
- annotation: { required: !0, default: P },
12
+ annotation: { required: !0 },
16
13
  annotationModifiers: {},
17
14
  opened: { type: Boolean, required: !0 },
18
15
  openedModifiers: {}
19
16
  }),
20
17
  emits: ["update:annotation", "update:opened"],
21
- setup(m) {
22
- const e = S(m, "annotation"), n = S(m, "opened"), s = m, a = M(void 0), r = u(() => g(a.value) || g(e.value) ? void 0 : e.value.steps.find((t) => t.id === a.value)), p = u(() => e.value.isCreated === !0), v = u({
23
- get: () => !p.value && n.value,
24
- set: (t) => n.value = t
25
- }), f = u({
26
- get: () => p.value && n.value,
27
- set: (t) => n.value = t
18
+ setup(l) {
19
+ const t = d(l, "annotation"), a = d(l, "opened"), e = l, u = p(void 0);
20
+ f(function() {
21
+ u.value === void 0 && t.value.steps.length > 0 && (u.value = t.value.steps[0].id);
28
22
  });
29
- A(function() {
30
- a.value === void 0 && e.value.steps.length > 0 && (a.value = e.value.steps[0].id);
31
- });
32
- const V = $({
33
- title: "Reset Schema",
34
- message: "Are you sure you want to reset the schema? This action cannot be undone.",
35
- confirmLabel: "Yes, reset",
36
- cancelLabel: "No, cancel"
37
- });
38
- function b(t) {
39
- e.value.isCreated = !0, e.value.mode = t.type, e.value.title = t.name, e.value.steps = [];
40
- }
41
- async function h() {
42
- await V() && (e.value.isCreated = !1, e.value.title = "", e.value.mode = "byClonotype", e.value.steps = [], n.value = !1, a.value = void 0);
23
+ async function m() {
24
+ var o;
25
+ a.value = !1, (o = e.onDeleteSchema) == null || o.call(e);
43
26
  }
44
- return (t, l) => (C(), w(B, null, [
45
- d(G, {
46
- modelValue: v.value,
47
- "onUpdate:modelValue": l[0] || (l[0] = (o) => v.value = o),
48
- onSubmit: b
49
- }, null, 8, ["modelValue"]),
50
- d(y(k), {
51
- modelValue: f.value,
52
- "onUpdate:modelValue": l[4] || (l[4] = (o) => f.value = o),
53
- class: i(t.$style.modal),
54
- width: "768px"
55
- }, {
56
- default: c(() => [
57
- d(y(N), {
58
- class: i(t.$style.sidebarGroup)
59
- }, {
60
- "item-0": c(() => [
61
- d(R, {
62
- annotation: e.value,
63
- "onUpdate:annotation": l[1] || (l[1] = (o) => e.value = o),
64
- selectedStepId: a.value,
65
- "onUpdate:selectedStepId": l[2] || (l[2] = (o) => a.value = o),
66
- class: i(t.$style.sidebarItem),
67
- columns: s.columns,
68
- onDeleteSchema: h
69
- }, null, 8, ["annotation", "selectedStepId", "class", "columns"])
70
- ]),
71
- "item-1": c(() => [
72
- r.value ? (C(), D(q, {
73
- key: 0,
74
- step: r.value,
75
- "onUpdate:step": l[3] || (l[3] = (o) => r.value = o),
76
- class: i(t.$style.sidebarItem),
77
- columns: s.columns,
78
- selectedStepId: a.value,
79
- hasSelectedColumns: s.hasSelectedColumns,
80
- getValuesForSelectedColumns: s.getValuesForSelectedColumns
81
- }, null, 8, ["step", "class", "columns", "selectedStepId", "hasSelectedColumns", "getValuesForSelectedColumns"])) : U("", !0)
82
- ]),
83
- _: 1
84
- }, 8, ["class"])
85
- ]),
86
- _: 1
87
- }, 8, ["modelValue", "class"])
88
- ], 64));
27
+ return (o, n) => (v(), S(h(y), {
28
+ modelValue: a.value,
29
+ "onUpdate:modelValue": n[1] || (n[1] = (s) => a.value = s),
30
+ class: i(o.$style.modal),
31
+ width: "768px"
32
+ }, {
33
+ default: C(() => [
34
+ V(g, {
35
+ annotation: t.value,
36
+ "onUpdate:annotation": n[0] || (n[0] = (s) => t.value = s),
37
+ class: i(o.$style.sidebarItem),
38
+ columns: e.columns,
39
+ "has-selected-columns": e.hasSelectedColumns,
40
+ getValuesForSelectedColumns: e.getValuesForSelectedColumns,
41
+ onDeleteSchema: m
42
+ }, null, 8, ["annotation", "class", "columns", "has-selected-columns", "getValuesForSelectedColumns"])
43
+ ]),
44
+ _: 1
45
+ }, 8, ["modelValue", "class"]));
89
46
  }
90
47
  });
91
48
  export {
92
- H as default
49
+ B as default
93
50
  };
94
51
  //# sourceMappingURL=PlAnnotationsModal.vue2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PlAnnotationsModal.vue2.js","sources":["../../../../src/components/PlAnnotations/components/PlAnnotationsModal.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { isNil } from '@milaboratories/helpers';\nimport { PlPureSlideModal, PlSidebarGroup, useConfirm } from '@milaboratories/uikit';\nimport type { AnnotationScriptUi, PObjectId } from '@platforma-sdk/model';\nimport { computed, effect, shallowRef } from 'vue';\nimport type { SimplifiedUniversalPColumnEntry } from '../types';\nimport { getDefaultAnnotationScript } from '../utils';\nimport AnnotationsSidebar from './AnnotationsSidebar.vue';\nimport FilterSidebar from './FilterSidebar.vue';\nimport PlAnnotationCreateDialog from './PlAnnotationCreateDialog.vue';\n\n// Models\nconst annotation = defineModel<AnnotationScriptUi>('annotation', { required: true, default: getDefaultAnnotationScript });\nconst opened = defineModel<boolean>('opened', { required: true });\n// Props\nconst props = defineProps<{\n columns: SimplifiedUniversalPColumnEntry[];\n hasSelectedColumns: boolean;\n getValuesForSelectedColumns: () => Promise<undefined | { columnId: PObjectId; values: string[] }>;\n}>();\n// State\nconst selectedStepId = shallowRef<number | undefined>(undefined);\nconst selectedStep = computed(() => {\n return isNil(selectedStepId.value) || isNil(annotation.value)\n ? undefined\n : annotation.value.steps.find((step) => step.id === selectedStepId.value);\n});\nconst hasAnnotation = computed(() => annotation.value.isCreated === true);\n\nconst openedDialog = computed({\n get: () => !hasAnnotation.value && opened.value,\n set: (value: boolean) => (opened.value = value),\n});\nconst openedModal = computed({\n get: () => hasAnnotation.value && opened.value,\n set: (value: boolean) => (opened.value = value),\n});\n// Watchers\neffect(function setDefaultStepId() {\n if (selectedStepId.value === undefined && annotation.value.steps.length > 0) {\n selectedStepId.value = annotation.value.steps[0].id;\n }\n});\n// Hooks\nconst confirmResetSchema = useConfirm({\n title: 'Reset Schema',\n message: 'Are you sure you want to reset the schema? This action cannot be undone.',\n confirmLabel: 'Yes, reset',\n cancelLabel: 'No, cancel',\n});\n// Actions\nfunction handleCreateAnnotation(props: { type: 'byClonotype' | 'bySampleAndClonotype'; name: string }) {\n annotation.value.isCreated = true;\n annotation.value.mode = props.type;\n annotation.value.title = props.name;\n annotation.value.steps = [];\n}\n\nasync function handleDeleteSchema() {\n if (await confirmResetSchema()) {\n annotation.value.isCreated = false;\n annotation.value.title = '';\n annotation.value.mode = 'byClonotype';\n annotation.value.steps = [];\n opened.value = false;\n selectedStepId.value = undefined;\n }\n}\n\n</script>\n\n<template>\n <PlAnnotationCreateDialog v-model=\"openedDialog\" @submit=\"handleCreateAnnotation\"/>\n <PlPureSlideModal v-model=\"openedModal\" :class=\"$style.modal\" width=\"768px\">\n <PlSidebarGroup :class=\"$style.sidebarGroup\">\n <template #item-0>\n <AnnotationsSidebar\n v-model:annotation=\"annotation\"\n v-model:selectedStepId=\"selectedStepId\"\n :class=\"$style.sidebarItem\"\n :columns=\"props.columns\"\n @delete-schema=\"handleDeleteSchema\"\n />\n </template>\n <template #item-1>\n <FilterSidebar\n v-if=\"selectedStep\"\n v-model:step=\"selectedStep\"\n :class=\"$style.sidebarItem\"\n :columns=\"props.columns\"\n :selectedStepId=\"selectedStepId\"\n :hasSelectedColumns=\"props.hasSelectedColumns\"\n :getValuesForSelectedColumns=\"props.getValuesForSelectedColumns\"\n />\n </template>\n </PlSidebarGroup>\n </PlPureSlideModal>\n</template>\n\n<style lang=\"scss\" module>\n.modal {\n display: flex;\n}\n\n.sidebarGroup {\n width: 100%;\n height: 100%;\n}\n\n.sidebarItem {\n width: 100%;\n height: 100%;\n}\n</style>\n"],"names":["annotation","_useModel","__props","opened","props","selectedStepId","shallowRef","selectedStep","computed","isNil","step","hasAnnotation","openedDialog","value","openedModal","effect","confirmResetSchema","useConfirm","handleCreateAnnotation","handleDeleteSchema"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAYA,UAAMA,IAAaC,EAA+BC,GAAC,YAAqE,GAClHC,IAASF,EAAoBC,GAAC,QAA4B,GAE1DE,IAAQF,GAMRG,IAAiBC,EAA+B,MAAS,GACzDC,IAAeC,EAAS,MACrBC,EAAMJ,EAAe,KAAK,KAAKI,EAAMT,EAAW,KAAK,IACxD,SACAA,EAAW,MAAM,MAAM,KAAK,CAACU,MAASA,EAAK,OAAOL,EAAe,KAAK,CAC3E,GACKM,IAAgBH,EAAS,MAAMR,EAAW,MAAM,cAAc,EAAI,GAElEY,IAAeJ,EAAS;AAAA,MAC5B,KAAK,MAAM,CAACG,EAAc,SAASR,EAAO;AAAA,MAC1C,KAAK,CAACU,MAAoBV,EAAO,QAAQU;AAAA,IAAA,CAC1C,GACKC,IAAcN,EAAS;AAAA,MAC3B,KAAK,MAAMG,EAAc,SAASR,EAAO;AAAA,MACzC,KAAK,CAACU,MAAoBV,EAAO,QAAQU;AAAA,IAAA,CAC1C;AAED,IAAAE,EAAO,WAA4B;AACjC,MAAIV,EAAe,UAAU,UAAaL,EAAW,MAAM,MAAM,SAAS,MACxEK,EAAe,QAAQL,EAAW,MAAM,MAAM,CAAC,EAAE;AAAA,IAErD,CAAC;AAED,UAAMgB,IAAqBC,EAAW;AAAA,MACpC,OAAO;AAAA,MACP,SAAS;AAAA,MACT,cAAc;AAAA,MACd,aAAa;AAAA,IAAA,CACd;AAED,aAASC,EAAuBd,GAAuE;AACrG,MAAAJ,EAAW,MAAM,YAAY,IAC7BA,EAAW,MAAM,OAAOI,EAAM,MAC9BJ,EAAW,MAAM,QAAQI,EAAM,MAC/BJ,EAAW,MAAM,QAAQ,CAAA;AAAA,IAC3B;AAEA,mBAAemB,IAAqB;AAClC,MAAI,MAAMH,QACRhB,EAAW,MAAM,YAAY,IAC7BA,EAAW,MAAM,QAAQ,IACzBA,EAAW,MAAM,OAAO,eACxBA,EAAW,MAAM,QAAQ,CAAA,GACzBG,EAAO,QAAQ,IACfE,EAAe,QAAQ;AAAA,IAE3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"PlAnnotationsModal.vue2.js","sources":["../../../../src/components/PlAnnotations/components/PlAnnotationsModal.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { PlPureSlideModal } from '@milaboratories/uikit';\nimport { effect, shallowRef } from 'vue';\n\nimport type { Annotation } from '../types';\nimport type { Props } from './PlAnnotations.vue';\nimport PlAnnotations from './PlAnnotations.vue';\n\n// Models\nconst annotation = defineModel<Annotation>('annotation', { required: true });\nconst opened = defineModel<boolean>('opened', { required: true });\n// Props\nconst props = defineProps<Props>();\n// State\nconst selectedStepId = shallowRef<number | undefined>(undefined);\n// Watchers\neffect(function setDefaultStepId() {\n if (selectedStepId.value === undefined && annotation.value.steps.length > 0) {\n selectedStepId.value = annotation.value.steps[0].id;\n }\n});\n// Actions\nasync function handleDeleteSchema() {\n opened.value = false;\n props.onDeleteSchema?.();\n}\n</script>\n\n<template>\n <PlPureSlideModal v-model=\"opened\" :class=\"$style.modal\" width=\"768px\">\n <PlAnnotations\n v-model:annotation=\"annotation\"\n :class=\"$style.sidebarItem\"\n :columns=\"props.columns\"\n :has-selected-columns=\"props.hasSelectedColumns\"\n :getValuesForSelectedColumns=\"props.getValuesForSelectedColumns\"\n @delete-schema=\"handleDeleteSchema\"\n />\n </PlPureSlideModal>\n</template>\n\n<style lang=\"scss\" module>\n.modal {\n display: flex;\n}\n\n.sidebarGroup {\n width: 100%;\n height: 100%;\n}\n\n.sidebarItem {\n width: 100%;\n height: 100%;\n}\n</style>\n"],"names":["annotation","_useModel","opened","__props","props","selectedStepId","shallowRef","effect","handleDeleteSchema","_a"],"mappings":";;;;;;;;;;;;;;;;;;AASA,UAAMA,IAAaC,KAAwB,YAAgC,GACrEC,IAASD,EAAoBE,GAAC,QAA4B,GAE1DC,IAAQD,GAERE,IAAiBC,EAA+B,MAAS;AAE/D,IAAAC,EAAO,WAA4B;AACjC,MAAIF,EAAe,UAAU,UAAaL,EAAW,MAAM,MAAM,SAAS,MACxEK,EAAe,QAAQL,EAAW,MAAM,MAAM,CAAC,EAAE;AAAA,IAErD,CAAC;AAED,mBAAeQ,IAAqB;;AAClC,MAAAN,EAAO,QAAQ,KACfO,IAAAL,EAAM,mBAAN,QAAAK,EAAA,KAAAL;AAAA,IACF;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1,2 @@
1
+ export { default as PlAnnotations } from './components/PlAnnotations.vue';
1
2
  export { default as PlAnnotationsModal } from './components/PlAnnotationsModal.vue';
@@ -1,7 +1,13 @@
1
- import { PColumnSpec, SUniversalPColumnId } from '@platforma-sdk/model';
2
- export type SimplifiedPColumnSpec = Pick<PColumnSpec, 'valueType' | 'annotations'>;
3
- export type SimplifiedUniversalPColumnEntry = {
4
- id: SUniversalPColumnId;
5
- label: string;
6
- obj: SimplifiedPColumnSpec;
1
+ import { FilterSpec as _FilterSpec, AnnotationSpecUi, FilterSpecLeaf, FilterSpecUi } from '@platforma-sdk/model';
2
+ export type { FilterSpecType } from '@platforma-sdk/model';
3
+ export type FilterSpec = _FilterSpec<FilterSpecLeaf, {
4
+ id?: number;
5
+ name?: string;
6
+ isExpanded?: boolean;
7
+ }>;
8
+ export type Filter = FilterSpecUi<Extract<FilterSpec, {
9
+ type: 'and' | 'or';
10
+ }>> & {
11
+ id: number;
7
12
  };
13
+ export type Annotation = AnnotationSpecUi<Filter>;
@@ -1,5 +1,5 @@
1
- import { AnnotationScriptUi, FilterUi, TypeFieldRecord } from '@platforma-sdk/model';
2
- export declare function getDefaultAnnotationScript(): AnnotationScriptUi;
3
- export declare function createDefaultFilterMetadata<T extends Extract<FilterUi, {
1
+ import { FilterSpecTypeFieldRecord } from '@milaboratories/uikit';
2
+ import { FilterSpec } from './types';
3
+ export declare function createDefaultFilterMetadata<T extends Extract<FilterSpec, {
4
4
  column: unknown;
5
- }>>(): TypeFieldRecord<T>;
5
+ }>>(): FilterSpecTypeFieldRecord<T>;
@@ -1,12 +1,4 @@
1
1
  function e() {
2
- return {
3
- isCreated: !1,
4
- title: "My Annotation",
5
- mode: "byClonotype",
6
- steps: []
7
- };
8
- }
9
- function t() {
10
2
  return {
11
3
  column: {
12
4
  label: "Column",
@@ -16,14 +8,13 @@ function t() {
16
8
  },
17
9
  type: {
18
10
  label: "Predicate",
19
- fieldType: "FilterUiType",
11
+ fieldType: "FilterType",
20
12
  defaultValue: () => {
21
13
  }
22
14
  }
23
15
  };
24
16
  }
25
17
  export {
26
- t as createDefaultFilterMetadata,
27
- e as getDefaultAnnotationScript
18
+ e as createDefaultFilterMetadata
28
19
  };
29
20
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sources":["../../../src/components/PlAnnotations/utils.ts"],"sourcesContent":["import type { AnnotationScriptUi, FilterUi, TypeFieldRecord } from '@platforma-sdk/model';\n\nexport function getDefaultAnnotationScript(): AnnotationScriptUi {\n return {\n isCreated: false,\n title: 'My Annotation',\n mode: 'byClonotype',\n steps: [],\n };\n}\n\nexport function createDefaultFilterMetadata<T extends Extract<FilterUi, { column: unknown }>>(): TypeFieldRecord<T> {\n return {\n column: {\n label: 'Column',\n fieldType: 'SUniversalPColumnId',\n defaultValue: () => undefined,\n },\n type: {\n label: 'Predicate',\n fieldType: 'FilterUiType',\n defaultValue: () => undefined,\n },\n } as TypeFieldRecord<T>;\n};\n"],"names":["getDefaultAnnotationScript","createDefaultFilterMetadata"],"mappings":"AAEO,SAASA,IAAiD;AAC/D,SAAO;AAAA,IACL,WAAW;AAAA,IACX,OAAO;AAAA,IACP,MAAM;AAAA,IACN,OAAO,CAAA;AAAA,EAAC;AAEZ;AAEO,SAASC,IAAoG;AAClH,SAAO;AAAA,IACL,QAAQ;AAAA,MACN,OAAO;AAAA,MACP,WAAW;AAAA,MACX,cAAc,MAAA;AAAA;AAAA,IAAM;AAAA,IAEtB,MAAM;AAAA,MACJ,OAAO;AAAA,MACP,WAAW;AAAA,MACX,cAAc,MAAA;AAAA;AAAA,IAAM;AAAA,EACtB;AAEJ;"}
1
+ {"version":3,"file":"utils.js","sources":["../../../src/components/PlAnnotations/utils.ts"],"sourcesContent":["import type { FilterSpecTypeFieldRecord } from '@milaboratories/uikit';\nimport type { FilterSpec } from './types';\n\nexport function createDefaultFilterMetadata<T extends Extract<FilterSpec, { column: unknown }>>(): FilterSpecTypeFieldRecord<T> {\n return {\n column: {\n label: 'Column',\n fieldType: 'SUniversalPColumnId',\n defaultValue: () => undefined,\n },\n type: {\n label: 'Predicate',\n fieldType: 'FilterType',\n defaultValue: () => undefined,\n },\n } as FilterSpecTypeFieldRecord<T>;\n};\n"],"names":["createDefaultFilterMetadata"],"mappings":"AAGO,SAASA,IAAgH;AAC9H,SAAO;AAAA,IACL,QAAQ;AAAA,MACN,OAAO;AAAA,MACP,WAAW;AAAA,MACX,cAAc,MAAA;AAAA;AAAA,IAAM;AAAA,IAEtB,MAAM;AAAA,MACJ,OAAO;AAAA,MACP,WAAW;AAAA,MACX,cAAc,MAAA;AAAA;AAAA,IAAM;AAAA,EACtB;AAEJ;"}
@@ -0,0 +1,6 @@
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, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
6
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import s from "./Item.vue2.js";
2
+ import o from "./Item.vue3.js";
3
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const e = {
5
+ $style: o
6
+ }, f = /* @__PURE__ */ t(s, [["__cssModules", e]]);
7
+ export {
8
+ f as default
9
+ };
10
+ //# sourceMappingURL=Item.vue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Item.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -0,0 +1,43 @@
1
+ import { defineComponent as o, createElementBlock as t, openBlock as i, normalizeClass as s, createElementVNode as l, toDisplayString as r, unref as a, createTextVNode as p } from "vue";
2
+ import { prettyBytes as m } from "../../lib/util/helpers/dist/prettyBytes.js";
3
+ const f = /* @__PURE__ */ o({
4
+ __name: "Item",
5
+ props: {
6
+ item: {}
7
+ },
8
+ setup(d) {
9
+ return (e, n) => (i(), t("div", {
10
+ class: s(e.$style.item)
11
+ }, [
12
+ l("div", {
13
+ class: s(e.$style.name)
14
+ }, r(e.item.fileName), 3),
15
+ e.item.status === "in-progress" ? (i(), t("div", {
16
+ key: 0,
17
+ class: s(e.$style.details)
18
+ }, [
19
+ l("span", null, r(a(m)(e.item.current, {})), 1),
20
+ n[0] || (n[0] = l("span", null, "/", -1)),
21
+ l("span", null, r(a(m)(e.item.size, {})), 1)
22
+ ], 2)) : e.item.status === "completed" ? (i(), t("div", {
23
+ key: 1,
24
+ class: s(e.$style.details)
25
+ }, [
26
+ n[1] || (n[1] = p(" Done ")),
27
+ l("span", null, r(a(m)(e.item.size, {})), 1)
28
+ ], 2)) : e.item.status === "error" ? (i(), t("div", {
29
+ key: 2,
30
+ class: s(e.$style.error)
31
+ }, [
32
+ l("span", null, r(e.item.error), 1)
33
+ ], 2)) : (i(), t("div", {
34
+ key: 3,
35
+ class: s(e.$style.details)
36
+ }, " Pending ", 2))
37
+ ], 2));
38
+ }
39
+ });
40
+ export {
41
+ f as default
42
+ };
43
+ //# sourceMappingURL=Item.vue2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Item.vue2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,15 @@
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("._item_1m4gx_2{display:flex;flex-direction:column;margin-bottom:8px;overflow:hidden;--name-font-size: 12px;--details-font-size: 10px}._name_1m4gx_10{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:var(--name-font-size);font-weight:600}._details_1m4gx_18{font-size:var(--details-font-size);font-weight:400;color:#fff9}._error_1m4gx_24{font-size:var(--details-font-size);font-weight:400;color:var(--txt-error)}._error_1m4gx_24 span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
+ const e = "_item_1m4gx_2", t = "_name_1m4gx_10", _ = "_details_1m4gx_18", m = "_error_1m4gx_24", r = {
3
+ item: e,
4
+ name: t,
5
+ details: _,
6
+ error: m
7
+ };
8
+ export {
9
+ r as default,
10
+ _ as details,
11
+ m as error,
12
+ e as item,
13
+ t as name
14
+ };
15
+ //# sourceMappingURL=Item.vue3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Item.vue3.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -0,0 +1,34 @@
1
+ import { FileExportEntry } from './types';
2
+ type FilePickerAcceptType = {
3
+ description?: string;
4
+ accept?: Record<string, string[]>;
5
+ };
6
+ type __VLS_Props = {
7
+ fileExports?: FileExportEntry[];
8
+ suggestedFileName?: string;
9
+ disabled?: boolean;
10
+ filePickerTypes?: FilePickerAcceptType[];
11
+ strategy?: 'parallel';
12
+ debugFn?: (fileName: string) => Promise<void>;
13
+ };
14
+ declare function __VLS_template(): {
15
+ attrs: Partial<{}>;
16
+ slots: {
17
+ default?(_: {}): any;
18
+ };
19
+ refs: {
20
+ progressesRef: HTMLDivElement;
21
+ };
22
+ rootEl: any;
23
+ };
24
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
25
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
26
+ progressesRef: HTMLDivElement;
27
+ }, any>;
28
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
29
+ export default _default;
30
+ type __VLS_WithTemplateSlots<T, S> = T & {
31
+ new (): {
32
+ $slots: S;
33
+ };
34
+ };
@@ -0,0 +1,10 @@
1
+ import o from "./PlBtnExportArchive.vue2.js";
2
+ import s from "./PlBtnExportArchive.vue3.js";
3
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const r = {
5
+ $style: s
6
+ }, f = /* @__PURE__ */ t(o, [["__cssModules", r]]);
7
+ export {
8
+ f as default
9
+ };
10
+ //# sourceMappingURL=PlBtnExportArchive.vue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PlBtnExportArchive.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -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,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":";;;;;;"}