@platforma-sdk/ui-vue 1.85.2 → 1.86.3

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 (372) 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 +32 -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.vue.d.ts.map +1 -1
  39. package/dist/components/PlAdvancedFilter/FilterEditor.vue2.js +86 -83
  40. package/dist/components/PlAdvancedFilter/FilterEditor.vue2.js.map +1 -1
  41. package/dist/components/PlAdvancedFilter/OperandButton.js +1 -2
  42. package/dist/components/PlAdvancedFilter/OperandButton.js.map +1 -1
  43. package/dist/components/PlAdvancedFilter/OperandButton.style.js +6 -6
  44. package/dist/components/PlAdvancedFilter/OperandButton.style.js.map +1 -1
  45. package/dist/components/PlAdvancedFilter/OperandButton.vue2.js +2 -3
  46. package/dist/components/PlAdvancedFilter/OperandButton.vue2.js.map +1 -1
  47. package/dist/components/PlAdvancedFilter/PlAdvancedFilter.js +1 -2
  48. package/dist/components/PlAdvancedFilter/PlAdvancedFilter.js.map +1 -1
  49. package/dist/components/PlAdvancedFilter/PlAdvancedFilter.style.js +11 -11
  50. package/dist/components/PlAdvancedFilter/PlAdvancedFilter.style.js.map +1 -1
  51. package/dist/components/PlAdvancedFilter/PlAdvancedFilter.vue2.js +4 -5
  52. package/dist/components/PlAdvancedFilter/PlAdvancedFilter.vue2.js.map +1 -1
  53. package/dist/components/PlAdvancedFilter/constants.js +1 -2
  54. package/dist/components/PlAdvancedFilter/constants.js.map +1 -1
  55. package/dist/components/PlAdvancedFilter/index.js +4 -5
  56. package/dist/components/PlAdvancedFilter/index.js.map +1 -1
  57. package/dist/components/PlAdvancedFilter/types.d.ts +2 -0
  58. package/dist/components/PlAdvancedFilter/types.d.ts.map +1 -1
  59. package/dist/components/PlAdvancedFilter/utils.js +2 -3
  60. package/dist/components/PlAdvancedFilter/utils.js.map +1 -1
  61. package/dist/components/PlAgCellFile/PlAgCellFile.js +1 -2
  62. package/dist/components/PlAgCellFile/PlAgCellFile.js.map +1 -1
  63. package/dist/components/PlAgCellFile/PlAgCellFile.vue2.js +2 -3
  64. package/dist/components/PlAgCellFile/PlAgCellFile.vue2.js.map +1 -1
  65. package/dist/components/PlAgCellFile/index.js +1 -1
  66. package/dist/components/PlAgCellProgress/PlAgCellProgress.js +1 -2
  67. package/dist/components/PlAgCellProgress/PlAgCellProgress.js.map +1 -1
  68. package/dist/components/PlAgCellProgress/PlAgCellProgress.vue2.js +2 -3
  69. package/dist/components/PlAgCellProgress/PlAgCellProgress.vue2.js.map +1 -1
  70. package/dist/components/PlAgCellProgress/index.js +1 -1
  71. package/dist/components/PlAgCellStatusTag/PlAgCellStatusTag.js +1 -2
  72. package/dist/components/PlAgCellStatusTag/PlAgCellStatusTag.js.map +1 -1
  73. package/dist/components/PlAgCellStatusTag/PlAgCellStatusTag.vue2.js +2 -3
  74. package/dist/components/PlAgCellStatusTag/PlAgCellStatusTag.vue2.js.map +1 -1
  75. package/dist/components/PlAgCellStatusTag/index.js +1 -1
  76. package/dist/components/PlAgChartHistogramCell/PlAgChartHistogramCell.js +1 -2
  77. package/dist/components/PlAgChartHistogramCell/PlAgChartHistogramCell.js.map +1 -1
  78. package/dist/components/PlAgChartHistogramCell/PlAgChartHistogramCell.vue2.js +2 -3
  79. package/dist/components/PlAgChartHistogramCell/PlAgChartHistogramCell.vue2.js.map +1 -1
  80. package/dist/components/PlAgChartHistogramCell/index.js +1 -1
  81. package/dist/components/PlAgChartStackedBarCell/PlAgChartStackedBarCell.js +1 -2
  82. package/dist/components/PlAgChartStackedBarCell/PlAgChartStackedBarCell.js.map +1 -1
  83. package/dist/components/PlAgChartStackedBarCell/PlAgChartStackedBarCell.vue2.js +2 -3
  84. package/dist/components/PlAgChartStackedBarCell/PlAgChartStackedBarCell.vue2.js.map +1 -1
  85. package/dist/components/PlAgChartStackedBarCell/index.js +1 -1
  86. package/dist/components/PlAgColumnHeader/PlAgColumnHeader.js +1 -2
  87. package/dist/components/PlAgColumnHeader/PlAgColumnHeader.js.map +1 -1
  88. package/dist/components/PlAgColumnHeader/PlAgColumnHeader.vue.d.ts.map +1 -1
  89. package/dist/components/PlAgColumnHeader/PlAgColumnHeader.vue2.js +41 -36
  90. package/dist/components/PlAgColumnHeader/PlAgColumnHeader.vue2.js.map +1 -1
  91. package/dist/components/PlAgColumnHeader/index.js +1 -1
  92. package/dist/components/PlAgColumnHeader/types.d.ts +2 -0
  93. package/dist/components/PlAgColumnHeader/types.d.ts.map +1 -1
  94. package/dist/components/PlAgCsvExporter/PlAgCsvExporter.js +1 -2
  95. package/dist/components/PlAgCsvExporter/PlAgCsvExporter.js.map +1 -1
  96. package/dist/components/PlAgCsvExporter/PlAgCsvExporter.vue2.js +2 -3
  97. package/dist/components/PlAgCsvExporter/PlAgCsvExporter.vue2.js.map +1 -1
  98. package/dist/components/PlAgCsvExporter/export-csv.js +3 -4
  99. package/dist/components/PlAgCsvExporter/export-csv.js.map +1 -1
  100. package/dist/components/PlAgCsvExporter/index.js +1 -1
  101. package/dist/components/PlAgDataTable/PlAgDataTableSheets.js +1 -2
  102. package/dist/components/PlAgDataTable/PlAgDataTableSheets.js.map +1 -1
  103. package/dist/components/PlAgDataTable/PlAgDataTableSheets.style.js +3 -3
  104. package/dist/components/PlAgDataTable/PlAgDataTableSheets.style.js.map +1 -1
  105. package/dist/components/PlAgDataTable/PlAgDataTableSheets.vue2.js +4 -5
  106. package/dist/components/PlAgDataTable/PlAgDataTableSheets.vue2.js.map +1 -1
  107. package/dist/components/PlAgDataTable/PlAgDataTableV2.js +1 -2
  108. package/dist/components/PlAgDataTable/PlAgDataTableV2.js.map +1 -1
  109. package/dist/components/PlAgDataTable/PlAgDataTableV2.style.js +5 -5
  110. package/dist/components/PlAgDataTable/PlAgDataTableV2.style.js.map +1 -1
  111. package/dist/components/PlAgDataTable/PlAgDataTableV2.vue.d.ts.map +1 -1
  112. package/dist/components/PlAgDataTable/PlAgDataTableV2.vue2.js +130 -129
  113. package/dist/components/PlAgDataTable/PlAgDataTableV2.vue2.js.map +1 -1
  114. package/dist/components/PlAgDataTable/PlAgOverlayLoading.js +1 -2
  115. package/dist/components/PlAgDataTable/PlAgOverlayLoading.js.map +1 -1
  116. package/dist/components/PlAgDataTable/PlAgOverlayLoading.vue2.js +2 -3
  117. package/dist/components/PlAgDataTable/PlAgOverlayLoading.vue2.js.map +1 -1
  118. package/dist/components/PlAgDataTable/PlAgOverlayNoRows.js +1 -2
  119. package/dist/components/PlAgDataTable/PlAgOverlayNoRows.js.map +1 -1
  120. package/dist/components/PlAgDataTable/PlAgOverlayNoRows.vue2.js +2 -3
  121. package/dist/components/PlAgDataTable/PlAgOverlayNoRows.vue2.js.map +1 -1
  122. package/dist/components/PlAgDataTable/PlAgRowCount.js +1 -2
  123. package/dist/components/PlAgDataTable/PlAgRowCount.js.map +1 -1
  124. package/dist/components/PlAgDataTable/PlAgRowCount.vue2.js +2 -3
  125. package/dist/components/PlAgDataTable/PlAgRowCount.vue2.js.map +1 -1
  126. package/dist/components/PlAgDataTable/compositions/useFilterableColumns.js +1 -2
  127. package/dist/components/PlAgDataTable/compositions/useFilterableColumns.js.map +1 -1
  128. package/dist/components/PlAgDataTable/compositions/useGrid.js +1 -2
  129. package/dist/components/PlAgDataTable/compositions/useGrid.js.map +1 -1
  130. package/dist/components/PlAgDataTable/index.js +11 -11
  131. package/dist/components/PlAgDataTable/index.js.map +1 -1
  132. package/dist/components/PlAgDataTable/pl-ag-overlay-loading.module.js +7 -7
  133. package/dist/components/PlAgDataTable/pl-ag-overlay-loading.module.js.map +1 -1
  134. package/dist/components/PlAgDataTable/sources/common.js +1 -2
  135. package/dist/components/PlAgDataTable/sources/common.js.map +1 -1
  136. package/dist/components/PlAgDataTable/sources/focus-row.js +1 -2
  137. package/dist/components/PlAgDataTable/sources/focus-row.js.map +1 -1
  138. package/dist/components/PlAgDataTable/sources/grid-state.js +3 -4
  139. package/dist/components/PlAgDataTable/sources/grid-state.js.map +1 -1
  140. package/dist/components/PlAgDataTable/sources/menu-items.js +1 -2
  141. package/dist/components/PlAgDataTable/sources/menu-items.js.map +1 -1
  142. package/dist/components/PlAgDataTable/sources/row-number.js +2 -3
  143. package/dist/components/PlAgDataTable/sources/row-number.js.map +1 -1
  144. package/dist/components/PlAgDataTable/sources/table-source-v2.d.ts +2 -0
  145. package/dist/components/PlAgDataTable/sources/table-source-v2.d.ts.map +1 -1
  146. package/dist/components/PlAgDataTable/sources/table-source-v2.js +49 -52
  147. package/dist/components/PlAgDataTable/sources/table-source-v2.js.map +1 -1
  148. package/dist/components/PlAgDataTable/sources/table-state-v2.js +2 -3
  149. package/dist/components/PlAgDataTable/sources/table-state-v2.js.map +1 -1
  150. package/dist/components/PlAgDataTable/sources/value-rendering.js +6 -9
  151. package/dist/components/PlAgDataTable/sources/value-rendering.js.map +1 -1
  152. package/dist/components/PlAgDataTable/types.js +1 -2
  153. package/dist/components/PlAgDataTable/types.js.map +1 -1
  154. package/dist/components/PlAgGridColumnManager/PlAgGridColumnManager.js +1 -2
  155. package/dist/components/PlAgGridColumnManager/PlAgGridColumnManager.js.map +1 -1
  156. package/dist/components/PlAgGridColumnManager/PlAgGridColumnManager.style.js +6 -6
  157. package/dist/components/PlAgGridColumnManager/PlAgGridColumnManager.style.js.map +1 -1
  158. package/dist/components/PlAgGridColumnManager/PlAgGridColumnManager.vue.d.ts.map +1 -1
  159. package/dist/components/PlAgGridColumnManager/PlAgGridColumnManager.vue2.js +44 -38
  160. package/dist/components/PlAgGridColumnManager/PlAgGridColumnManager.vue2.js.map +1 -1
  161. package/dist/components/PlAgGridColumnManager/index.js +1 -1
  162. package/dist/components/PlAgGridColumnManager/useFilteredItems.js +2 -3
  163. package/dist/components/PlAgGridColumnManager/useFilteredItems.js.map +1 -1
  164. package/dist/components/PlAgGridColumnManager/useGridColumns.js +1 -2
  165. package/dist/components/PlAgGridColumnManager/useGridColumns.js.map +1 -1
  166. package/dist/components/PlAgRowNumCheckbox/PlAgRowNumCheckbox.js +1 -2
  167. package/dist/components/PlAgRowNumCheckbox/PlAgRowNumCheckbox.js.map +1 -1
  168. package/dist/components/PlAgRowNumCheckbox/PlAgRowNumCheckbox.vue2.js +2 -3
  169. package/dist/components/PlAgRowNumCheckbox/PlAgRowNumCheckbox.vue2.js.map +1 -1
  170. package/dist/components/PlAgRowNumCheckbox/index.js +1 -1
  171. package/dist/components/PlAgRowNumCheckbox/pl-ag-row-num-checkbox.module.js +7 -7
  172. package/dist/components/PlAgRowNumCheckbox/pl-ag-row-num-checkbox.module.js.map +1 -1
  173. package/dist/components/PlAgRowNumHeader.js +1 -2
  174. package/dist/components/PlAgRowNumHeader.js.map +1 -1
  175. package/dist/components/PlAgRowNumHeader.vue2.js +2 -3
  176. package/dist/components/PlAgRowNumHeader.vue2.js.map +1 -1
  177. package/dist/components/PlAgTextAndButtonCell/PlAgTextAndButtonCell.js +1 -2
  178. package/dist/components/PlAgTextAndButtonCell/PlAgTextAndButtonCell.js.map +1 -1
  179. package/dist/components/PlAgTextAndButtonCell/PlAgTextAndButtonCell.vue2.js +2 -3
  180. package/dist/components/PlAgTextAndButtonCell/PlAgTextAndButtonCell.vue2.js.map +1 -1
  181. package/dist/components/PlAgTextAndButtonCell/index.js +1 -1
  182. package/dist/components/PlAnnotations/components/AnnotationsSidebar.js +1 -2
  183. package/dist/components/PlAnnotations/components/AnnotationsSidebar.js.map +1 -1
  184. package/dist/components/PlAnnotations/components/AnnotationsSidebar.style.js +9 -9
  185. package/dist/components/PlAnnotations/components/AnnotationsSidebar.style.js.map +1 -1
  186. package/dist/components/PlAnnotations/components/AnnotationsSidebar.vue2.js +2 -3
  187. package/dist/components/PlAnnotations/components/AnnotationsSidebar.vue2.js.map +1 -1
  188. package/dist/components/PlAnnotations/components/FilterSidebar.js +1 -2
  189. package/dist/components/PlAnnotations/components/FilterSidebar.js.map +1 -1
  190. package/dist/components/PlAnnotations/components/FilterSidebar.style.js +5 -5
  191. package/dist/components/PlAnnotations/components/FilterSidebar.style.js.map +1 -1
  192. package/dist/components/PlAnnotations/components/FilterSidebar.vue2.js +2 -3
  193. package/dist/components/PlAnnotations/components/FilterSidebar.vue2.js.map +1 -1
  194. package/dist/components/PlAnnotations/components/PlAnnotations.js +1 -2
  195. package/dist/components/PlAnnotations/components/PlAnnotations.js.map +1 -1
  196. package/dist/components/PlAnnotations/components/PlAnnotations.style.js +3 -3
  197. package/dist/components/PlAnnotations/components/PlAnnotations.style.js.map +1 -1
  198. package/dist/components/PlAnnotations/components/PlAnnotations.vue2.js +2 -3
  199. package/dist/components/PlAnnotations/components/PlAnnotations.vue2.js.map +1 -1
  200. package/dist/components/PlAnnotations/components/PlAnnotationsModal.js +1 -2
  201. package/dist/components/PlAnnotations/components/PlAnnotationsModal.js.map +1 -1
  202. package/dist/components/PlAnnotations/components/PlAnnotationsModal.style.js +5 -5
  203. package/dist/components/PlAnnotations/components/PlAnnotationsModal.style.js.map +1 -1
  204. package/dist/components/PlAnnotations/components/PlAnnotationsModal.vue2.js +2 -3
  205. package/dist/components/PlAnnotations/components/PlAnnotationsModal.vue2.js.map +1 -1
  206. package/dist/components/PlAnnotations/components/style.module.js +6 -6
  207. package/dist/components/PlAnnotations/components/style.module.js.map +1 -1
  208. package/dist/components/PlAnnotations/index.js +3 -2
  209. package/dist/components/PlAnnotations/utils.js +1 -2
  210. package/dist/components/PlAnnotations/utils.js.map +1 -1
  211. package/dist/components/PlAppErrorNotificationAlert/PlAppErrorNotificationAlert.js +1 -2
  212. package/dist/components/PlAppErrorNotificationAlert/PlAppErrorNotificationAlert.js.map +1 -1
  213. package/dist/components/PlAppErrorNotificationAlert/PlAppErrorNotificationAlert.vue2.js +2 -3
  214. package/dist/components/PlAppErrorNotificationAlert/PlAppErrorNotificationAlert.vue2.js.map +1 -1
  215. package/dist/components/PlAppErrorNotificationAlert/index.js +1 -1
  216. package/dist/components/PlBtnExportArchive/Item.js +1 -2
  217. package/dist/components/PlBtnExportArchive/Item.js.map +1 -1
  218. package/dist/components/PlBtnExportArchive/Item.style.js +7 -7
  219. package/dist/components/PlBtnExportArchive/Item.style.js.map +1 -1
  220. package/dist/components/PlBtnExportArchive/Item.vue2.js +2 -3
  221. package/dist/components/PlBtnExportArchive/Item.vue2.js.map +1 -1
  222. package/dist/components/PlBtnExportArchive/PlBtnExportArchive.js +1 -2
  223. package/dist/components/PlBtnExportArchive/PlBtnExportArchive.js.map +1 -1
  224. package/dist/components/PlBtnExportArchive/PlBtnExportArchive.style.js +6 -6
  225. package/dist/components/PlBtnExportArchive/PlBtnExportArchive.style.js.map +1 -1
  226. package/dist/components/PlBtnExportArchive/PlBtnExportArchive.vue2.js +16 -17
  227. package/dist/components/PlBtnExportArchive/PlBtnExportArchive.vue2.js.map +1 -1
  228. package/dist/components/PlBtnExportArchive/Summary.js +1 -2
  229. package/dist/components/PlBtnExportArchive/Summary.js.map +1 -1
  230. package/dist/components/PlBtnExportArchive/Summary.style.js +6 -6
  231. package/dist/components/PlBtnExportArchive/Summary.style.js.map +1 -1
  232. package/dist/components/PlBtnExportArchive/Summary.vue2.js +2 -3
  233. package/dist/components/PlBtnExportArchive/Summary.vue2.js.map +1 -1
  234. package/dist/components/PlBtnExportArchive/index.js +1 -1
  235. package/dist/components/PlDatasetSelector/PlDatasetSelector.js +1 -2
  236. package/dist/components/PlDatasetSelector/PlDatasetSelector.js.map +1 -1
  237. package/dist/components/PlDatasetSelector/PlDatasetSelector.vue2.js +3 -8
  238. package/dist/components/PlDatasetSelector/PlDatasetSelector.vue2.js.map +1 -1
  239. package/dist/components/PlDatasetSelector/index.js +1 -1
  240. package/dist/components/PlTableFastSearch/PlTableFastSearch.js +1 -2
  241. package/dist/components/PlTableFastSearch/PlTableFastSearch.js.map +1 -1
  242. package/dist/components/PlTableFastSearch/PlTableFastSearch.vue2.js +2 -3
  243. package/dist/components/PlTableFastSearch/PlTableFastSearch.vue2.js.map +1 -1
  244. package/dist/components/PlTableFastSearch/index.js +1 -1
  245. package/dist/components/PlTableFilters/PlTableFiltersV2.js +1 -2
  246. package/dist/components/PlTableFilters/PlTableFiltersV2.js.map +1 -1
  247. package/dist/components/PlTableFilters/PlTableFiltersV2.style.js +6 -6
  248. package/dist/components/PlTableFilters/PlTableFiltersV2.style.js.map +1 -1
  249. package/dist/components/PlTableFilters/PlTableFiltersV2.vue.d.ts +2 -1
  250. package/dist/components/PlTableFilters/PlTableFiltersV2.vue.d.ts.map +1 -1
  251. package/dist/components/PlTableFilters/PlTableFiltersV2.vue2.js +72 -68
  252. package/dist/components/PlTableFilters/PlTableFiltersV2.vue2.js.map +1 -1
  253. package/dist/components/PlTableFilters/index.js +1 -1
  254. package/dist/components/PlTableFilters/suggest-source.js +1 -2
  255. package/dist/components/PlTableFilters/suggest-source.js.map +1 -1
  256. package/dist/composition/AgGrid/index.js +1 -2
  257. package/dist/composition/AgGrid/index.js.map +1 -1
  258. package/dist/composition/fileContent.js +9 -5
  259. package/dist/composition/fileContent.js.map +1 -1
  260. package/dist/composition/usePlugin.js +1 -2
  261. package/dist/composition/usePlugin.js.map +1 -1
  262. package/dist/computedResult.js +1 -2
  263. package/dist/computedResult.js.map +1 -1
  264. package/dist/createModel.js +8 -7
  265. package/dist/createModel.js.map +1 -1
  266. package/dist/defineApp.js +5 -3
  267. package/dist/defineApp.js.map +1 -1
  268. package/dist/defineStore.js +1 -2
  269. package/dist/defineStore.js.map +1 -1
  270. package/dist/index.js +1 -2
  271. package/dist/index.js.map +1 -1
  272. package/dist/internal/UpdateSerializer.js +2 -2
  273. package/dist/internal/UpdateSerializer.js.map +1 -1
  274. package/dist/internal/createAppV3.js +2 -3
  275. package/dist/internal/createAppV3.js.map +1 -1
  276. package/dist/internal/getServices.js +4 -5
  277. package/dist/internal/getServices.js.map +1 -1
  278. package/dist/internal/service_factories.js +1 -2
  279. package/dist/internal/service_factories.js.map +1 -1
  280. package/dist/internal/utils.js +1 -2
  281. package/dist/internal/utils.js.map +1 -1
  282. package/dist/lib/util/helpers/dist/functions.js +1 -2
  283. package/dist/lib/util/helpers/dist/functions.js.map +1 -1
  284. package/dist/lib/util/helpers/dist/hash.js +0 -1
  285. package/dist/lib/util/helpers/dist/hash.js.map +1 -1
  286. package/dist/lib/util/helpers/dist/index.js +7 -6
  287. package/dist/lib/util/helpers/dist/objects.js +7 -6
  288. package/dist/lib/util/helpers/dist/objects.js.map +1 -1
  289. package/dist/lib/util/helpers/dist/prettyBytes.js +1 -2
  290. package/dist/lib/util/helpers/dist/prettyBytes.js.map +1 -1
  291. package/dist/lib/util/helpers/dist/random.js +1 -2
  292. package/dist/lib/util/helpers/dist/random.js.map +1 -1
  293. package/dist/lib/util/helpers/dist/strings.js +1 -2
  294. package/dist/lib/util/helpers/dist/strings.js.map +1 -1
  295. package/dist/lib/util/helpers/dist/uniqId.js +1 -2
  296. package/dist/lib/util/helpers/dist/uniqId.js.map +1 -1
  297. package/dist/lib/util/helpers/dist/utils.js +1 -2
  298. package/dist/lib/util/helpers/dist/utils.js.map +1 -1
  299. package/dist/lib.js +38 -38
  300. package/dist/objectHash.js +1 -2
  301. package/dist/objectHash.js.map +1 -1
  302. package/dist/plugins/Monetization/EndOfPeriod.js +1 -2
  303. package/dist/plugins/Monetization/EndOfPeriod.js.map +1 -1
  304. package/dist/plugins/Monetization/EndOfPeriod.style.js +3 -3
  305. package/dist/plugins/Monetization/EndOfPeriod.style.js.map +1 -1
  306. package/dist/plugins/Monetization/EndOfPeriod.vue2.js +2 -3
  307. package/dist/plugins/Monetization/EndOfPeriod.vue2.js.map +1 -1
  308. package/dist/plugins/Monetization/LimitCard.js +1 -2
  309. package/dist/plugins/Monetization/LimitCard.js.map +1 -1
  310. package/dist/plugins/Monetization/LimitCard.style.js +16 -16
  311. package/dist/plugins/Monetization/LimitCard.style.js.map +1 -1
  312. package/dist/plugins/Monetization/LimitCard.vue2.js +3 -4
  313. package/dist/plugins/Monetization/LimitCard.vue2.js.map +1 -1
  314. package/dist/plugins/Monetization/MonetizationSidebar.js +1 -2
  315. package/dist/plugins/Monetization/MonetizationSidebar.js.map +1 -1
  316. package/dist/plugins/Monetization/MonetizationSidebar.vue2.js +2 -3
  317. package/dist/plugins/Monetization/MonetizationSidebar.vue2.js.map +1 -1
  318. package/dist/plugins/Monetization/RunStatus.js +1 -2
  319. package/dist/plugins/Monetization/RunStatus.js.map +1 -1
  320. package/dist/plugins/Monetization/RunStatus.style.js +9 -9
  321. package/dist/plugins/Monetization/RunStatus.style.js.map +1 -1
  322. package/dist/plugins/Monetization/RunStatus.vue2.js +2 -3
  323. package/dist/plugins/Monetization/RunStatus.vue2.js.map +1 -1
  324. package/dist/plugins/Monetization/UserCabinetCard.js +1 -2
  325. package/dist/plugins/Monetization/UserCabinetCard.js.map +1 -1
  326. package/dist/plugins/Monetization/UserCabinetCard.style.js +10 -10
  327. package/dist/plugins/Monetization/UserCabinetCard.style.js.map +1 -1
  328. package/dist/plugins/Monetization/UserCabinetCard.vue2.js +2 -3
  329. package/dist/plugins/Monetization/UserCabinetCard.vue2.js.map +1 -1
  330. package/dist/plugins/Monetization/index.js +1 -1
  331. package/dist/plugins/Monetization/useButtonTarget.js +2 -7
  332. package/dist/plugins/Monetization/useButtonTarget.js.map +1 -1
  333. package/dist/plugins/Monetization/useInfo.js +1 -2
  334. package/dist/plugins/Monetization/useInfo.js.map +1 -1
  335. package/dist/plugins/Monetization/validation.js +2 -3
  336. package/dist/plugins/Monetization/validation.js.map +1 -1
  337. package/dist/urls.js +1 -2
  338. package/dist/urls.js.map +1 -1
  339. package/dist/utils.js +2 -2
  340. package/dist/utils.js.map +1 -1
  341. package/package.json +25 -21
  342. package/src/components/PlAdvancedFilter/FilterEditor.test.ts +1 -1
  343. package/src/components/PlAdvancedFilter/FilterEditor.vue +15 -8
  344. package/src/components/PlAdvancedFilter/types.ts +2 -0
  345. package/src/components/PlAgColumnHeader/PlAgColumnHeader.vue +7 -5
  346. package/src/components/PlAgColumnHeader/types.ts +2 -0
  347. package/src/components/PlAgDataTable/PlAgDataTableSheets.vue +1 -1
  348. package/src/components/PlAgDataTable/PlAgDataTableV2.vue +1 -0
  349. package/src/components/PlAgDataTable/sources/table-source-v2.ts +17 -2
  350. package/src/components/PlAgDataTable/sources/table-state-v2.test.ts +1 -1
  351. package/src/components/PlAgGridColumnManager/PlAgGridColumnManager.vue +21 -13
  352. package/src/components/PlTableFilters/PlTableFiltersV2.vue +8 -1
  353. package/dist/_virtual/_rolldown/runtime.js +0 -17
  354. /package/dist/components/{BlockLayout.vue.css → BlockLayout.style.css} +0 -0
  355. /package/dist/components/PlAdvancedFilter/{FilterEditor.vue.css → FilterEditor.style.css} +0 -0
  356. /package/dist/components/PlAdvancedFilter/{OperandButton.vue.css → OperandButton.style.css} +0 -0
  357. /package/dist/components/PlAdvancedFilter/{PlAdvancedFilter.vue.css → PlAdvancedFilter.style.css} +0 -0
  358. /package/dist/components/PlAgDataTable/{PlAgDataTableSheets.vue.css → PlAgDataTableSheets.style.css} +0 -0
  359. /package/dist/components/PlAgDataTable/{PlAgDataTableV2.vue.css → PlAgDataTableV2.style.css} +0 -0
  360. /package/dist/components/PlAgGridColumnManager/{PlAgGridColumnManager.vue.css → PlAgGridColumnManager.style.css} +0 -0
  361. /package/dist/components/PlAnnotations/components/{AnnotationsSidebar.vue.css → AnnotationsSidebar.style.css} +0 -0
  362. /package/dist/components/PlAnnotations/components/{FilterSidebar.vue.css → FilterSidebar.style.css} +0 -0
  363. /package/dist/components/PlAnnotations/components/{PlAnnotations.vue.css → PlAnnotations.style.css} +0 -0
  364. /package/dist/components/PlAnnotations/components/{PlAnnotationsModal.vue.css → PlAnnotationsModal.style.css} +0 -0
  365. /package/dist/components/PlBtnExportArchive/{Item.vue.css → Item.style.css} +0 -0
  366. /package/dist/components/PlBtnExportArchive/{PlBtnExportArchive.vue.css → PlBtnExportArchive.style.css} +0 -0
  367. /package/dist/components/PlBtnExportArchive/{Summary.vue.css → Summary.style.css} +0 -0
  368. /package/dist/components/PlTableFilters/{PlTableFiltersV2.vue.css → PlTableFiltersV2.style.css} +0 -0
  369. /package/dist/plugins/Monetization/{EndOfPeriod.vue.css → EndOfPeriod.style.css} +0 -0
  370. /package/dist/plugins/Monetization/{LimitCard.vue.css → LimitCard.style.css} +0 -0
  371. /package/dist/plugins/Monetization/{RunStatus.vue.css → RunStatus.style.css} +0 -0
  372. /package/dist/plugins/Monetization/{UserCabinetCard.vue.css → UserCabinetCard.style.css} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"PlAnnotationsModal.js","names":[],"sources":["../../../../src/components/PlAnnotations/components/PlAnnotationsModal.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { PlPureSlideModal } from \"@milaboratories/uikit\";\n\nimport type { Props } from \"./PlAnnotations.vue\";\nimport PlAnnotations from \"./PlAnnotations.vue\";\n\nconst props = defineProps<\n Props & {\n opened: boolean;\n onUpdateOpened: (opened: boolean) => void;\n }\n>();\n\nasync function handleDeleteSchema() {\n props.onUpdateOpened(false);\n props.onDeleteSchema?.();\n}\n</script>\n\n<template>\n <PlPureSlideModal\n data-testid=\"pl-annotations-modal\"\n :model-value=\"props.opened\"\n :class=\"$style.modal\"\n width=\"768px\"\n @update:model-value=\"props.onUpdateOpened\"\n >\n <PlAnnotations\n :class=\"$style.content\"\n :columns=\"props.columns\"\n :annotation=\"props.annotation\"\n :on-update-annotation=\"props.onUpdateAnnotation\"\n :on-delete-schema=\"handleDeleteSchema\"\n :has-selected-columns=\"props.hasSelectedColumns\"\n :get-suggest-options=\"props.getSuggestOptions\"\n :get-values-for-selected-columns=\"props.getValuesForSelectedColumns\"\n />\n </PlPureSlideModal>\n</template>\n\n<style module>\n.modal {\n display: flex;\n}\n\n.content {\n width: 100%;\n height: 100%;\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"PlAnnotationsModal.js","names":["style0","_sfc_main","_plugin_vue_export_helper_default","PlAnnotationsModal_vue_vue_type_script_setup_true_lang_default","PlAnnotationsModal_vue_vue_type_style_index_0_lang_module_default","PlAnnotationsModal_default","\"$style\""],"sources":["../../../../src/components/PlAnnotations/components/PlAnnotationsModal.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { PlPureSlideModal } from \"@milaboratories/uikit\";\n\nimport type { Props } from \"./PlAnnotations.vue\";\nimport PlAnnotations from \"./PlAnnotations.vue\";\n\nconst props = defineProps<\n Props & {\n opened: boolean;\n onUpdateOpened: (opened: boolean) => void;\n }\n>();\n\nasync function handleDeleteSchema() {\n props.onUpdateOpened(false);\n props.onDeleteSchema?.();\n}\n</script>\n\n<template>\n <PlPureSlideModal\n data-testid=\"pl-annotations-modal\"\n :model-value=\"props.opened\"\n :class=\"$style.modal\"\n width=\"768px\"\n @update:model-value=\"props.onUpdateOpened\"\n >\n <PlAnnotations\n :class=\"$style.content\"\n :columns=\"props.columns\"\n :annotation=\"props.annotation\"\n :on-update-annotation=\"props.onUpdateAnnotation\"\n :on-delete-schema=\"handleDeleteSchema\"\n :has-selected-columns=\"props.hasSelectedColumns\"\n :get-suggest-options=\"props.getSuggestOptions\"\n :get-values-for-selected-columns=\"props.getValuesForSelectedColumns\"\n />\n </PlPureSlideModal>\n</template>\n\n<style module>\n.modal {\n display: flex;\n}\n\n.content {\n width: 100%;\n height: 100%;\n}\n</style>\n"],"mappings":""}
