utopia-ui 3.0.0-alpha.23 → 3.0.0-alpha.231
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.
- package/LICENSE +674 -0
- package/README.md +29 -6
- package/dist/Components/AppShell/AppShell.d.ts +9 -5
- package/dist/Components/AppShell/Content.d.ts +1 -1
- package/dist/Components/AppShell/NavBar.d.ts +3 -3
- package/dist/Components/AppShell/SetAssetsApi.d.ts +4 -0
- package/dist/Components/AppShell/SideBar.d.ts +1 -2
- package/dist/Components/AppShell/SidebarSubmenu.d.ts +1 -2
- package/dist/Components/AppShell/Sitemap.d.ts +3 -0
- package/dist/Components/AppShell/hooks/useAssets.d.ts +13 -0
- package/dist/Components/AppShell/index.d.ts +1 -0
- package/dist/Components/Auth/LoginPage.d.ts +1 -2
- package/dist/Components/Auth/RequestPasswordPage.d.ts +3 -0
- package/dist/Components/Auth/SetNewPasswordPage.d.ts +1 -0
- package/dist/Components/Auth/SignupPage.d.ts +1 -2
- package/dist/Components/Auth/index.d.ts +3 -1
- package/dist/Components/Auth/useAuth.d.ts +3 -1
- package/dist/Components/Gaming/Modal.d.ts +5 -10
- package/dist/Components/Gaming/Quests.d.ts +1 -2
- package/dist/Components/Gaming/hooks/useQuests.d.ts +13 -0
- package/dist/Components/Input/Autocomplete.d.ts +7 -0
- package/dist/Components/Input/ComboBoxInput.d.ts +11 -0
- package/dist/Components/Input/SelectBox.d.ts +1 -2
- package/dist/Components/Input/TextAreaInput.d.ts +1 -2
- package/dist/Components/Input/TextInput.d.ts +2 -2
- package/dist/Components/Map/ItemForm.d.ts +4 -2
- package/dist/Components/Map/ItemView.d.ts +1 -1
- package/dist/Components/Map/Layer.d.ts +1 -2
- package/dist/Components/Map/Permissions.d.ts +1 -2
- package/dist/Components/Map/Subcomponents/AddButton.d.ts +3 -3
- package/dist/Components/Map/Subcomponents/Controls/Control.d.ts +7 -0
- package/dist/Components/Map/Subcomponents/Controls/FilterControl.d.ts +1 -0
- package/dist/Components/Map/Subcomponents/Controls/GratitudeControl.d.ts +1 -0
- package/dist/Components/Map/Subcomponents/Controls/LayerControl.d.ts +1 -0
- package/dist/Components/Map/Subcomponents/Controls/LocateControl.d.ts +3 -0
- package/dist/Components/Map/Subcomponents/Controls/QuestControl.d.ts +1 -0
- package/dist/Components/Map/Subcomponents/Controls/SearchControl.d.ts +1 -0
- package/dist/Components/Map/Subcomponents/Controls/SidebarControl.d.ts +1 -0
- package/dist/Components/Map/Subcomponents/Controls/TagsControl.d.ts +1 -0
- package/dist/Components/Map/Subcomponents/ItemFormPopup.d.ts +2 -2
- package/dist/Components/Map/Subcomponents/ItemPopupComponents/HeaderView.d.ts +16 -6
- package/dist/Components/Map/Subcomponents/ItemPopupComponents/PopupButton.d.ts +8 -0
- package/dist/Components/Map/Subcomponents/ItemPopupComponents/PopupCheckboxInput.d.ts +6 -0
- package/dist/Components/Map/Subcomponents/ItemPopupComponents/PopupStartEndInput.d.ts +1 -2
- package/dist/Components/Map/Subcomponents/ItemPopupComponents/PopupTextAreaInput.d.ts +1 -2
- package/dist/Components/Map/Subcomponents/ItemPopupComponents/PopupTextInput.d.ts +7 -2
- package/dist/Components/Map/Subcomponents/ItemPopupComponents/StartEndView.d.ts +1 -2
- package/dist/Components/Map/Subcomponents/ItemPopupComponents/TextView.d.ts +5 -3
- package/dist/Components/Map/Tags.d.ts +1 -2
- package/dist/Components/Map/UtopiaMap.d.ts +2 -8
- package/dist/Components/Map/hooks/useClusterRef.d.ts +12 -0
- package/dist/Components/Map/hooks/useDebounce.d.ts +1 -0
- package/dist/Components/Map/hooks/useFilter.d.ts +9 -1
- package/dist/Components/Map/hooks/useItems.d.ts +2 -0
- package/dist/Components/Map/hooks/usePermissions.d.ts +2 -2
- package/dist/Components/Map/hooks/useSelectPosition.d.ts +23 -0
- package/dist/Components/Map/hooks/useTags.d.ts +2 -2
- package/dist/Components/Map/hooks/useTimeout.d.ts +4 -0
- package/dist/Components/Map/index.d.ts +3 -0
- package/dist/Components/Map/setItemLocation.d.ts +1 -0
- package/dist/Components/Profile/ProfileForm.d.ts +3 -0
- package/dist/Components/Profile/ProfileView.d.ts +3 -0
- package/dist/Components/Profile/Subcomponents/ActionsButton.d.ts +11 -0
- package/dist/Components/Profile/Subcomponents/AvatarWidget.d.ts +6 -0
- package/dist/Components/Profile/Subcomponents/ColorPicker.d.ts +6 -0
- package/dist/Components/Profile/Subcomponents/ContactInfo.d.ts +8 -0
- package/dist/Components/Profile/Subcomponents/FormHeader.d.ts +5 -0
- package/dist/Components/Profile/Subcomponents/LinkedItemsHeaderView.d.ts +10 -0
- package/dist/Components/Profile/Subcomponents/PlusButton.d.ts +7 -0
- package/dist/Components/Profile/Subcomponents/ProfileSubHeader.d.ts +7 -0
- package/dist/Components/Profile/Subcomponents/RelationCard.d.ts +6 -0
- package/dist/Components/Profile/Subcomponents/SocialShareBar.d.ts +6 -0
- package/dist/Components/Profile/Subcomponents/SocialShareButton.d.ts +6 -0
- package/dist/Components/Profile/Subcomponents/TagsWidget.d.ts +6 -0
- package/dist/Components/Profile/Templates/OnepagerForm.d.ts +22 -0
- package/dist/Components/Profile/Templates/OnepagerView.d.ts +5 -0
- package/dist/Components/Profile/Templates/SimpleForm.d.ts +4 -0
- package/dist/Components/Profile/Templates/SimpleView.d.ts +4 -0
- package/dist/Components/Profile/Templates/TabsForm.d.ts +9 -0
- package/dist/Components/Profile/Templates/TabsView.d.ts +11 -0
- package/dist/Components/Profile/UserSettings.d.ts +1 -0
- package/dist/Components/Profile/hooks/useClickOutside.d.ts +2 -0
- package/dist/Components/Profile/index.d.ts +4 -1
- package/dist/Components/Profile/itemFunctions.d.ts +5 -0
- package/dist/Components/Templates/AttestationForm.d.ts +1 -0
- package/dist/Components/Templates/CardPage.d.ts +6 -5
- package/dist/Components/Templates/CircleLayout.d.ts +5 -0
- package/dist/Components/Templates/DateUserInfo.d.ts +4 -0
- package/dist/Components/{AppShell → Templates}/DialogModal.d.ts +4 -1
- package/dist/Components/Templates/EmojiPicker.d.ts +1 -0
- package/dist/Components/Templates/ItemCard.d.ts +8 -0
- package/dist/Components/Templates/MapOverlayPage.d.ts +7 -0
- package/dist/Components/Templates/MoonCalendar.d.ts +1 -0
- package/dist/Components/Templates/OverlayItemsIndexPage.d.ts +6 -0
- package/dist/Components/Templates/SelectUser.d.ts +3 -0
- package/dist/Components/Templates/TagView.d.ts +6 -0
- package/dist/Components/Templates/TitleCard.d.ts +5 -4
- package/dist/Components/Templates/index.d.ts +3 -0
- package/dist/Components/Typography/ErrorText.d.ts +1 -2
- package/dist/Components/Typography/Subtitle.d.ts +1 -1
- package/dist/Utils/FormatTags.d.ts +2 -0
- package/dist/Utils/GetValue.d.ts +1 -0
- package/dist/Utils/Moon.d.ts +7 -0
- package/dist/Utils/ReverseGeocoder.d.ts +1 -0
- package/dist/Utils/TimeAgo.d.ts +1 -0
- package/dist/index.d.ts +5 -5
- package/dist/index.js +4218 -1298
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +72 -11
- package/package.json +12 -4
- package/LICENSE.md +0 -5
- package/dist/Components/Map/Subcomponents/FilterControl.d.ts +0 -2
- package/dist/Components/Map/Subcomponents/LayerControl.d.ts +0 -2
- package/dist/Components/Profile/Settings.d.ts +0 -3
- package/dist/Utils/DynamicHeroIcon.d.ts +0 -7
package/README.md
CHANGED
@@ -1,11 +1,25 @@
|
|
1
1
|
# Utopia UI [](https://www.npmjs.com/package/utopia-ui)
|
2
|
-
|
2
|
+
**UI Framework for Real-Life-Networking-Apps**
|
3
3
|
|
4
|
-
|
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
|
-
*
|
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
|
-
|
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
|
|
@@ -15,6 +29,15 @@ install via npm
|
|
15
29
|
npm install utopia-ui
|
16
30
|
```
|
17
31
|
|
32
|
+
## Examples
|
33
|
+
|
34
|
+
[Moos Map](https://github.com/utopia-os/moos-map)
|
35
|
+
|
36
|
+
## Demo
|
37
|
+
|
38
|
+
[Moos Map](https://moos-map.de)
|
39
|
+
|
40
|
+
|
18
41
|
## Map Component
|
19
42
|
The map shows various Layers (places, events, profiles ...) of Irems at their respective position whith nice and informative Popups.
|
20
43
|
|
@@ -63,8 +86,8 @@ You can find some Sample Data (places, events, tags) for test in the `SamleData/
|
|
63
86
|
|
64
87
|
## Join the community
|
65
88
|
|
66
|
-
*This Library is in
|
89
|
+
*This Library is in alpha stage. You are very welcome to participate in the development*
|
67
90
|
|
68
91
|
*We are looking for Web Developer, UX Designer, Community Manager, Visionaries, Artists, etc. who like to support this Vision.*
|
69
92
|
|
70
|
-
[https://t.me/utopiaOS](https://t.me/utopiaOS)
|
93
|
+
[https://t.me/utopiaOS](https://t.me/utopiaOS)
|
@@ -1,5 +1,9 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
import * as React from 'react';
|
2
|
+
import { AssetsApi } from '../../types';
|
3
|
+
import 'react-toastify/dist/ReactToastify.css';
|
4
|
+
export declare function AppShell({ appName, children, assetsApi, userType }: {
|
5
|
+
appName: string;
|
6
|
+
children: React.ReactNode;
|
7
|
+
assetsApi: AssetsApi;
|
8
|
+
userType: string;
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
@@ -2,5 +2,5 @@ import * as React from 'react';
|
|
2
2
|
declare type ContentProps = {
|
3
3
|
children?: React.ReactNode;
|
4
4
|
};
|
5
|
-
export declare function Content({ children }: ContentProps): JSX.Element;
|
5
|
+
export declare function Content({ children }: ContentProps): import("react/jsx-runtime").JSX.Element;
|
6
6
|
export {};
|
@@ -1,4 +1,3 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
declare type route = {
|
3
2
|
path: string;
|
4
3
|
icon: JSX.Element;
|
@@ -9,5 +8,5 @@ declare type route = {
|
|
9
8
|
export declare function SideBar({ routes, bottomRoutes }: {
|
10
9
|
routes: route[];
|
11
10
|
bottomRoutes?: route[];
|
12
|
-
}): JSX.Element;
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|
13
12
|
export {};
|
@@ -1,8 +1,7 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
declare function SidebarSubmenu({ submenu, name, icon }: {
|
3
2
|
path: string;
|
4
3
|
icon: JSX.Element;
|
5
4
|
name: string;
|
6
5
|
submenu?: any | undefined;
|
7
|
-
}): JSX.Element;
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
8
7
|
export default SidebarSubmenu;
|
@@ -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 {};
|
@@ -1,2 +1 @@
|
|
1
|
-
|
2
|
-
export declare function LoginPage(): JSX.Element;
|
1
|
+
export declare function LoginPage(): import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function SetNewPasswordPage(): import("react/jsx-runtime").JSX.Element;
|
@@ -1,2 +1 @@
|
|
1
|
-
|
2
|
-
export declare function SignupPage(): JSX.Element;
|
1
|
+
export declare function SignupPage(): import("react/jsx-runtime").JSX.Element;
|
@@ -1,3 +1,5 @@
|
|
1
1
|
export { AuthProvider, useAuth } from "./useAuth";
|
2
2
|
export { LoginPage } from "./LoginPage";
|
3
|
-
export { SignupPage } from
|
3
|
+
export { SignupPage } from './SignupPage';
|
4
|
+
export { RequestPasswordPage } from './RequestPasswordPage';
|
5
|
+
export { SetNewPasswordPage } from './SetNewPasswordPage';
|
@@ -18,7 +18,9 @@ declare type AuthContextProps = {
|
|
18
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
|
-
export declare const AuthProvider: ({ userApi, children }: AuthProviderProps) => JSX.Element;
|
24
|
+
export declare const AuthProvider: ({ userApi, children }: AuthProviderProps) => import("react/jsx-runtime").JSX.Element;
|
23
25
|
export declare const useAuth: () => AuthContextProps;
|
24
26
|
export {};
|
@@ -1,10 +1,5 @@
|
|
1
|
-
|
2
|
-
declare
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
export declare function Welcome2({ clickAction }: ChapterProps): JSX.Element;
|
7
|
-
export declare function Welcome3({ clickAction }: ChapterProps): JSX.Element;
|
8
|
-
export declare function Welcome4({ clickAction }: ChapterProps): JSX.Element;
|
9
|
-
export declare function Modal(): JSX.Element;
|
10
|
-
export {};
|
1
|
+
import * as React from "react";
|
2
|
+
export declare function Modal({ children, showOnStartup }: {
|
3
|
+
children: React.ReactNode;
|
4
|
+
showOnStartup?: boolean;
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
@@ -1,2 +1 @@
|
|
1
|
-
|
2
|
-
export declare function Quests(): JSX.Element;
|
1
|
+
export declare function Quests(): import("react/jsx-runtime").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,7 @@
|
|
1
|
+
export declare const Autocomplete: ({ inputProps, suggestions, onSelected, pushFilteredSuggestions, setFocus }: {
|
2
|
+
inputProps: any;
|
3
|
+
suggestions: Array<any>;
|
4
|
+
onSelected: (suggestion: any) => void;
|
5
|
+
pushFilteredSuggestions?: any[] | undefined;
|
6
|
+
setFocus?: boolean | undefined;
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
interface ComboBoxProps {
|
2
|
+
id?: string;
|
3
|
+
options: {
|
4
|
+
value: string;
|
5
|
+
label: string;
|
6
|
+
}[];
|
7
|
+
value: string;
|
8
|
+
onValueChange: (newValue: string) => void;
|
9
|
+
}
|
10
|
+
declare const ComboBoxInput: ({ id, options, value, onValueChange }: ComboBoxProps) => import("react/jsx-runtime").JSX.Element;
|
11
|
+
export default ComboBoxInput;
|
@@ -1,4 +1,3 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
declare type SelectBoxProps = {
|
3
2
|
labelTitle?: string;
|
4
3
|
labelStyle?: string;
|
@@ -13,5 +12,5 @@ declare type SelectBoxProps = {
|
|
13
12
|
}[];
|
14
13
|
labelDescription?: string;
|
15
14
|
};
|
16
|
-
export declare function SelectBox(props: SelectBoxProps): JSX.Element;
|
15
|
+
export declare function SelectBox(props: SelectBoxProps): import("react/jsx-runtime").JSX.Element;
|
17
16
|
export {};
|
@@ -1,4 +1,3 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
declare type TextAreaProps = {
|
3
2
|
labelTitle?: string;
|
4
3
|
labelStyle?: string;
|
@@ -9,5 +8,5 @@ declare type TextAreaProps = {
|
|
9
8
|
placeholder?: string;
|
10
9
|
updateFormValue?: (value: string) => void;
|
11
10
|
};
|
12
|
-
export declare function TextAreaInput({ labelTitle, dataField, labelStyle, containerStyle, inputStyle, defaultValue, placeholder, updateFormValue }: TextAreaProps): JSX.Element;
|
11
|
+
export declare function TextAreaInput({ labelTitle, dataField, labelStyle, containerStyle, inputStyle, defaultValue, placeholder, updateFormValue }: TextAreaProps): import("react/jsx-runtime").JSX.Element;
|
13
12
|
export {};
|
@@ -1,4 +1,3 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
declare type InputTextProps = {
|
3
2
|
labelTitle?: string;
|
4
3
|
labelStyle?: string;
|
@@ -8,7 +7,8 @@ declare type InputTextProps = {
|
|
8
7
|
inputStyle?: string;
|
9
8
|
defaultValue?: string;
|
10
9
|
placeholder?: string;
|
10
|
+
autocomplete?: string;
|
11
11
|
updateFormValue?: (value: string) => void;
|
12
12
|
};
|
13
|
-
export declare function TextInput({ labelTitle, labelStyle, type, dataField, containerStyle, inputStyle, defaultValue, placeholder, updateFormValue }: InputTextProps): JSX.Element;
|
13
|
+
export declare function TextInput({ labelTitle, labelStyle, type, dataField, containerStyle, inputStyle, defaultValue, placeholder, autocomplete, updateFormValue }: InputTextProps): import("react/jsx-runtime").JSX.Element;
|
14
14
|
export {};
|
@@ -2,10 +2,12 @@ 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
|
-
|
8
|
+
title?: string | undefined;
|
9
|
+
setPopupTitle?: React.Dispatch<React.SetStateAction<string>> | undefined;
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
9
11
|
propTypes: {
|
10
12
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
11
13
|
__TYPE: PropTypes.Requireable<string>;
|
@@ -5,7 +5,7 @@ export declare const ItemView: {
|
|
5
5
|
({ children, item }: {
|
6
6
|
children?: React.ReactNode;
|
7
7
|
item?: Item | undefined;
|
8
|
-
}): JSX.Element;
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
9
9
|
propTypes: {
|
10
10
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
11
11
|
__TYPE: PropTypes.Requireable<string>;
|
@@ -1,3 +1,2 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { LayerProps } from '../../types';
|
3
|
-
export declare const Layer: (
|
2
|
+
export declare const Layer: ({ data, children, name, menuIcon, menuText, menuColor, markerIcon, markerShape, markerDefaultColor, markerDefaultColor2, api, itemType, itemNameField, itemSubnameField, itemTextField, itemAvatarField, itemColorField, itemOwnerField, itemLatitudeField, itemLongitudeField, itemTagsField, itemOffersField, itemNeedsField, onlyOnePerOwner, customEditLink, customEditParameter, public_edit_items, listed, setItemFormPopup, itemFormPopup, clusterRef }: LayerProps) => import("react/jsx-runtime").JSX.Element;
|
@@ -1,7 +1,6 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { ItemsApi, Permission } from '../../types';
|
3
2
|
export declare function Permissions({ data, api, adminRole }: {
|
4
3
|
data?: Permission[];
|
5
4
|
api?: ItemsApi<Permission>;
|
6
5
|
adminRole?: string;
|
7
|
-
}): JSX.Element;
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
export default function AddButton({
|
3
|
-
|
4
|
-
}): JSX.Element;
|
2
|
+
export default function AddButton({ triggerAction }: {
|
3
|
+
triggerAction: React.Dispatch<React.SetStateAction<any>>;
|
4
|
+
}): import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
export declare const Control: ({ position, children, zIndex, absolute }: {
|
3
|
+
position: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
|
4
|
+
children: React.ReactNode;
|
5
|
+
zIndex: string;
|
6
|
+
absolute: boolean;
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function FilterControl(): import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const GratitudeControl: () => import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function LayerControl(): import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function QuestControl(): import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const SearchControl: () => import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const SidebarControl: () => import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const TagsControl: () => import("react/jsx-runtime").JSX.Element;
|
@@ -6,6 +6,6 @@ export interface ItemFormPopupProps {
|
|
6
6
|
layer: LayerProps;
|
7
7
|
item?: Item;
|
8
8
|
children?: React.ReactNode;
|
9
|
-
setItemFormPopup
|
9
|
+
setItemFormPopup?: React.Dispatch<React.SetStateAction<ItemFormPopupProps | null>>;
|
10
10
|
}
|
11
|
-
export declare function ItemFormPopup(props: ItemFormPopupProps): JSX.Element;
|
11
|
+
export declare function ItemFormPopup(props: ItemFormPopupProps): import("react/jsx-runtime").JSX.Element;
|
@@ -1,7 +1,17 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
import { Item } from "../../../../types";
|
4
|
-
export declare function HeaderView({ item, setItemFormPopup }: {
|
1
|
+
import { Item, ItemsApi } from "../../../../types";
|
2
|
+
export declare function HeaderView({ item, api, editCallback, deleteCallback, setPositionCallback, itemNameField, itemSubnameField, itemAvatarField, loading, hideMenu, big, truncateSubname, hideSubname, showAddress }: {
|
5
3
|
item: Item;
|
6
|
-
|
7
|
-
|
4
|
+
api?: ItemsApi<any>;
|
5
|
+
editCallback?: any;
|
6
|
+
deleteCallback?: any;
|
7
|
+
setPositionCallback?: any;
|
8
|
+
itemNameField?: string;
|
9
|
+
itemAvatarField?: string;
|
10
|
+
itemSubnameField?: string;
|
11
|
+
loading?: boolean;
|
12
|
+
hideMenu?: boolean;
|
13
|
+
big?: boolean;
|
14
|
+
hideSubname?: boolean;
|
15
|
+
truncateSubname?: boolean;
|
16
|
+
showAddress?: boolean;
|
17
|
+
}): import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { Item } from '../../../../types';
|
2
|
+
export declare const PopupButton: ({ url, parameterField, text, colorField, item }: {
|
3
|
+
url: string;
|
4
|
+
parameterField?: string | undefined;
|
5
|
+
text: string;
|
6
|
+
colorField?: string | undefined;
|
7
|
+
item?: Item | undefined;
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
@@ -1,8 +1,7 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { Item } from '../../../../types';
|
3
2
|
export declare const PopupTextAreaInput: ({ dataField, placeholder, style, item }: {
|
4
3
|
dataField: string;
|
5
4
|
placeholder: string;
|
6
5
|
style?: string | undefined;
|
7
6
|
item?: Item | undefined;
|
8
|
-
}) => JSX.Element;
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
@@ -1,2 +1,7 @@
|
|
1
|
-
|
2
|
-
export declare const PopupTextInput: (
|
1
|
+
import { Item } from '../../../../types';
|
2
|
+
export declare const PopupTextInput: ({ dataField, placeholder, style, item }: {
|
3
|
+
dataField: string;
|
4
|
+
placeholder: string;
|
5
|
+
style?: string | undefined;
|
6
|
+
item?: Item | undefined;
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
@@ -1,5 +1,7 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { Item } from '../../../../types';
|
3
|
-
export declare const TextView: ({ item }: {
|
2
|
+
export declare const TextView: ({ item, truncate, itemTextField, rawText }: {
|
4
3
|
item?: Item | undefined;
|
5
|
-
|
4
|
+
truncate?: boolean | undefined;
|
5
|
+
itemTextField?: string | undefined;
|
6
|
+
rawText?: string | undefined;
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
@@ -1,11 +1,5 @@
|
|
1
1
|
import "leaflet/dist/leaflet.css";
|
2
|
-
import
|
3
|
-
import { LayerProps, UtopiaMapProps } from "../../types";
|
2
|
+
import { UtopiaMapProps } from "../../types";
|
4
3
|
import "./UtopiaMap.css";
|
5
|
-
|
6
|
-
selectNewItemPosition: LayerProps | null;
|
7
|
-
setSelectNewItemPosition: React.Dispatch<any>;
|
8
|
-
setItemFormPopup: React.Dispatch<React.SetStateAction<any>>;
|
9
|
-
}
|
10
|
-
declare function UtopiaMap({ height, width, center, zoom, children }: UtopiaMapProps): JSX.Element;
|
4
|
+
declare function UtopiaMap({ height, width, center, zoom, children, geo, showFilterControl, showLayerControl }: UtopiaMapProps): import("react/jsx-runtime").JSX.Element;
|
11
5
|
export { UtopiaMap };
|
@@ -0,0 +1,12 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
declare type UseClusterRefManagerResult = ReturnType<typeof useClusterRefManager>;
|
3
|
+
declare function useClusterRefManager(): {
|
4
|
+
clusterRef: any;
|
5
|
+
setClusterRef: React.Dispatch<React.SetStateAction<React.MutableRefObject<undefined>>>;
|
6
|
+
};
|
7
|
+
export declare const ClusterRefProvider: React.FunctionComponent<{
|
8
|
+
children?: React.ReactNode;
|
9
|
+
}>;
|
10
|
+
export declare const useClusterRef: () => any;
|
11
|
+
export declare const useSetClusterRef: () => UseClusterRefManagerResult["setClusterRef"];
|
12
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const useDebounce: (callback: any, delay: any, deps: any) => void;
|
@@ -5,14 +5,18 @@ declare function useFilterManager(initialTags: Tag[]): {
|
|
5
5
|
filterTags: Tag[];
|
6
6
|
searchPhrase: string;
|
7
7
|
visibleLayers: LayerProps[];
|
8
|
+
visibleGroupTypes: string[];
|
8
9
|
addFilterTag: (tag: Tag) => void;
|
9
|
-
removeFilterTag: (
|
10
|
+
removeFilterTag: (name: string) => void;
|
10
11
|
resetFilterTags: () => void;
|
11
12
|
setSearchPhrase: (phrase: string) => void;
|
12
13
|
addVisibleLayer: (layer: LayerProps) => void;
|
13
14
|
toggleVisibleLayer: (layer: LayerProps) => void;
|
14
15
|
resetVisibleLayers: () => void;
|
15
16
|
isLayerVisible: (layer: LayerProps) => boolean;
|
17
|
+
addVisibleGroupType: (groupType: string) => void;
|
18
|
+
toggleVisibleGroupType: (groupType: string) => void;
|
19
|
+
isGroupTypeVisible: (groupType: string) => boolean;
|
16
20
|
};
|
17
21
|
export declare const FilterProvider: React.FunctionComponent<{
|
18
22
|
initialTags: Tag[];
|
@@ -29,4 +33,8 @@ export declare const useAddVisibleLayer: () => UseFilterManagerResult["addVisibl
|
|
29
33
|
export declare const useToggleVisibleLayer: () => UseFilterManagerResult["toggleVisibleLayer"];
|
30
34
|
export declare const useResetVisibleLayers: () => UseFilterManagerResult["resetVisibleLayers"];
|
31
35
|
export declare const useIsLayerVisible: () => UseFilterManagerResult["isLayerVisible"];
|
36
|
+
export declare const useAddVisibleGroupType: () => UseFilterManagerResult["addVisibleGroupType"];
|
37
|
+
export declare const useToggleVisibleGroupType: () => UseFilterManagerResult["toggleVisibleGroupType"];
|
38
|
+
export declare const useIsGroupTypeVisible: () => UseFilterManagerResult["isGroupTypeVisible"];
|
39
|
+
export declare const useVisibleGroupType: () => UseFilterManagerResult["visibleGroupTypes"];
|
32
40
|
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 {};
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import * as React from "react";
|
2
|
-
import { ItemsApi, Permission, PermissionAction } from "../../../types";
|
2
|
+
import { Item, ItemsApi, LayerProps, Permission, PermissionAction } from "../../../types";
|
3
3
|
declare type UsePermissionManagerResult = ReturnType<typeof usePermissionsManager>;
|
4
4
|
declare function usePermissionsManager(initialPermissions: Permission[]): {
|
5
5
|
permissions: Permission[];
|
6
6
|
setPermissionApi: (api: ItemsApi<any>) => void;
|
7
7
|
setPermissionData: (data: Permission[]) => void;
|
8
8
|
setAdminRole: (adminRole: string) => void;
|
9
|
-
hasUserPermission: (collectionName: string, action: PermissionAction) => boolean;
|
9
|
+
hasUserPermission: (collectionName: string, action: PermissionAction, item?: Item, layer?: LayerProps) => boolean;
|
10
10
|
};
|
11
11
|
export declare const PermissionsProvider: React.FunctionComponent<{
|
12
12
|
initialPermissions: Permission[];
|
@@ -0,0 +1,23 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { Item, LayerProps } from '../../../types';
|
3
|
+
import { LatLng } from "leaflet";
|
4
|
+
import { ItemFormPopupProps } from "../Subcomponents/ItemFormPopup";
|
5
|
+
declare type PolygonClickedProps = {
|
6
|
+
position: LatLng;
|
7
|
+
setItemFormPopup: React.Dispatch<React.SetStateAction<ItemFormPopupProps | null>>;
|
8
|
+
};
|
9
|
+
declare type UseSelectPositionManagerResult = ReturnType<typeof useSelectPositionManager>;
|
10
|
+
declare function useSelectPositionManager(): {
|
11
|
+
selectPosition: Item | LayerProps | null;
|
12
|
+
setSelectPosition: React.Dispatch<React.SetStateAction<Item | LayerProps | null>>;
|
13
|
+
setMarkerClicked: React.Dispatch<React.SetStateAction<Item>>;
|
14
|
+
setMapClicked: React.Dispatch<React.SetStateAction<PolygonClickedProps | undefined>>;
|
15
|
+
};
|
16
|
+
export declare const SelectPositionProvider: React.FunctionComponent<{
|
17
|
+
children?: React.ReactNode;
|
18
|
+
}>;
|
19
|
+
export declare const useSelectPosition: () => Item | LayerProps | null;
|
20
|
+
export declare const useSetSelectPosition: () => UseSelectPositionManagerResult["setSelectPosition"];
|
21
|
+
export declare const useSetMarkerClicked: () => UseSelectPositionManagerResult["setMarkerClicked"];
|
22
|
+
export declare const useSetMapClicked: () => UseSelectPositionManagerResult["setMapClicked"];
|
23
|
+
export {};
|