@platforma-sdk/ui-vue 1.63.1 → 1.63.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +160 -162
- package/.turbo/turbo-formatter$colon$check.log +2 -2
- package/.turbo/turbo-linter$colon$check.log +2 -2
- package/.turbo/turbo-types$colon$check.log +1 -1
- package/CHANGELOG.md +18 -0
- package/dist/AgGridVue/AgGridTheme.js +3 -1
- package/dist/AgGridVue/AgGridTheme.js.map +1 -1
- package/dist/AgGridVue/ag-override.js +2 -0
- package/dist/AgGridVue/ag-override.js.map +1 -1
- package/dist/AgGridVue/createAgGridColDef.js +2 -35
- package/dist/AgGridVue/createAgGridColDef.js.map +1 -1
- package/dist/AgGridVue/selection.js +2 -23
- package/dist/AgGridVue/selection.js.map +1 -1
- package/dist/AgGridVue/useAgGridOptions.js +2 -83
- package/dist/AgGridVue/useAgGridOptions.js.map +1 -1
- package/dist/_virtual/_plugin-vue_export-helper.js +2 -0
- package/dist/_virtual/_rolldown/runtime.js +2 -0
- package/dist/components/BlockLayout.js +1 -0
- package/dist/components/BlockLayout.style.js +1 -0
- package/dist/components/BlockLayout.vue2.js +2 -0
- package/dist/components/BlockLayout.vue2.js.map +1 -1
- package/dist/components/BlockLoader.js +2 -0
- package/dist/components/BlockLoader.vue2.js +2 -0
- package/dist/components/BlockLoader.vue2.js.map +1 -1
- package/dist/components/LoaderPage.js +2 -0
- package/dist/components/LoaderPage.js.map +1 -1
- package/dist/components/NotFound.js +2 -0
- package/dist/components/NotFound.vue2.js +2 -0
- package/dist/components/NotFound.vue2.js.map +1 -1
- package/dist/components/PlAdvancedFilter/FilterEditor.js +1 -0
- package/dist/components/PlAdvancedFilter/FilterEditor.style.js +1 -0
- package/dist/components/PlAdvancedFilter/FilterEditor.vue2.js +2 -0
- package/dist/components/PlAdvancedFilter/FilterEditor.vue2.js.map +1 -1
- package/dist/components/PlAdvancedFilter/OperandButton.js +1 -0
- package/dist/components/PlAdvancedFilter/OperandButton.style.js +1 -0
- package/dist/components/PlAdvancedFilter/OperandButton.vue2.js +2 -0
- package/dist/components/PlAdvancedFilter/OperandButton.vue2.js.map +1 -1
- package/dist/components/PlAdvancedFilter/PlAdvancedFilter.js +1 -0
- package/dist/components/PlAdvancedFilter/PlAdvancedFilter.style.js +1 -0
- package/dist/components/PlAdvancedFilter/PlAdvancedFilter.vue2.js +2 -0
- package/dist/components/PlAdvancedFilter/PlAdvancedFilter.vue2.js.map +1 -1
- package/dist/components/PlAdvancedFilter/constants.js +4 -4
- package/dist/components/PlAdvancedFilter/constants.js.map +1 -1
- package/dist/components/PlAdvancedFilter/index.js +3 -1
- package/dist/components/PlAdvancedFilter/index.js.map +1 -1
- package/dist/components/PlAdvancedFilter/utils.js +2 -0
- package/dist/components/PlAdvancedFilter/utils.js.map +1 -1
- package/dist/components/PlAgCellFile/PlAgCellFile.js +2 -0
- package/dist/components/PlAgCellFile/PlAgCellFile.vue2.js +2 -4
- package/dist/components/PlAgCellFile/PlAgCellFile.vue2.js.map +1 -1
- package/dist/components/PlAgCellProgress/PlAgCellProgress.js +2 -0
- package/dist/components/PlAgCellProgress/PlAgCellProgress.vue2.js +2 -0
- package/dist/components/PlAgCellProgress/PlAgCellProgress.vue2.js.map +1 -1
- package/dist/components/PlAgCellStatusTag/PlAgCellStatusTag.js +2 -0
- package/dist/components/PlAgCellStatusTag/PlAgCellStatusTag.vue2.js +2 -0
- package/dist/components/PlAgCellStatusTag/PlAgCellStatusTag.vue2.js.map +1 -1
- package/dist/components/PlAgChartHistogramCell/PlAgChartHistogramCell.js +2 -0
- package/dist/components/PlAgChartHistogramCell/PlAgChartHistogramCell.vue2.js +2 -0
- package/dist/components/PlAgChartHistogramCell/PlAgChartHistogramCell.vue2.js.map +1 -1
- package/dist/components/PlAgChartStackedBarCell/PlAgChartStackedBarCell.js +2 -0
- package/dist/components/PlAgChartStackedBarCell/PlAgChartStackedBarCell.vue2.js +2 -0
- package/dist/components/PlAgChartStackedBarCell/PlAgChartStackedBarCell.vue2.js.map +1 -1
- package/dist/components/PlAgColumnHeader/PlAgColumnHeader.js +2 -0
- package/dist/components/PlAgColumnHeader/PlAgColumnHeader.vue2.js +2 -0
- package/dist/components/PlAgColumnHeader/PlAgColumnHeader.vue2.js.map +1 -1
- package/dist/components/PlAgCsvExporter/PlAgCsvExporter.js +2 -0
- package/dist/components/PlAgCsvExporter/PlAgCsvExporter.vue2.js +2 -0
- package/dist/components/PlAgCsvExporter/PlAgCsvExporter.vue2.js.map +1 -1
- package/dist/components/PlAgCsvExporter/export-csv.js +2 -0
- package/dist/components/PlAgCsvExporter/export-csv.js.map +1 -1
- package/dist/components/PlAgDataTable/PlAgDataTableSheets.js +1 -0
- package/dist/components/PlAgDataTable/PlAgDataTableSheets.style.js +1 -0
- package/dist/components/PlAgDataTable/PlAgDataTableSheets.vue2.js +2 -0
- package/dist/components/PlAgDataTable/PlAgDataTableSheets.vue2.js.map +1 -1
- package/dist/components/PlAgDataTable/PlAgDataTableV2.js +1 -0
- package/dist/components/PlAgDataTable/PlAgDataTableV2.style.js +1 -0
- package/dist/components/PlAgDataTable/PlAgDataTableV2.vue2.js +2 -0
- package/dist/components/PlAgDataTable/PlAgDataTableV2.vue2.js.map +1 -1
- package/dist/components/PlAgDataTable/PlAgOverlayLoading.js +2 -0
- package/dist/components/PlAgDataTable/PlAgOverlayLoading.vue2.js +2 -0
- package/dist/components/PlAgDataTable/PlAgOverlayLoading.vue2.js.map +1 -1
- package/dist/components/PlAgDataTable/PlAgOverlayNoRows.js +2 -0
- package/dist/components/PlAgDataTable/PlAgOverlayNoRows.vue2.js +2 -0
- package/dist/components/PlAgDataTable/PlAgOverlayNoRows.vue2.js.map +1 -1
- package/dist/components/PlAgDataTable/PlAgRowCount.js +2 -0
- package/dist/components/PlAgDataTable/PlAgRowCount.vue2.js +2 -0
- package/dist/components/PlAgDataTable/PlAgRowCount.vue2.js.map +1 -1
- package/dist/components/PlAgDataTable/compositions/useFilterableColumns.js +2 -0
- package/dist/components/PlAgDataTable/compositions/useFilterableColumns.js.map +1 -1
- package/dist/components/PlAgDataTable/compositions/useGrid.js +2 -0
- package/dist/components/PlAgDataTable/compositions/useGrid.js.map +1 -1
- package/dist/components/PlAgDataTable/index.js +2 -0
- package/dist/components/PlAgDataTable/index.js.map +1 -1
- package/dist/components/PlAgDataTable/pl-ag-overlay-loading.module.js +1 -0
- package/dist/components/PlAgDataTable/sources/common.js +3 -1
- package/dist/components/PlAgDataTable/sources/common.js.map +1 -1
- package/dist/components/PlAgDataTable/sources/focus-row.js +2 -0
- package/dist/components/PlAgDataTable/sources/focus-row.js.map +1 -1
- package/dist/components/PlAgDataTable/sources/menu-items.js +2 -0
- package/dist/components/PlAgDataTable/sources/menu-items.js.map +1 -1
- package/dist/components/PlAgDataTable/sources/row-number.js +3 -2
- package/dist/components/PlAgDataTable/sources/row-number.js.map +1 -1
- package/dist/components/PlAgDataTable/sources/table-source-v2.js +2 -5
- package/dist/components/PlAgDataTable/sources/table-source-v2.js.map +1 -1
- package/dist/components/PlAgDataTable/sources/table-state-v2.js +2 -0
- package/dist/components/PlAgDataTable/sources/table-state-v2.js.map +1 -1
- package/dist/components/PlAgDataTable/sources/value-rendering.js +2 -0
- package/dist/components/PlAgDataTable/sources/value-rendering.js.map +1 -1
- package/dist/components/PlAgDataTable/types.js +2 -0
- package/dist/components/PlAgDataTable/types.js.map +1 -1
- package/dist/components/PlAgGridColumnManager/PlAgGridColumnManager.js +1 -0
- package/dist/components/PlAgGridColumnManager/PlAgGridColumnManager.style.js +1 -0
- package/dist/components/PlAgGridColumnManager/PlAgGridColumnManager.vue2.js +2 -0
- package/dist/components/PlAgGridColumnManager/PlAgGridColumnManager.vue2.js.map +1 -1
- package/dist/components/PlAgGridColumnManager/useFilteredItems.js +2 -0
- package/dist/components/PlAgGridColumnManager/useFilteredItems.js.map +1 -1
- package/dist/components/PlAgRowNumCheckbox/PlAgRowNumCheckbox.js +2 -0
- package/dist/components/PlAgRowNumCheckbox/PlAgRowNumCheckbox.vue2.js +2 -0
- package/dist/components/PlAgRowNumCheckbox/PlAgRowNumCheckbox.vue2.js.map +1 -1
- package/dist/components/PlAgRowNumCheckbox/pl-ag-row-num-checkbox.module.js +1 -0
- package/dist/components/PlAgRowNumHeader.js +2 -0
- package/dist/components/PlAgRowNumHeader.vue2.js +2 -0
- package/dist/components/PlAgRowNumHeader.vue2.js.map +1 -1
- package/dist/components/PlAgTextAndButtonCell/PlAgTextAndButtonCell.js +2 -0
- package/dist/components/PlAgTextAndButtonCell/PlAgTextAndButtonCell.vue2.js +2 -0
- package/dist/components/PlAgTextAndButtonCell/PlAgTextAndButtonCell.vue2.js.map +1 -1
- package/dist/components/PlAnnotations/components/AnnotationsSidebar.js +1 -0
- package/dist/components/PlAnnotations/components/AnnotationsSidebar.style.js +1 -0
- package/dist/components/PlAnnotations/components/AnnotationsSidebar.vue2.js +2 -0
- package/dist/components/PlAnnotations/components/AnnotationsSidebar.vue2.js.map +1 -1
- package/dist/components/PlAnnotations/components/FilterSidebar.js +1 -0
- package/dist/components/PlAnnotations/components/FilterSidebar.style.js +1 -0
- package/dist/components/PlAnnotations/components/FilterSidebar.vue2.js +2 -0
- package/dist/components/PlAnnotations/components/FilterSidebar.vue2.js.map +1 -1
- package/dist/components/PlAnnotations/components/PlAnnotations.js +1 -0
- package/dist/components/PlAnnotations/components/PlAnnotations.style.js +1 -0
- package/dist/components/PlAnnotations/components/PlAnnotations.vue2.js +2 -0
- package/dist/components/PlAnnotations/components/PlAnnotations.vue2.js.map +1 -1
- package/dist/components/PlAnnotations/components/PlAnnotationsModal.js +1 -0
- package/dist/components/PlAnnotations/components/PlAnnotationsModal.style.js +1 -0
- package/dist/components/PlAnnotations/components/PlAnnotationsModal.vue2.js +2 -0
- package/dist/components/PlAnnotations/components/PlAnnotationsModal.vue2.js.map +1 -1
- package/dist/components/PlAnnotations/components/style.module.js +1 -0
- package/dist/components/PlAnnotations/utils.js +2 -0
- package/dist/components/PlAnnotations/utils.js.map +1 -1
- package/dist/components/PlAppErrorNotificationAlert/PlAppErrorNotificationAlert.js +2 -0
- package/dist/components/PlAppErrorNotificationAlert/PlAppErrorNotificationAlert.vue2.js +2 -0
- package/dist/components/PlAppErrorNotificationAlert/PlAppErrorNotificationAlert.vue2.js.map +1 -1
- package/dist/components/PlBtnExportArchive/Item.js +1 -0
- package/dist/components/PlBtnExportArchive/Item.style.js +1 -0
- package/dist/components/PlBtnExportArchive/Item.vue2.js +2 -0
- package/dist/components/PlBtnExportArchive/Item.vue2.js.map +1 -1
- package/dist/components/PlBtnExportArchive/PlBtnExportArchive.js +1 -0
- package/dist/components/PlBtnExportArchive/PlBtnExportArchive.style.js +1 -0
- package/dist/components/PlBtnExportArchive/PlBtnExportArchive.vue2.js +2 -0
- package/dist/components/PlBtnExportArchive/PlBtnExportArchive.vue2.js.map +1 -1
- package/dist/components/PlBtnExportArchive/Summary.js +1 -0
- package/dist/components/PlBtnExportArchive/Summary.style.js +1 -0
- package/dist/components/PlBtnExportArchive/Summary.vue2.js +2 -0
- package/dist/components/PlBtnExportArchive/Summary.vue2.js.map +1 -1
- package/dist/components/PlTableFastSearch/PlTableFastSearch.js +2 -0
- package/dist/components/PlTableFastSearch/PlTableFastSearch.vue2.js +2 -0
- package/dist/components/PlTableFastSearch/PlTableFastSearch.vue2.js.map +1 -1
- package/dist/components/PlTableFilters/PlTableFiltersV2.js +1 -0
- package/dist/components/PlTableFilters/PlTableFiltersV2.style.js +1 -0
- package/dist/components/PlTableFilters/PlTableFiltersV2.vue2.js +2 -0
- package/dist/components/PlTableFilters/PlTableFiltersV2.vue2.js.map +1 -1
- package/dist/composition/AgGrid/index.js +2 -0
- package/dist/composition/AgGrid/index.js.map +1 -1
- package/dist/composition/fileContent.js +2 -38
- package/dist/composition/fileContent.js.map +1 -1
- package/dist/computedResult.js +2 -30
- package/dist/computedResult.js.map +1 -1
- package/dist/createModel.js +2 -0
- package/dist/createModel.js.map +1 -1
- package/dist/defineApp.js +3 -2
- package/dist/defineApp.js.map +1 -1
- package/dist/defineStore.js +2 -0
- package/dist/defineStore.js.map +1 -1
- package/dist/index.js +1 -0
- package/dist/internal/UpdateSerializer.js +2 -6
- package/dist/internal/UpdateSerializer.js.map +1 -1
- package/dist/internal/createAppModel.js +2 -0
- package/dist/internal/createAppModel.js.map +1 -1
- package/dist/internal/createAppV1.js +2 -14
- package/dist/internal/createAppV1.js.map +1 -1
- package/dist/internal/createAppV2.js +3 -17
- package/dist/internal/createAppV2.js.map +1 -1
- package/dist/internal/createAppV3.js +3 -17
- package/dist/internal/createAppV3.js.map +1 -1
- package/dist/internal/service_factories.js +2 -8
- package/dist/internal/service_factories.js.map +1 -1
- package/dist/lib/util/helpers/dist/functions.js +2 -3
- package/dist/lib/util/helpers/dist/functions.js.map +1 -1
- package/dist/lib/util/helpers/dist/hash.js +1 -1
- package/dist/lib/util/helpers/dist/hash.js.map +1 -1
- package/dist/lib/util/helpers/dist/index.js +0 -2
- package/dist/lib/util/helpers/dist/objects.js +2 -45
- package/dist/lib/util/helpers/dist/objects.js.map +1 -1
- package/dist/lib/util/helpers/dist/prettyBytes.js +2 -0
- package/dist/lib/util/helpers/dist/prettyBytes.js.map +1 -1
- package/dist/lib/util/helpers/dist/random.js +2 -0
- package/dist/lib/util/helpers/dist/random.js.map +1 -1
- package/dist/lib/util/helpers/dist/strings.js +2 -0
- package/dist/lib/util/helpers/dist/strings.js.map +1 -1
- package/dist/lib/util/helpers/dist/uniqId.js +2 -0
- package/dist/lib/util/helpers/dist/uniqId.js.map +1 -1
- package/dist/lib/util/helpers/dist/utils.js +2 -1
- package/dist/lib/util/helpers/dist/utils.js.map +1 -1
- package/dist/objectHash.js +2 -5
- package/dist/objectHash.js.map +1 -1
- package/dist/plugins/Monetization/EndOfPeriod.js +1 -0
- package/dist/plugins/Monetization/EndOfPeriod.style.js +1 -0
- package/dist/plugins/Monetization/EndOfPeriod.vue2.js +2 -0
- package/dist/plugins/Monetization/EndOfPeriod.vue2.js.map +1 -1
- package/dist/plugins/Monetization/LimitCard.js +1 -0
- package/dist/plugins/Monetization/LimitCard.style.js +1 -0
- package/dist/plugins/Monetization/LimitCard.vue2.js +2 -0
- package/dist/plugins/Monetization/LimitCard.vue2.js.map +1 -1
- package/dist/plugins/Monetization/MonetizationSidebar.js +2 -0
- package/dist/plugins/Monetization/MonetizationSidebar.vue2.js +2 -0
- package/dist/plugins/Monetization/MonetizationSidebar.vue2.js.map +1 -1
- package/dist/plugins/Monetization/RunStatus.js +1 -0
- package/dist/plugins/Monetization/RunStatus.style.js +1 -0
- package/dist/plugins/Monetization/RunStatus.vue2.js +2 -0
- package/dist/plugins/Monetization/RunStatus.vue2.js.map +1 -1
- package/dist/plugins/Monetization/UserCabinetCard.js +1 -0
- package/dist/plugins/Monetization/UserCabinetCard.style.js +1 -0
- package/dist/plugins/Monetization/UserCabinetCard.vue2.js +2 -0
- package/dist/plugins/Monetization/UserCabinetCard.vue2.js.map +1 -1
- package/dist/plugins/Monetization/useButtonTarget.js +2 -0
- package/dist/plugins/Monetization/useButtonTarget.js.map +1 -1
- package/dist/plugins/Monetization/useInfo.js +2 -0
- package/dist/plugins/Monetization/useInfo.js.map +1 -1
- package/dist/plugins/Monetization/validation.js +4 -4
- package/dist/plugins/Monetization/validation.js.map +1 -1
- package/dist/urls.js +3 -1
- package/dist/urls.js.map +1 -1
- package/dist/usePlugin.js +2 -24
- package/dist/usePlugin.js.map +1 -1
- package/dist/utils.js +3 -1
- package/dist/utils.js.map +1 -1
- package/package.json +11 -11
- package/dist/lib/util/helpers/dist/disposable.js +0 -9
- package/dist/lib/util/helpers/dist/disposable.js.map +0 -1
- package/dist/lib/util/helpers/dist/ref_count_pool.js +0 -4
- package/dist/lib/util/helpers/dist/ref_count_pool.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlAgRowNumHeader.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../src/components/PlAgRowNumHeader.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { PlCheckbox } from \"@milaboratories/uikit\";\nimport type { IHeaderParams } from \"ag-grid-enterprise\";\nimport { computed, onBeforeMount, onBeforeUnmount, ref } from \"vue\";\nimport {\n deselectAll,\n getSelectedRowsCount,\n getTotalRowsCount,\n isSelectionEnabled,\n selectAll,\n} from \"../lib\";\n\nconst { params } = defineProps<{\n params: IHeaderParams;\n}>();\n\nconst selectedRowCount = ref(getSelectedRowsCount(params.api));\nconst totalRowCount = ref(getTotalRowsCount(params.api));\nconst isSelectable = ref(isSelectionEnabled(params.api));\n\nconst someRowsSelected = computed(() => selectedRowCount.value > 0);\n\nconst allRowsSelected = computed(\n () => someRowsSelected.value && selectedRowCount.value === totalRowCount.value,\n);\n\nfunction toggleSelectAll() {\n if (someRowsSelected.value) {\n deselectAll(params.api);\n } else {\n selectAll(params.api);\n }\n}\n\nfunction updateRowCounts() {\n selectedRowCount.value = getSelectedRowsCount(params.api);\n totalRowCount.value = getTotalRowsCount(params.api);\n}\n\nfunction updateIsSelectable() {\n isSelectable.value = isSelectionEnabled(params.api);\n}\n\nonBeforeMount(() => {\n params.api.addEventListener(\"selectionChanged\", updateRowCounts);\n params.api.addEventListener(\"rowDataUpdated\", updateRowCounts);\n params.api.addEventListener(\"modelUpdated\", updateRowCounts);\n params.api.addEventListener(\"stateUpdated\", updateIsSelectable);\n});\n\nonBeforeUnmount(() => {\n params.api.removeEventListener(\"selectionChanged\", updateRowCounts);\n params.api.removeEventListener(\"rowDataUpdated\", updateRowCounts);\n params.api.removeEventListener(\"modelUpdated\", updateRowCounts);\n params.api.removeEventListener(\"stateUpdated\", updateIsSelectable);\n});\n</script>\n\n<template>\n <div\n style=\"\n position: absolute;\n inset: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n \"\n >\n <PlCheckbox\n v-if=\"isSelectable\"\n :model-value=\"someRowsSelected\"\n :indeterminate=\"someRowsSelected && !allRowsSelected\"\n @update:model-value=\"toggleSelectAll\"\n />\n <span v-else>\n {{ params.displayName }}\n </span>\n </div>\n</template>\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"PlAgRowNumHeader.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../src/components/PlAgRowNumHeader.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { PlCheckbox } from \"@milaboratories/uikit\";\nimport type { IHeaderParams } from \"ag-grid-enterprise\";\nimport { computed, onBeforeMount, onBeforeUnmount, ref } from \"vue\";\nimport {\n deselectAll,\n getSelectedRowsCount,\n getTotalRowsCount,\n isSelectionEnabled,\n selectAll,\n} from \"../lib\";\n\nconst { params } = defineProps<{\n params: IHeaderParams;\n}>();\n\nconst selectedRowCount = ref(getSelectedRowsCount(params.api));\nconst totalRowCount = ref(getTotalRowsCount(params.api));\nconst isSelectable = ref(isSelectionEnabled(params.api));\n\nconst someRowsSelected = computed(() => selectedRowCount.value > 0);\n\nconst allRowsSelected = computed(\n () => someRowsSelected.value && selectedRowCount.value === totalRowCount.value,\n);\n\nfunction toggleSelectAll() {\n if (someRowsSelected.value) {\n deselectAll(params.api);\n } else {\n selectAll(params.api);\n }\n}\n\nfunction updateRowCounts() {\n selectedRowCount.value = getSelectedRowsCount(params.api);\n totalRowCount.value = getTotalRowsCount(params.api);\n}\n\nfunction updateIsSelectable() {\n isSelectable.value = isSelectionEnabled(params.api);\n}\n\nonBeforeMount(() => {\n params.api.addEventListener(\"selectionChanged\", updateRowCounts);\n params.api.addEventListener(\"rowDataUpdated\", updateRowCounts);\n params.api.addEventListener(\"modelUpdated\", updateRowCounts);\n params.api.addEventListener(\"stateUpdated\", updateIsSelectable);\n});\n\nonBeforeUnmount(() => {\n params.api.removeEventListener(\"selectionChanged\", updateRowCounts);\n params.api.removeEventListener(\"rowDataUpdated\", updateRowCounts);\n params.api.removeEventListener(\"modelUpdated\", updateRowCounts);\n params.api.removeEventListener(\"stateUpdated\", updateIsSelectable);\n});\n</script>\n\n<template>\n <div\n style=\"\n position: absolute;\n inset: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n \"\n >\n <PlCheckbox\n v-if=\"isSelectable\"\n :model-value=\"someRowsSelected\"\n :indeterminate=\"someRowsSelected && !allRowsSelected\"\n @update:model-value=\"toggleSelectAll\"\n />\n <span v-else>\n {{ params.displayName }}\n </span>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;EAgBA,IAAM,IAAmB,EAAI,EAAqB,EAAA,OAAO,IAAI,CAAC,EACxD,IAAgB,EAAI,EAAkB,EAAA,OAAO,IAAI,CAAC,EAClD,IAAe,EAAI,EAAmB,EAAA,OAAO,IAAI,CAAC,EAElD,IAAmB,QAAe,EAAiB,QAAQ,EAAE,EAE7D,IAAkB,QAChB,EAAiB,SAAS,EAAiB,UAAU,EAAc,MAC1E;EAED,SAAS,IAAkB;AACzB,GAAI,EAAiB,QACnB,EAAY,EAAA,OAAO,IAAI,GAEvB,EAAU,EAAA,OAAO,IAAI;;EAIzB,SAAS,IAAkB;AAEzB,GADA,EAAiB,QAAQ,EAAqB,EAAA,OAAO,IAAI,EACzD,EAAc,QAAQ,EAAkB,EAAA,OAAO,IAAI;;EAGrD,SAAS,IAAqB;AAC5B,KAAa,QAAQ,EAAmB,EAAA,OAAO,IAAI;;SAGrD,QAAoB;AAIlB,GAHA,EAAA,OAAO,IAAI,iBAAiB,oBAAoB,EAAgB,EAChE,EAAA,OAAO,IAAI,iBAAiB,kBAAkB,EAAgB,EAC9D,EAAA,OAAO,IAAI,iBAAiB,gBAAgB,EAAgB,EAC5D,EAAA,OAAO,IAAI,iBAAiB,gBAAgB,EAAmB;IAC/D,EAEF,QAAsB;AAIpB,GAHA,EAAA,OAAO,IAAI,oBAAoB,oBAAoB,EAAgB,EACnE,EAAA,OAAO,IAAI,oBAAoB,kBAAkB,EAAgB,EACjE,EAAA,OAAO,IAAI,oBAAoB,gBAAgB,EAAgB,EAC/D,EAAA,OAAO,IAAI,oBAAoB,gBAAgB,EAAmB;IAClE,kBAIA,EAkBM,OAlBN,GAkBM,CARI,EAAA,SAAA,GAAA,EADR,EAKE,EAAA,EAAA,EAAA;;GAHC,eAAa,EAAA;GACb,eAAe,EAAA,SAAgB,CAAK,EAAA;GACpC,uBAAoB;yDAEvB,EAEO,QAAA,GAAA,EADF,EAAA,OAAO,YAAW,EAAA,EAAA,EAAA,CAAA"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import './pl-ag-text-and-button-cell.css';/* empty css */
|
|
2
2
|
import { createElementBlock as e, createElementVNode as t, createTextVNode as n, createVNode as r, defineComponent as i, openBlock as a, toDisplayString as o, unref as s, withModifiers as c } from "vue";
|
|
3
3
|
import { PlMaskIcon16 as l } from "@milaboratories/uikit";
|
|
4
|
+
//#region src/components/PlAgTextAndButtonCell/PlAgTextAndButtonCell.vue?vue&type=script&setup=true&lang.ts
|
|
4
5
|
var u = { class: "pl-ag-grid-open-cell d-flex" }, d = { class: "pl-ag-grid-open-cell__value" }, f = /* @__PURE__ */ i({
|
|
5
6
|
__name: "PlAgTextAndButtonCell",
|
|
6
7
|
props: { params: {} },
|
|
@@ -27,6 +28,7 @@ var u = { class: "pl-ag-grid-open-cell d-flex" }, d = { class: "pl-ag-grid-open-
|
|
|
27
28
|
}, [r(s(l), { name: i.params.icon ?? "maximize" }, null, 8, ["name"]), n(" " + o(i.params.btnLabel ?? "Open"), 1)])]));
|
|
28
29
|
}
|
|
29
30
|
});
|
|
31
|
+
//#endregion
|
|
30
32
|
export { f as default };
|
|
31
33
|
|
|
32
34
|
//# sourceMappingURL=PlAgTextAndButtonCell.vue2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlAgTextAndButtonCell.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/PlAgTextAndButtonCell/PlAgTextAndButtonCell.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { ICellRendererParams, RowDoubleClickedEvent } from \"ag-grid-enterprise\";\nimport type { MaskIconName16 } from \"@milaboratories/uikit\";\nimport { PlMaskIcon16 } from \"@milaboratories/uikit\";\nimport \"./pl-ag-text-and-button-cell.scss\";\n\nconst props = defineProps<{\n params: ICellRendererParams & {\n /**\n * Button icon MaskIconName16\n */\n icon?: MaskIconName16;\n /**\n * Button label\n */\n btnLabel?: string;\n /**\n * If invokeRowsOnDoubleClick = true, clicking a button inside the row\n * triggers the doubleClick event for the entire row. In this case,\n * the handler passed to the component is not called, even if it is defined.\n *\n * If invokeRowsOnDoubleClick = false, the doubleClick event for the row\n * is not triggered, but the provided handler will be called, receiving\n * the ICellRendererParams as an argument.\n */\n invokeRowsOnDoubleClick?: boolean;\n /**\n * plHandler parameter is a click handler that is invoked when\n * the invokeRowsOnDoubleClick property is set to false.\n */\n onClick?: (params: ICellRendererParams) => void;\n };\n}>();\n\nfunction triggerRowDoubleClick() {\n if (props.params.invokeRowsOnDoubleClick) {\n const gridApi = props.params.api;\n\n const event: RowDoubleClickedEvent = {\n rowPinned: props.params.node.rowPinned,\n api: gridApi,\n rowIndex: props.params.node.rowIndex,\n context: gridApi,\n type: \"rowDoubleClicked\",\n node: props.params.node,\n data: props.params.data,\n event: null,\n };\n\n gridApi.dispatchEvent(event);\n } else {\n props.params.onClick?.(props.params);\n }\n}\n</script>\n<template>\n <div class=\"pl-ag-grid-open-cell d-flex\">\n <div class=\"pl-ag-grid-open-cell__value\">\n {{ params.value }}\n </div>\n <div\n class=\"pl-ag-grid-open-cell__activator text-caps11 align-center\"\n @click.stop=\"triggerRowDoubleClick\"\n >\n <PlMaskIcon16 :name=\"params.icon ?? 'maximize'\" />\n {{ params.btnLabel ?? \"Open\" }}\n </div>\n </div>\n</template>\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"PlAgTextAndButtonCell.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/PlAgTextAndButtonCell/PlAgTextAndButtonCell.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport type { ICellRendererParams, RowDoubleClickedEvent } from \"ag-grid-enterprise\";\nimport type { MaskIconName16 } from \"@milaboratories/uikit\";\nimport { PlMaskIcon16 } from \"@milaboratories/uikit\";\nimport \"./pl-ag-text-and-button-cell.scss\";\n\nconst props = defineProps<{\n params: ICellRendererParams & {\n /**\n * Button icon MaskIconName16\n */\n icon?: MaskIconName16;\n /**\n * Button label\n */\n btnLabel?: string;\n /**\n * If invokeRowsOnDoubleClick = true, clicking a button inside the row\n * triggers the doubleClick event for the entire row. In this case,\n * the handler passed to the component is not called, even if it is defined.\n *\n * If invokeRowsOnDoubleClick = false, the doubleClick event for the row\n * is not triggered, but the provided handler will be called, receiving\n * the ICellRendererParams as an argument.\n */\n invokeRowsOnDoubleClick?: boolean;\n /**\n * plHandler parameter is a click handler that is invoked when\n * the invokeRowsOnDoubleClick property is set to false.\n */\n onClick?: (params: ICellRendererParams) => void;\n };\n}>();\n\nfunction triggerRowDoubleClick() {\n if (props.params.invokeRowsOnDoubleClick) {\n const gridApi = props.params.api;\n\n const event: RowDoubleClickedEvent = {\n rowPinned: props.params.node.rowPinned,\n api: gridApi,\n rowIndex: props.params.node.rowIndex,\n context: gridApi,\n type: \"rowDoubleClicked\",\n node: props.params.node,\n data: props.params.data,\n event: null,\n };\n\n gridApi.dispatchEvent(event);\n } else {\n props.params.onClick?.(props.params);\n }\n}\n</script>\n<template>\n <div class=\"pl-ag-grid-open-cell d-flex\">\n <div class=\"pl-ag-grid-open-cell__value\">\n {{ params.value }}\n </div>\n <div\n class=\"pl-ag-grid-open-cell__activator text-caps11 align-center\"\n @click.stop=\"triggerRowDoubleClick\"\n >\n <PlMaskIcon16 :name=\"params.icon ?? 'maximize'\" />\n {{ params.btnLabel ?? \"Open\" }}\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;EAMA,IAAM,IAAQ;EA4Bd,SAAS,IAAwB;AAC/B,OAAI,EAAM,OAAO,yBAAyB;IACxC,IAAM,IAAU,EAAM,OAAO,KAEvB,IAA+B;KACnC,WAAW,EAAM,OAAO,KAAK;KAC7B,KAAK;KACL,UAAU,EAAM,OAAO,KAAK;KAC5B,SAAS;KACT,MAAM;KACN,MAAM,EAAM,OAAO;KACnB,MAAM,EAAM,OAAO;KACnB,OAAO;KACR;AAED,MAAQ,cAAc,EAAM;SAE5B,GAAM,OAAO,UAAU,EAAM,OAAO;;yBAKtC,EAWM,OAXN,GAWM,CAVJ,EAEM,OAFN,GAEM,EADD,EAAA,OAAO,MAAK,EAAA,EAAA,EAEjB,EAMM,OAAA;GALJ,OAAM;GACL,SAAK,EAAO,GAAqB,CAAA,OAAA,CAAA;MAElC,EAAkD,EAAA,EAAA,EAAA,EAAnC,MAAM,EAAA,OAAO,QAAI,YAAA,EAAA,MAAA,GAAA,CAAA,OAAA,CAAA,EAAA,EAAkB,MAClD,EAAG,EAAA,OAAO,YAAQ,OAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA"}
|
|
@@ -2,6 +2,7 @@ import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
|
2
2
|
import t from "./AnnotationsSidebar.vue2.js";
|
|
3
3
|
import n from "./AnnotationsSidebar.style.js";
|
|
4
4
|
var r = /* @__PURE__ */ e(t, [["__cssModules", { $style: n }]]);
|
|
5
|
+
//#endregion
|
|
5
6
|
export { r as default };
|
|
6
7
|
|
|
7
8
|
//# sourceMappingURL=AnnotationsSidebar.js.map
|
|
@@ -5,6 +5,7 @@ import { validateTitle as n } from "../utils.js";
|
|
|
5
5
|
import { createBlock as r, createElementVNode as i, createSlots as a, createTextVNode as o, createVNode as s, defineComponent as c, mergeModels as l, normalizeClass as u, openBlock as d, toDisplayString as f, unref as p, useModel as m, withCtx as h, withModifiers as g } from "vue";
|
|
6
6
|
import { PlBtnGhost as _, PlBtnSecondary as v, PlEditableTitle as y, PlElementList as b, PlSidebarItem as x, PlTextField as S } from "@milaboratories/uikit";
|
|
7
7
|
import { isEmpty as C } from "es-toolkit/compat";
|
|
8
|
+
//#region src/components/PlAnnotations/components/AnnotationsSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
8
9
|
var w = /* @__PURE__ */ c({
|
|
9
10
|
__name: "AnnotationsSidebar",
|
|
10
11
|
props: {
|
|
@@ -98,6 +99,7 @@ var w = /* @__PURE__ */ c({
|
|
|
98
99
|
} : void 0]), 1024));
|
|
99
100
|
}
|
|
100
101
|
});
|
|
102
|
+
//#endregion
|
|
101
103
|
export { w as default };
|
|
102
104
|
|
|
103
105
|
//# sourceMappingURL=AnnotationsSidebar.vue2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnnotationsSidebar.vue_vue_type_script_setup_true_lang.js","names":["$style"],"sources":["../../../../src/components/PlAnnotations/components/AnnotationsSidebar.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport $commonStyle from \"./style.module.css\";\n\nimport { randomInt } from \"@milaboratories/helpers\";\nimport {\n PlBtnGhost,\n PlBtnSecondary,\n PlEditableTitle,\n PlElementList,\n PlSidebarItem,\n PlTextField,\n} from \"@milaboratories/uikit\";\nimport type { Annotation } from \"../types\";\nimport { validateTitle } from \"../utils\";\nimport { isEmpty } from \"es-toolkit/compat\";\n\n// Models\nconst annotation = defineModel<Annotation>(\"annotation\", { required: true });\nconst selectedStepId = defineModel<undefined | number>(\"selectedStepId\");\n// Emits\nconst emits = defineEmits<{\n (e: \"delete-schema\"): void;\n}>();\n// Actions\nfunction handleAddStep() {\n const id = randomInt();\n annotation.value.steps.push({\n id,\n label: \"\",\n filter: {\n id: randomInt(),\n type: \"and\",\n filters: [],\n },\n });\n selectedStepId.value = id;\n}\n</script>\n\n<template>\n <PlSidebarItem>\n <template #header-content>\n <PlEditableTitle\n v-model=\"annotation.title\"\n :class=\"{ [$commonStyle.flashing]: annotation.title.length === 0 }\"\n :max-length=\"40\"\n max-width=\"600px\"\n placeholder=\"Annotation Title\"\n :autofocus=\"annotation.title.length === 0\"\n :validate=\"validateTitle\"\n />\n </template>\n <template v-if=\"annotation\" #body-content>\n <div :class=\"[$style.root, { [$commonStyle.disabled]: annotation.title.length === 0 }]\">\n <span :class=\"$style.tip\"\n >Above annotations override the ones below. Rearrange them by dragging.</span\n >\n\n <PlElementList\n v-model:items=\"annotation.steps\"\n :get-item-key=\"(item) => item.id\"\n :is-active=\"(item) => item.id === selectedStepId\"\n :item-class=\"$style.stepItem\"\n :class=\"$style.steps\"\n @item-click=\"(item) => (selectedStepId = item.id)\"\n >\n <template #item-title=\"{ item }\">\n {{ item.label }}\n </template>\n </PlElementList>\n\n <PlBtnSecondary icon=\"add\" @click=\"handleAddStep\"> Add label </PlBtnSecondary>\n\n <PlTextField\n :class=\"[\n $style.defaultValue,\n { [$style.emptyDefaultValue]: isEmpty(annotation.defaultValue) },\n ]\"\n :model-value=\"annotation.defaultValue ?? ''\"\n label=\"Label remaining with\"\n placeholder=\"No label\"\n clearable\n helper=\"This label will be applied to the remaining rows, after all other filters are applied.\"\n @click.stop\n @update:model-value=\"annotation.defaultValue = $event === '' ? undefined : $event\"\n />\n </div>\n </template>\n <template #footer-content>\n <PlBtnGhost\n icon=\"delete-bin\"\n reverse\n :disabled=\"annotation.steps.length === 0\"\n @click.stop=\"emits('delete-schema')\"\n >\n Delete Schema\n </PlBtnGhost>\n </template>\n </PlSidebarItem>\n</template>\n\n<style lang=\"scss\" module>\n@use \"@milaboratories/uikit/styles/variables\" as *;\n\n.root {\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\n.tip {\n color: var(--txt-03);\n}\n\n.steps {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.stepItem {\n cursor: pointer;\n}\n\n.defaultValue {\n margin-top: 8px;\n}\n.emptyDefaultValue {\n opacity: 0.5;\n transition: opacity 0.2s ease-in-out;\n\n &:hover {\n opacity: 1;\n }\n}\n</style>\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"AnnotationsSidebar.vue_vue_type_script_setup_true_lang.js","names":["$style"],"sources":["../../../../src/components/PlAnnotations/components/AnnotationsSidebar.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport $commonStyle from \"./style.module.css\";\n\nimport { randomInt } from \"@milaboratories/helpers\";\nimport {\n PlBtnGhost,\n PlBtnSecondary,\n PlEditableTitle,\n PlElementList,\n PlSidebarItem,\n PlTextField,\n} from \"@milaboratories/uikit\";\nimport type { Annotation } from \"../types\";\nimport { validateTitle } from \"../utils\";\nimport { isEmpty } from \"es-toolkit/compat\";\n\n// Models\nconst annotation = defineModel<Annotation>(\"annotation\", { required: true });\nconst selectedStepId = defineModel<undefined | number>(\"selectedStepId\");\n// Emits\nconst emits = defineEmits<{\n (e: \"delete-schema\"): void;\n}>();\n// Actions\nfunction handleAddStep() {\n const id = randomInt();\n annotation.value.steps.push({\n id,\n label: \"\",\n filter: {\n id: randomInt(),\n type: \"and\",\n filters: [],\n },\n });\n selectedStepId.value = id;\n}\n</script>\n\n<template>\n <PlSidebarItem>\n <template #header-content>\n <PlEditableTitle\n v-model=\"annotation.title\"\n :class=\"{ [$commonStyle.flashing]: annotation.title.length === 0 }\"\n :max-length=\"40\"\n max-width=\"600px\"\n placeholder=\"Annotation Title\"\n :autofocus=\"annotation.title.length === 0\"\n :validate=\"validateTitle\"\n />\n </template>\n <template v-if=\"annotation\" #body-content>\n <div :class=\"[$style.root, { [$commonStyle.disabled]: annotation.title.length === 0 }]\">\n <span :class=\"$style.tip\"\n >Above annotations override the ones below. Rearrange them by dragging.</span\n >\n\n <PlElementList\n v-model:items=\"annotation.steps\"\n :get-item-key=\"(item) => item.id\"\n :is-active=\"(item) => item.id === selectedStepId\"\n :item-class=\"$style.stepItem\"\n :class=\"$style.steps\"\n @item-click=\"(item) => (selectedStepId = item.id)\"\n >\n <template #item-title=\"{ item }\">\n {{ item.label }}\n </template>\n </PlElementList>\n\n <PlBtnSecondary icon=\"add\" @click=\"handleAddStep\"> Add label </PlBtnSecondary>\n\n <PlTextField\n :class=\"[\n $style.defaultValue,\n { [$style.emptyDefaultValue]: isEmpty(annotation.defaultValue) },\n ]\"\n :model-value=\"annotation.defaultValue ?? ''\"\n label=\"Label remaining with\"\n placeholder=\"No label\"\n clearable\n helper=\"This label will be applied to the remaining rows, after all other filters are applied.\"\n @click.stop\n @update:model-value=\"annotation.defaultValue = $event === '' ? undefined : $event\"\n />\n </div>\n </template>\n <template #footer-content>\n <PlBtnGhost\n icon=\"delete-bin\"\n reverse\n :disabled=\"annotation.steps.length === 0\"\n @click.stop=\"emits('delete-schema')\"\n >\n Delete Schema\n </PlBtnGhost>\n </template>\n </PlSidebarItem>\n</template>\n\n<style lang=\"scss\" module>\n@use \"@milaboratories/uikit/styles/variables\" as *;\n\n.root {\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\n.tip {\n color: var(--txt-03);\n}\n\n.steps {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.stepItem {\n cursor: pointer;\n}\n\n.defaultValue {\n margin-top: 8px;\n}\n.emptyDefaultValue {\n opacity: 0.5;\n transition: opacity 0.2s ease-in-out;\n\n &:hover {\n opacity: 1;\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;EAiBA,IAAM,IAAa,EAAuB,GAAC,aAAiC,EACtE,IAAiB,EAA+B,GAAC,iBAAiB,EAElE,IAAQ;EAId,SAAS,IAAgB;GACvB,IAAM,IAAK,GAAW;AAUtB,GATA,EAAW,MAAM,MAAM,KAAK;IAC1B;IACA,OAAO;IACP,QAAQ;KACN,IAAI,GAAW;KACf,MAAM;KACN,SAAS,EAAE;KACZ;IACF,CAAC,EACF,EAAe,QAAQ;;yBAKvB,EA0DgB,EAAA,EAAA,EAAA,MAAA,EAAA;GAzDH,kBAAc,QASrB,CARF,EAQE,EAAA,EAAA,EAAA;gBAPS,EAAA,MAAW;6CAAX,MAAW,QAAK;IACxB,OAAK,EAAA,GAAK,EAAA,EAAY,CAAC,WAAW,EAAA,MAAW,MAAM,WAAM,GAAA,CAAA;IACzD,cAAY;IACb,aAAU;IACV,aAAY;IACX,WAAW,EAAA,MAAW,MAAM,WAAM;IAClC,UAAU,EAAA,EAAa;;;;;;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KACrC,OAAM;KACN,aAAY;KACZ,WAAA;KACA,QAAO;KACN,SAAK,AAAA,EAAA,OAAA,QAAN,IAAW,CAAA,OAAA,CAAA;KACV,uBAAkB,AAAA,EAAA,QAAA,MAAE,EAAA,MAAW,eAAe,MAAM,KAAU,KAAA,IAAY"}
|
|
@@ -2,6 +2,7 @@ import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
|
2
2
|
import t from "./FilterSidebar.vue2.js";
|
|
3
3
|
import n from "./FilterSidebar.style.js";
|
|
4
4
|
var r = /* @__PURE__ */ e(t, [["__cssModules", { $style: n }]]);
|
|
5
|
+
//#endregion
|
|
5
6
|
export { r as default };
|
|
6
7
|
|
|
7
8
|
//# sourceMappingURL=FilterSidebar.js.map
|
|
@@ -6,6 +6,7 @@ import n from "./style.module.js";
|
|
|
6
6
|
import { validateTitle as r } from "../utils.js";
|
|
7
7
|
import { computed as i, createBlock as a, createCommentVNode as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, mergeModels as d, normalizeClass as f, openBlock as p, unref as m, useModel as h, withCtx as g } from "vue";
|
|
8
8
|
import { PlBtnSecondary as _, PlEditableTitle as v, PlSidebarItem as y } from "@milaboratories/uikit";
|
|
9
|
+
//#region src/components/PlAnnotations/components/FilterSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
9
10
|
var b = /* @__PURE__ */ u({
|
|
10
11
|
__name: "FilterSidebar",
|
|
11
12
|
props: /* @__PURE__ */ d({
|
|
@@ -118,6 +119,7 @@ var b = /* @__PURE__ */ u({
|
|
|
118
119
|
})) : o("", !0);
|
|
119
120
|
}
|
|
120
121
|
});
|
|
122
|
+
//#endregion
|
|
121
123
|
export { b as default };
|
|
122
124
|
|
|
123
125
|
//# sourceMappingURL=FilterSidebar.vue2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterSidebar.vue_vue_type_script_setup_true_lang.js","names":["$style"],"sources":["../../../../src/components/PlAnnotations/components/FilterSidebar.vue"],"sourcesContent":["<script lang=\"ts\">\nexport type Props = {\n columns: PlAdvancedFilterItem[];\n\n getSuggestOptions: (params: {\n columnId: PlAdvancedFilterColumnId;\n axisIdx?: number;\n searchStr: string;\n searchType: \"value\" | \"label\";\n }) => ListOptionBase<string | number>[] | Promise<ListOptionBase<string | number>[]>;\n\n hasSelectedColumns?: boolean;\n getValuesForSelectedColumns?: () => Promise<\n undefined | { columnId: PObjectId; values: string[] }\n >;\n};\n</script>\n<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport { randomInt } from \"@milaboratories/helpers\";\nimport { PlBtnSecondary, PlEditableTitle, PlSidebarItem } from \"@milaboratories/uikit\";\nimport type { ListOptionBase, PObjectId, SUniversalPColumnId } from \"@platforma-sdk/model\";\n\nimport { PlAdvancedFilterComponent } from \"../../PlAdvancedFilter\";\nimport type {\n PlAdvancedFilterItem,\n PlAdvancedFilterColumnId,\n PlAdvancedFilterSupportedFilters,\n PlAdvancedFilter,\n} from \"../../PlAdvancedFilter\";\nimport type { Filter } from \"../types\";\n\nimport $commonStyle from \"./style.module.css\";\nimport { validateTitle } from \"../utils\";\n\n// Models\nconst step = defineModel<Filter>(\"step\", { required: true });\n// Props\nconst props = defineProps<Props>();\n// State\nconst withSelection = computed(() => {\n return props.hasSelectedColumns !== undefined && props.getValuesForSelectedColumns !== undefined;\n});\n// Actions\nconst addFilterPlaceholder = () => {\n step.value.filter.filters.push({\n id: randomInt(),\n isExpanded: true,\n type: \"or\",\n filters: [\n {\n id: randomInt(),\n type: \"isNA\",\n column: props.columns[0].id as SUniversalPColumnId,\n },\n ],\n });\n};\n\nasync function addFilterFromSelected() {\n if (props.hasSelectedColumns === undefined || props.getValuesForSelectedColumns === undefined)\n return;\n\n const data = await props.getValuesForSelectedColumns();\n if (!data || data.values.length === 0) return;\n\n const { columnId, values } = data;\n const shortReminder =\n values.slice(0, 3).join(\", \") + (values.length > 3 ? ` and ${values.length - 3} more` : \"\");\n\n step.value.filter.filters.push({\n id: randomInt(),\n name: `Selected list (${shortReminder})`,\n isExpanded: false,\n type: \"or\",\n filters: values.map((value, i) => ({\n id: i,\n type: \"patternEquals\",\n column: columnId as SUniversalPColumnId,\n value,\n })),\n });\n}\n\nconst supportedFilters = [\n \"isNA\",\n \"isNotNA\",\n \"greaterThan\",\n \"greaterThanOrEqual\",\n \"lessThan\",\n \"lessThanOrEqual\",\n \"patternEquals\",\n \"patternNotEquals\",\n \"patternContainSubsequence\",\n \"patternNotContainSubsequence\",\n \"equal\",\n \"notEqual\",\n \"topN\",\n \"bottomN\",\n] as (typeof PlAdvancedFilterSupportedFilters)[number][];\n</script>\n\n<template>\n <PlSidebarItem v-if=\"step\">\n <template #header-content>\n <PlEditableTitle\n :key=\"step.id\"\n v-model=\"step.label\"\n :class=\"{ [$commonStyle.flashing]: step.label.length === 0 }\"\n :max-length=\"40\"\n max-width=\"600px\"\n placeholder=\"Label\"\n :autofocus=\"step.label.length === 0\"\n :validate=\"validateTitle\"\n />\n </template>\n <template #body-content>\n <PlAdvancedFilterComponent\n v-model:filters=\"step.filter as PlAdvancedFilter\"\n :class=\"[$style.root, { [$commonStyle.disabled]: step.label.length === 0 }]\"\n :items=\"props.columns\"\n :supported-filters=\"supportedFilters\"\n :get-suggest-options=\"props.getSuggestOptions\"\n :enable-dnd=\"false\"\n :enable-add-group-button=\"true\"\n >\n <template #add-group-buttons>\n <div :class=\"$style.actions\">\n <PlBtnSecondary icon=\"add\" @click=\"addFilterPlaceholder\"> Add Filter </PlBtnSecondary>\n <PlBtnSecondary\n v-if=\"withSelection\"\n icon=\"add\"\n :disabled=\"!props.hasSelectedColumns\"\n @click=\"addFilterFromSelected\"\n >\n From selection\n </PlBtnSecondary>\n </div>\n </template>\n </PlAdvancedFilterComponent>\n </template>\n </PlSidebarItem>\n</template>\n\n<style module>\n.root {\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\n.actions {\n display: flex;\n flex-direction: row;\n gap: 12px;\n}\n</style>\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"FilterSidebar.vue_vue_type_script_setup_true_lang.js","names":["$style"],"sources":["../../../../src/components/PlAnnotations/components/FilterSidebar.vue"],"sourcesContent":["<script lang=\"ts\">\nexport type Props = {\n columns: PlAdvancedFilterItem[];\n\n getSuggestOptions: (params: {\n columnId: PlAdvancedFilterColumnId;\n axisIdx?: number;\n searchStr: string;\n searchType: \"value\" | \"label\";\n }) => ListOptionBase<string | number>[] | Promise<ListOptionBase<string | number>[]>;\n\n hasSelectedColumns?: boolean;\n getValuesForSelectedColumns?: () => Promise<\n undefined | { columnId: PObjectId; values: string[] }\n >;\n};\n</script>\n<script setup lang=\"ts\">\nimport { computed } from \"vue\";\nimport { randomInt } from \"@milaboratories/helpers\";\nimport { PlBtnSecondary, PlEditableTitle, PlSidebarItem } from \"@milaboratories/uikit\";\nimport type { ListOptionBase, PObjectId, SUniversalPColumnId } from \"@platforma-sdk/model\";\n\nimport { PlAdvancedFilterComponent } from \"../../PlAdvancedFilter\";\nimport type {\n PlAdvancedFilterItem,\n PlAdvancedFilterColumnId,\n PlAdvancedFilterSupportedFilters,\n PlAdvancedFilter,\n} from \"../../PlAdvancedFilter\";\nimport type { Filter } from \"../types\";\n\nimport $commonStyle from \"./style.module.css\";\nimport { validateTitle } from \"../utils\";\n\n// Models\nconst step = defineModel<Filter>(\"step\", { required: true });\n// Props\nconst props = defineProps<Props>();\n// State\nconst withSelection = computed(() => {\n return props.hasSelectedColumns !== undefined && props.getValuesForSelectedColumns !== undefined;\n});\n// Actions\nconst addFilterPlaceholder = () => {\n step.value.filter.filters.push({\n id: randomInt(),\n isExpanded: true,\n type: \"or\",\n filters: [\n {\n id: randomInt(),\n type: \"isNA\",\n column: props.columns[0].id as SUniversalPColumnId,\n },\n ],\n });\n};\n\nasync function addFilterFromSelected() {\n if (props.hasSelectedColumns === undefined || props.getValuesForSelectedColumns === undefined)\n return;\n\n const data = await props.getValuesForSelectedColumns();\n if (!data || data.values.length === 0) return;\n\n const { columnId, values } = data;\n const shortReminder =\n values.slice(0, 3).join(\", \") + (values.length > 3 ? ` and ${values.length - 3} more` : \"\");\n\n step.value.filter.filters.push({\n id: randomInt(),\n name: `Selected list (${shortReminder})`,\n isExpanded: false,\n type: \"or\",\n filters: values.map((value, i) => ({\n id: i,\n type: \"patternEquals\",\n column: columnId as SUniversalPColumnId,\n value,\n })),\n });\n}\n\nconst supportedFilters = [\n \"isNA\",\n \"isNotNA\",\n \"greaterThan\",\n \"greaterThanOrEqual\",\n \"lessThan\",\n \"lessThanOrEqual\",\n \"patternEquals\",\n \"patternNotEquals\",\n \"patternContainSubsequence\",\n \"patternNotContainSubsequence\",\n \"equal\",\n \"notEqual\",\n \"topN\",\n \"bottomN\",\n] as (typeof PlAdvancedFilterSupportedFilters)[number][];\n</script>\n\n<template>\n <PlSidebarItem v-if=\"step\">\n <template #header-content>\n <PlEditableTitle\n :key=\"step.id\"\n v-model=\"step.label\"\n :class=\"{ [$commonStyle.flashing]: step.label.length === 0 }\"\n :max-length=\"40\"\n max-width=\"600px\"\n placeholder=\"Label\"\n :autofocus=\"step.label.length === 0\"\n :validate=\"validateTitle\"\n />\n </template>\n <template #body-content>\n <PlAdvancedFilterComponent\n v-model:filters=\"step.filter as PlAdvancedFilter\"\n :class=\"[$style.root, { [$commonStyle.disabled]: step.label.length === 0 }]\"\n :items=\"props.columns\"\n :supported-filters=\"supportedFilters\"\n :get-suggest-options=\"props.getSuggestOptions\"\n :enable-dnd=\"false\"\n :enable-add-group-button=\"true\"\n >\n <template #add-group-buttons>\n <div :class=\"$style.actions\">\n <PlBtnSecondary icon=\"add\" @click=\"addFilterPlaceholder\"> Add Filter </PlBtnSecondary>\n <PlBtnSecondary\n v-if=\"withSelection\"\n icon=\"add\"\n :disabled=\"!props.hasSelectedColumns\"\n @click=\"addFilterFromSelected\"\n >\n From selection\n </PlBtnSecondary>\n </div>\n </template>\n </PlAdvancedFilterComponent>\n </template>\n </PlSidebarItem>\n</template>\n\n<style module>\n.root {\n display: flex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AAL,MAAK,QAAK;IAClB,OAAK,EAAA,GAAK,EAAA,EAAY,CAAC,WAAW,EAAA,MAAK,MAAM,WAAM,GAAA,CAAA;IACnD,cAAY;IACb,aAAU;IACV,aAAY;IACX,WAAW,EAAA,MAAK,MAAM,WAAM;IAC5B,UAAU,EAAA,EAAa;;;;;;;GAGjB,gBAAY,QAuBO,CAtB5B,EAsB4B,EAAA,EAAA,EAAA;IArBlB,SAAS,EAAA,MAAK;0CAAL,MAAK,SAAM;IAC3B,OAAK,EAAA,CAAGA,EAAAA,OAAO,MAAI,GAAK,EAAA,EAAY,CAAC,WAAW,EAAA,MAAK,MAAM,WAAM,GAAA,CAAA,CAAA;IACjE,OAAO,EAAM;IACb,qBAAmB;IACnB,uBAAqB,EAAM;IAC3B,cAAY;IACZ,2BAAyB;;IAEf,qBAAiB,QAWpB,CAVN,EAUM,OAAA,EAVA,OAAK,EAAEA,EAAAA,OAAO,QAAO,EAAA,EAAA,CACzB,EAAsF,EAAA,EAAA,EAAA;KAAtE,MAAK;KAAO,SAAO;;sBAAkC,CAAA,GAAA,AAAA,EAAA,OAAA,CAAA,EAAZ,gBAAY,GAAA,CAAA,CAAA,CAAA;;QAE7D,EAAA,SAAA,GAAA,EADR,EAOiB,EAAA,EAAA,EAAA;;KALf,MAAK;KACJ,UAAQ,CAAG,EAAM;KACjB,SAAO;;sBAGV,CAAA,GAAA,AAAA,EAAA,OAAA,CAAA,EAFC,oBAED,GAAA,CAAA,CAAA,CAAA"}
|
|
@@ -2,6 +2,7 @@ import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
|
2
2
|
import t from "./PlAnnotations.vue2.js";
|
|
3
3
|
import n from "./PlAnnotations.style.js";
|
|
4
4
|
var r = /* @__PURE__ */ e(t, [["__cssModules", { $style: n }]]);
|
|
5
|
+
//#endregion
|
|
5
6
|
export { r as default };
|
|
6
7
|
|
|
7
8
|
//# sourceMappingURL=PlAnnotations.js.map
|
|
@@ -4,6 +4,7 @@ import t from "./AnnotationsSidebar.js";
|
|
|
4
4
|
import n from "./FilterSidebar.js";
|
|
5
5
|
import { computed as r, createBlock as i, createCommentVNode as a, createVNode as o, defineComponent as s, effect as c, mergeModels as l, normalizeClass as u, openBlock as d, shallowRef as f, unref as p, useModel as m, withCtx as h } from "vue";
|
|
6
6
|
import { PlSidebarGroup as g, useConfirm as _ } from "@milaboratories/uikit";
|
|
7
|
+
//#region src/components/PlAnnotations/components/PlAnnotations.vue?vue&type=script&setup=true&lang.ts
|
|
7
8
|
var v = /* @__PURE__ */ s({
|
|
8
9
|
__name: "PlAnnotations",
|
|
9
10
|
props: /* @__PURE__ */ l({
|
|
@@ -69,6 +70,7 @@ var v = /* @__PURE__ */ s({
|
|
|
69
70
|
}));
|
|
70
71
|
}
|
|
71
72
|
});
|
|
73
|
+
//#endregion
|
|
72
74
|
export { v as default };
|
|
73
75
|
|
|
74
76
|
//# sourceMappingURL=PlAnnotations.vue2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlAnnotations.vue_vue_type_script_setup_true_lang.js","names":["$style"],"sources":["../../../../src/components/PlAnnotations/components/PlAnnotations.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { Props as BaseProps } from \"./FilterSidebar.vue\";\nexport type Props = BaseProps & {\n onDeleteSchema?: () => void;\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, effect, shallowRef } from \"vue\";\n\nimport { isNil } from \"@milaboratories/helpers\";\nimport { PlSidebarGroup, useConfirm } from \"@milaboratories/uikit\";\n\nimport type { Annotation } from \"../types\";\nimport AnnotationsSidebar from \"./AnnotationsSidebar.vue\";\nimport FilterSidebar from \"./FilterSidebar.vue\";\n\n// Models\nconst annotation = defineModel<Annotation>(\"annotation\", { required: true });\n// Props\nconst props = defineProps<Props>();\n// State\nconst selectedStepId = shallowRef<number | undefined>(undefined);\nconst selectedStep = computed(() => {\n return isNil(selectedStepId.value) || isNil(annotation.value)\n ? undefined\n : annotation.value.steps.find((step) => step.id === selectedStepId.value);\n});\n\n// Watchers\neffect(function setDefaultStepId() {\n if (selectedStepId.value === undefined && annotation.value.steps.length > 0) {\n selectedStepId.value = annotation.value.steps[0].id;\n }\n});\n// Hooks\nconst confirmResetSchema = useConfirm({\n title: \"Reset Schema\",\n message: \"Are you sure you want to reset the schema? This action cannot be undone.\",\n confirmLabel: \"Yes, reset\",\n cancelLabel: \"No, cancel\",\n});\n// Actions\nasync function handleDeleteSchema() {\n if (await confirmResetSchema()) {\n selectedStepId.value = undefined;\n props.onDeleteSchema?.();\n }\n}\n</script>\n\n<template>\n <PlSidebarGroup>\n <template #item-0>\n <AnnotationsSidebar\n v-model:annotation=\"annotation\"\n v-model:selectedStepId=\"selectedStepId\"\n :class=\"$style.sidebarItem\"\n :columns=\"props.columns\"\n @delete-schema=\"handleDeleteSchema\"\n />\n </template>\n <template #item-1>\n <FilterSidebar\n v-if=\"selectedStep\"\n v-model:step=\"selectedStep\"\n :class=\"$style.sidebarItem\"\n :columns=\"props.columns\"\n :get-suggest-options=\"props.getSuggestOptions\"\n :selectedStepId=\"selectedStepId\"\n :hasSelectedColumns=\"props.hasSelectedColumns\"\n :getValuesForSelectedColumns=\"props.getValuesForSelectedColumns\"\n />\n </template>\n </PlSidebarGroup>\n</template>\n\n<style module>\n.sidebarItem {\n width: 100%;\n height: 100%;\n}\n</style>\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"PlAnnotations.vue_vue_type_script_setup_true_lang.js","names":["$style"],"sources":["../../../../src/components/PlAnnotations/components/PlAnnotations.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { Props as BaseProps } from \"./FilterSidebar.vue\";\nexport type Props = BaseProps & {\n onDeleteSchema?: () => void;\n};\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, effect, shallowRef } from \"vue\";\n\nimport { isNil } from \"@milaboratories/helpers\";\nimport { PlSidebarGroup, useConfirm } from \"@milaboratories/uikit\";\n\nimport type { Annotation } from \"../types\";\nimport AnnotationsSidebar from \"./AnnotationsSidebar.vue\";\nimport FilterSidebar from \"./FilterSidebar.vue\";\n\n// Models\nconst annotation = defineModel<Annotation>(\"annotation\", { required: true });\n// Props\nconst props = defineProps<Props>();\n// State\nconst selectedStepId = shallowRef<number | undefined>(undefined);\nconst selectedStep = computed(() => {\n return isNil(selectedStepId.value) || isNil(annotation.value)\n ? undefined\n : annotation.value.steps.find((step) => step.id === selectedStepId.value);\n});\n\n// Watchers\neffect(function setDefaultStepId() {\n if (selectedStepId.value === undefined && annotation.value.steps.length > 0) {\n selectedStepId.value = annotation.value.steps[0].id;\n }\n});\n// Hooks\nconst confirmResetSchema = useConfirm({\n title: \"Reset Schema\",\n message: \"Are you sure you want to reset the schema? This action cannot be undone.\",\n confirmLabel: \"Yes, reset\",\n cancelLabel: \"No, cancel\",\n});\n// Actions\nasync function handleDeleteSchema() {\n if (await confirmResetSchema()) {\n selectedStepId.value = undefined;\n props.onDeleteSchema?.();\n }\n}\n</script>\n\n<template>\n <PlSidebarGroup>\n <template #item-0>\n <AnnotationsSidebar\n v-model:annotation=\"annotation\"\n v-model:selectedStepId=\"selectedStepId\"\n :class=\"$style.sidebarItem\"\n :columns=\"props.columns\"\n @delete-schema=\"handleDeleteSchema\"\n />\n </template>\n <template #item-1>\n <FilterSidebar\n v-if=\"selectedStep\"\n v-model:step=\"selectedStep\"\n :class=\"$style.sidebarItem\"\n :columns=\"props.columns\"\n :get-suggest-options=\"props.getSuggestOptions\"\n :selectedStepId=\"selectedStepId\"\n :hasSelectedColumns=\"props.hasSelectedColumns\"\n :getValuesForSelectedColumns=\"props.getValuesForSelectedColumns\"\n />\n </template>\n </PlSidebarGroup>\n</template>\n\n<style module>\n.sidebarItem {\n width: 100%;\n height: 100%;\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;EAkBA,IAAM,IAAa,EAAuB,GAAC,aAAiC,EAEtE,IAAQ,GAER,IAAiB,EAA+B,KAAA,EAAU,EAC1D,IAAe,QACZ,EAAM,EAAe,MAAM,IAAI,EAAM,EAAW,MAAK,GACxD,KAAA,IACA,EAAW,MAAM,MAAM,MAAM,MAAS,EAAK,OAAO,EAAe,MAAM,CAC3E;AAGF,IAAO,WAA4B;AACjC,GAAI,EAAe,UAAU,KAAA,KAAa,EAAW,MAAM,MAAM,SAAS,MACxE,EAAe,QAAQ,EAAW,MAAM,MAAM,GAAG;IAEnD;EAEF,IAAM,IAAqB,EAAW;GACpC,OAAO;GACP,SAAS;GACT,cAAc;GACd,aAAa;GACd,CAAC;EAEF,eAAe,IAAqB;AAClC,GAAI,MAAM,GAAoB,KAC5B,EAAe,QAAQ,KAAA,GACvB,EAAM,kBAAkB;;yBAM1B,EAsBiB,EAAA,EAAA,EAAA,MAAA;GArBJ,UAAM,QAOb,CANF,EAME,GAAA;IALQ,YAAY,EAAA;6CAAU,QAAA;IACtB,gBAAgB,EAAA;iDAAc,QAAA;IACrC,OAAK,EAAEA,EAAAA,OAAO,YAAW;IACzB,SAAS,EAAM;IACf,gBAAe;;;;;;;GAGT,UAAM,QAWH,CATJ,EAAA,SAAA,GAAA,EADR,EASE,GAAA;;IAPQ,MAAM,EAAA;uCAAY,QAAA;IACzB,OAAK,EAAEA,EAAAA,OAAO,YAAW;IACzB,SAAS,EAAM;IACf,uBAAqB,EAAM;IAC3B,gBAAgB,EAAA;IAChB,oBAAoB,EAAM;IAC1B,6BAA6B,EAAM"}
|
|
@@ -2,6 +2,7 @@ import e from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
|
2
2
|
import t from "./PlAnnotationsModal.vue2.js";
|
|
3
3
|
import n from "./PlAnnotationsModal.style.js";
|
|
4
4
|
var r = /* @__PURE__ */ e(t, [["__cssModules", { $style: n }]]);
|
|
5
|
+
//#endregion
|
|
5
6
|
export { r as default };
|
|
6
7
|
|
|
7
8
|
//# sourceMappingURL=PlAnnotationsModal.js.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import e from "./PlAnnotations.js";
|
|
2
2
|
import { createBlock as t, createVNode as n, defineComponent as r, effect as i, mergeModels as a, normalizeClass as o, openBlock as s, shallowRef as c, unref as l, useModel as u, withCtx as d } from "vue";
|
|
3
3
|
import { PlPureSlideModal as f } from "@milaboratories/uikit";
|
|
4
|
+
//#region src/components/PlAnnotations/components/PlAnnotationsModal.vue?vue&type=script&setup=true&lang.ts
|
|
4
5
|
var p = /* @__PURE__ */ r({
|
|
5
6
|
__name: "PlAnnotationsModal",
|
|
6
7
|
props: /* @__PURE__ */ a({
|
|
@@ -54,6 +55,7 @@ var p = /* @__PURE__ */ r({
|
|
|
54
55
|
}, 8, ["modelValue", "class"]));
|
|
55
56
|
}
|
|
56
57
|
});
|
|
58
|
+
//#endregion
|
|
57
59
|
export { p as default };
|
|
58
60
|
|
|
59
61
|
//# 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\";\nimport { effect, shallowRef } from \"vue\";\n\nimport type { Annotation } from \"../types\";\nimport type { Props } from \"./PlAnnotations.vue\";\nimport PlAnnotations from \"./PlAnnotations.vue\";\n\n// Models\nconst annotation = defineModel<Annotation>(\"annotation\", { required: true });\nconst opened = defineModel<boolean>(\"opened\", { required: true });\n// Props\nconst props = defineProps<Props>();\n// State\nconst selectedStepId = shallowRef<number | undefined>(undefined);\n// Watchers\neffect(function setDefaultStepId() {\n if (selectedStepId.value === undefined && annotation.value.steps.length > 0) {\n selectedStepId.value = annotation.value.steps[0].id;\n }\n});\n// Actions\nasync function handleDeleteSchema() {\n opened.value = false;\n props.onDeleteSchema?.();\n}\n</script>\n\n<template>\n <PlPureSlideModal v-model=\"opened\" :class=\"$style.modal\" width=\"768px\">\n <PlAnnotations\n v-model:annotation=\"annotation\"\n :class=\"$style.content\"\n :columns=\"props.columns\"\n :get-suggest-options=\"props.getSuggestOptions\"\n :has-selected-columns=\"props.hasSelectedColumns\"\n :getValuesForSelectedColumns=\"props.getValuesForSelectedColumns\"\n @delete-schema=\"handleDeleteSchema\"\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_script_setup_true_lang.js","names":["$style"],"sources":["../../../../src/components/PlAnnotations/components/PlAnnotationsModal.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { PlPureSlideModal } from \"@milaboratories/uikit\";\nimport { effect, shallowRef } from \"vue\";\n\nimport type { Annotation } from \"../types\";\nimport type { Props } from \"./PlAnnotations.vue\";\nimport PlAnnotations from \"./PlAnnotations.vue\";\n\n// Models\nconst annotation = defineModel<Annotation>(\"annotation\", { required: true });\nconst opened = defineModel<boolean>(\"opened\", { required: true });\n// Props\nconst props = defineProps<Props>();\n// State\nconst selectedStepId = shallowRef<number | undefined>(undefined);\n// Watchers\neffect(function setDefaultStepId() {\n if (selectedStepId.value === undefined && annotation.value.steps.length > 0) {\n selectedStepId.value = annotation.value.steps[0].id;\n }\n});\n// Actions\nasync function handleDeleteSchema() {\n opened.value = false;\n props.onDeleteSchema?.();\n}\n</script>\n\n<template>\n <PlPureSlideModal v-model=\"opened\" :class=\"$style.modal\" width=\"768px\">\n <PlAnnotations\n v-model:annotation=\"annotation\"\n :class=\"$style.content\"\n :columns=\"props.columns\"\n :get-suggest-options=\"props.getSuggestOptions\"\n :has-selected-columns=\"props.hasSelectedColumns\"\n :getValuesForSelectedColumns=\"props.getValuesForSelectedColumns\"\n @delete-schema=\"handleDeleteSchema\"\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":";;;;;;;;;;;;;;;;;;;;;;;EASA,IAAM,IAAa,EAAuB,GAAC,aAAiC,EACtE,IAAS,EAAoB,GAAC,SAA6B,EAE3D,IAAQ,GAER,IAAiB,EAA+B,KAAA,EAAU;AAEhE,IAAO,WAA4B;AACjC,GAAI,EAAe,UAAU,KAAA,KAAa,EAAW,MAAM,MAAM,SAAS,MACxE,EAAe,QAAQ,EAAW,MAAM,MAAM,GAAG;IAEnD;EAEF,eAAe,IAAqB;AAElC,GADA,EAAO,QAAQ,IACf,EAAM,kBAAkB;;yBAKxB,EAUmB,EAAA,EAAA,EAAA;eAVQ,EAAA;4CAAM,QAAA;GAAG,OAAK,EAAEA,EAAAA,OAAO,MAAK;GAAE,OAAM;;oBAS3D,CARF,EAQE,GAAA;IAPQ,YAAY,EAAA;6CAAU,QAAA;IAC7B,OAAK,EAAEA,EAAAA,OAAO,QAAO;IACrB,SAAS,EAAM;IACf,uBAAqB,EAAM;IAC3B,wBAAsB,EAAM;IAC5B,6BAA6B,EAAM;IACnC,gBAAe"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
//#region src/components/PlAnnotations/utils.ts
|
|
1
2
|
var e = /^[a-zA-Z0-9\s!@#$%^*()_+\-=[\]{}|;:'",.?]*$/;
|
|
2
3
|
function t(t) {
|
|
3
4
|
if (!e.test(t)) throw Error("Title contains forbidden symbols");
|
|
4
5
|
}
|
|
6
|
+
//#endregion
|
|
5
7
|
export { t as validateTitle };
|
|
6
8
|
|
|
7
9
|
//# 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":[],"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,6 +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
5
|
var y = { class: "pl-app-notification-alert" }, b = { class: "pl-app-notification-alert__content" }, x = { class: "pl-app-notification-alert__title" }, S = /* @__PURE__ */ o({
|
|
5
6
|
__name: "PlAppErrorNotificationAlert",
|
|
6
7
|
props: { errors: {} },
|
|
@@ -52,6 +53,7 @@ var y = { class: "pl-app-notification-alert" }, b = { class: "pl-app-notificatio
|
|
|
52
53
|
}, 8, ["modelValue"])]));
|
|
53
54
|
}
|
|
54
55
|
});
|
|
56
|
+
//#endregion
|
|
55
57
|
export { S as default };
|
|
56
58
|
|
|
57
59
|
//# 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 class=\"pl-app-notification-alert\">\n <PlDialogModal v-model=\"isModalOpen\" width=\"720px\" style=\"max-height: 100vh\">\n <template #title> Errors </template>\n <div class=\"pl-app-notification-alert__content\">\n <template v-for=\"item in existingErrors\" :key=\"item[0]\">\n <div class=\"pl-app-notification-alert__item\">\n <div class=\"pl-app-notification-alert__title\">Block output: {{ item[0] }}</div>\n <PlLogView\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 v-model=\"isAlertOpen\" type=\"error\" closable>\n Some outputs have errors.\n <template #actions>\n <PlBtnPrimary icon=\"arrow-right\" @click=\"showErrors\">See errors</PlBtnPrimary>\n <PlSpacer />\n </template>\n </PlNotificationAlert>\n </div>\n</template>\n"],"mappings":"
|
|
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 class=\"pl-app-notification-alert\">\n <PlDialogModal v-model=\"isModalOpen\" width=\"720px\" style=\"max-height: 100vh\">\n <template #title> Errors </template>\n <div class=\"pl-app-notification-alert__content\">\n <template v-for=\"item in existingErrors\" :key=\"item[0]\">\n <div class=\"pl-app-notification-alert__item\">\n <div class=\"pl-app-notification-alert__title\">Block output: {{ item[0] }}</div>\n <PlLogView\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 v-model=\"isAlertOpen\" type=\"error\" closable>\n Some outputs have errors.\n <template #actions>\n <PlBtnPrimary icon=\"arrow-right\" @click=\"showErrors\">See errors</PlBtnPrimary>\n <PlSpacer />\n </template>\n </PlNotificationAlert>\n </div>\n</template>\n"],"mappings":";;;;;;;;EAgBA,IAAM,IAAQ,GAER,IAAc,EAAI,GAAM,EAExB,IAAc,EAAI,GAAK,EAEvB,IAAiB,QAAe,OAAO,QAAQ,EAAM,OAAO,CAAC,QAAQ,MAAS,CAAC,CAAC,EAAK,GAAG,CAAC;EAE/F,SAAS,IAAa;AACpB,KAAY,QAAQ;;SAItB,QACQ,EAAM,SACX,MAAW;AACV,KAAY,QAAQ,OAAO,OAAO,EAAO,CAAC,MAAM,MAAM,CAAC,CAAC,EAAE;KAE5D;GAAE,WAAW;GAAM,MAAM;GAAM,CAChC,kBAGC,EA4BM,OA5BN,GA4BM,CA3BJ,EAkBgB,EAAA,EAAA,EAAA;eAlBQ,EAAA;4CAAW,QAAA;GAAE,OAAM;GAAQ,OAAA,EAAA,cAAA,SAAyB;;GAC/D,OAAK,QAAS,CAAA,GAAA,AAAA,EAAA,OAAA,CAAA,EAAR,YAAQ,GAAA,CAAA,CAAA,CAAA;oBAgBnB,CAfN,EAeM,OAfN,GAeM,EAAA,EAAA,GAAA,EAdJ,EAaW,GAAA,MAAA,EAbc,EAAA,QAAR,YACf,EAWM,OAAA;SAZuC,EAAI;IAC5C,OAAM;OACT,EAA+E,OAA/E,GAA8C,mBAAc,EAAG,EAAI,GAAA,EAAA,EAAA,EACnE,EAQE,EAAA,EAAA,EAAA;IAPC,OAAO,EAAI,IAAK;IAChB,aAAA,kBAAgD,EAAI,MAAA,EAAA,IAAgC,EAAI,GAA+B,cAAgC,EAAI,IAAK;IAKhK,qBAAiB,UAAY,EAAI,GAAA;;;;;;;yBAO5C,EAMsB,EAAA,EAAA,EAAA;eANQ,EAAA;4CAAW,QAAA;GAAE,MAAK;GAAQ,UAAA;;GAE3C,SAAO,QAC8D,CAA9E,EAA8E,EAAA,EAAA,EAAA;IAAhE,MAAK;IAAe,SAAO;;qBAAsB,CAAA,GAAA,AAAA,EAAA,OAAA,CAAA,EAAV,cAAU,GAAA,CAAA,CAAA,CAAA;;OAC/D,EAAY,EAAA,EAAA,CAAA,CAAA,CAAA;oBAFd,CAAA,AAAA,EAAA,OAAA,EAF+D,+BAE/D,GAAA,CAAA,CAAA"}
|
|
@@ -2,6 +2,7 @@ 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
4
|
var r = /* @__PURE__ */ e(t, [["__cssModules", { $style: n }]]);
|
|
5
|
+
//#endregion
|
|
5
6
|
export { r as default };
|
|
6
7
|
|
|
7
8
|
//# sourceMappingURL=Item.js.map
|
|
@@ -1,6 +1,7 @@
|
|
|
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
|
|
4
5
|
var l = /* @__PURE__ */ i({
|
|
5
6
|
__name: "Item",
|
|
6
7
|
props: { item: {} },
|
|
@@ -24,6 +25,7 @@ var l = /* @__PURE__ */ i({
|
|
|
24
25
|
}, "Pending", 2))], 2));
|
|
25
26
|
}
|
|
26
27
|
});
|
|
28
|
+
//#endregion
|
|
27
29
|
export { l as default };
|
|
28
30
|
|
|
29
31
|
//# 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 :class=\"$style.item\">\n <div :class=\"$style.name\">{{ item.fileName }}</div>\n <div v-if=\"item.status === 'in-progress'\" :class=\"$style.details\">\n <span>{{ prettyBytes(item.current, {}) }}</span>\n <span>/</span>\n <span>{{ prettyBytes(item.size, {}) }}</span>\n </div>\n <div v-else-if=\"item.status === 'completed'\" :class=\"$style.details\">\n Done <span>{{ prettyBytes(item.size, {}) }}</span>\n </div>\n <div v-else-if=\"item.status === 'error'\" :class=\"$style.error\">\n <span>{{ item.error }}</span>\n </div>\n <div v-else :class=\"$style.details\">Pending</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_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 :class=\"$style.item\">\n <div :class=\"$style.name\">{{ item.fileName }}</div>\n <div v-if=\"item.status === 'in-progress'\" :class=\"$style.details\">\n <span>{{ prettyBytes(item.current, {}) }}</span>\n <span>/</span>\n <span>{{ prettyBytes(item.size, {}) }}</span>\n </div>\n <div v-else-if=\"item.status === 'completed'\" :class=\"$style.details\">\n Done <span>{{ prettyBytes(item.size, {}) }}</span>\n </div>\n <div v-else-if=\"item.status === 'error'\" :class=\"$style.error\">\n <span>{{ item.error }}</span>\n </div>\n <div v-else :class=\"$style.details\">Pending</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,EAcM,OAAA,EAdA,OAAK,EAAEA,EAAAA,OAAO,KAAI,EAAA,EAAA,CACtB,EAAmD,OAAA,EAA7C,OAAK,EAAEA,EAAAA,OAAO,KAAI,EAAA,EAAA,EAAK,EAAA,KAAK,SAAQ,EAAA,EAAA,EAC/B,EAAA,KAAK,WAAM,iBAAA,GAAA,EAAtB,EAIM,OAAA;;GAJqC,OAAK,EAAEA,EAAAA,OAAO,QAAO;;GAC9D,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;WAEhB,EAAA,KAAK,WAAM,eAAA,GAAA,EAA3B,EAEM,OAAA;;GAFwC,OAAK,EAAEA,EAAAA,OAAO,QAAO;iBAAE,UAC9D,GAAA,EAAA,EAA6C,QAAA,MAAA,EAApC,EAAA,EAAW,CAAC,EAAA,KAAK,MAAI,EAAA,CAAA,CAAA,EAAA,EAAA,CAAA,EAAA,EAAA,IAErB,EAAA,KAAK,WAAM,WAAA,GAAA,EAA3B,EAEM,OAAA;;GAFoC,OAAK,EAAEA,EAAAA,OAAO,MAAK;MAC3D,EAA6B,QAAA,MAAA,EAApB,EAAA,KAAK,MAAK,EAAA,EAAA,CAAA,EAAA,EAAA,KAAA,GAAA,EAErB,EAAiD,OAAA;;GAApC,OAAK,EAAEA,EAAAA,OAAO,QAAO;KAAE,WAAO,EAAA,EAAA,EAAA,EAAA"}
|
|
@@ -2,6 +2,7 @@ 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
4
|
var r = /* @__PURE__ */ e(t, [["__cssModules", { $style: n }]]);
|
|
5
|
+
//#endregion
|
|
5
6
|
export { r as default };
|
|
6
7
|
|
|
7
8
|
//# sourceMappingURL=PlBtnExportArchive.js.map
|
|
@@ -6,6 +6,7 @@ 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
|
|
9
10
|
var k = /* @__PURE__ */ d({
|
|
10
11
|
__name: "PlBtnExportArchive",
|
|
11
12
|
props: {
|
|
@@ -157,6 +158,7 @@ var k = /* @__PURE__ */ d({
|
|
|
157
158
|
], 2)) : s("", !0)]))], 64));
|
|
158
159
|
}
|
|
159
160
|
});
|
|
161
|
+
//#endregion
|
|
160
162
|
export { k as default };
|
|
161
163
|
|
|
162
164
|
//# 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 :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 v-if=\"data.exports && data.showExports\" ref=\"progressesRef\" :class=\"$style.progresses\">\n <PlIcon16 :class=\"$style.close\" name=\"close\" @click.stop=\"data.showExports = false\" />\n <Summary :item=\"archive\" />\n <div :class=\"$style.itemsContainer\" class=\"pl-scrollable-y\">\n <Item v-for=\"item in data.exports?.values()\" :key=\"item.fileName\" :item=\"item\" />\n </div>\n </div>\n </Teleport>\n</template>\n\n<style module>\n.progresses {\n position: fixed;\n top: 8px;\n right: 8px;\n width: 350px;\n height: auto;\n max-height: 400px;\n overflow: auto;\n background: rgba(0, 0, 0, 0.85);\n border-radius: 8px;\n padding: 20px 8px 8px 20px;\n color: white;\n font-size: 12px;\n font-weight: 600;\n z-index: 1000;\n\n .itemsContainer {\n max-height: 300px;\n }\n\n .close {\n position: absolute;\n top: 8px;\n right: 8px;\n cursor: pointer;\n --icon-color: white;\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;EAgBA,IAAM,IAAQ,GAgBR,IAAO,EAPc;GACzB,SAAS;GACT,MAAM;GACN,SAAS,KAAA;GACT,aAAa;GACd,CAEmC,EAE9B,KAAqB,GAAY,MAAiC;GACtE,IAAM,IAAK,EAAK,SAAS,IAAI,EAAG;AAChC,GAAI,KACF,EAAK,SAAS,IAAI,GAAI;IAAE,GAAG;IAAI,GAAG;IAAS,CAAC;KAI1C,IAAkB,QACf,EAAM,gBAAgB,KAAA,KAAa,CAAC,EAAM,SACjD,EAEI,IAAQ,QACL,MAAM,KAAK,EAAK,SAAS,QAAQ,IAAI,EAAE,CAAC,CAC/C,EAEI,IAAU,SACP;GACL,UAAU,EAAK;GACf,SAAS,EAAM,MAAM,QAAQ,GAAK,MAAS,IAAM,EAAK,SAAS,EAAE;GACjE,MAAM,EAAM,MAAM,QAAQ,GAAK,MAAS,IAAM,EAAK,MAAM,EAAE;GAC3D,QAAQ,EAAM,MAAM,MAAM,MAAS,EAAK,WAAW,cAAa,GAC5D,gBACA,EAAM,MAAM,OAAO,MAAS,EAAK,WAAW,YAAW,GACrD,cACA;GACN,WAAW,EAAM,MA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AAA,EAAhC,EAMM,OAAA;;YAN2C;GAAJ,KAAI;GAAiB,OAAK,EAAEA,EAAAA,OAAO,WAAU;;GACxF,EAAsF,EAAA,EAAA,EAAA;IAA3E,OAAK,EAAEA,EAAAA,OAAO,MAAK;IAAE,MAAK;IAAS,SAAK,AAAA,EAAA,OAAA,GAAA,MAAO,EAAK,cAAW,IAAA,CAAA,OAAA,CAAA;;GAC1E,EAA2B,GAAA,EAAjB,MAAM,EAAA,OAAO,EAAA,MAAA,GAAA,CAAA,OAAA,CAAA;GACvB,EAEM,OAAA,EAFA,OAAK,EAAA,CAAEA,EAAAA,OAAO,gBAAsB,kBAAiB,CAAA,EAAA,EAAA,EAAA,EAAA,GAAA,EACzD,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"],"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 :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 v-if=\"data.exports && data.showExports\" ref=\"progressesRef\" :class=\"$style.progresses\">\n <PlIcon16 :class=\"$style.close\" name=\"close\" @click.stop=\"data.showExports = false\" />\n <Summary :item=\"archive\" />\n <div :class=\"$style.itemsContainer\" class=\"pl-scrollable-y\">\n <Item v-for=\"item in data.exports?.values()\" :key=\"item.fileName\" :item=\"item\" />\n </div>\n </div>\n </Teleport>\n</template>\n\n<style module>\n.progresses {\n position: fixed;\n top: 8px;\n right: 8px;\n width: 350px;\n height: auto;\n max-height: 400px;\n overflow: auto;\n background: rgba(0, 0, 0, 0.85);\n border-radius: 8px;\n padding: 20px 8px 8px 20px;\n color: white;\n font-size: 12px;\n font-weight: 600;\n z-index: 1000;\n\n .itemsContainer {\n max-height: 300px;\n }\n\n .close {\n position: absolute;\n top: 8px;\n right: 8px;\n cursor: pointer;\n --icon-color: white;\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;EAgBA,IAAM,IAAQ,GAgBR,IAAO,EAPc;GACzB,SAAS;GACT,MAAM;GACN,SAAS,KAAA;GACT,aAAa;GACd,CAEmC,EAE9B,KAAqB,GAAY,MAAiC;GACtE,IAAM,IAAK,EAAK,SAAS,IAAI,EAAG;AAChC,GAAI,KACF,EAAK,SAAS,IAAI,GAAI;IAAE,GAAG;IAAI,GAAG;IAAS,CAAC;KAI1C,IAAkB,QACf,EAAM,gBAAgB,KAAA,KAAa,CAAC,EAAM,SACjD,EAEI,IAAQ,QACL,MAAM,KAAK,EAAK,SAAS,QAAQ,IAAI,EAAE,CAAC,CAC/C,EAEI,IAAU,SACP;GACL,UAAU,EAAK;GACf,SAAS,EAAM,MAAM,QAAQ,GAAK,MAAS,IAAM,EAAK,SAAS,EAAE;GACjE,MAAM,EAAM,MAAM,QAAQ,GAAK,MAAS,IAAM,EAAK,MAAM,EAAE;GAC3D,QAAQ,EAAM,MAAM,MAAM,MAAS,EAAK,WAAW,cAAa,GAC5D,gBACA,EAAM,MAAM,OAAO,MAAS,EAAK,WAAW,YAAW,GACrD,cACA;GACN,WAAW,EAAM,MAAM,MAAM,MAAS,EAAK,WAAW,QAAQ;GAC/D,EACD,EASI,IAAgB,YAAY;AAChC,OAAI,EAAK,SAAS;AAChB,MAAK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EAAA,EAAA,EAAA;IAA3E,OAAK,EAAEA,EAAAA,OAAO,MAAK;IAAE,MAAK;IAAS,SAAK,AAAA,EAAA,OAAA,GAAA,MAAO,EAAK,cAAW,IAAA,CAAA,OAAA,CAAA;;GAC1E,EAA2B,GAAA,EAAjB,MAAM,EAAA,OAAO,EAAA,MAAA,GAAA,CAAA,OAAA,CAAA;GACvB,EAEM,OAAA,EAFA,OAAK,EAAA,CAAEA,EAAAA,OAAO,gBAAsB,kBAAiB,CAAA,EAAA,EAAA,EAAA,EAAA,GAAA,EACzD,EAAiF,GAAA,MAAA,EAA5D,EAAK,SAAS,QAAM,GAA5B,YAAb,EAAiF,GAAA;IAAnC,KAAK,EAAK;IAAiB"}
|
|
@@ -2,6 +2,7 @@ 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
4
|
var r = /* @__PURE__ */ e(t, [["__cssModules", { $style: n }]]);
|
|
5
|
+
//#endregion
|
|
5
6
|
export { r as default };
|
|
6
7
|
|
|
7
8
|
//# sourceMappingURL=Summary.js.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { prettyBytes as e } from "../../lib/util/helpers/dist/prettyBytes.js";
|
|
2
2
|
import "../../lib/util/helpers/dist/index.js";
|
|
3
3
|
import { createCommentVNode as t, createElementBlock as n, createElementVNode as r, createTextVNode as i, defineComponent as a, normalizeClass as o, openBlock as s, toDisplayString as c, unref as l } from "vue";
|
|
4
|
+
//#region src/components/PlBtnExportArchive/Summary.vue?vue&type=script&setup=true&lang.ts
|
|
4
5
|
var u = /* @__PURE__ */ a({
|
|
5
6
|
__name: "Summary",
|
|
6
7
|
props: { item: {} },
|
|
@@ -22,6 +23,7 @@ var u = /* @__PURE__ */ a({
|
|
|
22
23
|
}, "Pending", 2))], 2));
|
|
23
24
|
}
|
|
24
25
|
});
|
|
26
|
+
//#endregion
|
|
25
27
|
export { u as default };
|
|
26
28
|
|
|
27
29
|
//# sourceMappingURL=Summary.vue2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Summary.vue_vue_type_script_setup_true_lang.js","names":["$style"],"sources":["../../../src/components/PlBtnExportArchive/Summary.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { ExportItem } from \"./types\";\nimport { prettyBytes } from \"@milaboratories/helpers\";\n\ndefineProps<{\n item: ExportItem;\n}>();\n\nconst emit = defineEmits<{\n (e: \"cancel\"): void;\n}>();\n</script>\n\n<template>\n <div :class=\"$style.summary\">\n <div :class=\"$style.name\">\n {{ item.fileName }}<span v-if=\"false\" @click.stop=\"emit('cancel')\">[TODO: Cancel]</span>\n </div>\n <div v-if=\"item.status === 'in-progress'\" :class=\"$style.details\">\n <span>{{ prettyBytes(item.current, {}) }}</span>\n <span>/</span>\n <span>{{ prettyBytes(item.size, {}) }}</span>\n </div>\n <div v-else-if=\"item.status === 'completed'\" :class=\"$style.details\">\n Done <span>{{ prettyBytes(item.size, {}) }}</span>\n </div>\n <div v-else :class=\"$style.details\">Pending</div>\n </div>\n</template>\n\n<style module>\n.summary {\n display: flex;\n flex-direction: column;\n margin-bottom: 8px;\n border-bottom: 1px solid rgba(255, 255, 255, 0.1);\n padding-bottom: 8px;\n --name-font-size: 14px;\n --details-font-size: 12px;\n}\n\n.name {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: var(--name-font-size);\n font-weight: 600;\n}\n.details {\n font-size: var(--details-font-size);\n font-weight: 400;\n color: rgba(255, 255, 255, 0.6);\n}\n</style>\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Summary.vue_vue_type_script_setup_true_lang.js","names":["$style"],"sources":["../../../src/components/PlBtnExportArchive/Summary.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport type { ExportItem } from \"./types\";\nimport { prettyBytes } from \"@milaboratories/helpers\";\n\ndefineProps<{\n item: ExportItem;\n}>();\n\nconst emit = defineEmits<{\n (e: \"cancel\"): void;\n}>();\n</script>\n\n<template>\n <div :class=\"$style.summary\">\n <div :class=\"$style.name\">\n {{ item.fileName }}<span v-if=\"false\" @click.stop=\"emit('cancel')\">[TODO: Cancel]</span>\n </div>\n <div v-if=\"item.status === 'in-progress'\" :class=\"$style.details\">\n <span>{{ prettyBytes(item.current, {}) }}</span>\n <span>/</span>\n <span>{{ prettyBytes(item.size, {}) }}</span>\n </div>\n <div v-else-if=\"item.status === 'completed'\" :class=\"$style.details\">\n Done <span>{{ prettyBytes(item.size, {}) }}</span>\n </div>\n <div v-else :class=\"$style.details\">Pending</div>\n </div>\n</template>\n\n<style module>\n.summary {\n display: flex;\n flex-direction: column;\n margin-bottom: 8px;\n border-bottom: 1px solid rgba(255, 255, 255, 0.1);\n padding-bottom: 8px;\n --name-font-size: 14px;\n --details-font-size: 12px;\n}\n\n.name {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: var(--name-font-size);\n font-weight: 600;\n}\n.details {\n font-size: var(--details-font-size);\n font-weight: 400;\n color: rgba(255, 255, 255, 0.6);\n}\n</style>\n"],"mappings":";;;;;;;;;yBAcE,EAaM,OAAA,EAbA,OAAK,EAAEA,EAAAA,OAAO,QAAO,EAAA,EAAA,CACzB,EAEM,OAAA,EAFA,OAAK,EAAEA,EAAAA,OAAO,KAAI,EAAA,EAAA,CAAA,EAAA,EACnB,EAAA,KAAK,SAAQ,EAAA,EAAA,EAAA,EAAA,IAAA,GAAA,CAAA,EAAA,EAAA,EAEP,EAAA,KAAK,WAAM,iBAAA,GAAA,EAAtB,EAIM,OAAA;;GAJqC,OAAK,EAAEA,EAAAA,OAAO,QAAO;;GAC9D,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;WAEhB,EAAA,KAAK,WAAM,eAAA,GAAA,EAA3B,EAEM,OAAA;;GAFwC,OAAK,EAAEA,EAAAA,OAAO,QAAO;iBAAE,UAC9D,GAAA,EAAA,EAA6C,QAAA,MAAA,EAApC,EAAA,EAAW,CAAC,EAAA,KAAK,MAAI,EAAA,CAAA,CAAA,EAAA,EAAA,CAAA,EAAA,EAAA,KAAA,GAAA,EAErC,EAAiD,OAAA;;GAApC,OAAK,EAAEA,EAAAA,OAAO,QAAO;KAAE,WAAO,EAAA,EAAA,EAAA,EAAA"}
|