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/dist/types.d.ts
CHANGED
@@ -1,41 +1,71 @@
|
|
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;
|
44
|
+
item_presets?: Record<string, unknown>;
|
23
45
|
setItemFormPopup?: React.Dispatch<React.SetStateAction<ItemFormPopupProps | null>>;
|
24
46
|
itemFormPopup?: ItemFormPopupProps | null;
|
25
|
-
clusterRef?:
|
47
|
+
clusterRef?: any;
|
48
|
+
}
|
49
|
+
export interface ItemType {
|
50
|
+
name: string;
|
51
|
+
[key: string]: any;
|
26
52
|
}
|
27
53
|
export declare class Item {
|
28
54
|
id: string;
|
29
55
|
name: string;
|
30
56
|
text: string;
|
31
|
-
position
|
57
|
+
position?: Geometry;
|
32
58
|
date_created?: string;
|
33
59
|
date_updated?: string | null;
|
34
60
|
start?: string;
|
35
61
|
end?: string;
|
36
62
|
api?: ItemsApi<any>;
|
37
|
-
tags?:
|
63
|
+
tags?: string[];
|
38
64
|
layer?: LayerProps;
|
65
|
+
relations?: Relation[];
|
66
|
+
parent?: string;
|
67
|
+
subname?: string;
|
68
|
+
public_edit?: boolean;
|
39
69
|
[key: string]: any;
|
40
70
|
constructor(id: string, name: string, text: string, position: Geometry, layer?: LayerProps, api?: ItemsApi<any>);
|
41
71
|
}
|
@@ -47,14 +77,21 @@ export declare class Geometry {
|
|
47
77
|
export interface Tag {
|
48
78
|
color: string;
|
49
79
|
id: string;
|
80
|
+
name: string;
|
81
|
+
offer_or_need?: boolean;
|
50
82
|
}
|
51
83
|
export interface ItemsApi<T> {
|
52
84
|
getItems(): Promise<any>;
|
85
|
+
getItem?(id: string): Promise<any>;
|
53
86
|
createItem?(item: T): Promise<any>;
|
54
87
|
updateItem?(item: T): Promise<any>;
|
55
|
-
deleteItem?(id:
|
88
|
+
deleteItem?(id: string): Promise<any>;
|
56
89
|
collectionName?: string;
|
57
90
|
}
|
91
|
+
export interface AssetsApi {
|
92
|
+
upload(file: Blob, title: string): any;
|
93
|
+
url: string;
|
94
|
+
}
|
58
95
|
export interface UserApi {
|
59
96
|
register(email: string, password: string, userName: string): Promise<void>;
|
60
97
|
login(email: string, password: string): Promise<any>;
|
@@ -62,20 +99,44 @@ export interface UserApi {
|
|
62
99
|
getUser(): Promise<UserItem>;
|
63
100
|
getToken(): Promise<any>;
|
64
101
|
updateUser(user: UserItem): Promise<void>;
|
102
|
+
requestPasswordReset(email: string, reset_url?: string): any;
|
103
|
+
passwordReset(token: string, new_password: string): any;
|
65
104
|
}
|
66
105
|
export declare type UserItem = {
|
67
106
|
id?: string;
|
68
|
-
avatar?: string;
|
69
107
|
role?: string;
|
70
|
-
|
71
|
-
description: string;
|
72
|
-
email: string;
|
108
|
+
email?: string;
|
73
109
|
password?: string;
|
110
|
+
profile?: Profile;
|
111
|
+
[key: string]: any;
|
112
|
+
};
|
113
|
+
export declare type Profile = {
|
114
|
+
id?: string;
|
115
|
+
avatar?: string;
|
116
|
+
color?: string;
|
117
|
+
name: string;
|
118
|
+
text: string;
|
119
|
+
geoposition?: Geometry;
|
120
|
+
};
|
121
|
+
export declare type PermissionCondition = {
|
122
|
+
user_created?: {
|
123
|
+
_eq: string;
|
124
|
+
};
|
125
|
+
public_edit?: {
|
126
|
+
_eq: boolean;
|
127
|
+
};
|
74
128
|
};
|
75
129
|
export declare type Permission = {
|
76
130
|
id?: string;
|
77
131
|
role: string;
|
78
132
|
collection: string;
|
79
133
|
action: PermissionAction;
|
134
|
+
permissions?: {
|
135
|
+
_and: PermissionCondition[];
|
136
|
+
};
|
80
137
|
};
|
81
138
|
export declare type PermissionAction = "create" | "read" | "update" | "delete";
|
139
|
+
export declare type Relation = {
|
140
|
+
related_items_id: string;
|
141
|
+
[key: string]: any;
|
142
|
+
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "utopia-ui",
|
3
|
-
"version": "3.0.0-alpha.
|
3
|
+
"version": "3.0.0-alpha.231",
|
4
4
|
"description": "Reuseable React Components to build mapping apps for real life communities and networks",
|
5
5
|
"repository": "https://github.com/utopia-os/utopia-ui",
|
6
6
|
"homepage:": "https://utopia-os.org/",
|
@@ -18,14 +18,13 @@
|
|
18
18
|
"license": "MIT",
|
19
19
|
"devDependencies": {
|
20
20
|
"@types/leaflet": "^1.7.11",
|
21
|
-
"@types/react": "^18.0
|
21
|
+
"@types/react": "^18.2.0",
|
22
22
|
"@types/react-dom": "^18.0.5",
|
23
|
-
"@types/react-helmet": "^6.1.6",
|
24
23
|
"@types/react-leaflet": "^2.8.2",
|
25
24
|
"@typescript-eslint/eslint-plugin": "^5.38.1",
|
26
25
|
"@typescript-eslint/parser": "^5.38.1",
|
27
26
|
"autoprefixer": "^10.4.14",
|
28
|
-
"daisyui": "^
|
27
|
+
"daisyui": "^4.6.1",
|
29
28
|
"eslint": "^8.24.0",
|
30
29
|
"eslint-plugin-react": "^7.31.8",
|
31
30
|
"eslint-plugin-react-hooks": "^4.6.0",
|
@@ -44,13 +43,22 @@
|
|
44
43
|
},
|
45
44
|
"dependencies": {
|
46
45
|
"@heroicons/react": "^2.0.17",
|
46
|
+
"@tanstack/react-query": "^5.17.8",
|
47
|
+
"@types/offscreencanvas": "^2019.7.1",
|
48
|
+
"axios": "^1.6.5",
|
49
|
+
"date-fns": "^3.3.1",
|
47
50
|
"leaflet": "^1.9.4",
|
51
|
+
"leaflet.locatecontrol": "^0.79.0",
|
48
52
|
"prop-types": "^15.8.1",
|
53
|
+
"react-colorful": "^5.6.1",
|
54
|
+
"react-image-crop": "^10.1.8",
|
49
55
|
"react-leaflet": "^4.2.1",
|
50
56
|
"react-leaflet-cluster": "^2.1.0",
|
57
|
+
"react-markdown": "^9.0.1",
|
51
58
|
"react-router-dom": "^6.16.0",
|
52
59
|
"react-string-replace": "^1.1.1",
|
53
60
|
"react-toastify": "^9.1.3",
|
61
|
+
"remark-breaks": "^4.0.0",
|
54
62
|
"tributejs": "^5.1.3",
|
55
63
|
"tw-elements": "^1.0.0"
|
56
64
|
}
|
package/LICENSE.md
DELETED
@@ -1,5 +0,0 @@
|
|
1
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
2
|
-
|
3
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
4
|
-
|
5
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|