@prismiq/react 0.1.1 → 0.2.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/dist/{CustomSQLEditor-CYlOtecq.d.ts → ChatBubble-3mFpV7yX.d.ts} +42 -3
- package/dist/{CustomSQLEditor-d84v_Cgp.d.cts → ChatBubble-CMkEupzn.d.cts} +42 -3
- package/dist/{DashboardDialog-DBNTVVSp.d.ts → DashboardDialog-DMmZ3bnf.d.cts} +5 -3
- package/dist/{DashboardDialog-CZD8I-6z.d.cts → DashboardDialog-RlcPkdMt.d.ts} +5 -3
- package/dist/charts/index.d.cts +2 -2
- package/dist/charts/index.d.ts +2 -2
- package/dist/{chunk-3LDRRDJ6.js → chunk-F6QYNQEW.js} +194 -28
- package/dist/chunk-F6QYNQEW.js.map +1 -0
- package/dist/{chunk-WWTT2OJ5.js → chunk-HKZFEXT6.js} +27 -9
- package/dist/chunk-HKZFEXT6.js.map +1 -0
- package/dist/{chunk-VQDFS6VS.cjs → chunk-N6I3QOHG.cjs} +376 -210
- package/dist/chunk-N6I3QOHG.cjs.map +1 -0
- package/dist/{chunk-URJH4H6G.cjs → chunk-NXXKG4GN.cjs} +520 -6
- package/dist/chunk-NXXKG4GN.cjs.map +1 -0
- package/dist/{chunk-ET7GCREP.js → chunk-VEFYFB5H.js} +517 -7
- package/dist/chunk-VEFYFB5H.js.map +1 -0
- package/dist/{chunk-MDXGGZSW.cjs → chunk-ZYVN6XAZ.cjs} +35 -37
- package/dist/chunk-ZYVN6XAZ.cjs.map +1 -0
- package/dist/components/index.cjs +62 -54
- package/dist/components/index.d.cts +2 -2
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.js +1 -1
- package/dist/dashboard/index.cjs +34 -34
- package/dist/dashboard/index.d.cts +7 -5
- package/dist/dashboard/index.d.ts +7 -5
- package/dist/dashboard/index.js +2 -2
- package/dist/export/index.cjs +7 -7
- package/dist/export/index.d.cts +6 -4
- package/dist/export/index.d.ts +6 -4
- package/dist/export/index.js +1 -1
- package/dist/{index-CvKj3SWO.d.cts → index-BA2VUhgN.d.cts} +1 -1
- package/dist/{index-DXGLs1yY.d.ts → index-BPo89ZAj.d.ts} +1 -1
- package/dist/index.cjs +119 -103
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +77 -7
- package/dist/index.d.ts +77 -7
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/{types-j0kPJ9Hz.d.cts → types-BaI6sSAG.d.cts} +62 -1
- package/dist/{types-j0kPJ9Hz.d.ts → types-BaI6sSAG.d.ts} +62 -1
- package/dist/utils/index.d.cts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/package.json +2 -6
- package/dist/chunk-3LDRRDJ6.js.map +0 -1
- package/dist/chunk-ET7GCREP.js.map +0 -1
- package/dist/chunk-MDXGGZSW.cjs.map +0 -1
- package/dist/chunk-URJH4H6G.cjs.map +0 -1
- package/dist/chunk-VQDFS6VS.cjs.map +0 -1
- package/dist/chunk-WWTT2OJ5.js.map +0 -1
|
@@ -1,28 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var XLSX = require('xlsx');
|
|
4
3
|
var react = require('react');
|
|
5
4
|
|
|
6
|
-
function _interopNamespace(e) {
|
|
7
|
-
if (e && e.__esModule) return e;
|
|
8
|
-
var n = Object.create(null);
|
|
9
|
-
if (e) {
|
|
10
|
-
Object.keys(e).forEach(function (k) {
|
|
11
|
-
if (k !== 'default') {
|
|
12
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
13
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
get: function () { return e[k]; }
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
n.default = e;
|
|
21
|
-
return Object.freeze(n);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
var XLSX__namespace = /*#__PURE__*/_interopNamespace(XLSX);
|
|
25
|
-
|
|
26
5
|
// src/export/csv.ts
|
|
27
6
|
function isQueryResult(data) {
|
|
28
7
|
return typeof data === "object" && data !== null && "columns" in data && "rows" in data && Array.isArray(data.columns) && Array.isArray(data.rows);
|
|
@@ -118,6 +97,18 @@ function exportToCSV(data, options) {
|
|
|
118
97
|
const fullFilename = filename.endsWith(".csv") ? filename : `${filename}.csv`;
|
|
119
98
|
downloadFile(csv, fullFilename, "text/csv;charset=utf-8");
|
|
120
99
|
}
|
|
100
|
+
|
|
101
|
+
// src/export/excel.ts
|
|
102
|
+
async function loadXLSX() {
|
|
103
|
+
try {
|
|
104
|
+
return await import('xlsx');
|
|
105
|
+
} catch (err) {
|
|
106
|
+
const detail = err instanceof Error ? `: ${err.message}` : "";
|
|
107
|
+
throw new Error(
|
|
108
|
+
`xlsx is required for Excel export. Install it with: npm install xlsx${detail}`
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
121
112
|
function isQueryResult2(data) {
|
|
122
113
|
return typeof data === "object" && data !== null && "columns" in data && "rows" in data && Array.isArray(data.columns) && Array.isArray(data.rows);
|
|
123
114
|
}
|
|
@@ -149,10 +140,11 @@ function calculateColumnWidth(values) {
|
|
|
149
140
|
}
|
|
150
141
|
return Math.min(Math.max(maxLength + 2, 8), 50);
|
|
151
142
|
}
|
|
152
|
-
function exportToExcel(data, options) {
|
|
143
|
+
async function exportToExcel(data, options) {
|
|
144
|
+
const XLSX = await loadXLSX();
|
|
153
145
|
const { columns: allColumns, rows } = normalizeData2(data);
|
|
154
146
|
const exportColumns = options?.columns ?? allColumns;
|
|
155
|
-
const workbook =
|
|
147
|
+
const workbook = XLSX.utils.book_new();
|
|
156
148
|
const headers = exportColumns.map((col) => options?.headers?.[col] ?? col);
|
|
157
149
|
const wsData = [headers];
|
|
158
150
|
for (const row of rows) {
|
|
@@ -168,9 +160,9 @@ function exportToExcel(data, options) {
|
|
|
168
160
|
});
|
|
169
161
|
wsData.push(rowData);
|
|
170
162
|
}
|
|
171
|
-
const worksheet =
|
|
163
|
+
const worksheet = XLSX.utils.aoa_to_sheet(wsData);
|
|
172
164
|
const colWidths = exportColumns.map((col, index) => {
|
|
173
|
-
if (options?.columnWidths?.[col]) {
|
|
165
|
+
if (options?.columnWidths?.[col] !== void 0) {
|
|
174
166
|
return { wch: options.columnWidths[col] };
|
|
175
167
|
}
|
|
176
168
|
const columnValues = [headers[index], ...rows.map((r) => r[col])];
|
|
@@ -181,13 +173,14 @@ function exportToExcel(data, options) {
|
|
|
181
173
|
worksheet["!freeze"] = { xSplit: 0, ySplit: 1 };
|
|
182
174
|
}
|
|
183
175
|
const sheetName = options?.sheetName ?? "Sheet1";
|
|
184
|
-
|
|
176
|
+
XLSX.utils.book_append_sheet(workbook, worksheet, sheetName);
|
|
185
177
|
const filename = options?.filename ?? "export";
|
|
186
178
|
const fullFilename = filename.endsWith(".xlsx") ? filename : `${filename}.xlsx`;
|
|
187
|
-
|
|
179
|
+
XLSX.writeFile(workbook, fullFilename);
|
|
188
180
|
}
|
|
189
|
-
function exportMultipleSheets(sheets, filename) {
|
|
190
|
-
const
|
|
181
|
+
async function exportMultipleSheets(sheets, filename) {
|
|
182
|
+
const XLSX = await loadXLSX();
|
|
183
|
+
const workbook = XLSX.utils.book_new();
|
|
191
184
|
for (const [sheetName, data] of Object.entries(sheets)) {
|
|
192
185
|
const { columns, rows } = normalizeData2(data);
|
|
193
186
|
const wsData = [columns];
|
|
@@ -204,20 +197,21 @@ function exportMultipleSheets(sheets, filename) {
|
|
|
204
197
|
});
|
|
205
198
|
wsData.push(rowData);
|
|
206
199
|
}
|
|
207
|
-
const worksheet =
|
|
200
|
+
const worksheet = XLSX.utils.aoa_to_sheet(wsData);
|
|
208
201
|
const colWidths = columns.map((col, index) => {
|
|
209
202
|
const columnValues = [columns[index], ...rows.map((r) => r[col])];
|
|
210
203
|
return { wch: calculateColumnWidth(columnValues) };
|
|
211
204
|
});
|
|
212
205
|
worksheet["!cols"] = colWidths;
|
|
213
|
-
|
|
206
|
+
XLSX.utils.book_append_sheet(workbook, worksheet, sheetName);
|
|
214
207
|
}
|
|
215
208
|
const fullFilename = filename.endsWith(".xlsx") ? filename : `${filename}.xlsx`;
|
|
216
|
-
|
|
209
|
+
XLSX.writeFile(workbook, fullFilename);
|
|
217
210
|
}
|
|
218
211
|
function useExport(options) {
|
|
219
212
|
const { data, filename, columns, headers } = options;
|
|
220
213
|
const [isExporting, setIsExporting] = react.useState(false);
|
|
214
|
+
const [error, setError] = react.useState(null);
|
|
221
215
|
const canExport = react.useMemo(() => {
|
|
222
216
|
return data !== null && data.rows.length > 0;
|
|
223
217
|
}, [data]);
|
|
@@ -240,9 +234,10 @@ function useExport(options) {
|
|
|
240
234
|
setIsExporting(false);
|
|
241
235
|
}
|
|
242
236
|
}, [canExport, data, generateFilename, columns, headers]);
|
|
243
|
-
const handleExportExcel = react.useCallback((excelOptions) => {
|
|
237
|
+
const handleExportExcel = react.useCallback(async (excelOptions) => {
|
|
244
238
|
if (!canExport || !data) return;
|
|
245
239
|
setIsExporting(true);
|
|
240
|
+
setError(null);
|
|
246
241
|
try {
|
|
247
242
|
const exportOptions = {
|
|
248
243
|
filename: generateFilename(),
|
|
@@ -250,7 +245,9 @@ function useExport(options) {
|
|
|
250
245
|
headers,
|
|
251
246
|
...excelOptions
|
|
252
247
|
};
|
|
253
|
-
exportToExcel(data, exportOptions);
|
|
248
|
+
await exportToExcel(data, exportOptions);
|
|
249
|
+
} catch (err) {
|
|
250
|
+
setError(err instanceof Error ? err : new Error(String(err)));
|
|
254
251
|
} finally {
|
|
255
252
|
setIsExporting(false);
|
|
256
253
|
}
|
|
@@ -259,7 +256,8 @@ function useExport(options) {
|
|
|
259
256
|
exportCSV: handleExportCSV,
|
|
260
257
|
exportExcel: handleExportExcel,
|
|
261
258
|
isExporting,
|
|
262
|
-
canExport
|
|
259
|
+
canExport,
|
|
260
|
+
error
|
|
263
261
|
};
|
|
264
262
|
}
|
|
265
263
|
|
|
@@ -269,5 +267,5 @@ exports.exportToCSV = exportToCSV;
|
|
|
269
267
|
exports.exportToExcel = exportToExcel;
|
|
270
268
|
exports.generateCSV = generateCSV;
|
|
271
269
|
exports.useExport = useExport;
|
|
272
|
-
//# sourceMappingURL=chunk-
|
|
273
|
-
//# sourceMappingURL=chunk-
|
|
270
|
+
//# sourceMappingURL=chunk-ZYVN6XAZ.cjs.map
|
|
271
|
+
//# sourceMappingURL=chunk-ZYVN6XAZ.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/export/csv.ts","../src/export/excel.ts","../src/export/useExport.ts"],"names":["isQueryResult","normalizeData","useState","useMemo","useCallback"],"mappings":";;;;;AAUA,SAAS,cAAc,IAAA,EAAuC;AAC5D,EAAA,OACE,OAAO,IAAA,KAAS,QAAA,IAChB,IAAA,KAAS,IAAA,IACT,aAAa,IAAA,IACb,MAAA,IAAU,IAAA,IACV,KAAA,CAAM,QAAS,IAAA,CAAqB,OAAO,KAC3C,KAAA,CAAM,OAAA,CAAS,KAAqB,IAAI,CAAA;AAE5C;AAKA,SAAS,cAAc,IAAA,EAGrB;AACA,EAAA,IAAI,aAAA,CAAc,IAAI,CAAA,EAAG;AACvB,IAAA,MAAM,IAAA,GAAO,IAAA,CAAK,IAAA,CAAK,GAAA,CAAI,CAAC,GAAA,KAAQ;AAClC,MAAA,MAAM,MAA+B,EAAC;AACtC,MAAA,IAAA,CAAK,OAAA,CAAQ,OAAA,CAAQ,CAAC,GAAA,EAAK,KAAA,KAAU;AACnC,QAAA,GAAA,CAAI,GAAG,CAAA,GAAI,GAAA,CAAI,KAAK,CAAA;AAAA,MACtB,CAAC,CAAA;AACD,MAAA,OAAO,GAAA;AAAA,IACT,CAAC,CAAA;AACD,IAAA,OAAO,EAAE,OAAA,EAAS,IAAA,CAAK,OAAA,EAAS,IAAA,EAAK;AAAA,EACvC;AAEA,EAAA,IAAI,MAAM,OAAA,CAAQ,IAAI,CAAA,IAAK,IA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,CAAA;AAExD,EAAA,OAAO;AAAA,IACL,SAAA,EAAW,eAAA;AAAA,IACX,WAAA,EAAa,iBAAA;AAAA,IACb,WAAA;AAAA,IACA,SAAA;AAAA,IACA;AAAA,GACF;AACF","file":"chunk-ZYVN6XAZ.cjs","sourcesContent":["/**\n * CSV export functionality.\n */\n\nimport type { QueryResult } from '../types';\nimport type { ExportData, ExportOptions } from './types';\n\n/**\n * Check if data is a QueryResult.\n */\nfunction isQueryResult(data: ExportData): data is QueryResult {\n return (\n typeof data === 'object' &&\n data !== null &&\n 'columns' in data &&\n 'rows' in data &&\n Array.isArray((data as QueryResult).columns) &&\n Array.isArray((data as QueryResult).rows)\n );\n}\n\n/**\n * Convert data to array of objects format.\n */\nfunction normalizeData(data: ExportData): {\n columns: string[];\n rows: Record<string, unknown>[];\n} {\n if (isQueryResult(data)) {\n const rows = data.rows.map((row) => {\n const obj: Record<string, unknown> = {};\n data.columns.forEach((col, index) => {\n obj[col] = row[index];\n });\n return obj;\n });\n return { columns: data.columns, rows };\n }\n\n if (Array.isArray(data) && data.length > 0) {\n const firstRow = data[0];\n if (firstRow && typeof firstRow === 'object') {\n const columns = Object.keys(firstRow);\n return { columns, rows: data };\n }\n }\n\n return { columns: [], rows: [] };\n}\n\n/**\n * Escape a value for CSV.\n *\n * Handles:\n * - Commas (wrap in quotes)\n * - Quotes (double them)\n * - Newlines (wrap in quotes)\n * - Leading/trailing whitespace (wrap in quotes)\n */\nfunction escapeCSVValue(value: unknown): string {\n if (value === null || value === undefined) {\n return '';\n }\n\n const stringValue = String(value);\n\n // Check if we need to quote the value\n const needsQuoting =\n stringValue.includes(',') ||\n stringValue.includes('\"') ||\n stringValue.includes('\\n') ||\n stringValue.includes('\\r') ||\n stringValue.startsWith(' ') ||\n stringValue.endsWith(' ');\n\n if (needsQuoting) {\n // Double any existing quotes and wrap in quotes\n return `\"${stringValue.replace(/\"/g, '\"\"')}\"`;\n }\n\n return stringValue;\n}\n\n/**\n * Format a value for CSV export.\n */\nfunction formatValue(\n value: unknown,\n options?: ExportOptions\n): string {\n if (value === null || value === undefined) {\n return '';\n }\n\n // Handle dates\n if (value instanceof Date) {\n if (options?.dateFormat) {\n // Simple date formatting (could be extended with a library)\n return value.toISOString();\n }\n return value.toISOString();\n }\n\n // Handle numbers\n if (typeof value === 'number') {\n if (options?.numberFormat) {\n return new Intl.NumberFormat(undefined, options.numberFormat).format(value);\n }\n return String(value);\n }\n\n // Handle booleans\n if (typeof value === 'boolean') {\n return value ? 'true' : 'false';\n }\n\n // Handle objects/arrays\n if (typeof value === 'object') {\n return JSON.stringify(value);\n }\n\n return String(value);\n}\n\n/**\n * Generate CSV content from data.\n *\n * @param data - Array of row objects\n * @param columns - Column names\n * @param headers - Custom header names\n * @param options - Export options\n * @returns CSV string\n */\nexport function generateCSV(\n data: Record<string, unknown>[],\n columns: string[],\n headers?: Record<string, string>,\n options?: ExportOptions\n): string {\n const lines: string[] = [];\n\n // Header row\n const headerRow = columns.map((col) => {\n const headerName = headers?.[col] ?? col;\n return escapeCSVValue(headerName);\n });\n lines.push(headerRow.join(','));\n\n // Data rows\n for (const row of data) {\n const rowValues = columns.map((col) => {\n const value = row[col];\n const formatted = formatValue(value, options);\n return escapeCSVValue(formatted);\n });\n lines.push(rowValues.join(','));\n }\n\n return lines.join('\\n');\n}\n\n/**\n * Trigger a file download in the browser.\n *\n * @param content - File content\n * @param filename - File name with extension\n * @param mimeType - MIME type\n */\nexport function downloadFile(\n content: string,\n filename: string,\n mimeType: string\n): void {\n // Create blob\n const blob = new Blob([content], { type: mimeType });\n\n // Create download link\n const url = URL.createObjectURL(blob);\n const link = document.createElement('a');\n link.href = url;\n link.download = filename;\n\n // Trigger download\n document.body.appendChild(link);\n link.click();\n\n // Cleanup\n document.body.removeChild(link);\n URL.revokeObjectURL(url);\n}\n\n/**\n * Export data to CSV and trigger download.\n *\n * @param data - QueryResult or array of objects\n * @param options - Export options\n *\n * @example\n * ```tsx\n * // Export query result\n * exportToCSV(queryResult, { filename: 'sales-report' });\n *\n * // Export with custom columns\n * exportToCSV(data, {\n * columns: ['id', 'name', 'value'],\n * headers: { id: 'ID', name: 'Name', value: 'Value' }\n * });\n * ```\n */\nexport function exportToCSV(\n data: ExportData,\n options?: ExportOptions\n): void {\n const { columns: allColumns, rows } = normalizeData(data);\n\n // Use specified columns or all columns\n const exportColumns = options?.columns ?? allColumns;\n\n // Generate CSV\n const csv = generateCSV(rows, exportColumns, options?.headers, options);\n\n // Generate filename\n const filename = options?.filename ?? 'export';\n const fullFilename = filename.endsWith('.csv') ? filename : `${filename}.csv`;\n\n // Download\n downloadFile(csv, fullFilename, 'text/csv;charset=utf-8');\n}\n","/**\n * Excel export functionality.\n *\n * Uses the xlsx library (SheetJS) for Excel file generation.\n */\n\nimport type { QueryResult } from '../types';\nimport type { ExcelExportOptions, ExportData } from './types';\n\ntype XLSXModule = typeof import('xlsx');\n\nasync function loadXLSX(): Promise<XLSXModule> {\n try {\n return await import('xlsx');\n } catch (err) {\n const detail = err instanceof Error ? `: ${err.message}` : '';\n throw new Error(\n `xlsx is required for Excel export. Install it with: npm install xlsx${detail}`\n );\n }\n}\n\n/**\n * Check if data is a QueryResult.\n */\nfunction isQueryResult(data: ExportData): data is QueryResult {\n return (\n typeof data === 'object' &&\n data !== null &&\n 'columns' in data &&\n 'rows' in data &&\n Array.isArray((data as QueryResult).columns) &&\n Array.isArray((data as QueryResult).rows)\n );\n}\n\n/**\n * Convert data to array of objects format.\n */\nfunction normalizeData(data: ExportData): {\n columns: string[];\n rows: Record<string, unknown>[];\n} {\n if (isQueryResult(data)) {\n const rows = data.rows.map((row) => {\n const obj: Record<string, unknown> = {};\n data.columns.forEach((col, index) => {\n obj[col] = row[index];\n });\n return obj;\n });\n return { columns: data.columns, rows };\n }\n\n if (Array.isArray(data) && data.length > 0) {\n const firstRow = data[0];\n if (firstRow && typeof firstRow === 'object') {\n const columns = Object.keys(firstRow);\n return { columns, rows: data };\n }\n }\n\n return { columns: [], rows: [] };\n}\n\n/**\n * Calculate optimal column width based on content.\n */\nfunction calculateColumnWidth(values: unknown[]): number {\n let maxLength = 0;\n\n for (const value of values) {\n const strValue = value === null || value === undefined ? '' : String(value);\n maxLength = Math.max(maxLength, strValue.length);\n }\n\n // Add some padding and cap at reasonable max\n return Math.min(Math.max(maxLength + 2, 8), 50);\n}\n\n/**\n * Export data to Excel and trigger download.\n *\n * @param data - QueryResult or array of objects\n * @param options - Export options\n *\n * @example\n * ```tsx\n * // Basic export\n * exportToExcel(queryResult, { filename: 'sales-report' });\n *\n * // With styling\n * exportToExcel(data, {\n * filename: 'report',\n * sheetName: 'Sales Data',\n * freezeHeader: true,\n * headerStyle: { bold: true, fill: '#e3f2fd', align: 'center' }\n * });\n * ```\n */\nexport async function exportToExcel(\n data: ExportData,\n options?: ExcelExportOptions\n): Promise<void> {\n const XLSX = await loadXLSX();\n const { columns: allColumns, rows } = normalizeData(data);\n\n // Use specified columns or all columns\n const exportColumns = options?.columns ?? allColumns;\n\n // Create workbook and worksheet\n const workbook = XLSX.utils.book_new();\n\n // Prepare data with headers\n const headers = exportColumns.map(col => options?.headers?.[col] ?? col);\n\n // Convert rows to array format for the worksheet\n const wsData: unknown[][] = [headers];\n\n for (const row of rows) {\n const rowData = exportColumns.map(col => {\n const value = row[col];\n // Handle special types\n if (value instanceof Date) {\n return value;\n }\n if (typeof value === 'object' && value !== null) {\n return JSON.stringify(value);\n }\n return value;\n });\n wsData.push(rowData);\n }\n\n // Create worksheet from data\n const worksheet = XLSX.utils.aoa_to_sheet(wsData);\n\n // Set column widths\n const colWidths = exportColumns.map((col, index) => {\n // Use custom width if specified\n if (options?.columnWidths?.[col] !== undefined) {\n return { wch: options.columnWidths[col] };\n }\n\n // Calculate width from content\n const columnValues = [headers[index], ...rows.map(r => r[col])];\n return { wch: calculateColumnWidth(columnValues) };\n });\n worksheet['!cols'] = colWidths;\n\n // Freeze header row if requested\n if (options?.freezeHeader) {\n worksheet['!freeze'] = { xSplit: 0, ySplit: 1 };\n }\n\n // Add worksheet to workbook\n const sheetName = options?.sheetName ?? 'Sheet1';\n XLSX.utils.book_append_sheet(workbook, worksheet, sheetName);\n\n // Generate filename\n const filename = options?.filename ?? 'export';\n const fullFilename = filename.endsWith('.xlsx') ? filename : `${filename}.xlsx`;\n\n // Write and download\n XLSX.writeFile(workbook, fullFilename);\n}\n\n/**\n * Export multiple sheets to a single Excel file.\n *\n * @param sheets - Object mapping sheet names to data\n * @param filename - Output filename\n *\n * @example\n * ```tsx\n * exportMultipleSheets({\n * 'Sales': salesData,\n * 'Customers': customerData,\n * 'Products': productData,\n * }, 'full-report');\n * ```\n */\nexport async function exportMultipleSheets(\n sheets: Record<string, ExportData>,\n filename: string\n): Promise<void> {\n const XLSX = await loadXLSX();\n const workbook = XLSX.utils.book_new();\n\n for (const [sheetName, data] of Object.entries(sheets)) {\n const { columns, rows } = normalizeData(data);\n\n // Prepare data with headers\n const wsData: unknown[][] = [columns];\n\n for (const row of rows) {\n const rowData = columns.map(col => {\n const value = row[col];\n if (value instanceof Date) {\n return value;\n }\n if (typeof value === 'object' && value !== null) {\n return JSON.stringify(value);\n }\n return value;\n });\n wsData.push(rowData);\n }\n\n const worksheet = XLSX.utils.aoa_to_sheet(wsData);\n\n // Auto-size columns\n const colWidths = columns.map((col, index) => {\n const columnValues = [columns[index], ...rows.map(r => r[col])];\n return { wch: calculateColumnWidth(columnValues) };\n });\n worksheet['!cols'] = colWidths;\n\n XLSX.utils.book_append_sheet(workbook, worksheet, sheetName);\n }\n\n const fullFilename = filename.endsWith('.xlsx') ? filename : `${filename}.xlsx`;\n XLSX.writeFile(workbook, fullFilename);\n}\n","'use client';\n\nimport { useCallback, useMemo, useState } from 'react';\nimport type { QueryResult } from '../types';\nimport { exportToCSV } from './csv';\nimport { exportToExcel } from './excel';\nimport type { ExcelExportOptions, ExportOptions } from './types';\n\n/**\n * Options for the useExport hook.\n */\nexport interface UseExportOptions {\n /** Data to export */\n data: QueryResult | null;\n /** Default filename for exports */\n filename?: string;\n /** Columns to export (defaults to all) */\n columns?: string[];\n /** Custom column headers */\n headers?: Record<string, string>;\n}\n\n/**\n * Result of the useExport hook.\n */\nexport interface UseExportResult {\n /** Export to CSV file */\n exportCSV: () => void;\n /** Export to Excel file */\n exportExcel: (options?: ExcelExportOptions) => Promise<void>;\n /** Whether an export is in progress */\n isExporting: boolean;\n /** Whether export is possible (data is available) */\n canExport: boolean;\n /** Error from the most recent export attempt, if any */\n error: Error | null;\n}\n\n/**\n * Hook for exporting query data to CSV or Excel.\n *\n * @param options - Export options\n * @returns Export functions and state\n *\n * @example\n * ```tsx\n * function DataTable({ data }) {\n * const { exportCSV, exportExcel, canExport, isExporting } = useExport({\n * data,\n * filename: 'sales-report',\n * columns: ['id', 'name', 'amount'],\n * headers: { id: 'ID', name: 'Name', amount: 'Amount' }\n * });\n *\n * return (\n * <div>\n * <button onClick={exportCSV} disabled={!canExport || isExporting}>\n * Export CSV\n * </button>\n * <button onClick={() => exportExcel()} disabled={!canExport || isExporting}>\n * Export Excel\n * </button>\n * {isExporting && <span>Exporting...</span>}\n * </div>\n * );\n * }\n * ```\n */\nexport function useExport(options: UseExportOptions): UseExportResult {\n const { data, filename, columns, headers } = options;\n const [isExporting, setIsExporting] = useState(false);\n const [error, setError] = useState<Error | null>(null);\n\n // Check if export is possible\n const canExport = useMemo(() => {\n return data !== null && data.rows.length > 0;\n }, [data]);\n\n // Generate timestamp for filename\n const generateFilename = useCallback(() => {\n const base = filename ?? 'export';\n const timestamp = new Date().toISOString().slice(0, 10);\n return `${base}-${timestamp}`;\n }, [filename]);\n\n // Export to CSV\n const handleExportCSV = useCallback(() => {\n if (!canExport || !data) return;\n\n setIsExporting(true);\n try {\n const exportOptions: ExportOptions = {\n filename: generateFilename(),\n columns,\n headers,\n };\n exportToCSV(data, exportOptions);\n } finally {\n setIsExporting(false);\n }\n }, [canExport, data, generateFilename, columns, headers]);\n\n // Export to Excel\n const handleExportExcel = useCallback(async (excelOptions?: ExcelExportOptions) => {\n if (!canExport || !data) return;\n\n setIsExporting(true);\n setError(null);\n try {\n const exportOptions: ExcelExportOptions = {\n filename: generateFilename(),\n columns,\n headers,\n ...excelOptions,\n };\n await exportToExcel(data, exportOptions);\n } catch (err) {\n setError(err instanceof Error ? err : new Error(String(err)));\n } finally {\n setIsExporting(false);\n }\n }, [canExport, data, generateFilename, columns, headers]);\n\n return {\n exportCSV: handleExportCSV,\n exportExcel: handleExportExcel,\n isExporting,\n canExport,\n error,\n };\n}\n\nexport default useExport;\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkNXXKG4GN_cjs = require('../chunk-NXXKG4GN.cjs');
|
|
4
4
|
require('../chunk-LMTG3LRC.cjs');
|
|
5
5
|
require('../chunk-KXB2IZI2.cjs');
|
|
6
6
|
|
|
@@ -8,215 +8,223 @@ require('../chunk-KXB2IZI2.cjs');
|
|
|
8
8
|
|
|
9
9
|
Object.defineProperty(exports, "AggregationPicker", {
|
|
10
10
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
11
|
+
get: function () { return chunkNXXKG4GN_cjs.AggregationPicker; }
|
|
12
12
|
});
|
|
13
13
|
Object.defineProperty(exports, "AutoSaveIndicator", {
|
|
14
14
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunkNXXKG4GN_cjs.AutoSaveIndicator; }
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, "Badge", {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
19
|
+
get: function () { return chunkNXXKG4GN_cjs.Badge; }
|
|
20
20
|
});
|
|
21
21
|
Object.defineProperty(exports, "Button", {
|
|
22
22
|
enumerable: true,
|
|
23
|
-
get: function () { return
|
|
23
|
+
get: function () { return chunkNXXKG4GN_cjs.Button; }
|
|
24
24
|
});
|
|
25
25
|
Object.defineProperty(exports, "CalculatedFieldBuilder", {
|
|
26
26
|
enumerable: true,
|
|
27
|
-
get: function () { return
|
|
27
|
+
get: function () { return chunkNXXKG4GN_cjs.CalculatedFieldBuilder; }
|
|
28
|
+
});
|
|
29
|
+
Object.defineProperty(exports, "ChatBubble", {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: function () { return chunkNXXKG4GN_cjs.ChatBubble; }
|
|
32
|
+
});
|
|
33
|
+
Object.defineProperty(exports, "ChatPanel", {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
get: function () { return chunkNXXKG4GN_cjs.ChatPanel; }
|
|
28
36
|
});
|
|
29
37
|
Object.defineProperty(exports, "Checkbox", {
|
|
30
38
|
enumerable: true,
|
|
31
|
-
get: function () { return
|
|
39
|
+
get: function () { return chunkNXXKG4GN_cjs.Checkbox; }
|
|
32
40
|
});
|
|
33
41
|
Object.defineProperty(exports, "ColumnNode", {
|
|
34
42
|
enumerable: true,
|
|
35
|
-
get: function () { return
|
|
43
|
+
get: function () { return chunkNXXKG4GN_cjs.ColumnNode; }
|
|
36
44
|
});
|
|
37
45
|
Object.defineProperty(exports, "ColumnSelector", {
|
|
38
46
|
enumerable: true,
|
|
39
|
-
get: function () { return
|
|
47
|
+
get: function () { return chunkNXXKG4GN_cjs.ColumnSelector; }
|
|
40
48
|
});
|
|
41
49
|
Object.defineProperty(exports, "CustomSQLEditor", {
|
|
42
50
|
enumerable: true,
|
|
43
|
-
get: function () { return
|
|
51
|
+
get: function () { return chunkNXXKG4GN_cjs.CustomSQLEditor; }
|
|
44
52
|
});
|
|
45
53
|
Object.defineProperty(exports, "Dialog", {
|
|
46
54
|
enumerable: true,
|
|
47
|
-
get: function () { return
|
|
55
|
+
get: function () { return chunkNXXKG4GN_cjs.Dialog; }
|
|
48
56
|
});
|
|
49
57
|
Object.defineProperty(exports, "DialogFooter", {
|
|
50
58
|
enumerable: true,
|
|
51
|
-
get: function () { return
|
|
59
|
+
get: function () { return chunkNXXKG4GN_cjs.DialogFooter; }
|
|
52
60
|
});
|
|
53
61
|
Object.defineProperty(exports, "DialogHeader", {
|
|
54
62
|
enumerable: true,
|
|
55
|
-
get: function () { return
|
|
63
|
+
get: function () { return chunkNXXKG4GN_cjs.DialogHeader; }
|
|
56
64
|
});
|
|
57
65
|
Object.defineProperty(exports, "Dropdown", {
|
|
58
66
|
enumerable: true,
|
|
59
|
-
get: function () { return
|
|
67
|
+
get: function () { return chunkNXXKG4GN_cjs.Dropdown; }
|
|
60
68
|
});
|
|
61
69
|
Object.defineProperty(exports, "DropdownItem", {
|
|
62
70
|
enumerable: true,
|
|
63
|
-
get: function () { return
|
|
71
|
+
get: function () { return chunkNXXKG4GN_cjs.DropdownItem; }
|
|
64
72
|
});
|
|
65
73
|
Object.defineProperty(exports, "DropdownSeparator", {
|
|
66
74
|
enumerable: true,
|
|
67
|
-
get: function () { return
|
|
75
|
+
get: function () { return chunkNXXKG4GN_cjs.DropdownSeparator; }
|
|
68
76
|
});
|
|
69
77
|
Object.defineProperty(exports, "EmptyDashboard", {
|
|
70
78
|
enumerable: true,
|
|
71
|
-
get: function () { return
|
|
79
|
+
get: function () { return chunkNXXKG4GN_cjs.EmptyDashboard; }
|
|
72
80
|
});
|
|
73
81
|
Object.defineProperty(exports, "EmptyState", {
|
|
74
82
|
enumerable: true,
|
|
75
|
-
get: function () { return
|
|
83
|
+
get: function () { return chunkNXXKG4GN_cjs.EmptyState; }
|
|
76
84
|
});
|
|
77
85
|
Object.defineProperty(exports, "ErrorBoundary", {
|
|
78
86
|
enumerable: true,
|
|
79
|
-
get: function () { return
|
|
87
|
+
get: function () { return chunkNXXKG4GN_cjs.ErrorBoundary; }
|
|
80
88
|
});
|
|
81
89
|
Object.defineProperty(exports, "ErrorFallback", {
|
|
82
90
|
enumerable: true,
|
|
83
|
-
get: function () { return
|
|
91
|
+
get: function () { return chunkNXXKG4GN_cjs.ErrorFallback; }
|
|
84
92
|
});
|
|
85
93
|
Object.defineProperty(exports, "ExpressionEditor", {
|
|
86
94
|
enumerable: true,
|
|
87
|
-
get: function () { return
|
|
95
|
+
get: function () { return chunkNXXKG4GN_cjs.ExpressionEditor; }
|
|
88
96
|
});
|
|
89
97
|
Object.defineProperty(exports, "FilterBuilder", {
|
|
90
98
|
enumerable: true,
|
|
91
|
-
get: function () { return
|
|
99
|
+
get: function () { return chunkNXXKG4GN_cjs.FilterBuilder; }
|
|
92
100
|
});
|
|
93
101
|
Object.defineProperty(exports, "FilterRow", {
|
|
94
102
|
enumerable: true,
|
|
95
|
-
get: function () { return
|
|
103
|
+
get: function () { return chunkNXXKG4GN_cjs.FilterRow; }
|
|
96
104
|
});
|
|
97
105
|
Object.defineProperty(exports, "FilterValueInput", {
|
|
98
106
|
enumerable: true,
|
|
99
|
-
get: function () { return
|
|
107
|
+
get: function () { return chunkNXXKG4GN_cjs.FilterValueInput; }
|
|
100
108
|
});
|
|
101
109
|
Object.defineProperty(exports, "Icon", {
|
|
102
110
|
enumerable: true,
|
|
103
|
-
get: function () { return
|
|
111
|
+
get: function () { return chunkNXXKG4GN_cjs.Icon; }
|
|
104
112
|
});
|
|
105
113
|
Object.defineProperty(exports, "Input", {
|
|
106
114
|
enumerable: true,
|
|
107
|
-
get: function () { return
|
|
115
|
+
get: function () { return chunkNXXKG4GN_cjs.Input; }
|
|
108
116
|
});
|
|
109
117
|
Object.defineProperty(exports, "JoinBuilder", {
|
|
110
118
|
enumerable: true,
|
|
111
|
-
get: function () { return
|
|
119
|
+
get: function () { return chunkNXXKG4GN_cjs.JoinBuilder; }
|
|
112
120
|
});
|
|
113
121
|
Object.defineProperty(exports, "JoinRow", {
|
|
114
122
|
enumerable: true,
|
|
115
|
-
get: function () { return
|
|
123
|
+
get: function () { return chunkNXXKG4GN_cjs.JoinRow; }
|
|
116
124
|
});
|
|
117
125
|
Object.defineProperty(exports, "NoData", {
|
|
118
126
|
enumerable: true,
|
|
119
|
-
get: function () { return
|
|
127
|
+
get: function () { return chunkNXXKG4GN_cjs.NoData; }
|
|
120
128
|
});
|
|
121
129
|
Object.defineProperty(exports, "NoResults", {
|
|
122
130
|
enumerable: true,
|
|
123
|
-
get: function () { return
|
|
131
|
+
get: function () { return chunkNXXKG4GN_cjs.NoResults; }
|
|
124
132
|
});
|
|
125
133
|
Object.defineProperty(exports, "Pagination", {
|
|
126
134
|
enumerable: true,
|
|
127
|
-
get: function () { return
|
|
135
|
+
get: function () { return chunkNXXKG4GN_cjs.Pagination; }
|
|
128
136
|
});
|
|
129
137
|
Object.defineProperty(exports, "QueryBuilder", {
|
|
130
138
|
enumerable: true,
|
|
131
|
-
get: function () { return
|
|
139
|
+
get: function () { return chunkNXXKG4GN_cjs.QueryBuilder; }
|
|
132
140
|
});
|
|
133
141
|
Object.defineProperty(exports, "QueryBuilderToolbar", {
|
|
134
142
|
enumerable: true,
|
|
135
|
-
get: function () { return
|
|
143
|
+
get: function () { return chunkNXXKG4GN_cjs.QueryBuilderToolbar; }
|
|
136
144
|
});
|
|
137
145
|
Object.defineProperty(exports, "QueryPreview", {
|
|
138
146
|
enumerable: true,
|
|
139
|
-
get: function () { return
|
|
147
|
+
get: function () { return chunkNXXKG4GN_cjs.QueryPreview; }
|
|
140
148
|
});
|
|
141
149
|
Object.defineProperty(exports, "ResultsTable", {
|
|
142
150
|
enumerable: true,
|
|
143
|
-
get: function () { return
|
|
151
|
+
get: function () { return chunkNXXKG4GN_cjs.ResultsTable; }
|
|
144
152
|
});
|
|
145
153
|
Object.defineProperty(exports, "SavedQueryPicker", {
|
|
146
154
|
enumerable: true,
|
|
147
|
-
get: function () { return
|
|
155
|
+
get: function () { return chunkNXXKG4GN_cjs.SavedQueryPicker; }
|
|
148
156
|
});
|
|
149
157
|
Object.defineProperty(exports, "SchemaExplorer", {
|
|
150
158
|
enumerable: true,
|
|
151
|
-
get: function () { return
|
|
159
|
+
get: function () { return chunkNXXKG4GN_cjs.SchemaExplorer; }
|
|
152
160
|
});
|
|
153
161
|
Object.defineProperty(exports, "Select", {
|
|
154
162
|
enumerable: true,
|
|
155
|
-
get: function () { return
|
|
163
|
+
get: function () { return chunkNXXKG4GN_cjs.Select; }
|
|
156
164
|
});
|
|
157
165
|
Object.defineProperty(exports, "SelectedColumn", {
|
|
158
166
|
enumerable: true,
|
|
159
|
-
get: function () { return
|
|
167
|
+
get: function () { return chunkNXXKG4GN_cjs.SelectedColumn; }
|
|
160
168
|
});
|
|
161
169
|
Object.defineProperty(exports, "Skeleton", {
|
|
162
170
|
enumerable: true,
|
|
163
|
-
get: function () { return
|
|
171
|
+
get: function () { return chunkNXXKG4GN_cjs.Skeleton; }
|
|
164
172
|
});
|
|
165
173
|
Object.defineProperty(exports, "SkeletonChart", {
|
|
166
174
|
enumerable: true,
|
|
167
|
-
get: function () { return
|
|
175
|
+
get: function () { return chunkNXXKG4GN_cjs.SkeletonChart; }
|
|
168
176
|
});
|
|
169
177
|
Object.defineProperty(exports, "SkeletonMetricCard", {
|
|
170
178
|
enumerable: true,
|
|
171
|
-
get: function () { return
|
|
179
|
+
get: function () { return chunkNXXKG4GN_cjs.SkeletonMetricCard; }
|
|
172
180
|
});
|
|
173
181
|
Object.defineProperty(exports, "SkeletonTable", {
|
|
174
182
|
enumerable: true,
|
|
175
|
-
get: function () { return
|
|
183
|
+
get: function () { return chunkNXXKG4GN_cjs.SkeletonTable; }
|
|
176
184
|
});
|
|
177
185
|
Object.defineProperty(exports, "SkeletonText", {
|
|
178
186
|
enumerable: true,
|
|
179
|
-
get: function () { return
|
|
187
|
+
get: function () { return chunkNXXKG4GN_cjs.SkeletonText; }
|
|
180
188
|
});
|
|
181
189
|
Object.defineProperty(exports, "SortBuilder", {
|
|
182
190
|
enumerable: true,
|
|
183
|
-
get: function () { return
|
|
191
|
+
get: function () { return chunkNXXKG4GN_cjs.SortBuilder; }
|
|
184
192
|
});
|
|
185
193
|
Object.defineProperty(exports, "SortRow", {
|
|
186
194
|
enumerable: true,
|
|
187
|
-
get: function () { return
|
|
195
|
+
get: function () { return chunkNXXKG4GN_cjs.SortRow; }
|
|
188
196
|
});
|
|
189
197
|
Object.defineProperty(exports, "TableCell", {
|
|
190
198
|
enumerable: true,
|
|
191
|
-
get: function () { return
|
|
199
|
+
get: function () { return chunkNXXKG4GN_cjs.TableCell; }
|
|
192
200
|
});
|
|
193
201
|
Object.defineProperty(exports, "TableHeader", {
|
|
194
202
|
enumerable: true,
|
|
195
|
-
get: function () { return
|
|
203
|
+
get: function () { return chunkNXXKG4GN_cjs.TableHeader; }
|
|
196
204
|
});
|
|
197
205
|
Object.defineProperty(exports, "TableNode", {
|
|
198
206
|
enumerable: true,
|
|
199
|
-
get: function () { return
|
|
207
|
+
get: function () { return chunkNXXKG4GN_cjs.TableNode; }
|
|
200
208
|
});
|
|
201
209
|
Object.defineProperty(exports, "TableRow", {
|
|
202
210
|
enumerable: true,
|
|
203
|
-
get: function () { return
|
|
211
|
+
get: function () { return chunkNXXKG4GN_cjs.TableRow; }
|
|
204
212
|
});
|
|
205
213
|
Object.defineProperty(exports, "TableSelector", {
|
|
206
214
|
enumerable: true,
|
|
207
|
-
get: function () { return
|
|
215
|
+
get: function () { return chunkNXXKG4GN_cjs.TableSelector; }
|
|
208
216
|
});
|
|
209
217
|
Object.defineProperty(exports, "TimeSeriesConfig", {
|
|
210
218
|
enumerable: true,
|
|
211
|
-
get: function () { return
|
|
219
|
+
get: function () { return chunkNXXKG4GN_cjs.TimeSeriesConfig; }
|
|
212
220
|
});
|
|
213
221
|
Object.defineProperty(exports, "Tooltip", {
|
|
214
222
|
enumerable: true,
|
|
215
|
-
get: function () { return
|
|
223
|
+
get: function () { return chunkNXXKG4GN_cjs.Tooltip; }
|
|
216
224
|
});
|
|
217
225
|
Object.defineProperty(exports, "WidgetErrorBoundary", {
|
|
218
226
|
enumerable: true,
|
|
219
|
-
get: function () { return
|
|
227
|
+
get: function () { return chunkNXXKG4GN_cjs.WidgetErrorBoundary; }
|
|
220
228
|
});
|
|
221
229
|
//# sourceMappingURL=index.cjs.map
|
|
222
230
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { A as AggregationPicker, a as AggregationPickerProps, B as Badge, b as BadgeProps, c as Button, d as ButtonProps, C as
|
|
2
|
-
import { b as QueryTable, J as JoinDefinition, D as DatabaseSchema, T as TimeSeriesConfig$1, C as CalculatedField } from '../types-
|
|
1
|
+
export { A as AggregationPicker, a as AggregationPickerProps, B as Badge, b as BadgeProps, c as Button, d as ButtonProps, C as ChatBubble, e as ChatBubbleProps, f as ChatPanel, g as ChatPanelProps, h as Checkbox, i as CheckboxProps, j as ColumnNode, k as ColumnNodeProps, l as ColumnSelector, m as ColumnSelectorProps, n as CustomSQLEditor, o as CustomSQLEditorProps, D as Dialog, p as DialogFooter, q as DialogFooterProps, r as DialogHeader, s as DialogHeaderProps, t as DialogProps, u as Dropdown, v as DropdownItem, w as DropdownItemProps, x as DropdownProps, y as DropdownSeparator, z as DropdownSeparatorProps, E as EmptyDashboard, F as EmptyDashboardProps, G as EmptyState, H as EmptyStateProps, I as ErrorBoundary, J as ErrorBoundaryProps, K as ErrorFallback, L as ErrorFallbackProps, M as FilterBuilder, N as FilterBuilderProps, O as FilterRow, P as FilterRowProps, Q as FilterValueInput, R as FilterValueInputProps, S as Icon, T as IconName, U as IconProps, V as Input, W as InputProps, X as NoData, Y as NoDataProps, Z as NoResults, _ as NoResultsProps, $ as Pagination, a0 as PaginationProps, a1 as QueryBuilder, a2 as QueryBuilderProps, a3 as QueryBuilderState, a4 as QueryBuilderToolbar, a5 as QueryBuilderToolbarProps, a6 as QueryPreview, a7 as QueryPreviewProps, a8 as ResultsTable, a9 as ResultsTableProps, aa as SavedQueryPicker, ab as SavedQueryPickerProps, ac as SchemaExplorer, ad as SchemaExplorerProps, ae as Select, af as SelectOption, ag as SelectProps, ah as SelectedColumn, ai as SelectedColumnProps, aj as Skeleton, ak as SkeletonChart, al as SkeletonChartProps, am as SkeletonMetricCard, an as SkeletonMetricCardProps, ao as SkeletonProps, ap as SkeletonTable, aq as SkeletonTableProps, ar as SkeletonText, as as SkeletonTextProps, at as SortBuilder, au as SortBuilderProps, av as SortRow, aw as SortRowProps, ax as TableCell, ay as TableCellProps, az as TableHeader, aA as TableHeaderProps, aB as TableNode, aC as TableNodeProps, aD as TableRow, aE as TableRowProps, aF as Tooltip, aG as TooltipProps, aH as WidgetErrorBoundary, aI as WidgetErrorBoundaryProps } from '../ChatBubble-CMkEupzn.cjs';
|
|
2
|
+
import { b as QueryTable, J as JoinDefinition, D as DatabaseSchema, T as TimeSeriesConfig$1, C as CalculatedField } from '../types-BaI6sSAG.cjs';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import { HTMLAttributes } from 'react';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { A as AggregationPicker, a as AggregationPickerProps, B as Badge, b as BadgeProps, c as Button, d as ButtonProps, C as
|
|
2
|
-
import { b as QueryTable, J as JoinDefinition, D as DatabaseSchema, T as TimeSeriesConfig$1, C as CalculatedField } from '../types-
|
|
1
|
+
export { A as AggregationPicker, a as AggregationPickerProps, B as Badge, b as BadgeProps, c as Button, d as ButtonProps, C as ChatBubble, e as ChatBubbleProps, f as ChatPanel, g as ChatPanelProps, h as Checkbox, i as CheckboxProps, j as ColumnNode, k as ColumnNodeProps, l as ColumnSelector, m as ColumnSelectorProps, n as CustomSQLEditor, o as CustomSQLEditorProps, D as Dialog, p as DialogFooter, q as DialogFooterProps, r as DialogHeader, s as DialogHeaderProps, t as DialogProps, u as Dropdown, v as DropdownItem, w as DropdownItemProps, x as DropdownProps, y as DropdownSeparator, z as DropdownSeparatorProps, E as EmptyDashboard, F as EmptyDashboardProps, G as EmptyState, H as EmptyStateProps, I as ErrorBoundary, J as ErrorBoundaryProps, K as ErrorFallback, L as ErrorFallbackProps, M as FilterBuilder, N as FilterBuilderProps, O as FilterRow, P as FilterRowProps, Q as FilterValueInput, R as FilterValueInputProps, S as Icon, T as IconName, U as IconProps, V as Input, W as InputProps, X as NoData, Y as NoDataProps, Z as NoResults, _ as NoResultsProps, $ as Pagination, a0 as PaginationProps, a1 as QueryBuilder, a2 as QueryBuilderProps, a3 as QueryBuilderState, a4 as QueryBuilderToolbar, a5 as QueryBuilderToolbarProps, a6 as QueryPreview, a7 as QueryPreviewProps, a8 as ResultsTable, a9 as ResultsTableProps, aa as SavedQueryPicker, ab as SavedQueryPickerProps, ac as SchemaExplorer, ad as SchemaExplorerProps, ae as Select, af as SelectOption, ag as SelectProps, ah as SelectedColumn, ai as SelectedColumnProps, aj as Skeleton, ak as SkeletonChart, al as SkeletonChartProps, am as SkeletonMetricCard, an as SkeletonMetricCardProps, ao as SkeletonProps, ap as SkeletonTable, aq as SkeletonTableProps, ar as SkeletonText, as as SkeletonTextProps, at as SortBuilder, au as SortBuilderProps, av as SortRow, aw as SortRowProps, ax as TableCell, ay as TableCellProps, az as TableHeader, aA as TableHeaderProps, aB as TableNode, aC as TableNodeProps, aD as TableRow, aE as TableRowProps, aF as Tooltip, aG as TooltipProps, aH as WidgetErrorBoundary, aI as WidgetErrorBoundaryProps } from '../ChatBubble-3mFpV7yX.js';
|
|
2
|
+
import { b as QueryTable, J as JoinDefinition, D as DatabaseSchema, T as TimeSeriesConfig$1, C as CalculatedField } from '../types-BaI6sSAG.js';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import { HTMLAttributes } from 'react';
|
|
5
5
|
|
package/dist/components/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { AggregationPicker, AutoSaveIndicator, Badge, Button, CalculatedFieldBuilder, Checkbox, ColumnNode, ColumnSelector, CustomSQLEditor, Dialog, DialogFooter, DialogHeader, Dropdown, DropdownItem, DropdownSeparator, EmptyDashboard, EmptyState, ErrorBoundary, ErrorFallback, ExpressionEditor, FilterBuilder, FilterRow, FilterValueInput, Icon, Input, JoinBuilder, JoinRow, NoData, NoResults, Pagination, QueryBuilder, QueryBuilderToolbar, QueryPreview, ResultsTable, SavedQueryPicker, SchemaExplorer, Select, SelectedColumn, Skeleton, SkeletonChart, SkeletonMetricCard, SkeletonTable, SkeletonText, SortBuilder, SortRow, TableCell, TableHeader, TableNode, TableRow, TableSelector, TimeSeriesConfig, Tooltip, WidgetErrorBoundary } from '../chunk-
|
|
1
|
+
export { AggregationPicker, AutoSaveIndicator, Badge, Button, CalculatedFieldBuilder, ChatBubble, ChatPanel, Checkbox, ColumnNode, ColumnSelector, CustomSQLEditor, Dialog, DialogFooter, DialogHeader, Dropdown, DropdownItem, DropdownSeparator, EmptyDashboard, EmptyState, ErrorBoundary, ErrorFallback, ExpressionEditor, FilterBuilder, FilterRow, FilterValueInput, Icon, Input, JoinBuilder, JoinRow, NoData, NoResults, Pagination, QueryBuilder, QueryBuilderToolbar, QueryPreview, ResultsTable, SavedQueryPicker, SchemaExplorer, Select, SelectedColumn, Skeleton, SkeletonChart, SkeletonMetricCard, SkeletonTable, SkeletonText, SortBuilder, SortRow, TableCell, TableHeader, TableNode, TableRow, TableSelector, TimeSeriesConfig, Tooltip, WidgetErrorBoundary } from '../chunk-VEFYFB5H.js';
|
|
2
2
|
import '../chunk-T6STUE7E.js';
|
|
3
3
|
import '../chunk-LBE6GIBC.js';
|
|
4
4
|
//# sourceMappingURL=index.js.map
|