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.
Files changed (213) hide show
  1. package/LICENSE +674 -0
  2. package/README.md +29 -6
  3. package/dist/Components/AppShell/AppShell.d.ts +7 -5
  4. package/dist/Components/AppShell/Content.d.ts +1 -1
  5. package/dist/Components/AppShell/NavBar.d.ts +1 -2
  6. package/dist/Components/AppShell/SetAssetsApi.d.ts +4 -0
  7. package/dist/Components/AppShell/SideBar.d.ts +4 -2
  8. package/dist/Components/AppShell/SidebarSubmenu.d.ts +1 -1
  9. package/dist/Components/AppShell/hooks/useAssets.d.ts +13 -0
  10. package/dist/Components/Auth/LoginPage copy.d.ts +2 -0
  11. package/dist/Components/Auth/LoginPage.d.ts +1 -2
  12. package/dist/Components/Auth/RequestPasswordPage.d.ts +3 -0
  13. package/dist/Components/Auth/ResetPasswordPage.d.ts +2 -0
  14. package/dist/Components/Auth/SetNewPasswordPage.d.ts +1 -0
  15. package/dist/Components/Auth/SignupPage.d.ts +1 -2
  16. package/dist/Components/Auth/Signuppage.d.ts +2 -0
  17. package/dist/Components/Auth/index.d.ts +3 -1
  18. package/dist/Components/Auth/useAuth.d.ts +4 -2
  19. package/dist/Components/Gaming/Modal.d.ts +5 -9
  20. package/dist/Components/Gaming/Quests.d.ts +1 -2
  21. package/dist/Components/Gaming/hooks/useQuests.d.ts +13 -0
  22. package/dist/Components/Input/Autocomplete.d.ts +7 -0
  23. package/dist/Components/Input/ComboBoxInput.d.ts +11 -0
  24. package/dist/Components/Input/SelectBox.d.ts +16 -0
  25. package/dist/Components/Input/TextAreaInput.d.ts +1 -2
  26. package/dist/Components/Input/TextInput.d.ts +2 -2
  27. package/dist/Components/Input/index.d.ts +1 -0
  28. package/dist/Components/Map/ItemForm.d.ts +4 -2
  29. package/dist/Components/Map/ItemView.d.ts +1 -1
  30. package/dist/Components/Map/Layer.d.ts +1 -2
  31. package/dist/Components/Map/Permissions.d.ts +1 -2
  32. package/dist/Components/Map/Subcomponents/AddButton.d.ts +3 -3
  33. package/dist/Components/Map/Subcomponents/Control.d.ts +5 -0
  34. package/dist/Components/Map/Subcomponents/Controls/Control.d.ts +7 -0
  35. package/dist/Components/Map/Subcomponents/Controls/FilterControl.d.ts +1 -0
  36. package/dist/Components/Map/Subcomponents/Controls/LayerControl.d.ts +1 -0
  37. package/dist/Components/Map/Subcomponents/Controls/LocateControl.d.ts +3 -0
  38. package/dist/Components/Map/Subcomponents/Controls/QuestControl.d.ts +1 -0
  39. package/dist/Components/Map/Subcomponents/Controls/SearchControl.d.ts +1 -0
  40. package/dist/Components/Map/Subcomponents/Controls/SidebarControl.d.ts +1 -0
  41. package/dist/Components/Map/Subcomponents/Controls/TagsControl.d.ts +1 -0
  42. package/dist/Components/Map/Subcomponents/ItemFormPopup.d.ts +2 -2
  43. package/dist/Components/Map/Subcomponents/ItemPopupComponents/HeaderView.d.ts +16 -6
  44. package/dist/Components/Map/Subcomponents/ItemPopupComponents/PopupButton.d.ts +8 -0
  45. package/dist/Components/Map/Subcomponents/ItemPopupComponents/PopupCheckboxInput.d.ts +6 -0
  46. package/dist/Components/Map/Subcomponents/ItemPopupComponents/PopupStartEndInput.d.ts +1 -2
  47. package/dist/Components/Map/Subcomponents/ItemPopupComponents/PopupTextAreaInput.d.ts +1 -2
  48. package/dist/Components/Map/Subcomponents/ItemPopupComponents/PopupTextInput.d.ts +7 -2
  49. package/dist/Components/Map/Subcomponents/ItemPopupComponents/StartEndView.d.ts +1 -2
  50. package/dist/Components/Map/Subcomponents/ItemPopupComponents/TextView.d.ts +5 -3
  51. package/dist/Components/Map/Subcomponents/QuestControl.d.ts +2 -0
  52. package/dist/Components/Map/Tags.d.ts +1 -2
  53. package/dist/Components/Map/UtopiaMap.d.ts +2 -8
  54. package/dist/Components/Map/hooks/useClusterRef.d.ts +12 -0
  55. package/dist/Components/Map/hooks/useDebounce.d.ts +1 -0
  56. package/dist/Components/Map/hooks/useFilter.d.ts +7 -1
  57. package/dist/Components/Map/hooks/useItems.d.ts +2 -0
  58. package/dist/Components/Map/hooks/usePermissions.d.ts +2 -2
  59. package/dist/Components/Map/hooks/useSelectPosition.d.ts +23 -0
  60. package/dist/Components/Map/hooks/useSetItemPosition.d.ts +13 -0
  61. package/dist/Components/Map/hooks/useTags.d.ts +2 -2
  62. package/dist/Components/Map/hooks/useTimeout.d.ts +4 -0
  63. package/dist/Components/Map/index.d.ts +3 -0
  64. package/dist/Components/Map/setItemLocation.d.ts +1 -0
  65. package/dist/Components/Profile/ActionButton.d.ts +5 -0
  66. package/dist/Components/Profile/ActionsButton.d.ts +11 -0
  67. package/dist/Components/Profile/AvatarWidget.d.ts +5 -0
  68. package/dist/Components/Profile/ColorPicker.d.ts +6 -0
  69. package/dist/Components/Profile/ContactInfo.d.ts +7 -0
  70. package/dist/Components/Profile/Editor.d.ts +4 -0
  71. package/dist/Components/Profile/ItemForm.d.ts +1 -0
  72. package/dist/Components/Profile/LinkedItemsHeaderView.d.ts +10 -0
  73. package/dist/Components/Profile/OverlayItemProfile.d.ts +1 -0
  74. package/dist/Components/Profile/OverlayItemProfileSettings.d.ts +1 -0
  75. package/dist/Components/Profile/OverlayProfile.d.ts +1 -0
  76. package/dist/Components/Profile/OverlayProfileSettings.d.ts +1 -0
  77. package/dist/Components/Profile/OverlayUserSettings.d.ts +1 -0
  78. package/dist/Components/Profile/PlusButton.d.ts +7 -0
  79. package/dist/Components/Profile/ProfileSettings.d.ts +3 -0
  80. package/dist/Components/Profile/ProfileSubHeader.d.ts +7 -0
  81. package/dist/Components/Profile/RelationCard.d.ts +6 -0
  82. package/dist/Components/Profile/Settings.d.ts +1 -0
  83. package/dist/Components/Profile/SocialShareBar.d.ts +6 -0
  84. package/dist/Components/Profile/SocialShareButton.d.ts +6 -0
  85. package/dist/Components/Profile/Tags.d.ts +2 -0
  86. package/dist/Components/Profile/TagsWidget.d.ts +6 -0
  87. package/dist/Components/Profile/UserSettings.d.ts +3 -0
  88. package/dist/Components/Profile/index.d.ts +8 -1
  89. package/dist/Components/Profile/useClickOutside.d.ts +2 -0
  90. package/dist/Components/Templates/CardItem.d.ts +6 -0
  91. package/dist/Components/Templates/CardPage.d.ts +7 -2
  92. package/dist/Components/Templates/CircleLayout.d.ts +5 -0
  93. package/dist/Components/Templates/DateUserInfo.d.ts +4 -0
  94. package/dist/Components/Templates/DialogModal.d.ts +12 -0
  95. package/dist/Components/Templates/ItemCard.d.ts +8 -0
  96. package/dist/Components/Templates/ItemViewPage.d.ts +14 -0
  97. package/dist/Components/Templates/ItemsIndexPage.d.ts +19 -0
  98. package/dist/Components/Templates/MapOverlayPage.d.ts +7 -0
  99. package/dist/Components/Templates/MapOverlayScreen.d.ts +4 -0
  100. package/dist/Components/Templates/MoonCalendar.d.ts +1 -0
  101. package/dist/Components/Templates/OverlayItemsIndexPage.d.ts +6 -0
  102. package/dist/Components/Templates/TagView.d.ts +6 -0
  103. package/dist/Components/Templates/TitleCard.d.ts +6 -4
  104. package/dist/Components/Templates/index.d.ts +6 -0
  105. package/dist/Components/Typography/ErrorText.d.ts +1 -2
  106. package/dist/Components/Typography/Subtitle.d.ts +1 -1
  107. package/dist/Utils/DynamicHeroIcon.d.ts +2 -0
  108. package/dist/Utils/FormatTags.d.ts +2 -0
  109. package/dist/Utils/GetValue.d.ts +1 -0
  110. package/dist/Utils/Moon.d.ts +7 -0
  111. package/dist/Utils/ReverseGeocoder.d.ts +1 -0
  112. package/dist/Utils/TimeAgo.d.ts +1 -0
  113. package/dist/index.d.ts +5 -5
  114. package/dist/index.js +4727 -1388
  115. package/dist/index.js.map +1 -1
  116. package/dist/types.d.ts +71 -11
  117. package/dist/workspace/utopia-ui/src/Components/AppShell/AppShell.d.ts +8 -0
  118. package/dist/workspace/utopia-ui/src/Components/AppShell/Content.d.ts +6 -0
  119. package/dist/workspace/utopia-ui/src/Components/AppShell/NavBar.d.ts +4 -0
  120. package/dist/workspace/utopia-ui/src/Components/AppShell/SetAssetsApi.d.ts +4 -0
  121. package/dist/workspace/utopia-ui/src/Components/AppShell/SideBar.d.ts +12 -0
  122. package/dist/workspace/utopia-ui/src/Components/AppShell/SidebarSubmenu.d.ts +7 -0
  123. package/dist/workspace/utopia-ui/src/Components/AppShell/hooks/useAssets.d.ts +13 -0
  124. package/dist/workspace/utopia-ui/src/Components/AppShell/index.d.ts +3 -0
  125. package/dist/workspace/utopia-ui/src/Components/Auth/LoginPage.d.ts +1 -0
  126. package/dist/workspace/utopia-ui/src/Components/Auth/RequestPasswordPage.d.ts +3 -0
  127. package/dist/workspace/utopia-ui/src/Components/Auth/SetNewPasswordPage.d.ts +1 -0
  128. package/dist/workspace/utopia-ui/src/Components/Auth/SignupPage.d.ts +1 -0
  129. package/dist/workspace/utopia-ui/src/Components/Auth/index.d.ts +5 -0
  130. package/dist/{Components/Auth/authDirectus.d.ts → workspace/utopia-ui/src/Components/Auth/useAuth.d.ts} +6 -4
  131. package/dist/workspace/utopia-ui/src/Components/Gaming/Modal.d.ts +5 -0
  132. package/dist/workspace/utopia-ui/src/Components/Gaming/Quests.d.ts +1 -0
  133. package/dist/workspace/utopia-ui/src/Components/Gaming/hooks/useQuests.d.ts +13 -0
  134. package/dist/workspace/utopia-ui/src/Components/Gaming/index.d.ts +2 -0
  135. package/dist/workspace/utopia-ui/src/Components/Input/Autocomplete.d.ts +7 -0
  136. package/dist/workspace/utopia-ui/src/Components/Input/SelectBox.d.ts +16 -0
  137. package/dist/{Components/Input/TributeTextAreaInput copy.d.ts → workspace/utopia-ui/src/Components/Input/TextAreaInput.d.ts} +0 -1
  138. package/dist/workspace/utopia-ui/src/Components/Input/TextInput.d.ts +14 -0
  139. package/dist/workspace/utopia-ui/src/Components/Input/index.d.ts +3 -0
  140. package/dist/workspace/utopia-ui/src/Components/Map/ItemForm.d.ts +18 -0
  141. package/dist/workspace/utopia-ui/src/Components/Map/ItemView.d.ts +16 -0
  142. package/dist/workspace/utopia-ui/src/Components/Map/Layer.d.ts +2 -0
  143. package/dist/workspace/utopia-ui/src/Components/Map/Permissions.d.ts +6 -0
  144. package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/AddButton.d.ts +4 -0
  145. package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/Controls/Control.d.ts +6 -0
  146. package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/Controls/LayerControl.d.ts +1 -0
  147. package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/Controls/LocateControl.d.ts +3 -0
  148. package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/Controls/QuestControl.d.ts +1 -0
  149. package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/Controls/SearchControl.d.ts +3 -0
  150. package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/Controls/TagsControl.d.ts +1 -0
  151. package/dist/{Components/Map → workspace/utopia-ui/src/Components/Map/Subcomponents}/ItemFormPopup.d.ts +2 -3
  152. package/dist/{Components/Map/Subcomponents → workspace/utopia-ui/src/Components/Map/Subcomponents/ItemPopupComponents}/HeaderView.d.ts +2 -2
  153. package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/ItemPopupComponents/PopupButton.d.ts +8 -0
  154. package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/ItemPopupComponents/PopupStartEndInput.d.ts +4 -0
  155. package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/ItemPopupComponents/PopupTextAreaInput.d.ts +7 -0
  156. package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/ItemPopupComponents/PopupTextInput.d.ts +7 -0
  157. package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/ItemPopupComponents/StartEndView.d.ts +4 -0
  158. package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/ItemPopupComponents/TextView.d.ts +6 -0
  159. package/dist/{Components/Map → workspace/utopia-ui/src/Components/Map/Subcomponents}/ItemViewPopup.d.ts +3 -2
  160. package/dist/workspace/utopia-ui/src/Components/Map/Tags.d.ts +5 -0
  161. package/dist/workspace/utopia-ui/src/Components/Map/UtopiaMap.d.ts +11 -0
  162. package/dist/workspace/utopia-ui/src/Components/Map/hooks/useDebounce.d.ts +1 -0
  163. package/dist/workspace/utopia-ui/src/Components/Map/hooks/useFilter.d.ts +32 -0
  164. package/dist/workspace/utopia-ui/src/Components/Map/hooks/useItems.d.ts +26 -0
  165. package/dist/workspace/utopia-ui/src/Components/Map/hooks/useLayers.d.ts +14 -0
  166. package/dist/workspace/utopia-ui/src/Components/Map/hooks/useLeafletRefs.d.ts +22 -0
  167. package/dist/workspace/utopia-ui/src/Components/Map/hooks/usePermissions.d.ts +20 -0
  168. package/dist/workspace/utopia-ui/src/Components/Map/hooks/useTags.d.ts +22 -0
  169. package/dist/workspace/utopia-ui/src/Components/Map/hooks/useTimeout.d.ts +4 -0
  170. package/dist/workspace/utopia-ui/src/Components/Map/hooks/useWindowDimension.d.ts +4 -0
  171. package/dist/workspace/utopia-ui/src/Components/Map/index.d.ts +12 -0
  172. package/dist/workspace/utopia-ui/src/Components/Profile/ColorPicker.d.ts +6 -0
  173. package/dist/workspace/utopia-ui/src/Components/Profile/Editor.d.ts +4 -0
  174. package/dist/workspace/utopia-ui/src/Components/Profile/OverlayProfile.d.ts +1 -0
  175. package/dist/workspace/utopia-ui/src/Components/Profile/OverlayProfileSettings.d.ts +1 -0
  176. package/dist/workspace/utopia-ui/src/Components/Profile/OverlayUserSettings.d.ts +1 -0
  177. package/dist/workspace/utopia-ui/src/Components/Profile/ProfileSettings.d.ts +3 -0
  178. package/dist/workspace/utopia-ui/src/Components/Profile/TagsWidget.d.ts +6 -0
  179. package/dist/workspace/utopia-ui/src/Components/Profile/UserSettings.d.ts +3 -0
  180. package/dist/workspace/utopia-ui/src/Components/Profile/index.d.ts +5 -0
  181. package/dist/workspace/utopia-ui/src/Components/Profile/useClickOutside.d.ts +2 -0
  182. package/dist/workspace/utopia-ui/src/Components/Templates/CardPage.d.ts +10 -0
  183. package/dist/workspace/utopia-ui/src/Components/Templates/CircleLayout.d.ts +5 -0
  184. package/dist/{Components/AppShell → workspace/utopia-ui/src/Components/Templates}/DialogModal.d.ts +2 -1
  185. package/dist/workspace/utopia-ui/src/Components/Templates/ItemsIndexPage.d.ts +15 -0
  186. package/dist/workspace/utopia-ui/src/Components/Templates/MapOverlayPage.d.ts +7 -0
  187. package/dist/workspace/utopia-ui/src/Components/Templates/MoonCalendar.d.ts +1 -0
  188. package/dist/workspace/utopia-ui/src/Components/Templates/TagView.d.ts +6 -0
  189. package/dist/workspace/utopia-ui/src/Components/Templates/TitleCard.d.ts +11 -0
  190. package/dist/workspace/utopia-ui/src/Components/Templates/index.d.ts +6 -0
  191. package/dist/workspace/utopia-ui/src/Components/Typography/ErrorText.d.ts +5 -0
  192. package/dist/workspace/utopia-ui/src/Components/Typography/Subtitle.d.ts +6 -0
  193. package/dist/workspace/utopia-ui/src/Utils/FormatTags.d.ts +2 -0
  194. package/dist/workspace/utopia-ui/src/Utils/GetValue.d.ts +1 -0
  195. package/dist/workspace/utopia-ui/src/Utils/MarkerIconFactory.d.ts +3 -0
  196. package/dist/workspace/utopia-ui/src/Utils/Moon.d.ts +7 -0
  197. package/dist/workspace/utopia-ui/src/Utils/RandomColor.d.ts +1 -0
  198. package/dist/workspace/utopia-ui/src/Utils/ReplaceURLs.d.ts +3 -0
  199. package/dist/workspace/utopia-ui/src/Utils/TimeAgo.d.ts +1 -0
  200. package/dist/workspace/utopia-ui/src/index.d.ts +13 -0
  201. package/dist/workspace/utopia-ui/src/types.d.ts +108 -0
  202. package/package.json +13 -5
  203. package/LICENSE.md +0 -5
  204. package/dist/Components/Input/FancyTextAreaInput.d.ts +0 -13
  205. package/dist/Components/Input/InputText.d.ts +0 -13
  206. package/dist/Components/Input/TributeTextAreaInput.d.ts +0 -13
  207. package/dist/Components/Map/Subcomponents/SearchBar.d.ts +0 -2
  208. package/dist/Components/Map/Subcomponents/StartEndView.d.ts +0 -6
  209. package/dist/Components/Map/Subcomponents/TagFilterControl.d.ts +0 -2
  210. package/dist/Components/Map/Subcomponents/TextView.d.ts +0 -5
  211. package/dist/Components/TitleCard.d.ts +0 -9
  212. package/dist/Utils/TaggedText.d.ts +0 -3
  213. /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?: LatLng;
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: string;
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?: React.MutableRefObject<any>;
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: Geometry;
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?: Tag[];
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: number | string): Promise<any>;
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
- first_name: string;
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,6 @@
1
+ import * as React from 'react';
2
+ declare type ContentProps = {
3
+ children?: React.ReactNode;
4
+ };
5
+ export declare function Content({ children }: ContentProps): JSX.Element;
6
+ export {};
@@ -0,0 +1,4 @@
1
+ export default function NavBar({ appName, nameWidth }: {
2
+ appName: string;
3
+ nameWidth?: number;
4
+ }): JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { AssetsApi } from '../../types';
2
+ export declare const SetAssetsApi: ({ assetsApi }: {
3
+ assetsApi: AssetsApi;
4
+ }) => 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,7 @@
1
+ declare function SidebarSubmenu({ submenu, name, icon }: {
2
+ path: string;
3
+ icon: JSX.Element;
4
+ name: string;
5
+ submenu?: any | undefined;
6
+ }): JSX.Element;
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 {};
@@ -0,0 +1,3 @@
1
+ export { AppShell } from "./AppShell";
2
+ export { SideBar } from "./SideBar";
3
+ export { Content } from "./Content";
@@ -0,0 +1 @@
1
+ export declare function LoginPage(): JSX.Element;
@@ -0,0 +1,3 @@
1
+ export declare function RequestPasswordPage({ reset_url }: {
2
+ reset_url: any;
3
+ }): JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function SetNewPasswordPage(): JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function SignupPage(): JSX.Element;
@@ -0,0 +1,5 @@
1
+ export { AuthProvider, useAuth } from "./useAuth";
2
+ export { LoginPage } from "./LoginPage";
3
+ export { SignupPage } from './SignupPage';
4
+ export { RequestPasswordPage } from './RequestPasswordPage';
5
+ export { SetNewPasswordPage } from './SetNewPasswordPage';
@@ -10,15 +10,17 @@ declare type AuthCredentials = {
10
10
  otp?: string | undefined;
11
11
  };
