@sqlrooms/sql-editor 0.6.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/README.md +409 -0
  2. package/dist/CreateTableModal.d.ts.map +1 -1
  3. package/dist/CreateTableModal.js +10 -4
  4. package/dist/CreateTableModal.js.map +1 -1
  5. package/dist/SqlEditor.d.ts +1 -14
  6. package/dist/SqlEditor.d.ts.map +1 -1
  7. package/dist/SqlEditor.js +111 -183
  8. package/dist/SqlEditor.js.map +1 -1
  9. package/dist/SqlEditorModal.d.ts.map +1 -1
  10. package/dist/SqlEditorModal.js +8 -4
  11. package/dist/SqlEditorModal.js.map +1 -1
  12. package/dist/SqlEditorSlice.d.ts +102 -5
  13. package/dist/SqlEditorSlice.d.ts.map +1 -1
  14. package/dist/SqlEditorSlice.js +107 -30
  15. package/dist/SqlEditorSlice.js.map +1 -1
  16. package/dist/SqlMonacoEditor.d.ts +30 -0
  17. package/dist/SqlMonacoEditor.d.ts.map +1 -0
  18. package/dist/SqlMonacoEditor.js +205 -0
  19. package/dist/SqlMonacoEditor.js.map +1 -0
  20. package/dist/SqlQueryDataSourcesPanel.js +2 -3
  21. package/dist/SqlQueryDataSourcesPanel.js.map +1 -1
  22. package/dist/components/internal/SqlMonacoEditor.d.ts +36 -0
  23. package/dist/components/internal/SqlMonacoEditor.d.ts.map +1 -0
  24. package/dist/components/internal/SqlMonacoEditor.js +219 -0
  25. package/dist/components/internal/SqlMonacoEditor.js.map +1 -0
  26. package/dist/constants/duckdb-dialect.d.ts +73 -0
  27. package/dist/constants/duckdb-dialect.d.ts.map +1 -0
  28. package/dist/constants/duckdb-dialect.js +392 -0
  29. package/dist/constants/duckdb-dialect.js.map +1 -0
  30. package/dist/constants/duckdb.d.ts +73 -0
  31. package/dist/constants/duckdb.d.ts.map +1 -0
  32. package/dist/constants/duckdb.js +392 -0
  33. package/dist/constants/duckdb.js.map +1 -0
  34. package/dist/hooks/index.d.ts +5 -0
  35. package/dist/hooks/index.d.ts.map +1 -0
  36. package/dist/hooks/index.js +5 -0
  37. package/dist/hooks/index.js.map +1 -0
  38. package/dist/hooks/useMonacoEditor.d.ts +13 -0
  39. package/dist/hooks/useMonacoEditor.d.ts.map +1 -0
  40. package/dist/hooks/useMonacoEditor.js +78 -0
  41. package/dist/hooks/useMonacoEditor.js.map +1 -0
  42. package/dist/hooks/useQueryExecution.d.ts +17 -0
  43. package/dist/hooks/useQueryExecution.d.ts.map +1 -0
  44. package/dist/hooks/useQueryExecution.js +61 -0
  45. package/dist/hooks/useQueryExecution.js.map +1 -0
  46. package/dist/hooks/useQueryTabManagement.d.ts +41 -0
  47. package/dist/hooks/useQueryTabManagement.d.ts.map +1 -0
  48. package/dist/hooks/useQueryTabManagement.js +95 -0
  49. package/dist/hooks/useQueryTabManagement.js.map +1 -0
  50. package/dist/hooks/useTableManagement.d.ts +14 -0
  51. package/dist/hooks/useTableManagement.d.ts.map +1 -0
  52. package/dist/hooks/useTableManagement.js +46 -0
  53. package/dist/hooks/useTableManagement.js.map +1 -0
  54. package/dist/index.d.ts +6 -2
  55. package/dist/index.d.ts.map +1 -1
  56. package/dist/index.js +6 -2
  57. package/dist/index.js.map +1 -1
  58. package/package.json +12 -9
