utopia-ui 3.0.57 → 3.0.58

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 (56) hide show
  1. package/dist/index.d.ts +216 -208
  2. package/dist/types/src/Components/AppShell/AppShell.d.ts +1 -1
  3. package/dist/types/src/Components/AppShell/SetAppState.d.ts +1 -1
  4. package/dist/types/src/Components/AppShell/hooks/useAppState.d.ts +1 -1
  5. package/dist/types/src/Components/AppShell/hooks/useAssets.d.ts +1 -1
  6. package/dist/types/src/Components/Auth/useAuth.d.ts +2 -2
  7. package/dist/types/src/Components/Map/ItemForm.d.ts +1 -1
  8. package/dist/types/src/Components/Map/ItemView.d.ts +1 -1
  9. package/dist/types/src/Components/Map/Layer.d.ts +1 -1
  10. package/dist/types/src/Components/Map/Permissions.d.ts +2 -2
  11. package/dist/types/src/Components/Map/Subcomponents/ItemFormPopup.d.ts +1 -1
  12. package/dist/types/src/Components/Map/Subcomponents/ItemPopupComponents/HeaderView.d.ts +2 -2
  13. package/dist/types/src/Components/Map/Subcomponents/ItemPopupComponents/PopupButton.d.ts +1 -1
  14. package/dist/types/src/Components/Map/Subcomponents/ItemPopupComponents/PopupCheckboxInput.d.ts +1 -1
  15. package/dist/types/src/Components/Map/Subcomponents/ItemPopupComponents/PopupStartEndInput.d.ts +1 -1
  16. package/dist/types/src/Components/Map/Subcomponents/ItemPopupComponents/PopupTextAreaInput.d.ts +1 -1
  17. package/dist/types/src/Components/Map/Subcomponents/ItemPopupComponents/PopupTextInput.d.ts +1 -1
  18. package/dist/types/src/Components/Map/Subcomponents/ItemPopupComponents/StartEndView.d.ts +1 -1
  19. package/dist/types/src/Components/Map/Subcomponents/ItemPopupComponents/TextView.d.ts +1 -1
  20. package/dist/types/src/Components/Map/Subcomponents/ItemViewPopup.d.ts +2 -2
  21. package/dist/types/src/Components/Map/Tags.d.ts +2 -2
  22. package/dist/types/src/Components/Map/UtopiaMap.d.ts +1 -1
  23. package/dist/types/src/Components/Map/UtopiaMapInner.d.ts +1 -1
  24. package/dist/types/src/Components/Map/hooks/useFilter.d.ts +2 -2
  25. package/dist/types/src/Components/Map/hooks/useItems.d.ts +2 -2
  26. package/dist/types/src/Components/Map/hooks/useLayers.d.ts +1 -1
  27. package/dist/types/src/Components/Map/hooks/useLeafletRefs.d.ts +1 -1
  28. package/dist/types/src/Components/Map/hooks/usePermissions.d.ts +5 -5
  29. package/dist/types/src/Components/Map/hooks/useSelectPosition.d.ts +3 -3
  30. package/dist/types/src/Components/Map/hooks/useTags.d.ts +3 -3
  31. package/dist/types/src/Components/Profile/ProfileView.d.ts +1 -1
  32. package/dist/types/src/Components/Profile/Subcomponents/ActionsButton.d.ts +1 -1
  33. package/dist/types/src/Components/Profile/Subcomponents/ContactInfoForm.d.ts +1 -1
  34. package/dist/types/src/Components/Profile/Subcomponents/ContactInfoView.d.ts +1 -1
  35. package/dist/types/src/Components/Profile/Subcomponents/GalleryView.d.ts +1 -1
  36. package/dist/types/src/Components/Profile/Subcomponents/GroupSubHeaderView.d.ts +1 -1
  37. package/dist/types/src/Components/Profile/Subcomponents/GroupSubheaderForm.d.ts +2 -2
  38. package/dist/types/src/Components/Profile/Subcomponents/LinkedItemsHeaderView.d.ts +1 -1
  39. package/dist/types/src/Components/Profile/Subcomponents/PlusButton.d.ts +1 -1
  40. package/dist/types/src/Components/Profile/Subcomponents/ProfileStartEndForm.d.ts +1 -1
  41. package/dist/types/src/Components/Profile/Subcomponents/ProfileStartEndView.d.ts +1 -1
  42. package/dist/types/src/Components/Profile/Subcomponents/ProfileTextForm.d.ts +1 -1
  43. package/dist/types/src/Components/Profile/Subcomponents/ProfileTextView.d.ts +1 -1
  44. package/dist/types/src/Components/Profile/Templates/FlexForm.d.ts +2 -2
  45. package/dist/types/src/Components/Profile/Templates/FlexView.d.ts +1 -1
  46. package/dist/types/src/Components/Profile/Templates/OnepagerForm.d.ts +2 -2
  47. package/dist/types/src/Components/Profile/Templates/OnepagerView.d.ts +1 -1
  48. package/dist/types/src/Components/Profile/Templates/SimpleView.d.ts +1 -1
  49. package/dist/types/src/Components/Profile/Templates/TabsView.d.ts +2 -2
  50. package/dist/types/src/Components/Templates/AttestationForm.d.ts +1 -1
  51. package/dist/types/src/Components/Templates/DateUserInfo.d.ts +1 -1
  52. package/dist/types/src/Components/Templates/ItemCard.d.ts +1 -1
  53. package/dist/types/src/Components/Templates/TagView.d.ts +1 -1
  54. package/dist/types/src/index.d.ts +1 -0
  55. package/dist/types/src/types/index.d.ts +9 -0
  56. package/package.json +2 -1
