utopia-ui 3.0.84 → 3.0.86

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 * as react from 'react';
4
+ import { LatLng } from 'leaflet';
5
+ export { Popup } from 'leaflet';
5
6
  import { Key } from 'react';
6
7
  export { default as SVG } from 'react-inlinesvg';
7
- export { Popup } from 'leaflet';
8
8
 
9
9
  /**
10
10
  * This component creates the map.
@@ -177,6 +177,14 @@ interface Item {
177
177
  } */
178
178
  }
179
179
 
180
+ interface ItemFormPopupProps {
181
+ position: LatLng
182
+ layer: LayerProps
183
+ item?: Item
184
+ children?: React.ReactNode
185
+ setItemFormPopup?: React.Dispatch<React.SetStateAction<ItemFormPopupProps | null>>
186
+ }
187
+
180
188
  interface ItemType {
181
189
  name: string
182
190
  show_name_input: boolean
@@ -218,6 +226,10 @@ interface LayerProps {
218
226
  public_edit_items?: boolean
219
227
  listed?: boolean
220
228
  item_presets?: Record<string, unknown>
229
+ setItemFormPopup?: React.Dispatch<React.SetStateAction<ItemFormPopupProps | null>>
230
+ itemFormPopup?: ItemFormPopupProps | null
231
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
232
+ clusterRef?: any
221
233
  }
222
234
 
223
235
  /**
@@ -264,7 +276,7 @@ interface Tag {
264
276
  /**
265
277
  * @category Map
266
278
  */
267
- 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;
279
+ 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;
268
280
 
269
281
  /**
270
282
  * This Components injects Tags comming from an {@link ItemsApi | `API`}
@@ -355,6 +367,99 @@ declare function Permissions({ data, api, adminRole, }: {
355
367
  adminRole?: string;
356
368
  }): react_jsx_runtime.JSX.Element;
357
369
 
370
+ /**
371
+ * @category Map
372
+ */
373
+ declare const ItemForm: {
374
+ ({ children, item, title, setPopupTitle, }: {
375
+ children?: React.ReactNode;
376
+ item?: Item;
377
+ title?: string;
378
+ setPopupTitle?: React.Dispatch<React.SetStateAction<string>>;
379
+ }): react_jsx_runtime.JSX.Element;
380
+ __TYPE: string;
381
+ };
382
+
383
+ /**
384
+ * @category Map
385
+ */
386
+ declare const ItemView: {
387
+ ({ children, item }: {
388
+ children?: React.ReactNode;
389
+ item?: Item;
390
+ }): react_jsx_runtime.JSX.Element;
391
+ __TYPE: string;
392
+ };
393
+
394
+ /**
395
+ * @category Map
396
+ */
397
+ declare const PopupTextAreaInput: ({ dataField, placeholder, style, item, }: {
398
+ dataField: string;
399
+ placeholder: string;
400
+ style?: string;
401
+ item?: Item;
402
+ }) => react_jsx_runtime.JSX.Element;
403
+
404
+ interface StartEndInputProps {
405
+ item?: Item;
406
+ showLabels?: boolean;
407
+ updateStartValue?: (value: string) => void;
408
+ updateEndValue?: (value: string) => void;
409
+ }
410
+ /**
411
+ * @category Map
412
+ */
413
+ declare const PopupStartEndInput: ({ item, showLabels, updateStartValue, updateEndValue, }: StartEndInputProps) => react_jsx_runtime.JSX.Element;
414
+
415
+ /**
416
+ * @category Map
417
+ */
418
+ declare const PopupTextInput: ({ dataField, placeholder, style, item, }: {
419
+ dataField: string;
420
+ placeholder: string;
421
+ style?: string;
422
+ item?: Item;
423
+ }) => react_jsx_runtime.JSX.Element;
424
+
425
+ /**
426
+ * @category Map
427
+ */
428
+ declare const PopupCheckboxInput: ({ dataField, label, item, }: {
429
+ dataField: string;
430
+ label: string;
431
+ item?: Item;
432
+ }) => react_jsx_runtime.JSX.Element;
433
+
434
+ /**
435
+ * @category Map
436
+ */
437
+ declare const TextView: ({ item, itemId, text, truncate, rawText, itemTextField, }: {
438
+ item?: Item;
439
+ itemId?: string;
440
+ text?: string;
441
+ truncate?: boolean;
442
+ rawText?: string;
443
+ itemTextField?: string;
444
+ }) => react_jsx_runtime.JSX.Element;
445
+
446
+ /**
447
+ * @category Map
448
+ */
449
+ declare const StartEndView: ({ item }: {
450
+ item?: Item;
451
+ }) => react_jsx_runtime.JSX.Element;
452
+
453
+ /**
454
+ * @category Map
455
+ */
456
+ declare const PopupButton: ({ url, parameterField, text, item, }: {
457
+ url: string;
458
+ parameterField?: string;
459
+ text: string;
460
+ item?: Item;
461
+ }) => react_jsx_runtime.JSX.Element;
462
+
358
463
  /**
359
464
  * @category Types
360
465
  */
@@ -570,63 +675,6 @@ interface InputTextProps {
570
675
  */
571
676
  declare function TextInput({ labelTitle, labelStyle, type, dataField, containerStyle, inputStyle, defaultValue, placeholder, autocomplete, pattern, required, updateFormValue, }: InputTextProps): react_jsx_runtime.JSX.Element;
572
677
 
573
- interface StartEndInputProps {
574
- item?: Item;
575
- showLabels?: boolean;
576
- updateStartValue?: (value: string) => void;
577
- updateEndValue?: (value: string) => void;
578
- }
579
-
580
- /**
581
- * @category Item
582
- */
583
- declare const PopupForm: ({ children }: {
584
- children?: React.ReactNode;
585
- }) => react_jsx_runtime.JSX.Element;
586
-
587
- /**
588
- * @category Item
589
- */
590
- declare const PopupView: ({ children }: {
591
- children?: React.ReactNode;
592
- }) => (react_jsx_runtime.JSX.Element | null)[];
593
-
594
- declare const TextView: react.ComponentType<Omit<{
595
- item?: Item;
596
- itemId?: string;
597
- text?: string;
598
- truncate?: boolean;
599
- rawText?: string;
600
- itemTextField?: string;
601
- }, "item">>;
602
- declare const StartEndView: react.ComponentType<Omit<{
603
- item?: Item;
604
- }, "item">>;
605
- declare const PopupTextInput: react.ComponentType<Omit<{
606
- dataField: string;
607
- placeholder: string;
608
- style?: string;
609
- item?: Item;
610
- }, "item">>;
611
- declare const PopupButton: react.ComponentType<Omit<{
612
- url: string;
613
- parameterField?: string;
614
- text: string;
615
- item?: Item;
616
- }, "item">>;
617
- declare const PopupCheckboxInput: react.ComponentType<Omit<{
618
- dataField: string;
619
- label: string;
620
- item?: Item;
621
- }, "item">>;
622
- declare const PopupTextAreaInput: react.ComponentType<Omit<{
623
- dataField: string;
624
- placeholder: string;
625
- style?: string;
626
- item?: Item;
627
- }, "item">>;
628
- declare const PopupStartEndInput: react.ComponentType<Omit<StartEndInputProps, "item">>;
629
-
630
678
  declare global {
631
679
  interface Window {
632
680
  my_modal_3: {
@@ -635,4 +683,4 @@ declare global {
635
683
  }
636
684
  }
637
685
 
638
- 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 };
686
+ 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 };
package/dist/index.esm.js CHANGED
@@ -72,10 +72,10 @@ styleInject(css_248z$4);
72
72
  var css_248z$3 = ".fade {\n mask-image: linear-gradient(180deg, transparent, #000 1%, #000 99%, transparent);\n}\n\n.placeholder-center::placeholder {\n text-align: center;\n}\n\ninput {\n box-sizing: border-box;\n}\n\ntextarea {\n box-sizing: border-box;\n}\n\n.crosshair-cursor-enabled {\n cursor: crosshair;\n}\n\n.marker-cluster span {\n color: #000;\n}";
73
73
  styleInject(css_248z$3);
74
74
 
75
- var css_248z$2 = ".calendar-icon {\n position: relative;\n top: -35px;\n left: 10px;\n width: 13px;\n}\n\n.user-icon {\n position: relative;\n top: -36px;\n left: 10px;\n width: 13px;\n}\n\n.circle-icon {\n position: relative;\n top: -33px;\n left: 10px;\n width: 13px;\n}\n\n.fire-icon {\n position: relative;\n top: -36px;\n left: 10px;\n width: 13px;\n}\n\n.tree-icon {\n position: relative;\n top: -38px;\n left: 4px;\n width: 24px;\n}\n\n.music-icon {\n position: relative;\n top: -35px;\n left: 4px;\n width: 24px;\n}\n\n.quest-icon {\n position: relative;\n top: -34px;\n left: 4px;\n width: 24px;\n}\n\n.drum-icon {\n position: relative;\n top: -38px;\n left: 4px;\n width: 24px;\n}\n\n.compass-icon {\n position: relative;\n top: -36.5px;\n left: 4px;\n width: 24px;\n}\n\n.group-icon {\n position: relative;\n top: -37px;\n left: 4px;\n width: 24px;\n}\n\n.liebevoll-jetzt-icon{\n position: relative;\n top: -35px;\n left: 4px;\n width: 24px;\n}\n\n.staff-snake-icon {\n position: relative;\n top: -35px;\n left: 4px;\n width: 24px;\n}\n\n.flower-icon {\n position: relative;\n top: -35px;\n left: 4px;\n width: 24px;\n}\n\n.network-icon {\n position: relative;\n top: -35px;\n left: 4px;\n width: 24px;\n}\n\n.shop-icon {\n position: relative;\n top: -34px;\n left: 4px;\n width: 24px;\n}\n\n.plant-icon {\n position: relative;\n top: -34px;\n left: 4px;\n width: 24px;\n}\n\n.circle-dot-icon {\n position: relative;\n top: -36px;\n left: 4px;\n width: 24px;\n}\n\n.steps-icon {\n position: relative;\n top: -34px;\n left: 4px;\n width: 24px;\n}";
75
+ var css_248z$2 = ".calendar-icon {\n position: relative;\n top: -35px;\n left: 10px;\n width: 13px;\n}\n\n.user-icon {\n position: relative;\n top: -36px;\n left: 10px;\n width: 13px;\n}\n\n.circle-icon {\n position: relative;\n top: -33px;\n left: 10px;\n width: 13px;\n}\n\n.fire-icon {\n position: relative;\n top: -36px;\n left: 10px;\n width: 13px;\n}\n\n.tree-icon {\n position: relative;\n top: -38px;\n left: 4px;\n width: 24px;\n}\n\n.music-icon {\n position: relative;\n top: -35px;\n left: 4px;\n width: 24px;\n}\n\n.quest-icon {\n position: relative;\n top: -34px;\n left: 4px;\n width: 24px;\n}\n\n.drum-icon {\n position: relative;\n top: -38px;\n left: 4px;\n width: 24px;\n}\n\n.compass-icon {\n position: relative;\n top: -36.5px;\n left: 4px;\n width: 24px;\n}\n\n.group-icon {\n position: relative;\n top: -37px;\n left: 4px;\n width: 24px;\n}\n\n.liebevoll-jetzt-icon{\n position: relative;\n top: -35px;\n left: 4px;\n width: 24px;\n}\n\n.staff-snake-icon {\n position: relative;\n top: -35px;\n left: 4px;\n width: 24px;\n}\n\n.flower-icon {\n position: relative;\n top: -35px;\n left: 4px;\n width: 24px;\n}\n\n.network-icon {\n position: relative;\n top: -35px;\n left: 4px;\n width: 24px;\n}\n\n.shop-icon {\n position: relative;\n top: -34px;\n left: 4px;\n width: 24px;\n}\n\n.plant-icon {\n position: relative;\n top: -34px;\n left: 4px;\n width: 24px;\n}\n\n.circle-dot-icon {\n position: relative;\n top: -36px;\n left: 4px;\n width: 24px;\n}\n\n.steps-icon {\n position: relative;\n top: -34px;\n left: 4px;\n width: 24px;\n}\n\n.suitcase-icon {\n position: relative;\n top: -34px;\n left: 4px;\n width: 24px;\n}\n\n.offer-icon {\n position: relative;\n top: -34.5px;\n left: 4px;\n width: 24px;\n}";
76
76
  styleInject(css_248z$2);
77
77
 
78
- var css_248z$1 = ".leaflet-control-attribution {\n display: none;\n}\n\n.leaflet-control-locate {\n display: none;\n}\n\n.leaflet-data-marker {\n background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAQCAYAAACcN8ZaAAAB3klEQVR42s3U4UdDURzG8czMXJnJ1Vwzc6VJZjaZJdlMlpQsKdmUFNOUspRSSqUolfQfr+fF98Vx5mwv9qbDx7LdznnO7/7Omej3+/+Ga0QMUYkhbvBgmhzCQxwxibIGrGEF8CQhU+LLtKQkQNqScUgjxRxTBIxbgfgD/BgnhM8kM5KTeclLQYqGkkMRBckzR8ic/mAgd5BAZplsUaqyIg2sDtHg2brUZJk5SmwopErJUWE8SpmTMhNvya60Zd/SNrR4bkeaskG4uiwRZk6yrJEYFibGAxn+scECHTmTnuVCzvmty3PHciB7bGKN6lQkzysPqIrHmpFhYbKUtckC1/Ioz4ZHuZdbuSLYiRxRpSZVWXZVxAzC0R4Ik5SQsu6w8yd5l2/5kg95I9SdXMoZQfYIUjeqEUrgOkXGPeN4TYRhxy8E+ZUf+eS7B7miIoeybVSjKDnm8u3+gH3pDTYwu1igATvs/pXqvBKiR4i2bNJfi1ZfUAnjgrOG8wY2quNzBKuU/ZS+uSFEl5O0xRGuUIlZCcw7xG5QPkeHYUSNV5WXGou2sC3rBC0LjenqCXGO0WEiTJa0Lr4KixdHBrDGuGGiRqCUpFk8pGIpQtCU7p4YPwxYxEMCk1aAMQZh8Ac8PfbIzYPJOwAAAABJRU5ErkJggg==') no-repeat;\n background-position: 6px 32px;\n}\n\n.leaflet-container {\n cursor: inherit;\n}\n\n.leaflet-popup-scrolled {\n overflow-x: hidden;\n}\n\n.leaflet-popup-content-wrapper, .leaflet-popup-tip{\n background-color: var(--color-base-100);\n color: var(--color-base-content);\n border-radius: var(--radius-box);\n}\n\n.leaflet-tooltip {\n background-color: var(--color-base-100);\n color: var(--color-base-content);\n border-width: 0px;\n}\n\n.leaflet-tooltip {\n border-radius: var(--radius-box);\n transition: opacity 500ms;\n transition-delay: 50ms;\n}\n\n.leaflet-tooltip::before {\n border-top-color: var(--color-base-100);\n}\n\n.leaflet-container {\n text-align: left;\n background-image: url(\"data:image/svg+xml,%3Csvg width='40' height='40' stroke='%23000' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cstyle%3E.spinner_V8m1%7Btransform-origin:center;animation:spinner_zKoa 2s linear infinite%7D.spinner_V8m1 circle%7Bstroke-linecap:round;animation:spinner_YpZS 1.5s ease-out infinite%7D%40keyframes spinner_zKoa%7B100%25%7Btransform:rotate(360deg)%7D%7D%40keyframes spinner_YpZS%7B0%25%7Bstroke-dasharray:0 150;stroke-dashoffset:0%7D47.5%25%7Bstroke-dasharray:42 150;stroke-dashoffset:-16%7D95%25%2C100%25%7Bstroke-dasharray:42 150;stroke-dashoffset:-59%7D%7D%3C%2Fstyle%3E%3Cg class='spinner_V8m1'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3'%3E%3C%2Fcircle%3E%3C%2Fg%3E%3C%2Fsvg%3E\");\n background-repeat: no-repeat;\n background-attachment: fixed;\n background-position: 50% 80%;\n}\n\n.leaflet-popup-close-button span {\n color: var(--color-base-content);\n opacity: 50%;\n}";
78
+ var css_248z$1 = ".leaflet-control-attribution {\n display: none;\n}\n\n.leaflet-control-locate {\n display: none;\n}\n\n.leaflet-data-marker {\n background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAQCAYAAACcN8ZaAAAB3klEQVR42s3U4UdDURzG8czMXJnJ1Vwzc6VJZjaZJdlMlpQsKdmUFNOUspRSSqUolfQfr+fF98Vx5mwv9qbDx7LdznnO7/7Omej3+/+Ga0QMUYkhbvBgmhzCQxwxibIGrGEF8CQhU+LLtKQkQNqScUgjxRxTBIxbgfgD/BgnhM8kM5KTeclLQYqGkkMRBckzR8ic/mAgd5BAZplsUaqyIg2sDtHg2brUZJk5SmwopErJUWE8SpmTMhNvya60Zd/SNrR4bkeaskG4uiwRZk6yrJEYFibGAxn+scECHTmTnuVCzvmty3PHciB7bGKN6lQkzysPqIrHmpFhYbKUtckC1/Ioz4ZHuZdbuSLYiRxRpSZVWXZVxAzC0R4Ik5SQsu6w8yd5l2/5kg95I9SdXMoZQfYIUjeqEUrgOkXGPeN4TYRhxy8E+ZUf+eS7B7miIoeybVSjKDnm8u3+gH3pDTYwu1igATvs/pXqvBKiR4i2bNJfi1ZfUAnjgrOG8wY2quNzBKuU/ZS+uSFEl5O0xRGuUIlZCcw7xG5QPkeHYUSNV5WXGou2sC3rBC0LjenqCXGO0WEiTJa0Lr4KixdHBrDGuGGiRqCUpFk8pGIpQtCU7p4YPwxYxEMCk1aAMQZh8Ac8PfbIzYPJOwAAAABJRU5ErkJggg==') no-repeat;\n background-position: 6px 32px;\n}\n\n.leaflet-container {\n cursor: inherit;\n}\n\n.leaflet-popup-scrolled {\n overflow-x: hidden;\n}\n\n.leaflet-popup-content-wrapper, .leaflet-popup-tip{\n background-color: var(--color-base-100);\n color: var(--color-base-content);\n border-radius: var(--radius-box);\n}\n\n.leaflet-popup-tip-container, .leaflet-popup-tip{\n border-radius: 0;\n}\n\n.leaflet-tooltip {\n background-color: var(--color-base-100);\n color: var(--color-base-content);\n border-width: 0px;\n}\n\n.leaflet-tooltip {\n border-radius: var(--radius-box);\n transition: opacity 500ms;\n transition-delay: 50ms;\n}\n\n.leaflet-tooltip::before {\n border-top-color: var(--color-base-100);\n}\n\n.leaflet-container {\n text-align: left;\n background-image: url(\"data:image/svg+xml,%3Csvg width='40' height='40' stroke='%23000' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cstyle%3E.spinner_V8m1%7Btransform-origin:center;animation:spinner_zKoa 2s linear infinite%7D.spinner_V8m1 circle%7Bstroke-linecap:round;animation:spinner_YpZS 1.5s ease-out infinite%7D%40keyframes spinner_zKoa%7B100%25%7Btransform:rotate(360deg)%7D%7D%40keyframes spinner_YpZS%7B0%25%7Bstroke-dasharray:0 150;stroke-dashoffset:0%7D47.5%25%7Bstroke-dasharray:42 150;stroke-dashoffset:-16%7D95%25%2C100%25%7Bstroke-dasharray:42 150;stroke-dashoffset:-59%7D%7D%3C%2Fstyle%3E%3Cg class='spinner_V8m1'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3'%3E%3C%2Fcircle%3E%3C%2Fg%3E%3C%2Fsvg%3E\");\n background-repeat: no-repeat;\n background-attachment: fixed;\n background-position: 50% 80%;\n}\n\n.leaflet-popup-close-button span {\n color: var(--color-base-content);\n opacity: 50%;\n}";
79
79
  styleInject(css_248z$1);
80
80
 
81
81
  var css_248z = ".picker {\n position: relative;\n}\n\n.swatch {\n width: 28px;\n height: 28px;\n border-radius: 8px;\n border: 3px solid #fff;\n box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1), inset 0 0 0 1px rgba(0, 0, 0, 0.1);\n cursor: pointer;\n}\n\n.popover {\n position: absolute;\n top: 0;\n left: 36px;\n border-radius: 9px;\n box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);\n}";
@@ -1430,6 +1430,10 @@ const addIcon = (icon) => {
1430
1430
  return '<svg class="network-icon" stroke="currentColor" fill="#fff" stroke-width="0" viewBox="0 0 512 512" height="1.5em" width="1.5em" xmlns="http://www.w3.org/2000/svg"><path d="M256 0c5.3 0 10.3 2.7 13.3 7.1c15.8 23.5 36.7 63.7 49.2 109c7.2 26.4 11.8 55.2 10.4 84c11.5-8.8 23.7-16.7 35.8-23.6c41-23.3 84.4-36.9 112.2-42.5c5.2-1 10.7 .6 14.4 4.4s5.4 9.2 4.4 14.5c-5.6 27.7-19.3 70.9-42.7 111.7c-9.1 15.9-19.9 31.7-32.4 46.3c27.8 6.6 52.4 17.3 67.2 25.5c5.1 2.8 8.2 8.2 8.2 14s-3.2 11.2-8.2 14c-15.2 8.4-40.9 19.5-69.8 26.1c-20.2 4.6-42.9 7.2-65.2 4.6l8.3 33.1c1.5 6.1-.6 12.4-5.5 16.4s-11.6 4.6-17.2 1.9L280 417.2l0 70.8c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-70.8-58.5 29.1c-5.6 2.8-12.3 2.1-17.2-1.9s-7-10.3-5.5-16.4l8.3-33.1c-22.2 2.6-45 0-65.2-4.6c-28.9-6.6-54.6-17.6-69.8-26.1c-5.1-2.8-8.2-8.2-8.2-14s3.2-11.2 8.2-14c14.8-8.2 39.4-18.8 67.2-25.5C78.9 296.3 68.1 280.5 59 264.6c-23.4-40.8-37.1-84-42.7-111.7c-1.1-5.2 .6-10.7 4.4-14.5s9.2-5.4 14.4-4.4c27.9 5.5 71.2 19.2 112.2 42.5c12.1 6.9 24.3 14.7 35.8 23.6c-1.4-28.7 3.1-57.6 10.4-84c12.5-45.3 33.4-85.5 49.2-109c3-4.4 8-7.1 13.3-7.1z"></path></svg>';
1431
1431
  case 'steps':
1432
1432
  return '<svg class="steps-icon" stroke="currentColor" fill="#fff" stroke-width="0" viewBox="0 0 512 512" height="1.4em" width="1.4em" xmlns="http://www.w3.org/2000/svg"><path d="M133.83 361.27c-22.61 0-41-8.17-54.79-24.39s-22.84-40.29-28.11-75.31c-7.76-51.61-.06-95.11 21.68-122.48 12.8-16.12 29.6-25.44 48.58-26.94 16.25-1.3 40.54 5.29 64 44 14.69 24.24 25.86 56.44 30.65 88.34 5.79 38.51 1.48 66.86-13.18 86.65-11.64 15.72-29.54 25.46-53.21 29a106.46 106.46 0 0 1-15.62 1.13zM173 496c-13.21 0-26.6-4.23-38.66-12.36a79.79 79.79 0 0 1-33.52-50.6c-2.85-14.66-1.14-26.31 5.22-35.64 10.33-15.15 28.87-18.56 48.49-22.18 2.07-.38 4.17-.76 6.3-1.17 4.52-.86 9.14-2 13.62-3.11 16.78-4.14 34.14-8.43 48.47 1.75 9.59 6.8 15 18.36 16.62 35.32 1.84 19.57-2.36 39.1-11.83 55-10.19 17.11-25.47 28.42-43 31.86A61 61 0 0 1 173 496zm205.17-230.73a106.69 106.69 0 0 1-15.6-1.2c-23.66-3.5-41.56-13.25-53.2-29-14.66-19.79-19-48.13-13.18-86.65 4.79-31.93 15.93-64.1 30.55-88.25 23.34-38.57 47.66-45.26 64-44.08 18.92 1.38 35.69 10.57 48.51 26.6 21.89 27.37 29.65 71 21.86 122.84-5.27 35-14.2 58.95-28.11 75.31s-32.22 24.43-54.83 24.43zM339 400a61 61 0 0 1-11.68-1.13c-17.56-3.44-32.84-14.75-43-31.86-9.47-15.9-13.67-35.43-11.83-55 1.6-17 7-28.52 16.62-35.33 14.33-10.17 31.69-5.89 48.47-1.74 4.48 1.1 9.1 2.24 13.62 3.11l6.29 1.17c19.63 3.61 38.17 7 48.5 22.17 6.36 9.33 8.07 21 5.22 35.64a79.78 79.78 0 0 1-33.52 50.61C365.56 395.78 352.17 400 339 400z"></path></svg>';
1433
+ case 'suitcase':
1434
+ return '<svg class="suitcase-icon" stroke="#fff" fill="#fff" stroke-width="0" viewBox="0 0 16 16" height="1.3em" width="1.3em" xmlns="http://www.w3.org/2000/svg"><path d="M7 0a2 2 0 0 0-2 2H1.5A1.5 1.5 0 0 0 0 3.5v9A1.5 1.5 0 0 0 1.5 14H2a.5.5 0 0 0 1 0h10a.5.5 0 0 0 1 0h.5a1.5 1.5 0 0 0 1.5-1.5v-9A1.5 1.5 0 0 0 14.5 2H11a2 2 0 0 0-2-2zM6 2a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1zM3 13V3h1v10zm9 0V3h1v10z"></path></svg>';
1435
+ case 'offer':
1436
+ return '<svg class="offer-icon" width="1.35em" height="1.35em" fill="#fff" stroke="currentColor" stroke-width="0" version="1.1" viewBox="-2 -2 23 23" xmlns="http://www.w3.org/2000/svg"><path d="m19.41 9.58-9-9c-0.36-0.36-0.86-0.58-1.41-0.58h-7c-1.1 0-2 0.9-2 2v7c0 0.55 0.22 1.05 0.59 1.42l9 9c0.36 0.36 0.86 0.58 1.41 0.58s1.05-0.22 1.41-0.59l7-7c0.37-0.36 0.59-0.86 0.59-1.41s-0.23-1.06-0.59-1.42zm-15.91-4.58c-0.83 0-1.5-0.67-1.5-1.5s0.67-1.5 1.5-1.5 1.5 0.67 1.5 1.5-0.67 1.5-1.5 1.5z"/></svg>';
1433
1437
  default:
1434
1438
  return '';
1435
1439
  }
@@ -4825,17 +4829,16 @@ const CrowdfundingView = ({ item }) => {
4825
4829
  const GalleryView = ({ item }) => {
4826
4830
  const [index, setIndex] = useState(-1);
4827
4831
  const appState = useAppState();
4828
- const images = item.gallery?.map((i, j) => {
4829
- return {
4830
- src: appState.assetsApi.url + `${i.directus_files_id.id}.jpg`,
4831
- width: i.directus_files_id.width,
4832
- height: i.directus_files_id.height,
4833
- index: j,
4834
- };
4835
- });
4836
- if (!images)
4837
- throw new Error('GalleryView: images is undefined');
4838
- return (jsxs("div", { className: 'tw:mx-6 tw:mb-6', children: [jsx(RowsPhotoAlbum, { photos: images, targetRowHeight: 150, onClick: ({ index: current }) => setIndex(current) }), jsx(ReactLightbox, { index: index, slides: images, open: index >= 0, close: () => setIndex(-1) })] }));
4832
+ const images = item.gallery?.map((i, j) => ({
4833
+ src: appState.assetsApi.url + `${i.directus_files_id.id}.jpg`,
4834
+ width: i.directus_files_id.width,
4835
+ height: i.directus_files_id.height,
4836
+ index: j,
4837
+ })) ?? [];
4838
+ if (images.length > 0)
4839
+ return (jsxs("div", { className: 'tw:mx-6 tw:mb-6', children: [jsx(RowsPhotoAlbum, { photos: images, targetRowHeight: 150, onClick: ({ index: current }) => setIndex(current) }), jsx(ReactLightbox, { index: index, slides: images, open: index >= 0, close: () => setIndex(-1) })] }));
4840
+ else
4841
+ return jsx(Fragment, {});
4839
4842
  };
4840
4843
 
4841
4844
  var ChevronSVG = 'data:image/svg+xml;base64,PHN2ZwogICAgICAgICAgICB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnCiAgICAgICAgICAgIHZpZXdCb3g9JzAgMCAyNCAyNCcKICAgICAgICAgICAgZmlsbD0nd2hpdGUnCiAgICAgICAgICAgIGNsYXNzTmFtZT0naC00IHctNCcKICAgICAgICAgID4KICAgICAgICAgICAgPHBhdGggZD0nTTIwIDRINGMtMS4xIDAtMS45OS45LTEuOTkgMkwyIDE4YzAgMS4xLjkgMiAyIDJoMTZjMS4xIDAgMi0uOSAyLTJWNmMwLTEuMS0uOS0yLTItMnptMCA0bC04IDUtOC01VjZsOCA1IDgtNXYyeicgLz4KICAgICAgICAgIDwvc3ZnPg==';