package/README.md ADDED
@@ -0,0 +1,409 @@
1
+ This package is part of the SQLRooms framework.
2
+
3
+ # SQL Editor
4
+
5
+ A powerful SQL editor component for SQLRooms applications. This package provides React components and hooks for creating interactive SQL query interfaces with Monaco editor integration, table management, and results visualization.
6
+
7
+ ## Features
8
+
9
+ - 🔍 **Advanced SQL Editing**: Monaco-based SQL editor with syntax highlighting and auto-completion
10
+ - 📊 **Data Visualization**: View query results in interactive data tables
11
+ - 📑 **Multiple Tabs**: Support for multiple query tabs with save/rename/delete functionality
12
+ - 🔄 **State Management**: Zustand-based state management for SQL editor state
13
+ - 📦 **Table Management**: Browser for tables in the database with schema information
14
+ - 📤 **Data Export**: Export query results to CSV files
15
+ - 📝 **Documentation**: Optional documentation panel for SQL reference
16
+
17
+ ## Installation
18
+
19
+ ```bash
20
+ npm install @sqlrooms/sql-editor
21
+ ```
22
+
23
+ ## Basic Usage
24
+
25
+ ### Simple SQL Editor
26
+
27
+ The most basic way to use the SQL Editor with show/hide functionality:
28
+
29
+ ```tsx
30
+ import {SqlEditor} from '@sqlrooms/sql-editor';
31
+ import {useDisclosure} from '@sqlrooms/ui';
32
+
33
+ function MyApp() {
34
+ const {isOpen, onOpen, onClose} = useDisclosure({defaultIsOpen: true});
35
+
36
+ return (
37
+ <div className="my-app">
38
+ <button onClick={isOpen ? onClose : onOpen}>
39
+ {isOpen ? 'Hide' : 'Show'} SQL Editor
40
+ </button>
41
+
42
+ {isOpen && <SqlEditor isOpen={true} onClose={onClose} />}
43
+ </div>
44
+ );
45
+ }
46
+ ```
47
+
48
+ ### SQL Editor with Custom Configuration
49
+
50
+ Using the SQL Editor with project store integration for advanced functionality:
51
+
52
+ ```tsx
53
+ import {SqlEditor} from '@sqlrooms/sql-editor';
54
+ import {useProjectStore} from './store';
55
+
56
+ function AdvancedEditor() {
57
+ // Use the store to access SQL editor state and actions
58
+ const executeQuery = useProjectStore((state) => state.executeQuery);
59
+ const currentQuery = useProjectStore((state) => state.getCurrentQuery());
60
+
61
+ return (
62
+ <div className="sql-workspace">
63
+ <h2>SQL Workspace</h2>
64
+
65
+ <div className="tools">
66
+ <button onClick={() => executeQuery(currentQuery)}>Run Query</button>
67
+ <button onClick={() => exportResultsToCsv()}>Export Results</button>
68
+ </div>
69
+
70
+ <SqlEditor
71
+ isOpen={true}
72
+ onClose={() => {}}
73
+ schema="analytics"
74
+ initialQuery="SELECT * FROM users LIMIT 10;"
75
+ />
76
+ </div>
77
+ );
78
+ }
79
+ ```
80
+
81
+ ### With Custom Documentation Panel
82
+
83
+ Adding a custom documentation panel to provide SQL reference materials:
84
+
85
+ ```tsx
86
+ import {SqlEditor} from '@sqlrooms/sql-editor';
87
+ import {useDisclosure} from '@sqlrooms/ui';
88
+
89
+ function AdvancedSqlEditor() {
90
+ const {isOpen, onClose} = useDisclosure({defaultIsOpen: true});
91
+
92
+ // Custom documentation component
93
+ const Documentation = () => (
94
+ <div className="p-4">
95
+ <h2 className="text-xl font-bold mb-4">SQL Reference</h2>
96
+ <div className="space-y-4">
97
+ <div>
98
+ <h3 className="text-lg font-semibold">SELECT</h3>
99
+ <p>Retrieves data from a table</p>
100
+ <pre className="bg-gray-100 p-2 rounded mt-2">
101
+ SELECT column1, column2 FROM table_name;
102
+ </pre>
103
+ </div>
104
+ {/* More documentation items */}
105
+ </div>
106
+ </div>
107
+ );
108
+
109
+ return (
110
+ <SqlEditor
111
+ isOpen={isOpen}
112
+ onClose={onClose}
113
+ schema="analytics"
114
+ documentationPanel={<Documentation />}
115
+ />
116
+ );
117
+ }
118
+ ```
119
+
120
+ ### Using SQL Monaco Editor Standalone
121
+
122
+ For cases where you only need the editor component without the full interface:
123
+
124
+ ```tsx
125
+ import {SqlMonacoEditor} from '@sqlrooms/sql-editor';
126
+
127
+ function SimpleSqlEditor() {
128
+ const [query, setQuery] = useState('SELECT * FROM products');
129
+
130
+ const handleExecute = () => {
131
+ // Execute the query using your own logic
132
+ console.log('Executing query:', query);
133
+ };
134
+
135
+ return (
136
+ <>
137
+ <SqlMonacoEditor
138
+ value={query}
139
+ onChange={setQuery}
140
+ onExecuteQuery={handleExecute}
141
+ height="400px"
142
+ />
143
+ <button onClick={handleExecute}>Execute</button>
144
+ </>
145
+ );
146
+ }
147
+ ```
148
+
149
+ ## State Management
150
+
151
+ The SQL editor provides a Zustand slice for managing state. You can use it in two ways:
152
+
153
+ ### Using in a Combined SQLRooms Store
154
+
155
+ This approach is recommended when integrating multiple SQLRooms components:
156
+
157
+ ```tsx
158
+ import {
159
+ createSqlEditorSlice,
160
+ createDefaultSqlEditorConfig,
161
+ SqlEditorSliceState,
162
+ SqlEditorSliceConfig,
163
+ } from '@sqlrooms/sql-editor';
164
+ import {
165
+ createProjectSlice,
166
+ createProjectStore,
167
+ ProjectState,
168
+ } from '@sqlrooms/project-builder';
169
+ import {BaseProjectConfig} from '@sqlrooms/project-config';
170
+ import {
171
+ createAiSlice,
172
+ createDefaultAiConfig,
173
+ AiSliceState,
174
+ AiSliceConfig,
175
+ } from '@sqlrooms/ai';
176
+ import {z} from 'zod';
177
+
178
+ // 1. Define combined config schema
179
+ export const AppConfig =
180
+ BaseProjectConfig.merge(SqlEditorSliceConfig).merge(AiSliceConfig);
181
+ export type AppConfig = z.infer<typeof AppConfig>;
182
+
183
+ // 2. Define combined state type
184
+ export type AppState = ProjectState<AppConfig> &
185
+ SqlEditorSliceState &
186
+ AiSliceState;
187
+
188
+ // 3. Create combined store
189
+ export const {projectStore, useProjectStore} = createProjectStore<
190
+ AppConfig,
191
+ AppState
192
+ >((set, get, store) => ({
193
+ // Base project slice
194
+ ...createProjectSlice<AppConfig>({
195
+ project: {
196
+ config: {
197
+ title: 'SQL Workspace',
198
+ // ... other project config
199
+ ...createDefaultSqlEditorConfig(),
200
+ ...createDefaultAiConfig(),
201
+ },
202
+ // ... panels config
203
+ },
204
+ })(set, get, store),
205
+
206
+ // Sql editor slice
207
+ ...createSqlEditorSlice()(set, get, store),
208
+
209
+ // Ai slice
210
+ ...createAiSlice()(set, get, store),
211
+ }));
212
+
213
+ // 4. Use the store in components
214
+ function MyComponent() {
215
+ // Access SQL editor state and actions
216
+ const executeQuery = useProjectStore((state) => state.executeQuery);
217
+ const createQueryTab = useProjectStore((state) => state.createQueryTab);
218
+
219
+ // Use actions
220
+ const handleExecute = () => {
221
+ executeQuery('SELECT * FROM users LIMIT 10');
222
+ };
223
+
224
+ return (
225
+ <div>
226
+ <button onClick={handleExecute}>Run Query</button>
227
+ <SqlEditor store={useProjectStore} />
228
+ </div>
229
+ );
230
+ }
231
+ ```
232
+
233
+ ### Standalone SQL Editor Store
234
+
235
+ For simpler use cases where you only need the SQL editor:
236
+
237
+ ```tsx
238
+ // Create default configuration
239
+ const config = createDefaultSqlEditorConfig();
240
+
241
+ // Create a store with the SQL editor slice
242
+ const useStore = createProjectStore({
243
+ sqlEditor: createSqlEditorSlice(config),
244
+ });
245
+
246
+ // Use the store in components with the provided selector hook
247
+ const {executeQuery, getCurrentQuery} = useStoreWithSqlEditor(useStore);
248
+ ```
249
+
250
+ ### Available State Actions
251
+
252
+ - `executeQuery(query: string, schema?: string)`: Execute a SQL query
253
+ - `exportResultsToCsv(results: Table, filename?: string)`: Export results to CSV
254
+ - `createQueryTab(initialQuery?: string)`: Create a new query tab
255
+ - `deleteQueryTab(queryId: string)`: Delete a query tab
256
+ - `renameQueryTab(queryId: string, newName: string)`: Rename a query tab
257
+ - `updateQueryText(queryId: string, queryText: string)`: Update query text
258
+ - `setSelectedQueryId(queryId: string)`: Set the selected query tab
259
+ - `getCurrentQuery(defaultQuery?: string)`: Get current query text
260
+
261
+ ## Available Components
262
+
263
+ ### SqlEditor
264
+
265
+ The main component providing a full-featured SQL editor interface.
266
+
267
+ ```tsx
268
+ import {SqlEditor} from '@sqlrooms/sql-editor';
269
+
270
+ <SqlEditor
271
+ isOpen={boolean}
272
+ onClose={() => void}
273
+ schema="main"
274
+ documentationPanel={ReactNode}
275
+ />
276
+ ```
277
+
278
+ ### SqlMonacoEditor
279
+
280
+ A standalone SQL-specific Monaco editor component.
281
+
282
+ ```tsx
283
+ import {SqlMonacoEditor} from '@sqlrooms/sql-editor';
284
+
285
+ <SqlMonacoEditor
286
+ value="SELECT * FROM users"
287
+ onChange={(value) => console.log(value)}
288
+ onExecuteQuery={() => executeQuery()}
289
+ />;
290
+ ```
291
+
292
+ ### SqlEditorModal
293
+
294
+ A modal wrapper around the SQL editor.
295
+
296
+ ```tsx
297
+ import {SqlEditorModal} from '@sqlrooms/sql-editor';
298
+ import {useDisclosure} from '@sqlrooms/ui';
299
+
300
+ function EditorWithModal() {
301
+ const {isOpen, onOpen, onClose} = useDisclosure();
302
+
303
+ return (
304
+ <>
305
+ <button onClick={onOpen}>Open SQL Editor</button>
306
+ <SqlEditorModal isOpen={isOpen} onClose={onClose} />
307
+ </>
308
+ );
309
+ }
310
+ ```
311
+
312
+ ### CreateTableModal
313
+
314
+ A modal for creating new tables from SQL queries.
315
+
316
+ ```tsx
317
+ import {CreateTableModal} from '@sqlrooms/sql-editor';
318
+ import {useDisclosure} from '@sqlrooms/ui';
319
+
320
+ function TableCreator() {
321
+ const {isOpen, onOpen, onClose} = useDisclosure();
322
+
323
+ return (
324
+ <>
325
+ <button onClick={onOpen}>Create Table from Results</button>
326
+ <CreateTableModal
327
+ isOpen={isOpen}
328
+ onClose={onClose}
329
+ onCreateTable={(tableName) =>
330
+ console.log(`Created table: ${tableName}`)
331
+ }
332
+ tableData={queryResults}
333
+ />
334
+ </>
335
+ );
336
+ }
337
+ ```
338
+
339
+ ### SqlQueryDataSourcesPanel
340
+
341
+ A panel showing available data sources for SQL queries.
342
+
343
+ ```tsx
344
+ import {SqlQueryDataSourcesPanel} from '@sqlrooms/sql-editor';
345
+
346
+ <SqlQueryDataSourcesPanel
347
+ onSelectTable={(tableName) => {
348
+ console.log(`Selected table: ${tableName}`);
349
+ }}
350
+ />;
351
+ ```
352
+
353
+ ## Props
354
+
355
+ ### SqlEditor Props
356
+
357
+ | Prop | Type | Default | Description |
358
+ | ------------------ | ----------- | --------- | -------------------------------------- |
359
+ | isOpen | boolean | - | Whether the editor is open |
360
+ | onClose | function | - | Callback when the editor is closed |
361
+ | schema | string | 'main' | Default schema to use for queries |
362
+ | documentationPanel | ReactNode | undefined | Custom documentation panel to display |
363
+ | initialQuery | string | '' | Initial query to display in the editor |
364
+ | store | StoreObject | undefined | Custom Zustand store to use (optional) |
365
+
366
+ ### SqlMonacoEditor Props
367
+
368
+ | Prop | Type | Default | Description |
369
+ | -------------- | -------- | ------- | -------------------------------------------- |
370
+ | value | string | '' | The SQL query text |
371
+ | onChange | function | - | Callback when the query text changes |
372
+ | onExecuteQuery | function | - | Callback when the execute command is invoked |
373
+ | height | string | '300px' | Height of the editor |
374
+ | readOnly | boolean | false | Whether the editor is read-only |
375
+ | theme | string | 'dark' | Editor theme ('dark' or 'light') |
376
+
377
+ ### SqlEditorModal Props
378
+
379
+ | Prop | Type | Default | Description |
380
+ | ------- | -------- | ------- | --------------------------------- |
381
+ | isOpen | boolean | - | Whether the modal is open |
382
+ | onClose | function | - | Callback when the modal is closed |
383
+ | schema | string | 'main' | Default schema to use for queries |
384
+
385
+ ### CreateTableModal Props
386
+
387
+ | Prop | Type | Default | Description |
388
+ | ------------- | -------- | ------- | ----------------------------------------- |
389
+ | isOpen | boolean | - | Whether the modal is open |
390
+ | onClose | function | - | Callback when the modal is closed |
391
+ | onCreateTable | function | - | Callback when a table is created |
392
+ | tableData | Table | - | Apache Arrow Table data for the new table |
393
+
394
+ ## Configuration
395
+
396
+ The SQL editor can be configured through the Zustand store.
397
+
398
+ ```tsx
399
+ const config = {
400
+ sqlEditor: {
401
+ queries: [
402
+ {id: 'default', name: 'Untitled', query: 'SELECT * FROM users LIMIT 10;'},
403
+ ],
404
+ selectedQueryId: 'default',
405
+ },
406
+ };
407
+ ```
408
+
409
+ For more information, visit the SQLRooms documentation.
@@ -1 +1 @@
1
- {"version":3,"file":"CreateTableModal.d.ts","sourceRoot":"","sources":["../src/CreateTableModal.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAC,kBAAkB,EAAC,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAC,EAAE,EAAc,MAAM,OAAO,CAAC;AAkBtC,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,cAAc,CAAC,EAAE,kBAAkB,CAAC;IACpC,qBAAqB,EAAE,CACrB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,EACb,YAAY,CAAC,EAAE,MAAM,KAClB,OAAO,CAAC,IAAI,CAAC,CAAC;CACpB,CAAC;AAEF,QAAA,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CA0G/C,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"CreateTableModal.d.ts","sourceRoot":"","sources":["../src/CreateTableModal.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,kBAAkB,EAAC,MAAM,0BAA0B,CAAC;AAmB5D,OAAO,EAAC,EAAE,EAAc,MAAM,OAAO,CAAC;AAkBtC,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,cAAc,CAAC,EAAE,kBAAkB,CAAC;IACpC,qBAAqB,EAAE,CACrB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,EACb,YAAY,CAAC,EAAE,MAAM,KAClB,OAAO,CAAC,IAAI,CAAC,CAAC;CACpB,CAAC;AAEF,QAAA,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAiH/C,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -1,10 +1,11 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Button, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, Form, FormControl, FormField, FormItem, FormLabel, FormMessage, Input, Textarea, Alert, AlertDescription, } from '@sqlrooms/ui';
2
+ import { zodResolver } from '@hookform/resolvers/zod';
3
3
  import { DuckQueryError } from '@sqlrooms/duckdb';
4
+ import { Alert, AlertDescription, Button, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, Form, FormControl, FormField, FormItem, FormLabel, FormMessage, Input, } from '@sqlrooms/ui';
4
5
  import { useCallback } from 'react';
5
6
  import { useForm } from 'react-hook-form';
6
7
  import * as z from 'zod';
7
- import { zodResolver } from '@hookform/resolvers/zod';
8
+ import { SqlMonacoEditor } from './SqlMonacoEditor';
8
9
  const VALID_TABLE_OR_COLUMN_REGEX = /^[a-zA-Z_][a-zA-Z0-9_]{0,62}$/;
9
10
  const formSchema = z.object({
10
11
  tableName: z
@@ -17,7 +18,7 @@ const CreateTableModal = (props) => {
17
18
  const { editDataSource, isOpen, onClose, onAddOrUpdateSqlQuery } = props;
18
19
  const form = useForm({
19
20
  resolver: zodResolver(formSchema),
20
- defaultValues: {
21
+ values: {
21
22
  tableName: editDataSource?.tableName ?? '',
22
23
  query: editDataSource?.sqlQuery ?? props.query.trim(),
23
24
  },
@@ -46,7 +47,12 @@ const CreateTableModal = (props) => {
46
47
  // @ts-ignore
47
48
  , {
48
49
  // @ts-ignore
49
- control: form.control, name: "query", render: ({ field }) => (_jsxs(FormItem, { children: [_jsx(FormLabel, { children: "SQL query:" }), _jsx(FormControl, { children: _jsx(Textarea, { ...field, className: "font-mono text-sm bg-secondary min-h-[200px]" }) }), _jsx(FormMessage, {})] })) }), _jsxs(DialogFooter, { children: [_jsx(Button, { type: "button", variant: "outline", onClick: onClose, children: "Cancel" }), _jsx(Button, { type: "submit", disabled: form.formState.isSubmitting, children: editDataSource ? 'Update' : 'Create' })] })] }) }) }) }));
50
+ control: form.control, name: "query", render: ({ field }) => (_jsxs(FormItem, { children: [_jsx(FormLabel, { children: "SQL query:" }), _jsx(FormControl, { children: _jsx(SqlMonacoEditor, { value: field.value, onChange: field.onChange, className: "min-h-[200px]", options: {
51
+ scrollBeyondLastLine: false,
52
+ automaticLayout: true,
53
+ minimap: { enabled: false },
54
+ wordWrap: 'on',
55
+ } }) }), _jsx(FormMessage, {})] })) }), _jsxs(DialogFooter, { children: [_jsx(Button, { type: "button", variant: "outline", onClick: onClose, children: "Cancel" }), _jsx(Button, { type: "submit", disabled: form.formState.isSubmitting, children: editDataSource ? 'Update' : 'Create' })] })] }) }) }) }));
50
56
  };
