@platforma-sdk/ui-vue 1.86.0 → 1.86.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 (352) hide show
  1. package/.turbo/turbo-build.log +210 -211
  2. package/.turbo/turbo-formatter$colon$check.log +4 -6
  3. package/.turbo/turbo-linter$colon$check.log +4 -6
  4. package/.turbo/turbo-types$colon$check.log +3 -5
  5. package/CHANGELOG.md +23 -0
  6. package/dist/AgGridVue/AgGridTheme.js +1 -2
  7. package/dist/AgGridVue/AgGridTheme.js.map +1 -1
  8. package/dist/AgGridVue/ag-override.js +1 -2
  9. package/dist/AgGridVue/ag-override.js.map +1 -1
  10. package/dist/AgGridVue/createAgGridColDef.js +2 -3
  11. package/dist/AgGridVue/createAgGridColDef.js.map +1 -1
  12. package/dist/AgGridVue/index.js +5 -4
  13. package/dist/AgGridVue/selection.js +1 -2
  14. package/dist/AgGridVue/selection.js.map +1 -1
  15. package/dist/AgGridVue/useAgGridOptions.js +1 -2
  16. package/dist/AgGridVue/useAgGridOptions.js.map +1 -1
  17. package/dist/_virtual/_plugin-vue_export-helper.js +1 -2
  18. package/dist/components/BlockLayout.js +1 -2
  19. package/dist/components/BlockLayout.js.map +1 -1
  20. package/dist/components/BlockLayout.style.js +3 -3
  21. package/dist/components/BlockLayout.style.js.map +1 -1
  22. package/dist/components/BlockLayout.vue2.js +2 -3
  23. package/dist/components/BlockLayout.vue2.js.map +1 -1
  24. package/dist/components/BlockLoader.js +1 -2
  25. package/dist/components/BlockLoader.js.map +1 -1
  26. package/dist/components/BlockLoader.vue2.js +2 -3
  27. package/dist/components/BlockLoader.vue2.js.map +1 -1
  28. package/dist/components/LoaderPage.js +2 -3
  29. package/dist/components/LoaderPage.js.map +1 -1
  30. package/dist/components/NotFound.js +1 -2
  31. package/dist/components/NotFound.js.map +1 -1
  32. package/dist/components/NotFound.vue2.js +2 -3
  33. package/dist/components/NotFound.vue2.js.map +1 -1
  34. package/dist/components/PlAdvancedFilter/FilterEditor.js +1 -2
  35. package/dist/components/PlAdvancedFilter/FilterEditor.js.map +1 -1
  36. package/dist/components/PlAdvancedFilter/FilterEditor.style.js +16 -16
  37. package/dist/components/PlAdvancedFilter/FilterEditor.style.js.map +1 -1
  38. package/dist/components/PlAdvancedFilter/FilterEditor.vue2.js +4 -5
  39. package/dist/components/PlAdvancedFilter/FilterEditor.vue2.js.map +1 -1
  40. package/dist/components/PlAdvancedFilter/OperandButton.js +1 -2
  41. package/dist/components/PlAdvancedFilter/OperandButton.js.map +1 -1
  42. package/dist/components/PlAdvancedFilter/OperandButton.style.js +6 -6
  43. package/dist/components/PlAdvancedFilter/OperandButton.style.js.map +1 -1
  44. package/dist/components/PlAdvancedFilter/OperandButton.vue2.js +2 -3
  45. package/dist/components/PlAdvancedFilter/OperandButton.vue2.js.map +1 -1
  46. package/dist/components/PlAdvancedFilter/PlAdvancedFilter.js +1 -2
  47. package/dist/components/PlAdvancedFilter/PlAdvancedFilter.js.map +1 -1
  48. package/dist/components/PlAdvancedFilter/PlAdvancedFilter.style.js +11 -11
  49. package/dist/components/PlAdvancedFilter/PlAdvancedFilter.style.js.map +1 -1
  50. package/dist/components/PlAdvancedFilter/PlAdvancedFilter.vue2.js +4 -5
  51. package/dist/components/PlAdvancedFilter/PlAdvancedFilter.vue2.js.map +1 -1
  52. package/dist/components/PlAdvancedFilter/constants.js +1 -2
  53. package/dist/components/PlAdvancedFilter/constants.js.map +1 -1
  54. package/dist/components/PlAdvancedFilter/index.js +4 -5
  55. package/dist/components/PlAdvancedFilter/index.js.map +1 -1
  56. package/dist/components/PlAdvancedFilter/utils.js +2 -3
  57. package/dist/components/PlAdvancedFilter/utils.js.map +1 -1
  58. package/dist/components/PlAgCellFile/PlAgCellFile.js +1 -2
  59. package/dist/components/PlAgCellFile/PlAgCellFile.js.map +1 -1
  60. package/dist/components/PlAgCellFile/PlAgCellFile.vue2.js +2 -3
  61. package/dist/components/PlAgCellFile/PlAgCellFile.vue2.js.map +1 -1
  62. package/dist/components/PlAgCellFile/index.js +1 -1
  63. package/dist/components/PlAgCellProgress/PlAgCellProgress.js +1 -2
  64. package/dist/components/PlAgCellProgress/PlAgCellProgress.js.map +1 -1
  65. package/dist/components/PlAgCellProgress/PlAgCellProgress.vue2.js +2 -3
  66. package/dist/components/PlAgCellProgress/PlAgCellProgress.vue2.js.map +1 -1
  67. package/dist/components/PlAgCellProgress/index.js +1 -1
  68. package/dist/components/PlAgCellStatusTag/PlAgCellStatusTag.js +1 -2
  69. package/dist/components/PlAgCellStatusTag/PlAgCellStatusTag.js.map +1 -1
  70. package/dist/components/PlAgCellStatusTag/PlAgCellStatusTag.vue2.js +2 -3
  71. package/dist/components/PlAgCellStatusTag/PlAgCellStatusTag.vue2.js.map +1 -1
  72. package/dist/components/PlAgCellStatusTag/index.js +1 -1
  73. package/dist/components/PlAgChartHistogramCell/PlAgChartHistogramCell.js +1 -2
  74. package/dist/components/PlAgChartHistogramCell/PlAgChartHistogramCell.js.map +1 -1
  75. package/dist/components/PlAgChartHistogramCell/PlAgChartHistogramCell.vue2.js +2 -3
  76. package/dist/components/PlAgChartHistogramCell/PlAgChartHistogramCell.vue2.js.map +1 -1
  77. package/dist/components/PlAgChartHistogramCell/index.js +1 -1
  78. package/dist/components/PlAgChartStackedBarCell/PlAgChartStackedBarCell.js +1 -2
  79. package/dist/components/PlAgChartStackedBarCell/PlAgChartStackedBarCell.js.map +1 -1
  80. package/dist/components/PlAgChartStackedBarCell/PlAgChartStackedBarCell.vue2.js +2 -3
  81. package/dist/components/PlAgChartStackedBarCell/PlAgChartStackedBarCell.vue2.js.map +1 -1
  82. package/dist/components/PlAgChartStackedBarCell/index.js +1 -1
  83. package/dist/components/PlAgColumnHeader/PlAgColumnHeader.js +1 -2
  84. package/dist/components/PlAgColumnHeader/PlAgColumnHeader.js.map +1 -1
  85. package/dist/components/PlAgColumnHeader/PlAgColumnHeader.vue2.js +2 -3
  86. package/dist/components/PlAgColumnHeader/PlAgColumnHeader.vue2.js.map +1 -1
  87. package/dist/components/PlAgColumnHeader/index.js +1 -1
  88. package/dist/components/PlAgCsvExporter/PlAgCsvExporter.js +1 -2
  89. package/dist/components/PlAgCsvExporter/PlAgCsvExporter.js.map +1 -1
  90. package/dist/components/PlAgCsvExporter/PlAgCsvExporter.vue2.js +2 -3
  91. package/dist/components/PlAgCsvExporter/PlAgCsvExporter.vue2.js.map +1 -1
  92. package/dist/components/PlAgCsvExporter/export-csv.js +3 -4
  93. package/dist/components/PlAgCsvExporter/export-csv.js.map +1 -1
  94. package/dist/components/PlAgCsvExporter/index.js +1 -1
  95. package/dist/components/PlAgDataTable/PlAgDataTableSheets.js +1 -2
  96. package/dist/components/PlAgDataTable/PlAgDataTableSheets.js.map +1 -1
  97. package/dist/components/PlAgDataTable/PlAgDataTableSheets.style.js +3 -3
  98. package/dist/components/PlAgDataTable/PlAgDataTableSheets.style.js.map +1 -1
  99. package/dist/components/PlAgDataTable/PlAgDataTableSheets.vue2.js +4 -5
  100. package/dist/components/PlAgDataTable/PlAgDataTableSheets.vue2.js.map +1 -1
  101. package/dist/components/PlAgDataTable/PlAgDataTableV2.js +1 -2
  102. package/dist/components/PlAgDataTable/PlAgDataTableV2.js.map +1 -1
  103. package/dist/components/PlAgDataTable/PlAgDataTableV2.style.js +5 -5
  104. package/dist/components/PlAgDataTable/PlAgDataTableV2.style.js.map +1 -1
  105. package/dist/components/PlAgDataTable/PlAgDataTableV2.vue2.js +132 -133
  106. package/dist/components/PlAgDataTable/PlAgDataTableV2.vue2.js.map +1 -1
  107. package/dist/components/PlAgDataTable/PlAgOverlayLoading.js +1 -2
  108. package/dist/components/PlAgDataTable/PlAgOverlayLoading.js.map +1 -1
  109. package/dist/components/PlAgDataTable/PlAgOverlayLoading.vue2.js +2 -3
  110. package/dist/components/PlAgDataTable/PlAgOverlayLoading.vue2.js.map +1 -1
  111. package/dist/components/PlAgDataTable/PlAgOverlayNoRows.js +1 -2
  112. package/dist/components/PlAgDataTable/PlAgOverlayNoRows.js.map +1 -1
  113. package/dist/components/PlAgDataTable/PlAgOverlayNoRows.vue2.js +2 -3
  114. package/dist/components/PlAgDataTable/PlAgOverlayNoRows.vue2.js.map +1 -1
  115. package/dist/components/PlAgDataTable/PlAgRowCount.js +1 -2
  116. package/dist/components/PlAgDataTable/PlAgRowCount.js.map +1 -1
  117. package/dist/components/PlAgDataTable/PlAgRowCount.vue2.js +2 -3
  118. package/dist/components/PlAgDataTable/PlAgRowCount.vue2.js.map +1 -1
  119. package/dist/components/PlAgDataTable/compositions/useFilterableColumns.js +1 -2
  120. package/dist/components/PlAgDataTable/compositions/useFilterableColumns.js.map +1 -1
  121. package/dist/components/PlAgDataTable/compositions/useGrid.js +1 -2
  122. package/dist/components/PlAgDataTable/compositions/useGrid.js.map +1 -1
  123. package/dist/components/PlAgDataTable/index.js +11 -11
  124. package/dist/components/PlAgDataTable/index.js.map +1 -1
  125. package/dist/components/PlAgDataTable/pl-ag-overlay-loading.module.js +7 -7
  126. package/dist/components/PlAgDataTable/pl-ag-overlay-loading.module.js.map +1 -1
  127. package/dist/components/PlAgDataTable/sources/common.js +1 -2
  128. package/dist/components/PlAgDataTable/sources/common.js.map +1 -1
  129. package/dist/components/PlAgDataTable/sources/focus-row.js +1 -2
  130. package/dist/components/PlAgDataTable/sources/focus-row.js.map +1 -1
  131. package/dist/components/PlAgDataTable/sources/grid-state.js +3 -4
  132. package/dist/components/PlAgDataTable/sources/grid-state.js.map +1 -1
  133. package/dist/components/PlAgDataTable/sources/menu-items.js +1 -2
  134. package/dist/components/PlAgDataTable/sources/menu-items.js.map +1 -1
  135. package/dist/components/PlAgDataTable/sources/row-number.js +2 -3
  136. package/dist/components/PlAgDataTable/sources/row-number.js.map +1 -1
  137. package/dist/components/PlAgDataTable/sources/table-source-v2.js +8 -15
  138. package/dist/components/PlAgDataTable/sources/table-source-v2.js.map +1 -1
  139. package/dist/components/PlAgDataTable/sources/table-state-v2.js +2 -3
  140. package/dist/components/PlAgDataTable/sources/table-state-v2.js.map +1 -1
  141. package/dist/components/PlAgDataTable/sources/value-rendering.js +6 -9
  142. package/dist/components/PlAgDataTable/sources/value-rendering.js.map +1 -1
  143. package/dist/components/PlAgDataTable/types.js +1 -2
  144. package/dist/components/PlAgDataTable/types.js.map +1 -1
  145. package/dist/components/PlAgGridColumnManager/PlAgGridColumnManager.js +1 -2
  146. package/dist/components/PlAgGridColumnManager/PlAgGridColumnManager.js.map +1 -1
  147. package/dist/components/PlAgGridColumnManager/PlAgGridColumnManager.style.js +6 -6
  148. package/dist/components/PlAgGridColumnManager/PlAgGridColumnManager.style.js.map +1 -1
  149. package/dist/components/PlAgGridColumnManager/PlAgGridColumnManager.vue2.js +19 -20
  150. package/dist/components/PlAgGridColumnManager/PlAgGridColumnManager.vue2.js.map +1 -1
  151. package/dist/components/PlAgGridColumnManager/index.js +1 -1
  152. package/dist/components/PlAgGridColumnManager/useFilteredItems.js +2 -3
  153. package/dist/components/PlAgGridColumnManager/useFilteredItems.js.map +1 -1
  154. package/dist/components/PlAgGridColumnManager/useGridColumns.js +1 -2
  155. package/dist/components/PlAgGridColumnManager/useGridColumns.js.map +1 -1
  156. package/dist/components/PlAgRowNumCheckbox/PlAgRowNumCheckbox.js +1 -2
  157. package/dist/components/PlAgRowNumCheckbox/PlAgRowNumCheckbox.js.map +1 -1
  158. package/dist/components/PlAgRowNumCheckbox/PlAgRowNumCheckbox.vue2.js +2 -3
  159. package/dist/components/PlAgRowNumCheckbox/PlAgRowNumCheckbox.vue2.js.map +1 -1
  160. package/dist/components/PlAgRowNumCheckbox/index.js +1 -1
  161. package/dist/components/PlAgRowNumCheckbox/pl-ag-row-num-checkbox.module.js +7 -7
  162. package/dist/components/PlAgRowNumCheckbox/pl-ag-row-num-checkbox.module.js.map +1 -1
  163. package/dist/components/PlAgRowNumHeader.js +1 -2
  164. package/dist/components/PlAgRowNumHeader.js.map +1 -1
  165. package/dist/components/PlAgRowNumHeader.vue2.js +2 -3
  166. package/dist/components/PlAgRowNumHeader.vue2.js.map +1 -1
  167. package/dist/components/PlAgTextAndButtonCell/PlAgTextAndButtonCell.js +1 -2
  168. package/dist/components/PlAgTextAndButtonCell/PlAgTextAndButtonCell.js.map +1 -1
  169. package/dist/components/PlAgTextAndButtonCell/PlAgTextAndButtonCell.vue2.js +2 -3
  170. package/dist/components/PlAgTextAndButtonCell/PlAgTextAndButtonCell.vue2.js.map +1 -1
  171. package/dist/components/PlAgTextAndButtonCell/index.js +1 -1
  172. package/dist/components/PlAnnotations/components/AnnotationsSidebar.js +1 -2
  173. package/dist/components/PlAnnotations/components/AnnotationsSidebar.js.map +1 -1
  174. package/dist/components/PlAnnotations/components/AnnotationsSidebar.style.js +9 -9
  175. package/dist/components/PlAnnotations/components/AnnotationsSidebar.style.js.map +1 -1
  176. package/dist/components/PlAnnotations/components/AnnotationsSidebar.vue2.js +2 -3
  177. package/dist/components/PlAnnotations/components/AnnotationsSidebar.vue2.js.map +1 -1
  178. package/dist/components/PlAnnotations/components/FilterSidebar.js +1 -2
  179. package/dist/components/PlAnnotations/components/FilterSidebar.js.map +1 -1
  180. package/dist/components/PlAnnotations/components/FilterSidebar.style.js +5 -5
  181. package/dist/components/PlAnnotations/components/FilterSidebar.style.js.map +1 -1
  182. package/dist/components/PlAnnotations/components/FilterSidebar.vue2.js +2 -3
  183. package/dist/components/PlAnnotations/components/FilterSidebar.vue2.js.map +1 -1
  184. package/dist/components/PlAnnotations/components/PlAnnotations.js +1 -2
  185. package/dist/components/PlAnnotations/components/PlAnnotations.js.map +1 -1
  186. package/dist/components/PlAnnotations/components/PlAnnotations.style.js +3 -3
  187. package/dist/components/PlAnnotations/components/PlAnnotations.style.js.map +1 -1
  188. package/dist/components/PlAnnotations/components/PlAnnotations.vue2.js +2 -3
  189. package/dist/components/PlAnnotations/components/PlAnnotations.vue2.js.map +1 -1
  190. package/dist/components/PlAnnotations/components/PlAnnotationsModal.js +1 -2
  191. package/dist/components/PlAnnotations/components/PlAnnotationsModal.js.map +1 -1
  192. package/dist/components/PlAnnotations/components/PlAnnotationsModal.style.js +5 -5
  193. package/dist/components/PlAnnotations/components/PlAnnotationsModal.style.js.map +1 -1
  194. package/dist/components/PlAnnotations/components/PlAnnotationsModal.vue2.js +2 -3
  195. package/dist/components/PlAnnotations/components/PlAnnotationsModal.vue2.js.map +1 -1
  196. package/dist/components/PlAnnotations/components/style.module.js +6 -6
  197. package/dist/components/PlAnnotations/components/style.module.js.map +1 -1
  198. package/dist/components/PlAnnotations/index.js +3 -2
  199. package/dist/components/PlAnnotations/utils.js +1 -2
  200. package/dist/components/PlAnnotations/utils.js.map +1 -1
  201. package/dist/components/PlAppErrorNotificationAlert/PlAppErrorNotificationAlert.js +1 -2
  202. package/dist/components/PlAppErrorNotificationAlert/PlAppErrorNotificationAlert.js.map +1 -1
  203. package/dist/components/PlAppErrorNotificationAlert/PlAppErrorNotificationAlert.vue2.js +2 -3
  204. package/dist/components/PlAppErrorNotificationAlert/PlAppErrorNotificationAlert.vue2.js.map +1 -1
  205. package/dist/components/PlAppErrorNotificationAlert/index.js +1 -1
  206. package/dist/components/PlBtnExportArchive/Item.js +1 -2
  207. package/dist/components/PlBtnExportArchive/Item.js.map +1 -1
  208. package/dist/components/PlBtnExportArchive/Item.style.js +7 -7
  209. package/dist/components/PlBtnExportArchive/Item.style.js.map +1 -1
  210. package/dist/components/PlBtnExportArchive/Item.vue2.js +2 -3
  211. package/dist/components/PlBtnExportArchive/Item.vue2.js.map +1 -1
  212. package/dist/components/PlBtnExportArchive/PlBtnExportArchive.js +1 -2
  213. package/dist/components/PlBtnExportArchive/PlBtnExportArchive.js.map +1 -1
  214. package/dist/components/PlBtnExportArchive/PlBtnExportArchive.style.js +6 -6
  215. package/dist/components/PlBtnExportArchive/PlBtnExportArchive.style.js.map +1 -1
  216. package/dist/components/PlBtnExportArchive/PlBtnExportArchive.vue2.js +16 -17
  217. package/dist/components/PlBtnExportArchive/PlBtnExportArchive.vue2.js.map +1 -1
  218. package/dist/components/PlBtnExportArchive/Summary.js +1 -2
  219. package/dist/components/PlBtnExportArchive/Summary.js.map +1 -1
  220. package/dist/components/PlBtnExportArchive/Summary.style.js +6 -6
  221. package/dist/components/PlBtnExportArchive/Summary.style.js.map +1 -1
  222. package/dist/components/PlBtnExportArchive/Summary.vue2.js +2 -3
  223. package/dist/components/PlBtnExportArchive/Summary.vue2.js.map +1 -1
  224. package/dist/components/PlBtnExportArchive/index.js +1 -1
  225. package/dist/components/PlDatasetSelector/PlDatasetSelector.js +1 -2
  226. package/dist/components/PlDatasetSelector/PlDatasetSelector.js.map +1 -1
  227. package/dist/components/PlDatasetSelector/PlDatasetSelector.vue2.js +3 -8
  228. package/dist/components/PlDatasetSelector/PlDatasetSelector.vue2.js.map +1 -1
  229. package/dist/components/PlDatasetSelector/index.js +1 -1
  230. package/dist/components/PlTableFastSearch/PlTableFastSearch.js +1 -2
  231. package/dist/components/PlTableFastSearch/PlTableFastSearch.js.map +1 -1
  232. package/dist/components/PlTableFastSearch/PlTableFastSearch.vue2.js +2 -3
  233. package/dist/components/PlTableFastSearch/PlTableFastSearch.vue2.js.map +1 -1
  234. package/dist/components/PlTableFastSearch/index.js +1 -1
  235. package/dist/components/PlTableFilters/PlTableFiltersV2.js +1 -2
  236. package/dist/components/PlTableFilters/PlTableFiltersV2.js.map +1 -1
  237. package/dist/components/PlTableFilters/PlTableFiltersV2.style.js +6 -6
  238. package/dist/components/PlTableFilters/PlTableFiltersV2.style.js.map +1 -1
  239. package/dist/components/PlTableFilters/PlTableFiltersV2.vue2.js +8 -7
  240. package/dist/components/PlTableFilters/PlTableFiltersV2.vue2.js.map +1 -1
  241. package/dist/components/PlTableFilters/index.js +1 -1
  242. package/dist/components/PlTableFilters/suggest-source.js +1 -2
  243. package/dist/components/PlTableFilters/suggest-source.js.map +1 -1
  244. package/dist/composition/AgGrid/index.js +1 -2
  245. package/dist/composition/AgGrid/index.js.map +1 -1
  246. package/dist/composition/fileContent.js +9 -5
  247. package/dist/composition/fileContent.js.map +1 -1
  248. package/dist/composition/usePlugin.js +1 -2
  249. package/dist/composition/usePlugin.js.map +1 -1
  250. package/dist/computedResult.js +1 -2
  251. package/dist/computedResult.js.map +1 -1
  252. package/dist/createModel.js +8 -7
  253. package/dist/createModel.js.map +1 -1
  254. package/dist/defineApp.js +5 -3
  255. package/dist/defineApp.js.map +1 -1
  256. package/dist/defineStore.js +1 -2
  257. package/dist/defineStore.js.map +1 -1
  258. package/dist/index.js +1 -2
  259. package/dist/index.js.map +1 -1
  260. package/dist/internal/UpdateSerializer.js +2 -2
  261. package/dist/internal/UpdateSerializer.js.map +1 -1
  262. package/dist/internal/createAppV3.js +2 -3
  263. package/dist/internal/createAppV3.js.map +1 -1
  264. package/dist/internal/getServices.js +4 -5
  265. package/dist/internal/getServices.js.map +1 -1
  266. package/dist/internal/service_factories.js +1 -2
  267. package/dist/internal/service_factories.js.map +1 -1
  268. package/dist/internal/utils.js +1 -2
  269. package/dist/internal/utils.js.map +1 -1
  270. package/dist/lib/util/helpers/dist/functions.js +1 -2
  271. package/dist/lib/util/helpers/dist/functions.js.map +1 -1
  272. package/dist/lib/util/helpers/dist/hash.js +0 -1
  273. package/dist/lib/util/helpers/dist/hash.js.map +1 -1
  274. package/dist/lib/util/helpers/dist/index.js +7 -6
  275. package/dist/lib/util/helpers/dist/objects.js +7 -6
  276. package/dist/lib/util/helpers/dist/objects.js.map +1 -1
  277. package/dist/lib/util/helpers/dist/prettyBytes.js +1 -2
  278. package/dist/lib/util/helpers/dist/prettyBytes.js.map +1 -1
  279. package/dist/lib/util/helpers/dist/random.js +1 -2
  280. package/dist/lib/util/helpers/dist/random.js.map +1 -1
  281. package/dist/lib/util/helpers/dist/strings.js +1 -2
  282. package/dist/lib/util/helpers/dist/strings.js.map +1 -1
  283. package/dist/lib/util/helpers/dist/uniqId.js +1 -2
  284. package/dist/lib/util/helpers/dist/uniqId.js.map +1 -1
  285. package/dist/lib/util/helpers/dist/utils.js +1 -2
  286. package/dist/lib/util/helpers/dist/utils.js.map +1 -1
  287. package/dist/lib.js +38 -38
  288. package/dist/objectHash.js +1 -2
  289. package/dist/objectHash.js.map +1 -1
  290. package/dist/plugins/Monetization/EndOfPeriod.js +1 -2
  291. package/dist/plugins/Monetization/EndOfPeriod.js.map +1 -1
  292. package/dist/plugins/Monetization/EndOfPeriod.style.js +3 -3
  293. package/dist/plugins/Monetization/EndOfPeriod.style.js.map +1 -1
  294. package/dist/plugins/Monetization/EndOfPeriod.vue2.js +2 -3
  295. package/dist/plugins/Monetization/EndOfPeriod.vue2.js.map +1 -1
  296. package/dist/plugins/Monetization/LimitCard.js +1 -2
  297. package/dist/plugins/Monetization/LimitCard.js.map +1 -1
  298. package/dist/plugins/Monetization/LimitCard.style.js +16 -16
  299. package/dist/plugins/Monetization/LimitCard.style.js.map +1 -1
  300. package/dist/plugins/Monetization/LimitCard.vue2.js +3 -4
  301. package/dist/plugins/Monetization/LimitCard.vue2.js.map +1 -1
  302. package/dist/plugins/Monetization/MonetizationSidebar.js +1 -2
  303. package/dist/plugins/Monetization/MonetizationSidebar.js.map +1 -1
  304. package/dist/plugins/Monetization/MonetizationSidebar.vue2.js +2 -3
  305. package/dist/plugins/Monetization/MonetizationSidebar.vue2.js.map +1 -1
  306. package/dist/plugins/Monetization/RunStatus.js +1 -2
  307. package/dist/plugins/Monetization/RunStatus.js.map +1 -1
  308. package/dist/plugins/Monetization/RunStatus.style.js +9 -9
  309. package/dist/plugins/Monetization/RunStatus.style.js.map +1 -1
  310. package/dist/plugins/Monetization/RunStatus.vue2.js +2 -3
  311. package/dist/plugins/Monetization/RunStatus.vue2.js.map +1 -1
  312. package/dist/plugins/Monetization/UserCabinetCard.js +1 -2
  313. package/dist/plugins/Monetization/UserCabinetCard.js.map +1 -1
  314. package/dist/plugins/Monetization/UserCabinetCard.style.js +10 -10
  315. package/dist/plugins/Monetization/UserCabinetCard.style.js.map +1 -1
  316. package/dist/plugins/Monetization/UserCabinetCard.vue2.js +2 -3
  317. package/dist/plugins/Monetization/UserCabinetCard.vue2.js.map +1 -1
  318. package/dist/plugins/Monetization/index.js +1 -1
  319. package/dist/plugins/Monetization/useButtonTarget.js +2 -7
  320. package/dist/plugins/Monetization/useButtonTarget.js.map +1 -1
  321. package/dist/plugins/Monetization/useInfo.js +1 -2
  322. package/dist/plugins/Monetization/useInfo.js.map +1 -1
  323. package/dist/plugins/Monetization/validation.js +2 -3
  324. package/dist/plugins/Monetization/validation.js.map +1 -1
  325. package/dist/urls.js +1 -2
  326. package/dist/urls.js.map +1 -1
  327. package/dist/utils.js +2 -2
  328. package/dist/utils.js.map +1 -1
  329. package/package.json +20 -21
  330. package/src/components/PlAdvancedFilter/FilterEditor.test.ts +1 -1
  331. package/src/components/PlAgDataTable/PlAgDataTableSheets.vue +1 -1
  332. package/src/components/PlAgDataTable/sources/table-state-v2.test.ts +1 -1
  333. package/dist/_virtual/_rolldown/runtime.js +0 -17
  334. /package/dist/components/{BlockLayout.vue.css → BlockLayout.style.css} +0 -0
  335. /package/dist/components/PlAdvancedFilter/{FilterEditor.vue.css → FilterEditor.style.css} +0 -0
  336. /package/dist/components/PlAdvancedFilter/{OperandButton.vue.css → OperandButton.style.css} +0 -0
  337. /package/dist/components/PlAdvancedFilter/{PlAdvancedFilter.vue.css → PlAdvancedFilter.style.css} +0 -0
  338. /package/dist/components/PlAgDataTable/{PlAgDataTableSheets.vue.css → PlAgDataTableSheets.style.css} +0 -0
  339. /package/dist/components/PlAgDataTable/{PlAgDataTableV2.vue.css → PlAgDataTableV2.style.css} +0 -0
  340. /package/dist/components/PlAgGridColumnManager/{PlAgGridColumnManager.vue.css → PlAgGridColumnManager.style.css} +0 -0
  341. /package/dist/components/PlAnnotations/components/{AnnotationsSidebar.vue.css → AnnotationsSidebar.style.css} +0 -0
  342. /package/dist/components/PlAnnotations/components/{FilterSidebar.vue.css → FilterSidebar.style.css} +0 -0
  343. /package/dist/components/PlAnnotations/components/{PlAnnotations.vue.css → PlAnnotations.style.css} +0 -0
  344. /package/dist/components/PlAnnotations/components/{PlAnnotationsModal.vue.css → PlAnnotationsModal.style.css} +0 -0
  345. /package/dist/components/PlBtnExportArchive/{Item.vue.css → Item.style.css} +0 -0
  346. /package/dist/components/PlBtnExportArchive/{PlBtnExportArchive.vue.css → PlBtnExportArchive.style.css} +0 -0
  347. /package/dist/components/PlBtnExportArchive/{Summary.vue.css → Summary.style.css} +0 -0
  348. /package/dist/components/PlTableFilters/{PlTableFiltersV2.vue.css → PlTableFiltersV2.style.css} +0 -0
  349. /package/dist/plugins/Monetization/{EndOfPeriod.vue.css → EndOfPeriod.style.css} +0 -0
  350. /package/dist/plugins/Monetization/{LimitCard.vue.css → LimitCard.style.css} +0 -0
  351. /package/dist/plugins/Monetization/{RunStatus.vue.css → RunStatus.style.css} +0 -0
  352. /package/dist/plugins/Monetization/{UserCabinetCard.vue.css → UserCabinetCard.style.css} +0 -0
