utopia-ui 3.0.0-alpha.8 → 3.0.0-alpha.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -5
- package/dist/Components/AppShell/AppShell.d.ts +7 -5
- package/dist/Components/AppShell/NavBar.d.ts +2 -2
- package/dist/Components/AppShell/SetAssetsApi.d.ts +5 -0
- package/dist/Components/AppShell/SideBar.d.ts +3 -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/RequestPasswordPage.d.ts +4 -0
- package/dist/Components/Auth/ResetPasswordPage.d.ts +2 -0
- package/dist/Components/Auth/SetNewPasswordPage.d.ts +2 -0
- 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/hooks/useQuests.d.ts +13 -0
- package/dist/Components/Input/Autocomplete.d.ts +8 -0
- package/dist/Components/Input/SelectBox.d.ts +17 -0
- package/dist/Components/Input/TextInput.d.ts +2 -1
- package/dist/Components/Input/index.d.ts +1 -0
- package/dist/Components/Map/ItemForm.d.ts +3 -1
- package/dist/Components/Map/Layer.d.ts +1 -1
- package/dist/Components/Map/Permissions.d.ts +7 -0
- package/dist/Components/Map/Subcomponents/AddButton.d.ts +2 -2
- package/dist/Components/Map/Subcomponents/Control.d.ts +5 -0
- package/dist/Components/Map/Subcomponents/Controls/Control.d.ts +6 -0
- package/dist/Components/Map/Subcomponents/Controls/FilterControl.d.ts +2 -0
- package/dist/Components/Map/Subcomponents/Controls/LayerControl.d.ts +2 -0
- package/dist/Components/Map/Subcomponents/Controls/LocateControl.d.ts +4 -0
- package/dist/Components/Map/Subcomponents/Controls/QuestControl.d.ts +2 -0
- package/dist/Components/Map/Subcomponents/Controls/SearchControl.d.ts +4 -0
- package/dist/Components/Map/Subcomponents/Controls/TagsControl.d.ts +2 -0
- package/dist/Components/Map/Subcomponents/ItemFormPopup.d.ts +1 -1
- package/dist/Components/Map/Subcomponents/ItemPopupComponents/PopupButton.d.ts +9 -0
- package/dist/Components/Map/Subcomponents/ItemPopupComponents/PopupTextInput.d.ts +7 -1
- package/dist/Components/Map/Subcomponents/ItemPopupComponents/TextView.d.ts +3 -1
- package/dist/Components/Map/Subcomponents/ItemViewPopup.d.ts +1 -1
- package/dist/Components/Map/Subcomponents/LayerControl.d.ts +2 -0
- package/dist/Components/Map/Subcomponents/QuestControl.d.ts +2 -0
- package/dist/Components/Map/UtopiaMap.d.ts +2 -2
- package/dist/Components/Map/hooks/useDebounce.d.ts +1 -0
- package/dist/Components/Map/hooks/useFilter.d.ts +12 -2
- package/dist/Components/Map/hooks/useItems.d.ts +2 -0
- package/dist/Components/Map/hooks/useLeafletRefs.d.ts +22 -0
- package/dist/Components/Map/hooks/usePermissions.d.ts +20 -0
- package/dist/Components/Map/hooks/useTags.d.ts +5 -3
- package/dist/Components/Map/hooks/useTimeout.d.ts +4 -0
- package/dist/Components/Map/hooks/useWindowDimension.d.ts +4 -0
- package/dist/Components/Map/index.d.ts +3 -0
- package/dist/Components/Profile/ColorPicker.d.ts +7 -0
- package/dist/Components/Profile/Editor.d.ts +5 -0
- package/dist/Components/Profile/OverlayProfile.d.ts +2 -0
- package/dist/Components/Profile/OverlayProfileSettings.d.ts +2 -0
- package/dist/Components/Profile/OverlayUserSettings.d.ts +2 -0
- package/dist/Components/Profile/ProfileSettings.d.ts +4 -0
- package/dist/Components/Profile/Settings.d.ts +2 -3
- package/dist/Components/Profile/Tags.d.ts +2 -0
- package/dist/Components/Profile/TagsWidget.d.ts +7 -0
- package/dist/Components/Profile/UserSettings.d.ts +4 -0
- package/dist/Components/Profile/index.d.ts +5 -1
- package/dist/Components/Profile/useClickOutside.d.ts +2 -0
- package/dist/Components/Templates/CardPage.d.ts +6 -1
- package/dist/Components/Templates/CircleLayout.d.ts +6 -0
- package/dist/Components/{AppShell → Templates}/DialogModal.d.ts +2 -1
- package/dist/Components/Templates/MapOverlayPage.d.ts +6 -0
- package/dist/Components/Templates/MapOverlayScreen.d.ts +4 -0
- package/dist/Components/Templates/MoonCalendar.d.ts +2 -0
- package/dist/Components/Templates/TagView.d.ts +7 -0
- package/dist/Components/Templates/TitleCard.d.ts +6 -4
- package/dist/Components/Templates/index.d.ts +3 -0
- 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 +3 -0
- package/dist/Utils/TimeAgo.d.ts +1 -0
- package/dist/index.d.ts +5 -5
- package/dist/index.js +3744 -942
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +47 -9
- package/package.json +13 -4
- package/dist/Components/Auth/authDirectus.d.ts +0 -24
- package/dist/Components/Input/FancyTextAreaInput.d.ts +0 -13
- package/dist/Components/Input/InputText.d.ts +0 -13
- package/dist/Components/Input/TributeTextAreaInput copy.d.ts +0 -13
- package/dist/Components/Input/TributeTextAreaInput.d.ts +0 -13
- package/dist/Components/Map/ItemFormPopup.d.ts +0 -12
- package/dist/Components/Map/ItemViewPopup.d.ts +0 -8
- package/dist/Components/Map/Subcomponents/HeaderView.d.ts +0 -7
- 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/HeighlightTags.d.ts +0 -1
- package/dist/Utils/TaggedText.d.ts +0 -3
package/dist/types.d.ts
CHANGED
@@ -1,10 +1,9 @@
|
|
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;
|
@@ -13,15 +12,28 @@ export interface LayerProps {
|
|
13
12
|
data?: Item[];
|
14
13
|
children?: React.ReactNode;
|
15
14
|
name: string;
|
16
|
-
menuIcon:
|
15
|
+
menuIcon: any;
|
17
16
|
menuColor: string;
|
18
17
|
menuText: string;
|
19
18
|
markerIcon: string;
|
20
19
|
markerShape: string;
|
21
20
|
markerDefaultColor: string;
|
22
21
|
api?: ItemsApi<any>;
|
22
|
+
itemNameField?: string;
|
23
|
+
itemTextField?: string;
|
24
|
+
itemAvatarField?: string;
|
25
|
+
itemColorField?: string;
|
26
|
+
itemOwnerField?: string;
|
27
|
+
itemTagsField?: string;
|
28
|
+
itemLatitudeField?: any;
|
29
|
+
itemLongitudeField?: any;
|
30
|
+
itemOffersField?: string;
|
31
|
+
itemNeedsField?: string;
|
32
|
+
onlyOnePerOwner?: boolean;
|
33
|
+
customEditLink?: string;
|
23
34
|
setItemFormPopup?: React.Dispatch<React.SetStateAction<ItemFormPopupProps | null>>;
|
24
35
|
itemFormPopup?: ItemFormPopupProps | null;
|
36
|
+
clusterRef?: React.MutableRefObject<any>;
|
25
37
|
}
|
26
38
|
export declare class Item {
|
27
39
|
id: string;
|
@@ -33,7 +45,8 @@ export declare class Item {
|
|
33
45
|
start?: string;
|
34
46
|
end?: string;
|
35
47
|
api?: ItemsApi<any>;
|
36
|
-
tags?:
|
48
|
+
tags?: string[];
|
49
|
+
layer?: LayerProps;
|
37
50
|
[key: string]: any;
|
38
51
|
constructor(id: string, name: string, text: string, position: Geometry, layer?: LayerProps, api?: ItemsApi<any>);
|
39
52
|
}
|
@@ -45,12 +58,19 @@ export declare class Geometry {
|
|
45
58
|
export interface Tag {
|
46
59
|
color: string;
|
47
60
|
id: string;
|
61
|
+
name: string;
|
62
|
+
offer_or_need?: boolean;
|
48
63
|
}
|
49
64
|
export interface ItemsApi<T> {
|
50
65
|
getItems(): Promise<any>;
|
51
66
|
createItem?(item: T): Promise<any>;
|
52
67
|
updateItem?(item: T): Promise<any>;
|
53
|
-
deleteItem?(id:
|
68
|
+
deleteItem?(id: string): Promise<any>;
|
69
|
+
collectionName?: string;
|
70
|
+
}
|
71
|
+
export interface AssetsApi {
|
72
|
+
upload(file: Blob, title: string): any;
|
73
|
+
url: string;
|
54
74
|
}
|
55
75
|
export interface UserApi {
|
56
76
|
register(email: string, password: string, userName: string): Promise<void>;
|
@@ -59,12 +79,30 @@ export interface UserApi {
|
|
59
79
|
getUser(): Promise<UserItem>;
|
60
80
|
getToken(): Promise<any>;
|
61
81
|
updateUser(user: UserItem): Promise<void>;
|
82
|
+
requestPasswordReset(email: string, reset_url?: string): any;
|
83
|
+
passwordReset(token: string, new_password: string): any;
|
62
84
|
}
|
63
85
|
export declare type UserItem = {
|
64
86
|
id?: string;
|
65
|
-
|
66
|
-
|
67
|
-
description: string;
|
68
|
-
email: string;
|
87
|
+
role?: string;
|
88
|
+
email?: string;
|
69
89
|
password?: string;
|
90
|
+
profile?: Profile;
|
91
|
+
[key: string]: any;
|
92
|
+
};
|
93
|
+
export declare type Profile = {
|
94
|
+
id?: string;
|
95
|
+
avatar?: string;
|
96
|
+
color?: string;
|
97
|
+
name: string;
|
98
|
+
text: string;
|
99
|
+
geoposition?: Geometry;
|
100
|
+
};
|
101
|
+
export declare type Permission = {
|
102
|
+
id?: string;
|
103
|
+
role: string;
|
104
|
+
S: any;
|
105
|
+
collection: string;
|
106
|
+
action: PermissionAction;
|
70
107
|
};
|
108
|
+
export declare type PermissionAction = "create" | "read" | "update" | "delete";
|
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.80",
|
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/",
|
@@ -24,7 +24,7 @@
|
|
24
24
|
"@typescript-eslint/eslint-plugin": "^5.38.1",
|
25
25
|
"@typescript-eslint/parser": "^5.38.1",
|
26
26
|
"autoprefixer": "^10.4.14",
|
27
|
-
"daisyui": "^
|
27
|
+
"daisyui": "^4.6.1",
|
28
28
|
"eslint": "^8.24.0",
|
29
29
|
"eslint-plugin-react": "^7.31.8",
|
30
30
|
"eslint-plugin-react-hooks": "^4.6.0",
|
@@ -43,14 +43,23 @@
|
|
43
43
|
},
|
44
44
|
"dependencies": {
|
45
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",
|
46
50
|
"leaflet": "^1.9.4",
|
51
|
+
"leaflet.locatecontrol": "^0.79.0",
|
47
52
|
"prop-types": "^15.8.1",
|
53
|
+
"react-colorful": "^5.6.1",
|
54
|
+
"react-image-crop": "^10.1.8",
|
48
55
|
"react-leaflet": "^4.2.1",
|
49
56
|
"react-leaflet-cluster": "^2.1.0",
|
50
|
-
"react-
|
57
|
+
"react-markdown": "^9.0.1",
|
58
|
+
"react-router-dom": "^6.16.0",
|
51
59
|
"react-string-replace": "^1.1.1",
|
52
60
|
"react-toastify": "^9.1.3",
|
61
|
+
"remark-breaks": "^4.0.0",
|
53
62
|
"tributejs": "^5.1.3",
|
54
|
-
"tw-elements": "^1.0.0
|
63
|
+
"tw-elements": "^1.0.0"
|
55
64
|
}
|
56
65
|
}
|
@@ -1,24 +0,0 @@
|
|
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: () => void;
|
19
|
-
updateUser: (user: UserItem) => any;
|
20
|
-
token: String | null;
|
21
|
-
};
|
22
|
-
export declare const AuthProviderDirectus: ({ userApi, children }: AuthProviderProps) => JSX.Element;
|
23
|
-
export declare const useAuthDirectus: () => AuthContextProps;
|
24
|
-
export {};
|
@@ -1,13 +0,0 @@
|
|
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 {};
|
@@ -1,13 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
declare type InputTextProps = {
|
3
|
-
labelTitle?: string;
|
4
|
-
labelStyle?: string;
|
5
|
-
type?: string;
|
6
|
-
dataField?: string;
|
7
|
-
containerStyle?: string;
|
8
|
-
defaultValue: string;
|
9
|
-
placeholder?: string;
|
10
|
-
updateFormValue?: (value: string) => void;
|
11
|
-
};
|
12
|
-
declare function TextInput({ labelTitle, labelStyle, type, dataField, containerStyle, defaultValue, placeholder, updateFormValue }: InputTextProps): JSX.Element;
|
13
|
-
export default TextInput;
|
@@ -1,13 +0,0 @@
|
|
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 {};
|
@@ -1,13 +0,0 @@
|
|
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 {};
|
@@ -1,12 +0,0 @@
|
|
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;
|
@@ -1,8 +0,0 @@
|
|
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;
|
@@ -1,7 +0,0 @@
|
|
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,9 +0,0 @@
|
|
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 {};
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare const hashTagRegex: RegExp;
|