utopia-ui 3.0.0-alpha.2 → 3.0.0-alpha.20

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 (64) hide show
  1. package/dist/Components/AppShell/AppShell.d.ts +2 -3
  2. package/dist/Components/AppShell/DialogModal.d.ts +9 -0
  3. package/dist/Components/AppShell/NavBar.d.ts +2 -3
  4. package/dist/Components/Auth/LoginPage.d.ts +2 -0
  5. package/dist/Components/Auth/SignupPage.d.ts +2 -0
  6. package/dist/Components/Auth/authDirectus.d.ts +7 -13
  7. package/dist/Components/Auth/index.d.ts +3 -1
  8. package/dist/Components/Auth/useAuth.d.ts +24 -0
  9. package/dist/Components/Input/FancyTextAreaInput.d.ts +13 -0
  10. package/dist/Components/Input/InputText.d.ts +4 -3
  11. package/dist/Components/Input/TextAreaInput.d.ts +6 -4
  12. package/dist/Components/Input/TextInput.d.ts +14 -0
  13. package/dist/Components/Input/TributeTextAreaInput copy.d.ts +13 -0
  14. package/dist/Components/Input/TributeTextAreaInput.d.ts +13 -0
  15. package/dist/Components/Input/index.d.ts +2 -0
  16. package/dist/Components/Map/ItemForm.d.ts +16 -0
  17. package/dist/Components/Map/ItemFormPopup.d.ts +12 -0
  18. package/dist/Components/Map/ItemView.d.ts +16 -0
  19. package/dist/Components/Map/ItemViewPopup.d.ts +8 -0
  20. package/dist/Components/Map/Permissions.d.ts +7 -0
  21. package/dist/Components/Map/Subcomponents/AddButton.d.ts +2 -2
  22. package/dist/Components/Map/Subcomponents/FilterControl.d.ts +2 -0
  23. package/dist/Components/Map/Subcomponents/HeaderView.d.ts +7 -0
  24. package/dist/Components/Map/Subcomponents/ItemFormPopup.d.ts +3 -3
  25. package/dist/Components/Map/Subcomponents/ItemPopupComponents/HeaderView.d.ts +7 -0
  26. package/dist/Components/Map/Subcomponents/ItemPopupComponents/PopupStartEndInput.d.ts +5 -0
  27. package/dist/Components/Map/Subcomponents/ItemPopupComponents/PopupTextAreaInput.d.ts +8 -0
  28. package/dist/Components/Map/Subcomponents/ItemPopupComponents/PopupTextInput.d.ts +2 -0
  29. package/dist/Components/Map/Subcomponents/ItemPopupComponents/StartEndView.d.ts +5 -0
  30. package/dist/Components/Map/Subcomponents/ItemPopupComponents/TextView.d.ts +5 -0
  31. package/dist/Components/Map/Subcomponents/ItemViewPopup.d.ts +3 -4
  32. package/dist/Components/Map/Subcomponents/LayerControl.d.ts +2 -0
  33. package/dist/Components/Map/Subcomponents/LocateControl.d.ts +1 -0
  34. package/dist/Components/Map/Subcomponents/SearchBar.d.ts +2 -0
  35. package/dist/Components/Map/Subcomponents/StartEndView.d.ts +6 -0
  36. package/dist/Components/Map/Subcomponents/TagFilterControl.d.ts +2 -0
  37. package/dist/Components/Map/Subcomponents/TextView.d.ts +5 -0
  38. package/dist/Components/Map/Tags.d.ts +4 -3
  39. package/dist/Components/Map/UtopiaMap.d.ts +4 -5
  40. package/dist/Components/Map/hooks/useFilter.d.ts +32 -0
  41. package/dist/Components/Map/hooks/useItems.d.ts +4 -0
  42. package/dist/Components/Map/hooks/useLeafletRefs.d.ts +22 -0
  43. package/dist/Components/Map/hooks/usePermissions.d.ts +20 -0
  44. package/dist/Components/Map/hooks/useTags.d.ts +7 -1
  45. package/dist/Components/Map/hooks/useWindowDimension.d.ts +4 -0
  46. package/dist/Components/Map/index.d.ts +8 -1
  47. package/dist/Components/Profile/Settings.d.ts +1 -3
  48. package/dist/Components/Templates/CardPage.d.ts +5 -0
  49. package/dist/Components/Templates/TitleCard.d.ts +9 -0
  50. package/dist/Components/Templates/index.d.ts +2 -0
  51. package/dist/Components/TitleCard.d.ts +2 -2
  52. package/dist/Components/Typography/ErrorText.d.ts +6 -0
  53. package/dist/Components/Typography/Subtitle.d.ts +3 -3
  54. package/dist/Utils/DynamicHeroIcon.d.ts +2 -0
  55. package/dist/Utils/HashTagRegex.d.ts +1 -0
  56. package/dist/Utils/HeighlightTags.d.ts +1 -2
  57. package/dist/Utils/RandomColor.d.ts +1 -0
  58. package/dist/Utils/ReplaceURLs.d.ts +3 -1
  59. package/dist/Utils/TaggedText.d.ts +3 -0
  60. package/dist/index.d.ts +4 -2
  61. package/dist/index.js +1458 -443
  62. package/dist/index.js.map +1 -1
  63. package/dist/types.d.ts +33 -7
  64. package/package.json +7 -3