@@ -1 +1 @@
1
- import "./PlAppErrorNotificationAlert.js";
1
+ export { default as PlAppErrorNotificationAlert } from "./PlAppErrorNotificationAlert.js";
@@ -1,8 +1,7 @@
1
1
  import e from "../../_virtual/_plugin-vue_export-helper.js";
2
2
  import t from "./Item.vue2.js";
3
3
  import n from "./Item.style.js";
4
- var r = /* @__PURE__ */ e(t, [["__cssModules", { $style: n }]]);
5
- //#endregion
4
+ var r = /*#__PURE__*/ e(t, [["__cssModules", { $style: n }]]);
6
5
  export { r as default };
7
6
 
8
7
  //# sourceMappingURL=Item.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Item.js","names":[],"sources":["../../../src/components/PlBtnExportArchive/Item.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { ExportItem } from \"./types\";\nimport { prettyBytes } from \"@milaboratories/helpers\";\n\ndefineProps<{\n item: ExportItem;\n}>();\n</script>\n\n<template>\n <div data-testid=\"pl-btn-export-archive-item\" :class=\"$style.item\">\n <div data-testid=\"pl-btn-export-archive-item-name\" :class=\"$style.name\">\n {{ item.fileName }}\n </div>\n <div\n v-if=\"item.status === 'in-progress'\"\n data-testid=\"pl-btn-export-archive-item-status\"\n :class=\"$style.details\"\n >\n <span>{{ prettyBytes(item.current, {}) }}</span>\n <span>/</span>\n <span>{{ prettyBytes(item.size, {}) }}</span>\n </div>\n <div\n v-else-if=\"item.status === 'completed'\"\n data-testid=\"pl-btn-export-archive-item-status\"\n :class=\"$style.details\"\n >\n Done <span>{{ prettyBytes(item.size, {}) }}</span>\n </div>\n <div\n v-else-if=\"item.status === 'error'\"\n data-testid=\"pl-btn-export-archive-item-error\"\n :class=\"$style.error\"\n >\n <span>{{ item.error }}</span>\n </div>\n <div v-else data-testid=\"pl-btn-export-archive-item-status\" :class=\"$style.details\">\n Pending\n </div>\n </div>\n</template>\n\n<style module>\n.item {\n display: flex;\n flex-direction: column;\n margin-bottom: 8px;\n overflow: hidden;\n --name-font-size: 12px;\n --details-font-size: 10px;\n}\n.name {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: var(--name-font-size);\n font-weight: 600;\n}\n\n.details {\n font-size: var(--details-font-size);\n font-weight: 400;\n color: rgba(255, 255, 255, 0.6);\n}\n\n.error {\n font-size: var(--details-font-size);\n font-weight: 400;\n color: var(--txt-error);\n span {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 100%;\n }\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"Item.js","names":["style0","_sfc_main","_plugin_vue_export_helper_default","Item_vue_vue_type_script_setup_true_lang_default","Item_vue_vue_type_style_index_0_lang_module_default","Item_default","\"$style\""],"sources":["../../../src/components/PlBtnExportArchive/Item.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { ExportItem } from \"./types\";\nimport { prettyBytes } from \"@milaboratories/helpers\";\n\ndefineProps<{\n item: ExportItem;\n}>();\n</script>\n\n<template>\n <div data-testid=\"pl-btn-export-archive-item\" :class=\"$style.item\">\n <div data-testid=\"pl-btn-export-archive-item-name\" :class=\"$style.name\">\n {{ item.fileName }}\n </div>\n <div\n v-if=\"item.status === 'in-progress'\"\n data-testid=\"pl-btn-export-archive-item-status\"\n :class=\"$style.details\"\n >\n <span>{{ prettyBytes(item.current, {}) }}</span>\n <span>/</span>\n <span>{{ prettyBytes(item.size, {}) }}</span>\n </div>\n <div\n v-else-if=\"item.status === 'completed'\"\n data-testid=\"pl-btn-export-archive-item-status\"\n :class=\"$style.details\"\n >\n Done <span>{{ prettyBytes(item.size, {}) }}</span>\n </div>\n <div\n v-else-if=\"item.status === 'error'\"\n data-testid=\"pl-btn-export-archive-item-error\"\n :class=\"$style.error\"\n >\n <span>{{ item.error }}</span>\n </div>\n <div v-else data-testid=\"pl-btn-export-archive-item-status\" :class=\"$style.details\">\n Pending\n </div>\n </div>\n</template>\n\n<style module>\n.item {\n display: flex;\n flex-direction: column;\n margin-bottom: 8px;\n overflow: hidden;\n --name-font-size: 12px;\n --details-font-size: 10px;\n}\n.name {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: var(--name-font-size);\n font-weight: 600;\n}\n\n.details {\n font-size: var(--details-font-size);\n font-weight: 400;\n color: rgba(255, 255, 255, 0.6);\n}\n\n.error {\n font-size: var(--details-font-size);\n font-weight: 400;\n color: var(--txt-error);\n span {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 100%;\n }\n}\n</style>\n"],"mappings":""}
