utopia-ui 3.0.0-alpha.2 → 3.0.0-alpha.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Components/AppShell/AppShell.d.ts +2 -3
- package/dist/Components/AppShell/DialogModal.d.ts +9 -0
- package/dist/Components/AppShell/NavBar.d.ts +2 -3
- package/dist/Components/Auth/LoginPage.d.ts +2 -0
- package/dist/Components/Auth/SignupPage.d.ts +2 -0
- package/dist/Components/Auth/authDirectus.d.ts +7 -13
- package/dist/Components/Auth/index.d.ts +3 -1
- package/dist/Components/Auth/useAuth.d.ts +24 -0
- package/dist/Components/Input/FancyTextAreaInput.d.ts +13 -0
- package/dist/Components/Input/InputText.d.ts +4 -3
- package/dist/Components/Input/TextAreaInput.d.ts +6 -4
- package/dist/Components/Input/TextInput.d.ts +14 -0
- package/dist/Components/Input/TributeTextAreaInput copy.d.ts +13 -0
- package/dist/Components/Input/TributeTextAreaInput.d.ts +13 -0
- package/dist/Components/Input/index.d.ts +2 -0
- package/dist/Components/Map/ItemForm.d.ts +16 -0
- package/dist/Components/Map/ItemFormPopup.d.ts +12 -0
- package/dist/Components/Map/ItemView.d.ts +16 -0
- package/dist/Components/Map/ItemViewPopup.d.ts +8 -0
- package/dist/Components/Map/Permissions.d.ts +7 -0
- package/dist/Components/Map/Subcomponents/AddButton.d.ts +2 -2
- package/dist/Components/Map/Subcomponents/FilterControl.d.ts +2 -0
- package/dist/Components/Map/Subcomponents/HeaderView.d.ts +7 -0
- package/dist/Components/Map/Subcomponents/ItemFormPopup.d.ts +3 -3
- package/dist/Components/Map/Subcomponents/ItemPopupComponents/HeaderView.d.ts +7 -0
- package/dist/Components/Map/Subcomponents/ItemPopupComponents/PopupStartEndInput.d.ts +5 -0
- package/dist/Components/Map/Subcomponents/ItemPopupComponents/PopupTextAreaInput.d.ts +8 -0
- package/dist/Components/Map/Subcomponents/ItemPopupComponents/PopupTextInput.d.ts +2 -0
- package/dist/Components/Map/Subcomponents/ItemPopupComponents/StartEndView.d.ts +5 -0
- package/dist/Components/Map/Subcomponents/ItemPopupComponents/TextView.d.ts +5 -0
- package/dist/Components/Map/Subcomponents/ItemViewPopup.d.ts +3 -4
- package/dist/Components/Map/Subcomponents/LayerControl.d.ts +2 -0
- package/dist/Components/Map/Subcomponents/LocateControl.d.ts +1 -0
- package/dist/Components/Map/Subcomponents/SearchBar.d.ts +2 -0
- package/dist/Components/Map/Subcomponents/StartEndView.d.ts +6 -0
- package/dist/Components/Map/Subcomponents/TagFilterControl.d.ts +2 -0
- package/dist/Components/Map/Subcomponents/TextView.d.ts +5 -0
- package/dist/Components/Map/Tags.d.ts +4 -3
- package/dist/Components/Map/UtopiaMap.d.ts +4 -5
- package/dist/Components/Map/hooks/useFilter.d.ts +32 -0
- package/dist/Components/Map/hooks/useItems.d.ts +4 -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 +7 -1
- package/dist/Components/Map/hooks/useWindowDimension.d.ts +4 -0
- package/dist/Components/Map/index.d.ts +8 -1
- package/dist/Components/Profile/Settings.d.ts +1 -3
- package/dist/Components/Templates/CardPage.d.ts +5 -0
- package/dist/Components/Templates/TitleCard.d.ts +9 -0
- package/dist/Components/Templates/index.d.ts +2 -0
- package/dist/Components/TitleCard.d.ts +2 -2
- package/dist/Components/Typography/ErrorText.d.ts +6 -0
- package/dist/Components/Typography/Subtitle.d.ts +3 -3
- package/dist/Utils/DynamicHeroIcon.d.ts +2 -0
- package/dist/Utils/HashTagRegex.d.ts +1 -0
- package/dist/Utils/HeighlightTags.d.ts +1 -2
- package/dist/Utils/RandomColor.d.ts +1 -0
- package/dist/Utils/ReplaceURLs.d.ts +3 -1
- package/dist/Utils/TaggedText.d.ts +3 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +1458 -443
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +33 -7
- package/package.json +7 -3
package/dist/types.d.ts
CHANGED
@@ -19,24 +19,25 @@ export interface LayerProps {
|
|
19
19
|
markerIcon: string;
|
20
20
|
markerShape: string;
|
21
21
|
markerDefaultColor: string;
|
22
|
-
tags?: Tag[];
|
23
22
|
api?: ItemsApi<any>;
|
24
23
|
setItemFormPopup?: React.Dispatch<React.SetStateAction<ItemFormPopupProps | null>>;
|
25
24
|
itemFormPopup?: ItemFormPopupProps | null;
|
25
|
+
clusterRef?: React.MutableRefObject<any>;
|
26
26
|
}
|
27
27
|
export declare class Item {
|
28
|
-
id: string
|
29
|
-
date_created?: string;
|
30
|
-
date_updated?: string | null;
|
28
|
+
id: string;
|
31
29
|
name: string;
|
32
30
|
text: string;
|
33
31
|
position: Geometry;
|
34
|
-
|
32
|
+
date_created?: string;
|
33
|
+
date_updated?: string | null;
|
35
34
|
start?: string;
|
36
35
|
end?: string;
|
37
|
-
tags?: number[];
|
38
36
|
api?: ItemsApi<any>;
|
39
|
-
|
37
|
+
tags?: Tag[];
|
38
|
+
layer?: LayerProps;
|
39
|
+
[key: string]: any;
|
40
|
+
constructor(id: string, name: string, text: string, position: Geometry, layer?: LayerProps, api?: ItemsApi<any>);
|
40
41
|
}
|
41
42
|
export declare class Geometry {
|
42
43
|
type: string;
|
@@ -52,4 +53,29 @@ export interface ItemsApi<T> {
|
|
52
53
|
createItem?(item: T): Promise<any>;
|
53
54
|
updateItem?(item: T): Promise<any>;
|
54
55
|
deleteItem?(id: number | string): Promise<any>;
|
56
|
+
collectionName?: string;
|
57
|
+
}
|
58
|
+
export interface UserApi {
|
59
|
+
register(email: string, password: string, userName: string): Promise<void>;
|
60
|
+
login(email: string, password: string): Promise<any>;
|
61
|
+
logout(): Promise<void>;
|
62
|
+
getUser(): Promise<UserItem>;
|
63
|
+
getToken(): Promise<any>;
|
64
|
+
updateUser(user: UserItem): Promise<void>;
|
55
65
|
}
|
66
|
+
export declare type UserItem = {
|
67
|
+
id?: string;
|
68
|
+
avatar?: string;
|
69
|
+
role?: string;
|
70
|
+
first_name: string;
|
71
|
+
description: string;
|
72
|
+
email: string;
|
73
|
+
password?: string;
|
74
|
+
};
|
75
|
+
export declare type Permission = {
|
76
|
+
id?: string;
|
77
|
+
role: string;
|
78
|
+
collection: string;
|
79
|
+
action: PermissionAction;
|
80
|
+
};
|
81
|
+
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.20",
|
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/",
|
@@ -20,6 +20,7 @@
|
|
20
20
|
"@types/leaflet": "^1.7.11",
|
21
21
|
"@types/react": "^18.0.14",
|
22
22
|
"@types/react-dom": "^18.0.5",
|
23
|
+
"@types/react-helmet": "^6.1.6",
|
23
24
|
"@types/react-leaflet": "^2.8.2",
|
24
25
|
"@typescript-eslint/eslint-plugin": "^5.38.1",
|
25
26
|
"@typescript-eslint/parser": "^5.38.1",
|
@@ -43,11 +44,14 @@
|
|
43
44
|
},
|
44
45
|
"dependencies": {
|
45
46
|
"@heroicons/react": "^2.0.17",
|
46
|
-
"leaflet": "^1.9.
|
47
|
+
"leaflet": "^1.9.4",
|
48
|
+
"prop-types": "^15.8.1",
|
47
49
|
"react-leaflet": "^4.2.1",
|
48
50
|
"react-leaflet-cluster": "^2.1.0",
|
49
|
-
"react-router-dom": "^6.
|
51
|
+
"react-router-dom": "^6.16.0",
|
52
|
+
"react-string-replace": "^1.1.1",
|
50
53
|
"react-toastify": "^9.1.3",
|
54
|
+
"tributejs": "^5.1.3",
|
51
55
|
"tw-elements": "^1.0.0-beta2"
|
52
56
|
}
|
53
57
|
}
|