utopia ui alpha 187

This commit is contained in:
Anton Tranelis 2024-07-11 13:59:11 +02:00
parent 935f0aeed9
commit dd29f971d7
4 changed files with 23 additions and 20 deletions

35
package-lock.json generated
View File

@ -17,7 +17,7 @@
"react-dom": "^18.2.0",
"react-rnd": "^10.4.1",
"react-router-dom": "^6.23.0",
"utopia-ui": "^3.0.0-alpha.178"
"utopia-ui": "^3.0.0-alpha.187"
},
"devDependencies": {
"@types/react": "^18.2.79",
@ -1969,20 +1969,20 @@
}
},
"node_modules/@tanstack/query-core": {
"version": "5.45.0",
"resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.45.0.tgz",
"integrity": "sha512-RVfIZQmFUTdjhSAAblvueimfngYyfN6HlwaJUPK71PKd7yi43Vs1S/rdimmZedPWX/WGppcq/U1HOj7O7FwYxw==",
"version": "5.51.1",
"resolved": "https://registry.npmjs.org/@tanstack/query-core/-/query-core-5.51.1.tgz",
"integrity": "sha512-fJBMQMpo8/KSsWW5ratJR5+IFr7YNJ3K2kfP9l5XObYHsgfVy1w3FJUWU4FT2fj7+JMaEg33zOcNDBo0LMwHnw==",
"funding": {
"type": "github",
"url": "https://github.com/sponsors/tannerlinsley"
}
},
"node_modules/@tanstack/react-query": {
"version": "5.45.1",
"resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.45.1.tgz",
"integrity": "sha512-mYYfJujKg2kxmkRRjA6nn4YKG3ITsKuH22f1kteJ5IuVQqgKUgbaSQfYwVP0gBS05mhwxO03HVpD0t7BMN7WOA==",
"version": "5.51.1",
"resolved": "https://registry.npmjs.org/@tanstack/react-query/-/react-query-5.51.1.tgz",
"integrity": "sha512-s47HKFnQ4HOJAHoIiXcpna/roMMPZJPy6fJ6p4ZNVn8+/onlLBEDd1+xc8OnDuwgvecqkZD7Z2mnSRbcWefrKw==",
"dependencies": {
"@tanstack/query-core": "5.45.0"
"@tanstack/query-core": "5.51.1"
},
"funding": {
"type": "github",
@ -2646,7 +2646,9 @@
}
},
"node_modules/caniuse-lite": {
"version": "1.0.30001540",
"version": "1.0.30001640",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001640.tgz",
"integrity": "sha512-lA4VMpW0PSUrFnkmVuEKBUovSWKhj7puyCg8StBChgu298N1AtuF1sKWEvfDuimSEDbhlb/KqPKC3fs1HbuQUA==",
"dev": true,
"funding": [
{
@ -2661,8 +2663,7 @@
"type": "github",
"url": "https://github.com/sponsors/ai"
}
],
"license": "CC-BY-4.0"
]
},
"node_modules/ccount": {
"version": "2.0.1",
@ -7086,9 +7087,9 @@
}
},
"node_modules/unified": {
"version": "11.0.4",
"resolved": "https://registry.npmjs.org/unified/-/unified-11.0.4.tgz",
"integrity": "sha512-apMPnyLjAX+ty4OrNap7yumyVAMlKx5IWU2wlzzUdYJO9A8f1p9m/gywF/GM2ZDFcjQPrx59Mc90KwmxsoklxQ==",
"version": "11.0.5",
"resolved": "https://registry.npmjs.org/unified/-/unified-11.0.5.tgz",
"integrity": "sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA==",
"dependencies": {
"@types/unist": "^3.0.0",
"bail": "^2.0.0",
@ -7249,9 +7250,9 @@
"license": "MIT"
},
"node_modules/utopia-ui": {
"version": "3.0.0-alpha.178",
"resolved": "https://registry.npmjs.org/utopia-ui/-/utopia-ui-3.0.0-alpha.178.tgz",
"integrity": "sha512-Xn4ESlLiarr9vEUVdgY+G6DyaeKYbcygDo6bicYQBg59qhRVJrU1GQnsUOogNgKZAVTzAtuWULL+rtUnBlzwkQ==",
"version": "3.0.0-alpha.187",
"resolved": "https://registry.npmjs.org/utopia-ui/-/utopia-ui-3.0.0-alpha.187.tgz",
"integrity": "sha512-LTVapROcVO/RaHnPMzPYWdW/xo4qEfikeBAGBv6/HLH30Oh/C4GnBdAn/raXA8hOzWyhSEzA+gfp+QjdjpY6lA==",
"dependencies": {
"@heroicons/react": "^2.0.17",
"@tanstack/react-query": "^5.17.8",

View File

@ -19,7 +19,7 @@
"react-dom": "^18.2.0",
"react-rnd": "^10.4.1",
"react-router-dom": "^6.23.0",
"utopia-ui": "^3.0.0-alpha.178"
"utopia-ui": "^3.0.0-alpha.187"
},
"devDependencies": {
"@types/react": "^18.2.79",

View File

@ -53,7 +53,7 @@ function App() {
const getLayers = async () => {
const layers = await layersApiInstance?.getItems();
layers && setLayers(layers);
setLayerPageRoutes(layers?.map((l: any) => ({
setLayerPageRoutes(layers?.filter((l: any) => l.listed).map((l: any) => ({
path: '/' + l.name, // url
icon: <img src={"https://api.utopia-lab.org/assets/" + l.indexIcon}></img>,
name: l.name, // name that appear in Sidebar

View File

@ -37,7 +37,7 @@ function MapContainer({ layers, map }: { layers: Array<LayerProps>, map: any })
return (
<UtopiaMap geo={map.geo} zoom={map.zoom || 5} center={map.center ? [map.center?.coordinates[1], map.center?.coordinates[0]] : [50.6, 9.5]} height='100%' width="100%" >
<UtopiaMap geo={map.geo} zoom={map.zoom || 5} center={map.center ? [map.center?.coordinates[1], map.center?.coordinates[0]] : [50.6, 9.5]} height='100%' width="100%" showFilterControl={map.show_filter_control} showLayerControl={map.show_layer_control} >
{layers && apis &&
layers.map(layer =>
<Layer
@ -50,6 +50,7 @@ function MapContainer({ layers, map }: { layers: Array<LayerProps>, map: any })
markerShape={layer.markerShape}
onlyOnePerOwner={layer.onlyOnePerOwner}
markerDefaultColor={layer.menuColor}
markerDefaultColor2={layer.markerDefaultColor2}
itemType={layer.itemType}
itemNameField='name'
itemTextField='text'
@ -62,6 +63,7 @@ function MapContainer({ layers, map }: { layers: Array<LayerProps>, map: any })
customEditLink='/edit-item'
customEditParameter='id'
public_edit_items={layer.public_edit_items}
listed={layer.listed}
api={apis?.find(api => api.id === layer.id)?.api}>
<ItemView>
{layer.itemType.show_start_end &&