Spaces:
Running
Running
| export const sampleDatasets = { | |
| basic: { | |
| data: [ | |
| ["Alice Johnson", 25, "true", "2023-01-15"], | |
| ["Bob Smith", 30, "false", "2023-02-20"], | |
| ["Charlie Brown", 35, "true", "2023-03-10"], | |
| ["Diana Prince", 28, "false", "2023-04-05"], | |
| ["Eve Wilson", 32, "true", "2023-05-12"], | |
| ], | |
| headers: ["Name", "Age", "Active", "Date"], | |
| datatypes: ["str", "number", "bool", "date"], | |
| config: { | |
| editable: true, | |
| show_row_numbers: true, | |
| show_search: "search", | |
| show_copy_button: true, | |
| show_fullscreen_button: true, | |
| max_height: 400, | |
| label: "Employee Database", | |
| show_label: true, | |
| line_breaks: true, | |
| wrap: false, | |
| }, | |
| }, | |
| compact: { | |
| data: [ | |
| ["AAPL", 150.25, 2.34, "π"], | |
| ["GOOGL", 2845.67, -15.23, "π"], | |
| ["MSFT", 412.89, 8.91, "π"], | |
| ["TSLA", 238.45, -4.12, "π"], | |
| ["AMZN", 3456.78, 12.34, "π"], | |
| ["META", 487.23, -2.87, "π"], | |
| ["NVDA", 875.23, 45.67, "π"], | |
| ["NFLX", 425.18, -8.92, "π"], | |
| ], | |
| headers: ["Symbol", "Price", "Change", "Trend"], | |
| datatypes: ["str", "number", "number", "str"], | |
| config: { | |
| editable: false, | |
| show_row_numbers: false, | |
| show_search: "none", | |
| show_copy_button: false, | |
| show_fullscreen_button: false, | |
| max_height: 200, | |
| label: "", | |
| show_label: false, | |
| line_breaks: false, | |
| wrap: false, | |
| }, | |
| }, | |
| filterable: { | |
| data: [ | |
| ["John Doe", "Engineering", "Senior", 95000, "true"], | |
| ["Jane Smith", "Marketing", "Manager", 75000, "true"], | |
| ["Mike Johnson", "Sales", "Junior", 45000, "false"], | |
| ["Sarah Wilson", "Engineering", "Lead", 120000, "true"], | |
| ["David Brown", "HR", "Specialist", 55000, "true"], | |
| ["Emily Davis", "Finance", "Analyst", 65000, "false"], | |
| ["Tom Anderson", "Engineering", "Junior", 70000, "true"], | |
| ["Lisa Garcia", "Marketing", "Senior", 85000, "false"], | |
| ["James Miller", "Sales", "Manager", 90000, "true"], | |
| ["Maria Rodriguez", "Finance", "Senior", 95000, "true"], | |
| ], | |
| headers: ["Name", "Department", "Level", "Salary", "Remote"], | |
| datatypes: ["str", "str", "str", "number", "bool"], | |
| config: { | |
| editable: true, | |
| show_row_numbers: true, | |
| show_search: "filter", | |
| show_copy_button: true, | |
| show_fullscreen_button: true, | |
| max_height: 350, | |
| label: "Employee Directory with Filters", | |
| show_label: true, | |
| line_breaks: true, | |
| wrap: false, | |
| }, | |
| }, | |
| readonly: { | |
| data: [ | |
| ["Q1 2023", "Revenue", 125000, "15% increase from Q4"], | |
| ["Q1 2023", "Expenses", 85000, "5% decrease from Q4"], | |
| ["Q1 2023", "Profit", 40000, "35% increase from Q4"], | |
| ["Q2 2023", "Revenue", 145000, "16% increase from Q1"], | |
| ["Q2 2023", "Expenses", 90000, "6% increase from Q1"], | |
| ["Q2 2023", "Profit", 55000, "37% increase from Q1"], | |
| ], | |
| headers: ["Period", "Category", "Amount", "Change"], | |
| datatypes: ["str", "str", "number", "str"], | |
| config: { | |
| editable: false, | |
| show_row_numbers: true, | |
| show_search: "search", | |
| show_copy_button: true, | |
| show_fullscreen_button: true, | |
| max_height: 300, | |
| label: "Financial Report (Read-Only)", | |
| show_label: true, | |
| line_breaks: true, | |
| wrap: true, | |
| }, | |
| }, | |
| wrapped: { | |
| data: [ | |
| [ | |
| "Bug Fix", | |
| "Fixed critical issue with user authentication that was causing login failures for users with special characters in their email addresses", | |
| "High", | |
| "Completed", | |
| ], | |
| [ | |
| "Feature", | |
| "Implemented new dashboard analytics with real-time data visualization including charts, graphs, and interactive elements", | |
| "Medium", | |
| "In Progress", | |
| ], | |
| [ | |
| "Enhancement", | |
| "Optimized database queries to improve application performance and reduce load times across all user-facing pages", | |
| "Low", | |
| "Testing", | |
| ], | |
| [ | |
| "Bug Fix", | |
| "Resolved mobile responsiveness issues on the checkout page that were affecting user experience on smaller screens", | |
| "High", | |
| "Completed", | |
| ], | |
| ], | |
| headers: ["Type", "Description", "Priority", "Status"], | |
| datatypes: ["str", "str", "str", "str"], | |
| config: { | |
| editable: true, | |
| show_row_numbers: true, | |
| show_search: "search", | |
| show_copy_button: true, | |
| show_fullscreen_button: true, | |
| max_height: 400, | |
| label: "Task Management with Text Wrapping", | |
| show_label: true, | |
| line_breaks: true, | |
| wrap: true, | |
| max_chars: 100, | |
| }, | |
| }, | |
| large: { | |
| data: Array.from({ length: 50 }, (_, i) => [ | |
| `User ${i + 1}`, | |
| `user${i + 1}@example.com`, | |
| Math.floor(Math.random() * 50) + 18, | |
| Math.random() > 0.5 ? "true" : "false", | |
| new Date( | |
| 2023, | |
| Math.floor(Math.random() * 12), | |
| Math.floor(Math.random() * 28) + 1 | |
| ) | |
| .toISOString() | |
| .split("T")[0], | |
| (Math.random() * 100000).toFixed(2), | |
| Math.floor(Math.random() * 5) + 1, | |
| ]), | |
| headers: [ | |
| "Name", | |
| "Email", | |
| "Age", | |
| "Active", | |
| "Join Date", | |
| "Revenue", | |
| "Rating", | |
| ], | |
| datatypes: ["str", "str", "number", "bool", "date", "number", "number"], | |
| config: { | |
| editable: true, | |
| show_row_numbers: true, | |
| show_search: "filter", | |
| show_copy_button: true, | |
| show_fullscreen_button: true, | |
| max_height: 500, | |
| label: "Large Dataset (50 rows)", | |
| show_label: true, | |
| line_breaks: true, | |
| wrap: false, | |
| }, | |
| }, | |
| mixed: { | |
| data: [ | |
| [ | |
| "**Product A**", | |
| 99.99, | |
| "Available", | |
| "https://example.com", | |
| "<span style='color: green'>β In Stock</span>", | |
| ], | |
| [ | |
| "*Product B*", | |
| 149.99, | |
| "Out of Stock", | |
| "https://example.com", | |
| "<span style='color: red'>β Unavailable</span>", | |
| ], | |
| [ | |
| "Product C", | |
| 79.99, | |
| "Limited", | |
| "https://example.com", | |
| "<span style='color: orange'>β Few Left</span>", | |
| ], | |
| [ | |
| "~~Product D~~", | |
| 199.99, | |
| "Discontinued", | |
| "https://example.com", | |
| "<span style='color: gray'>- Discontinued</span>", | |
| ], | |
| ], | |
| headers: ["Product", "Price", "Status", "URL", "Availability"], | |
| datatypes: ["markdown", "number", "str", "str", "html"], | |
| config: { | |
| editable: true, | |
| show_row_numbers: false, | |
| show_search: "search", | |
| show_copy_button: true, | |
| show_fullscreen_button: true, | |
| max_height: 300, | |
| label: "Rich Content (HTML & Markdown)", | |
| show_label: true, | |
| line_breaks: true, | |
| wrap: false, | |
| }, | |
| }, | |
| minimal: { | |
| data: [ | |
| ["Task 1", "Complete"], | |
| ["Task 2", "Pending"], | |
| ["Task 3", "In Progress"], | |
| ["Task 4", "Complete"], | |
| ], | |
| headers: ["Task", "Status"], | |
| datatypes: ["str", "str"], | |
| config: { | |
| editable: true, | |
| show_row_numbers: false, | |
| show_search: "none", | |
| show_copy_button: false, | |
| show_fullscreen_button: false, | |
| max_height: 200, | |
| label: "", | |
| show_label: false, | |
| line_breaks: false, | |
| wrap: false, | |
| }, | |
| }, | |
| }; | |