@@ -1,10 +1,10 @@
1
- import './Item.vue.css';var e = {
2
- item: "_item_1m4gx_2",
3
- name: "_name_1m4gx_10",
4
- details: "_details_1m4gx_18",
5
- error: "_error_1m4gx_24"
1
+ import './Item.style.css';// src/components/PlBtnExportArchive/Item.vue?vue&type=style&index=0&lang.module.css
2
+ var e = "_item_1m4gx_2", t = "_name_1m4gx_10", n = "_details_1m4gx_18", r = "_error_1m4gx_24", i = {
3
+ item: e,
4
+ name: t,
5
+ details: n,
6
+ error: r
6
7
  };
7
- //#endregion
8
- export { e as default };
8
+ export { i as default, n as details, r as error, e as item, t as name };
9
9
 
10
10
  //# sourceMappingURL=Item.style.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Item.vue_vue_type_style_index_0_lang.module.js","names":[],"sources":["../../../src/components/PlBtnExportArchive/Item.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { ExportItem } from \"./types\";\nimport { prettyBytes } from \"@milaboratories/helpers\";\n\ndefineProps<{\n item: ExportItem;\n}>();\n</script>\n\n<template>\n <div data-testid=\"pl-btn-export-archive-item\" :class=\"$style.item\">\n <div data-testid=\"pl-btn-export-archive-item-name\" :class=\"$style.name\">\n {{ item.fileName }}\n </div>\n <div\n v-if=\"item.status === 'in-progress'\"\n data-testid=\"pl-btn-export-archive-item-status\"\n :class=\"$style.details\"\n >\n <span>{{ prettyBytes(item.current, {}) }}</span>\n <span>/</span>\n <span>{{ prettyBytes(item.size, {}) }}</span>\n </div>\n <div\n v-else-if=\"item.status === 'completed'\"\n data-testid=\"pl-btn-export-archive-item-status\"\n :class=\"$style.details\"\n >\n Done <span>{{ prettyBytes(item.size, {}) }}</span>\n </div>\n <div\n v-else-if=\"item.status === 'error'\"\n data-testid=\"pl-btn-export-archive-item-error\"\n :class=\"$style.error\"\n >\n <span>{{ item.error }}</span>\n </div>\n <div v-else data-testid=\"pl-btn-export-archive-item-status\" :class=\"$style.details\">\n Pending\n </div>\n </div>\n</template>\n\n<style module>\n.item {\n display: flex;\n flex-direction: column;\n margin-bottom: 8px;\n overflow: hidden;\n --name-font-size: 12px;\n --details-font-size: 10px;\n}\n.name {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: var(--name-font-size);\n font-weight: 600;\n}\n\n.details {\n font-size: var(--details-font-size);\n font-weight: 400;\n color: rgba(255, 255, 255, 0.6);\n}\n\n.error {\n font-size: var(--details-font-size);\n font-weight: 400;\n color: var(--txt-error);\n span {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 100%;\n }\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"Item.vue_vue_type_style_index_0_lang.module.js","names":["item","name","details","error","Item_vue_vue_type_style_index_0_lang_module_default"],"sources":["../../../src/components/PlBtnExportArchive/Item.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { ExportItem } from \"./types\";\nimport { prettyBytes } from \"@milaboratories/helpers\";\n\ndefineProps<{\n item: ExportItem;\n}>();\n</script>\n\n<template>\n <div data-testid=\"pl-btn-export-archive-item\" :class=\"$style.item\">\n <div data-testid=\"pl-btn-export-archive-item-name\" :class=\"$style.name\">\n {{ item.fileName }}\n </div>\n <div\n v-if=\"item.status === 'in-progress'\"\n data-testid=\"pl-btn-export-archive-item-status\"\n :class=\"$style.details\"\n >\n <span>{{ prettyBytes(item.current, {}) }}</span>\n <span>/</span>\n <span>{{ prettyBytes(item.size, {}) }}</span>\n </div>\n <div\n v-else-if=\"item.status === 'completed'\"\n data-testid=\"pl-btn-export-archive-item-status\"\n :class=\"$style.details\"\n >\n Done <span>{{ prettyBytes(item.size, {}) }}</span>\n </div>\n <div\n v-else-if=\"item.status === 'error'\"\n data-testid=\"pl-btn-export-archive-item-error\"\n :class=\"$style.error\"\n >\n <span>{{ item.error }}</span>\n </div>\n <div v-else data-testid=\"pl-btn-export-archive-item-status\" :class=\"$style.details\">\n Pending\n </div>\n </div>\n</template>\n\n<style module>\n.item {\n display: flex;\n flex-direction: column;\n margin-bottom: 8px;\n overflow: hidden;\n --name-font-size: 12px;\n --details-font-size: 10px;\n}\n.name {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: var(--name-font-size);\n font-weight: 600;\n}\n\n.details {\n font-size: var(--details-font-size);\n font-weight: 400;\n color: rgba(255, 255, 255, 0.6);\n}\n\n.error {\n font-size: var(--details-font-size);\n font-weight: 400;\n color: var(--txt-error);\n span {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 100%;\n }\n}\n</style>\n"],"mappings":""}
@@ -1,8 +1,8 @@
1
1
  import { prettyBytes as e } from "../../lib/util/helpers/dist/prettyBytes.js";
2
2
  import "../../lib/util/helpers/dist/index.js";
3
3
  import { createElementBlock as t, createElementVNode as n, createTextVNode as r, defineComponent as i, normalizeClass as a, openBlock as o, toDisplayString as s, unref as c } from "vue";
4
- //#region src/components/PlBtnExportArchive/Item.vue?vue&type=script&setup=true&lang.ts
5
- var l = /* @__PURE__ */ i({
4
+ // src/components/PlBtnExportArchive/Item.vue?vue&type=script&setup=true&lang.ts
5
+ var l = /*@__PURE__*/ i({
6
6
  __name: "Item",
7
7
  props: { item: {} },
8
8
  setup(i) {
@@ -35,7 +35,6 @@ var l = /* @__PURE__ */ i({
35
35
  }, " Pending ", 2))], 2));
36
36
  }
37
37
  });
38
- //#endregion
39
38
  export { l as default };
40
39
 
41
40
  //# sourceMappingURL=Item.vue2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Item.vue_vue_type_script_setup_true_lang.js","names":["$style"],"sources":["../../../src/components/PlBtnExportArchive/Item.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { ExportItem } from \"./types\";\nimport { prettyBytes } from \"@milaboratories/helpers\";\n\ndefineProps<{\n item: ExportItem;\n}>();\n</script>\n\n<template>\n <div data-testid=\"pl-btn-export-archive-item\" :class=\"$style.item\">\n <div data-testid=\"pl-btn-export-archive-item-name\" :class=\"$style.name\">\n {{ item.fileName }}\n </div>\n <div\n v-if=\"item.status === 'in-progress'\"\n data-testid=\"pl-btn-export-archive-item-status\"\n :class=\"$style.details\"\n >\n <span>{{ prettyBytes(item.current, {}) }}</span>\n <span>/</span>\n <span>{{ prettyBytes(item.size, {}) }}</span>\n </div>\n <div\n v-else-if=\"item.status === 'completed'\"\n data-testid=\"pl-btn-export-archive-item-status\"\n :class=\"$style.details\"\n >\n Done <span>{{ prettyBytes(item.size, {}) }}</span>\n </div>\n <div\n v-else-if=\"item.status === 'error'\"\n data-testid=\"pl-btn-export-archive-item-error\"\n :class=\"$style.error\"\n >\n <span>{{ item.error }}</span>\n </div>\n <div v-else data-testid=\"pl-btn-export-archive-item-status\" :class=\"$style.details\">\n Pending\n </div>\n </div>\n</template>\n\n<style module>\n.item {\n display: flex;\n flex-direction: column;\n margin-bottom: 8px;\n overflow: hidden;\n --name-font-size: 12px;\n --details-font-size: 10px;\n}\n.name {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: var(--name-font-size);\n font-weight: 600;\n}\n\n.details {\n font-size: var(--details-font-size);\n font-weight: 400;\n color: rgba(255, 255, 255, 0.6);\n}\n\n.error {\n font-size: var(--details-font-size);\n font-weight: 400;\n color: var(--txt-error);\n span {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 100%;\n }\n}\n</style>\n"],"mappings":";;;;;;;;yBAUE,EA8BM,OAAA;GA9BD,eAAY;GAA8B,OAAK,EAAEA,EAAAA,OAAO,KAAI;MAC/D,EAEM,OAAA;GAFD,eAAY;GAAmC,OAAK,EAAEA,EAAAA,OAAO,KAAI;OACjE,EAAA,KAAK,SAAQ,EAAA,EAAA,EAGV,EAAA,KAAK,WAAM,iBAAA,GAAA,EADnB,EAQM,OAAA;;GANJ,eAAY;GACX,OAAK,EAAEA,EAAAA,OAAO,QAAO;;GAEtB,EAAgD,QAAA,MAAA,EAAvC,EAAA,EAAW,CAAC,EAAA,KAAK,SAAO,EAAA,CAAA,CAAA,EAAA,EAAA;YACjC,EAAc,QAAA,MAAR,KAAC,GAAA;GACP,EAA6C,QAAA,MAAA,EAApC,EAAA,EAAW,CAAC,EAAA,KAAK,MAAI,EAAA,CAAA,CAAA,EAAA,EAAA;WAGnB,EAAA,KAAK,WAAM,eAAA,GAAA,EADxB,EAMM,OAAA;;GAJJ,eAAY;GACX,OAAK,EAAEA,EAAAA,OAAO,QAAO;iBACvB,UACM,GAAA,EAAA,EAA6C,QAAA,MAAA,EAApC,EAAA,EAAW,CAAC,EAAA,KAAK,MAAI,EAAA,CAAA,CAAA,EAAA,EAAA,CAAA,EAAA,EAAA,IAGxB,EAAA,KAAK,WAAM,WAAA,GAAA,EADxB,EAMM,OAAA;;GAJJ,eAAY;GACX,OAAK,EAAEA,EAAAA,OAAO,MAAK;MAEpB,EAA6B,QAAA,MAAA,EAApB,EAAA,KAAK,MAAK,EAAA,EAAA,CAAA,EAAA,EAAA,KAAA,GAAA,EAErB,EAEM,OAAA;;GAFM,eAAY;GAAqC,OAAK,EAAEA,EAAAA,OAAO,QAAO;KAAE,aAEpF,EAAA,EAAA,EAAA,EAAA"}