@@ -1,6 +1,5 @@
1
1
  /// <reference types="react" />
2
- export declare function AppShell({ name, useAuth, children }: {
3
- name: any;
4
- useAuth: any;
2
+ export declare function AppShell({ appName, children }: {
3
+ appName: any;
5
4
  children: any;
6
5
  }): JSX.Element;
@@ -0,0 +1,9 @@
1
+ import * as React from "react";
2
+ declare type Props = {
3
+ title: string;
4
+ isOpened: boolean;
5
+ onClose: () => void;
6
+ children: React.ReactNode;
7
+ };
8
+ declare const DialogModal: ({ title, isOpened, onClose, children, }: Props) => JSX.Element;
9
+ export default DialogModal;
@@ -1,5 +1,4 @@
1
1
  /// <reference types="react" />
2
- export default function NavBar({ name, useAuth }: {
3
- name: string;
4
- useAuth: any;
2
+ export default function NavBar({ appName }: {
3
+ appName: string;
5
4
  }): JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function LoginPage(): JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function SignupPage(): JSX.Element;
@@ -1,6 +1,7 @@
1
1
  import * as React from "react";
2
+ import { UserApi, UserItem } from "../../types";
2
3
  declare type AuthProviderProps = {
3
- directus: any;
4
+ userApi: UserApi;
4
5
  children?: React.ReactNode;
5
6
  };
6
7
  declare type AuthCredentials = {
@@ -8,23 +9,16 @@ declare type AuthCredentials = {
8
9
  password: string;
9
10
  otp?: string | undefined;
10
11
  };
11
- export declare type MyUserItem = {
12
- id: string;
13
- avatar: string;
14
- first_name: string;
15
- description: string;
16
- email: string;
17
- password?: string;
18
- };
19
12
  declare type AuthContextProps = {
20
13
  isAuthenticated: Boolean;
21
- user: MyUserItem | null;
22
- login: (credentials: AuthCredentials) => Promise<MyUserItem | undefined>;
14
+ user: UserItem | null;
15
+ login: (credentials: AuthCredentials) => Promise<UserItem | undefined>;
16
+ register: (credentials: AuthCredentials, userName: string) => Promise<UserItem | undefined>;
23
17
  loading: Boolean;
24
18
  logout: () => void;
25
- updateUser: (user: MyUserItem) => any;
19
+ updateUser: (user: UserItem) => any;
26
20
  token: String | null;
27
21
  };
28
- export declare const AuthProviderDirectus: ({ directus, children }: AuthProviderProps) => JSX.Element;
22
+ export declare const AuthProviderDirectus: ({ userApi, children }: AuthProviderProps) => JSX.Element;
29
23
  export declare const useAuthDirectus: () => AuthContextProps;
30
24
  export {};
@@ -1 +1,3 @@
1
- export { AuthProviderDirectus, useAuthDirectus } from "./authDirectus";
1
+ export { AuthProvider, useAuth } from "./useAuth";
2
+ export { LoginPage } from "./LoginPage";
3
+ export { SignupPage } from "./SignupPage";
@@ -0,0 +1,24 @@
1
+ import * as React from "react";
2
+ import { UserApi, UserItem } from "../../types";
3
+ declare type AuthProviderProps = {
4
+ userApi: UserApi;
5
+ children?: React.ReactNode;
6
+ };
7
+ declare type AuthCredentials = {
8
+ email: string;
9
+ password: string;
10
+ otp?: string | undefined;
11
+ };
12
+ declare type AuthContextProps = {
13
+ isAuthenticated: Boolean;
14
+ user: UserItem | null;
15
+ login: (credentials: AuthCredentials) => Promise<UserItem | undefined>;
16
+ register: (credentials: AuthCredentials, userName: string) => Promise<UserItem | undefined>;
17
+ loading: Boolean;
18
+ logout: () => Promise<any>;
19
+ updateUser: (user: UserItem) => any;
20
+ token: String | null;
21
+ };
22
+ export declare const AuthProvider: ({ userApi, children }: AuthProviderProps) => JSX.Element;
23
+ export declare const useAuth: () => AuthContextProps;
24
+ export {};
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ declare type TextAreaProps = {
3
+ labelTitle?: string;
4
+ labelStyle?: string;
5
+ containerStyle?: string;
6
+ dataField?: string;
7
+ inputStyle?: string;
8
+ defaultValue: string;
9
+ placeholder?: string;
10
+ updateFormValue?: (value: string) => void;
11
+ };
12
+ export declare function FancyTextAreaInput({ labelTitle, dataField, labelStyle, containerStyle, inputStyle, defaultValue, placeholder, updateFormValue }: TextAreaProps): JSX.Element;
13
+ export {};
@@ -3,10 +3,11 @@ declare type InputTextProps = {
3
3
  labelTitle?: string;
4
4
  labelStyle?: string;
5
5
  type?: string;
6
+ dataField?: string;
6
7
  containerStyle?: string;
7
8
  defaultValue: string;
8
9
  placeholder?: string;
9
- updateFormValue: (value: string) => void;
10
+ updateFormValue?: (value: string) => void;
10
11
  };
11
- declare function InputText({ labelTitle, labelStyle, type, containerStyle, defaultValue, placeholder, updateFormValue }: InputTextProps): JSX.Element;
12
- export default InputText;
12
+ declare function TextInput({ labelTitle, labelStyle, type, dataField, containerStyle, defaultValue, placeholder, updateFormValue }: InputTextProps): JSX.Element;
13
+ export default TextInput;
@@ -1,11 +1,13 @@
1
1
  /// <reference types="react" />
2
2
  declare type TextAreaProps = {
3
- labelTitle: string;
3
+ labelTitle?: string;
4
4
  labelStyle?: string;
5
5
  containerStyle?: string;
6
+ dataField?: string;
7
+ inputStyle?: string;
6
8
  defaultValue: string;
7
9
  placeholder?: string;
8
- updateFormValue: (value: string) => void;
10
+ updateFormValue?: (value: string) => void;
9
11
  };
10
- declare function TextAreaInput({ labelTitle, labelStyle, containerStyle, defaultValue, placeholder, updateFormValue }: TextAreaProps): JSX.Element;
11
- export default TextAreaInput;
12
+ export declare function TextAreaInput({ labelTitle, dataField, labelStyle, containerStyle, inputStyle, defaultValue, placeholder, updateFormValue }: TextAreaProps): JSX.Element;
13
+ export {};
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ declare type InputTextProps = {
3
+ labelTitle?: string;
4
+ labelStyle?: string;
5
+ type?: string;
6
+ dataField?: string;
7
+ containerStyle?: string;
8
+ inputStyle?: string;
9
+ defaultValue?: string;
10
+ placeholder?: string;
11
+ updateFormValue?: (value: string) => void;
12
+ };
13
+ export declare function TextInput({ labelTitle, labelStyle, type, dataField, containerStyle, inputStyle, defaultValue, placeholder, updateFormValue }: InputTextProps): JSX.Element;
14
+ export {};
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ declare type TextAreaProps = {
3
+ labelTitle?: string;
4
+ labelStyle?: string;
5
+ containerStyle?: string;
6
+ dataField?: string;
7
+ inputStyle?: string;
8
+ defaultValue: string;
9
+ placeholder?: string;
10
+ updateFormValue?: (value: string) => void;
11
+ };
12
+ export declare function TextAreaInput({ labelTitle, dataField, labelStyle, containerStyle, inputStyle, defaultValue, placeholder, updateFormValue }: TextAreaProps): JSX.Element;
13
+ export {};
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ declare type TextAreaProps = {
3
+ labelTitle?: string;
4
+ labelStyle?: string;
5
+ containerStyle?: string;
6
+ dataField?: string;
7
+ inputStyle?: string;
8
+ defaultValue: string;
9
+ placeholder?: string;
10
+ updateFormValue?: (value: string) => void;
11
+ };
12
+ export declare function TributeTextAreaInput({ labelTitle, dataField, labelStyle, containerStyle, inputStyle, defaultValue, placeholder, updateFormValue }: TextAreaProps): JSX.Element;
13
+ export {};
@@ -0,0 +1,2 @@
1
+ export { TextAreaInput } from "./TextAreaInput";
2
+ export { TextInput } from "./TextInput";
@@ -0,0 +1,16 @@
1
+ import * as React from 'react';
2
+ import { Item } from '../../types';
3
+ import * as PropTypes from 'prop-types';
4
+ export declare const ItemForm: {
5
+ ({ children, item }: {
6
+ children?: React.ReactNode;
7
+ item?: Item | undefined;
8
+ }): JSX.Element;
9
+ propTypes: {
10
+ children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
11
+ __TYPE: PropTypes.Requireable<string>;
12
+ };
13
+ defaultProps: {
14
+ __TYPE: string;
15
+ };
16
+ };
@@ -0,0 +1,12 @@
1
+ import * as React from 'react';
2
+ import { LatLng } from 'leaflet';
3
+ import { LayerProps, Item, ItemsApi } from '../../types';
4
+ export interface ItemFormPopupProps {
5
+ position: LatLng;
6
+ layer: LayerProps;
7
+ item?: Item;
8
+ api?: ItemsApi<any>;
9
+ children?: React.ReactNode;
10
+ setItemFormPopup: React.Dispatch<React.SetStateAction<any>>;
11
+ }
12
+ export declare function ItemFormPopup(props: ItemFormPopupProps): JSX.Element;
@@ -0,0 +1,16 @@
1
+ import * as React from 'react';
2
+ import { Item } from '../../types';
3
+ import * as PropTypes from 'prop-types';
4
+ export declare const ItemView: {
5
+ ({ children, item }: {
6
+ children?: React.ReactNode;
7
+ item?: Item | undefined;
8
+ }): JSX.Element;
9
+ propTypes: {
10
+ children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
11
+ __TYPE: PropTypes.Requireable<string>;
12
+ };
13
+ defaultProps: {
14
+ __TYPE: string;
15
+ };
16
+ };
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import { Item } from '../../types';
3
+ import { ItemFormPopupProps } from './ItemFormPopup';
4
+ export interface ItemViewPopupProps {
5
+ item: Item;
6
+ setItemFormPopup?: React.Dispatch<React.SetStateAction<ItemFormPopupProps | null>>;
7
+ }
8
+ export declare const ItemViewPopup: (props: ItemViewPopupProps) => 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,2 @@
1
+ /// <reference types="react" />
2
+ export declare const FilterControl: () => JSX.Element;
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ import { ItemFormPopupProps } from "./ItemFormPopup";
3
+ import { Item } from "../../../types";
4
+ export declare function HeaderView({ item, setItemFormPopup }: {
5
+ item: Item;
6
+ setItemFormPopup?: React.Dispatch<React.SetStateAction<ItemFormPopupProps | null>>;
7
+ }): JSX.Element;
@@ -1,11 +1,11 @@
1
1
  import * as React from 'react';
2
2
  import { LatLng } from 'leaflet';
3
- import { LayerProps, Item, ItemsApi } from '../../../types';
3
+ import { LayerProps, Item } from '../../../types';
4
4
  export interface ItemFormPopupProps {
5
5
  position: LatLng;
6
6
  layer: LayerProps;
7
7
  item?: Item;
8
- api?: ItemsApi<any>;
8
+ children?: React.ReactNode;
9
9
  setItemFormPopup: React.Dispatch<React.SetStateAction<any>>;
10
10
  }
11
- export default function ItemFormPopup(props: ItemFormPopupProps): JSX.Element;
11
+ export declare function ItemFormPopup(props: ItemFormPopupProps): JSX.Element;
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ import { ItemFormPopupProps } from "../ItemFormPopup";
3
+ import { Item } from "../../../../types";
4
+ export declare function HeaderView({ item, setItemFormPopup }: {
5
+ item: Item;
6
+ setItemFormPopup?: React.Dispatch<React.SetStateAction<ItemFormPopupProps | null>>;
7
+ }): JSX.Element;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { Item } from '../../../../types';
3
+ export declare const PopupStartEndInput: ({ item }: {
4
+ item?: Item | undefined;
5
+ }) => JSX.Element;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { Item } from '../../../../types';
3
+ export declare const PopupTextAreaInput: ({ dataField, placeholder, style, item }: {
4
+ dataField: string;
5
+ placeholder: string;
6
+ style?: string | undefined;
7
+ item?: Item | undefined;
8
+ }) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const PopupTextInput: () => JSX.Element;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { Item } from '../../../../types';
3
+ export declare const StartEndView: ({ item }: {
4
+ item?: Item | undefined;
5
+ }) => JSX.Element;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { Item } from '../../../../types';
3
+ export declare const TextView: ({ item }: {
4
+ item?: Item | undefined;
5
+ }) => JSX.Element;
@@ -1,10 +1,9 @@
1
1
  import * as React from 'react';
2
- import { Item, Tag } from '../../../types';
2
+ import { Item } from '../../../types';
3
3
  import { ItemFormPopupProps } from './ItemFormPopup';
4
4
  export interface ItemViewPopupProps {
5
5
  item: Item;
6
- tags: Tag[];
6
+ children?: React.ReactNode;
7
7
  setItemFormPopup?: React.Dispatch<React.SetStateAction<ItemFormPopupProps | null>>;
8
8
  }
9
- declare const ItemViewPopup: (props: ItemViewPopupProps) => JSX.Element;
10
- export { ItemViewPopup };
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 @@
1
+ export default function LocateControl(): null;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const SearchBar: () => JSX.Element;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { Item } from '../../../types';
3
+ declare const StartEndView: ({ item }: {
4
+ item: Item;
5
+ }) => JSX.Element;
6
+ export default StartEndView;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const TagFilterControl: () => JSX.Element;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import { Item } from '../../../types';
3
+ export declare const TextView: ({ item }: {
4
+ item: Item;
5
+ }) => JSX.Element;
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { Tag } from '../../types';
3
- export declare function Tags({ data }: {
4
- data: Tag[];
2
+ import { ItemsApi, Tag } from '../../types';
3
+ export declare function Tags({ data, api }: {
4
+ data?: Tag[];
5
+ api?: ItemsApi<Tag>;
5
6
  }): JSX.Element;
@@ -1,12 +1,11 @@
1
1
  import "leaflet/dist/leaflet.css";
2
2
  import * as React from "react";
3
- import { Item, Tag, ItemsApi, LayerProps, UtopiaMapProps } from "../../types";
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
- /** This is a description of the foo function. */
11
10
  declare function UtopiaMap({ height, width, center, zoom, children }: UtopiaMapProps): JSX.Element;
12
- export { UtopiaMap, Item, Tag, ItemsApi };
11
+ export { UtopiaMap };
@@ -0,0 +1,32 @@
1
+ import * as React from "react";
2
+ import { LayerProps, Tag } from "../../../types";
3
+ declare type UseFilterManagerResult = ReturnType<typeof useFilterManager>;
4
+ declare function useFilterManager(initialTags: Tag[]): {
5
+ filterTags: Tag[];
6
+ searchPhrase: string;
7
+ visibleLayers: LayerProps[];
8
+ addFilterTag: (tag: Tag) => void;
9
+ removeFilterTag: (id: string) => void;
10
+ resetFilterTags: () => void;
11
+ setSearchPhrase: (phrase: string) => void;
12
+ addVisibleLayer: (layer: LayerProps) => void;
13
+ toggleVisibleLayer: (layer: LayerProps) => void;
14
+ resetVisibleLayers: () => void;
15
+ isLayerVisible: (layer: LayerProps) => boolean;
16
+ };
17
+ export declare const FilterProvider: React.FunctionComponent<{
18
+ initialTags: Tag[];
19
+ children?: React.ReactNode;
20
+ }>;
21
+ export declare const useFilterTags: () => Tag[];
22
+ export declare const useAddFilterTag: () => UseFilterManagerResult["addFilterTag"];
23
+ export declare const useRemoveFilterTag: () => UseFilterManagerResult["removeFilterTag"];
24
+ export declare const useResetFilterTags: () => UseFilterManagerResult["resetFilterTags"];
25
+ export declare const useSearchPhrase: () => UseFilterManagerResult["searchPhrase"];
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"];
32
+ export {};
@@ -7,6 +7,8 @@ declare function useItemsManager(initialItems: Item[]): {
7
7
  updateItem: (item: Item) => void;
8
8
  removeItem: (item: Item) => void;
9
9
  resetItems: (layer: LayerProps) => void;
10
+ setItemsApi: (layer: LayerProps) => void;
11
+ setItemsData: (layer: LayerProps) => void;
10
12
  };
11
13
  export declare const ItemsProvider: React.FunctionComponent<{
12
14
  initialItems: Item[];
@@ -17,4 +19,6 @@ export declare const useAddItem: () => UseItemManagerResult["addItem"];
17
19
  export declare const useUpdateItem: () => UseItemManagerResult["updateItem"];
18
20
  export declare const useRemoveItem: () => UseItemManagerResult["removeItem"];
19
21
  export declare const useResetItems: () => UseItemManagerResult["resetItems"];
22
+ export declare const useSetItemsApi: () => UseItemManagerResult["setItemsApi"];
23
+ export declare const useSetItemsData: () => UseItemManagerResult["setItemsData"];
20
24
  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,10 +1,13 @@
1
1
  import * as React from "react";
2
- import { 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
7
  removeTag: (id: string) => void;
8
+ setTagApi: (api: ItemsApi<Tag>) => void;
9
+ setTagData: (data: Tag[]) => void;
10
+ getItemTags: (item: Item) => Tag[];
8
11
  };
9
12
  export declare const TagsProvider: React.FunctionComponent<{
10
13
  initialTags: Tag[];
@@ -13,4 +16,7 @@ export declare const TagsProvider: React.FunctionComponent<{
13
16
  export declare const useTags: () => Tag[];
14
17
  export declare const useAddTag: () => UseTagManagerResult["addTag"];
15
18
  export declare const useRemoveTag: () => UseTagManagerResult["removeTag"];
19
+ export declare const useSetTagApi: () => UseTagManagerResult["setTagApi"];
20
+ export declare const useSetTagData: () => UseTagManagerResult["setTagData"];
21
+ export declare const useGetItemTags: () => UseTagManagerResult["getItemTags"];
16
22
  export {};
@@ -0,0 +1,4 @@
1
+ export default function useWindowDimensions(): {
2
+ width: number;
3
+ height: number;
4
+ };
@@ -1,3 +1,10 @@
1
- export { UtopiaMap, Item, Tag, ItemsApi } from './UtopiaMap';
1
+ export { UtopiaMap } from './UtopiaMap';
2
2
  export { Layer } from './Layer';
3
3
  export { Tags } from "./Tags";
4
+ export { Permissions } from "./Permissions";
5
+ export { ItemForm } from './ItemForm';
6
+ export { ItemView } from './ItemView';
7
+ export { PopupTextAreaInput } from './Subcomponents/ItemPopupComponents/PopupTextAreaInput';
8
+ export { PopupStartEndInput } from './Subcomponents/ItemPopupComponents/PopupStartEndInput';
9
+ export { TextView } from './Subcomponents/ItemPopupComponents/TextView';
10
+ export { StartEndView } from './Subcomponents/ItemPopupComponents/StartEndView';
@@ -1,5 +1,3 @@
1
1
  /// <reference types="react" />
2
2
  import 'react-toastify/dist/ReactToastify.css';
3
- export declare function Settings({ useAuth }: {
4
- useAuth: any;
5
- }): JSX.Element;
3
+ export declare function Settings(): JSX.Element;
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ export declare function CardPage({ title, children }: {
3
+ title: string;
4
+ children?: React.ReactNode;
5
+ }): JSX.Element;
@@ -0,0 +1,9 @@
1
+ import * as React from "react";
2
+ interface TitleCardProps {
3
+ title: string;
4
+ children: React.ReactNode;
5
+ topMargin: string;
6
+ TopSideButtons?: any;
7
+ }
8
+ export declare function TitleCard({ title, children, topMargin, TopSideButtons }: TitleCardProps): JSX.Element;
9
+ export {};
@@ -0,0 +1,2 @@
1
+ export { CardPage } from './CardPage';
2
+ export { TitleCard } from './TitleCard';
@@ -5,5 +5,5 @@ interface TitleCardProps {
5
5
  topMargin: string;
6
6
  TopSideButtons?: any;
7
7
  }
8
- declare function TitleCard({ title, children, topMargin, TopSideButtons }: TitleCardProps): JSX.Element;
9
- export default TitleCard;
8
+ export declare function TitleCard({ title, children, topMargin, TopSideButtons }: TitleCardProps): JSX.Element;
9
+ export {};
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ declare function ErrorText({ styleClass, children }: {
3
+ styleClass: any;
4
+ children: any;
5
+ }): JSX.Element;
6
+ export default ErrorText;
@@ -1,6 +1,6 @@
1
- /// <reference types="react" />
1
+ import * as React from "react";
2
2
  declare function Subtitle({ styleClass, children }: {
3
- styleClass: any;
4
- children: any;
3
+ styleClass: string;
4
+ children: React.ReactNode;
5
5
  }): JSX.Element;
6
6
  export default Subtitle;