utopia-ui 3.0.0-alpha.19 → 3.0.0-alpha.191
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 +7 -5
- package/dist/Components/AppShell/Content.d.ts +1 -1
- package/dist/Components/AppShell/NavBar.d.ts +1 -2
- package/dist/Components/AppShell/SetAssetsApi.d.ts +4 -0
- package/dist/Components/AppShell/SideBar.d.ts +4 -2
- package/dist/Components/AppShell/SidebarSubmenu.d.ts +1 -1
- package/dist/Components/AppShell/hooks/useAssets.d.ts +13 -0
- package/dist/Components/Auth/LoginPage copy.d.ts +2 -0
- package/dist/Components/Auth/LoginPage.d.ts +1 -2
- package/dist/Components/Auth/RequestPasswordPage.d.ts +3 -0
- package/dist/Components/Auth/ResetPasswordPage.d.ts +2 -0
- package/dist/Components/Auth/SetNewPasswordPage.d.ts +1 -0
- package/dist/Components/Auth/SignupPage.d.ts +1 -2
- package/dist/Components/Auth/Signuppage.d.ts +2 -0
- package/dist/Components/Auth/index.d.ts +3 -1
- package/dist/Components/Auth/useAuth.d.ts +4 -2
- package/dist/Components/Gaming/Modal.d.ts +5 -9
- 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 +16 -0
- package/dist/Components/Input/TextAreaInput.d.ts +1 -2
- package/dist/Components/Input/TextInput.d.ts +2 -2
- package/dist/Components/Input/index.d.ts +1 -0
- 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/Control.d.ts +5 -0
- 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/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/Subcomponents/QuestControl.d.ts +2 -0
- 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 +7 -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/useSetItemPosition.d.ts +13 -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/ActionButton.d.ts +5 -0
- package/dist/Components/Profile/ActionsButton.d.ts +11 -0
- package/dist/Components/Profile/AvatarWidget.d.ts +5 -0
- package/dist/Components/Profile/ColorPicker.d.ts +6 -0
- package/dist/Components/Profile/ContactInfo.d.ts +7 -0
- package/dist/Components/Profile/Editor.d.ts +4 -0
- package/dist/Components/Profile/ItemForm.d.ts +1 -0
- package/dist/Components/Profile/LinkedItemsHeaderView.d.ts +10 -0
- package/dist/Components/Profile/OverlayItemProfile.d.ts +1 -0
- package/dist/Components/Profile/OverlayItemProfileSettings.d.ts +1 -0
- package/dist/Components/Profile/OverlayProfile.d.ts +1 -0
- package/dist/Components/Profile/OverlayProfileSettings.d.ts +1 -0
- package/dist/Components/Profile/OverlayUserSettings.d.ts +1 -0
- package/dist/Components/Profile/PlusButton.d.ts +7 -0
- package/dist/Components/Profile/ProfileSettings.d.ts +3 -0
- package/dist/Components/Profile/ProfileSubHeader.d.ts +7 -0
- package/dist/Components/Profile/RelationCard.d.ts +6 -0
- package/dist/Components/Profile/Settings.d.ts +1 -0
- package/dist/Components/Profile/SocialShareBar.d.ts +6 -0
- package/dist/Components/Profile/SocialShareButton.d.ts +6 -0
- package/dist/Components/Profile/Tags.d.ts +2 -0
- package/dist/Components/Profile/TagsWidget.d.ts +6 -0
- package/dist/Components/Profile/UserSettings.d.ts +3 -0
- package/dist/Components/Profile/index.d.ts +8 -1
- package/dist/Components/Profile/useClickOutside.d.ts +2 -0
- package/dist/Components/Templates/CardItem.d.ts +6 -0
- package/dist/Components/Templates/CardPage.d.ts +7 -2
- package/dist/Components/Templates/CircleLayout.d.ts +5 -0
- package/dist/Components/Templates/DateUserInfo.d.ts +4 -0
- package/dist/Components/Templates/DialogModal.d.ts +12 -0
- package/dist/Components/Templates/ItemCard.d.ts +8 -0
- package/dist/Components/Templates/ItemViewPage.d.ts +14 -0
- package/dist/Components/Templates/ItemsIndexPage.d.ts +19 -0
- package/dist/Components/Templates/MapOverlayPage.d.ts +7 -0
- package/dist/Components/Templates/MapOverlayScreen.d.ts +4 -0
- package/dist/Components/Templates/MoonCalendar.d.ts +1 -0
- package/dist/Components/Templates/OverlayItemsIndexPage.d.ts +6 -0
- package/dist/Components/Templates/TagView.d.ts +6 -0
- package/dist/Components/Templates/TitleCard.d.ts +6 -4
- package/dist/Components/Templates/index.d.ts +6 -0
- package/dist/Components/Typography/ErrorText.d.ts +1 -2
- package/dist/Components/Typography/Subtitle.d.ts +1 -1
- package/dist/Utils/DynamicHeroIcon.d.ts +2 -0
- 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 +4727 -1388
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +71 -11
- package/dist/workspace/utopia-ui/src/Components/AppShell/AppShell.d.ts +8 -0
- package/dist/workspace/utopia-ui/src/Components/AppShell/Content.d.ts +6 -0
- package/dist/workspace/utopia-ui/src/Components/AppShell/NavBar.d.ts +4 -0
- package/dist/workspace/utopia-ui/src/Components/AppShell/SetAssetsApi.d.ts +4 -0
- package/dist/workspace/utopia-ui/src/Components/AppShell/SideBar.d.ts +12 -0
- package/dist/workspace/utopia-ui/src/Components/AppShell/SidebarSubmenu.d.ts +7 -0
- package/dist/workspace/utopia-ui/src/Components/AppShell/hooks/useAssets.d.ts +13 -0
- package/dist/workspace/utopia-ui/src/Components/AppShell/index.d.ts +3 -0
- package/dist/workspace/utopia-ui/src/Components/Auth/LoginPage.d.ts +1 -0
- package/dist/workspace/utopia-ui/src/Components/Auth/RequestPasswordPage.d.ts +3 -0
- package/dist/workspace/utopia-ui/src/Components/Auth/SetNewPasswordPage.d.ts +1 -0
- package/dist/workspace/utopia-ui/src/Components/Auth/SignupPage.d.ts +1 -0
- package/dist/workspace/utopia-ui/src/Components/Auth/index.d.ts +5 -0
- package/dist/{Components/Auth/authDirectus.d.ts → workspace/utopia-ui/src/Components/Auth/useAuth.d.ts} +6 -4
- package/dist/workspace/utopia-ui/src/Components/Gaming/Modal.d.ts +5 -0
- package/dist/workspace/utopia-ui/src/Components/Gaming/Quests.d.ts +1 -0
- package/dist/workspace/utopia-ui/src/Components/Gaming/hooks/useQuests.d.ts +13 -0
- package/dist/workspace/utopia-ui/src/Components/Gaming/index.d.ts +2 -0
- package/dist/workspace/utopia-ui/src/Components/Input/Autocomplete.d.ts +7 -0
- package/dist/workspace/utopia-ui/src/Components/Input/SelectBox.d.ts +16 -0
- package/dist/{Components/Input/TributeTextAreaInput copy.d.ts → workspace/utopia-ui/src/Components/Input/TextAreaInput.d.ts} +0 -1
- package/dist/workspace/utopia-ui/src/Components/Input/TextInput.d.ts +14 -0
- package/dist/workspace/utopia-ui/src/Components/Input/index.d.ts +3 -0
- package/dist/workspace/utopia-ui/src/Components/Map/ItemForm.d.ts +18 -0
- package/dist/workspace/utopia-ui/src/Components/Map/ItemView.d.ts +16 -0
- package/dist/workspace/utopia-ui/src/Components/Map/Layer.d.ts +2 -0
- package/dist/workspace/utopia-ui/src/Components/Map/Permissions.d.ts +6 -0
- package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/AddButton.d.ts +4 -0
- package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/Controls/Control.d.ts +6 -0
- package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/Controls/LayerControl.d.ts +1 -0
- package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/Controls/LocateControl.d.ts +3 -0
- package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/Controls/QuestControl.d.ts +1 -0
- package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/Controls/SearchControl.d.ts +3 -0
- package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/Controls/TagsControl.d.ts +1 -0
- package/dist/{Components/Map → workspace/utopia-ui/src/Components/Map/Subcomponents}/ItemFormPopup.d.ts +2 -3
- package/dist/{Components/Map/Subcomponents → workspace/utopia-ui/src/Components/Map/Subcomponents/ItemPopupComponents}/HeaderView.d.ts +2 -2
- package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/ItemPopupComponents/PopupButton.d.ts +8 -0
- package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/ItemPopupComponents/PopupStartEndInput.d.ts +4 -0
- package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/ItemPopupComponents/PopupTextAreaInput.d.ts +7 -0
- package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/ItemPopupComponents/PopupTextInput.d.ts +7 -0
- package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/ItemPopupComponents/StartEndView.d.ts +4 -0
- package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/ItemPopupComponents/TextView.d.ts +6 -0
- package/dist/{Components/Map → workspace/utopia-ui/src/Components/Map/Subcomponents}/ItemViewPopup.d.ts +3 -2
- package/dist/workspace/utopia-ui/src/Components/Map/Tags.d.ts +5 -0
- package/dist/workspace/utopia-ui/src/Components/Map/UtopiaMap.d.ts +11 -0
- package/dist/workspace/utopia-ui/src/Components/Map/hooks/useDebounce.d.ts +1 -0
- package/dist/workspace/utopia-ui/src/Components/Map/hooks/useFilter.d.ts +32 -0
- package/dist/workspace/utopia-ui/src/Components/Map/hooks/useItems.d.ts +26 -0
- package/dist/workspace/utopia-ui/src/Components/Map/hooks/useLayers.d.ts +14 -0
- package/dist/workspace/utopia-ui/src/Components/Map/hooks/useLeafletRefs.d.ts +22 -0
- package/dist/workspace/utopia-ui/src/Components/Map/hooks/usePermissions.d.ts +20 -0
- package/dist/workspace/utopia-ui/src/Components/Map/hooks/useTags.d.ts +22 -0
- package/dist/workspace/utopia-ui/src/Components/Map/hooks/useTimeout.d.ts +4 -0
- package/dist/workspace/utopia-ui/src/Components/Map/hooks/useWindowDimension.d.ts +4 -0
- package/dist/workspace/utopia-ui/src/Components/Map/index.d.ts +12 -0
- package/dist/workspace/utopia-ui/src/Components/Profile/ColorPicker.d.ts +6 -0
- package/dist/workspace/utopia-ui/src/Components/Profile/Editor.d.ts +4 -0
- package/dist/workspace/utopia-ui/src/Components/Profile/OverlayProfile.d.ts +1 -0
- package/dist/workspace/utopia-ui/src/Components/Profile/OverlayProfileSettings.d.ts +1 -0
- package/dist/workspace/utopia-ui/src/Components/Profile/OverlayUserSettings.d.ts +1 -0
- package/dist/workspace/utopia-ui/src/Components/Profile/ProfileSettings.d.ts +3 -0
- package/dist/workspace/utopia-ui/src/Components/Profile/TagsWidget.d.ts +6 -0
- package/dist/workspace/utopia-ui/src/Components/Profile/UserSettings.d.ts +3 -0
- package/dist/workspace/utopia-ui/src/Components/Profile/index.d.ts +5 -0
- package/dist/workspace/utopia-ui/src/Components/Profile/useClickOutside.d.ts +2 -0
- package/dist/workspace/utopia-ui/src/Components/Templates/CardPage.d.ts +10 -0
- package/dist/workspace/utopia-ui/src/Components/Templates/CircleLayout.d.ts +5 -0
- package/dist/{Components/AppShell → workspace/utopia-ui/src/Components/Templates}/DialogModal.d.ts +2 -1
- package/dist/workspace/utopia-ui/src/Components/Templates/ItemsIndexPage.d.ts +15 -0
- package/dist/workspace/utopia-ui/src/Components/Templates/MapOverlayPage.d.ts +7 -0
- package/dist/workspace/utopia-ui/src/Components/Templates/MoonCalendar.d.ts +1 -0
- package/dist/workspace/utopia-ui/src/Components/Templates/TagView.d.ts +6 -0
- package/dist/workspace/utopia-ui/src/Components/Templates/TitleCard.d.ts +11 -0
- package/dist/workspace/utopia-ui/src/Components/Templates/index.d.ts +6 -0
- package/dist/workspace/utopia-ui/src/Components/Typography/ErrorText.d.ts +5 -0
- package/dist/workspace/utopia-ui/src/Components/Typography/Subtitle.d.ts +6 -0
- package/dist/workspace/utopia-ui/src/Utils/FormatTags.d.ts +2 -0
- package/dist/workspace/utopia-ui/src/Utils/GetValue.d.ts +1 -0
- package/dist/workspace/utopia-ui/src/Utils/MarkerIconFactory.d.ts +3 -0
- package/dist/workspace/utopia-ui/src/Utils/Moon.d.ts +7 -0
- package/dist/workspace/utopia-ui/src/Utils/RandomColor.d.ts +1 -0
- package/dist/workspace/utopia-ui/src/Utils/ReplaceURLs.d.ts +3 -0
- package/dist/workspace/utopia-ui/src/Utils/TimeAgo.d.ts +1 -0
- package/dist/workspace/utopia-ui/src/index.d.ts +13 -0
- package/dist/workspace/utopia-ui/src/types.d.ts +108 -0
- package/package.json +13 -5
- package/LICENSE.md +0 -5
- package/dist/Components/Input/FancyTextAreaInput.d.ts +0 -13
- package/dist/Components/Input/InputText.d.ts +0 -13
- package/dist/Components/Input/TributeTextAreaInput.d.ts +0 -13
- package/dist/Components/Map/Subcomponents/SearchBar.d.ts +0 -2
- package/dist/Components/Map/Subcomponents/StartEndView.d.ts +0 -6
- package/dist/Components/Map/Subcomponents/TagFilterControl.d.ts +0 -2
- package/dist/Components/Map/Subcomponents/TextView.d.ts +0 -5
- package/dist/Components/TitleCard.d.ts +0 -9
- package/dist/Utils/TaggedText.d.ts +0 -3
- /package/dist/{Utils/HeighlightTags.d.ts → workspace/utopia-ui/src/Utils/HashTagRegex.d.ts} +0 -0
package/dist/types.d.ts
CHANGED
@@ -1,41 +1,70 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import { LatLng } from "leaflet";
|
3
2
|
import { ItemFormPopupProps } from "./Components/Map/Subcomponents/ItemFormPopup";
|
4
3
|
export interface UtopiaMapProps {
|
5
4
|
height?: string;
|
6
5
|
width?: string;
|
7
|
-
center?:
|
6
|
+
center?: [number, number];
|
8
7
|
zoom?: number;
|
9
8
|
tags?: Tag[];
|
10
9
|
children?: React.ReactNode;
|
10
|
+
geo?: any;
|
11
|
+
showFilterControl?: boolean;
|
12
|
+
showLayerControl?: boolean;
|
11
13
|
}
|
12
14
|
export interface LayerProps {
|
15
|
+
id?: string;
|
13
16
|
data?: Item[];
|
14
17
|
children?: React.ReactNode;
|
15
18
|
name: string;
|
16
|
-
menuIcon:
|
19
|
+
menuIcon: any;
|
17
20
|
menuColor: string;
|
18
21
|
menuText: string;
|
19
22
|
markerIcon: string;
|
20
23
|
markerShape: string;
|
21
24
|
markerDefaultColor: string;
|
25
|
+
markerDefaultColor2: string;
|
22
26
|
api?: ItemsApi<any>;
|
27
|
+
itemType: ItemType;
|
28
|
+
itemNameField?: string;
|
29
|
+
itemSubnameField?: string;
|
30
|
+
itemTextField?: string;
|
31
|
+
itemAvatarField?: string;
|
32
|
+
itemColorField?: string;
|
33
|
+
itemOwnerField?: string;
|
34
|
+
itemTagsField?: string;
|
35
|
+
itemLatitudeField?: any;
|
36
|
+
itemLongitudeField?: any;
|
37
|
+
itemOffersField?: string;
|
38
|
+
itemNeedsField?: string;
|
39
|
+
onlyOnePerOwner?: boolean;
|
40
|
+
customEditLink?: string;
|
41
|
+
customEditParameter?: string;
|
42
|
+
public_edit_items?: boolean;
|
43
|
+
listed?: boolean;
|
23
44
|
setItemFormPopup?: React.Dispatch<React.SetStateAction<ItemFormPopupProps | null>>;
|
24
45
|
itemFormPopup?: ItemFormPopupProps | null;
|
25
|
-
clusterRef?:
|
46
|
+
clusterRef?: any;
|
47
|
+
}
|
48
|
+
export interface ItemType {
|
49
|
+
name: string;
|
50
|
+
[key: string]: any;
|
26
51
|
}
|
27
52
|
export declare class Item {
|
28
53
|
id: string;
|
29
54
|
name: string;
|
30
55
|
text: string;
|
31
|
-
position
|
56
|
+
position?: Geometry;
|
32
57
|
date_created?: string;
|
33
58
|
date_updated?: string | null;
|
34
59
|
start?: string;
|
35
60
|
end?: string;
|
36
61
|
api?: ItemsApi<any>;
|
37
|
-
tags?:
|
62
|
+
tags?: string[];
|
38
63
|
layer?: LayerProps;
|
64
|
+
relations?: Relation[];
|
65
|
+
parent?: string;
|
66
|
+
subname?: string;
|
67
|
+
public_edit?: boolean;
|
39
68
|
[key: string]: any;
|
40
69
|
constructor(id: string, name: string, text: string, position: Geometry, layer?: LayerProps, api?: ItemsApi<any>);
|
41
70
|
}
|
@@ -47,14 +76,21 @@ export declare class Geometry {
|
|
47
76
|
export interface Tag {
|
48
77
|
color: string;
|
49
78
|
id: string;
|
79
|
+
name: string;
|
80
|
+
offer_or_need?: boolean;
|
50
81
|
}
|
51
82
|
export interface ItemsApi<T> {
|
52
83
|
getItems(): Promise<any>;
|
84
|
+
getItem?(id: string): Promise<any>;
|
53
85
|
createItem?(item: T): Promise<any>;
|
54
86
|
updateItem?(item: T): Promise<any>;
|
55
|
-
deleteItem?(id:
|
87
|
+
deleteItem?(id: string): Promise<any>;
|
56
88
|
collectionName?: string;
|
57
89
|
}
|
90
|
+
export interface AssetsApi {
|
91
|
+
upload(file: Blob, title: string): any;
|
92
|
+
url: string;
|
93
|
+
}
|
58
94
|
export interface UserApi {
|
59
95
|
register(email: string, password: string, userName: string): Promise<void>;
|
60
96
|
login(email: string, password: string): Promise<any>;
|
@@ -62,20 +98,44 @@ export interface UserApi {
|
|
62
98
|
getUser(): Promise<UserItem>;
|
63
99
|
getToken(): Promise<any>;
|
64
100
|
updateUser(user: UserItem): Promise<void>;
|
101
|
+
requestPasswordReset(email: string, reset_url?: string): any;
|
102
|
+
passwordReset(token: string, new_password: string): any;
|
65
103
|
}
|
66
104
|
export declare type UserItem = {
|
67
105
|
id?: string;
|
68
|
-
avatar?: string;
|
69
106
|
role?: string;
|
70
|
-
|
71
|
-
description: string;
|
72
|
-
email: string;
|
107
|
+
email?: string;
|
73
108
|
password?: string;
|
109
|
+
profile?: Profile;
|
110
|
+
[key: string]: any;
|
111
|
+
};
|
112
|
+
export declare type Profile = {
|
113
|
+
id?: string;
|
114
|
+
avatar?: string;
|
115
|
+
color?: string;
|
116
|
+
name: string;
|
117
|
+
text: string;
|
118
|
+
geoposition?: Geometry;
|
119
|
+
};
|
120
|
+
export declare type PermissionCondition = {
|
121
|
+
user_created?: {
|
122
|
+
_eq: string;
|
123
|
+
};
|
124
|
+
public_edit?: {
|
125
|
+
_eq: boolean;
|
126
|
+
};
|
74
127
|
};
|
75
128
|
export declare type Permission = {
|
76
129
|
id?: string;
|
77
130
|
role: string;
|
78
131
|
collection: string;
|
79
132
|
action: PermissionAction;
|
133
|
+
permissions?: {
|
134
|
+
_and: PermissionCondition[];
|
135
|
+
};
|
80
136
|
};
|
81
137
|
export declare type PermissionAction = "create" | "read" | "update" | "delete";
|
138
|
+
export declare type Relation = {
|
139
|
+
related_items_id: string;
|
140
|
+
[key: string]: any;
|
141
|
+
};
|
@@ -0,0 +1,8 @@
|
|
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;
|
8
|
+
}): JSX.Element;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
declare type route = {
|
2
|
+
path: string;
|
3
|
+
icon: JSX.Element;
|
4
|
+
name: string;
|
5
|
+
submenu?: route;
|
6
|
+
blank?: boolean;
|
7
|
+
};
|
8
|
+
export declare function SideBar({ routes, bottomRoutes }: {
|
9
|
+
routes: route[];
|
10
|
+
bottomRoutes?: route[];
|
11
|
+
}): JSX.Element;
|
12
|
+
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 @@
|
|
1
|
+
export declare function LoginPage(): JSX.Element;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function SetNewPasswordPage(): JSX.Element;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function SignupPage(): JSX.Element;
|
@@ -10,15 +10,17 @@ declare type AuthCredentials = {
|
|
10
10
|
otp?: string | undefined;
|
11
11
|
};
|
12
12
|
declare type AuthContextProps = {
|
13
|
-
isAuthenticated:
|
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: () =>
|
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
|
23
|
-
export declare const
|
24
|
+
export declare const AuthProvider: ({ userApi, children }: AuthProviderProps) => JSX.Element;
|
25
|
+
export declare const useAuth: () => AuthContextProps;
|
24
26
|
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function Quests(): 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
|
+
}) => JSX.Element;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
declare type SelectBoxProps = {
|
2
|
+
labelTitle?: string;
|
3
|
+
labelStyle?: string;
|
4
|
+
type?: string;
|
5
|
+
containerStyle?: string;
|
6
|
+
defaultValue: string;
|
7
|
+
placeholder?: string;
|
8
|
+
updateFormValue: (value: string) => void;
|
9
|
+
options: {
|
10
|
+
name: string;
|
11
|
+
value: string;
|
12
|
+
}[];
|
13
|
+
labelDescription?: string;
|
14
|
+
};
|
15
|
+
export declare function SelectBox(props: SelectBoxProps): JSX.Element;
|
16
|
+
export {};
|
@@ -0,0 +1,14 @@
|
|
1
|
+
declare type InputTextProps = {
|
2
|
+
labelTitle?: string;
|
3
|
+
labelStyle?: string;
|
4
|
+
type?: string;
|
5
|
+
dataField?: string;
|
6
|
+
containerStyle?: string;
|
7
|
+
inputStyle?: string;
|
8
|
+
defaultValue?: string;
|
9
|
+
placeholder?: string;
|
10
|
+
autocomplete?: string;
|
11
|
+
updateFormValue?: (value: string) => void;
|
12
|
+
};
|
13
|
+
export declare function TextInput({ labelTitle, labelStyle, type, dataField, containerStyle, inputStyle, defaultValue, placeholder, autocomplete, updateFormValue }: InputTextProps): JSX.Element;
|
14
|
+
export {};
|
@@ -0,0 +1,18 @@
|
|
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, title, setPopupTitle }: {
|
6
|
+
children?: React.ReactNode;
|
7
|
+
item?: Item | undefined;
|
8
|
+
title?: string | undefined;
|
9
|
+
setPopupTitle?: React.Dispatch<React.SetStateAction<string>> | undefined;
|
10
|
+
}): JSX.Element;
|
11
|
+
propTypes: {
|
12
|
+
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
13
|
+
__TYPE: PropTypes.Requireable<string>;
|
14
|
+
};
|
15
|
+
defaultProps: {
|
16
|
+
__TYPE: string;
|
17
|
+
};
|
18
|
+
};
|
@@ -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,2 @@
|
|
1
|
+
import { LayerProps } from '../../types';
|
2
|
+
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 @@
|
|
1
|
+
export declare function LayerControl(): JSX.Element;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function QuestControl(): JSX.Element;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const TagsControl: () => JSX.Element;
|
@@ -1,12 +1,11 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import { LatLng } from 'leaflet';
|
3
|
-
import { LayerProps, Item
|
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>;
|
9
8
|
children?: React.ReactNode;
|
10
|
-
setItemFormPopup
|
9
|
+
setItemFormPopup?: React.Dispatch<React.SetStateAction<ItemFormPopupProps | null>>;
|
11
10
|
}
|
12
11
|
export declare function ItemFormPopup(props: ItemFormPopupProps): JSX.Element;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as React from "react";
|
2
|
-
import { ItemFormPopupProps } from "
|
3
|
-
import { Item } from "
|
2
|
+
import { ItemFormPopupProps } from "../ItemFormPopup";
|
3
|
+
import { Item } from "../../../../types";
|
4
4
|
export declare function HeaderView({ item, setItemFormPopup }: {
|
5
5
|
item: Item;
|
6
6
|
setItemFormPopup?: React.Dispatch<React.SetStateAction<ItemFormPopupProps | null>>;
|
@@ -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
|
+
}) => JSX.Element;
|
@@ -1,8 +1,9 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import { Item } from '
|
2
|
+
import { Item } from '../../../types';
|
3
3
|
import { ItemFormPopupProps } from './ItemFormPopup';
|
4
4
|
export interface ItemViewPopupProps {
|
5
5
|
item: Item;
|
6
|
+
children?: React.ReactNode;
|
6
7
|
setItemFormPopup?: React.Dispatch<React.SetStateAction<ItemFormPopupProps | null>>;
|
7
8
|
}
|
8
|
-
export declare const ItemViewPopup:
|
9
|
+
export declare const ItemViewPopup: React.ForwardRefExoticComponent<ItemViewPopupProps & React.RefAttributes<unknown>>;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import "leaflet/dist/leaflet.css";
|
2
|
+
import * as React from "react";
|
3
|
+
import { LayerProps, UtopiaMapProps } from "../../types";
|
4
|
+
import "./UtopiaMap.css";
|
5
|
+
export interface MapEventListenerProps {
|
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;
|
11
|
+
export { UtopiaMap };
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const useDebounce: (callback: any, delay: any, deps: any) => void;
|
@@ -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: (name: 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 {};
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import * as React from "react";
|
2
|
+
import { Item, LayerProps } from "../../../types";
|
3
|
+
declare type UseItemManagerResult = ReturnType<typeof useItemsManager>;
|
4
|
+
declare function useItemsManager(initialItems: Item[]): {
|
5
|
+
items: Item[];
|
6
|
+
addItem: (item: Item) => void;
|
7
|
+
updateItem: (item: Item) => void;
|
8
|
+
removeItem: (item: Item) => void;
|
9
|
+
resetItems: (layer: LayerProps) => void;
|
10
|
+
setItemsApi: (layer: LayerProps) => void;
|
11
|
+
setItemsData: (layer: LayerProps) => void;
|
12
|
+
allItemsLoaded: boolean;
|
13
|
+
};
|
14
|
+
export declare const ItemsProvider: React.FunctionComponent<{
|
15
|
+
initialItems: Item[];
|
16
|
+
children?: React.ReactNode;
|
17
|
+
}>;
|
18
|
+
export declare const useItems: () => Item[];
|
19
|
+
export declare const useAddItem: () => UseItemManagerResult["addItem"];
|
20
|
+
export declare const useUpdateItem: () => UseItemManagerResult["updateItem"];
|
21
|
+
export declare const useRemoveItem: () => UseItemManagerResult["removeItem"];
|
22
|
+
export declare const useResetItems: () => UseItemManagerResult["resetItems"];
|
23
|
+
export declare const useSetItemsApi: () => UseItemManagerResult["setItemsApi"];
|
24
|
+
export declare const useSetItemsData: () => UseItemManagerResult["setItemsData"];
|
25
|
+
export declare const useAllItemsLoaded: () => UseItemManagerResult["allItemsLoaded"];
|
26
|
+
export {};
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import * as React from "react";
|
2
|
+
import { LayerProps } from "../../../types";
|
3
|
+
declare type UseItemManagerResult = ReturnType<typeof useLayerManager>;
|
4
|
+
declare function useLayerManager(initialLayers: LayerProps[]): {
|
5
|
+
layers: LayerProps[];
|
6
|
+
addLayer: (layer: LayerProps) => void;
|
7
|
+
};
|
8
|
+
export declare const LayersProvider: React.FunctionComponent<{
|
9
|
+
initialLayers: LayerProps[];
|
10
|
+
children?: React.ReactNode;
|
11
|
+
}>;
|
12
|
+
export declare const useLayers: () => LayerProps[];
|
13
|
+
export declare const useAddLayer: () => UseItemManagerResult["addLayer"];
|
14
|
+
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 {};
|