51
57
  export default CreateTableModal;
52
58
  //# sourceMappingURL=CreateTableModal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CreateTableModal.js","sourceRoot":"","sources":["../src/CreateT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AC,MAAM,CAAC,IAAI,CAAC,OAAO,GAClB,GACb,CACT,EAED,KAAC,SAAS;wBACR,aAAa;;4BAAb,aAAa;4BACb,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,IAAI,EAAC,WAAW,EAChB,MAAM,EAAE,CAAC,EAAC,KAAK,EAAC,EAAE,EAAE,CAAC,CACnB,MAAC,QAAQ,eACP,KAAC,SAAS,8BAAwB,EAClC,KAAC,WAAW,cACV,KAAC,KAAK,OAAK,KAAK,EAAE,SAAS,EAAC,WAAW,EAAC,SAAS,SAAG,GACxC,EACd,KAAC,WAAW,KAAG,IACN,CACZ,GACD,EAEF,KAAC,SAAS;wBACR,aAAa;;4BAAb,aAAa;4BACb,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,IAAI,EAAC,OAAO,EACZ,MAAM,EAAE,CAAC,EAAC,KAAK,EAAC,EAAE,EAAE,CAAC,CACnB,MAAC,QAAQ,eACP,KAAC,SAAS,6BAAuB,EACjC,KAAC,WAAW,cACV,KAAC,QAAQ,OACH,KAAK,EACT,SAAS,EAAC,8CAA8C,GACxD,GACU,EACd,KAAC,WAAW,KAAG,IACN,CACZ,GACD,EAEF,MAAC,YAAY,eACX,KAAC,MAAM,IAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAC,SAAS,EAAC,OAAO,EAAE,OAAO,uBAE/C,EACT,KAAC,MAAM,IAAC,IAAI,EAAC,QAAQ,EAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,YAAY,YACxD,cAAc,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,GAC9B,IACI,IACV,GACF,GACO,GACT,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC","sourcesContent":["import {\n Button,\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n Form,\n FormControl,\n FormField,\n FormItem,\n FormLabel,\n FormMessage,\n Input,\n Textarea,\n Alert,\n AlertDescription,\n} from '@sqlrooms/ui';\nimport {DuckQueryError} from '@sqlrooms/duckdb';\nimport {SqlQueryDataSource} from '@sqlrooms/project-config';\nimport {FC, useCallback} from 'react';\nimport {useForm} from 'react-hook-form';\nimport * as z from 'zod';\nimport {zodResolver} from '@hookform/resolvers/zod';\n\nconst VALID_TABLE_OR_COLUMN_REGEX = /^[a-zA-Z_][a-zA-Z0-9_]{0,62}$/;\n\nconst formSchema = z.object({\n tableName: z\n .string()\n .min(1, 'Table name is required')\n .regex(\n VALID_TABLE_OR_COLUMN_REGEX,\n 'Only letters, digits and underscores are allowed; should not start with a digit',\n ),\n query: z.string().min(1, 'Query is required'),\n});\n\nexport type CreateTableModalProps = {\n query: string;\n isOpen: boolean;\n onClose: () => void;\n editDataSource?: SqlQueryDataSource;\n onAddOrUpdateSqlQuery: (\n tableName: string,\n query: string,\n oldTableName?: string,\n ) => Promise<void>;\n};\n\nconst CreateTableModal: FC<CreateTableModalProps> = (props) => {\n const {editDataSource, isOpen, onClose, onAddOrUpdateSqlQuery} = props;\n\n const form = useForm<z.infer<typeof formSchema>>({\n resolver: zodResolver(formSchema),\n defaultValues: {\n tableName: editDataSource?.tableName ?? '',\n query: editDataSource?.sqlQuery ?? props.query.trim(),\n },\n });\n\n const onSubmit = useCallback(\n async (values: z.infer<typeof formSchema>) => {\n try {\n const {tableName, query} = values;\n await onAddOrUpdateSqlQuery(\n tableName,\n query,\n editDataSource?.tableName,\n );\n form.reset();\n onClose();\n } catch (err) {\n form.setError('root', {\n type: 'manual',\n message:\n err instanceof DuckQueryError ? err.getMessageForUser() : `${err}`,\n });\n }\n },\n [onAddOrUpdateSqlQuery, editDataSource?.tableName, onClose, form],\n );\n\n return (\n <Dialog open={isOpen} onOpenChange={(open) => !open && onClose()}>\n <DialogContent className=\"sm:max-w-[800px]\">\n {/* @ts-ignore */}\n <Form {...form}>\n <form onSubmit={form.handleSubmit(onSubmit)} className=\"space-y-4\">\n <DialogHeader>\n <DialogTitle>\n {editDataSource\n ? 'Edit table query'\n : 'Create table from query'}\n </DialogTitle>\n {!editDataSource && (\n <DialogDescription>\n Create a new table from the results of an SQL query.\n </DialogDescription>\n )}\n </DialogHeader>\n\n {form.formState.errors.root && (\n <Alert variant=\"destructive\">\n <AlertDescription>\n {form.formState.errors.root.message}\n </AlertDescription>\n </Alert>\n )}\n\n <FormField\n // @ts-ignore\n control={form.control}\n name=\"tableName\"\n render={({field}) => (\n <FormItem>\n <FormLabel>Table name:</FormLabel>\n <FormControl>\n <Input {...field} className=\"font-mono\" autoFocus />\n </FormControl>\n <FormMessage />\n </FormItem>\n )}\n />\n\n <FormField\n // @ts-ignore\n control={form.control}\n name=\"query\"\n render={({field}) => (\n <FormItem>\n <FormLabel>SQL query:</FormLabel>\n <FormControl>\n <Textarea\n {...field}\n className=\"font-mono text-sm bg-secondary min-h-[200px]\"\n />\n </FormControl>\n <FormMessage />\n </FormItem>\n )}\n />\n\n <DialogFooter>\n <Button type=\"button\" variant=\"outline\" onClick={onClose}>\n Cancel\n </Button>\n <Button type=\"submit\" disabled={form.formState.isSubmitting}>\n {editDataSource ? 'Update' : 'Create'}\n </Button>\n </DialogFooter>\n </form>\n </Form>\n </DialogContent>\n </Dialog>\n );\n};\n\nexport default CreateTableModal;\n"]}