package/dist/index.d.ts CHANGED
@@ -1,197 +1,35 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { GeoJsonObject, Geometry, Point } from 'geojson';
3
- import { LatLng } from 'leaflet';
2
+ import { UtopiaMapProps as UtopiaMapProps$1 } from '#src/types/UtopiaMapProps';
3
+ import { LayerProps as LayerProps$1 } from '#src/types/LayerProps';
4
+ import { ItemsApi as ItemsApi$1 } from '#src/types/ItemsApi';
5
+ import { Tag as Tag$1 } from '#src/types/Tag';
6
+ import { Permission as Permission$1 } from '#src/types/Permission';
4
7
  import * as prop_types from 'prop-types';
8
+ import { Item as Item$1 } from '#src/types/Item';
9
+ import { AssetsApi as AssetsApi$1 } from '#src/types/AssetsApi';
10
+ import { UserApi as UserApi$1 } from '#src/types/UserApi';
11
+ import { LatLng } from 'leaflet';
12
+ import { Geometry, Point, GeoJsonObject } from 'geojson';
5
13
 
6
- interface Tag {
7
- color: string
8
- id: string
9
- name: string
10
- offer_or_need?: boolean
11
- }
12
-
13
- interface UtopiaMapProps {
14
- height?: string
15
- width?: string
16
- center?: [number, number]
17
- zoom?: number
18
- tags?: Tag[]
19
- children?: React.ReactNode
20
- geo?: GeoJsonObject
21
- showFilterControl?: boolean
22
- showLayerControl?: boolean
23
- showGratitudeControl?: boolean
24
- infoText?: string
25
- }
26
-
27
- declare function UtopiaMap({ height, width, center, zoom, children, geo, showFilterControl, showGratitudeControl, showLayerControl, infoText, }: UtopiaMapProps): react_jsx_runtime.JSX.Element;
28
-
29
- interface ItemsApi<T> {
30
- getItems(): Promise<T[]>
31
- getItem?(id: string): Promise<T>
32
- createItem?(item: T): Promise<T>
33
- updateItem?(item: T): Promise<T>
34
- deleteItem?(id: string): Promise<boolean>
35
- collectionName?: string
36
- }
37
-
38
- interface Relation {
39
- related_items_id: string
40
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
41
- [key: string]: any
42
- }
43
-
44
- interface Profile {
45
- id?: string
46
- avatar?: string
47
- color?: string
48
- name: string
49
- text: string
50
- geoposition?: Geometry
51
- }
52
-
53
- interface UserItem {
54
- id?: string
55
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
56
- role?: any
57
- email?: string
58
- password?: string
59
- profile?: Profile
60
- first_name?: string
61
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
62
- [key: string]: any
63
- }
64
-
65
- interface Item {
66
- id: string
67
- name: string
68
- text: string
69
- position?: Point
70
- date_created?: string
71
- date_updated?: string | null
72
- start?: string
73
- end?: string
74
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
75
- api?: ItemsApi<any>
76
- tags?: string[]
77
- layer?: LayerProps
78
- relations?: Relation[]
79
- parent?: string
80
- subname?: string
81
- public_edit?: boolean
82
- slug?: string
83
- user_created?: UserItem
84
- image?: string
85
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
86
- [key: string]: any
87
- /* constructor(
88
- id: string,
89
- name: string,
90
- text: string,
91
- position: Geometry,
92
- layer?: LayerProps,
93
- api?: ItemsApi<any>,
94
- ) {
95
- this.id = id
96
- this.name = name
97
- this.text = text
98
- this.position = position
99
- this.layer = layer
100
- this.api = api
101
- } */
102
- }
103
-
104
- interface ItemFormPopupProps {
105
- position: LatLng
106
- layer: LayerProps
107
- item?: Item
108
- children?: React.ReactNode
109
- setItemFormPopup?: React.Dispatch<React.SetStateAction<ItemFormPopupProps | null>>
110
- }
14
+ declare function UtopiaMap({ height, width, center, zoom, children, geo, showFilterControl, showGratitudeControl, showLayerControl, infoText, }: UtopiaMapProps$1): react_jsx_runtime.JSX.Element;
111
15
 
112
- interface ItemType {
113
- name: string
114
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
115
- [key: string]: any
116
- }
117
-
118
- interface LayerProps {
119
- id?: string
120
- data?: Item[]
121
- children?: React.ReactNode
122
- name: string
123
- menuIcon: string
124
- menuColor: string
125
- menuText: string
126
- markerIcon: string
127
- markerShape: string
128
- markerDefaultColor: string
129
- markerDefaultColor2?: string
130
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
131
- api?: ItemsApi<any>
132
- itemType: ItemType
133
- itemNameField?: string
134
- itemSubnameField?: string
135
- itemTextField?: string
136
- itemAvatarField?: string
137
- itemColorField?: string
138
- itemOwnerField?: string
139
- itemTagsField?: string
140
- itemLatitudeField?: string
141
- itemLongitudeField?: string
142
- itemOffersField?: string
143
- itemNeedsField?: string
144
- onlyOnePerOwner?: boolean
145
- customEditLink?: string
146
- customEditParameter?: string
147
- public_edit_items?: boolean
148
- listed?: boolean
149
- item_presets?: Record<string, unknown>
150
- setItemFormPopup?: React.Dispatch<React.SetStateAction<ItemFormPopupProps | null>>
151
- itemFormPopup?: ItemFormPopupProps | null
152
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
153
- clusterRef?: any
154
- }
155
-
156
- declare const Layer: ({ data, children, name, menuIcon, menuText, menuColor, markerIcon, markerShape, markerDefaultColor, markerDefaultColor2, api, itemType, itemNameField, itemSubnameField, itemTextField, itemAvatarField, itemColorField, itemOwnerField, itemLatitudeField, itemLongitudeField, itemTagsField, itemOffersField, itemNeedsField, onlyOnePerOwner, customEditLink, customEditParameter, public_edit_items, listed, setItemFormPopup, itemFormPopup, clusterRef, }: LayerProps) => react_jsx_runtime.JSX.Element;
16
+ declare const Layer: ({ data, children, name, menuIcon, menuText, menuColor, markerIcon, markerShape, markerDefaultColor, markerDefaultColor2, api, itemType, itemNameField, itemSubnameField, itemTextField, itemAvatarField, itemColorField, itemOwnerField, itemLatitudeField, itemLongitudeField, itemTagsField, itemOffersField, itemNeedsField, onlyOnePerOwner, customEditLink, customEditParameter, public_edit_items, listed, setItemFormPopup, itemFormPopup, clusterRef, }: LayerProps$1) => react_jsx_runtime.JSX.Element;
157
17
 
