utopia-ui 3.0.0-alpha.63 → 3.0.0-alpha.65

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.
@@ -1,4 +1,5 @@
1
- /// <reference types="react" />
2
- export declare function Modal({ children }: {
3
- children: any;
1
+ import * as React from "react";
2
+ export declare function Modal({ children, showOnStartup }: {
3
+ children: React.ReactNode;
4
+ showOnStartup?: boolean;
4
5
  }): JSX.Element;
package/dist/index.js CHANGED
@@ -2470,7 +2470,7 @@ function capitalizeFirstLetter(string) {
2470
2470
  // for refreshing map on resize (needs to be implemented)
2471
2471
  var mapDivRef = React.createRef();
2472
2472
  function UtopiaMap(_a) {
2473
- var _b = _a.height, height = _b === void 0 ? "500px" : _b, _c = _a.width, width = _c === void 0 ? "100%" : _c, _d = _a.center, center = _d === void 0 ? new LatLng(50.6, 9.5) : _d, _e = _a.zoom, zoom = _e === void 0 ? 10 : _e, children = _a.children;
2473
+ var _b = _a.height, height = _b === void 0 ? "500px" : _b, _c = _a.width, width = _c === void 0 ? "100%" : _c, _d = _a.center, center = _d === void 0 ? [50.6, 9.5] : _d, _e = _a.zoom, zoom = _e === void 0 ? 10 : _e, children = _a.children;
2474
2474
  var meta = document.getElementsByTagName('meta');
2475
2475
  var _f = useState(meta), metaTags = _f[0]; _f[1];
2476
2476
  function MapEventListener(props) {
@@ -2503,7 +2503,7 @@ function UtopiaMap(_a) {
2503
2503
  React.createElement(ItemsProvider, { initialItems: [] },
2504
2504
  React.createElement(LeafletRefsProvider, { initialLeafletRefs: {} },
2505
2505
  React.createElement("div", { className: (selectNewItemPosition != null ? "crosshair-cursor-enabled" : undefined) },
2506
- React.createElement(MapContainer, { ref: mapDivRef, style: { height: height, width: width }, center: center, zoom: zoom, zoomControl: false },
2506
+ React.createElement(MapContainer, { ref: mapDivRef, style: { height: height, width: width }, center: new LatLng(center[0], center[1]), zoom: zoom, zoomControl: false },
2507
2507
  React.createElement(Control, { position: 'topLeft', zIndex: "1000" },
2508
2508
  React.createElement(SearchControl, { clusterRef: clusterRef }),
2509
2509
  React.createElement(TagsControl, null)),
@@ -3516,7 +3516,7 @@ function SideBar(_a) {
3516
3516
  React.createElement("ul", { className: "tw-menu tw-w-full tw-bg-base-100 tw-text-base-content tw-p-0", "data-te-sidenav-menu-ref": true }, routes.map(function (route, k) {
3517
3517
  return (React.createElement("li", { className: "", key: k }, route.submenu ?
3518
3518
  React.createElement(SidebarSubmenu, __assign({}, route)) :
3519
- (React.createElement(NavLink, { end: true, to: route.path, className: function (_a) {
3519
+ (React.createElement(NavLink, { end: true, target: route.blank ? "_blank" : "_self", to: route.path, className: function (_a) {
3520
3520
  var isActive = _a.isActive;
3521
3521
  return "".concat(isActive ? 'tw-font-semibold tw-bg-base-200 !tw-rounded-none' : 'tw-font-normal !tw-rounded-none');
3522
3522
  }, onClick: function () {
@@ -3790,7 +3790,11 @@ function ProfileSettings() {
3790
3790
  }
3791
3791
 
3792
3792
  function Modal(_a) {
3793
- var children = _a.children;
3793
+ var children = _a.children, showOnStartup = _a.showOnStartup;
3794
+ useEffect(function () {
3795
+ if (showOnStartup)
3796
+ window.my_modal_3.showModal();
3797
+ }, []);
3794
3798
  return (React.createElement(React.Fragment, null,
3795
3799
  React.createElement("dialog", { id: "my_modal_3", className: "tw-modal tw-transition-all tw-duration-300" },
3796
3800
  React.createElement("form", { method: "dialog", className: "tw-modal-box tw-transition-none" },