1
+ {"version":3,"file":"Item.vue_vue_type_script_setup_true_lang.js","names":["$style","_openBlock","_createElementBlock","_normalizeClass","_createElementVNode","_toDisplayString","_unref","_createTextVNode","Item_vue_vue_type_script_setup_true_lang_default","openBlock","createElementBlock","normalizeClass","_ctx","createElementVNode","toDisplayString","__props","unref","prettyBytes","_cache","createTextVNode"],"sources":["../../../src/components/PlBtnExportArchive/Item.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { ExportItem } from \"./types\";\nimport { prettyBytes } from \"@milaboratories/helpers\";\n\ndefineProps<{\n item: ExportItem;\n}>();\n</script>\n\n<template>\n <div data-testid=\"pl-btn-export-archive-item\" :class=\"$style.item\">\n <div data-testid=\"pl-btn-export-archive-item-name\" :class=\"$style.name\">\n {{ item.fileName }}\n </div>\n <div\n v-if=\"item.status === 'in-progress'\"\n data-testid=\"pl-btn-export-archive-item-status\"\n :class=\"$style.details\"\n >\n <span>{{ prettyBytes(item.current, {}) }}</span>\n <span>/</span>\n <span>{{ prettyBytes(item.size, {}) }}</span>\n </div>\n <div\n v-else-if=\"item.status === 'completed'\"\n data-testid=\"pl-btn-export-archive-item-status\"\n :class=\"$style.details\"\n >\n Done <span>{{ prettyBytes(item.size, {}) }}</span>\n </div>\n <div\n v-else-if=\"item.status === 'error'\"\n data-testid=\"pl-btn-export-archive-item-error\"\n :class=\"$style.error\"\n >\n <span>{{ item.error }}</span>\n </div>\n <div v-else data-testid=\"pl-btn-export-archive-item-status\" :class=\"$style.details\">\n Pending\n </div>\n </div>\n</template>\n\n<style module>\n.item {\n display: flex;\n flex-direction: column;\n margin-bottom: 8px;\n overflow: hidden;\n --name-font-size: 12px;\n --details-font-size: 10px;\n}\n.name {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: var(--name-font-size);\n font-weight: 600;\n}\n\n.details {\n font-size: var(--details-font-size);\n font-weight: 400;\n color: rgba(255, 255, 255, 0.6);\n}\n\n.error {\n font-size: var(--details-font-size);\n font-weight: 400;\n color: var(--txt-error);\n span {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n max-width: 100%;\n }\n}\n</style>\n"],"mappings":";;;;;;;;E,kBAUEC,EAAA,GAAAC,EA8BM,OAAA;GA9BD,eAAY;GAA8B,OAAKC,EAAEH,EAAAA,OAAO,IAAI;E,IAC/DI,EAEM,OAAA;GAFD,eAAY;GAAmC,OAAKD,EAAEH,EAAAA,OAAO,IAAI;EACjE,GAAAK,EAAAU,EAAA,KAAK,QAAQ,GAAA,CAAA,GAGVA,EAAA,KAAK,WAAM,iBADnBd,EAAA,GAAAC,EAQM,OAAA;;GANJ,eAAY;GACX,OAAKC,EAAEH,EAAAA,OAAO,OAAO;;GAEtBI,EAAgD,QAAA,MAAAC,EAAvCC,EAAAW,CAAA,CAAW,CAACF,EAAA,KAAK,SAAO,CAAA,CAAA,CAAA,GAAA,CAAA;GACjC,AAAAG,EAAA,OAAAd,EAAc,QAAA,MAAR,KAAC,EAAA;GACPA,EAA6C,QAAA,MAAAC,EAApCC,EAAAW,CAAA,CAAW,CAACF,EAAA,KAAK,MAAI,CAAA,CAAA,CAAA,GAAA,CAAA;E,SAGnBA,EAAA,KAAK,WAAM,eADxBd,EAAA,GAAAC,EAMM,OAAA;;GAJJ,eAAY;GACX,OAAKC,EAAEH,EAAAA,OAAO,OAAO;E,IACvB,AAAAkB,EAAA,OAAAX,EAAA,UACM,EAAA,GAAAH,EAA6C,QAAA,MAAAC,EAApCC,EAAAW,CAAA,CAAW,CAACF,EAAA,KAAK,MAAI,CAAA,CAAA,CAAA,GAAA,CAAA,C,SAGxBA,EAAA,KAAK,WAAM,WADxBd,EAAA,GAAAC,EAMM,OAAA;;GAJJ,eAAY;GACX,OAAKC,EAAEH,EAAAA,OAAO,KAAK;E,IAEpBI,EAA6B,QAAA,MAAAC,EAApBU,EAAA,KAAK,KAAK,GAAA,CAAA,C,UAErBd,EAAA,GAAAC,EAEM,OAAA;;GAFM,eAAY;GAAqC,OAAKC,EAAEH,EAAAA,OAAO,OAAO;EAAE,GAAA,aAEpF,CAAA,E"}
@@ -1,8 +1,7 @@
1
1
  import e from "../../_virtual/_plugin-vue_export-helper.js";
2
2
  import t from "./PlBtnExportArchive.vue2.js";
3
3
  import n from "./PlBtnExportArchive.style.js";
4
- var r = /* @__PURE__ */ e(t, [["__cssModules", { $style: n }]]);
5
- //#endregion
4
+ var r = /*#__PURE__*/ e(t, [["__cssModules", { $style: n }]]);
6
5
  export { r as default };
7
6
 
8
7
  //# sourceMappingURL=PlBtnExportArchive.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PlBtnExportArchive.js","names":[],"sources":["../../../src/components/PlBtnExportArchive/PlBtnExportArchive.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { PlBtnGhost, PlIcon16, PlIcon24, useClickOutside } 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\")\n ? \"in-progress\"\n : items.value.every((item) => item.status === \"completed\")\n ? \"completed\"\n : \"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 {\n description: \"ZIP files\",\n accept: {\n \"application/zip\": [\".zip\"],\n },\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, {\n keepOrder: true,\n zip64: true,\n bufferedWrite: false,\n });\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 data-testid=\"pl-btn-export-archive\"\n :disabled=\"!isReadyToExport\"\n :loading=\"data.loading\"\n :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\n v-if=\"data.exports && data.showExports\"\n ref=\"progressesRef\"\n data-testid=\"pl-btn-export-archive-progress\"\n :class=\"$style.progresses\"\n >\n <PlIcon16\n data-testid=\"pl-btn-export-archive-progress-close\"\n :class=\"$style.close\"\n name=\"close\"\n @click.stop=\"data.showExports = false\"\n />\n <Summary :item=\"archive\" />\n <div\n data-testid=\"pl-btn-export-archive-items\"\n :class=\"$style.itemsContainer\"\n class=\"pl-scrollable-y\"\n >\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"],"mappings":""}