158
18
  declare function Tags({ data, api }: {
159
- data?: Tag[];
160
- api?: ItemsApi<Tag>;
19
+ data?: Tag$1[];
20
+ api?: ItemsApi$1<Tag$1>;
161
21
  }): react_jsx_runtime.JSX.Element;
162
22
 
163
- type PermissionAction = 'create' | 'read' | 'update' | 'delete'
164
-
165
- interface PermissionCondition {
166
- user_created?: {
167
- _eq: string // Erwartet den speziellen Wert "$CURRENT_USER" oder eine spezifische UUID
168
- }
169
- public_edit?: {
170
- _eq: boolean // Erwartet den speziellen Wert "$CURRENT_USER" oder eine spezifische UUID
171
- }
172
- }
173
-
174
- interface Permission {
175
- id?: string
176
- policy?: { name: string }
177
- collection: string
178
- action: PermissionAction
179
- permissions?: {
180
- // Optional, für spezifische Bedingungen wie `user_created`
181
- _and: PermissionCondition[]
182
- }
183
- }
184
-
185
23
  declare function Permissions({ data, api, adminRole, }: {
186
- data?: Permission[];
187
- api?: ItemsApi<Permission>;
24
+ data?: Permission$1[];
25
+ api?: ItemsApi$1<Permission$1>;
188
26
  adminRole?: string;
189
27
  }): react_jsx_runtime.JSX.Element;
190
28
 
