utopia-ui 3.0.32 → 3.0.33

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 (55) hide show
  1. package/dist/Components/AppShell/AppShell.d.ts +1 -1
  2. package/dist/Components/AppShell/SetAppState.d.ts +1 -1
  3. package/dist/Components/AppShell/hooks/useAppState.d.ts +1 -1
  4. package/dist/Components/AppShell/hooks/useAssets.d.ts +1 -1
  5. package/dist/Components/Auth/useAuth.d.ts +2 -1
  6. package/dist/Components/Input/TextAreaInput.d.ts +2 -1
  7. package/dist/Components/Map/ItemForm.d.ts +1 -1
  8. package/dist/Components/Map/ItemView.d.ts +1 -1
  9. package/dist/Components/Map/Layer.d.ts +1 -1
  10. package/dist/Components/Map/Permissions.d.ts +2 -1
  11. package/dist/Components/Map/Subcomponents/ItemFormPopup.d.ts +1 -1
  12. package/dist/Components/Map/Subcomponents/ItemPopupComponents/HeaderView.d.ts +2 -1
  13. package/dist/Components/Map/Subcomponents/ItemPopupComponents/PopupButton.d.ts +1 -1
  14. package/dist/Components/Map/Subcomponents/ItemPopupComponents/PopupCheckboxInput.d.ts +1 -1
  15. package/dist/Components/Map/Subcomponents/ItemPopupComponents/PopupStartEndInput.d.ts +1 -1
  16. package/dist/Components/Map/Subcomponents/ItemPopupComponents/PopupTextAreaInput.d.ts +1 -1
  17. package/dist/Components/Map/Subcomponents/ItemPopupComponents/PopupTextInput.d.ts +1 -1
  18. package/dist/Components/Map/Subcomponents/ItemPopupComponents/StartEndView.d.ts +1 -1
  19. package/dist/Components/Map/Subcomponents/ItemPopupComponents/TextView.d.ts +1 -1
  20. package/dist/Components/Map/Subcomponents/ItemViewPopup.d.ts +2 -1
  21. package/dist/Components/Map/Tags.d.ts +2 -1
  22. package/dist/Components/Map/UtopiaMap.d.ts +1 -1
  23. package/dist/Components/Map/UtopiaMapInner.d.ts +1 -1
  24. package/dist/Components/Map/hooks/useFilter.d.ts +2 -1
  25. package/dist/Components/Map/hooks/useItems.d.ts +2 -1
  26. package/dist/Components/Map/hooks/useLayers.d.ts +1 -1
  27. package/dist/Components/Map/hooks/useLeafletRefs.d.ts +2 -2
  28. package/dist/Components/Map/hooks/usePermissions.d.ts +5 -1
  29. package/dist/Components/Map/hooks/useSelectPosition.d.ts +4 -2
  30. package/dist/Components/Map/hooks/useTags.d.ts +3 -1
  31. package/dist/Components/Profile/ProfileView.d.ts +1 -1
  32. package/dist/Components/Profile/Subcomponents/ActionsButton.d.ts +1 -1
  33. package/dist/Components/Profile/Subcomponents/ContactInfoForm.d.ts +1 -1
  34. package/dist/Components/Profile/Subcomponents/ContactInfoView.d.ts +1 -1
  35. package/dist/Components/Profile/Subcomponents/GroupSubHeaderView.d.ts +1 -1
  36. package/dist/Components/Profile/Subcomponents/GroupSubheaderForm.d.ts +2 -1
  37. package/dist/Components/Profile/Subcomponents/LinkedItemsHeaderView.d.ts +1 -1
  38. package/dist/Components/Profile/Subcomponents/PlusButton.d.ts +1 -1
  39. package/dist/Components/Profile/Subcomponents/ProfileStartEndForm.d.ts +1 -1
  40. package/dist/Components/Profile/Subcomponents/ProfileStartEndView.d.ts +1 -1
  41. package/dist/Components/Profile/Subcomponents/ProfileTextForm.d.ts +3 -2
  42. package/dist/Components/Profile/Subcomponents/ProfileTextView.d.ts +1 -1
  43. package/dist/Components/Profile/Templates/FlexForm.d.ts +2 -1
  44. package/dist/Components/Profile/Templates/FlexView.d.ts +1 -1
  45. package/dist/Components/Profile/Templates/OnepagerForm.d.ts +2 -1
  46. package/dist/Components/Profile/Templates/OnepagerView.d.ts +1 -1
  47. package/dist/Components/Profile/Templates/SimpleView.d.ts +1 -1
  48. package/dist/Components/Profile/Templates/TabsView.d.ts +2 -1
  49. package/dist/Components/Templates/AttestationForm.d.ts +1 -1
  50. package/dist/Components/Templates/DateUserInfo.d.ts +1 -1
  51. package/dist/Components/Templates/ItemCard.d.ts +1 -1
  52. package/dist/Components/Templates/TagView.d.ts +1 -1
  53. package/dist/index.js +21 -29
  54. package/dist/index.js.map +1 -1
  55. package/package.json +2 -1
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { AssetsApi } from '#src/types';
2
+ import type { AssetsApi } from '#types/AssetsApi';
3
3
  export declare function AppShell({ appName, children, assetsApi, userType, }: {
4
4
  appName: string;
5
5
  children: React.ReactNode;
@@ -1,4 +1,4 @@
1
- import { AssetsApi } from '#src/types';
1
+ import type { AssetsApi } from '#types/AssetsApi';
2
2
  export declare const SetAppState: ({ assetsApi, userType, }: {
3
3
  assetsApi: AssetsApi;
4
4
  userType: string;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { AssetsApi } from '#src/types';
2
+ import type { AssetsApi } from '#types/AssetsApi';
3
3
  interface AppState {
4
4
  assetsApi: AssetsApi;
5
5
  userType: string;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { AssetsApi } from '#src/types';
2
+ import type { AssetsApi } from '#types/AssetsApi';
3
3
  declare type UseAssetManagerResult = ReturnType<typeof useAssetsManager>;
4
4
  declare function useAssetsManager(): {
5
5
  api: AssetsApi;
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { UserApi, UserItem } from '#src/types';
2
+ import type { UserApi } from '#types/UserApi';
3
+ import type { UserItem } from '#types/UserItem';
3
4
  interface AuthProviderProps {
4
5
  userApi: UserApi;
5
6
  children?: React.ReactNode;
@@ -6,7 +6,8 @@ declare type TextAreaProps = {
6
6
  inputStyle?: string;
7
7
  defaultValue: string;
8
8
  placeholder?: string;
9
+ required?: boolean;
9
10
  updateFormValue?: (value: string) => void;
10
11
  };
11
- export declare function TextAreaInput({ labelTitle, dataField, labelStyle, containerStyle, inputStyle, defaultValue, placeholder, updateFormValue, }: TextAreaProps): import("react/jsx-runtime").JSX.Element;
12
+ export declare function TextAreaInput({ labelTitle, dataField, labelStyle, containerStyle, inputStyle, defaultValue, placeholder, required, updateFormValue, }: TextAreaProps): import("react/jsx-runtime").JSX.Element;
12
13
  export {};
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { Item } from '#src/types';
2
+ import type { Item } from '#types/Item';
3
3
  export declare const ItemForm: {
4
4
  ({ children, item, title, setPopupTitle, }: {
5
5
  children?: React.ReactNode;
@@ -1,4 +1,4 @@
1
- import { Item } from '#src/types';
1
+ import type { Item } from '#types/Item';
2
2
  export declare const ItemView: {
3
3
  ({ children, item }: {
4
4
  children?: React.ReactNode;
@@ -1,2 +1,2 @@
1
- import { LayerProps } from '#src/types';
1
+ import type { LayerProps } from '#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,4 +1,5 @@
1
- import { ItemsApi, Permission } from '#src/types';
1
+ import type { ItemsApi } from '#types/ItemsApi';
2
+ import type { Permission } from '#types/Permission';
2
3
  export declare function Permissions({ data, api, adminRole, }: {
3
4
  data?: Permission[];
4
5
  api?: ItemsApi<Permission>;
@@ -1,2 +1,2 @@
1
- import { ItemFormPopupProps } from '#src/types';
1
+ import type { ItemFormPopupProps } from '#types/ItemFormPopupProps';
2
2
  export declare function ItemFormPopup(props: ItemFormPopupProps): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,5 @@
1
- import { Item, ItemsApi } from '#src/types';
1
+ import type { Item } from '#types/Item';
2
+ import type { ItemsApi } from '#types/ItemsApi';
2
3
  export declare function HeaderView({ item, api, editCallback, deleteCallback, setPositionCallback, itemNameField, itemSubnameField, itemAvatarField, loading, hideMenu, big, truncateSubname, hideSubname, showAddress, }: {
3
4
  item: Item;
4
5
  api?: ItemsApi<any>;
@@ -1,4 +1,4 @@
1
- import { Item } from '#src/types';
1
+ import type { Item } from '#types/Item';
2
2
  export declare const PopupButton: ({ url, parameterField, text, colorField, item, }: {
3
3
  url: string;
4
4
  parameterField?: string | undefined;
@@ -1,4 +1,4 @@
1
- import { Item } from '#src/types';
1
+ import type { Item } from '#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 { Item } from '#src/types';
1
+ import type { Item } from '#types/Item';
2
2
  interface StartEndInputProps {
3
3
  item?: Item;
4
4
  showLabels?: boolean;
@@ -1,4 +1,4 @@
1
- import { Item } from '#src/types';
1
+ import type { Item } from '#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 { Item } from '#src/types';
1
+ import type { Item } from '#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 { Item } from '#src/types';
1
+ import type { Item } from '#types/Item';
2
2
  export declare const StartEndView: ({ item }: {
3
3
  item?: Item | undefined;
4
4
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { Item } from '#src/types';
1
+ import type { Item } from '#types/Item';
2
2
  export declare const TextView: ({ item, truncate, itemTextField, rawText, }: {
3
3
  item?: Item | undefined;
4
4
  truncate?: boolean | undefined;
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { Item, ItemFormPopupProps } from '#src/types';
2
+ import type { Item } from '#types/Item';
3
+ import type { ItemFormPopupProps } from '#types/ItemFormPopupProps';
3
4
  export interface ItemViewPopupProps {
4
5
  item: Item;
5
6
  children?: React.ReactNode;
@@ -1,4 +1,5 @@
1
- import { ItemsApi, Tag } from '#src/types';
1
+ import type { ItemsApi } from '#types/ItemsApi';
2
+ import type { Tag } from '#types/Tag';
2
3
  export declare function Tags({ data, api }: {
3
4
  data?: Tag[];
4
5
  api?: ItemsApi<Tag>;
@@ -1,4 +1,4 @@
1
- import { UtopiaMapProps } from '#src/types';
1
+ import type { UtopiaMapProps } from '#types/UtopiaMapProps';
2
2
  import 'react-toastify/dist/ReactToastify.css';
3
3
  declare function UtopiaMap(props: UtopiaMapProps): import("react/jsx-runtime").JSX.Element;
4
4
  export { UtopiaMap };
@@ -1,4 +1,4 @@
1
1
  import 'leaflet/dist/leaflet.css';
2
- import { UtopiaMapProps } from '#src/types';
3
2
  import './UtopiaMap.css';
3
+ import type { UtopiaMapProps } from '#types/UtopiaMapProps';
4
4
  export declare function UtopiaMapInner({ height, width, center, zoom, children, geo, showFilterControl, showGratitudeControl, showLayerControl, infoText, }: UtopiaMapProps): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { LayerProps, Tag } from '#src/types';
2
+ import type { LayerProps } from '#types/LayerProps';
3
+ import type { Tag } from '#types/Tag';
3
4
  declare type UseFilterManagerResult = ReturnType<typeof useFilterManager>;
4
5
  declare function useFilterManager(initialTags: Tag[]): {
5
6
  filterTags: Tag[];
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { Item, LayerProps } from '#src/types';
2
+ import type { Item } from '#types/Item';
3
+ import type { LayerProps } from '#types/LayerProps';
3
4
  declare type UseItemManagerResult = ReturnType<typeof useItemsManager>;
4
5
  declare function useItemsManager(initialItems: Item[]): {
5
6
  items: Item[];
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { LayerProps } from '#src/types';
2
+ import type { LayerProps } from '#types/LayerProps';
3
3
  declare type UseItemManagerResult = ReturnType<typeof useLayerManager>;
4
4
  declare function useLayerManager(initialLayers: LayerProps[]): {
5
5
  layers: LayerProps[];
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { Marker, Popup } from 'leaflet';
3
- import { Item } from '#src/types';
2
+ import type { Item } from '#types/Item';
3
+ import type { Marker, Popup } from 'leaflet';
4
4
  interface LeafletRef {
5
5
  item: Item;
6
6
  marker: Marker;
@@ -1,5 +1,9 @@
1
1
  /// <reference types="react" />
2
- import { Item, ItemsApi, LayerProps, Permission, PermissionAction } from '#src/types';
2
+ import type { Item } from '#types/Item';
3
+ import type { ItemsApi } from '#types/ItemsApi';
4
+ import type { LayerProps } from '#types/LayerProps';
5
+ import type { Permission } from '#types/Permission';
6
+ import type { PermissionAction } from '#types/PermissionAction';
3
7
  declare type UsePermissionManagerResult = ReturnType<typeof usePermissionsManager>;
4
8
  declare function usePermissionsManager(initialPermissions: Permission[]): {
5
9
  permissions: Permission[];
@@ -1,6 +1,8 @@
1
1
  /// <reference types="react" />
2
- import { LatLng } from 'leaflet';
3
- import { Item, LayerProps, ItemFormPopupProps } from '#src/types';
2
+ import type { Item } from '#types/Item';
3
+ import type { ItemFormPopupProps } from '#types/ItemFormPopupProps';
4
+ import type { LayerProps } from '#types/LayerProps';
5
+ import type { LatLng } from 'leaflet';
4
6
  interface PolygonClickedProps {
5
7
  position: LatLng;
6
8
  setItemFormPopup: React.Dispatch<React.SetStateAction<ItemFormPopupProps | null>>;
@@ -1,5 +1,7 @@
1
1
  /// <reference types="react" />
2
- import { Item, ItemsApi, Tag } from '#src/types';
2
+ import type { Item } from '#types/Item';
3
+ import type { ItemsApi } from '#types/ItemsApi';
4
+ import type { Tag } from '#types/Tag';
3
5
  declare type UseTagManagerResult = ReturnType<typeof useTagsManager>;
4
6
  declare function useTagsManager(initialTags: Tag[]): {
5
7
  tags: Tag[];
@@ -1,4 +1,4 @@
1
- import { ItemsApi } from '#src/types';
1
+ import type { ItemsApi } from '#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 { Item } from '#src/types';
1
+ import type { Item } from '#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 { FormState } from '#src/types';
1
+ import type { FormState } from '#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 { Item } from '#src/types';
1
+ import type { Item } from '#types/Item';
2
2
  export declare const ContactInfoView: ({ item, heading }: {
3
3
  item: Item;
4
4
  heading: string;
@@ -1,4 +1,4 @@
1
- import { Item } from '#src/types';
1
+ import type { Item } from '#types/Item';
2
2
  export declare const GroupSubHeaderView: ({ item, shareBaseUrl, platforms, }: {
3
3
  item: Item;
4
4
  shareBaseUrl: string;
@@ -1,4 +1,5 @@
1
- import { Item, FormState } from '#src/types';
1
+ import type { FormState } from '#types/FormState';
2
+ import type { Item } from '#types/Item';
2
3
  interface groupType {
3
4
  groupTypes_id: {
4
5
  name: string;
@@ -1,4 +1,4 @@
1
- import { Item } from '#src/types';
1
+ import type { Item } from '#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 { LayerProps } from '#src/types';
1
+ import type { LayerProps } from '#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 { Item } from '#src/types';
1
+ import type { Item } from '#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 { Item } from '#src/types';
1
+ import type { Item } from '#types/Item';
2
2
  export declare const ProfileStartEndView: ({ item }: {
3
3
  item: Item;
4
4
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,9 +1,10 @@
1
- import { FormState } from '#src/types';
2
- export declare const ProfileTextForm: ({ state, setState, dataField, heading, size, hideInputLabel, }: {
1
+ import type { FormState } from '#types/FormState';
2
+ export declare const ProfileTextForm: ({ state, setState, dataField, heading, size, hideInputLabel, required, }: {
3
3
  state: FormState;
4
4
  setState: React.Dispatch<React.SetStateAction<any>>;
5
5
  dataField?: string | undefined;
6
6
  heading: string;
7
7
  size: string;
8
8
  hideInputLabel: boolean;
9
+ required?: boolean | undefined;
9
10
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { Item } from '#src/types';
1
+ import type { Item } from '#types/Item';
2
2
  export declare const ProfileTextView: ({ item, dataField, heading, hideWhenEmpty, }: {
3
3
  item: Item;
4
4
  dataField: string;
@@ -1,4 +1,5 @@
1
- import { Item, FormState } from '#src/types';
1
+ import type { FormState } from '#types/FormState';
2
+ import type { Item } from '#types/Item';
2
3
  export declare const FlexForm: ({ item, state, setState, }: {
3
4
  state: FormState;
4
5
  setState: React.Dispatch<React.SetStateAction<any>>;
@@ -1,4 +1,4 @@
1
- import { Item } from '#src/types';
1
+ import type { Item } from '#types/Item';
2
2
  export declare const FlexView: ({ item }: {
3
3
  item: Item;
4
4
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,5 @@
1
- import { FormState, Item } from '#src/types';
1
+ import type { FormState } from '#types/FormState';
2
+ import type { Item } from '#types/Item';
2
3
  export declare const OnepagerForm: ({ item, state, setState, }: {
3
4
  state: FormState;
4
5
  setState: React.Dispatch<React.SetStateAction<any>>;
@@ -1,4 +1,4 @@
1
- import { Item } from '#src/types';
1
+ import type { Item } from '#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 { Item } from '#src/types';
1
+ import type { Item } from '#types/Item';
2
2
  export declare const SimpleView: ({ item }: {
3
3
  item: Item;
4
4
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,5 @@
1
- import { Item, Tag } from '#src/types';
1
+ import type { Item } from '#types/Item';
2
+ import type { Tag } from '#types/Tag';
2
3
  export declare const TabsView: ({ attestations, item, offers, needs, relations, updatePermission, loading, linkItem, unlinkItem, }: {
3
4
  attestations: any[];
4
5
  item: Item;
@@ -1,4 +1,4 @@
1
- import { ItemsApi } from '#src/types';
1
+ import type { ItemsApi } from '#types/ItemsApi';
2
2
  export declare const AttestationForm: ({ api }: {
3
3
  api?: ItemsApi<any> | undefined;
4
4
  }) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
- import { Item } from '#src/types';
1
+ import type { Item } from '#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 { Item } from '#src/types';
1
+ import type { Item } from '#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 { Tag } from '#src/types';
1
+ import type { Tag } from '#types/Tag';
2
2
  export declare const TagView: ({ tag, heighlight, onClick, count, }: {
3
3
  tag: Tag;
4
4
  heighlight?: boolean | undefined;
package/dist/index.js CHANGED
@@ -548,13 +548,11 @@ function useItemsManager(initialItems) {
548
548
  })];
549
549
  case 1:
550
550
  result = _a.sent();
551
- if (result) {
552
- result.map(function (item) {
553
- dispatch({ type: 'ADD', item: __assign(__assign({}, item), { layer: layer }) });
554
- return null;
555
- });
556
- setallItemsLoaded(true);
557
- }
551
+ result.map(function (item) {
552
+ dispatch({ type: 'ADD', item: __assign(__assign({}, item), { layer: layer }) });
553
+ return null;
554
+ });
555
+ setallItemsLoaded(true);
558
556
  return [2 /*return*/];
559
557
  }
560
558
  });
@@ -760,7 +758,7 @@ var AuthProvider = function (_a) {
760
758
  return [4 /*yield*/, userApi.login(credentials.email, credentials.password)];
761
759
  case 2:
762
760
  res = _a.sent();
763
- setToken(res.access_token);
761
+ setToken(res === null || res === void 0 ? void 0 : res.access_token);
764
762
  return [4 /*yield*/, loadUser()];
765
763
  case 3: return [2 /*return*/, _a.sent()];
766
764
  case 4:
@@ -931,12 +929,10 @@ function usePermissionsManager(initialPermissions) {
931
929
  case 0: return [4 /*yield*/, api.getItems()];
932
930
  case 1:
933
931
  result = _a.sent();
934
- if (result) {
935
- result.map(function (permission) {
936
- dispatch({ type: 'ADD', permission: permission });
937
- return null;
938
- });
939
- }
932
+ result.map(function (permission) {
933
+ dispatch({ type: 'ADD', permission: permission });
934
+ return null;
935
+ });
940
936
  return [2 /*return*/];
941
937
  }
942
938
  });
@@ -1011,14 +1007,6 @@ var useSetAdminRole = function () {
1011
1007
  return setAdminRole;
1012
1008
  };
1013
1009
 
1014
- var Geometry = /** @class */ (function () {
1015
- function Geometry(lng, lat) {
1016
- this.coordinates = [lng, lat];
1017
- this.type = 'Point';
1018
- }
1019
- return Geometry;
1020
- }());
1021
-
1022
1010
  var SelectPositionContext = createContext({
1023
1011
  selectPosition: null,
1024
1012
  setSelectPosition: function () { },
@@ -1052,7 +1040,11 @@ function useSelectPositionManager() {
1052
1040
  setSelectPosition(null);
1053
1041
  }
1054
1042
  if ('text' in selectPosition) {
1055
- var position = (mapClicked === null || mapClicked === void 0 ? void 0 : mapClicked.position.lng) && new Geometry(mapClicked.position.lng, mapClicked.position.lat);
1043
+ var position = (mapClicked === null || mapClicked === void 0 ? void 0 : mapClicked.position.lng) &&
1044
+ {
1045
+ type: 'Point',
1046
+ coordinates: [mapClicked.position.lng, mapClicked.position.lat],
1047
+ };
1056
1048
  position && itemUpdatePosition(__assign(__assign({}, selectPosition), { position: position }));
1057
1049
  setSelectPosition(null);
1058
1050
  }
@@ -3293,9 +3285,9 @@ var rgbToHex = function (r, g, b) {
3293
3285
  };
3294
3286
 
3295
3287
  function TextAreaInput(_a) {
3296
- var labelTitle = _a.labelTitle, dataField = _a.dataField, labelStyle = _a.labelStyle, containerStyle = _a.containerStyle, inputStyle = _a.inputStyle, defaultValue = _a.defaultValue, placeholder = _a.placeholder, updateFormValue = _a.updateFormValue;
3288
+ var labelTitle = _a.labelTitle, dataField = _a.dataField, labelStyle = _a.labelStyle, containerStyle = _a.containerStyle, inputStyle = _a.inputStyle, defaultValue = _a.defaultValue, placeholder = _a.placeholder, _b = _a.required, required = _b === void 0 ? true : _b, updateFormValue = _a.updateFormValue;
3297
3289
  var ref = useRef(null);
3298
- var _b = useState(defaultValue), inputValue = _b[0], setInputValue = _b[1];
3290
+ var _c = useState(defaultValue), inputValue = _c[0], setInputValue = _c[1];
3299
3291
  // prevent react18 from calling useEffect twice
3300
3292
  var init = useRef(false);
3301
3293
  var tags = useTags();
@@ -3335,7 +3327,7 @@ function TextAreaInput(_a) {
3335
3327
  updateFormValue(newValue);
3336
3328
  }
3337
3329
  };
3338
- return (jsxs("div", __assign({ className: "tw-form-control tw-w-full ".concat(containerStyle || '') }, { children: [labelTitle ? (jsx("label", __assign({ className: 'tw-label' }, { children: jsx("span", __assign({ className: "tw-label-text tw-text-base-content ".concat(labelStyle) }, { children: labelTitle })) }))) : null, jsx("textarea", { required: true, ref: ref, value: inputValue, name: dataField, className: "tw-textarea tw-textarea-bordered tw-w-full tw-leading-5 ".concat(inputStyle || ''), placeholder: placeholder || '', onChange: handleChange })] })));
3330
+ return (jsxs("div", __assign({ className: "tw-form-control tw-w-full ".concat(containerStyle || '') }, { children: [labelTitle ? (jsx("label", __assign({ className: 'tw-label' }, { children: jsx("span", __assign({ className: "tw-label-text tw-text-base-content ".concat(labelStyle) }, { children: labelTitle })) }))) : null, jsx("textarea", { required: required, ref: ref, value: inputValue, name: dataField, className: "tw-textarea tw-textarea-bordered tw-w-full tw-leading-5 ".concat(inputStyle || ''), placeholder: placeholder || '', onChange: handleChange })] })));
3339
3331
  }
3340
3332
 
3341
3333
  function TextInput(_a) {
@@ -3380,7 +3372,7 @@ function ItemFormPopup(props) {
3380
3372
  formItem[input.name] = input.value;
3381
3373
  }
3382
3374
  });
3383
- formItem.position = new Geometry(props.position.lng, props.position.lat);
3375
+ formItem.position = { type: 'Point', coordinates: [props.position.lng, props.position.lat] };
3384
3376
  evt.preventDefault();
3385
3377
  setSpinner(true);
3386
3378
  formItem.text &&
@@ -5636,7 +5628,7 @@ var MarkdownHint = function () {
5636
5628
  };
5637
5629
 
5638
5630
  var ProfileTextForm = function (_a) {
5639
- var state = _a.state, setState = _a.setState, dataField = _a.dataField, heading = _a.heading, size = _a.size, hideInputLabel = _a.hideInputLabel;
5631
+ var state = _a.state, setState = _a.setState, dataField = _a.dataField, heading = _a.heading, size = _a.size, hideInputLabel = _a.hideInputLabel, required = _a.required;
5640
5632
  var _b = useState(dataField || 'text'), field = _b[0], setField = _b[1];
5641
5633
  useEffect(function () {
5642
5634
  if (!dataField) {
@@ -5648,7 +5640,7 @@ var ProfileTextForm = function (_a) {
5648
5640
  var _a;
5649
5641
  return (__assign(__assign({}, prevState), (_a = {}, _a[field] = v, _a)));
5650
5642
  });
5651
- }, labelStyle: hideInputLabel ? 'tw-hidden' : '', containerStyle: size === 'full' ? 'tw-grow tw-h-full' : '', inputStyle: size === 'full' ? 'tw-h-full' : 'tw-h-24' })] })));
5643
+ }, labelStyle: hideInputLabel ? 'tw-hidden' : '', containerStyle: size === 'full' ? 'tw-grow tw-h-full' : '', inputStyle: size === 'full' ? 'tw-h-full' : 'tw-h-24', required: required })] })));
5652
5644
  };
5653
5645
 
5654
5646
  var componentMap = {