12
12
  declare type AuthContextProps = {
13
- isAuthenticated: Boolean;
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: () => void;
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 AuthProviderDirectus: ({ userApi, children }: AuthProviderProps) => JSX.Element;
23
- export declare const useAuthDirectus: () => AuthContextProps;
24
+ export declare const AuthProvider: ({ userApi, children }: AuthProviderProps) => JSX.Element;
25
+ export declare const useAuth: () => AuthContextProps;
24
26
  export {};
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ export declare function Modal({ children, showOnStartup }: {
3
+ children: React.ReactNode;
4
+ showOnStartup?: boolean;
5
+ }): JSX.Element;
@@ -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,2 @@
1
+ export { Modal } from './Modal';
2
+ export { Quests } from './Quests';
@@ -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 {};
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare type TextAreaProps = {
3
2
  labelTitle?: string;
4
3
  labelStyle?: string;
@@ -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,3 @@
1
+ export { TextAreaInput } from "./TextAreaInput";
2
+ export { TextInput } from "./TextInput";
3
+ export { SelectBox } from "./SelectBox";
@@ -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,6 @@
1
+ import { ItemsApi, Permission } from '../../types';
2
+ export declare function Permissions({ data, api, adminRole }: {
3
+ data?: Permission[];
4
+ api?: ItemsApi<Permission>;
5
+ adminRole?: string;
6
+ }): JSX.Element;
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ export default function AddButton({ setSelectNewItemPosition }: {
3
+ setSelectNewItemPosition: React.Dispatch<React.SetStateAction<any>>;
4
+ }): JSX.Element;
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ export declare const Control: ({ position, children, zIndex }: {
3
+ position: "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
4
+ children: React.ReactNode;
5
+ zIndex: string;
6
+ }) => JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function LayerControl(): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import 'leaflet.locatecontrol';
2
+ import 'leaflet.locatecontrol/dist/L.Control.Locate.css';
3
+ export declare const LocateControl: () => JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function QuestControl(): JSX.Element;
@@ -0,0 +1,3 @@
1
+ export declare const SearchControl: ({ clusterRef }: {
2
+ clusterRef: any;
3
+ }) => 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, ItemsApi } from '../../types';
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: React.Dispatch<React.SetStateAction<any>>;
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 "./ItemFormPopup";
3
- import { Item } from "../../../types";
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;
@@ -0,0 +1,4 @@
1
+ import { Item } from '../../../../types';
2
+ export declare const PopupStartEndInput: ({ item }: {
3
+ item?: Item | undefined;
4
+ }) => JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { Item } from '../../../../types';
2
+ export declare const PopupTextAreaInput: ({ dataField, placeholder, style, item }: {
3
+ dataField: string;
4
+ placeholder: string;
5
+ style?: string | undefined;
6
+ item?: Item | undefined;
7
+ }) => JSX.Element;
@@ -0,0 +1,7 @@
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
+ }) => JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { Item } from '../../../../types';
2
+ export declare const StartEndView: ({ item }: {
3
+ item?: Item | undefined;
4
+ }) => JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { Item } from '../../../../types';
2
+ export declare const TextView: ({ item, truncate, itemTextField }: {
3
+ item?: Item | undefined;
4
+ truncate?: boolean | undefined;
5
+ itemTextField?: string | undefined;
6
+ }) => JSX.Element;
@@ -1,8 +1,9 @@
1
1
  import * as React from 'react';
2
- import { Item } from '../../types';
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: (props: ItemViewPopupProps) => JSX.Element;
9
+ export declare const ItemViewPopup: React.ForwardRefExoticComponent<ItemViewPopupProps & React.RefAttributes<unknown>>;
@@ -0,0 +1,5 @@
1
+ import { ItemsApi, Tag } from '../../types';
2
+ export declare function Tags({ data, api }: {
3
+ data?: Tag[];
4
+ api?: ItemsApi<Tag>;
5
+ }): JSX.Element;
@@ -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 {};