utopia-ui 3.0.51 → 3.0.52
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/index.d.ts +208 -0
- package/dist/index.js +20 -5
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
- package/dist/types.d.ts +0 -337
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "utopia-ui",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.52",
|
|
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/",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"prettier": "^3.3.3",
|
|
57
57
|
"react": "^18.3.1",
|
|
58
58
|
"react-dom": "^18.3.1",
|
|
59
|
-
"rollup": "^
|
|
59
|
+
"rollup": "^4.34.6",
|
|
60
60
|
"rollup-plugin-postcss": "^4.0.2",
|
|
61
61
|
"rollup-plugin-typescript2": "^0.32.1",
|
|
62
62
|
"tailwindcss": "^3.3.1",
|
|
@@ -89,6 +89,7 @@
|
|
|
89
89
|
"react-string-replace": "^1.1.1",
|
|
90
90
|
"react-toastify": "^9.1.3",
|
|
91
91
|
"remark-breaks": "^4.0.0",
|
|
92
|
+
"rollup-plugin-dts": "^6.1.1",
|
|
92
93
|
"tw-elements": "^1.0.0",
|
|
93
94
|
"yet-another-react-lightbox": "^3.21.7"
|
|
94
95
|
},
|
package/dist/types.d.ts
DELETED
|
@@ -1,337 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
import { LatLng } from 'leaflet';
|
|
4
|
-
|
|
5
|
-
export interface Tag {
|
|
6
|
-
|
|
7
|
-
color: string;
|
|
8
|
-
|
|
9
|
-
id: string;
|
|
10
|
-
|
|
11
|
-
name: string;
|
|
12
|
-
|
|
13
|
-
offer_or_need?: boolean;
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export interface UtopiaMapProps {
|
|
18
|
-
|
|
19
|
-
height?: string;
|
|
20
|
-
|
|
21
|
-
width?: string;
|
|
22
|
-
|
|
23
|
-
center?: [number, number];
|
|
24
|
-
|
|
25
|
-
zoom?: number;
|
|
26
|
-
|
|
27
|
-
tags?: Tag[];
|
|
28
|
-
|
|
29
|
-
children?: React.ReactNode;
|
|
30
|
-
|
|
31
|
-
geo?: any;
|
|
32
|
-
|
|
33
|
-
showFilterControl?: boolean;
|
|
34
|
-
|
|
35
|
-
showLayerControl?: boolean;
|
|
36
|
-
|
|
37
|
-
showGratitudeControl?: boolean;
|
|
38
|
-
|
|
39
|
-
infoText?: string;
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export interface ItemType {
|
|
44
|
-
|
|
45
|
-
name: string;
|
|
46
|
-
|
|
47
|
-
[key: string]: any;
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export interface ItemsApi<T> {
|
|
52
|
-
|
|
53
|
-
getItems(): Promise<any>;
|
|
54
|
-
|
|
55
|
-
getItem?(id: string): Promise<any>;
|
|
56
|
-
|
|
57
|
-
createItem?(item: T): Promise<any>;
|
|
58
|
-
|
|
59
|
-
updateItem?(item: T): Promise<any>;
|
|
60
|
-
|
|
61
|
-
deleteItem?(id: string): Promise<any>;
|
|
62
|
-
|
|
63
|
-
collectionName?: string;
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export interface LayerProps {
|
|
68
|
-
|
|
69
|
-
id?: string;
|
|
70
|
-
|
|
71
|
-
data?: Item[];
|
|
72
|
-
|
|
73
|
-
children?: React.ReactNode;
|
|
74
|
-
|
|
75
|
-
name: string;
|
|
76
|
-
|
|
77
|
-
menuIcon: any;
|
|
78
|
-
|
|
79
|
-
menuColor: string;
|
|
80
|
-
|
|
81
|
-
menuText: string;
|
|
82
|
-
|
|
83
|
-
markerIcon: string;
|
|
84
|
-
|
|
85
|
-
markerShape: string;
|
|
86
|
-
|
|
87
|
-
markerDefaultColor: string;
|
|
88
|
-
|
|
89
|
-
markerDefaultColor2?: string;
|
|
90
|
-
|
|
91
|
-
api?: ItemsApi<any>;
|
|
92
|
-
|
|
93
|
-
itemType: ItemType;
|
|
94
|
-
|
|
95
|
-
itemNameField?: string;
|
|
96
|
-
|
|
97
|
-
itemSubnameField?: string;
|
|
98
|
-
|
|
99
|
-
itemTextField?: string;
|
|
100
|
-
|
|
101
|
-
itemAvatarField?: string;
|
|
102
|
-
|
|
103
|
-
itemColorField?: string;
|
|
104
|
-
|
|
105
|
-
itemOwnerField?: string;
|
|
106
|
-
|
|
107
|
-
itemTagsField?: string;
|
|
108
|
-
|
|
109
|
-
itemLatitudeField?: any;
|
|
110
|
-
|
|
111
|
-
itemLongitudeField?: any;
|
|
112
|
-
|
|
113
|
-
itemOffersField?: string;
|
|
114
|
-
|
|
115
|
-
itemNeedsField?: string;
|
|
116
|
-
|
|
117
|
-
onlyOnePerOwner?: boolean;
|
|
118
|
-
|
|
119
|
-
customEditLink?: string;
|
|
120
|
-
|
|
121
|
-
customEditParameter?: string;
|
|
122
|
-
|
|
123
|
-
public_edit_items?: boolean;
|
|
124
|
-
|
|
125
|
-
listed?: boolean;
|
|
126
|
-
|
|
127
|
-
item_presets?: Record<string, unknown>;
|
|
128
|
-
|
|
129
|
-
setItemFormPopup?: React.Dispatch<React.SetStateAction<ItemFormPopupProps | null>>;
|
|
130
|
-
|
|
131
|
-
itemFormPopup?: ItemFormPopupProps | null;
|
|
132
|
-
|
|
133
|
-
clusterRef?: any;
|
|
134
|
-
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
export declare class Geometry {
|
|
138
|
-
|
|
139
|
-
type: string;
|
|
140
|
-
|
|
141
|
-
coordinates: number[];
|
|
142
|
-
|
|
143
|
-
constructor(lng: number, lat: number);
|
|
144
|
-
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
export interface Relation {
|
|
148
|
-
|
|
149
|
-
related_items_id: string;
|
|
150
|
-
|
|
151
|
-
[key: string]: any;
|
|
152
|
-
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
export declare class Item {
|
|
156
|
-
|
|
157
|
-
id: string;
|
|
158
|
-
|
|
159
|
-
name: string;
|
|
160
|
-
|
|
161
|
-
text: string;
|
|
162
|
-
|
|
163
|
-
position?: Geometry;
|
|
164
|
-
|
|
165
|
-
date_created?: string;
|
|
166
|
-
|
|
167
|
-
date_updated?: string | null;
|
|
168
|
-
|
|
169
|
-
start?: string;
|
|
170
|
-
|
|
171
|
-
end?: string;
|
|
172
|
-
|
|
173
|
-
api?: ItemsApi<any>;
|
|
174
|
-
|
|
175
|
-
tags?: string[];
|
|
176
|
-
|
|
177
|
-
layer?: LayerProps;
|
|
178
|
-
|
|
179
|
-
relations?: Relation[];
|
|
180
|
-
|
|
181
|
-
parent?: string;
|
|
182
|
-
|
|
183
|
-
subname?: string;
|
|
184
|
-
|
|
185
|
-
public_edit?: boolean;
|
|
186
|
-
|
|
187
|
-
slug?: string;
|
|
188
|
-
|
|
189
|
-
[key: string]: any;
|
|
190
|
-
|
|
191
|
-
constructor(id: string, name: string, text: string, position: Geometry, layer?: LayerProps, api?: ItemsApi<any>);
|
|
192
|
-
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
export interface AssetsApi {
|
|
196
|
-
|
|
197
|
-
upload(file: Blob, title: string): any;
|
|
198
|
-
|
|
199
|
-
url: string;
|
|
200
|
-
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
export interface Profile {
|
|
204
|
-
|
|
205
|
-
id?: string;
|
|
206
|
-
|
|
207
|
-
avatar?: string;
|
|
208
|
-
|
|
209
|
-
color?: string;
|
|
210
|
-
|
|
211
|
-
name: string;
|
|
212
|
-
|
|
213
|
-
text: string;
|
|
214
|
-
|
|
215
|
-
geoposition?: Geometry;
|
|
216
|
-
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
export interface UserItem {
|
|
220
|
-
|
|
221
|
-
id?: string;
|
|
222
|
-
|
|
223
|
-
role?: any;
|
|
224
|
-
|
|
225
|
-
email?: string;
|
|
226
|
-
|
|
227
|
-
password?: string;
|
|
228
|
-
|
|
229
|
-
profile?: Profile;
|
|
230
|
-
|
|
231
|
-
[key: string]: any;
|
|
232
|
-
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
export interface UserApi {
|
|
236
|
-
|
|
237
|
-
register(email: string, password: string, userName: string): Promise<void>;
|
|
238
|
-
|
|
239
|
-
login(email: string, password: string): Promise<any>;
|
|
240
|
-
|
|
241
|
-
logout(): Promise<void>;
|
|
242
|
-
|
|
243
|
-
getUser(): Promise<UserItem>;
|
|
244
|
-
|
|
245
|
-
getToken(): Promise<any>;
|
|
246
|
-
|
|
247
|
-
updateUser(user: UserItem): Promise<void>;
|
|
248
|
-
|
|
249
|
-
requestPasswordReset(email: string, reset_url?: string): any;
|
|
250
|
-
|
|
251
|
-
passwordReset(token: string, new_password: string): any;
|
|
252
|
-
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
export interface PermissionCondition {
|
|
256
|
-
|
|
257
|
-
user_created?: {
|
|
258
|
-
|
|
259
|
-
_eq: string;
|
|
260
|
-
|
|
261
|
-
};
|
|
262
|
-
|
|
263
|
-
public_edit?: {
|
|
264
|
-
|
|
265
|
-
_eq: boolean;
|
|
266
|
-
|
|
267
|
-
};
|
|
268
|
-
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
export declare type PermissionAction = 'create' | 'read' | 'update' | 'delete';
|
|
272
|
-
|
|
273
|
-
export interface Permission {
|
|
274
|
-
|
|
275
|
-
id?: string;
|
|
276
|
-
|
|
277
|
-
policy: any;
|
|
278
|
-
|
|
279
|
-
collection: string;
|
|
280
|
-
|
|
281
|
-
action: PermissionAction;
|
|
282
|
-
|
|
283
|
-
permissions?: {
|
|
284
|
-
|
|
285
|
-
_and: PermissionCondition[];
|
|
286
|
-
|
|
287
|
-
};
|
|
288
|
-
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
export interface ItemFormPopupProps {
|
|
292
|
-
|
|
293
|
-
position: LatLng;
|
|
294
|
-
|
|
295
|
-
layer: LayerProps;
|
|
296
|
-
|
|
297
|
-
item?: Item;
|
|
298
|
-
|
|
299
|
-
children?: React.ReactNode;
|
|
300
|
-
|
|
301
|
-
setItemFormPopup?: React.Dispatch<React.SetStateAction<ItemFormPopupProps | null>>;
|
|
302
|
-
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
export interface FormState {
|
|
306
|
-
|
|
307
|
-
color: string;
|
|
308
|
-
|
|
309
|
-
id: string;
|
|
310
|
-
|
|
311
|
-
group_type: string;
|
|
312
|
-
|
|
313
|
-
status: string;
|
|
314
|
-
|
|
315
|
-
name: string;
|
|
316
|
-
|
|
317
|
-
subname: string;
|
|
318
|
-
|
|
319
|
-
text: string;
|
|
320
|
-
|
|
321
|
-
contact: string;
|
|
322
|
-
|
|
323
|
-
telephone: string;
|
|
324
|
-
|
|
325
|
-
next_appointment: string;
|
|
326
|
-
|
|
327
|
-
image: string;
|
|
328
|
-
|
|
329
|
-
marker_icon: string;
|
|
330
|
-
|
|
331
|
-
offers: Tag[];
|
|
332
|
-
|
|
333
|
-
needs: Tag[];
|
|
334
|
-
|
|
335
|
-
relations: Item[];
|
|
336
|
-
|
|
337
|
-
}
|