-
+
{workbook.SheetNames.map((name: string, idx: number) => {
return (
-
+ <>
+
+ >
);
})}
diff --git a/packages/components/src/components/Map.tsx b/packages/components/src/components/Map.tsx
index 77e3c1de..d17fbd4c 100644
--- a/packages/components/src/components/Map.tsx
+++ b/packages/components/src/components/Map.tsx
@@ -6,9 +6,10 @@ import {
MapContainer,
TileLayer,
GeoJSON as GeoJSONLayer,
- LayersControl
+ LayersControl,
} from 'react-leaflet';
+import 'leaflet/dist/leaflet.css';
import * as L from 'leaflet';
export type MapProps = {
@@ -131,6 +132,27 @@ export function Map({
{
+ // This resolver an issue in which the bundled map was
+ // not finding the images
+ const leafletBase =
+ 'https://unpkg.com/leaflet@1.9.4/dist/images/';
+
+ const icon = new L.Icon({
+ iconUrl: leafletBase + 'marker-icon.png',
+ iconRetinaUrl: leafletBase + 'marker-icon-2x.png',
+ shadowUrl: leafletBase + 'marker-shadow.png',
+ iconSize: [25, 41],
+ iconAnchor: [12, 41],
+ popupAnchor: [1, -34],
+ tooltipAnchor: [16, -28],
+ shadowSize: [41, 41],
+ });
+
+ const iconMarker = L.marker(latlng, { icon });
+ return iconMarker;
+ }}
style={(geoJsonFeature: any) => {
// Set the fill color of each feature when appliable
if (
diff --git a/packages/components/src/index.css b/packages/components/src/index.css
index 7a21fb11..54adfe4a 100644
--- a/packages/components/src/index.css
+++ b/packages/components/src/index.css
@@ -1,7 +1,9 @@
@import "tailwindcss/base";
@import "tailwindcss/components";
-@import "leaflet";
@import "include";
+@import "leaflet";
+@import 'ag-grid-community/styles/ag-grid.css';
+@import 'ag-grid-community/styles/ag-theme-alpine.css';
@import "tailwindcss/utilities";
diff --git a/packages/components/src/index.ts b/packages/components/src/index.ts
index 1302d7e7..922776a5 100644
--- a/packages/components/src/index.ts
+++ b/packages/components/src/index.ts
@@ -6,3 +6,4 @@ export * from "./components/VegaLite";
export * from "./components/FlatUiTable";
export * from './components/OpenLayers/OpenLayers';
export * from "./components/Map";
+export * from "./components/Excel";
diff --git a/packages/components/stories/Excel.stories.ts b/packages/components/stories/Excel.stories.ts
index 9ef67d1a..6c0939c5 100644
--- a/packages/components/stories/Excel.stories.ts
+++ b/packages/components/stories/Excel.stories.ts
@@ -10,7 +10,7 @@ const meta: Meta = {
argTypes: {
url: {
description:
- 'Data to be displayed.\n\n E.g.: [["1990", 1], ["1991", 2]] \n\nOR\n\n "https://url.to/data.csv"',
+ 'Url of the file to be displayed e.g.: "https://url.to/data.csv"',
},
},
};
@@ -19,9 +19,16 @@ export default meta;
type Story = StoryObj;
-export const FromURL: Story = {
- name: 'Excel spreadsheet from URL',
+export const SingleSheet: Story = {
+ name: 'Excel file with just one sheet',
args: {
url: 'https://sheetjs.com/pres.xlsx',
},
};
+
+export const MultipleSheet: Story = {
+ name: 'Excel file with multiple sheets',
+ args: {
+ url: 'https://www.smartsheet.com/sites/default/files/IC-Gantt-Chart-Project-Template-8857.xlsx',
+ },
+};