@@ -1,8 +1,8 @@
1
- import './PlAnnotationsModal.vue.css';var e = {
2
- modal: "_modal_bftih_2",
3
- content: "_content_bftih_6"
1
+ import './PlAnnotationsModal.style.css';// src/components/PlAnnotations/components/PlAnnotationsModal.vue?vue&type=style&index=0&lang.module.css
2
+ var e = "_modal_bftih_2", t = "_content_bftih_6", n = {
3
+ modal: e,
4
+ content: t
4
5
  };
5
- //#endregion
6
- export { e as default };
6
+ export { t as content, n as default, e as modal };
7
7
 
8
8
  //# sourceMappingURL=PlAnnotationsModal.style.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PlAnnotationsModal.vue_vue_type_style_index_0_lang.module.js","names":[],"sources":["../../../../src/components/PlAnnotations/components/PlAnnotationsModal.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { PlPureSlideModal } from \"@milaboratories/uikit\";\n\nimport type { Props } from \"./PlAnnotations.vue\";\nimport PlAnnotations from \"./PlAnnotations.vue\";\n\nconst props = defineProps<\n Props & {\n opened: boolean;\n onUpdateOpened: (opened: boolean) => void;\n }\n>();\n\nasync function handleDeleteSchema() {\n props.onUpdateOpened(false);\n props.onDeleteSchema?.();\n}\n</script>\n\n<template>\n <PlPureSlideModal\n data-testid=\"pl-annotations-modal\"\n :model-value=\"props.opened\"\n :class=\"$style.modal\"\n width=\"768px\"\n @update:model-value=\"props.onUpdateOpened\"\n >\n <PlAnnotations\n :class=\"$style.content\"\n :columns=\"props.columns\"\n :annotation=\"props.annotation\"\n :on-update-annotation=\"props.onUpdateAnnotation\"\n :on-delete-schema=\"handleDeleteSchema\"\n :has-selected-columns=\"props.hasSelectedColumns\"\n :get-suggest-options=\"props.getSuggestOptions\"\n :get-values-for-selected-columns=\"props.getValuesForSelectedColumns\"\n />\n </PlPureSlideModal>\n</template>\n\n<style module>\n.modal {\n display: flex;\n}\n\n.content {\n width: 100%;\n height: 100%;\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"PlAnnotationsModal.vue_vue_type_style_index_0_lang.module.js","names":["modal","content","PlAnnotationsModal_vue_vue_type_style_index_0_lang_module_default"],"sources":["../../../../src/components/PlAnnotations/components/PlAnnotationsModal.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { PlPureSlideModal } from \"@milaboratories/uikit\";\n\nimport type { Props } from \"./PlAnnotations.vue\";\nimport PlAnnotations from \"./PlAnnotations.vue\";\n\nconst props = defineProps<\n Props & {\n opened: boolean;\n onUpdateOpened: (opened: boolean) => void;\n }\n>();\n\nasync function handleDeleteSchema() {\n props.onUpdateOpened(false);\n props.onDeleteSchema?.();\n}\n</script>\n\n<template>\n <PlPureSlideModal\n data-testid=\"pl-annotations-modal\"\n :model-value=\"props.opened\"\n :class=\"$style.modal\"\n width=\"768px\"\n @update:model-value=\"props.onUpdateOpened\"\n >\n <PlAnnotations\n :class=\"$style.content\"\n :columns=\"props.columns\"\n :annotation=\"props.annotation\"\n :on-update-annotation=\"props.onUpdateAnnotation\"\n :on-delete-schema=\"handleDeleteSchema\"\n :has-selected-columns=\"props.hasSelectedColumns\"\n :get-suggest-options=\"props.getSuggestOptions\"\n :get-values-for-selected-columns=\"props.getValuesForSelectedColumns\"\n />\n </PlPureSlideModal>\n</template>\n\n<style module>\n.modal {\n display: flex;\n}\n\n.content {\n width: 100%;\n height: 100%;\n}\n</style>\n"],"mappings":""}
@@ -1,8 +1,8 @@
1
1
  import e from "./PlAnnotations.js";
2
2
  import { createBlock as t, createVNode as n, defineComponent as r, normalizeClass as i, openBlock as a, unref as o, withCtx as s } from "vue";
3
3
  import { PlPureSlideModal as c } from "@milaboratories/uikit";
4
- //#region src/components/PlAnnotations/components/PlAnnotationsModal.vue?vue&type=script&setup=true&lang.ts
5
- var l = /* @__PURE__ */ r({
4
+ // src/components/PlAnnotations/components/PlAnnotationsModal.vue?vue&type=script&setup=true&lang.ts
5
+ var l = /*@__PURE__*/ r({
6
6
  __name: "PlAnnotationsModal",
7
7
  props: {
8
8
  columns: {},
@@ -53,7 +53,6 @@ var l = /* @__PURE__ */ r({
53
53
  ]));
54
54
  }
55
55
  });
56
- //#endregion
57
56
  export { l as default };
58
57
 
59
58
  //# sourceMappingURL=PlAnnotationsModal.vue2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PlAnnotationsModal.vue_vue_type_script_setup_true_lang.js","names":["$style"],"sources":["../../../../src/components/PlAnnotations/components/PlAnnotationsModal.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { PlPureSlideModal } from \"@milaboratories/uikit\";\n\nimport type { Props } from \"./PlAnnotations.vue\";\nimport PlAnnotations from \"./PlAnnotations.vue\";\n\nconst props = defineProps<\n Props & {\n opened: boolean;\n onUpdateOpened: (opened: boolean) => void;\n }\n>();\n\nasync function handleDeleteSchema() {\n props.onUpdateOpened(false);\n props.onDeleteSchema?.();\n}\n</script>\n\n<template>\n <PlPureSlideModal\n data-testid=\"pl-annotations-modal\"\n :model-value=\"props.opened\"\n :class=\"$style.modal\"\n width=\"768px\"\n @update:model-value=\"props.onUpdateOpened\"\n >\n <PlAnnotations\n :class=\"$style.content\"\n :columns=\"props.columns\"\n :annotation=\"props.annotation\"\n :on-update-annotation=\"props.onUpdateAnnotation\"\n :on-delete-schema=\"handleDeleteSchema\"\n :has-selected-columns=\"props.hasSelectedColumns\"\n :get-suggest-options=\"props.getSuggestOptions\"\n :get-values-for-selected-columns=\"props.getValuesForSelectedColumns\"\n />\n </PlPureSlideModal>\n</template>\n\n<style module>\n.modal {\n display: flex;\n}\n\n.content {\n width: 100%;\n height: 100%;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;EAMA,IAAM,IAAQ;EAOd,eAAe,IAAqB;AAElC,GADA,EAAM,eAAe,GAAM,EAC3B,EAAM,kBAAkB;;yBAKxB,EAiBmB,EAAA,EAAA,EAAA;GAhBjB,eAAY;GACX,eAAa,EAAM;GACnB,OAAK,EAAEA,EAAAA,OAAO,MAAK;GACpB,OAAM;GACL,uBAAoB,EAAM;;oBAWzB,CATF,EASE,GAAA;IARC,OAAK,EAAEA,EAAAA,OAAO,QAAO;IACrB,SAAS,EAAM;IACf,YAAY,EAAM;IAClB,wBAAsB,EAAM;IAC5B,oBAAkB;IAClB,wBAAsB,EAAM;IAC5B,uBAAqB,EAAM;IAC3B,mCAAiC,EAAM"}
1
+ {"version":3,"file":"PlAnnotationsModal.vue_vue_type_script_setup_true_lang.js","names":["$style","_openBlock","_createBlock","_unref","_normalizeClass","_withCtx","_createVNode","PlAnnotations","PlAnnotations_default","PlAnnotationsModal_vue_vue_type_script_setup_true_lang_default","props","__props","handleDeleteSchema","openBlock","createBlock","unref","PlPureSlideModal","normalizeClass","_ctx","withCtx","createVNode"],"sources":["../../../../src/components/PlAnnotations/components/PlAnnotationsModal.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { PlPureSlideModal } from \"@milaboratories/uikit\";\n\nimport type { Props } from \"./PlAnnotations.vue\";\nimport PlAnnotations from \"./PlAnnotations.vue\";\n\nconst props = defineProps<\n Props & {\n opened: boolean;\n onUpdateOpened: (opened: boolean) => void;\n }\n>();\n\nasync function handleDeleteSchema() {\n props.onUpdateOpened(false);\n props.onDeleteSchema?.();\n}\n</script>\n\n<template>\n <PlPureSlideModal\n data-testid=\"pl-annotations-modal\"\n :model-value=\"props.opened\"\n :class=\"$style.modal\"\n width=\"768px\"\n @update:model-value=\"props.onUpdateOpened\"\n >\n <PlAnnotations\n :class=\"$style.content\"\n :columns=\"props.columns\"\n :annotation=\"props.annotation\"\n :on-update-annotation=\"props.onUpdateAnnotation\"\n :on-delete-schema=\"handleDeleteSchema\"\n :has-selected-columns=\"props.hasSelectedColumns\"\n :get-suggest-options=\"props.getSuggestOptions\"\n :get-values-for-selected-columns=\"props.getValuesForSelectedColumns\"\n />\n </PlPureSlideModal>\n</template>\n\n<style module>\n.modal {\n display: flex;\n}\n\n.content {\n width: 100%;\n height: 100%;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;EAMA,IAAMU,IAAQC;EAOd,eAAeC,IAAqB;GAElC,AADAF,EAAM,eAAe,EAAK,GAC1BA,EAAM,iBAAiB;EACzB;E,kBAIET,EAAA,GAAAC,EAiBmBC,EAAAa,CAAA,GAAA;GAhBjB,eAAY;GACX,eAAaN,EAAM;GACnB,OAAKN,EAAEJ,EAAAA,OAAO,KAAK;GACpB,OAAM;GACL,uBAAoBU,EAAM;;GAE3B,SAAAL,QASE,CATFC,EASEC,GAAA;IARC,OAAKH,EAAEJ,EAAAA,OAAO,OAAO;IACrB,SAASU,EAAM;IACf,YAAYA,EAAM;IAClB,wBAAsBA,EAAM;IAC5B,oBAAkBE;IAClB,wBAAsBF,EAAM;IAC5B,uBAAqBA,EAAM;IAC3B,mCAAiCA,EAAM"}
@@ -1,9 +1,9 @@
1
- import './style.css';var e = {
2
- flashing: "_flashing_1daus_1",
3
- flash: "_flash_1daus_1",
4
- disabled: "_disabled_1daus_13"
1
+ import './style.css';// src/components/PlAnnotations/components/style.module.css
2
+ var e = "_flashing_1daus_1", t = "_flash_1daus_1", n = "_disabled_1daus_13", r = {
3
+ flashing: e,
4
+ flash: t,
5
+ disabled: n
5
6
  };
6
- //#endregion
7
- export { e as default };
7
+ export { r as default, n as disabled, t as flash, e as flashing };
8
8
 
9
9
  //# sourceMappingURL=style.module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"style.module.js","names":[],"sources":["../../../../src/components/PlAnnotations/components/style.module.css"],"sourcesContent":[".flashing {\n animation: flash 1s ease-in-out infinite alternate;\n}\n@keyframes flash {\n 0% {\n box-shadow: 0 0 6px 4px var(--border-color-focus);\n }\n 100% {\n box-shadow: 0 0 2px 2px var(--border-color-focus);\n }\n}\n\n.disabled {\n pointer-events: none;\n opacity: 0.5;\n}\n"],"mappings":""}
1
+ {"version":3,"file":"style.module.js","names":["flashing","flash","disabled","style_module_default"],"sources":["../../../../src/components/PlAnnotations/components/style.module.css"],"sourcesContent":[".flashing {\n animation: flash 1s ease-in-out infinite alternate;\n}\n@keyframes flash {\n 0% {\n box-shadow: 0 0 6px 4px var(--border-color-focus);\n }\n 100% {\n box-shadow: 0 0 2px 2px var(--border-color-focus);\n }\n}\n\n.disabled {\n pointer-events: none;\n opacity: 0.5;\n}\n"],"mappings":""}
@@ -1,2 +1,3 @@
1
- import "./components/PlAnnotations.js";
2
- import "./components/PlAnnotationsModal.js";
1
+ import e from "./components/PlAnnotations.js";
2
+ import t from "./components/PlAnnotationsModal.js";
3
+ export { e as PlAnnotations, t as PlAnnotationsModal };
@@ -1,9 +1,8 @@
1
- //#region src/components/PlAnnotations/utils.ts
1
+ // src/components/PlAnnotations/utils.ts
2
2
  var e = /^[a-zA-Z0-9\s!@#$%^*()_+\-=[\]{}|;:'",.?]*$/;
3
3
  function t(t) {
4
4
  if (!e.test(t)) throw Error("Title contains forbidden symbols");
5
5
  }
6
- //#endregion
7
6
  export { t as validateTitle };
8
7
 
9
8
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":[],"sources":["../../../src/components/PlAnnotations/utils.ts"],"sourcesContent":["import type { FilterSpecTypeFieldRecord } from \"@milaboratories/uikit\";\nimport type { FilterSpecLeaf } from \"@platforma-sdk/model\";\n\nexport function createDefaultFilterMetadata<\n T extends FilterSpecLeaf,\n>(): FilterSpecTypeFieldRecord<T> {\n return {\n column: {\n label: \"Column\",\n fieldType: \"SUniversalPColumnId\",\n defaultValue: () => undefined,\n },\n type: {\n label: \"Predicate\",\n fieldType: \"FilterType\",\n defaultValue: () => undefined,\n },\n } as FilterSpecTypeFieldRecord<T>;\n}\n\nconst allowedSymbolsPattern = /^[a-zA-Z0-9\\s!@#$%^*()_+\\-=[\\]{}|;:'\",.?]*$/;\nexport function validateTitle(v: string) {\n if (!allowedSymbolsPattern.test(v)) {\n throw Error(`Title contains forbidden symbols`);\n }\n}\n"],"mappings":";AAoBA,IAAM,IAAwB;AAC9B,SAAgB,EAAc,GAAW;AACvC,KAAI,CAAC,EAAsB,KAAK,EAAE,CAChC,OAAM,MAAM,mCAAmC"}
1
+ {"version":3,"file":"utils.js","names":["allowedSymbolsPattern","validateTitle","v"],"sources":["../../../src/components/PlAnnotations/utils.ts"],"sourcesContent":["import type { FilterSpecTypeFieldRecord } from \"@milaboratories/uikit\";\nimport type { FilterSpecLeaf } from \"@platforma-sdk/model\";\n\nexport function createDefaultFilterMetadata<\n T extends FilterSpecLeaf,\n>(): FilterSpecTypeFieldRecord<T> {\n return {\n column: {\n label: \"Column\",\n fieldType: \"SUniversalPColumnId\",\n defaultValue: () => undefined,\n },\n type: {\n label: \"Predicate\",\n fieldType: \"FilterType\",\n defaultValue: () => undefined,\n },\n } as FilterSpecTypeFieldRecord<T>;\n}\n\nconst allowedSymbolsPattern = /^[a-zA-Z0-9\\s!@#$%^*()_+\\-=[\\]{}|;:'\",.?]*$/;\nexport function validateTitle(v: string) {\n if (!allowedSymbolsPattern.test(v)) {\n throw Error(`Title contains forbidden symbols`);\n }\n}\n"],"mappings":";AAoBA,IAAMA,IAAwB;AAC9B,SAAgBC,EAAc,GAAW;CACvC,IAAI,CAACD,EAAsB,KAAKE,CAAC,GAC/B,MAAM,MAAM,kCAAkC;AAElD"}
@@ -1,7 +1,6 @@
1
1
  import e from "./PlAppErrorNotificationAlert.vue2.js";
2
- //#region src/components/PlAppErrorNotificationAlert/PlAppErrorNotificationAlert.vue
2
+ // src/components/PlAppErrorNotificationAlert/PlAppErrorNotificationAlert.vue
3
3
  var t = e;
4
- //#endregion
5
4
  export { t as default };
6
5
 
7
6
  //# sourceMappingURL=PlAppErrorNotificationAlert.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PlAppErrorNotificationAlert.js","names":[],"sources":["../../../src/components/PlAppErrorNotificationAlert/PlAppErrorNotificationAlert.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { BlockOutputsBase } from \"@platforma-sdk/model\";\nimport type { OutputErrors } from \"../../types\";\n// @TODO module\nimport \"./pl-app-error-notification-alert.scss\";\nimport {\n PlBtnPrimary,\n PlDialogModal,\n PlNotificationAlert,\n PlSpacer,\n PlLogView,\n} from \"@milaboratories/uikit\";\nimport { computed, ref, watch } from \"vue\";\n\nexport type FullMessage = { fullMessage: string };\n\nconst props = defineProps<{ errors: OutputErrors<BlockOutputsBase> }>();\n\nconst isModalOpen = ref(false);\n\nconst isAlertOpen = ref(true);\n\nconst existingErrors = computed(() => Object.entries(props.errors).filter((item) => !!item[1]));\n\nfunction showErrors() {\n isModalOpen.value = true;\n}\n\n// @TODO (temp)\nwatch(\n () => props.errors,\n (errors) => {\n isAlertOpen.value = Object.values(errors).some((v) => !!v);\n },\n { immediate: true, deep: true },\n);\n</script>\n<template>\n <div data-testid=\"pl-app-error-notification-alert\" class=\"pl-app-notification-alert\">\n <PlDialogModal\n v-model=\"isModalOpen\"\n data-testid=\"pl-app-error-notification-alert-modal\"\n width=\"720px\"\n style=\"max-height: 100vh\"\n >\n <template #title> Errors </template>\n <div\n data-testid=\"pl-app-error-notification-alert-content\"\n class=\"pl-app-notification-alert__content\"\n >\n <template v-for=\"item in existingErrors\" :key=\"item[0]\">\n <div\n data-testid=\"pl-app-error-notification-alert-item\"\n class=\"pl-app-notification-alert__item\"\n >\n <div\n data-testid=\"pl-app-error-notification-alert-item-title\"\n class=\"pl-app-notification-alert__title\"\n >\n Block output: {{ item[0] }}\n </div>\n <PlLogView\n data-testid=\"pl-app-error-notification-alert-log\"\n :value=\"item[1]?.message\"\n :valueToCopy=\"\n 'fullMessage' in (item[1] ?? {})\n ? (item[1] as unknown as FullMessage).fullMessage\n : item[1]?.message\n \"\n :download-filename=\"`output-${item[0]}-error.txt`\"\n />\n </div>\n </template>\n </div>\n </PlDialogModal>\n\n <PlNotificationAlert\n v-model=\"isAlertOpen\"\n data-testid=\"pl-app-error-notification-alert-message\"\n type=\"error\"\n closable\n >\n Some outputs have errors.\n <template #actions>\n <PlBtnPrimary\n data-testid=\"pl-app-error-notification-alert-show-errors\"\n icon=\"arrow-right\"\n @click=\"showErrors\"\n >See errors</PlBtnPrimary\n >\n <PlSpacer />\n </template>\n </PlNotificationAlert>\n </div>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"PlAppErrorNotificationAlert.js","names":["_sfc_main","PlAppErrorNotificationAlert_vue_vue_type_script_setup_true_lang_default","PlAppErrorNotificationAlert_default"],"sources":["../../../src/components/PlAppErrorNotificationAlert/PlAppErrorNotificationAlert.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { BlockOutputsBase } from \"@platforma-sdk/model\";\nimport type { OutputErrors } from \"../../types\";\n// @TODO module\nimport \"./pl-app-error-notification-alert.scss\";\nimport {\n PlBtnPrimary,\n PlDialogModal,\n PlNotificationAlert,\n PlSpacer,\n PlLogView,\n} from \"@milaboratories/uikit\";\nimport { computed, ref, watch } from \"vue\";\n\nexport type FullMessage = { fullMessage: string };\n\nconst props = defineProps<{ errors: OutputErrors<BlockOutputsBase> }>();\n\nconst isModalOpen = ref(false);\n\nconst isAlertOpen = ref(true);\n\nconst existingErrors = computed(() => Object.entries(props.errors).filter((item) => !!item[1]));\n\nfunction showErrors() {\n isModalOpen.value = true;\n}\n\n// @TODO (temp)\nwatch(\n () => props.errors,\n (errors) => {\n isAlertOpen.value = Object.values(errors).some((v) => !!v);\n },\n { immediate: true, deep: true },\n);\n</script>\n<template>\n <div data-testid=\"pl-app-error-notification-alert\" class=\"pl-app-notification-alert\">\n <PlDialogModal\n v-model=\"isModalOpen\"\n data-testid=\"pl-app-error-notification-alert-modal\"\n width=\"720px\"\n style=\"max-height: 100vh\"\n >\n <template #title> Errors </template>\n <div\n data-testid=\"pl-app-error-notification-alert-content\"\n class=\"pl-app-notification-alert__content\"\n >\n <template v-for=\"item in existingErrors\" :key=\"item[0]\">\n <div\n data-testid=\"pl-app-error-notification-alert-item\"\n class=\"pl-app-notification-alert__item\"\n >\n <div\n data-testid=\"pl-app-error-notification-alert-item-title\"\n class=\"pl-app-notification-alert__title\"\n >\n Block output: {{ item[0] }}\n </div>\n <PlLogView\n data-testid=\"pl-app-error-notification-alert-log\"\n :value=\"item[1]?.message\"\n :valueToCopy=\"\n 'fullMessage' in (item[1] ?? {})\n ? (item[1] as unknown as FullMessage).fullMessage\n : item[1]?.message\n \"\n :download-filename=\"`output-${item[0]}-error.txt`\"\n />\n </div>\n </template>\n </div>\n </PlDialogModal>\n\n <PlNotificationAlert\n v-model=\"isAlertOpen\"\n data-testid=\"pl-app-error-notification-alert-message\"\n type=\"error\"\n closable\n >\n Some outputs have errors.\n <template #actions>\n <PlBtnPrimary\n data-testid=\"pl-app-error-notification-alert-show-errors\"\n icon=\"arrow-right\"\n @click=\"showErrors\"\n >See errors</PlBtnPrimary\n >\n <PlSpacer />\n </template>\n </PlNotificationAlert>\n </div>\n</template>\n"],"mappings":""}
@@ -1,7 +1,7 @@
1
1
  import './pl-app-error-notification-alert.css';/* empty css */
2
2
  import { Fragment as e, computed as t, createElementBlock as n, createElementVNode as r, createTextVNode as i, createVNode as a, defineComponent as o, openBlock as s, ref as c, renderList as l, toDisplayString as u, unref as d, watch as f, withCtx as p } from "vue";
3
3
  import { PlBtnPrimary as m, PlDialogModal as h, PlLogView as g, PlNotificationAlert as _, PlSpacer as v } from "@milaboratories/uikit";
4
- //#region src/components/PlAppErrorNotificationAlert/PlAppErrorNotificationAlert.vue?vue&type=script&setup=true&lang.ts
4
+ // src/components/PlAppErrorNotificationAlert/PlAppErrorNotificationAlert.vue?vue&type=script&setup=true&lang.ts
5
5
  var y = {
6
6
  "data-testid": "pl-app-error-notification-alert",
7
7
  class: "pl-app-notification-alert"
@@ -11,7 +11,7 @@ var y = {
11
11
  }, x = {
12
12
  "data-testid": "pl-app-error-notification-alert-item-title",
13
13
  class: "pl-app-notification-alert__title"
14
- }, S = /* @__PURE__ */ o({
14
+ }, S = /*@__PURE__*/ o({
15
15
  __name: "PlAppErrorNotificationAlert",
16
16
  props: { errors: {} },
17
17
  setup(o) {
@@ -67,7 +67,6 @@ var y = {
67
67
  }, 8, ["modelValue"])]));
68
68
  }
69
69
  });
70
- //#endregion
71
70
  export { S as default };
72
71
 
73
72
  //# sourceMappingURL=PlAppErrorNotificationAlert.vue2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PlAppErrorNotificationAlert.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/PlAppErrorNotificationAlert/PlAppErrorNotificationAlert.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { BlockOutputsBase } from \"@platforma-sdk/model\";\nimport type { OutputErrors } from \"../../types\";\n// @TODO module\nimport \"./pl-app-error-notification-alert.scss\";\nimport {\n PlBtnPrimary,\n PlDialogModal,\n PlNotificationAlert,\n PlSpacer,\n PlLogView,\n} from \"@milaboratories/uikit\";\nimport { computed, ref, watch } from \"vue\";\n\nexport type FullMessage = { fullMessage: string };\n\nconst props = defineProps<{ errors: OutputErrors<BlockOutputsBase> }>();\n\nconst isModalOpen = ref(false);\n\nconst isAlertOpen = ref(true);\n\nconst existingErrors = computed(() => Object.entries(props.errors).filter((item) => !!item[1]));\n\nfunction showErrors() {\n isModalOpen.value = true;\n}\n\n// @TODO (temp)\nwatch(\n () => props.errors,\n (errors) => {\n isAlertOpen.value = Object.values(errors).some((v) => !!v);\n },\n { immediate: true, deep: true },\n);\n</script>\n<template>\n <div data-testid=\"pl-app-error-notification-alert\" class=\"pl-app-notification-alert\">\n <PlDialogModal\n v-model=\"isModalOpen\"\n data-testid=\"pl-app-error-notification-alert-modal\"\n width=\"720px\"\n style=\"max-height: 100vh\"\n >\n <template #title> Errors </template>\n <div\n data-testid=\"pl-app-error-notification-alert-content\"\n class=\"pl-app-notification-alert__content\"\n >\n <template v-for=\"item in existingErrors\" :key=\"item[0]\">\n <div\n data-testid=\"pl-app-error-notification-alert-item\"\n class=\"pl-app-notification-alert__item\"\n >\n <div\n data-testid=\"pl-app-error-notification-alert-item-title\"\n class=\"pl-app-notification-alert__title\"\n >\n Block output: {{ item[0] }}\n </div>\n <PlLogView\n data-testid=\"pl-app-error-notification-alert-log\"\n :value=\"item[1]?.message\"\n :valueToCopy=\"\n 'fullMessage' in (item[1] ?? {})\n ? (item[1] as unknown as FullMessage).fullMessage\n : item[1]?.message\n \"\n :download-filename=\"`output-${item[0]}-error.txt`\"\n />\n </div>\n </template>\n </div>\n </PlDialogModal>\n\n <PlNotificationAlert\n v-model=\"isAlertOpen\"\n data-testid=\"pl-app-error-notification-alert-message\"\n type=\"error\"\n closable\n >\n Some outputs have errors.\n <template #actions>\n <PlBtnPrimary\n data-testid=\"pl-app-error-notification-alert-show-errors\"\n icon=\"arrow-right\"\n @click=\"showErrors\"\n >See errors</PlBtnPrimary\n >\n <PlSpacer />\n </template>\n </PlNotificationAlert>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;EAgBA,IAAM,IAAQ,GAER,IAAc,EAAI,GAA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A,CAAA,CAAA;oBAPd,CAAA,AAAA,EAAA,OAAA,EAFD,+BAEC,GAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"PlAppErrorNotificationAlert.vue_vue_type_script_setup_true_lang.js","names":["_openBlock","_createElementBlock","_createVNode","_unref","_withCtx","_createTextVNode","_createElementVNode","_Fragment","_renderList","_toDisplayString","_hoisted_1","_hoisted_2","_hoisted_3","PlAppErrorNotificationAlert_vue_vue_type_script_setup_true_lang_default","props","__props","isModalOpen","ref","isAlertOpen","existingErrors","computed","item","showErrors","watch","errors","v","openBlock","createElementBlock","createVNode","unref","PlDialogModal","_cache","$event","withCtx","createTextVNode","createElementVNode","Fragment","renderList","toDisplayString","PlLogView","PlNotificationAlert","PlBtnPrimary","PlSpacer"],"sources":["../../../src/components/PlAppErrorNotificationAlert/PlAppErrorNotificationAlert.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { BlockOutputsBase } from \"@platforma-sdk/model\";\nimport type { OutputErrors } from \"../../types\";\n// @TODO module\nimport \"./pl-app-error-notification-alert.scss\";\nimport {\n PlBtnPrimary,\n PlDialogModal,\n PlNotificationAlert,\n PlSpacer,\n PlLogView,\n} from \"@milaboratories/uikit\";\nimport { computed, ref, watch } from \"vue\";\n\nexport type FullMessage = { fullMessage: string };\n\nconst props = defineProps<{ errors: OutputErrors<BlockOutputsBase> }>();\n\nconst isModalOpen = ref(false);\n\nconst isAlertOpen = ref(true);\n\nconst existingErrors = computed(() => Object.entries(props.errors).filter((item) => !!item[1]));\n\nfunction showErrors() {\n isModalOpen.value = true;\n}\n\n// @TODO (temp)\nwatch(\n () => props.errors,\n (errors) => {\n isAlertOpen.value = Object.values(errors).some((v) => !!v);\n },\n { immediate: true, deep: true },\n);\n</script>\n<template>\n <div data-testid=\"pl-app-error-notification-alert\" class=\"pl-app-notification-alert\">\n <PlDialogModal\n v-model=\"isModalOpen\"\n data-testid=\"pl-app-error-notification-alert-modal\"\n width=\"720px\"\n style=\"max-height: 100vh\"\n >\n <template #title> Errors </template>\n <div\n data-testid=\"pl-app-error-notification-alert-content\"\n class=\"pl-app-notification-alert__content\"\n >\n <template v-for=\"item in existingErrors\" :key=\"item[0]\">\n <div\n data-testid=\"pl-app-error-notification-alert-item\"\n class=\"pl-app-notification-alert__item\"\n >\n <div\n data-testid=\"pl-app-error-notification-alert-item-title\"\n class=\"pl-app-notification-alert__title\"\n >\n Block output: {{ item[0] }}\n </div>\n <PlLogView\n data-testid=\"pl-app-error-notification-alert-log\"\n :value=\"item[1]?.message\"\n :valueToCopy=\"\n 'fullMessage' in (item[1] ?? {})\n ? (item[1] as unknown as FullMessage).fullMessage\n : item[1]?.message\n \"\n :download-filename=\"`output-${item[0]}-error.txt`\"\n />\n </div>\n </template>\n </div>\n </PlDialogModal>\n\n <PlNotificationAlert\n v-model=\"isAlertOpen\"\n data-testid=\"pl-app-error-notification-alert-message\"\n type=\"error\"\n closable\n >\n Some outputs have errors.\n <template #actions>\n <PlBtnPrimary\n data-testid=\"pl-app-error-notification-alert-show-errors\"\n icon=\"arrow-right\"\n @click=\"showErrors\"\n >See errors</PlBtnPrimary\n >\n <PlSpacer />\n </template>\n </PlNotificationAlert>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;EAgBA,IAAMc,IAAQC,GAERC,IAAcC,EAAI,EAAK,GAEvBC,IAAcD,EAAI,EAAI,GAEtBE,IAAiBC,QAAe,OAAO,QAAQN,EAAM,MAAM,CAAC,CAAC,QAAQ,MAAS,CAAC,CAACO,EAAK,EAAE,CAAC;EAE9F,SAASC,IAAa;GACpB,EAAY,QAAQ;EACtB;E,OAGAC,QACQT,EAAM,SACX,MAAW;GACV,EAAY,QAAQ,OAAO,OAAOU,CAAM,CAAC,CAAC,MAAM,MAAM,CAAC,CAACC,CAAC;EAC3D,GACA;GAAE,WAAW;GAAM,MAAM;EAAK,CAChC,I,UAGEzB,EAAA,GAAAC,EAuDM,OAvDNS,GAuDM,CAtDJR,EAmCgBC,EAAA2B,CAAA,G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@ -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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,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":";;;;;;;;;;;;;;;;;;;;EAgBA,IAAMoB,IAAQC,GAgBRC,IAAOC,EAPc;GACzB,SAAS;GACT,MAAM;GACN,SAAS,KAAA;GACT,aAAa;EACf,CAEmC,GAE7BC,KAAqB,GAAY,MAAiC;GACtE,IAAMC,IAAKH,EAAK,SAAS,IAAII,CAAE;GAC/B,AAAID,KACFH,EAAK,SAAS,IAAII,GAAI;IAAE,GAAGD;IAAI,GAAGE;GAAQ,CAAC;EAE/C,GAEMC,IAAkBC,QACfT,EAAM,gBAAgB,KAAA,KAAa,CAACA,EAAM,QAClD,GAEKU,IAAQD,QACL,MAAM,KAAKP,EAAK,SAAS,OAAO,KAAK,CAAC,CAAC,CAC/C,GAEKS,IAAUF,SACP;GACL,UAAUP,EAAK;GACf,SAASQ,EAAM,MAAM,QAAQ,GAAK,MAASE,IAAMC,EAAK,SAAS,CAAC;GAChE,MAAMH,EAAM,MAAM,QAAQ,GAAK,MAASE,IAA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eAAY;GACX,UAAQ,CAAGtC,EAAA;GACX,SAASN,EAAK;GACd,OAAKhB,EAAA,GAAKN,EAAAA,OAAM,iBAAkBsB,EAAK,QAAO,CAAA;GAC9C,SAAKf,EAAO2B,GAAa,CAAA,MAAA,CAAA;;GAGf,QAAM1B,QACkC,CAAjDJ,EAAiDC,EAAAkE,CAAA,GAAA;IAAtC,OAAKjE,EAAEN,EAAAA,OAAO,IAAI;IAAE,MAAK;;GAFtC,SAAAQ,QAAQ,CAARC,EAAQ2D,EAAA,QAAA,SAAA,C;;;;;;E,KAKVnE,EAAA,GAAAS,EAsBWC,GAAA,EAtBD,IAAG,OAAM,GAAA,CAETW,EAAK,WAAWA,EAAK,eAD7BrB,EAAA,GAAAC,EAoBM,OAAA;;GAlBA,SAAA;GAAJ,KAAIwD;GACJ,eAAY;GACX,OAAKpD,EAAEN,EAAAA,OAAO,UAAU;;GAEzBI,EAKEC,EAAAsE,CAAA,GAAA;IAJA,eAAY;IACX,OAAKrE,EAAEN,EAAAA,OAAO,KAAK;IACpB,MAAK;IACJ,SAAK,AAAA4E,EAAA,OAAArE,GAAA,MAAO,EAAK,cAAW,IAAA,CAAA,MAAA,CAAA;;GAE/BH,EAA2BQ,GAAA,EAAjB,MAAMmB,EAAA,MAAO,GAAA,MAAA,GAAA,CAAA,MAAA,CAAA;GACvBlB,EAMM,OAAA;IALJ,eAAY;IACX,OAAKP,EAAA,CAAEN,EAAAA,OAAO,gBACT,iBAAiB,CAAA;G,KAEvBC,EAAA,EAAA,GAAAC,EAAiFC,GAAA,MAAAW,EAA5DQ,EAAK,SAAS,OAAM,IAA5B,OAAbrB,EAAA,GAAAS,EAAiFK,GAAA;IAAnC,KAAKkB,EAAK;IAAiB"}
@@ -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