1
+ {"version":3,"file":"CreateTableModal.js","sourceRoot":"","sources":["../src/CreateTableModal.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAEhD,OAAO,EACL,KAAK,EACL,gBAAgB,EAChB,MAAM,EACN,MAAM,EACN,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,IAAI,EACJ,WAAW,EACX,SAAS,EACT,QAAQ,EACR,SAAS,EACT,WAAW,EACX,KAAK,GACN,MAAM,cAAc,CAAC;AACtB,OAAO,EAAK,WAAW,EAAC,MAAM,OAAO,CA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ACd,KAAC,WAAW,KAAG,IACN,CACZ,GACD,EAEF,KAAC,SAAS;wBACR,aAAa;;4BAAb,aAAa;4BACb,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,IAAI,EAAC,OAAO,EACZ,MAAM,EAAE,CAAC,EAAC,KAAK,EAAC,EAAE,EAAE,CAAC,CACnB,MAAC,QAAQ,eACP,KAAC,SAAS,6BAAuB,EACjC,KAAC,WAAW,cACV,KAAC,eAAe,IACd,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,SAAS,EAAC,eAAe,EACzB,OAAO,EAAE;gDACP,oBAAoB,EAAE,KAAK;gDAC3B,eAAe,EAAE,IAAI;gDACrB,OAAO,EAAE,EAAC,OAAO,EAAE,KAAK,EAAC;gDACzB,QAAQ,EAAE,IAAI;6CACf,GACD,GACU,EACd,KAAC,WAAW,KAAG,IACN,CACZ,GACD,EAEF,MAAC,YAAY,eACX,KAAC,MAAM,IAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAC,SAAS,EAAC,OAAO,EAAE,OAAO,uBAE/C,EACT,KAAC,MAAM,IAAC,IAAI,EAAC,QAAQ,EAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,YAAY,YACxD,cAAc,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,GAC9B,IACI,IACV,GACF,GACO,GACT,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC","sourcesContent":["import {zodResolver} from '@hookform/resolvers/zod';\nimport {DuckQueryError} from '@sqlrooms/duckdb';\nimport {SqlQueryDataSource} from '@sqlrooms/project-config';\nimport {\n Alert,\n AlertDescription,\n Button,\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n Form,\n FormControl,\n FormField,\n FormItem,\n FormLabel,\n FormMessage,\n Input,\n} from '@sqlrooms/ui';\nimport {FC, useCallback} from 'react';\nimport {useForm} from 'react-hook-form';\nimport * as z from 'zod';\nimport {SqlMonacoEditor} from './SqlMonacoEditor';\n\nconst VALID_TABLE_OR_COLUMN_REGEX = /^[a-zA-Z_][a-zA-Z0-9_]{0,62}$/;\n\nconst formSchema = z.object({\n tableName: z\n .string()\n .min(1, 'Table name is required')\n .regex(\n VALID_TABLE_OR_COLUMN_REGEX,\n 'Only letters, digits and underscores are allowed; should not start with a digit',\n ),\n query: z.string().min(1, 'Query is required'),\n});\n\nexport type CreateTableModalProps = {\n query: string;\n isOpen: boolean;\n onClose: () => void;\n editDataSource?: SqlQueryDataSource;\n onAddOrUpdateSqlQuery: (\n tableName: string,\n query: string,\n oldTableName?: string,\n ) => Promise<void>;\n};\n\nconst CreateTableModal: FC<CreateTableModalProps> = (props) => {\n const {editDataSource, isOpen, onClose, onAddOrUpdateSqlQuery} = props;\n\n const form = useForm<z.infer<typeof formSchema>>({\n resolver: zodResolver(formSchema),\n values: {\n tableName: editDataSource?.tableName ?? '',\n query: editDataSource?.sqlQuery ?? props.query.trim(),\n },\n });\n\n const onSubmit = useCallback(\n async (values: z.infer<typeof formSchema>) => {\n try {\n const {tableName, query} = values;\n await onAddOrUpdateSqlQuery(\n tableName,\n query,\n editDataSource?.tableName,\n );\n form.reset();\n onClose();\n } catch (err) {\n form.setError('root', {\n type: 'manual',\n message:\n err instanceof DuckQueryError ? err.getMessageForUser() : `${err}`,\n });\n }\n },\n [onAddOrUpdateSqlQuery, editDataSource?.tableName, onClose, form],\n );\n\n return (\n <Dialog open={isOpen} onOpenChange={(open) => !open && onClose()}>\n <DialogContent className=\"sm:max-w-[800px]\">\n {/* @ts-ignore */}\n <Form {...form}>\n <form onSubmit={form.handleSubmit(onSubmit)} className=\"space-y-4\">\n <DialogHeader>\n <DialogTitle>\n {editDataSource\n ? 'Edit table query'\n : 'Create table from query'}\n </DialogTitle>\n {!editDataSource && (\n <DialogDescription>\n Create a new table from the results of an SQL query.\n </DialogDescription>\n )}\n </DialogHeader>\n\n {form.formState.errors.root && (\n <Alert variant=\"destructive\">\n <AlertDescription>\n {form.formState.errors.root.message}\n </AlertDescription>\n </Alert>\n )}\n\n <FormField\n // @ts-ignore\n control={form.control}\n name=\"tableName\"\n render={({field}) => (\n <FormItem>\n <FormLabel>Table name:</FormLabel>\n <FormControl>\n <Input {...field} className=\"font-mono\" autoFocus />\n </FormControl>\n <FormMessage />\n </FormItem>\n )}\n />\n\n <FormField\n // @ts-ignore\n control={form.control}\n name=\"query\"\n render={({field}) => (\n <FormItem>\n <FormLabel>SQL query:</FormLabel>\n <FormControl>\n <SqlMonacoEditor\n value={field.value}\n onChange={field.onChange}\n className=\"min-h-[200px]\"\n options={{\n scrollBeyondLastLine: false,\n automaticLayout: true,\n minimap: {enabled: false},\n wordWrap: 'on',\n }}\n />\n </FormControl>\n <FormMessage />\n </FormItem>\n )}\n />\n\n <DialogFooter>\n <Button type=\"button\" variant=\"outline\" onClick={onClose}>\n Cancel\n </Button>\n <Button type=\"submit\" disabled={form.formState.isSubmitting}>\n {editDataSource ? 'Update' : 'Create'}\n </Button>\n </DialogFooter>\n </form>\n </Form>\n </DialogContent>\n </Dialog>\n );\n};\n\nexport default CreateTableModal;\n"]}
@@ -9,19 +9,6 @@ export type SqlEditorProps = {
9
9
  /** Callback fired when the SQL editor should be closed */
10
10
  onClose: () => void;
11
11
  };
12
- /**
13
- * A full-featured SQL editor component with query execution, table management, and results visualization.
14
- *
15
- * Features:
16
- * - Multiple query tabs with save/rename/delete functionality
17
- * - Query execution with results displayed in a data table
18
- * - Table browser showing available tables in the schema
19
- * - Export results to CSV
20
- * - Create new tables from query results
21
- * - Optional SQL documentation panel
22
- * - Keyboard shortcuts (Cmd/Ctrl + Enter to run queries)
23
- *
24
- */
25
- declare const SqlEditor: React.FC<SqlEditorProps>;
12
+ declare const SqlEditor: React.NamedExoticComponent<SqlEditorProps>;
26
13
  export default SqlEditor;
27
14
  //# sourceMappingURL=SqlEditor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SqlEditor.d.ts","sourceRoot":"","sources":["../src/SqlEditor.tsx"],"names":[],"mappings":"AAsCA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAStE,MAAM,MAAM,cAAc,GAAG;IAC3B,iEAAiE;IACjE,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,kDAAkD;IAClD,MAAM,EAAE,OAAO,CAAC;IAEhB,uEAAuE;IACvE,kBAAkB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAErC,0DAA0D;IAC1D,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAqcvC,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"SqlEditor.d.ts","sourceRoot":"","sources":["../src/SqlEditor.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAiB9D,MAAM,MAAM,cAAc,GAAG;IAC3B,iEAAiE;IACjE,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,kDAAkD;IAClD,MAAM,EAAE,OAAO,CAAC;IAEhB,uEAAuE;IACvE,kBAAkB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAErC,0DAA0D;IAC1D,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAyaF,QAAA,MAAM,SAAS,4CAA4B,CAAC;AAE5C,eAAe,SAAS,CAAC"}