191
29
  declare const ItemForm: {
192
30
  ({ children, item, title, setPopupTitle, }: {
193
31
  children?: React.ReactNode;
194
- item?: Item;
32
+ item?: Item$1;
195
33
  title?: string;
196
34
  setPopupTitle?: React.Dispatch<React.SetStateAction<string>>;
197
35
  }): react_jsx_runtime.JSX.Element;
@@ -207,7 +45,7 @@ declare const ItemForm: {
207
45
  declare const ItemView: {
208
46
  ({ children, item }: {
209
47
  children?: React.ReactNode;
210
- item?: Item;
48
+ item?: Item$1;
211
49
  }): react_jsx_runtime.JSX.Element;
212
50
  propTypes: {
213
51
  children: prop_types.Requireable<prop_types.ReactNodeLike>;
@@ -222,11 +60,11 @@ declare const PopupTextAreaInput: ({ dataField, placeholder, style, item, }: {
222
60
  dataField: string;
223
61
  placeholder: string;
224
62
  style?: string;
225
- item?: Item;
63
+ item?: Item$1;
226
64
  }) => react_jsx_runtime.JSX.Element;
227
65
 
228
66
  interface StartEndInputProps {
229
- item?: Item;
67
+ item?: Item$1;
230
68
  showLabels?: boolean;
231
69
  updateStartValue?: (value: string) => void;
232
70
  updateEndValue?: (value: string) => void;
@@ -237,24 +75,24 @@ declare const PopupTextInput: ({ dataField, placeholder, style, item, }: {
237
75
  dataField: string;
238
76
  placeholder: string;
239
77
  style?: string;
240
- item?: Item;
78
+ item?: Item$1;
241
79
  }) => react_jsx_runtime.JSX.Element;
242
80
 
243
81
  declare const PopupCheckboxInput: ({ dataField, label, item, }: {
244
82
  dataField: string;
245
83
  label: string;
246
- item?: Item;
84
+ item?: Item$1;
247
85
  }) => react_jsx_runtime.JSX.Element;
248
86
 
249
87
  declare const TextView: ({ item, truncate, itemTextField, rawText, }: {
250
- item?: Item;
88
+ item?: Item$1;
251
89
  truncate?: boolean;
252
90
  itemTextField?: string;
253
91
  rawText?: string;
254
92
  }) => react_jsx_runtime.JSX.Element;
255
93
 
256
94
  declare const StartEndView: ({ item }: {
257
- item?: Item;
95
+ item?: Item$1;
258
96
  }) => react_jsx_runtime.JSX.Element;
259
97
 
260
98
  declare const PopupButton: ({ url, parameterField, text, colorField, item, }: {
@@ -262,18 +100,13 @@ declare const PopupButton: ({ url, parameterField, text, colorField, item, }: {
262
100
  parameterField?: string;
263
101
  text: string;
264
102
  colorField?: string;
265
- item?: Item;
103
+ item?: Item$1;
266
104
  }) => react_jsx_runtime.JSX.Element;
267
105
 
268
- interface AssetsApi {
269
- upload(file: Blob, title: string): Promise<{ id: string }>
270
- url: string
271
- }
272
-
273
106
  declare function AppShell({ appName, children, assetsApi, userType, }: {
274
107
  appName: string;
275
108
  children: React.ReactNode;
276
- assetsApi: AssetsApi;
109
+ assetsApi: AssetsApi$1;
277
110
  userType: string;
278
111
  }): react_jsx_runtime.JSX.Element;
279
112
 
@@ -298,19 +131,8 @@ declare const Sitemap: ({ url }: {
298
131
  url: string;
299
132
  }) => react_jsx_runtime.JSX.Element;
300
133
 
301
- interface UserApi {
302
- register(email: string, password: string, userName: string): Promise<void>
303
- login(email: string, password: string): Promise<UserItem | undefined>
304
- logout(): Promise<void>
305
- getUser(): Promise<UserItem>
306
- getToken(): Promise<string | null>
307
- updateUser(user: UserItem): Promise<void>
308
- requestPasswordReset(email: string, reset_url?: string)
309
- passwordReset(token: string, new_password: string)
310
- }
311
-
312
134
  interface AuthProviderProps {
313
- userApi: UserApi;
135
+ userApi: UserApi$1;
314
136
  children?: React.ReactNode;
315
137
  }
316
138
  declare const AuthProvider: ({ userApi, children }: AuthProviderProps) => react_jsx_runtime.JSX.Element;
@@ -328,7 +150,7 @@ declare function SetNewPasswordPage(): react_jsx_runtime.JSX.Element;
328
150
  declare function UserSettings(): react_jsx_runtime.JSX.Element;
329
151
 
330
152
  declare function ProfileView({ attestationApi }: {
331
- attestationApi?: ItemsApi<any>;
153
+ attestationApi?: ItemsApi$1<any>;
332
154
  }): react_jsx_runtime.JSX.Element;
333
155
 
334
156
  declare function ProfileForm(): react_jsx_runtime.JSX.Element;
@@ -379,7 +201,7 @@ declare const OverlayItemsIndexPage: ({ url, layerName, parameterField, plusButt
379
201
  }) => react_jsx_runtime.JSX.Element;
380
202
 
381
203
  declare const AttestationForm: ({ api }: {
382
- api?: ItemsApi<unknown>;
204
+ api?: ItemsApi$1<unknown>;
383
205
  }) => react_jsx_runtime.JSX.Element;
384
206
 
385
207
  declare const MarketView: () => react_jsx_runtime.JSX.Element;
@@ -429,6 +251,192 @@ type SelectBoxProps = {
429
251
  };
430
252
  declare function SelectBox(props: SelectBoxProps): react_jsx_runtime.JSX.Element;
431
253
 
254
+ interface ItemsApi<T> {
255
+ getItems(): Promise<T[]>
256
+ getItem?(id: string): Promise<T>
257
+ createItem?(item: T): Promise<T>
258
+ updateItem?(item: T): Promise<T>
259
+ deleteItem?(id: string): Promise<boolean>
260
+ collectionName?: string
261
+ }
262
+
263
+ interface Tag {
264
+ color: string
265
+ id: string
266
+ name: string
267
+ offer_or_need?: boolean
268
+ }
269
+
270
+ interface ItemFormPopupProps {
271
+ position: LatLng
272
+ layer: LayerProps
273
+ item?: Item
274
+ children?: React.ReactNode
275
+ setItemFormPopup?: React.Dispatch<React.SetStateAction<ItemFormPopupProps | null>>
276
+ }
277
+
278
+ interface ItemType {
279
+ name: string
280
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
281
+ [key: string]: any
282
+ }
283
+
284
+ interface LayerProps {
285
+ id?: string
286
+ data?: Item[]
287
+ children?: React.ReactNode
288
+ name: string
289
+ menuIcon: string
290
+ menuColor: string
291
+ menuText: string
292
+ markerIcon: string
293
+ markerShape: string
294
+ markerDefaultColor: string
295
+ markerDefaultColor2?: string
296
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
297
+ api?: ItemsApi<any>
298
+ itemType: ItemType
299
+ itemNameField?: string
300
+ itemSubnameField?: string
301
+ itemTextField?: string
302
+ itemAvatarField?: string
303
+ itemColorField?: string
304
+ itemOwnerField?: string
305
+ itemTagsField?: string
306
+ itemLatitudeField?: string
307
+ itemLongitudeField?: string
308
+ itemOffersField?: string
309
+ itemNeedsField?: string
310
+ onlyOnePerOwner?: boolean
311
+ customEditLink?: string
312
+ customEditParameter?: string
313
+ public_edit_items?: boolean
314
+ listed?: boolean
315
+ item_presets?: Record<string, unknown>
316
+ setItemFormPopup?: React.Dispatch<React.SetStateAction<ItemFormPopupProps | null>>
317
+ itemFormPopup?: ItemFormPopupProps | null
318
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
319
+ clusterRef?: any
320
+ }
321
+
322
+ interface Relation {
323
+ related_items_id: string
324
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
325
+ [key: string]: any
326
+ }
327
+
328
+ interface Profile {
329
+ id?: string
330
+ avatar?: string
331
+ color?: string
332
+ name: string
333
+ text: string
334
+ geoposition?: Geometry
335
+ }
336
+
337
+ interface UserItem {
338
+ id?: string
339
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
340
+ role?: any
341
+ email?: string
342
+ password?: string
343
+ profile?: Profile
344
+ first_name?: string
345
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
346
+ [key: string]: any
347
+ }
348
+
349
+ interface Item {
350
+ id: string
351
+ name: string
352
+ text: string
353
+ position?: Point
354
+ date_created?: string
355
+ date_updated?: string | null
356
+ start?: string
357
+ end?: string
358
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
359
+ api?: ItemsApi<any>
360
+ tags?: string[]
361
+ layer?: LayerProps
362
+ relations?: Relation[]
363
+ parent?: string
364
+ subname?: string
365
+ public_edit?: boolean
366
+ slug?: string
367
+ user_created?: UserItem
368
+ image?: string
369
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
370
+ [key: string]: any
371
+ /* constructor(
372
+ id: string,
373
+ name: string,
374
+ text: string,
375
+ position: Geometry,
376
+ layer?: LayerProps,
377
+ api?: ItemsApi<any>,
378
+ ) {
379
+ this.id = id
380
+ this.name = name
381
+ this.text = text
382
+ this.position = position
383
+ this.layer = layer
384
+ this.api = api
385
+ } */
386
+ }
387
+
388
+ type PermissionAction = 'create' | 'read' | 'update' | 'delete'
389
+
390
+ interface PermissionCondition {
391
+ user_created?: {
392
+ _eq: string // Erwartet den speziellen Wert "$CURRENT_USER" oder eine spezifische UUID
393
+ }
394
+ public_edit?: {
395
+ _eq: boolean // Erwartet den speziellen Wert "$CURRENT_USER" oder eine spezifische UUID
396
+ }
397
+ }
398
+
399
+ interface Permission {
400
+ id?: string
401
+ policy?: { name: string }
402
+ collection: string
403
+ action: PermissionAction
404
+ permissions?: {
405
+ // Optional, für spezifische Bedingungen wie `user_created`
406
+ _and: PermissionCondition[]
407
+ }
408
+ }
409
+
410
+ interface UserApi {
411
+ register(email: string, password: string, userName: string): Promise<void>
412
+ login(email: string, password: string): Promise<UserItem | undefined>
413
+ logout(): Promise<void>
414
+ getUser(): Promise<UserItem>
415
+ getToken(): Promise<string | null>
416
+ updateUser(user: UserItem): Promise<void>
417
+ requestPasswordReset(email: string, reset_url?: string)
418
+ passwordReset(token: string, new_password: string)
419
+ }
420
+
421
+ interface UtopiaMapProps {
422
+ height?: string
423
+ width?: string
424
+ center?: [number, number]
425
+ zoom?: number
426
+ tags?: Tag[]
427
+ children?: React.ReactNode
428
+ geo?: GeoJsonObject
429
+ showFilterControl?: boolean
430
+ showLayerControl?: boolean
431
+ showGratitudeControl?: boolean
432
+ infoText?: string
433
+ }
434
+
435
+ interface AssetsApi {
436
+ upload(file: Blob, title: string): Promise<{ id: string }>
437
+ url: string
438
+ }
439
+
432
440
  declare global {
433
441
  interface Window {
434
442
  my_modal_3: {
@@ -437,4 +445,4 @@ declare global {
437
445
  }
438
446
  }
439
447
 
440
- export { AppShell, AttestationForm, AuthProvider, CardPage, Content, ItemForm, ItemView, Layer, LoginPage, MapOverlayPage, MarketView, Modal, MoonCalendar, OverlayItemsIndexPage, Permissions, PopupButton, PopupCheckboxInput, PopupStartEndInput, PopupTextAreaInput, PopupTextInput, ProfileForm, ProfileView, Quests, RequestPasswordPage, SelectBox, SelectUser, SetNewPasswordPage, SideBar, SignupPage, Sitemap, StartEndView, Tags, TextAreaInput, TextInput, TextView, TitleCard, UserSettings, UtopiaMap };
448
+ export { AppShell, type AssetsApi, AttestationForm, AuthProvider, CardPage, Content, type Item, ItemForm, ItemView, type ItemsApi, Layer, type LayerProps, LoginPage, MapOverlayPage, MarketView, Modal, MoonCalendar, OverlayItemsIndexPage, type Permission, Permissions, PopupButton, PopupCheckboxInput, PopupStartEndInput, PopupTextAreaInput, PopupTextInput, ProfileForm, ProfileView, Quests, RequestPasswordPage, SelectBox, SelectUser, SetNewPasswordPage, SideBar, SignupPage, Sitemap, StartEndView, type Tag, Tags, TextAreaInput, TextInput, TextView, TitleCard, type UserApi, type UserItem, UserSettings, UtopiaMap, type UtopiaMapProps };
@@ -1,4 +1,4 @@
1
- import type { AssetsApi } from '#types/AssetsApi';
1
+ import type { AssetsApi } from '#src/types/AssetsApi';
2
2
  export declare function AppShell({ appName, children, assetsApi, userType, }: {
3
3
  appName: string;
4
4
  children: React.ReactNode;
@@ -1,4 +1,4 @@
1
- import type { AssetsApi } from '#types/AssetsApi';
1
+ import type { AssetsApi } from '#src/types/AssetsApi';
2
2
  export declare const SetAppState: ({ assetsApi, userType, }: {
3
3
  assetsApi: AssetsApi;
4
4
  userType: string;
@@ -1,4 +1,4 @@
1
- import type { AssetsApi } from '#types/AssetsApi';
1
+ import type { AssetsApi } from '#src/types/AssetsApi';
2
2
  interface AppState {
3
3
  assetsApi: AssetsApi;
4
4
  userType: string;
@@ -1,4 +1,4 @@
1
- import type { AssetsApi } from '#types/AssetsApi';
1
+ import type { AssetsApi } from '#src/types/AssetsApi';
2
2
  type UseAssetManagerResult = ReturnType<typeof useAssetsManager>;
3
3
  declare function useAssetsManager(): {
4
4
  api: AssetsApi;
@@ -1,5 +1,5 @@
1
- import type { UserApi } from '#types/UserApi';
2
- import type { UserItem } from '#types/UserItem';
1
+ import type { UserApi } from '#src/types/UserApi';
2
+ import type { UserItem } from '#src/types/UserItem';
3
3
  interface AuthProviderProps {
4
4
  userApi: UserApi;
5
5
  children?: React.ReactNode;
@@ -1,4 +1,4 @@
1
- import type { Item } from '#types/Item';
1
+ import type { Item } from '#src/types/Item';
2
2
  export declare const ItemForm: {
3
3
  ({ children, item, title, setPopupTitle, }: {
4
4
  children?: React.ReactNode;
@@ -1,4 +1,4 @@
1
- import type { Item } from '#types/Item';
1
+ import type { Item } from '#src/types/Item';
2
2
  export declare const ItemView: {
3
3
  ({ children, item }: {
4
4
  children?: React.ReactNode;
@@ -1,2 +1,2 @@
1
- import type { LayerProps } from '#types/LayerProps';
1
+ import type { LayerProps } from '#src/types/LayerProps';
2
2
  export declare const Layer: ({ data, children, name, menuIcon, menuText, menuColor, markerIcon, markerShape, markerDefaultColor, markerDefaultColor2, api, itemType, itemNameField, itemSubnameField, itemTextField, itemAvatarField, itemColorField, itemOwnerField, itemLatitudeField, itemLongitudeField, itemTagsField, itemOffersField, itemNeedsField, onlyOnePerOwner, customEditLink, customEditParameter, public_edit_items, listed, setItemFormPopup, itemFormPopup, clusterRef, }: LayerProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
- import type { ItemsApi } from '#types/ItemsApi';
2
- import type { Permission } from '#types/Permission';
1
+ import type { ItemsApi } from '#src/types/ItemsApi';
2
+ import type { Permission } from '#src/types/Permission';
3
3
  export declare function Permissions({ data, api, adminRole, }: {
4
4
  data?: Permission[];
5
5
  api?: ItemsApi<Permission>;
@@ -1,2 +1,2 @@
1
- import type { ItemFormPopupProps } from '#types/ItemFormPopupProps';
1
+ import type { ItemFormPopupProps } from '#src/types/ItemFormPopupProps';
2
2
  export declare function ItemFormPopup(props: ItemFormPopupProps): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
- import type { Item } from '#types/Item';
2
- import type { ItemsApi } from '#types/ItemsApi';
1
+ import type { Item } from '#src/types/Item';
2
+ import type { ItemsApi } from '#src/types/ItemsApi';
3
3
  export declare function HeaderView({ item, api, editCallback, deleteCallback, setPositionCallback, itemNameField, itemSubnameField, itemAvatarField, loading, hideMenu, big, truncateSubname, hideSubname, showAddress, }: {
4
4
  item: Item;
5
5
  api?: ItemsApi<any>;
@@ -1,4 +1,4 @@
1
- import type { Item } from '#types/Item';
1
+ import type { Item } from '#src/types/Item';
2
2
  export declare const PopupButton: ({ url, parameterField, text, colorField, item, }: {
3
3
  url: string;
4
4
  parameterField?: string;
@@ -1,4 +1,4 @@
1
- import type { Item } from '#types/Item';
1
+ import type { Item } from '#src/types/Item';
2
2
  export declare const PopupCheckboxInput: ({ dataField, label, item, }: {
3
3
  dataField: string;
4
4
  label: string;
@@ -1,4 +1,4 @@
1
- import type { Item } from '#types/Item';
1
+ import type { Item } from '#src/types/Item';
2
2
  interface StartEndInputProps {
3
3
  item?: Item;
4
4
  showLabels?: boolean;
@@ -1,4 +1,4 @@
1
- import type { Item } from '#types/Item';
1
+ import type { Item } from '#src/types/Item';
2
2
  export declare const PopupTextAreaInput: ({ dataField, placeholder, style, item, }: {
3
3
  dataField: string;
4
4
  placeholder: string;
@@ -1,4 +1,4 @@
1
- import type { Item } from '#types/Item';
1
+ import type { Item } from '#src/types/Item';
2
2
  export declare const PopupTextInput: ({ dataField, placeholder, style, item, }: {
3
3
  dataField: string;
4
4
  placeholder: string;
@@ -1,4 +1,4 @@
1
- import type { Item } from '#types/Item';
1
+ import type { Item } from '#src/types/Item';
2
2
  export declare const StartEndView: ({ item }: {
3
3
  item?: Item;
4
4
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import type { Item } from '#types/Item';
1
+ import type { Item } from '#src/types/Item';
2
2
  export declare const TextView: ({ item, truncate, itemTextField, rawText, }: {
3
3
  item?: Item;
4
4
  truncate?: boolean;
@@ -1,5 +1,5 @@
1
- import type { Item } from '#types/Item';
2
- import type { ItemFormPopupProps } from '#types/ItemFormPopupProps';
1
+ import type { Item } from '#src/types/Item';
2
+ import type { ItemFormPopupProps } from '#src/types/ItemFormPopupProps';
3
3
  export interface ItemViewPopupProps {
4
4
  item: Item;
5
5
  children?: React.ReactNode;
@@ -1,5 +1,5 @@
1
- import type { ItemsApi } from '#types/ItemsApi';
2
- import type { Tag } from '#types/Tag';
1
+ import type { ItemsApi } from '#src/types/ItemsApi';
2
+ import type { Tag } from '#src/types/Tag';
3
3
  export declare function Tags({ data, api }: {
4
4
  data?: Tag[];
5
5
  api?: ItemsApi<Tag>;
@@ -1,4 +1,4 @@
1
- import type { UtopiaMapProps } from '#types/UtopiaMapProps';
1
+ import type { UtopiaMapProps } from '#src/types/UtopiaMapProps';
2
2
  import 'react-toastify/dist/ReactToastify.css';
3
3
  declare function UtopiaMap({ height, width, center, zoom, children, geo, showFilterControl, showGratitudeControl, showLayerControl, infoText, }: UtopiaMapProps): import("react/jsx-runtime").JSX.Element;
4
4
  export { UtopiaMap };
@@ -1,4 +1,4 @@
1
1
  import 'leaflet/dist/leaflet.css';
2
2
  import './UtopiaMap.css';
3
- import type { UtopiaMapProps } from '#types/UtopiaMapProps';
3
+ import type { UtopiaMapProps } from '#src/types/UtopiaMapProps';
4
4
  export declare function UtopiaMapInner({ children, geo, showFilterControl, showGratitudeControl, showLayerControl, infoText, }: UtopiaMapProps): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
- import type { LayerProps } from '#types/LayerProps';
2
- import type { Tag } from '#types/Tag';
1
+ import type { LayerProps } from '#src/types/LayerProps';
2
+ import type { Tag } from '#src/types/Tag';
3
3
  type UseFilterManagerResult = ReturnType<typeof useFilterManager>;
4
4
  declare function useFilterManager(initialTags: Tag[]): {
5
5
  filterTags: Tag[];
@@ -1,5 +1,5 @@
1
- import type { Item } from '#types/Item';
2
- import type { LayerProps } from '#types/LayerProps';
1
+ import type { Item } from '#src/types/Item';
2
+ import type { LayerProps } from '#src/types/LayerProps';
3
3
  type UseItemManagerResult = ReturnType<typeof useItemsManager>;
4
4
  declare function useItemsManager(initialItems: Item[]): {
5
5
  items: Item[];
@@ -1,4 +1,4 @@
1
- import type { LayerProps } from '#types/LayerProps';
1
+ import type { LayerProps } from '#src/types/LayerProps';
2
2
  type UseItemManagerResult = ReturnType<typeof useLayerManager>;
3
3
  declare function useLayerManager(initialLayers: LayerProps[]): {
4
4
  layers: LayerProps[];
@@ -1,4 +1,4 @@
1
- import type { Item } from '#types/Item';
1
+ import type { Item } from '#src/types/Item';
2
2
  import type { Marker, Popup } from 'leaflet';
3
3
  interface LeafletRef {
4
4
  item: Item;
@@ -1,8 +1,8 @@
1
- import type { Item } from '#types/Item';
2
- import type { ItemsApi } from '#types/ItemsApi';
3
- import type { LayerProps } from '#types/LayerProps';
4
- import type { Permission } from '#types/Permission';
5
- import type { PermissionAction } from '#types/PermissionAction';
1
+ import type { Item } from '#src/types/Item';
2
+ import type { ItemsApi } from '#src/types/ItemsApi';
3
+ import type { LayerProps } from '#src/types/LayerProps';
4
+ import type { Permission } from '#src/types/Permission';
5
+ import type { PermissionAction } from '#src/types/PermissionAction';
6
6
  type UsePermissionManagerResult = ReturnType<typeof usePermissionsManager>;
7
7
  declare function usePermissionsManager(initialPermissions: Permission[]): {
8
8
  permissions: Permission[];
@@ -1,6 +1,6 @@
1
- import type { Item } from '#types/Item';
2
- import type { ItemFormPopupProps } from '#types/ItemFormPopupProps';
3
- import type { LayerProps } from '#types/LayerProps';
1
+ import type { Item } from '#src/types/Item';
2
+ import type { ItemFormPopupProps } from '#src/types/ItemFormPopupProps';
3
+ import type { LayerProps } from '#src/types/LayerProps';
4
4
  import type { LatLng } from 'leaflet';
5
5
  interface PolygonClickedProps {
6
6
  position: LatLng;
@@ -1,6 +1,6 @@
1
- import type { Item } from '#types/Item';
2
- import type { ItemsApi } from '#types/ItemsApi';
3
- import type { Tag } from '#types/Tag';
1
+ import type { Item } from '#src/types/Item';
2
+ import type { ItemsApi } from '#src/types/ItemsApi';
3
+ import type { Tag } from '#src/types/Tag';
4
4
  type UseTagManagerResult = ReturnType<typeof useTagsManager>;
5
5
  declare function useTagsManager(initialTags: Tag[]): {
6
6
  tags: Tag[];
@@ -1,4 +1,4 @@
1
- import type { ItemsApi } from '#types/ItemsApi';
1
+ import type { ItemsApi } from '#src/types/ItemsApi';
2
2
  export declare function ProfileView({ attestationApi }: {
3
3
  attestationApi?: ItemsApi<any>;
4
4
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import type { Item } from '#types/Item';
1
+ import type { Item } from '#src/types/Item';
2
2
  export declare function ActionButton({ item, triggerAddButton, triggerItemSelected, existingRelations, itemType, colorField, collection, customStyle, }: {
3
3
  triggerAddButton?: any;
4
4
  triggerItemSelected?: any;
@@ -1,4 +1,4 @@
1
- import type { FormState } from '#types/FormState';
1
+ import type { FormState } from '#src/types/FormState';
2
2
  export declare const ContactInfoForm: ({ state, setState, }: {
3
3
  state: FormState;
4
4
  setState: React.Dispatch<React.SetStateAction<any>>;
@@ -1,4 +1,4 @@
1
- import type { Item } from '#types/Item';
1
+ import type { Item } from '#src/types/Item';
2
2
  export declare const ContactInfoView: ({ item, heading }: {
3
3
  item: Item;
4
4
  heading: string;
@@ -1,6 +1,6 @@
1
1
  import 'yet-another-react-lightbox/styles.css';
2
2
  import 'react-photo-album/rows.css';
3
- import type { Item } from '#types/Item';
3
+ import type { Item } from '#src/types/Item';
4
4
  export declare const GalleryView: ({ item }: {
5
5
  item: Item;
6
6
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import type { Item } from '#types/Item';
1
+ import type { Item } from '#src/types/Item';
2
2
  export declare const GroupSubHeaderView: ({ item, shareBaseUrl, platforms, }: {
3
3
  item: Item;
4
4
  shareBaseUrl: string;
@@ -1,5 +1,5 @@
1
- import type { FormState } from '#types/FormState';
2
- import type { Item } from '#types/Item';
1
+ import type { FormState } from '#src/types/FormState';
2
+ import type { Item } from '#src/types/Item';
3
3
  interface groupType {
4
4
  groupTypes_id: {
5
5
  name: string;
@@ -1,4 +1,4 @@
1
- import type { Item } from '#types/Item';
1
+ import type { Item } from '#src/types/Item';
2
2
  export declare function LinkedItemsHeaderView({ item, unlinkCallback, itemNameField, itemAvatarField, loading, unlinkPermission, itemSubnameField, }: {
3
3
  item: Item;
4
4
  unlinkCallback?: any;
@@ -1,4 +1,4 @@
1
- import type { LayerProps } from '#types/LayerProps';
1
+ import type { LayerProps } from '#src/types/LayerProps';
2
2
  export declare function PlusButton({ layer, triggerAction, color, collection, }: {
3
3
  layer?: LayerProps;
4
4
  triggerAction: any;
@@ -1,4 +1,4 @@
1
- import type { Item } from '#types/Item';
1
+ import type { Item } from '#src/types/Item';
2
2
  export declare const ProfileStartEndForm: ({ item, setState, }: {
3
3
  item: Item;
4
4
  setState: React.Dispatch<React.SetStateAction<any>>;
@@ -1,4 +1,4 @@
1
- import type { Item } from '#types/Item';
1
+ import type { Item } from '#src/types/Item';
2
2
  export declare const ProfileStartEndView: ({ item }: {
3
3
  item: Item;
4
4
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import type { FormState } from '#types/FormState';
1
+ import type { FormState } from '#src/types/FormState';
2
2
  export declare const ProfileTextForm: ({ state, setState, dataField, heading, size, hideInputLabel, required, }: {
3
3
  state: FormState;
4
4
  setState: React.Dispatch<React.SetStateAction<any>>;
@@ -1,4 +1,4 @@
1
- import type { Item } from '#types/Item';
1
+ import type { Item } from '#src/types/Item';
2
2
  export declare const ProfileTextView: ({ item, dataField, heading, hideWhenEmpty, }: {
3
3
  item: Item;
4
4
  dataField: string;
@@ -1,5 +1,5 @@
1
- import type { FormState } from '#types/FormState';
2
- import type { Item } from '#types/Item';
1
+ import type { FormState } from '#src/types/FormState';
2
+ import type { Item } from '#src/types/Item';
3
3
  export declare const FlexForm: ({ item, state, setState, }: {
4
4
  state: FormState;
5
5
  setState: React.Dispatch<React.SetStateAction<any>>;
@@ -1,4 +1,4 @@
1
- import type { Item } from '#types/Item';
1
+ import type { Item } from '#src/types/Item';
2
2
  export declare const FlexView: ({ item }: {
3
3
  item: Item;
4
4
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
- import type { FormState } from '#types/FormState';
2
- import type { Item } from '#types/Item';
1
+ import type { FormState } from '#src/types/FormState';
2
+ import type { Item } from '#src/types/Item';
3
3
  export declare const OnepagerForm: ({ item, state, setState, }: {
4
4
  state: FormState;
5
5
  setState: React.Dispatch<React.SetStateAction<any>>;
@@ -1,4 +1,4 @@
1
- import type { Item } from '#types/Item';
1
+ import type { Item } from '#src/types/Item';
2
2
  export declare const OnepagerView: ({ item }: {
3
3
  item: Item;
4
4
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import type { Item } from '#types/Item';
1
+ import type { Item } from '#src/types/Item';
2
2
  export declare const SimpleView: ({ item }: {
3
3
  item: Item;
4
4
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
- import type { Item } from '#types/Item';
2
- import type { Tag } from '#types/Tag';
1
+ import type { Item } from '#src/types/Item';
2
+ import type { Tag } from '#src/types/Tag';
3
3
  export declare const TabsView: ({ attestations, item, offers, needs, relations, updatePermission, loading, linkItem, unlinkItem, }: {
4
4
  attestations: any[];
5
5
  item: Item;
@@ -1,4 +1,4 @@
1
- import type { ItemsApi } from '#types/ItemsApi';
1
+ import type { ItemsApi } from '#src/types/ItemsApi';
2
2
  export declare const AttestationForm: ({ api }: {
3
3
  api?: ItemsApi<unknown>;
4
4
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import type { Item } from '#types/Item';
1
+ import type { Item } from '#src/types/Item';
2
2
  export declare const DateUserInfo: ({ item }: {
3
3
  item: Item;
4
4
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import type { Item } from '#types/Item';
1
+ import type { Item } from '#src/types/Item';
2
2
  export declare const ItemCard: ({ i, loading, url, parameterField, deleteCallback, }: {
3
3
  i: Item;
4
4
  loading: boolean;
@@ -1,4 +1,4 @@
1
- import type { Tag } from '#types/Tag';
1
+ import type { Tag } from '#src/types/Tag';
2
2
  export declare const TagView: ({ tag, heighlight, onClick, count, }: {
3
3
  tag: Tag;
4
4
  heighlight?: boolean;
@@ -6,6 +6,7 @@ export { UserSettings, ProfileView, ProfileForm } from './Components/Profile';
6
6
  export { Quests, Modal } from './Components/Gaming';
7
7
  export { TitleCard, CardPage, MapOverlayPage, OverlayItemsIndexPage, MoonCalendar, SelectUser, AttestationForm, MarketView, } from './Components/Templates';
8
8
  export { TextInput, TextAreaInput, SelectBox } from './Components/Input';
9
+ export * from './types';
9
10
  declare global {
10
11
  interface Window {
11
12
  my_modal_3: {
@@ -0,0 +1,9 @@
1
+ export type { ItemsApi } from './ItemsApi';
2
+ export type { Tag } from './Tag';
3
+ export type { Item } from './Item';
4
+ export type { Permission } from './Permission';
5
+ export type { LayerProps } from './LayerProps';
6
+ export type { UserApi } from './UserApi';
7
+ export type { UserItem } from './UserItem';
8
+ export type { UtopiaMapProps } from './UtopiaMapProps';
9
+ export type { AssetsApi } from './AssetsApi';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "utopia-ui",
3
- "version": "3.0.57",
3
+ "version": "3.0.58",
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/",
@@ -33,6 +33,7 @@
33
33
  "devDependencies": {
34
34
  "@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
35
35
  "@rollup/plugin-alias": "^5.1.1",
36
+ "@rollup/plugin-node-resolve": "^16.0.0",
36
37
  "@rollup/plugin-typescript": "^12.1.2",
37
38
  "@testing-library/jest-dom": "^6.6.3",
38
39
  "@testing-library/react": "^16.2.0",