@karbonjs/ui-svelte 0.3.0 → 0.3.1
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@karbonjs/ui-svelte",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Karbon UI components for Svelte 5",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"svelte": "src/index.ts",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"simple-icons": "^16.12.0",
|
|
19
|
-
"@karbonjs/ui-core": "0.3.
|
|
19
|
+
"@karbonjs/ui-core": "0.3.1"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
22
|
"svelte": "^5.0.0"
|
|
@@ -159,9 +159,11 @@
|
|
|
159
159
|
const cols = visibleColumns.filter(c => c.type !== 'actions')
|
|
160
160
|
const csv = [cols.map(c => c.label || c.key).join(','), ...filteredData.map(row => cols.map(c => `"${String(row[c.key] ?? '').replace(/"/g, '""')}"`).join(','))].join('\n')
|
|
161
161
|
const a = document.createElement('a')
|
|
162
|
-
|
|
162
|
+
const url = URL.createObjectURL(new Blob([csv], { type: 'text/csv;charset=utf-8;' }))
|
|
163
|
+
a.href = url
|
|
163
164
|
a.download = `${exportFilename}.csv`
|
|
164
165
|
a.click()
|
|
166
|
+
URL.revokeObjectURL(url)
|
|
165
167
|
}
|
|
166
168
|
|
|
167
169
|
const pad = $derived(compact ? 'px-3 py-1.5' : 'px-4 py-3')
|