utopia-ui 3.0.0-alpha.8 → 3.0.0-alpha.80

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 (94) hide show
  1. package/README.md +19 -5
  2. package/dist/Components/AppShell/AppShell.d.ts +7 -5
  3. package/dist/Components/AppShell/NavBar.d.ts +2 -2
  4. package/dist/Components/AppShell/SetAssetsApi.d.ts +5 -0
  5. package/dist/Components/AppShell/SideBar.d.ts +3 -1
  6. package/dist/Components/AppShell/hooks/useAssets.d.ts +13 -0
  7. package/dist/Components/Auth/LoginPage copy.d.ts +2 -0
  8. package/dist/Components/Auth/RequestPasswordPage.d.ts +4 -0
  9. package/dist/Components/Auth/ResetPasswordPage.d.ts +2 -0
  10. package/dist/Components/Auth/SetNewPasswordPage.d.ts +2 -0
  11. package/dist/Components/Auth/Signuppage.d.ts +2 -0
  12. package/dist/Components/Auth/index.d.ts +3 -1
  13. package/dist/Components/Auth/useAuth.d.ts +4 -2
  14. package/dist/Components/Gaming/Modal.d.ts +5 -9
  15. package/dist/Components/Gaming/hooks/useQuests.d.ts +13 -0
  16. package/dist/Components/Input/Autocomplete.d.ts +8 -0
  17. package/dist/Components/Input/SelectBox.d.ts +17 -0
  18. package/dist/Components/Input/TextInput.d.ts +2 -1
  19. package/dist/Components/Input/index.d.ts +1 -0
  20. package/dist/Components/Map/ItemForm.d.ts +3 -1
  21. package/dist/Components/Map/Layer.d.ts +1 -1
  22. package/dist/Components/Map/Permissions.d.ts +7 -0
  23. package/dist/Components/Map/Subcomponents/AddButton.d.ts +2 -2
  24. package/dist/Components/Map/Subcomponents/Control.d.ts +5 -0
  25. package/dist/Components/Map/Subcomponents/Controls/Control.d.ts +6 -0
  26. package/dist/Components/Map/Subcomponents/Controls/FilterControl.d.ts +2 -0
  27. package/dist/Components/Map/Subcomponents/Controls/LayerControl.d.ts +2 -0
  28. package/dist/Components/Map/Subcomponents/Controls/LocateControl.d.ts +4 -0
  29. package/dist/Components/Map/Subcomponents/Controls/QuestControl.d.ts +2 -0
  30. package/dist/Components/Map/Subcomponents/Controls/SearchControl.d.ts +4 -0
  31. package/dist/Components/Map/Subcomponents/Controls/TagsControl.d.ts +2 -0
  32. package/dist/Components/Map/Subcomponents/ItemFormPopup.d.ts +1 -1
  33. package/dist/Components/Map/Subcomponents/ItemPopupComponents/PopupButton.d.ts +9 -0
  34. package/dist/Components/Map/Subcomponents/ItemPopupComponents/PopupTextInput.d.ts +7 -1
  35. package/dist/Components/Map/Subcomponents/ItemPopupComponents/TextView.d.ts +3 -1
  36. package/dist/Components/Map/Subcomponents/ItemViewPopup.d.ts +1 -1
  37. package/dist/Components/Map/Subcomponents/LayerControl.d.ts +2 -0
  38. package/dist/Components/Map/Subcomponents/QuestControl.d.ts +2 -0
  39. package/dist/Components/Map/UtopiaMap.d.ts +2 -2
  40. package/dist/Components/Map/hooks/useDebounce.d.ts +1 -0
  41. package/dist/Components/Map/hooks/useFilter.d.ts +12 -2
  42. package/dist/Components/Map/hooks/useItems.d.ts +2 -0
  43. package/dist/Components/Map/hooks/useLeafletRefs.d.ts +22 -0
  44. package/dist/Components/Map/hooks/usePermissions.d.ts +20 -0
  45. package/dist/Components/Map/hooks/useTags.d.ts +5 -3
  46. package/dist/Components/Map/hooks/useTimeout.d.ts +4 -0
  47. package/dist/Components/Map/hooks/useWindowDimension.d.ts +4 -0
  48. package/dist/Components/Map/index.d.ts +3 -0
  49. package/dist/Components/Profile/ColorPicker.d.ts +7 -0
  50. package/dist/Components/Profile/Editor.d.ts +5 -0
  51. package/dist/Components/Profile/OverlayProfile.d.ts +2 -0
  52. package/dist/Components/Profile/OverlayProfileSettings.d.ts +2 -0
  53. package/dist/Components/Profile/OverlayUserSettings.d.ts +2 -0
  54. package/dist/Components/Profile/ProfileSettings.d.ts +4 -0
  55. package/dist/Components/Profile/Settings.d.ts +2 -3
  56. package/dist/Components/Profile/Tags.d.ts +2 -0
  57. package/dist/Components/Profile/TagsWidget.d.ts +7 -0
  58. package/dist/Components/Profile/UserSettings.d.ts +4 -0
  59. package/dist/Components/Profile/index.d.ts +5 -1
  60. package/dist/Components/Profile/useClickOutside.d.ts +2 -0
  61. package/dist/Components/Templates/CardPage.d.ts +6 -1
  62. package/dist/Components/Templates/CircleLayout.d.ts +6 -0
  63. package/dist/Components/{AppShell → Templates}/DialogModal.d.ts +2 -1
  64. package/dist/Components/Templates/MapOverlayPage.d.ts +6 -0
  65. package/dist/Components/Templates/MapOverlayScreen.d.ts +4 -0
  66. package/dist/Components/Templates/MoonCalendar.d.ts +2 -0
  67. package/dist/Components/Templates/TagView.d.ts +7 -0
  68. package/dist/Components/Templates/TitleCard.d.ts +6 -4
  69. package/dist/Components/Templates/index.d.ts +3 -0
  70. package/dist/Utils/DynamicHeroIcon.d.ts +2 -0
  71. package/dist/Utils/FormatTags.d.ts +2 -0
  72. package/dist/Utils/GetValue.d.ts +1 -0
  73. package/dist/Utils/Moon.d.ts +3 -0
  74. package/dist/Utils/TimeAgo.d.ts +1 -0
  75. package/dist/index.d.ts +5 -5
  76. package/dist/index.js +3744 -942
  77. package/dist/index.js.map +1 -1
  78. package/dist/types.d.ts +47 -9
  79. package/package.json +13 -4
  80. package/dist/Components/Auth/authDirectus.d.ts +0 -24
  81. package/dist/Components/Input/FancyTextAreaInput.d.ts +0 -13
  82. package/dist/Components/Input/InputText.d.ts +0 -13
  83. package/dist/Components/Input/TributeTextAreaInput copy.d.ts +0 -13
  84. package/dist/Components/Input/TributeTextAreaInput.d.ts +0 -13
  85. package/dist/Components/Map/ItemFormPopup.d.ts +0 -12
  86. package/dist/Components/Map/ItemViewPopup.d.ts +0 -8
  87. package/dist/Components/Map/Subcomponents/HeaderView.d.ts +0 -7
  88. package/dist/Components/Map/Subcomponents/SearchBar.d.ts +0 -2
  89. package/dist/Components/Map/Subcomponents/StartEndView.d.ts +0 -6
  90. package/dist/Components/Map/Subcomponents/TagFilterControl.d.ts +0 -2
  91. package/dist/Components/Map/Subcomponents/TextView.d.ts +0 -5
  92. package/dist/Components/TitleCard.d.ts +0 -9
  93. package/dist/Utils/HeighlightTags.d.ts +0 -1
  94. package/dist/Utils/TaggedText.d.ts +0 -3
