utopia-ui 3.0.88 → 3.0.91

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 CHANGED
@@ -1,10 +1,10 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { GeoJsonObject, Geometry, Point } from 'geojson';
3
3
  export { Point } from 'geojson';
4
- import { LatLng } from 'leaflet';
5
- export { Popup } from 'leaflet';
4
+ import * as react from 'react';
6
5
  import { Key } from 'react';
7
6
  export { default as SVG } from 'react-inlinesvg';
7
+ export { Popup } from 'leaflet';
8
8
 
9
9
  /**
10
10
  * This component creates the map.
@@ -40,7 +40,7 @@ export { default as SVG } from 'react-inlinesvg';
40
40
  * ```
41
41
  * @category Map
42
42
  */
43
- declare function UtopiaMap({ height, width, center, zoom, children, geo, showFilterControl, showGratitudeControl, showLayerControl, showThemeControl, defaultTheme, donationWidget, }: {
43
+ declare function UtopiaMap({ height, width, center, zoom, children, geo, showFilterControl, showGratitudeControl, showLayerControl, showZoomControl, showThemeControl, defaultTheme, donationWidget, }: {
44
44
  /** height of the map (default '500px') */
45
45
  height?: string;
46
46
  /** width of the map (default '100%') */
@@ -59,6 +59,8 @@ declare function UtopiaMap({ height, width, center, zoom, children, geo, showFil
59
59
  showLayerControl?: boolean;
60
60
  /** show the layer control widget (default true) */
61
61
  showGratitudeControl?: boolean;
62
+ /** show zoom control widget (default false) */
63
+ showZoomControl?: boolean;
62
64
  /** show a widget to switch the theme */
63
65
  showThemeControl?: boolean;
64
66
  /** the defaut theme */
@@ -182,14 +184,6 @@ interface Item {
182
184
  } */
183
185
  }
184
186
 
185
- interface ItemFormPopupProps {
186
- position: LatLng
187
- layer: LayerProps
188
- item?: Item
189
- children?: React.ReactNode
190
- setItemFormPopup?: React.Dispatch<React.SetStateAction<ItemFormPopupProps | null>>
191
- }
192
-
193
187
  interface ItemType {
194
188
  name: string
195
189
  show_name_input: boolean
@@ -231,10 +225,6 @@ interface LayerProps {
231
225
  public_edit_items?: boolean
232
226
  listed?: boolean
233
227
  item_presets?: Record<string, unknown>
234
- setItemFormPopup?: React.Dispatch<React.SetStateAction<ItemFormPopupProps | null>>
235
- itemFormPopup?: ItemFormPopupProps | null
236
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
237
- clusterRef?: any
238
228
  }
239
229
 
240
230
  /**
@@ -281,7 +271,7 @@ interface Tag {
281
271
  /**
282
272
  * @category Map
283
273
  */
284
- declare const Layer: ({ data, children, name, menuIcon, menuText, menuColor, markerIcon, markerShape, markerDefaultColor, markerDefaultColor2, api, itemType, userProfileLayer, customEditLink, customEditParameter, public_edit_items, listed, setItemFormPopup, itemFormPopup, clusterRef, }: LayerProps) => react_jsx_runtime.JSX.Element;
274
+ declare const Layer: ({ data, children, name, menuIcon, menuText, menuColor, markerIcon, markerShape, markerDefaultColor, markerDefaultColor2, api, itemType, userProfileLayer, customEditLink, customEditParameter, public_edit_items, listed, }: LayerProps) => react_jsx_runtime.JSX.Element;
285
275
 
286
276
  /**
287
277
  * This Components injects Tags comming from an {@link ItemsApi | `API`}
@@ -372,99 +362,6 @@ declare function Permissions({ data, api, adminRole, }: {
372
362
  adminRole?: string;
373
363
  }): react_jsx_runtime.JSX.Element;
374
364
 
375
- /**
376
- * @category Map
377
- */
378
- declare const ItemForm: {
379
- ({ children, item, title, setPopupTitle, }: {
380
- children?: React.ReactNode;
381
- item?: Item;
382
- title?: string;
383
- setPopupTitle?: React.Dispatch<React.SetStateAction<string>>;
384
- }): react_jsx_runtime.JSX.Element;
385
- __TYPE: string;
386
- };
387
-
388
- /**
389
- * @category Map
390
- */
391
- declare const ItemView: {
392
- ({ children, item }: {
393
- children?: React.ReactNode;
394
- item?: Item;
395
- }): react_jsx_runtime.JSX.Element;
396
- __TYPE: string;
397
- };
398
-
399
- /**
400
- * @category Map
401
- */
402
- declare const PopupTextAreaInput: ({ dataField, placeholder, style, item, }: {
403
- dataField: string;
404
- placeholder: string;
405
- style?: string;
406
- item?: Item;
407
- }) => react_jsx_runtime.JSX.Element;
408
-
409
- interface StartEndInputProps {
410
- item?: Item;
411
- showLabels?: boolean;
412
- updateStartValue?: (value: string) => void;
413
- updateEndValue?: (value: string) => void;
414
- }
415
- /**
416
- * @category Map
417
- */
418
- declare const PopupStartEndInput: ({ item, showLabels, updateStartValue, updateEndValue, }: StartEndInputProps) => react_jsx_runtime.JSX.Element;
419
-
420
- /**
421
- * @category Map
422
- */
423
- declare const PopupTextInput: ({ dataField, placeholder, style, item, }: {
424
- dataField: string;
425
- placeholder: string;
426
- style?: string;
427
- item?: Item;
428
- }) => react_jsx_runtime.JSX.Element;
429
-
430
- /**
431
- * @category Map
432
- */
433
- declare const PopupCheckboxInput: ({ dataField, label, item, }: {
434
- dataField: string;
435
- label: string;
436
- item?: Item;
437
- }) => react_jsx_runtime.JSX.Element;
438
-
439
- /**
440
- * @category Map
441
- */
442
- declare const TextView: ({ item, itemId, text, truncate, rawText, itemTextField, }: {
443
- item?: Item;
444
- itemId?: string;
445
- text?: string;
446
- truncate?: boolean;
447
- rawText?: string;
448
- itemTextField?: string;
449
- }) => react_jsx_runtime.JSX.Element;
450
-
451
- /**
452
- * @category Map
453
- */
454
- declare const StartEndView: ({ item }: {
455
- item?: Item;
456
- }) => react_jsx_runtime.JSX.Element;
457
-
458
- /**
459
- * @category Map
460
- */
461
- declare const PopupButton: ({ url, parameterField, text, item, }: {
462
- url: string;
463
- parameterField?: string;
464
- text: string;
465
- item?: Item;
466
- }) => react_jsx_runtime.JSX.Element;
467
-
468
365
  /**
469
366
  * @category Types
470
367
  */
@@ -680,6 +577,63 @@ interface InputTextProps {
680
577
  */
681
578
  declare function TextInput({ labelTitle, labelStyle, type, dataField, containerStyle, inputStyle, defaultValue, placeholder, autocomplete, pattern, required, updateFormValue, }: InputTextProps): react_jsx_runtime.JSX.Element;
682
579
 
580
+ interface StartEndInputProps {
581
+ item?: Item;
582
+ showLabels?: boolean;
583
+ updateStartValue?: (value: string) => void;
584
+ updateEndValue?: (value: string) => void;
585
+ }
586
+
587
+ /**
588
+ * @category Item
589
+ */
590
+ declare const PopupForm: ({ children }: {
591
+ children?: React.ReactNode;
592
+ }) => react_jsx_runtime.JSX.Element;
593
+
594
+ /**
595
+ * @category Item
596
+ */
597
+ declare const PopupView: ({ children }: {
598
+ children?: React.ReactNode;
599
+ }) => (react_jsx_runtime.JSX.Element | null)[];
600
+
601
+ declare const TextView: react.ComponentType<Omit<{
602
+ item?: Item;
603
+ itemId?: string;
604
+ text?: string;
605
+ truncate?: boolean;
606
+ rawText?: string;
607
+ itemTextField?: string;
608
+ }, "item">>;
609
+ declare const StartEndView: react.ComponentType<Omit<{
610
+ item?: Item;
611
+ }, "item">>;
612
+ declare const PopupTextInput: react.ComponentType<Omit<{
613
+ dataField: string;
614
+ placeholder: string;
615
+ style?: string;
616
+ item?: Item;
617
+ }, "item">>;
618
+ declare const PopupButton: react.ComponentType<Omit<{
619
+ url: string;
620
+ parameterField?: string;
621
+ text: string;
622
+ item?: Item;
623
+ }, "item">>;
624
+ declare const PopupCheckboxInput: react.ComponentType<Omit<{
625
+ dataField: string;
626
+ label: string;
627
+ item?: Item;
628
+ }, "item">>;
629
+ declare const PopupTextAreaInput: react.ComponentType<Omit<{
630
+ dataField: string;
631
+ placeholder: string;
632
+ style?: string;
633
+ item?: Item;
634
+ }, "item">>;
635
+ declare const PopupStartEndInput: react.ComponentType<Omit<StartEndInputProps, "item">>;
636
+
683
637
  declare global {
684
638
  interface Window {
685
639
  my_modal_3: {
@@ -688,4 +642,4 @@ declare global {
688
642
  }
689
643
  }
690
644
 
691
- export { AppShell, type AssetsApi, AttestationForm, AuthProvider, CardPage, Content, type Item, ItemForm, ItemView, type ItemsApi, Layer, type LayerProps, LoginPage, MapOverlayPage, MarketView, Modal, OverlayItemsIndexPage, type Permission, Permissions, PopupButton, PopupCheckboxInput, PopupStartEndInput, PopupTextAreaInput, PopupTextInput, ProfileForm, ProfileView, Quests, RequestPasswordPage, SelectUser, SetNewPasswordPage, SideBar, SignupPage, StartEndView, type Tag, Tags, TextAreaInput, TextInput, TextView, TitleCard, type UserApi, type UserItem, UserSettings, UtopiaMap };
645
+ export { AppShell, type AssetsApi, AttestationForm, AuthProvider, CardPage, Content, type Item, type ItemsApi, Layer, type LayerProps, LoginPage, MapOverlayPage, MarketView, Modal, OverlayItemsIndexPage, type Permission, Permissions, PopupButton, PopupCheckboxInput, PopupForm, PopupStartEndInput, PopupTextAreaInput, PopupTextInput, PopupView, ProfileForm, ProfileView, Quests, RequestPasswordPage, SelectUser, SetNewPasswordPage, SideBar, SignupPage, StartEndView, type Tag, Tags, TextAreaInput, TextInput, TextView, TitleCard, type UserApi, type UserItem, UserSettings, UtopiaMap };