1
+ {"version":3,"file":"PlBtnExportArchive.js","names":["style0","_sfc_main","_plugin_vue_export_helper_default","PlBtnExportArchive_vue_vue_type_script_setup_true_lang_default","PlBtnExportArchive_vue_vue_type_style_index_0_lang_module_default","PlBtnExportArchive_default","\"$style\""],"sources":["../../../src/components/PlBtnExportArchive/PlBtnExportArchive.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { PlBtnGhost, PlIcon16, PlIcon24, useClickOutside } 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\")\n ? \"in-progress\"\n : items.value.every((item) => item.status === \"completed\")\n ? \"completed\"\n : \"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 {\n description: \"ZIP files\",\n accept: {\n \"application/zip\": [\".zip\"],\n },\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, {\n keepOrder: true,\n zip64: true,\n bufferedWrite: false,\n });\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 data-testid=\"pl-btn-export-archive\"\n :disabled=\"!isReadyToExport\"\n :loading=\"data.loading\"\n :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\n v-if=\"data.exports && data.showExports\"\n ref=\"progressesRef\"\n data-testid=\"pl-btn-export-archive-progress\"\n :class=\"$style.progresses\"\n >\n <PlIcon16\n data-testid=\"pl-btn-export-archive-progress-close\"\n :class=\"$style.close\"\n name=\"close\"\n @click.stop=\"data.showExports = false\"\n />\n <Summary :item=\"archive\" />\n <div\n data-testid=\"pl-btn-export-archive-items\"\n :class=\"$style.itemsContainer\"\n class=\"pl-scrollable-y\"\n >\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"],"mappings":""}
@@ -1,9 +1,9 @@
1
- import './PlBtnExportArchive.vue.css';var e = {
2
- progresses: "_progresses_h5njb_2",
3
- itemsContainer: "_itemsContainer_h5njb_18",
4
- close: "_close_h5njb_22"
1
+ import './PlBtnExportArchive.style.css';// src/components/PlBtnExportArchive/PlBtnExportArchive.vue?vue&type=style&index=0&lang.module.css
2
+ var e = "_progresses_h5njb_2", t = "_itemsContainer_h5njb_18", n = "_close_h5njb_22", r = {
3
+ progresses: e,
4
+ itemsContainer: t,
5
+ close: n
5
6
  };
6
- //#endregion
7
- export { e as default };
7
+ export { n as close, r as default, t as itemsContainer, e as progresses };
8
8
 
9
9
  //# sourceMappingURL=PlBtnExportArchive.style.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PlBtnExportArchive.vue_vue_type_style_index_0_lang.module.js","names":[],"sources":["../../../src/components/PlBtnExportArchive/PlBtnExportArchive.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { PlBtnGhost, PlIcon16, PlIcon24, useClickOutside } 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\")\n ? \"in-progress\"\n : items.value.every((item) => item.status === \"completed\")\n ? \"completed\"\n : \"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 {\n description: \"ZIP files\",\n accept: {\n \"application/zip\": [\".zip\"],\n },\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, {\n keepOrder: true,\n zip64: true,\n bufferedWrite: false,\n });\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 data-testid=\"pl-btn-export-archive\"\n :disabled=\"!isReadyToExport\"\n :loading=\"data.loading\"\n :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\n v-if=\"data.exports && data.showExports\"\n ref=\"progressesRef\"\n data-testid=\"pl-btn-export-archive-progress\"\n :class=\"$style.progresses\"\n >\n <PlIcon16\n data-testid=\"pl-btn-export-archive-progress-close\"\n :class=\"$style.close\"\n name=\"close\"\n @click.stop=\"data.showExports = false\"\n />\n <Summary :item=\"archive\" />\n <div\n data-testid=\"pl-btn-export-archive-items\"\n :class=\"$style.itemsContainer\"\n class=\"pl-scrollable-y\"\n >\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"],"mappings":""}
1
+ {"version":3,"file":"PlBtnExportArchive.vue_vue_type_style_index_0_lang.module.js","names":["progresses","itemsContainer","close","PlBtnExportArchive_vue_vue_type_style_index_0_lang_module_default"],"sources":["../../../src/components/PlBtnExportArchive/PlBtnExportArchive.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { PlBtnGhost, PlIcon16, PlIcon24, useClickOutside } 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\")\n ? \"in-progress\"\n : items.value.every((item) => item.status === \"completed\")\n ? \"completed\"\n : \"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 {\n description: \"ZIP files\",\n accept: {\n \"application/zip\": [\".zip\"],\n },\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, {\n keepOrder: true,\n zip64: true,\n bufferedWrite: false,\n });\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 data-testid=\"pl-btn-export-archive\"\n :disabled=\"!isReadyToExport\"\n :loading=\"data.loading\"\n :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\n v-if=\"data.exports && data.showExports\"\n ref=\"progressesRef\"\n data-testid=\"pl-btn-export-archive-progress\"\n :class=\"$style.progresses\"\n >\n <PlIcon16\n data-testid=\"pl-btn-export-archive-progress-close\"\n :class=\"$style.close\"\n name=\"close\"\n @click.stop=\"data.showExports = false\"\n />\n <Summary :item=\"archive\" />\n <div\n data-testid=\"pl-btn-export-archive-items\"\n :class=\"$style.itemsContainer\"\n class=\"pl-scrollable-y\"\n >\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"],"mappings":""}
@@ -6,8 +6,8 @@ import { Fragment as r, Teleport as i, computed as a, createBlock as o, createCo
6
6
  import { ChunkedStreamReader as x, getFileNameFromHandle as S, getRawPlatformaInstance as C } from "@platforma-sdk/model";
7
7
  import { PlBtnGhost as w, PlIcon16 as T, PlIcon24 as E, useClickOutside as D } from "@milaboratories/uikit";
8
8
  import { ZipWriter as O } from "@zip.js/zip.js";
9
- //#region src/components/PlBtnExportArchive/PlBtnExportArchive.vue?vue&type=script&setup=true&lang.ts
10
- var k = /* @__PURE__ */ d({
9
+ // src/components/PlBtnExportArchive/PlBtnExportArchive.vue?vue&type=script&setup=true&lang.ts
10
+ var k = /*@__PURE__*/ d({
11
11
  __name: "PlBtnExportArchive",
12
12
  props: {
13
13
  fileExports: {},
@@ -50,15 +50,15 @@ var k = /* @__PURE__ */ d({
50
50
  });
51
51
  A.loading = !0, A.name = n.name, A.showExports = !0, A.exports = /* @__PURE__ */ new Map();
52
52
  try {
53
- let t = new O(await n.createWritable(), {
53
+ let t = await n.createWritable(), r = new O(t, {
54
54
  keepOrder: !0,
55
55
  zip64: !0,
56
56
  bufferedWrite: !1
57
57
  });
58
58
  try {
59
- let n = [];
60
- for (let t of k.fileExports) {
61
- let { importHandle: r, blobHandle: i, fileName: a } = t, o = a ?? S(r), { handle: s, size: c } = i, l = e();
59
+ let t = [];
60
+ for (let n of k.fileExports) {
61
+ let { importHandle: r, blobHandle: i, fileName: a } = n, o = a ?? S(r), { handle: s, size: c } = i, l = e();
62
62
  A.exports?.set(l, {
63
63
  fileName: o,
64
64
  current: 0,
@@ -76,22 +76,22 @@ var k = /* @__PURE__ */ d({
76
76
  error: e
77
77
  }), await new Promise((e) => setTimeout(e, 1e3)), "continue")
78
78
  });
79
- n.push({
79
+ t.push({
80
80
  id: l,
81
81
  fileName: o,
82
82
  size: c,
83
83
  stream: u
84
84
  });
85
85
  }
86
- let r = async (e) => {
87
- let { id: n, fileName: r, size: i, stream: a } = e, o = (e) => {
88
- let t = A.exports?.get(n);
89
- t && A.exports?.set(n, {
90
- ...t,
86
+ let n = async (e) => {
87
+ let { id: t, fileName: n, size: i, stream: a } = e, o = (e) => {
88
+ let n = A.exports?.get(t);
89
+ n && A.exports?.set(t, {
90
+ ...n,
91
91
  ...e
92
92
  });
93
93
  };
94
- await t.add(r, a, {
94
+ await r.add(n, a, {
95
95
  bufferedWrite: !0,
96
96
  onstart: () => {
97
97
  o({ status: "in-progress" });
@@ -110,10 +110,10 @@ var k = /* @__PURE__ */ d({
110
110
  }
111
111
  });
112
112
  };
113
- if (k.strategy === "parallel") await Promise.all(n.map(r));
114
- else for (let e of n) await r(e);
113
+ if (k.strategy === "parallel") await Promise.all(t.map(n));
114
+ else for (let e of t) await n(e);
115
115
  } finally {
116
- await t.close().catch((e) => {
116
+ await r.close().catch((e) => {
117
117
  console.error("Error closing zip", e);
118
118
  });
119
119
  }
@@ -164,7 +164,6 @@ var k = /* @__PURE__ */ d({
164
164
  ], 2)) : s("", !0)]))], 64));
165
165
  }
166
166
  });
167
- //#endregion
168
167
  export { k as default };
169
168
 
170
169
  //# sourceMappingURL=PlBtnExportArchive.vue2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PlBtnExportArchive.vue_vue_type_script_setup_true_lang.js","names":["$style"],"sources":["../../../src/components/PlBtnExportArchive/PlBtnExportArchive.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { PlBtnGhost, PlIcon16, PlIcon24, useClickOutside } 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\")\n ? \"in-progress\"\n : items.value.every((item) => item.status === \"completed\")\n ? \"completed\"\n : \"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 {\n description: \"ZIP files\",\n accept: {\n \"application/zip\": [\".zip\"],\n },\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, {\n keepOrder: true,\n zip64: true,\n bufferedWrite: false,\n });\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 data-testid=\"pl-btn-export-archive\"\n :disabled=\"!isReadyToExport\"\n :loading=\"data.loading\"\n :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\n v-if=\"data.exports && data.showExports\"\n ref=\"progressesRef\"\n data-testid=\"pl-btn-export-archive-progress\"\n :class=\"$style.progresses\"\n >\n <PlIcon16\n data-testid=\"pl-btn-export-archive-progress-close\"\n :class=\"$style.close\"\n name=\"close\"\n @click.stop=\"data.showExports = false\"\n />\n <Summary :item=\"archive\" />\n <div\n data-testid=\"pl-btn-export-archive-items\"\n :class=\"$style.itemsContainer\"\n class=\"pl-scrollable-y\"\n >\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"],"mappings":";;;;;;;;;;;;;;;;;;;;EAgBA,IAAM,IAAQ,GAgBR,IAAO,EAPc;GACzB,SAAS;GACT,MAAM;GACN,SAAS,KAAA;GACT,aAAa;GACd,CAEmC,EAE9B,KAAqB,GAAY,MAAiC;GACtE,IAAM,IAAK,EAAK,SAAS,IAAI,EAAG;AAChC,GAAI,KACF,EAAK,SAAS,IAAI,GAAI;IAAE,GAAG;IAAI,GAAG;IAAS,CAAC;KAI1C,IAAkB,QACf,EAAM,gBAAgB,KAAA,KAAa,CAAC,EAAM,SACjD,EAEI,IAAQ,QACL,MAAM,KAAK,EAAK,SAAS,QAAQ,IAAI,EAAE,CAAC,CAC/C,EAEI,IAAU,SACP;GACL,UAAU,EAAK;GACf,SAAS,EAAM,MAAM,QAAQ,GAAK,MAAS,IAAM,EAAK,SAAS,EAAE;GACjE,MAAM,EAAM,MAAM,QAAQ,GAAK,MAAS,IAAM,EAAK,MAAM,EAAE;GAC3D,QAAQ,EAAM,MAAM,MAAM,MAAS,EAAK,WAAW,cAAa,GAC5D,gBACA,EAAM,MAAM,OAAO,MAAS,EAAK,WAAW,YAAW,GACrD,cACA;GACN,WAAW,EAAM,MAAM,MAAM,MAAS,EAAK,WAAW,QAAQ;GAC/D,EACD,EASI,IAAgB,YAAY;AAChC,OAAI,EAAK,SAAS;AAChB,MAAK,cAAc;AACnB;;AAGF,OAAI,CAAC,EAAgB,SAAS,CAAC,EAAM,YACnC;GAGF,IAAM,IAAkB,oBAAG,IAAI,MAAM,EAAC,aAAa,CAAC,MAAM,IAAI,CAAC,GAAG,cAW5D,IAAY,MAAM,OAAO,mBAAmB;IAChD,OAAO,EAAM,mBAXM,CACnB;KACE,aAAa;KACb,QAAQ,EACN,mBAAmB,CAAC,OAAO,EAC5B;KACF,CACF;IAKC,eAAe,EAAM,qBAAqB;IAC3C,CAAC;AAKF,GAHA,EAAK,UAAU,IACf,EAAK,OAAO,EAAU,MACtB,EAAK,cAAc,IACnB,EAAK,0BAAU,IAAI,KAAK;AAExB,OAAI;IAEF,IAAM,IAAM,IAAI,EADO,MAAM,EAAU,gBAAgB,EACb;KACxC,WAAW;KACX,OAAO;KACP,eAAe;KAChB,CAAC;AACF,QAAI;KACF,IAAM,IAAW,EAAE;AAEnB,UAAK,IAAM,KAAS,EAAM,aAAa;MACrC,IAAM,EAAE,iBAAc,eAAY,UAAU,MAAmB,GACzD,IAAW,KAAkB,EAAsB,EAAa,EAChE,EAAE,WAAQ,YAAS,GAEnB,IAAK,GAAU;AAErB,QAAK,SAAS,IAAI,GAAI;OAAE;OAAU,SAAS;OAAG;OAAM,QAAQ;OAAW,CAAC;MAExE,IAAM,IAAS,EAAoB,OAAO;OACxC,YAAY,OAAO,EAAE,SAAM,aACrB,EAAM,WACR,MAAM,EAAM,QAAQ,EAAS,EAGxB,MAAM,GAAyB,CAAC,WAAW,WAAW,GAAQ;QAAE;QAAM;QAAI,CAAC;OAEpF,WAAW;OACX,SAAS,OAAO,OACd,EAAkB,GAAI;QAAE,QAAQ;QAAS;QAAO,CAAC,EACjD,MAAM,IAAI,SAAS,MAAY,WAAW,GAAS,IAAK,CAAC,EAClD;OAEV,CAAC;AAGF,QAAS,KAAK;OAAE;OAAI;OAAU;OAAM;OAAQ,CAAC;;KAG/C,IAAM,IAAiB,OAAO,MAAwB;MACpD,IAAM,EAAE,OAAI,aAAU,SAAM,cAAW,GACjC,KAAU,MAAiC;OAC/C,IAAM,IAAK,EAAK,SAAS,IAAI,EAAG;AAChC,OAAI,KACF,EAAK,SAAS,IAAI,GAAI;QAAE,GAAG;QAAI,GAAG;QAAS,CAAC;;AAGhD,YAAM,EAAI,IAAI,GAAU,GAAQ;OAC9B,eAAe;OACf,eAAe;AACb,UAAO,EAAE,QAAQ,eAAe,CAAC;;OAGnC,aAAa,MAAoB;AAC/B,UAAO;SAAE;SAAS,QAAQ;SAAe,CAAC;;OAG5C,QAAQ;AACN,UAAO;SAAE,SAAS;SAAM,QAAQ;SAAa,CAAC;;OAGjD,CAAC;;AAGJ,SAAI,EAAM,aAAa,WACrB,OAAM,QAAQ,IAAI,EAAS,IAAI,EAAe,CAAC;SAE/C,MAAK,IAAM,KAAW,EACpB,OAAM,EAAe,EAAQ;cAGzB;AACR,WAAM,EAAI,OAAO,CAAC,OAAO,MAAU;AACjC,cAAQ,MAAM,qBAAqB,EAAM;OACzC;;aAEI;AACR,MAAK,UAAU;;KAIb,IAAgB,GAAK;SAE3B,EAAgB,CAAC,EAAc,QAAQ;AACrC,KAAK,cAAc;IACnB,8BAIA,EAWa,EAAA,EAAA,EAAA;GAVX,eAAY;GACX,UAAQ,CAAG,EAAA;GACX,SAAS,EAAK;GACd,OAAK,EAAA,GAAKA,EAAAA,OAAM,iBAAkB,EAAK,SAAO,CAAA;GAC9C,SAAK,EAAO,GAAa,CAAA,OAAA,CAAA;;GAGf,QAAM,QACkC,CAAjD,EAAiD,EAAA,EAAA,EAAA;IAAtC,OAAK,EAAEA,EAAAA,OAAO,KAAI;IAAE,MAAK;;oBAF9B,CAAR,EAAQ,EAAA,QAAA,UAAA,CAAA,CAAA;;;;;;YAKV,EAsBW,GAAA,EAtBD,IAAG,QAAM,EAAA,CAET,EAAK,WAAW,EAAK,eAAA,GAAA,EAD7B,EAoBM,OAAA;;YAlBA;GAAJ,KAAI;GACJ,eAAY;GACX,OAAK,EAAEA,EAAAA,OAAO,WAAU;;GAEzB,EAKE,EAAA,EAAA,EAAA;IAJA,eAAY;IACX,OAAK,EAAEA,EAAAA,OAAO,MAAK;IACpB,MAAK;IACJ,SAAK,AAAA,EAAA,OAAA,GAAA,MAAO,EAAK,cAAW,IAAA,CAAA,OAAA,CAAA;;GAE/B,EAA2B,GAAA,EAAjB,MAAM,EAAA,OAAO,EAAA,MAAA,GAAA,CAAA,OAAA,CAAA;GACvB,EAMM,OAAA;IALJ,eAAY;IACX,OAAK,EAAA,CAAEA,EAAAA,OAAO,gBACT,kBAAiB,CAAA;eAEvB,EAAiF,GAAA,MAAA,EAA5D,EAAK,SAAS,QAAM,GAA5B,YAAb,EAAiF,GAAA;IAAnC,KAAK,EAAK;IAAiB"}
1
+ {"version":3,"file":"PlBtnExportArchive.vue_vue_type_script_setup_true_lang.js","names":["$style","_openBlock","_createElementBlock","_Fragment","_createVNode","_unref","_normalizeClass","_withModifiers","_withCtx","_renderSlot","_createBlock","_Teleport","Summary","_createElementVNode","_renderList","Item","_createCommentVNode","Item_default","Summary_default","PlBtnExportArchive_vue_vue_type_script_setup_true_lang_default","props","__props","data","reactive","updateExportsItem","it","id","partial","isReadyToExport","computed","items","archive","acc","item","exportRawTsvs","defaultFileName","newHandle","writableStream","zip","ZipWriter","requests","entry","customFileName","fileName","getFileNameFromHandle","importHandle","blobHandle","uniqueId","stream","ChunkedStreamReader","getRawPlatformaInstance","handle","size","resolve","processRequest","request","update","error","progressesRef","ref","useClickOutside","openBlock","createElementBlock","Fragment","createVNode","unref","PlBtnGhost","normalizeClass","_ctx","withModifiers","withCtx","PlIcon24","renderSlot","createBlock","Teleport","PlIcon16","_cache","createElementVNode","renderList","createCommentVNode"],"sources":["../../../src/components/PlBtnExportArchive/PlBtnExportArchive.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { PlBtnGhost, PlIcon16, PlIcon24, useClickOutside } 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\")\n ? \"in-progress\"\n : items.value.every((item) => item.status === \"completed\")\n ? \"completed\"\n : \"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 {\n description: \"ZIP files\",\n accept: {\n \"application/zip\": [\".zip\"],\n },\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, {\n keepOrder: true,\n zip64: true,\n bufferedWrite: false,\n });\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 data-testid=\"pl-btn-export-archive\"\n :disabled=\"!isReadyToExport\"\n :loading=\"data.loading\"\n :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\n v-if=\"data.exports && data.showExports\"\n ref=\"progressesRef\"\n data-testid=\"pl-btn-export-archive-progress\"\n :class=\"$style.progresses\"\n >\n <PlIcon16\n data-testid=\"pl-btn-export-archive-progress-close\"\n :class=\"$style.close\"\n name=\"close\"\n @click.stop=\"data.showExports = false\"\n />\n <Summary :item=\"archive\" />\n <div\n data-testid=\"pl-btn-export-archive-items\"\n :class=\"$style.itemsContainer\"\n class=\"pl-scrollable-y\"\n >\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"],"mappings":"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"}
@@ -1,8 +1,7 @@
1
1
  import e from "../../_virtual/_plugin-vue_export-helper.js";
2
2
  import t from "./Summary.vue2.js";
3
3
  import n from "./Summary.style.js";
4
- var r = /* @__PURE__ */ e(t, [["__cssModules", { $style: n }]]);
5
- //#endregion
4
+ var r = /*#__PURE__*/ e(t, [["__cssModules", { $style: n }]]);
6
5
  export { r as default };
7
6
 
8
7
  //# sourceMappingURL=Summary.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Summary.js","names":[],"sources":["../../../src/components/PlBtnExportArchive/Summary.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { ExportItem } from \"./types\";\nimport { prettyBytes } from \"@milaboratories/helpers\";\n\ndefineProps<{\n item: ExportItem;\n}>();\n\nconst emit = defineEmits<{\n (e: \"cancel\"): void;\n}>();\n</script>\n\n<template>\n <div data-testid=\"pl-btn-export-archive-summary\" :class=\"$style.summary\">\n <div data-testid=\"pl-btn-export-archive-summary-name\" :class=\"$style.name\">\n {{ item.fileName }}<span v-if=\"false\" @click.stop=\"emit('cancel')\">[TODO: Cancel]</span>\n </div>\n <div\n v-if=\"item.status === 'in-progress'\"\n data-testid=\"pl-btn-export-archive-summary-status\"\n :class=\"$style.details\"\n >\n <span>{{ prettyBytes(item.current, {}) }}</span>\n <span>/</span>\n <span>{{ prettyBytes(item.size, {}) }}</span>\n </div>\n <div\n v-else-if=\"item.status === 'completed'\"\n data-testid=\"pl-btn-export-archive-summary-status\"\n :class=\"$style.details\"\n >\n Done <span>{{ prettyBytes(item.size, {}) }}</span>\n </div>\n <div v-else data-testid=\"pl-btn-export-archive-summary-status\" :class=\"$style.details\">\n Pending\n </div>\n </div>\n</template>\n\n<style module>\n.summary {\n display: flex;\n flex-direction: column;\n margin-bottom: 8px;\n border-bottom: 1px solid rgba(255, 255, 255, 0.1);\n padding-bottom: 8px;\n --name-font-size: 14px;\n --details-font-size: 12px;\n}\n\n.name {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: var(--name-font-size);\n font-weight: 600;\n}\n.details {\n font-size: var(--details-font-size);\n font-weight: 400;\n color: rgba(255, 255, 255, 0.6);\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"Summary.js","names":["style0","_sfc_main","_plugin_vue_export_helper_default","Summary_vue_vue_type_script_setup_true_lang_default","Summary_vue_vue_type_style_index_0_lang_module_default","Summary_default","\"$style\""],"sources":["../../../src/components/PlBtnExportArchive/Summary.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { ExportItem } from \"./types\";\nimport { prettyBytes } from \"@milaboratories/helpers\";\n\ndefineProps<{\n item: ExportItem;\n}>();\n\nconst emit = defineEmits<{\n (e: \"cancel\"): void;\n}>();\n</script>\n\n<template>\n <div data-testid=\"pl-btn-export-archive-summary\" :class=\"$style.summary\">\n <div data-testid=\"pl-btn-export-archive-summary-name\" :class=\"$style.name\">\n {{ item.fileName }}<span v-if=\"false\" @click.stop=\"emit('cancel')\">[TODO: Cancel]</span>\n </div>\n <div\n v-if=\"item.status === 'in-progress'\"\n data-testid=\"pl-btn-export-archive-summary-status\"\n :class=\"$style.details\"\n >\n <span>{{ prettyBytes(item.current, {}) }}</span>\n <span>/</span>\n <span>{{ prettyBytes(item.size, {}) }}</span>\n </div>\n <div\n v-else-if=\"item.status === 'completed'\"\n data-testid=\"pl-btn-export-archive-summary-status\"\n :class=\"$style.details\"\n >\n Done <span>{{ prettyBytes(item.size, {}) }}</span>\n </div>\n <div v-else data-testid=\"pl-btn-export-archive-summary-status\" :class=\"$style.details\">\n Pending\n </div>\n </div>\n</template>\n\n<style module>\n.summary {\n display: flex;\n flex-direction: column;\n margin-bottom: 8px;\n border-bottom: 1px solid rgba(255, 255, 255, 0.1);\n padding-bottom: 8px;\n --name-font-size: 14px;\n --details-font-size: 12px;\n}\n\n.name {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: var(--name-font-size);\n font-weight: 600;\n}\n.details {\n font-size: var(--details-font-size);\n font-weight: 400;\n color: rgba(255, 255, 255, 0.6);\n}\n</style>\n"],"mappings":""}
@@ -1,9 +1,9 @@
1
- import './Summary.vue.css';var e = {
2
- summary: "_summary_s5gm9_2",
3
- name: "_name_s5gm9_12",
4
- details: "_details_s5gm9_19"
1
+ import './Summary.style.css';// src/components/PlBtnExportArchive/Summary.vue?vue&type=style&index=0&lang.module.css
2
+ var e = "_summary_s5gm9_2", t = "_name_s5gm9_12", n = "_details_s5gm9_19", r = {
3
+ summary: e,
4
+ name: t,
5
+ details: n
5
6
  };
6
- //#endregion
7
- export { e as default };
7
+ export { r as default, n as details, t as name, e as summary };
8
8
 
9
9
  //# sourceMappingURL=Summary.style.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Summary.vue_vue_type_style_index_0_lang.module.js","names":[],"sources":["../../../src/components/PlBtnExportArchive/Summary.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { ExportItem } from \"./types\";\nimport { prettyBytes } from \"@milaboratories/helpers\";\n\ndefineProps<{\n item: ExportItem;\n}>();\n\nconst emit = defineEmits<{\n (e: \"cancel\"): void;\n}>();\n</script>\n\n<template>\n <div data-testid=\"pl-btn-export-archive-summary\" :class=\"$style.summary\">\n <div data-testid=\"pl-btn-export-archive-summary-name\" :class=\"$style.name\">\n {{ item.fileName }}<span v-if=\"false\" @click.stop=\"emit('cancel')\">[TODO: Cancel]</span>\n </div>\n <div\n v-if=\"item.status === 'in-progress'\"\n data-testid=\"pl-btn-export-archive-summary-status\"\n :class=\"$style.details\"\n >\n <span>{{ prettyBytes(item.current, {}) }}</span>\n <span>/</span>\n <span>{{ prettyBytes(item.size, {}) }}</span>\n </div>\n <div\n v-else-if=\"item.status === 'completed'\"\n data-testid=\"pl-btn-export-archive-summary-status\"\n :class=\"$style.details\"\n >\n Done <span>{{ prettyBytes(item.size, {}) }}</span>\n </div>\n <div v-else data-testid=\"pl-btn-export-archive-summary-status\" :class=\"$style.details\">\n Pending\n </div>\n </div>\n</template>\n\n<style module>\n.summary {\n display: flex;\n flex-direction: column;\n margin-bottom: 8px;\n border-bottom: 1px solid rgba(255, 255, 255, 0.1);\n padding-bottom: 8px;\n --name-font-size: 14px;\n --details-font-size: 12px;\n}\n\n.name {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: var(--name-font-size);\n font-weight: 600;\n}\n.details {\n font-size: var(--details-font-size);\n font-weight: 400;\n color: rgba(255, 255, 255, 0.6);\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"Summary.vue_vue_type_style_index_0_lang.module.js","names":["summary","name","details","Summary_vue_vue_type_style_index_0_lang_module_default"],"sources":["../../../src/components/PlBtnExportArchive/Summary.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { ExportItem } from \"./types\";\nimport { prettyBytes } from \"@milaboratories/helpers\";\n\ndefineProps<{\n item: ExportItem;\n}>();\n\nconst emit = defineEmits<{\n (e: \"cancel\"): void;\n}>();\n</script>\n\n<template>\n <div data-testid=\"pl-btn-export-archive-summary\" :class=\"$style.summary\">\n <div data-testid=\"pl-btn-export-archive-summary-name\" :class=\"$style.name\">\n {{ item.fileName }}<span v-if=\"false\" @click.stop=\"emit('cancel')\">[TODO: Cancel]</span>\n </div>\n <div\n v-if=\"item.status === 'in-progress'\"\n data-testid=\"pl-btn-export-archive-summary-status\"\n :class=\"$style.details\"\n >\n <span>{{ prettyBytes(item.current, {}) }}</span>\n <span>/</span>\n <span>{{ prettyBytes(item.size, {}) }}</span>\n </div>\n <div\n v-else-if=\"item.status === 'completed'\"\n data-testid=\"pl-btn-export-archive-summary-status\"\n :class=\"$style.details\"\n >\n Done <span>{{ prettyBytes(item.size, {}) }}</span>\n </div>\n <div v-else data-testid=\"pl-btn-export-archive-summary-status\" :class=\"$style.details\">\n Pending\n </div>\n </div>\n</template>\n\n<style module>\n.summary {\n display: flex;\n flex-direction: column;\n margin-bottom: 8px;\n border-bottom: 1px solid rgba(255, 255, 255, 0.1);\n padding-bottom: 8px;\n --name-font-size: 14px;\n --details-font-size: 12px;\n}\n\n.name {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: var(--name-font-size);\n font-weight: 600;\n}\n.details {\n font-size: var(--details-font-size);\n font-weight: 400;\n color: rgba(255, 255, 255, 0.6);\n}\n</style>\n"],"mappings":""}
@@ -1,8 +1,8 @@
1
1
  import { prettyBytes as e } from "../../lib/util/helpers/dist/prettyBytes.js";
2
2
  import "../../lib/util/helpers/dist/index.js";
3
3
  import { createCommentVNode as t, createElementBlock as n, createElementVNode as r, createTextVNode as i, defineComponent as a, normalizeClass as o, openBlock as s, toDisplayString as c, unref as l } from "vue";
4
- //#region src/components/PlBtnExportArchive/Summary.vue?vue&type=script&setup=true&lang.ts
5
- var u = /* @__PURE__ */ a({
4
+ // src/components/PlBtnExportArchive/Summary.vue?vue&type=script&setup=true&lang.ts
5
+ var u = /*@__PURE__*/ a({
6
6
  __name: "Summary",
7
7
  props: { item: {} },
8
8
  emits: ["cancel"],
@@ -32,7 +32,6 @@ var u = /* @__PURE__ */ a({
32
32
  }, " Pending ", 2))], 2));
33
33
  }
34
34
  });
35
- //#endregion
36
35
  export { u as default };
37
36
 
38
37
  //# sourceMappingURL=Summary.vue2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Summary.vue_vue_type_script_setup_true_lang.js","names":["$style"],"sources":["../../../src/components/PlBtnExportArchive/Summary.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { ExportItem } from \"./types\";\nimport { prettyBytes } from \"@milaboratories/helpers\";\n\ndefineProps<{\n item: ExportItem;\n}>();\n\nconst emit = defineEmits<{\n (e: \"cancel\"): void;\n}>();\n</script>\n\n<template>\n <div data-testid=\"pl-btn-export-archive-summary\" :class=\"$style.summary\">\n <div data-testid=\"pl-btn-export-archive-summary-name\" :class=\"$style.name\">\n {{ item.fileName }}<span v-if=\"false\" @click.stop=\"emit('cancel')\">[TODO: Cancel]</span>\n </div>\n <div\n v-if=\"item.status === 'in-progress'\"\n data-testid=\"pl-btn-export-archive-summary-status\"\n :class=\"$style.details\"\n >\n <span>{{ prettyBytes(item.current, {}) }}</span>\n <span>/</span>\n <span>{{ prettyBytes(item.size, {}) }}</span>\n </div>\n <div\n v-else-if=\"item.status === 'completed'\"\n data-testid=\"pl-btn-export-archive-summary-status\"\n :class=\"$style.details\"\n >\n Done <span>{{ prettyBytes(item.size, {}) }}</span>\n </div>\n <div v-else data-testid=\"pl-btn-export-archive-summary-status\" :class=\"$style.details\">\n Pending\n </div>\n </div>\n</template>\n\n<style module>\n.summary {\n display: flex;\n flex-direction: column;\n margin-bottom: 8px;\n border-bottom: 1px solid rgba(255, 255, 255, 0.1);\n padding-bottom: 8px;\n --name-font-size: 14px;\n --details-font-size: 12px;\n}\n\n.name {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: var(--name-font-size);\n font-weight: 600;\n}\n.details {\n font-size: var(--details-font-size);\n font-weight: 400;\n color: rgba(255, 255, 255, 0.6);\n}\n</style>\n"],"mappings":";;;;;;;;;yBAcE,EAuBM,OAAA;GAvBD,eAAY;GAAiC,OAAK,EAAEA,EAAAA,OAAO,QAAO;MACrE,EAEM,OAAA;GAFD,eAAY;GAAsC,OAAK,EAAEA,EAAAA,OAAO,KAAI;UACpE,EAAA,KAAK,SAAQ,EAAA,EAAA,EAAA,EAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAGV,EAAA,KAAK,WAAM,iBAAA,GAAA,EADnB,EAQM,OAAA;;GANJ,eAAY;GACX,OAAK,EAAEA,EAAAA,OAAO,QAAO;;GAEtB,EAAgD,QAAA,MAAA,EAAvC,EAAA,EAAW,CAAC,EAAA,KAAK,SAAO,EAAA,CAAA,CAAA,EAAA,EAAA;YACjC,EAAc,QAAA,MAAR,KAAC,GAAA;GACP,EAA6C,QAAA,MAAA,EAApC,EAAA,EAAW,CAAC,EAAA,KAAK,MAAI,EAAA,CAAA,CAAA,EAAA,EAAA;WAGnB,EAAA,KAAK,WAAM,eAAA,GAAA,EADxB,EAMM,OAAA;;GAJJ,eAAY;GACX,OAAK,EAAEA,EAAAA,OAAO,QAAO;iBACvB,UACM,GAAA,EAAA,EAA6C,QAAA,MAAA,EAApC,EAAA,EAAW,CAAC,EAAA,KAAK,MAAI,EAAA,CAAA,CAAA,EAAA,EAAA,CAAA,EAAA,EAAA,KAAA,GAAA,EAErC,EAEM,OAAA;;GAFM,eAAY;GAAwC,OAAK,EAAEA,EAAAA,OAAO,QAAO;KAAE,aAEvF,EAAA,EAAA,EAAA,EAAA"}
1
+ {"version":3,"file":"Summary.vue_vue_type_script_setup_true_lang.js","names":["$style","_openBlock","_createElementBlock","_normalizeClass","_createElementVNode","_createTextVNode","_toDisplayString","_createCommentVNode","_unref","Summary_vue_vue_type_script_setup_true_lang_default","__emit","openBlock","createElementBlock","normalizeClass","_ctx","createElementVNode","createTextVNode","toDisplayString","__props","createCommentVNode","unref","prettyBytes","_cache"],"sources":["../../../src/components/PlBtnExportArchive/Summary.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { ExportItem } from \"./types\";\nimport { prettyBytes } from \"@milaboratories/helpers\";\n\ndefineProps<{\n item: ExportItem;\n}>();\n\nconst emit = defineEmits<{\n (e: \"cancel\"): void;\n}>();\n</script>\n\n<template>\n <div data-testid=\"pl-btn-export-archive-summary\" :class=\"$style.summary\">\n <div data-testid=\"pl-btn-export-archive-summary-name\" :class=\"$style.name\">\n {{ item.fileName }}<span v-if=\"false\" @click.stop=\"emit('cancel')\">[TODO: Cancel]</span>\n </div>\n <div\n v-if=\"item.status === 'in-progress'\"\n data-testid=\"pl-btn-export-archive-summary-status\"\n :class=\"$style.details\"\n >\n <span>{{ prettyBytes(item.current, {}) }}</span>\n <span>/</span>\n <span>{{ prettyBytes(item.size, {}) }}</span>\n </div>\n <div\n v-else-if=\"item.status === 'completed'\"\n data-testid=\"pl-btn-export-archive-summary-status\"\n :class=\"$style.details\"\n >\n Done <span>{{ prettyBytes(item.size, {}) }}</span>\n </div>\n <div v-else data-testid=\"pl-btn-export-archive-summary-status\" :class=\"$style.details\">\n Pending\n </div>\n </div>\n</template>\n\n<style module>\n.summary {\n display: flex;\n flex-direction: column;\n margin-bottom: 8px;\n border-bottom: 1px solid rgba(255, 255, 255, 0.1);\n padding-bottom: 8px;\n --name-font-size: 14px;\n --details-font-size: 12px;\n}\n\n.name {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: var(--name-font-size);\n font-weight: 600;\n}\n.details {\n font-size: var(--details-font-size);\n font-weight: 400;\n color: rgba(255, 255, 255, 0.6);\n}\n</style>\n"],"mappings":";;;;;;;;;E,kBAcEC,EAAA,GAAAC,EAuBM,OAAA;GAvBD,eAAY;GAAiC,OAAKC,EAAEH,EAAAA,OAAO,OAAO;E,IACrEI,EAEM,OAAA;GAFD,eAAY;GAAsC,OAAKD,EAAEH,EAAAA,OAAO,IAAI;E,IACpEK,EAAAC,EAAAY,EAAA,KAAK,QAAQ,GAAA,CAAA,G,gBAGVA,EAAA,KAAK,WAAM,iBADnBjB,EAAA,GAAAC,EAQM,OAAA;;GANJ,eAAY;GACX,OAAKC,EAAEH,EAAAA,OAAO,OAAO;;GAEtBI,EAAgD,QAAA,MAAAE,EAAvCE,EAAAa,CAAA,CAAW,CAACH,EAAA,KAAK,SAAO,CAAA,CAAA,CAAA,GAAA,CAAA;GACjC,AAAAI,EAAA,OAAAlB,EAAc,QAAA,MAAR,KAAC,EAAA;GACPA,EAA6C,QAAA,MAAAE,EAApCE,EAAAa,CAAA,CAAW,CAACH,EAAA,KAAK,MAAI,CAAA,CAAA,CAAA,GAAA,CAAA;E,SAGnBA,EAAA,KAAK,WAAM,eADxBjB,EAAA,GAAAC,EAMM,OAAA;;GAJJ,eAAY;GACX,OAAKC,EAAEH,EAAAA,OAAO,OAAO;E,IACvB,AAAAsB,EAAA,OAAAjB,EAAA,UACM,EAAA,GAAAD,EAA6C,QAAA,MAAAE,EAApCE,EAAAa,CAAA,CAAW,CAACH,EAAA,KAAK,MAAI,CAAA,CAAA,CAAA,GAAA,CAAA,C,UAErCjB,EAAA,GAAAC,EAEM,OAAA;;GAFM,eAAY;GAAwC,OAAKC,EAAEH,EAAAA,OAAO,OAAO;EAAE,GAAA,aAEvF,CAAA,E"}
@@ -1 +1 @@
1
- import "./PlBtnExportArchive.js";
1
+ export { default as PlBtnExportArchive } from "./PlBtnExportArchive.js";
@@ -1,7 +1,6 @@
1
1
  import e from "./PlDatasetSelector.vue2.js";
2
- //#region src/components/PlDatasetSelector/PlDatasetSelector.vue
2
+ // src/components/PlDatasetSelector/PlDatasetSelector.vue
3
3
  var t = e;
4
- //#endregion
5
4
  export { t as default };
6
5
 
7
6
  //# sourceMappingURL=PlDatasetSelector.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PlDatasetSelector.js","names":[],"sources":["../../../src/components/PlDatasetSelector/PlDatasetSelector.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Select a dataset or one of its filters in a single dropdown, emitting a\n * {@link DatasetSelection}. Filter labels carry the dataset name as a\n * prefix (e.g. \"Bulk / Top 10\"), so no separate subtitle is rendered.\n * Enrichments from the matching `DatasetOption` are bundled into the\n * emitted value opaquely — block authors unbundle them in their args\n * resolver.\n */\nexport default {\n name: \"PlDatasetSelector\",\n};\n</script>\n\n<script lang=\"ts\" setup>\nimport type {\n DatasetOption,\n DatasetSelection,\n LabeledEnrichmentRefs,\n PlRef,\n} from \"@platforma-sdk/model\";\nimport { createDatasetSelection, createPrimaryRef, plRefsEqual } from \"@platforma-sdk/model\";\nimport type { ListOption } from \"@milaboratories/uikit\";\nimport { PlDropdown } from \"@milaboratories/uikit\";\nimport { computed } from \"vue\";\n\nconst slots = defineSlots<{\n tooltip?: () => unknown;\n}>();\n\nconst model = defineModel<DatasetSelection | undefined>();\n\nconst props = withDefaults(\n defineProps<{\n /** Available datasets, each optionally carrying compatible filter choices. */\n options?: Readonly<DatasetOption[]>;\n /** Label above the dropdown. */\n label?: string;\n /** Helper text below the dropdown (shown when there is no error). */\n helper?: string;\n /** Helper text shown while `options` is undefined (loading). */\n loadingOptionsHelper?: string;\n /** Error message displayed below the dropdown. */\n error?: unknown;\n /** Placeholder when nothing is selected. */\n placeholder?: string;\n /** Show a clear button. */\n clearable?: boolean;\n /** Mark the dropdown as required. */\n required?: boolean;\n /** Disable interaction. */\n disabled?: boolean;\n }>(),\n {\n options: undefined,\n label: undefined,\n helper: undefined,\n loadingOptionsHelper: undefined,\n error: undefined,\n placeholder: \"...\",\n clearable: false,\n required: false,\n disabled: false,\n },\n);\n\ntype Selection = { primary: PlRef; filter?: PlRef; enrichments?: LabeledEnrichmentRefs };\n\n// `deepEqual` (used by PlDropdown for matching) treats `{a, b: undefined}` and\n// `{a}` as different shapes, so the option list and the selection value must\n// agree on optional-key presence.\nfunction makeSelection(\n primary: PlRef,\n filter: PlRef | undefined,\n enrichments: LabeledEnrichmentRefs | undefined,\n): Selection {\n return {\n primary,\n ...(filter !== undefined && { filter }),\n ...(enrichments !== undefined && enrichments.length > 0 && { enrichments }),\n };\n}\n\nconst selectionValue = computed<Selection | undefined>(() => {\n const primary = model.value?.primary;\n if (primary === undefined) return undefined;\n // Read enrichments from the current option, not from `model.value`: the\n // stored enrichments are a snapshot at selection time and won't match\n // `dropdownOptions` after `props.options` recomputes (e.g. when the\n // result pool gains or loses an enrichment column).\n // The option's ref, not the stored one, for the same reason: a ref stored with\n // a different `requireEnrichments` flag than the options carry (e.g. saved\n // before a block changed its `buildDatasetOptions` mode) would not match any\n // option and the selection would show empty.\n const option = props.options?.find((o) => plRefsEqual(o.primary.ref, primary.column, true));\n return makeSelection(option?.primary.ref ?? primary.column, primary.filter, option?.enrichments);\n});\n\nconst dropdownOptions = computed<ListOption<Selection>[] | undefined>(() => {\n if (props.options === undefined) return undefined;\n const out: ListOption<Selection>[] = [];\n for (const o of props.options) {\n out.push({\n label: o.primary.label,\n value: makeSelection(o.primary.ref, undefined, o.enrichments),\n });\n for (const filter of o.filters ?? []) {\n out.push({\n label: filter.label,\n description: o.primary.label,\n value: makeSelection(o.primary.ref, filter.ref, o.enrichments),\n });\n }\n }\n return out;\n});\n\nfunction onChange(selection: Selection | undefined) {\n if (selection === undefined) {\n model.value = undefined;\n return;\n }\n model.value = createDatasetSelection(\n createPrimaryRef(selection.primary, selection.filter),\n selection.enrichments,\n );\n}\n</script>\n\n<template>\n <PlDropdown\n data-testid=\"pl-dataset-selector\"\n :model-value=\"selectionValue\"\n :options=\"dropdownOptions\"\n :label=\"label\"\n :helper=\"helper\"\n :loading-options-helper=\"loadingOptionsHelper\"\n :error=\"error\"\n :placeholder=\"placeholder\"\n :clearable=\"clearable\"\n :required=\"required\"\n :disabled=\"disabled\"\n @update:model-value=\"onChange\"\n >\n <template v-if=\"slots.tooltip\" #tooltip>\n <slot name=\"tooltip\" />\n </template>\n </PlDropdown>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"PlDatasetSelector.js","names":["_sfc_main","PlDatasetSelector_vue_vue_type_script_setup_true_lang_default","PlDatasetSelector_default"],"sources":["../../../src/components/PlDatasetSelector/PlDatasetSelector.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Select a dataset or one of its filters in a single dropdown, emitting a\n * {@link DatasetSelection}. Filter labels carry the dataset name as a\n * prefix (e.g. \"Bulk / Top 10\"), so no separate subtitle is rendered.\n * Enrichments from the matching `DatasetOption` are bundled into the\n * emitted value opaquely — block authors unbundle them in their args\n * resolver.\n */\nexport default {\n name: \"PlDatasetSelector\",\n};\n</script>\n\n<script lang=\"ts\" setup>\nimport type {\n DatasetOption,\n DatasetSelection,\n LabeledEnrichmentRefs,\n PlRef,\n} from \"@platforma-sdk/model\";\nimport { createDatasetSelection, createPrimaryRef, plRefsEqual } from \"@platforma-sdk/model\";\nimport type { ListOption } from \"@milaboratories/uikit\";\nimport { PlDropdown } from \"@milaboratories/uikit\";\nimport { computed } from \"vue\";\n\nconst slots = defineSlots<{\n tooltip?: () => unknown;\n}>();\n\nconst model = defineModel<DatasetSelection | undefined>();\n\nconst props = withDefaults(\n defineProps<{\n /** Available datasets, each optionally carrying compatible filter choices. */\n options?: Readonly<DatasetOption[]>;\n /** Label above the dropdown. */\n label?: string;\n /** Helper text below the dropdown (shown when there is no error). */\n helper?: string;\n /** Helper text shown while `options` is undefined (loading). */\n loadingOptionsHelper?: string;\n /** Error message displayed below the dropdown. */\n error?: unknown;\n /** Placeholder when nothing is selected. */\n placeholder?: string;\n /** Show a clear button. */\n clearable?: boolean;\n /** Mark the dropdown as required. */\n required?: boolean;\n /** Disable interaction. */\n disabled?: boolean;\n }>(),\n {\n options: undefined,\n label: undefined,\n helper: undefined,\n loadingOptionsHelper: undefined,\n error: undefined,\n placeholder: \"...\",\n clearable: false,\n required: false,\n disabled: false,\n },\n);\n\ntype Selection = { primary: PlRef; filter?: PlRef; enrichments?: LabeledEnrichmentRefs };\n\n// `deepEqual` (used by PlDropdown for matching) treats `{a, b: undefined}` and\n// `{a}` as different shapes, so the option list and the selection value must\n// agree on optional-key presence.\nfunction makeSelection(\n primary: PlRef,\n filter: PlRef | undefined,\n enrichments: LabeledEnrichmentRefs | undefined,\n): Selection {\n return {\n primary,\n ...(filter !== undefined && { filter }),\n ...(enrichments !== undefined && enrichments.length > 0 && { enrichments }),\n };\n}\n\nconst selectionValue = computed<Selection | undefined>(() => {\n const primary = model.value?.primary;\n if (primary === undefined) return undefined;\n // Read enrichments from the current option, not from `model.value`: the\n // stored enrichments are a snapshot at selection time and won't match\n // `dropdownOptions` after `props.options` recomputes (e.g. when the\n // result pool gains or loses an enrichment column).\n // The option's ref, not the stored one, for the same reason: a ref stored with\n // a different `requireEnrichments` flag than the options carry (e.g. saved\n // before a block changed its `buildDatasetOptions` mode) would not match any\n // option and the selection would show empty.\n const option = props.options?.find((o) => plRefsEqual(o.primary.ref, primary.column, true));\n return makeSelection(option?.primary.ref ?? primary.column, primary.filter, option?.enrichments);\n});\n\nconst dropdownOptions = computed<ListOption<Selection>[] | undefined>(() => {\n if (props.options === undefined) return undefined;\n const out: ListOption<Selection>[] = [];\n for (const o of props.options) {\n out.push({\n label: o.primary.label,\n value: makeSelection(o.primary.ref, undefined, o.enrichments),\n });\n for (const filter of o.filters ?? []) {\n out.push({\n label: filter.label,\n description: o.primary.label,\n value: makeSelection(o.primary.ref, filter.ref, o.enrichments),\n });\n }\n }\n return out;\n});\n\nfunction onChange(selection: Selection | undefined) {\n if (selection === undefined) {\n model.value = undefined;\n return;\n }\n model.value = createDatasetSelection(\n createPrimaryRef(selection.primary, selection.filter),\n selection.enrichments,\n );\n}\n</script>\n\n<template>\n <PlDropdown\n data-testid=\"pl-dataset-selector\"\n :model-value=\"selectionValue\"\n :options=\"dropdownOptions\"\n :label=\"label\"\n :helper=\"helper\"\n :loading-options-helper=\"loadingOptionsHelper\"\n :error=\"error\"\n :placeholder=\"placeholder\"\n :clearable=\"clearable\"\n :required=\"required\"\n :disabled=\"disabled\"\n @update:model-value=\"onChange\"\n >\n <template v-if=\"slots.tooltip\" #tooltip>\n <slot name=\"tooltip\" />\n </template>\n </PlDropdown>\n</template>\n"],"mappings":""}
@@ -1,9 +1,9 @@
1
1
  import { computed as e, createBlock as t, createSlots as n, defineComponent as r, mergeModels as i, openBlock as a, renderSlot as o, unref as s, useModel as c, useSlots as l, withCtx as u } from "vue";
2
2
  import { createDatasetSelection as d, createPrimaryRef as f, plRefsEqual as p } from "@platforma-sdk/model";
3
3
  import { PlDropdown as m } from "@milaboratories/uikit";
4
- var h = /* @__PURE__ */ r({
4
+ var h = /*@__PURE__*/ r({
5
5
  name: "PlDatasetSelector",
6
- props: /* @__PURE__ */ i({
6
+ props: /*@__PURE__*/ i({
7
7
  options: { default: void 0 },
8
8
  label: { default: void 0 },
9
9
  helper: { default: void 0 },
@@ -58,11 +58,7 @@ var h = /* @__PURE__ */ r({
58
58
  return e;
59
59
  });
60
60
  function b(e) {
61
- if (e === void 0) {
62
- h.value = void 0;
63
- return;
64
- }
65
- h.value = d(f(e.primary, e.filter), e.enrichments);
61
+ e === void 0 ? h.value = void 0 : h.value = d(f(e.primary, e.filter), e.enrichments);
66
62
  }
67
63
  return (e, c) => (a(), t(s(m), {
68
64
  "data-testid": "pl-dataset-selector",
@@ -95,7 +91,6 @@ var h = /* @__PURE__ */ r({
95
91
  ]));
96
92
  }
97
93
  });
98
- //#endregion
99
94
  export { h as default };
100
95
 
101
96
  //# sourceMappingURL=PlDatasetSelector.vue2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PlDatasetSelector.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/PlDatasetSelector/PlDatasetSelector.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Select a dataset or one of its filters in a single dropdown, emitting a\n * {@link DatasetSelection}. Filter labels carry the dataset name as a\n * prefix (e.g. \"Bulk / Top 10\"), so no separate subtitle is rendered.\n * Enrichments from the matching `DatasetOption` are bundled into the\n * emitted value opaquely — block authors unbundle them in their args\n * resolver.\n */\nexport default {\n name: \"PlDatasetSelector\",\n};\n</script>\n\n<script lang=\"ts\" setup>\nimport type {\n DatasetOption,\n DatasetSelection,\n LabeledEnrichmentRefs,\n PlRef,\n} from \"@platforma-sdk/model\";\nimport { createDatasetSelection, createPrimaryRef, plRefsEqual } from \"@platforma-sdk/model\";\nimport type { ListOption } from \"@milaboratories/uikit\";\nimport { PlDropdown } from \"@milaboratories/uikit\";\nimport { computed } from \"vue\";\n\nconst slots = defineSlots<{\n tooltip?: () => unknown;\n}>();\n\nconst model = defineModel<DatasetSelection | undefined>();\n\nconst props = withDefaults(\n defineProps<{\n /** Available datasets, each optionally carrying compatible filter choices. */\n options?: Readonly<DatasetOption[]>;\n /** Label above the dropdown. */\n label?: string;\n /** Helper text below the dropdown (shown when there is no error). */\n helper?: string;\n /** Helper text shown while `options` is undefined (loading). */\n loadingOptionsHelper?: string;\n /** Error message displayed below the dropdown. */\n error?: unknown;\n /** Placeholder when nothing is selected. */\n placeholder?: string;\n /** Show a clear button. */\n clearable?: boolean;\n /** Mark the dropdown as required. */\n required?: boolean;\n /** Disable interaction. */\n disabled?: boolean;\n }>(),\n {\n options: undefined,\n label: undefined,\n helper: undefined,\n loadingOptionsHelper: undefined,\n error: undefined,\n placeholder: \"...\",\n clearable: false,\n required: false,\n disabled: false,\n },\n);\n\ntype Selection = { primary: PlRef; filter?: PlRef; enrichments?: LabeledEnrichmentRefs };\n\n// `deepEqual` (used by PlDropdown for matching) treats `{a, b: undefined}` and\n// `{a}` as different shapes, so the option list and the selection value must\n// agree on optional-key presence.\nfunction makeSelection(\n primary: PlRef,\n filter: PlRef | undefined,\n enrichments: LabeledEnrichmentRefs | undefined,\n): Selection {\n return {\n primary,\n ...(filter !== undefined && { filter }),\n ...(enrichments !== undefined && enrichments.length > 0 && { enrichments }),\n };\n}\n\nconst selectionValue = computed<Selection | undefined>(() => {\n const primary = model.value?.primary;\n if (primary === undefined) return undefined;\n // Read enrichments from the current option, not from `model.value`: the\n // stored enrichments are a snapshot at selection time and won't match\n // `dropdownOptions` after `props.options` recomputes (e.g. when the\n // result pool gains or loses an enrichment column).\n // The option's ref, not the stored one, for the same reason: a ref stored with\n // a different `requireEnrichments` flag than the options carry (e.g. saved\n // before a block changed its `buildDatasetOptions` mode) would not match any\n // option and the selection would show empty.\n const option = props.options?.find((o) => plRefsEqual(o.primary.ref, primary.column, true));\n return makeSelection(option?.primary.ref ?? primary.column, primary.filter, option?.enrichments);\n});\n\nconst dropdownOptions = computed<ListOption<Selection>[] | undefined>(() => {\n if (props.options === undefined) return undefined;\n const out: ListOption<Selection>[] = [];\n for (const o of props.options) {\n out.push({\n label: o.primary.label,\n value: makeSelection(o.primary.ref, undefined, o.enrichments),\n });\n for (const filter of o.filters ?? []) {\n out.push({\n label: filter.label,\n description: o.primary.label,\n value: makeSelection(o.primary.ref, filter.ref, o.enrichments),\n });\n }\n }\n return out;\n});\n\nfunction onChange(selection: Selection | undefined) {\n if (selection === undefined) {\n model.value = undefined;\n return;\n }\n model.value = createDatasetSelection(\n createPrimaryRef(selection.primary, selection.filter),\n selection.enrichments,\n );\n}\n</script>\n\n<template>\n <PlDropdown\n data-testid=\"pl-dataset-selector\"\n :model-value=\"selectionValue\"\n :options=\"dropdownOptions\"\n :label=\"label\"\n :helper=\"helper\"\n :loading-options-helper=\"loadingOptionsHelper\"\n :error=\"error\"\n :placeholder=\"placeholder\"\n :clearable=\"clearable\"\n :required=\"required\"\n :disabled=\"disabled\"\n @update:model-value=\"onChange\"\n >\n <template v-if=\"slots.tooltip\" #tooltip>\n <slot name=\"tooltip\" />\n </template>\n </PlDropdown>\n</template>\n"],"mappings":";;;;CAUE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBR,IAAM,IAAQ,GAEV,EAEE,IAAQ,EAAyC,GAAA,aAAE,EAEnD,IAAQ;EAuCd,SAAS,EACP,GACA,GACA,GACW;AACX,UAAO;IACL;IACA,GAAI,MAAW,KAAA,KAAa,EAAE,WAAQ;IACtC,GAAI,MAAgB,KAAA,KAAa,EAAY,SAAS,KAAK,EAAE,gBAAa;IAC3E;;EAGH,IAAM,IAAiB,QAAsC;GAC3D,IAAM,IAAU,EAAM,OAAO;AAC7B,OAAI,MAAY,KAAA,EAAW;GAS3B,IAAM,IAAS,EAAM,SAAS,MAAM,MAAM,EAAY,EAAE,QAAQ,KAAK,EAAQ,QAAQ,GAAK,CAAC;AAC3F,UAAO,EAAc,GAAQ,QAAQ,OAAO,EAAQ,QAAQ,EAAQ,QAAQ,GAAQ,YAAY;IAChG,EAEI,IAAkB,QAAoD;AAC1E,OAAI,EAAM,YAAY,KAAA,EAAW;GACjC,IAAM,IAA+B,EAAE;AACvC,QAAK,IAAM,KAAK,EAAM,SAAS;AAC7B,MAAI,KAAK;KACP,OAAO,EAAE,QAAQ;KACjB,OAAO,EAAc,EAAE,QAAQ,KAAK,KAAA,GAAW,EAAE,YAAY;KAC9D,CAAC;AACF,SAAK,IAAM,KAAU,EAAE,WAAW,EAAE,CAClC,GAAI,KAAK;KACP,OAAO,EAAO;KACd,aAAa,EAAE,QAAQ;KACvB,OAAO,EAAc,EAAE,QAAQ,KAAK,EAAO,KAAK,EAAE,YAAY;KAC/D,CAAC;;AAGN,UAAO;IACP;EAEF,SAAS,EAAS,GAAkC;AAClD,OAAI,MAAc,KAAA,GAAW;AAC3B,MAAM,QAAQ,KAAA;AACd;;AAEF,KAAM,QAAQ,EACZ,EAAiB,EAAU,SAAS,EAAU,OAAO,EACrD,EAAU,YACX;;yBAKD,EAiBa,EAAA,EAAA,EAAA;GAhBX,eAAY;GACX,eAAa,EAAA;GACb,SAAS,EAAA;GACT,OAAO,EAAA;GACP,QAAQ,EAAA;GACR,0BAAwB,EAAA;GACxB,OAAO,EAAA;GACP,aAAa,EAAA;GACb,WAAW,EAAA;GACX,UAAU,EAAA;GACV,UAAU,EAAA;GACV,uBAAoB;kBAEL,EAAM,UAAA;SAAU;eACP,CAAvB,EAAuB,EAAA,QAAA,UAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"PlDatasetSelector.vue_vue_type_script_setup_true_lang.js","names":["_useSlots","_useModel","_openBlock","_createBlock","_unref","_createSlots","_withCtx","_renderSlot","PlDatasetSelector_vue_vue_type_script_setup_true_lang_default","\"modelValue\"","\"modelModifiers\"","slots","useSlots","model","useModel","__props","props","makeSelection","filter","enrichments","selectionValue","computed","primary","option","plRefsEqual","o","dropdownOptions","out","onChange","selection","createDatasetSelection","createPrimaryRef","openBlock","createBlock","unref","PlDropdown","createSlots","withCtx","renderSlot","_ctx"],"sources":["../../../src/components/PlDatasetSelector/PlDatasetSelector.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Select a dataset or one of its filters in a single dropdown, emitting a\n * {@link DatasetSelection}. Filter labels carry the dataset name as a\n * prefix (e.g. \"Bulk / Top 10\"), so no separate subtitle is rendered.\n * Enrichments from the matching `DatasetOption` are bundled into the\n * emitted value opaquely — block authors unbundle them in their args\n * resolver.\n */\nexport default {\n name: \"PlDatasetSelector\",\n};\n</script>\n\n<script lang=\"ts\" setup>\nimport type {\n DatasetOption,\n DatasetSelection,\n LabeledEnrichmentRefs,\n PlRef,\n} from \"@platforma-sdk/model\";\nimport { createDatasetSelection, createPrimaryRef, plRefsEqual } from \"@platforma-sdk/model\";\nimport type { ListOption } from \"@milaboratories/uikit\";\nimport { PlDropdown } from \"@milaboratories/uikit\";\nimport { computed } from \"vue\";\n\nconst slots = defineSlots<{\n tooltip?: () => unknown;\n}>();\n\nconst model = defineModel<DatasetSelection | undefined>();\n\nconst props = withDefaults(\n defineProps<{\n /** Available datasets, each optionally carrying compatible filter choices. */\n options?: Readonly<DatasetOption[]>;\n /** Label above the dropdown. */\n label?: string;\n /** Helper text below the dropdown (shown when there is no error). */\n helper?: string;\n /** Helper text shown while `options` is undefined (loading). */\n loadingOptionsHelper?: string;\n /** Error message displayed below the dropdown. */\n error?: unknown;\n /** Placeholder when nothing is selected. */\n placeholder?: string;\n /** Show a clear button. */\n clearable?: boolean;\n /** Mark the dropdown as required. */\n required?: boolean;\n /** Disable interaction. */\n disabled?: boolean;\n }>(),\n {\n options: undefined,\n label: undefined,\n helper: undefined,\n loadingOptionsHelper: undefined,\n error: undefined,\n placeholder: \"...\",\n clearable: false,\n required: false,\n disabled: false,\n },\n);\n\ntype Selection = { primary: PlRef; filter?: PlRef; enrichments?: LabeledEnrichmentRefs };\n\n// `deepEqual` (used by PlDropdown for matching) treats `{a, b: undefined}` and\n// `{a}` as different shapes, so the option list and the selection value must\n// agree on optional-key presence.\nfunction makeSelection(\n primary: PlRef,\n filter: PlRef | undefined,\n enrichments: LabeledEnrichmentRefs | undefined,\n): Selection {\n return {\n primary,\n ...(filter !== undefined && { filter }),\n ...(enrichments !== undefined && enrichments.length > 0 && { enrichments }),\n };\n}\n\nconst selectionValue = computed<Selection | undefined>(() => {\n const primary = model.value?.primary;\n if (primary === undefined) return undefined;\n // Read enrichments from the current option, not from `model.value`: the\n // stored enrichments are a snapshot at selection time and won't match\n // `dropdownOptions` after `props.options` recomputes (e.g. when the\n // result pool gains or loses an enrichment column).\n // The option's ref, not the stored one, for the same reason: a ref stored with\n // a different `requireEnrichments` flag than the options carry (e.g. saved\n // before a block changed its `buildDatasetOptions` mode) would not match any\n // option and the selection would show empty.\n const option = props.options?.find((o) => plRefsEqual(o.primary.ref, primary.column, true));\n return makeSelection(option?.primary.ref ?? primary.column, primary.filter, option?.enrichments);\n});\n\nconst dropdownOptions = computed<ListOption<Selection>[] | undefined>(() => {\n if (props.options === undefined) return undefined;\n const out: ListOption<Selection>[] = [];\n for (const o of props.options) {\n out.push({\n label: o.primary.label,\n value: makeSelection(o.primary.ref, undefined, o.enrichments),\n });\n for (const filter of o.filters ?? []) {\n out.push({\n label: filter.label,\n description: o.primary.label,\n value: makeSelection(o.primary.ref, filter.ref, o.enrichments),\n });\n }\n }\n return out;\n});\n\nfunction onChange(selection: Selection | undefined) {\n if (selection === undefined) {\n model.value = undefined;\n return;\n }\n model.value = createDatasetSelection(\n createPrimaryRef(selection.primary, selection.filter),\n selection.enrichments,\n );\n}\n</script>\n\n<template>\n <PlDropdown\n data-testid=\"pl-dataset-selector\"\n :model-value=\"selectionValue\"\n :options=\"dropdownOptions\"\n :label=\"label\"\n :helper=\"helper\"\n :loading-options-helper=\"loadingOptionsHelper\"\n :error=\"error\"\n :placeholder=\"placeholder\"\n :clearable=\"clearable\"\n :required=\"required\"\n :disabled=\"disabled\"\n @update:model-value=\"onChange\"\n >\n <template v-if=\"slots.tooltip\" #tooltip>\n <slot name=\"tooltip\" />\n </template>\n </PlDropdown>\n</template>\n"],"mappings":";;;;CAUE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBR,IAAMW,IAAQX,EAAA,GAIRa,IAAQZ,EAAyCc,GAAA,YAAC,GAElDC,IAAQD;EAuCd,SAASE,EACP,GACA,GACA,GACW;GACX,OAAO;IACL;IACA,GAAIC,MAAW,KAAA,KAAa,EAAE,UAAO;IACrC,GAAIC,MAAgB,KAAA,KAAaA,EAAY,SAAS,KAAK,EAAE,eAAY;GAC3E;EACF;EAEA,IAAMC,IAAiBC,QAAsC;GAC3D,IAAMC,IAAUT,EAAM,OAAO;GAC7B,IAAIS,MAAY,KAAA,GAAW;GAS3B,IAAMC,IAASP,EAAM,SAAS,MAAM,MAAMQ,EAAYC,EAAE,QAAQ,KAAKH,EAAQ,QAAQ,EAAI,CAAC;GAC1F,OAAOL,EAAcM,GAAQ,QAAQ,OAAOD,EAAQ,QAAQA,EAAQ,QAAQC,GAAQ,WAAW;EACjG,CAAC,GAEKG,IAAkBL,QAAoD;GAC1E,IAAIL,EAAM,YAAY,KAAA,GAAW;GACjC,IAAMW,IAA+B,CAAC;GACtC,KAAK,IAAMF,KAAKT,EAAM,SAAS;IAC7B,EAAI,KAAK;KACP,OAAOS,EAAE,QAAQ;KACjB,OAAOR,EAAcQ,EAAE,QAAQ,KAAK,KAAA,GAAWA,EAAE,WAAW;IAC9D,CAAC;IACD,KAAK,IAAMP,KAAUO,EAAE,WAAW,CAAC,GACjC,EAAI,KAAK;KACP,OAAOP,EAAO;KACd,aAAaO,EAAE,QAAQ;KACvB,OAAOR,EAAcQ,EAAE,QAAQ,KAAKP,EAAO,KAAKO,EAAE,WAAW;IAC/D,CAAC;GAEL;GACA,OAAOE;EACT,CAAC;EAED,SAASC,EAAS,GAAkC;GAClD,AAAIC,MAAc,KAAA,IAChB,EAAM,QAAQ,KAAA,IAGhB,EAAM,QAAQC,EACZC,EAAiBF,EAAU,SAASA,EAAU,MAAM,GACpDA,EAAU,WACZ;EACF;E,kBAIE3B,EAAA,GAAAC,EAiBaC,EAAA+B,CAAA,GAAA;GAhBX,eAAY;GACX,eAAaf,EAAA;GACb,SAASM,EAAA;GACT,OAAOX,EAAA;GACP,QAAQA,EAAA;GACR,0BAAwBA,EAAA;GACxB,OAAOA,EAAA;GACP,aAAaA,EAAA;GACb,WAAWA,EAAA;GACX,UAAUA,EAAA;GACV,UAAUA,EAAA;GACV,uBAAoBa;E,gBAELjB,EAAM,U;GAAU,MAAA;GAC9B,IAAAL,QAAuB,CAAvBC,EAAuBgC,EAAA,QAAA,SAAA,C"}
@@ -1 +1 @@
1
- import "./PlDatasetSelector.js";
1
+ export { default as PlDatasetSelector } from "./PlDatasetSelector.js";