mirror of
https://github.com/sharevb/it-tools.git
synced 2026-12-03 18:10:44 +03:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7d5e8be848 |
No files matched your search
@@ -286,9 +286,6 @@
|
|||||||
"watchTriggerable": true,
|
"watchTriggerable": true,
|
||||||
"watchWithFilter": true,
|
"watchWithFilter": true,
|
||||||
"whenever": true,
|
"whenever": true,
|
||||||
"toValue": true,
|
"toValue": true
|
||||||
"injectLocal": true,
|
|
||||||
"provideLocal": true,
|
|
||||||
"useClipboardItems": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6,10 +6,6 @@
|
|||||||
|
|
||||||
Useful tools for developer and people working in IT. [Have a look !](https://it-tools.tech).
|
Useful tools for developer and people working in IT. [Have a look !](https://it-tools.tech).
|
||||||
|
|
||||||
## Sponsors
|
|
||||||
|
|
||||||
[](https://renderize.tech?utm_source=it-tools&utm_medium=readme)
|
|
||||||
|
|
||||||
## Functionalities and roadmap
|
## Functionalities and roadmap
|
||||||
|
|
||||||
Please check the [issues](https://github.com/CorentinTh/it-tools/issues) to see if some feature listed to be implemented.
|
Please check the [issues](https://github.com/CorentinTh/it-tools/issues) to see if some feature listed to be implemented.
|
||||||
|
|||||||
Vendored
-9
@@ -36,7 +36,6 @@ declare global {
|
|||||||
const h: typeof import('vue')['h']
|
const h: typeof import('vue')['h']
|
||||||
const ignorableWatch: typeof import('@vueuse/core')['ignorableWatch']
|
const ignorableWatch: typeof import('@vueuse/core')['ignorableWatch']
|
||||||
const inject: typeof import('vue')['inject']
|
const inject: typeof import('vue')['inject']
|
||||||
const injectLocal: typeof import('@vueuse/core')['injectLocal']
|
|
||||||
const isDefined: typeof import('@vueuse/core')['isDefined']
|
const isDefined: typeof import('@vueuse/core')['isDefined']
|
||||||
const isProxy: typeof import('vue')['isProxy']
|
const isProxy: typeof import('vue')['isProxy']
|
||||||
const isReactive: typeof import('vue')['isReactive']
|
const isReactive: typeof import('vue')['isReactive']
|
||||||
@@ -66,7 +65,6 @@ declare global {
|
|||||||
const onUpdated: typeof import('vue')['onUpdated']
|
const onUpdated: typeof import('vue')['onUpdated']
|
||||||
const pausableWatch: typeof import('@vueuse/core')['pausableWatch']
|
const pausableWatch: typeof import('@vueuse/core')['pausableWatch']
|
||||||
const provide: typeof import('vue')['provide']
|
const provide: typeof import('vue')['provide']
|
||||||
const provideLocal: typeof import('@vueuse/core')['provideLocal']
|
|
||||||
const reactify: typeof import('@vueuse/core')['reactify']
|
const reactify: typeof import('@vueuse/core')['reactify']
|
||||||
const reactifyObject: typeof import('@vueuse/core')['reactifyObject']
|
const reactifyObject: typeof import('@vueuse/core')['reactifyObject']
|
||||||
const reactive: typeof import('vue')['reactive']
|
const reactive: typeof import('vue')['reactive']
|
||||||
@@ -130,7 +128,6 @@ declare global {
|
|||||||
const useBrowserLocation: typeof import('@vueuse/core')['useBrowserLocation']
|
const useBrowserLocation: typeof import('@vueuse/core')['useBrowserLocation']
|
||||||
const useCached: typeof import('@vueuse/core')['useCached']
|
const useCached: typeof import('@vueuse/core')['useCached']
|
||||||
const useClipboard: typeof import('@vueuse/core')['useClipboard']
|
const useClipboard: typeof import('@vueuse/core')['useClipboard']
|
||||||
const useClipboardItems: typeof import('@vueuse/core')['useClipboardItems']
|
|
||||||
const useCloned: typeof import('@vueuse/core')['useCloned']
|
const useCloned: typeof import('@vueuse/core')['useCloned']
|
||||||
const useColorMode: typeof import('@vueuse/core')['useColorMode']
|
const useColorMode: typeof import('@vueuse/core')['useColorMode']
|
||||||
const useConfirmDialog: typeof import('@vueuse/core')['useConfirmDialog']
|
const useConfirmDialog: typeof import('@vueuse/core')['useConfirmDialog']
|
||||||
@@ -329,7 +326,6 @@ declare module 'vue' {
|
|||||||
readonly h: UnwrapRef<typeof import('vue')['h']>
|
readonly h: UnwrapRef<typeof import('vue')['h']>
|
||||||
readonly ignorableWatch: UnwrapRef<typeof import('@vueuse/core')['ignorableWatch']>
|
readonly ignorableWatch: UnwrapRef<typeof import('@vueuse/core')['ignorableWatch']>
|
||||||
readonly inject: UnwrapRef<typeof import('vue')['inject']>
|
readonly inject: UnwrapRef<typeof import('vue')['inject']>
|
||||||
readonly injectLocal: UnwrapRef<typeof import('@vueuse/core')['injectLocal']>
|
|
||||||
readonly isDefined: UnwrapRef<typeof import('@vueuse/core')['isDefined']>
|
readonly isDefined: UnwrapRef<typeof import('@vueuse/core')['isDefined']>
|
||||||
readonly isProxy: UnwrapRef<typeof import('vue')['isProxy']>
|
readonly isProxy: UnwrapRef<typeof import('vue')['isProxy']>
|
||||||
readonly isReactive: UnwrapRef<typeof import('vue')['isReactive']>
|
readonly isReactive: UnwrapRef<typeof import('vue')['isReactive']>
|
||||||
@@ -359,7 +355,6 @@ declare module 'vue' {
|
|||||||
readonly onUpdated: UnwrapRef<typeof import('vue')['onUpdated']>
|
readonly onUpdated: UnwrapRef<typeof import('vue')['onUpdated']>
|
||||||
readonly pausableWatch: UnwrapRef<typeof import('@vueuse/core')['pausableWatch']>
|
readonly pausableWatch: UnwrapRef<typeof import('@vueuse/core')['pausableWatch']>
|
||||||
readonly provide: UnwrapRef<typeof import('vue')['provide']>
|
readonly provide: UnwrapRef<typeof import('vue')['provide']>
|
||||||
readonly provideLocal: UnwrapRef<typeof import('@vueuse/core')['provideLocal']>
|
|
||||||
readonly reactify: UnwrapRef<typeof import('@vueuse/core')['reactify']>
|
readonly reactify: UnwrapRef<typeof import('@vueuse/core')['reactify']>
|
||||||
readonly reactifyObject: UnwrapRef<typeof import('@vueuse/core')['reactifyObject']>
|
readonly reactifyObject: UnwrapRef<typeof import('@vueuse/core')['reactifyObject']>
|
||||||
readonly reactive: UnwrapRef<typeof import('vue')['reactive']>
|
readonly reactive: UnwrapRef<typeof import('vue')['reactive']>
|
||||||
@@ -423,7 +418,6 @@ declare module 'vue' {
|
|||||||
readonly useBrowserLocation: UnwrapRef<typeof import('@vueuse/core')['useBrowserLocation']>
|
readonly useBrowserLocation: UnwrapRef<typeof import('@vueuse/core')['useBrowserLocation']>
|
||||||
readonly useCached: UnwrapRef<typeof import('@vueuse/core')['useCached']>
|
readonly useCached: UnwrapRef<typeof import('@vueuse/core')['useCached']>
|
||||||
readonly useClipboard: UnwrapRef<typeof import('@vueuse/core')['useClipboard']>
|
readonly useClipboard: UnwrapRef<typeof import('@vueuse/core')['useClipboard']>
|
||||||
readonly useClipboardItems: UnwrapRef<typeof import('@vueuse/core')['useClipboardItems']>
|
|
||||||
readonly useCloned: UnwrapRef<typeof import('@vueuse/core')['useCloned']>
|
readonly useCloned: UnwrapRef<typeof import('@vueuse/core')['useCloned']>
|
||||||
readonly useColorMode: UnwrapRef<typeof import('@vueuse/core')['useColorMode']>
|
readonly useColorMode: UnwrapRef<typeof import('@vueuse/core')['useColorMode']>
|
||||||
readonly useConfirmDialog: UnwrapRef<typeof import('@vueuse/core')['useConfirmDialog']>
|
readonly useConfirmDialog: UnwrapRef<typeof import('@vueuse/core')['useConfirmDialog']>
|
||||||
@@ -616,7 +610,6 @@ declare module '@vue/runtime-core' {
|
|||||||
readonly h: UnwrapRef<typeof import('vue')['h']>
|
readonly h: UnwrapRef<typeof import('vue')['h']>
|
||||||
readonly ignorableWatch: UnwrapRef<typeof import('@vueuse/core')['ignorableWatch']>
|
readonly ignorableWatch: UnwrapRef<typeof import('@vueuse/core')['ignorableWatch']>
|
||||||
readonly inject: UnwrapRef<typeof import('vue')['inject']>
|
readonly inject: UnwrapRef<typeof import('vue')['inject']>
|
||||||
readonly injectLocal: UnwrapRef<typeof import('@vueuse/core')['injectLocal']>
|
|
||||||
readonly isDefined: UnwrapRef<typeof import('@vueuse/core')['isDefined']>
|
readonly isDefined: UnwrapRef<typeof import('@vueuse/core')['isDefined']>
|
||||||
readonly isProxy: UnwrapRef<typeof import('vue')['isProxy']>
|
readonly isProxy: UnwrapRef<typeof import('vue')['isProxy']>
|
||||||
readonly isReactive: UnwrapRef<typeof import('vue')['isReactive']>
|
readonly isReactive: UnwrapRef<typeof import('vue')['isReactive']>
|
||||||
@@ -646,7 +639,6 @@ declare module '@vue/runtime-core' {
|
|||||||
readonly onUpdated: UnwrapRef<typeof import('vue')['onUpdated']>
|
readonly onUpdated: UnwrapRef<typeof import('vue')['onUpdated']>
|
||||||
readonly pausableWatch: UnwrapRef<typeof import('@vueuse/core')['pausableWatch']>
|
readonly pausableWatch: UnwrapRef<typeof import('@vueuse/core')['pausableWatch']>
|
||||||
readonly provide: UnwrapRef<typeof import('vue')['provide']>
|
readonly provide: UnwrapRef<typeof import('vue')['provide']>
|
||||||
readonly provideLocal: UnwrapRef<typeof import('@vueuse/core')['provideLocal']>
|
|
||||||
readonly reactify: UnwrapRef<typeof import('@vueuse/core')['reactify']>
|
readonly reactify: UnwrapRef<typeof import('@vueuse/core')['reactify']>
|
||||||
readonly reactifyObject: UnwrapRef<typeof import('@vueuse/core')['reactifyObject']>
|
readonly reactifyObject: UnwrapRef<typeof import('@vueuse/core')['reactifyObject']>
|
||||||
readonly reactive: UnwrapRef<typeof import('vue')['reactive']>
|
readonly reactive: UnwrapRef<typeof import('vue')['reactive']>
|
||||||
@@ -710,7 +702,6 @@ declare module '@vue/runtime-core' {
|
|||||||
readonly useBrowserLocation: UnwrapRef<typeof import('@vueuse/core')['useBrowserLocation']>
|
readonly useBrowserLocation: UnwrapRef<typeof import('@vueuse/core')['useBrowserLocation']>
|
||||||
readonly useCached: UnwrapRef<typeof import('@vueuse/core')['useCached']>
|
readonly useCached: UnwrapRef<typeof import('@vueuse/core')['useCached']>
|
||||||
readonly useClipboard: UnwrapRef<typeof import('@vueuse/core')['useClipboard']>
|
readonly useClipboard: UnwrapRef<typeof import('@vueuse/core')['useClipboard']>
|
||||||
readonly useClipboardItems: UnwrapRef<typeof import('@vueuse/core')['useClipboardItems']>
|
|
||||||
readonly useCloned: UnwrapRef<typeof import('@vueuse/core')['useCloned']>
|
readonly useCloned: UnwrapRef<typeof import('@vueuse/core')['useCloned']>
|
||||||
readonly useColorMode: UnwrapRef<typeof import('@vueuse/core')['useColorMode']>
|
readonly useColorMode: UnwrapRef<typeof import('@vueuse/core')['useColorMode']>
|
||||||
readonly useConfirmDialog: UnwrapRef<typeof import('@vueuse/core')['useConfirmDialog']>
|
readonly useConfirmDialog: UnwrapRef<typeof import('@vueuse/core')['useConfirmDialog']>
|
||||||
|
|||||||
Vendored
-8
@@ -130,29 +130,21 @@ declare module '@vue/runtime-core' {
|
|||||||
MetaTagGenerator: typeof import('./src/tools/meta-tag-generator/meta-tag-generator.vue')['default']
|
MetaTagGenerator: typeof import('./src/tools/meta-tag-generator/meta-tag-generator.vue')['default']
|
||||||
MimeTypes: typeof import('./src/tools/mime-types/mime-types.vue')['default']
|
MimeTypes: typeof import('./src/tools/mime-types/mime-types.vue')['default']
|
||||||
NavbarButtons: typeof import('./src/components/NavbarButtons.vue')['default']
|
NavbarButtons: typeof import('./src/components/NavbarButtons.vue')['default']
|
||||||
NButton: typeof import('naive-ui')['NButton']
|
|
||||||
NCheckbox: typeof import('naive-ui')['NCheckbox']
|
NCheckbox: typeof import('naive-ui')['NCheckbox']
|
||||||
NCode: typeof import('naive-ui')['NCode']
|
|
||||||
NCollapseTransition: typeof import('naive-ui')['NCollapseTransition']
|
NCollapseTransition: typeof import('naive-ui')['NCollapseTransition']
|
||||||
NConfigProvider: typeof import('naive-ui')['NConfigProvider']
|
NConfigProvider: typeof import('naive-ui')['NConfigProvider']
|
||||||
NDataTable: typeof import('naive-ui')['NDataTable']
|
|
||||||
NDivider: typeof import('naive-ui')['NDivider']
|
NDivider: typeof import('naive-ui')['NDivider']
|
||||||
NEllipsis: typeof import('naive-ui')['NEllipsis']
|
NEllipsis: typeof import('naive-ui')['NEllipsis']
|
||||||
NFormItem: typeof import('naive-ui')['NFormItem']
|
|
||||||
NH1: typeof import('naive-ui')['NH1']
|
NH1: typeof import('naive-ui')['NH1']
|
||||||
NH3: typeof import('naive-ui')['NH3']
|
NH3: typeof import('naive-ui')['NH3']
|
||||||
NIcon: typeof import('naive-ui')['NIcon']
|
NIcon: typeof import('naive-ui')['NIcon']
|
||||||
NLayout: typeof import('naive-ui')['NLayout']
|
NLayout: typeof import('naive-ui')['NLayout']
|
||||||
NLayoutSider: typeof import('naive-ui')['NLayoutSider']
|
NLayoutSider: typeof import('naive-ui')['NLayoutSider']
|
||||||
NMenu: typeof import('naive-ui')['NMenu']
|
NMenu: typeof import('naive-ui')['NMenu']
|
||||||
NScrollbar: typeof import('naive-ui')['NScrollbar']
|
|
||||||
NSpace: typeof import('naive-ui')['NSpace']
|
NSpace: typeof import('naive-ui')['NSpace']
|
||||||
NTable: typeof import('naive-ui')['NTable']
|
NTable: typeof import('naive-ui')['NTable']
|
||||||
NTabPane: typeof import('naive-ui')['NTabPane']
|
|
||||||
NTabs: typeof import('naive-ui')['NTabs']
|
|
||||||
NumeronymGenerator: typeof import('./src/tools/numeronym-generator/numeronym-generator.vue')['default']
|
NumeronymGenerator: typeof import('./src/tools/numeronym-generator/numeronym-generator.vue')['default']
|
||||||
OtpCodeGeneratorAndValidator: typeof import('./src/tools/otp-code-generator-and-validator/otp-code-generator-and-validator.vue')['default']
|
OtpCodeGeneratorAndValidator: typeof import('./src/tools/otp-code-generator-and-validator/otp-code-generator-and-validator.vue')['default']
|
||||||
ParquetsReader: typeof import('./src/tools/parquets-reader/parquets-reader.vue')['default']
|
|
||||||
PasswordStrengthAnalyser: typeof import('./src/tools/password-strength-analyser/password-strength-analyser.vue')['default']
|
PasswordStrengthAnalyser: typeof import('./src/tools/password-strength-analyser/password-strength-analyser.vue')['default']
|
||||||
PdfSignatureChecker: typeof import('./src/tools/pdf-signature-checker/pdf-signature-checker.vue')['default']
|
PdfSignatureChecker: typeof import('./src/tools/pdf-signature-checker/pdf-signature-checker.vue')['default']
|
||||||
PdfSignatureDetails: typeof import('./src/tools/pdf-signature-checker/components/pdf-signature-details.vue')['default']
|
PdfSignatureDetails: typeof import('./src/tools/pdf-signature-checker/components/pdf-signature-details.vue')['default']
|
||||||
|
|||||||
@@ -68,8 +68,6 @@
|
|||||||
"figue": "^1.2.0",
|
"figue": "^1.2.0",
|
||||||
"fuse.js": "^6.6.2",
|
"fuse.js": "^6.6.2",
|
||||||
"highlight.js": "^11.7.0",
|
"highlight.js": "^11.7.0",
|
||||||
"hyparquet": "^1.9.0",
|
|
||||||
"hyparquet-compressors": "^1.0.0",
|
|
||||||
"iarna-toml-esm": "^3.0.5",
|
"iarna-toml-esm": "^3.0.5",
|
||||||
"ibantools": "^4.3.3",
|
"ibantools": "^4.3.3",
|
||||||
"js-base64": "^3.7.6",
|
"js-base64": "^3.7.6",
|
||||||
|
|||||||
Generated
+8479
-6596
File diff suppressed because it is too large.
Load diff
@@ -128,7 +128,7 @@ function activateOption(option: PaletteOption) {
|
|||||||
<c-input-text ref="inputRef" v-model:value="searchPrompt" raw-text placeholder="Type to search a tool or a command..." autofocus clearable />
|
<c-input-text ref="inputRef" v-model:value="searchPrompt" raw-text placeholder="Type to search a tool or a command..." autofocus clearable />
|
||||||
|
|
||||||
<div v-for="(options, category) in filteredSearchResult" :key="category">
|
<div v-for="(options, category) in filteredSearchResult" :key="category">
|
||||||
<div ml-3 mt-3 text-sm text-primary font-bold op-60>
|
<div ml-3 mt-3 text-sm font-bold text-primary op-60>
|
||||||
{{ category }}
|
{{ category }}
|
||||||
</div>
|
</div>
|
||||||
<command-palette-option v-for="option in options" :key="option.name" :option="option" :selected="selectedOptionIndex === getOptionIndex(option)" @activated="activateOption" />
|
<command-palette-option v-for="option in options" :key="option.name" :option="option" :selected="selectedOptionIndex === getOptionIndex(option)" @activated="activateOption" />
|
||||||
|
|||||||
+1
-19
@@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { IconDragDrop, IconFileDescription, IconHeart } from '@tabler/icons-vue';
|
import { IconDragDrop, IconHeart } from '@tabler/icons-vue';
|
||||||
import { useHead } from '@vueuse/head';
|
import { useHead } from '@vueuse/head';
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import Draggable from 'vuedraggable';
|
import Draggable from 'vuedraggable';
|
||||||
@@ -43,24 +43,6 @@ function onUpdateFavoriteTools() {
|
|||||||
{{ $t('home.follow.thankYou') }}
|
{{ $t('home.follow.thankYou') }}
|
||||||
<n-icon :component="IconHeart" />
|
<n-icon :component="IconHeart" />
|
||||||
</ColoredCard>
|
</ColoredCard>
|
||||||
|
|
||||||
<a href="https://renderize.tech?utm_source=it-tools&utm_medium=banner" target="_blank" rel="noopener" class="text-current decoration-none">
|
|
||||||
<c-card v-if="config.showSponsorBanner" class="cursor-pointer !border-2px !hover:border-primary">
|
|
||||||
<div class="flex items-center justify-between">
|
|
||||||
<n-icon :component="IconFileDescription" class="text-neutral-400 dark:text-neutral-600" size="40" />
|
|
||||||
<div class="rounded-full bg-#eeeeee px-10px py-2px text-xs text-black dark:bg-#333333 dark:text-white">
|
|
||||||
Sponsor
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="my-5px flex items-baseline gap-4 text-balance text-lg text-black dark:text-white">
|
|
||||||
Generate PDFs from HTML with Renderize API
|
|
||||||
</div>
|
|
||||||
<div class="text-neutral-500 dark:text-neutral-400">
|
|
||||||
Automate your document generation with our fast, developer-friendly API. Start with a free forever plan.
|
|
||||||
</div>
|
|
||||||
</c-card>
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<transition name="height">
|
<transition name="height">
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import { tool as base64FileConverter } from './base64-file-converter';
|
|||||||
import { tool as base64StringConverter } from './base64-string-converter';
|
import { tool as base64StringConverter } from './base64-string-converter';
|
||||||
import { tool as basicAuthGenerator } from './basic-auth-generator';
|
import { tool as basicAuthGenerator } from './basic-auth-generator';
|
||||||
import { tool as emailNormalizer } from './email-normalizer';
|
import { tool as emailNormalizer } from './email-normalizer';
|
||||||
import { tool as parquetsReader } from './parquets-reader';
|
|
||||||
|
|
||||||
import { tool as asciiTextDrawer } from './ascii-text-drawer';
|
import { tool as asciiTextDrawer } from './ascii-text-drawer';
|
||||||
|
|
||||||
@@ -161,7 +160,6 @@ export const toolsByCategory: ToolCategory[] = [
|
|||||||
emailNormalizer,
|
emailNormalizer,
|
||||||
regexTester,
|
regexTester,
|
||||||
regexMemo,
|
regexMemo,
|
||||||
parquetsReader,
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
import { Parking } from '@vicons/tabler';
|
|
||||||
import { defineTool } from '../tool';
|
|
||||||
|
|
||||||
export const tool = defineTool({
|
|
||||||
name: 'Parquet files Reader',
|
|
||||||
path: '/parquets-reader',
|
|
||||||
description: 'Read parquet file as JSON object arrays',
|
|
||||||
keywords: ['parquet', 'reader'],
|
|
||||||
component: () => import('./parquets-reader.vue'),
|
|
||||||
icon: Parking,
|
|
||||||
createdAt: new Date('2025-02-09'),
|
|
||||||
});
|
|
||||||
@@ -1,76 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
// import { Buffer } from 'node:buffer';
|
|
||||||
import { parquetReadObjects } from 'hyparquet';
|
|
||||||
import { compressors } from 'hyparquet-compressors';
|
|
||||||
import type { DataTableInst } from 'naive-ui';
|
|
||||||
|
|
||||||
const fileInput = ref() as Ref<File | null>;
|
|
||||||
|
|
||||||
const error = ref('');
|
|
||||||
|
|
||||||
const results = computedAsync(async () => {
|
|
||||||
const file = fileInput.value;
|
|
||||||
error.value = '';
|
|
||||||
if (file == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
return await parquetReadObjects({ file: await file.arrayBuffer(), compressors });
|
|
||||||
}
|
|
||||||
catch (e: any) {
|
|
||||||
error.value = e.toString();
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
const resultsJson = computed(() => JSON.stringify(results.value || [], (_, v) => typeof v === 'bigint' ? v.toString() : v, 2));
|
|
||||||
|
|
||||||
const columns = computed(() => Object.keys((results.value || [])[0] || {})
|
|
||||||
.map(h => ({ key: h.replace(/\./g, '\\.'), title: h })));
|
|
||||||
|
|
||||||
function onUpload(file: File) {
|
|
||||||
if (file) {
|
|
||||||
fileInput.value = file;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const tableRef = ref<DataTableInst>();
|
|
||||||
function downloadCsv() {
|
|
||||||
tableRef.value?.downloadCsv({ fileName: fileInput.value?.name || 'data' });
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<div style="max-width: 600px;">
|
|
||||||
<c-card title="Input" mb-2>
|
|
||||||
<c-file-upload
|
|
||||||
title="Drag and drop Parquet file here, or click to select a file"
|
|
||||||
@file-upload="onUpload"
|
|
||||||
/>
|
|
||||||
</c-card>
|
|
||||||
|
|
||||||
<c-alert v-if="error">
|
|
||||||
{{ error }}
|
|
||||||
</c-alert>
|
|
||||||
|
|
||||||
<n-tabs v-if="!error" type="line" animated>
|
|
||||||
<n-tab-pane name="jsonData" tab="JSON Content">
|
|
||||||
<textarea-copyable :value="resultsJson" language="json" :download-file-name="`${fileInput?.name}.json`" />
|
|
||||||
</n-tab-pane>
|
|
||||||
<n-tab-pane v-if="columns.length" name="tabData" tab="Table View">
|
|
||||||
<div mb-1 flex justify-center>
|
|
||||||
<n-button @click="downloadCsv">
|
|
||||||
Export as CSV
|
|
||||||
</n-button>
|
|
||||||
</div>
|
|
||||||
<n-data-table
|
|
||||||
ref="tableRef"
|
|
||||||
size="small"
|
|
||||||
:columns="columns"
|
|
||||||
|
|
||||||
:data="results" bordered striped
|
|
||||||
pagination
|
|
||||||
/>
|
|
||||||
</n-tab-pane>
|
|
||||||
</n-tabs>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
@@ -91,14 +91,41 @@ watch(
|
|||||||
{ immediate: true },
|
{ immediate: true },
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if the given HTMLElement overflows
|
||||||
|
* copied from stackoverflow: https://stackoverflow.com/questions/143815/determine-if-an-html-elements-content-overflows
|
||||||
|
* @param el The HTMLElement to check
|
||||||
|
*/
|
||||||
|
function checkOverflow(el: HTMLElement) {
|
||||||
|
const curOverflow = el.style.overflow;
|
||||||
|
if (!curOverflow || curOverflow === 'visible') {
|
||||||
|
el.style.overflow = 'hidden';
|
||||||
|
}
|
||||||
|
|
||||||
|
const isOverflowing = el.clientWidth < el.scrollWidth || el.clientHeight < el.scrollHeight;
|
||||||
|
|
||||||
|
el.style.overflow = curOverflow;
|
||||||
|
|
||||||
|
return isOverflowing;
|
||||||
|
}
|
||||||
|
|
||||||
function resizeTextarea() {
|
function resizeTextarea() {
|
||||||
if (!textareaRef.value || !inputWrapperRef.value) {
|
if (textareaRef.value === undefined) {
|
||||||
|
return; // cannot chnge textarea if element is not available
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!multiline) {
|
||||||
|
return; // textarea wont be displayed if multiline === false
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!checkOverflow(textareaRef.value)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const scrollHeight = textareaRef.value.scrollHeight + 2;
|
const textAreaElement = textareaRef.value!;
|
||||||
|
|
||||||
inputWrapperRef.value.style.height = `${scrollHeight}px`;
|
const scrollHeight = textAreaElement.scrollHeight + 2;
|
||||||
|
textAreaElement.style.height = `${scrollHeight}px`;
|
||||||
}
|
}
|
||||||
|
|
||||||
const htmlInputType = computed(() => {
|
const htmlInputType = computed(() => {
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ function onSearchInput() {
|
|||||||
>
|
>
|
||||||
<div flex-1 truncate>
|
<div flex-1 truncate>
|
||||||
<slot name="displayed-value">
|
<slot name="displayed-value">
|
||||||
<input v-if="searchable && isOpen" ref="searchInputRef" v-model="searchQuery" type="text" placeholder="Search..." class="search-input" w-full color-current lh-normal @input="onSearchInput">
|
<input v-if="searchable && isOpen" ref="searchInputRef" v-model="searchQuery" type="text" placeholder="Search..." class="search-input" w-full lh-normal color-current @input="onSearchInput">
|
||||||
<span v-else-if="selectedOption" lh-normal>
|
<span v-else-if="selectedOption" lh-normal>
|
||||||
{{ selectedOption.label }}
|
{{ selectedOption.label }}
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ const headers = computed(() => {
|
|||||||
<template>
|
<template>
|
||||||
<div class="relative overflow-x-auto rounded">
|
<div class="relative overflow-x-auto rounded">
|
||||||
<table class="w-full border-collapse text-left text-sm text-gray-500 dark:text-gray-400" role="table" :aria-label="description">
|
<table class="w-full border-collapse text-left text-sm text-gray-500 dark:text-gray-400" role="table" :aria-label="description">
|
||||||
<thead v-if="!hideHeaders" class="bg-#ffffff text-gray-700 uppercase dark:bg-#333333 dark:text-gray-400" border-b="1px solid dark:transparent #efeff5">
|
<thead v-if="!hideHeaders" class="bg-#ffffff uppercase text-gray-700 dark:bg-#333333 dark:text-gray-400" border-b="1px solid dark:transparent #efeff5">
|
||||||
<tr>
|
<tr>
|
||||||
<th v-for="header in headers" :key="header.key" scope="col" class="px-6 py-3 text-xs">
|
<th v-for="header in headers" :key="header.key" scope="col" class="px-6 py-3 text-xs">
|
||||||
{{ header.label }}
|
{{ header.label }}
|
||||||
|
|||||||
+1
-1
@@ -10,7 +10,7 @@ import {
|
|||||||
import { presetScrollbar } from 'unocss-preset-scrollbar';
|
import { presetScrollbar } from 'unocss-preset-scrollbar';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
presets: [presetUno(), presetAttributify(), presetTypography(), presetScrollbar()],
|
presets: [presetUno(), presetAttributify({ ignoreAttributes: ['size'] }), presetTypography(), presetScrollbar()],
|
||||||
transformers: [transformerDirectives(), transformerVariantGroup()],
|
transformers: [transformerDirectives(), transformerVariantGroup()],
|
||||||
theme: {
|
theme: {
|
||||||
colors: {
|
colors: {
|
||||||
|
|||||||
Reference in new issue
Block a user