package/README.md CHANGED
@@ -1,11 +1,25 @@
1
1
  # Utopia UI [![npm version](https://img.shields.io/npm/v/utopia-ui.svg)](https://www.npmjs.com/package/utopia-ui)
2
- is a UI Library to build mapping apps with focus of real life action, local connection and positiv impact.
2
+ **UI Framework for Real-Life-Networking-Apps**
3
3
 
4
- Check [utopia-os.org](https://utopia-os.org) for more information
4
+ *Real change happens in real life when we meet in person and connect as local communities manifesting their ideas with the earth. When we help each other to step out of capitalism and individualism and start building common infrastructure to meet human needs in harmony with Mother Earth.*
5
5
 
6
- *In early 2021, we developed a Django-based Proof of Concept, which can be found @ [new.docutopia.de](https://new.docutopia.de). This map can be edited freely you can register to create an account and place them on the map.*
6
+ *That is why Utopia UI exists. It is a UI kit for minimalist, fast, intuitive and mobile-first map apps, as a tool for local connection and decentralised networking. It can work with any backend or p2p database and any kind of data structure.*
7
7
 
8
- Utopia UI is the approach to create a Open Source Library of JavaScript Components which should bring useful maps and apps to all kind of projects and communities.
8
+ ## Mission
9
+ Utopia UIs mission is to provide open source building blocks to create beautiful applications with a focus on real life impact, local communities and gamification.
10
+
11
+ The building blocks are designed to allow different networks and communities to assemble their map and app for their specific needs and purpose.
12
+
13
+ Utopia Game is the first app made with Utopia UI. It is an attempt to use gamification to get users to take action and make the map even more alive. Check it out at [utopia-game.org](https://utopia-game.org/) or see the code in the [repository](https://github.com/utopia-os/utopia-game)
14
+
15
+ ## Features
16
+
17
+ * Interactive Component Map with customizable Layers (like Projects, Event, People)
18
+ * Flexible API-Interface to make it work with every backend or p2p database
19
+ * Create, Update, Delete Items
20
+ * User Authentification API-Interface
21
+ * User Profiles
22
+ * App Shell
9
23
 
10
24
  ## Getting Started
11
25
 
@@ -67,4 +81,4 @@ You can find some Sample Data (places, events, tags) for test in the `SamleData/
67
81
 
68
82
  *We are looking for Web Developer, UX Designer, Community Manager, Visionaries, Artists, etc. who like to support this Vision.*
69
83
 
70
- [https://t.me/utopiaOS](https://t.me/utopiaOS)
84
+ [https://t.me/utopiaOS](https://t.me/utopiaOS)
@@ -1,6 +1,8 @@
1
- /// <reference types="react" />
2
- export declare function AppShell({ appName, useAuth, children }: {
3
- appName: any;
4
- useAuth: any;
5
- children: any;
1
+ import * as React from 'react';
2
+ import { AssetsApi } from '../../types';
3
+ export declare function AppShell({ appName, nameWidth, children, assetsApi }: {
4
+ appName: string;
5
+ nameWidth?: number;
6
+ children: React.ReactNode;
7
+ assetsApi: AssetsApi;
6
8
  }): JSX.Element;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- export default function NavBar({ appName, useAuth }: {
2
+ export default function NavBar({ appName, nameWidth }: {
3
3
  appName: string;
4
- useAuth: any;
4
+ nameWidth?: number;
5
5
  }): JSX.Element;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { AssetsApi } from '../../types';
3
+ export declare const SetAssetsApi: ({ assetsApi }: {
4
+ assetsApi: AssetsApi;
5
+ }) => JSX.Element;
@@ -4,8 +4,10 @@ declare type route = {
4
4
  icon: JSX.Element;
5
5
  name: string;
6
6
  submenu?: route;
7
+ blank?: boolean;
7
8
  };
8
- export declare function SideBar({ routes }: {
9
+ export declare function SideBar({ routes, bottomRoutes }: {
9
10
  routes: route[];
11
+ bottomRoutes?: route[];
10
12
  }): JSX.Element;
11
13
  export {};
@@ -0,0 +1,13 @@
1
+ import * as React from "react";
2
+ import { AssetsApi } from '../../../types';
3
+ declare type UseAssetManagerResult = ReturnType<typeof useAssetsManager>;
4
+ declare function useAssetsManager(): {
5
+ api: AssetsApi;
6
+ setAssetsApi: (api: AssetsApi) => void;
7
+ };
8
+ export declare const AssetsProvider: React.FunctionComponent<{
9
+ children?: React.ReactNode;
10
+ }>;
11
+ export declare const useAssetApi: () => AssetsApi;
12
+ export declare const useSetAssetApi: () => UseAssetManagerResult["setAssetsApi"];
13
+ export {};
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function LoginPage(): JSX.Element;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export declare function RequestPasswordPage({ reset_url }: {
3
+ reset_url: any;
4
+ }): JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function ResetPasswordPage(reset_url: any): JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function SetNewPasswordPage(): JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function SignupPage(): JSX.Element;
@@ -1,3 +1,5 @@
1
1
  export { AuthProvider, useAuth } from "./useAuth";
2
2
  export { LoginPage } from "./LoginPage";
3
- export { SignupPage } from "./SignupPage";
3
+ export { SignupPage } from './SignupPage';
4
+ export { RequestPasswordPage } from './RequestPasswordPage';
5
+ export { SetNewPasswordPage } from './SetNewPasswordPage';
@@ -10,14 +10,16 @@ declare type AuthCredentials = {
10
10
  otp?: string | undefined;
11
11
  };
12
12
  declare type AuthContextProps = {
13
- isAuthenticated: Boolean;
13
+ isAuthenticated: boolean;
14
14
  user: UserItem | null;
15
15
  login: (credentials: AuthCredentials) => Promise<UserItem | undefined>;
16
16
  register: (credentials: AuthCredentials, userName: string) => Promise<UserItem | undefined>;
17
17
  loading: Boolean;
18
- logout: () => void;
18
+ logout: () => Promise<any>;
19
19
  updateUser: (user: UserItem) => any;
20
20
  token: String | null;
21
+ requestPasswordReset: (email: string, reset_url: string) => Promise<any>;
22
+ passwordReset: (token: string, new_password: string) => Promise<any>;
21
23
  };
22
24
  export declare const AuthProvider: ({ userApi, children }: AuthProviderProps) => JSX.Element;
23
25
  export declare const useAuth: () => AuthContextProps;
@@ -1,9 +1,5 @@
1
- /// <reference types="react" />
2
- declare type ChapterProps = {
3
- clickAction?: () => void;
4
- };
5
- export declare function Welcome1({ clickAction }: ChapterProps): JSX.Element;
6
- export declare function Welcome2({ clickAction }: ChapterProps): JSX.Element;
7
- export declare function Welcome3({ clickAction }: ChapterProps): JSX.Element;
8
- export declare function Modal(): JSX.Element;
9
- export {};
1
+ import * as React from "react";
2
+ export declare function Modal({ children, showOnStartup }: {
3
+ children: React.ReactNode;
4
+ showOnStartup?: boolean;
5
+ }): JSX.Element;
@@ -0,0 +1,13 @@
1
+ import * as React from "react";
2
+ declare type UseQuestManagerResult = ReturnType<typeof useQuestsManager>;
3
+ declare function useQuestsManager(initialOpen: boolean): {
4
+ open: boolean;
5
+ setQuestsOpen: (open: boolean) => void;
6
+ };
7
+ export declare const QuestsProvider: React.FunctionComponent<{
8
+ initialOpen: boolean;
9
+ children?: React.ReactNode;
10
+ }>;
11
+ export declare const useQuestsOpen: () => boolean;
12
+ export declare const useSetQuestOpen: () => UseQuestManagerResult["setQuestsOpen"];
13
+ export {};
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ export declare const Autocomplete: ({ inputProps, suggestions, onSelected, pushFilteredSuggestions, setFocus }: {
3
+ inputProps: any;
4
+ suggestions: Array<any>;
5
+ onSelected: (suggestion: any) => void;
6
+ pushFilteredSuggestions?: any[] | undefined;
7
+ setFocus?: boolean | undefined;
8
+ }) => JSX.Element;
@@ -0,0 +1,17 @@
1
+ /// <reference types="react" />
2
+ declare type SelectBoxProps = {
3
+ labelTitle?: string;
4
+ labelStyle?: string;
5
+ type?: string;
6
+ containerStyle?: string;
7
+ defaultValue: string;
8
+ placeholder?: string;
9
+ updateFormValue: (value: string) => void;
10
+ options: {
11
+ name: string;
12
+ value: string;
13
+ }[];
14
+ labelDescription?: string;
15
+ };
16
+ export declare function SelectBox(props: SelectBoxProps): JSX.Element;
17
+ export {};
@@ -8,7 +8,8 @@ declare type InputTextProps = {
8
8
  inputStyle?: string;
9
9
  defaultValue?: string;
10
10
  placeholder?: string;
11
+ autocomplete?: string;
11
12
  updateFormValue?: (value: string) => void;
12
13
  };
13
- export declare function TextInput({ labelTitle, labelStyle, type, dataField, containerStyle, inputStyle, defaultValue, placeholder, updateFormValue }: InputTextProps): JSX.Element;
14
+ export declare function TextInput({ labelTitle, labelStyle, type, dataField, containerStyle, inputStyle, defaultValue, placeholder, autocomplete, updateFormValue }: InputTextProps): JSX.Element;
14
15
  export {};
@@ -1,2 +1,3 @@
1
1
  export { TextAreaInput } from "./TextAreaInput";
2
2
  export { TextInput } from "./TextInput";
3
+ export { SelectBox } from "./SelectBox";
@@ -2,9 +2,11 @@ import * as React from 'react';
2
2
  import { Item } from '../../types';
3
3
  import * as PropTypes from 'prop-types';
4
4
  export declare const ItemForm: {
5
- ({ children, item }: {
5
+ ({ children, item, title, setPopupTitle }: {
6
6
  children?: React.ReactNode;
7
7
  item?: Item | undefined;
8
+ title?: string | undefined;
9
+ setPopupTitle?: React.Dispatch<React.SetStateAction<string>> | undefined;
8
10
  }): JSX.Element;
9
11
  propTypes: {
10
12
  children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
2
  import { LayerProps } from '../../types';
3
- export declare const Layer: (props: LayerProps) => JSX.Element;
3
+ export declare const Layer: ({ data, children, name, menuIcon, menuText, menuColor, markerIcon, markerShape, markerDefaultColor, api, itemNameField, itemTextField, itemAvatarField, itemColorField, itemOwnerField, itemLatitudeField, itemLongitudeField, itemTagsField, itemOffersField, itemNeedsField, onlyOnePerOwner, customEditLink, setItemFormPopup, itemFormPopup, clusterRef }: LayerProps) => JSX.Element;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { ItemsApi, Permission } from '../../types';
3
+ export declare function Permissions({ data, api, adminRole }: {
4
+ data?: Permission[];
5
+ api?: ItemsApi<Permission>;
6
+ adminRole?: string;
7
+ }): JSX.Element;
@@ -1,4 +1,4 @@
1
1
  import * as React from 'react';
2
- export default function AddButton({ setSelectMode }: {
3
- setSelectMode: React.Dispatch<React.SetStateAction<any>>;
2
+ export default function AddButton({ setSelectNewItemPosition }: {
3
+ setSelectNewItemPosition: React.Dispatch<React.SetStateAction<any>>;
4
4
  }): JSX.Element;
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ export declare const Control: ({ position, children }: {
3
+ position: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
4
+ children: React.ReactNode;
5
+ }) => JSX.Element;
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ export declare const Control: ({ position, children, zIndex }: {
3
+ position: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
4
+ children: React.ReactNode;
5
+ zIndex: string;
6
+ }) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const FilterControl: () => JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function LayerControl(): JSX.Element;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import 'leaflet.locatecontrol';
3
+ import 'leaflet.locatecontrol/dist/L.Control.Locate.css';
4
+ export declare const LocateControl: () => JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function QuestControl(): JSX.Element;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export declare const SearchControl: ({ clusterRef }: {
3
+ clusterRef: any;
4
+ }) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const TagsControl: () => JSX.Element;
@@ -6,6 +6,6 @@ export interface ItemFormPopupProps {
6
6
  layer: LayerProps;
7
7
  item?: Item;
8
8
  children?: React.ReactNode;
9
- setItemFormPopup: React.Dispatch<React.SetStateAction<any>>;
9
+ setItemFormPopup?: React.Dispatch<React.SetStateAction<ItemFormPopupProps | null>>;
10
10
  }
11
11
  export declare function ItemFormPopup(props: ItemFormPopupProps): JSX.Element;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { Item } from '../../../../types';
3
+ export declare const PopupButton: ({ url, parameterField, text, colorField, item }: {
4
+ url: string;
5
+ parameterField?: string | undefined;
6
+ text: string;
7
+ colorField?: string | undefined;
8
+ item?: Item | undefined;
9
+ }) => JSX.Element;
@@ -1,2 +1,8 @@
1
1
  /// <reference types="react" />
2
- export declare const PopupTextInput: () => JSX.Element;
2
+ import { Item } from '../../../../types';
3
+ export declare const PopupTextInput: ({ dataField, placeholder, style, item }: {
4
+ dataField: string;
5
+ placeholder: string;
6
+ style?: string | undefined;
7
+ item?: Item | undefined;
8
+ }) => JSX.Element;
@@ -1,5 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { Item } from '../../../../types';
3
- export declare const TextView: ({ item }: {
3
+ export declare const TextView: ({ item, truncate, itemTextField }: {
4
4
  item?: Item | undefined;
5
+ truncate?: boolean | undefined;
6
+ itemTextField?: string | undefined;
5
7
  }) => JSX.Element;
@@ -6,4 +6,4 @@ export interface ItemViewPopupProps {
6
6
  children?: React.ReactNode;
7
7
  setItemFormPopup?: React.Dispatch<React.SetStateAction<ItemFormPopupProps | null>>;
8
8
  }
9
- export declare const ItemViewPopup: (props: ItemViewPopupProps) => JSX.Element;
9
+ export declare const ItemViewPopup: React.ForwardRefExoticComponent<ItemViewPopupProps & React.RefAttributes<unknown>>;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function LayerControl(): JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function QuestControl(): JSX.Element;
@@ -3,8 +3,8 @@ import * as React from "react";
3
3
  import { LayerProps, UtopiaMapProps } from "../../types";
4
4
  import "./UtopiaMap.css";
5
5
  export interface MapEventListenerProps {
6
- selectMode: LayerProps | null;
7
- setSelectMode: React.Dispatch<any>;
6
+ selectNewItemPosition: LayerProps | null;
7
+ setSelectNewItemPosition: React.Dispatch<any>;
8
8
  setItemFormPopup: React.Dispatch<React.SetStateAction<any>>;
9
9
  }
10
10
  declare function UtopiaMap({ height, width, center, zoom, children }: UtopiaMapProps): JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const useDebounce: (callback: any, delay: any, deps: any) => void;
@@ -1,13 +1,18 @@
1
1
  import * as React from "react";
2
- import { Tag } from "../../../types";
2
+ import { LayerProps, Tag } from "../../../types";
3
3
  declare type UseFilterManagerResult = ReturnType<typeof useFilterManager>;
4
4
  declare function useFilterManager(initialTags: Tag[]): {
5
5
  filterTags: Tag[];
6
6
  searchPhrase: string;
7
+ visibleLayers: LayerProps[];
7
8
  addFilterTag: (tag: Tag) => void;
8
- removeFilterTag: (id: string) => void;
9
+ removeFilterTag: (name: string) => void;
9
10
  resetFilterTags: () => void;
10
11
  setSearchPhrase: (phrase: string) => void;
12
+ addVisibleLayer: (layer: LayerProps) => void;
13
+ toggleVisibleLayer: (layer: LayerProps) => void;
14
+ resetVisibleLayers: () => void;
15
+ isLayerVisible: (layer: LayerProps) => boolean;
11
16
  };
12
17
  export declare const FilterProvider: React.FunctionComponent<{
13
18
  initialTags: Tag[];
@@ -19,4 +24,9 @@ export declare const useRemoveFilterTag: () => UseFilterManagerResult["removeFil
19
24
  export declare const useResetFilterTags: () => UseFilterManagerResult["resetFilterTags"];
20
25
  export declare const useSearchPhrase: () => UseFilterManagerResult["searchPhrase"];
21
26
  export declare const useSetSearchPhrase: () => UseFilterManagerResult["setSearchPhrase"];
27
+ export declare const useVisibleLayer: () => UseFilterManagerResult["visibleLayers"];
28
+ export declare const useAddVisibleLayer: () => UseFilterManagerResult["addVisibleLayer"];
29
+ export declare const useToggleVisibleLayer: () => UseFilterManagerResult["toggleVisibleLayer"];
30
+ export declare const useResetVisibleLayers: () => UseFilterManagerResult["resetVisibleLayers"];
31
+ export declare const useIsLayerVisible: () => UseFilterManagerResult["isLayerVisible"];
22
32
  export {};
@@ -9,6 +9,7 @@ declare function useItemsManager(initialItems: Item[]): {
9
9
  resetItems: (layer: LayerProps) => void;
10
10
  setItemsApi: (layer: LayerProps) => void;
11
11
  setItemsData: (layer: LayerProps) => void;
12
+ allItemsLoaded: boolean;
12
13
  };
13
14
  export declare const ItemsProvider: React.FunctionComponent<{
14
15
  initialItems: Item[];
@@ -21,4 +22,5 @@ export declare const useRemoveItem: () => UseItemManagerResult["removeItem"];
21
22
  export declare const useResetItems: () => UseItemManagerResult["resetItems"];
22
23
  export declare const useSetItemsApi: () => UseItemManagerResult["setItemsApi"];
23
24
  export declare const useSetItemsData: () => UseItemManagerResult["setItemsData"];
25
+ export declare const useAllItemsLoaded: () => UseItemManagerResult["allItemsLoaded"];
24
26
  export {};
@@ -0,0 +1,22 @@
1
+ import * as React from "react";
2
+ import { Item } from "../../../types";
3
+ import { Marker, Popup } from "leaflet";
4
+ declare type LeafletRef = {
5
+ item: Item;
6
+ marker: Marker;
7
+ popup: Popup;
8
+ };
9
+ declare type UseLeafletRefsManagerResult = ReturnType<typeof useLeafletRefsManager>;
10
+ declare function useLeafletRefsManager(initialLeafletRefs: {}): {
11
+ leafletRefs: Record<string, LeafletRef>;
12
+ addMarker: (item: Item, marker: Marker) => void;
13
+ addPopup: (item: Item, popup: Popup) => void;
14
+ };
15
+ export declare const LeafletRefsProvider: React.FunctionComponent<{
16
+ initialLeafletRefs: {};
17
+ children?: React.ReactNode;
18
+ }>;
19
+ export declare const useLeafletRefs: () => Record<string, LeafletRef>;
20
+ export declare const useAddMarker: () => UseLeafletRefsManagerResult["addMarker"];
21
+ export declare const useAddPopup: () => UseLeafletRefsManagerResult["addPopup"];
22
+ export {};
@@ -0,0 +1,20 @@
1
+ import * as React from "react";
2
+ import { ItemsApi, Permission, PermissionAction } from "../../../types";
3
+ declare type UsePermissionManagerResult = ReturnType<typeof usePermissionsManager>;
4
+ declare function usePermissionsManager(initialPermissions: Permission[]): {
5
+ permissions: Permission[];
6
+ setPermissionApi: (api: ItemsApi<any>) => void;
7
+ setPermissionData: (data: Permission[]) => void;
8
+ setAdminRole: (adminRole: string) => void;
9
+ hasUserPermission: (collectionName: string, action: PermissionAction) => boolean;
10
+ };
11
+ export declare const PermissionsProvider: React.FunctionComponent<{
12
+ initialPermissions: Permission[];
13
+ children?: React.ReactNode;
14
+ }>;
15
+ export declare const usePermissions: () => Permission[];
16
+ export declare const useSetPermissionApi: () => UsePermissionManagerResult["setPermissionApi"];
17
+ export declare const useSetPermissionData: () => UsePermissionManagerResult["setPermissionData"];
18
+ export declare const useHasUserPermission: () => UsePermissionManagerResult["hasUserPermission"];
19
+ export declare const useSetAdminRole: () => UsePermissionManagerResult["setAdminRole"];
20
+ export {};
@@ -1,12 +1,13 @@
1
1
  import * as React from "react";
2
- import { ItemsApi, Tag } from "../../../types";
2
+ import { Item, ItemsApi, Tag } from "../../../types";
3
3
  declare type UseTagManagerResult = ReturnType<typeof useTagsManager>;
4
4
  declare function useTagsManager(initialTags: Tag[]): {
5
5
  tags: Tag[];
6
6
  addTag: (tag: Tag) => void;
7
- removeTag: (id: string) => void;
8
7
  setTagApi: (api: ItemsApi<Tag>) => void;
9
8
  setTagData: (data: Tag[]) => void;
9
+ getItemTags: (item: Item) => Tag[];
10
+ allTagsLoaded: boolean;
10
11
  };
11
12
  export declare const TagsProvider: React.FunctionComponent<{
12
13
  initialTags: Tag[];
@@ -14,7 +15,8 @@ export declare const TagsProvider: React.FunctionComponent<{
14
15
  }>;
15
16
  export declare const useTags: () => Tag[];
16
17
  export declare const useAddTag: () => UseTagManagerResult["addTag"];
17
- export declare const useRemoveTag: () => UseTagManagerResult["removeTag"];
18
18
  export declare const useSetTagApi: () => UseTagManagerResult["setTagApi"];
19
19
  export declare const useSetTagData: () => UseTagManagerResult["setTagData"];
20
+ export declare const useGetItemTags: () => UseTagManagerResult["getItemTags"];
21
+ export declare const useAllTagsLoaded: () => UseTagManagerResult["allTagsLoaded"];
20
22
  export {};
@@ -0,0 +1,4 @@
1
+ export declare const useTimeout: (callback: any, delay: any) => {
2
+ reset: () => void;
3
+ clear: () => void;
4
+ };
@@ -0,0 +1,4 @@
1
+ export default function useWindowDimensions(): {
2
+ width: number;
3
+ height: number;
4
+ };
@@ -1,9 +1,12 @@
1
1
  export { UtopiaMap } from './UtopiaMap';
2
2
  export { Layer } from './Layer';
3
3
  export { Tags } from "./Tags";
4
+ export { Permissions } from "./Permissions";
4
5
  export { ItemForm } from './ItemForm';
5
6
  export { ItemView } from './ItemView';
6
7
  export { PopupTextAreaInput } from './Subcomponents/ItemPopupComponents/PopupTextAreaInput';
7
8
  export { PopupStartEndInput } from './Subcomponents/ItemPopupComponents/PopupStartEndInput';
9
+ export { PopupTextInput } from './Subcomponents/ItemPopupComponents/PopupTextInput';
8
10
  export { TextView } from './Subcomponents/ItemPopupComponents/TextView';
9
11
  export { StartEndView } from './Subcomponents/ItemPopupComponents/StartEndView';
12
+ export { PopupButton } from './Subcomponents/ItemPopupComponents/PopupButton';
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import "./ColorPicker.css";
3
+ export declare const ColorPicker: ({ color, onChange, className }: {
4
+ color: any;
5
+ onChange: any;
6
+ className: any;
7
+ }) => JSX.Element;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export declare function TextEditor({ value, updateFormValue }: {
3
+ value: string;
4
+ updateFormValue: (string: any) => void;
5
+ }): JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function OverlayProfile(): JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function OverlayProfileSettings(): JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function OverlayUserSettings(): JSX.Element;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import 'react-image-crop/dist/ReactCrop.css';
3
+ import 'react-toastify/dist/ReactToastify.css';
4
+ export declare function ProfileSettings(): JSX.Element;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
+ import 'react-image-crop/dist/ReactCrop.css';
2
3
  import 'react-toastify/dist/ReactToastify.css';
3
- export declare function Settings({ useAuth }: {
4
- useAuth: any;
5
- }): JSX.Element;
4
+ export declare function Settings(): JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const Tags: () => JSX.Element;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ export declare const TagsWidget: ({ placeholder, containerStyle, defaultTags, onUpdate }: {
3
+ placeholder: any;
4
+ containerStyle: any;
5
+ defaultTags: any;
6
+ onUpdate: any;
7
+ }) => JSX.Element;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import 'react-image-crop/dist/ReactCrop.css';
3
+ import 'react-toastify/dist/ReactToastify.css';
4
+ export declare function UserSettings(): JSX.Element;
@@ -1 +1,5 @@
1
- export { Settings } from './Settings';
1
+ export { UserSettings } from './UserSettings';
2
+ export { ProfileSettings } from './ProfileSettings';
3
+ export { OverlayProfile } from './OverlayProfile';
4
+ export { OverlayProfileSettings } from './OverlayProfileSettings';
5
+ export { OverlayUserSettings } from './OverlayUserSettings';
@@ -0,0 +1,2 @@
1
+ declare const useClickOutside: (ref: any, handler: any) => void;
2
+ export default useClickOutside;
@@ -1,5 +1,10 @@
1
1
  import * as React from "react";
2
- export declare function CardPage({ title, children }: {
2
+ export declare function CardPage({ title, hideTitle, children, parent }: {
3
3
  title: string;
4
+ hideTitle?: boolean;
4
5
  children?: React.ReactNode;
6
+ parent?: {
7
+ name: string;
8
+ url: string;
9
+ };
5
10
  }): JSX.Element;