utopia-ui 3.0.0-alpha.2 → 3.0.0-alpha.200
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/LICENSE +674 -0
- package/README.md +29 -6
- package/dist/Components/AppShell/AppShell.d.ts +8 -6
- package/dist/Components/AppShell/Content.d.ts +1 -1
- package/dist/Components/AppShell/NavBar.d.ts +4 -5
- package/dist/Components/AppShell/SetAssetsApi.d.ts +4 -0
- package/dist/Components/AppShell/SideBar.d.ts +4 -2
- package/dist/Components/AppShell/SidebarSubmenu.d.ts +1 -1
- package/dist/Components/AppShell/hooks/useAssets.d.ts +13 -0
- package/dist/Components/Auth/LoginPage copy.d.ts +2 -0
- package/dist/Components/Auth/LoginPage.d.ts +1 -0
- package/dist/Components/Auth/RequestPasswordPage.d.ts +3 -0
- package/dist/Components/Auth/ResetPasswordPage.d.ts +2 -0
- package/dist/Components/Auth/SetNewPasswordPage.d.ts +1 -0
- package/dist/Components/Auth/SignupPage.d.ts +1 -0
- package/dist/Components/Auth/Signuppage.d.ts +2 -0
- package/dist/Components/Auth/index.d.ts +5 -1
- package/dist/Components/Auth/useAuth.d.ts +26 -0
- package/dist/Components/Gaming/Modal.d.ts +5 -9
- package/dist/Components/Gaming/Quests.d.ts +1 -2
- package/dist/Components/Gaming/hooks/useQuests.d.ts +13 -0
- package/dist/Components/Input/Autocomplete.d.ts +7 -0
- package/dist/Components/Input/ComboBoxInput.d.ts +11 -0
- package/dist/Components/Input/SelectBox.d.ts +16 -0
- package/dist/Components/Input/TextAreaInput.d.ts +6 -5
- package/dist/Components/Input/TextInput.d.ts +14 -0
- package/dist/Components/Input/index.d.ts +3 -0
- package/dist/Components/Map/ItemForm.d.ts +18 -0
- package/dist/Components/Map/ItemView.d.ts +16 -0
- package/dist/Components/Map/Layer.d.ts +1 -2
- package/dist/Components/Map/Permissions.d.ts +6 -0
- package/dist/Components/Map/Subcomponents/AddButton.d.ts +3 -3
- package/dist/Components/Map/Subcomponents/Control.d.ts +5 -0
- package/dist/Components/Map/Subcomponents/Controls/Control.d.ts +7 -0
- package/dist/Components/Map/Subcomponents/Controls/FilterControl.d.ts +1 -0
- package/dist/Components/Map/Subcomponents/Controls/LayerControl.d.ts +1 -0
- package/dist/Components/Map/Subcomponents/Controls/LocateControl.d.ts +3 -0
- package/dist/Components/Map/Subcomponents/Controls/QuestControl.d.ts +1 -0
- package/dist/Components/Map/Subcomponents/Controls/SearchControl.d.ts +1 -0
- package/dist/Components/Map/Subcomponents/Controls/SidebarControl.d.ts +1 -0
- package/dist/Components/Map/Subcomponents/Controls/TagsControl.d.ts +1 -0
- package/dist/Components/Map/Subcomponents/FilterControl.d.ts +2 -0
- package/dist/Components/Map/Subcomponents/ItemFormPopup.d.ts +4 -4
- package/dist/Components/Map/Subcomponents/ItemPopupComponents/HeaderView.d.ts +17 -0
- package/dist/Components/Map/Subcomponents/ItemPopupComponents/PopupButton.d.ts +8 -0
- package/dist/Components/Map/Subcomponents/ItemPopupComponents/PopupCheckboxInput.d.ts +6 -0
- package/dist/Components/Map/Subcomponents/ItemPopupComponents/PopupStartEndInput.d.ts +4 -0
- package/dist/Components/Map/Subcomponents/ItemPopupComponents/PopupTextAreaInput.d.ts +7 -0
- package/dist/Components/Map/Subcomponents/ItemPopupComponents/PopupTextInput.d.ts +7 -0
- package/dist/Components/Map/Subcomponents/ItemPopupComponents/StartEndView.d.ts +4 -0
- package/dist/Components/Map/Subcomponents/ItemPopupComponents/TextView.d.ts +7 -0
- package/dist/Components/Map/Subcomponents/ItemViewPopup.d.ts +3 -4
- package/dist/Components/Map/Subcomponents/LayerControl.d.ts +2 -0
- package/dist/Components/Map/Subcomponents/QuestControl.d.ts +2 -0
- package/dist/Components/Map/Tags.d.ts +5 -5
- package/dist/Components/Map/UtopiaMap.d.ts +3 -10
- package/dist/Components/Map/hooks/useClusterRef.d.ts +12 -0
- package/dist/Components/Map/hooks/useDebounce.d.ts +1 -0
- package/dist/Components/Map/hooks/useFilter.d.ts +38 -0
- package/dist/Components/Map/hooks/useItems.d.ts +6 -0
- package/dist/Components/Map/hooks/useLeafletRefs.d.ts +22 -0
- package/dist/Components/Map/hooks/usePermissions.d.ts +20 -0
- package/dist/Components/Map/hooks/useSelectPosition.d.ts +23 -0
- package/dist/Components/Map/hooks/useSetItemPosition.d.ts +13 -0
- package/dist/Components/Map/hooks/useTags.d.ts +9 -3
- package/dist/Components/Map/hooks/useTimeout.d.ts +4 -0
- package/dist/Components/Map/hooks/useWindowDimension.d.ts +4 -0
- package/dist/Components/Map/index.d.ts +11 -1
- package/dist/Components/Map/setItemLocation.d.ts +1 -0
- package/dist/Components/Profile/ActionButton.d.ts +5 -0
- package/dist/Components/Profile/ActionsButton.d.ts +11 -0
- package/dist/Components/Profile/AvatarWidget.d.ts +5 -0
- package/dist/Components/Profile/ColorPicker.d.ts +6 -0
- package/dist/Components/Profile/ContactInfo.d.ts +8 -0
- package/dist/Components/Profile/Editor.d.ts +4 -0
- package/dist/Components/Profile/ItemForm.d.ts +1 -0
- package/dist/Components/Profile/LinkedItemsHeaderView.d.ts +10 -0
- package/dist/Components/Profile/OverlayItemProfile.d.ts +3 -0
- package/dist/Components/Profile/OverlayItemProfileSettings.d.ts +3 -0
- package/dist/Components/Profile/OverlayProfile.d.ts +1 -0
- package/dist/Components/Profile/OverlayProfileSettings.d.ts +1 -0
- package/dist/Components/Profile/OverlayUserSettings.d.ts +1 -0
- package/dist/Components/Profile/PlusButton.d.ts +7 -0
- package/dist/Components/Profile/ProfileSettings.d.ts +3 -0
- package/dist/Components/Profile/ProfileSubHeader.d.ts +7 -0
- package/dist/Components/Profile/RelationCard.d.ts +6 -0
- package/dist/Components/Profile/Settings.d.ts +2 -3
- package/dist/Components/Profile/SocialShareBar.d.ts +6 -0
- package/dist/Components/Profile/SocialShareButton.d.ts +6 -0
- package/dist/Components/Profile/Tags.d.ts +2 -0
- package/dist/Components/Profile/TagsWidget.d.ts +6 -0
- package/dist/Components/Profile/UserSettings.d.ts +3 -0
- package/dist/Components/Profile/index.d.ts +8 -1
- package/dist/Components/Profile/useClickOutside.d.ts +2 -0
- package/dist/Components/Templates/CardItem.d.ts +6 -0
- package/dist/Components/Templates/CardPage.d.ts +10 -0
- package/dist/Components/Templates/CircleLayout.d.ts +5 -0
- package/dist/Components/Templates/DateUserInfo.d.ts +4 -0
- package/dist/Components/Templates/DialogModal.d.ts +12 -0
- package/dist/Components/Templates/ItemCard.d.ts +8 -0
- package/dist/Components/Templates/ItemViewPage.d.ts +14 -0
- package/dist/Components/Templates/ItemsIndexPage.d.ts +19 -0
- package/dist/Components/Templates/MapOverlayPage.d.ts +7 -0
- package/dist/Components/Templates/MapOverlayScreen.d.ts +4 -0
- package/dist/Components/Templates/MoonCalendar.d.ts +1 -0
- package/dist/Components/Templates/OverlayItemsIndexPage.d.ts +6 -0
- package/dist/Components/Templates/TagView.d.ts +6 -0
- package/dist/Components/Templates/TitleCard.d.ts +11 -0
- package/dist/Components/Templates/index.d.ts +8 -0
- package/dist/Components/Typography/ErrorText.d.ts +5 -0
- package/dist/Components/Typography/Subtitle.d.ts +4 -4
- package/dist/Utils/DynamicHeroIcon.d.ts +2 -0
- package/dist/Utils/FormatTags.d.ts +2 -0
- package/dist/Utils/GetValue.d.ts +1 -0
- package/dist/Utils/HashTagRegex.d.ts +1 -0
- package/dist/Utils/Moon.d.ts +7 -0
- package/dist/Utils/RandomColor.d.ts +1 -0
- package/dist/Utils/ReplaceURLs.d.ts +3 -1
- package/dist/Utils/ReverseGeocoder.d.ts +1 -0
- package/dist/Utils/TimeAgo.d.ts +1 -0
- package/dist/index.d.ts +5 -3
- package/dist/index.js +5213 -841
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +99 -12
- package/dist/workspace/utopia-ui/src/Components/AppShell/AppShell.d.ts +8 -0
- package/dist/workspace/utopia-ui/src/Components/AppShell/Content.d.ts +6 -0
- package/dist/workspace/utopia-ui/src/Components/AppShell/NavBar.d.ts +4 -0
- package/dist/workspace/utopia-ui/src/Components/AppShell/SetAssetsApi.d.ts +4 -0
- package/dist/workspace/utopia-ui/src/Components/AppShell/SideBar.d.ts +12 -0
- package/dist/workspace/utopia-ui/src/Components/AppShell/SidebarSubmenu.d.ts +7 -0
- package/dist/workspace/utopia-ui/src/Components/AppShell/hooks/useAssets.d.ts +13 -0
- package/dist/workspace/utopia-ui/src/Components/AppShell/index.d.ts +3 -0
- package/dist/workspace/utopia-ui/src/Components/Auth/LoginPage.d.ts +1 -0
- package/dist/workspace/utopia-ui/src/Components/Auth/RequestPasswordPage.d.ts +3 -0
- package/dist/workspace/utopia-ui/src/Components/Auth/SetNewPasswordPage.d.ts +1 -0
- package/dist/workspace/utopia-ui/src/Components/Auth/SignupPage.d.ts +1 -0
- package/dist/workspace/utopia-ui/src/Components/Auth/index.d.ts +5 -0
- package/dist/workspace/utopia-ui/src/Components/Auth/useAuth.d.ts +26 -0
- package/dist/workspace/utopia-ui/src/Components/Gaming/Modal.d.ts +5 -0
- package/dist/workspace/utopia-ui/src/Components/Gaming/Quests.d.ts +1 -0
- package/dist/workspace/utopia-ui/src/Components/Gaming/hooks/useQuests.d.ts +13 -0
- package/dist/workspace/utopia-ui/src/Components/Gaming/index.d.ts +2 -0
- package/dist/workspace/utopia-ui/src/Components/Input/Autocomplete.d.ts +7 -0
- package/dist/workspace/utopia-ui/src/Components/Input/SelectBox.d.ts +16 -0
- package/dist/workspace/utopia-ui/src/Components/Input/TextAreaInput.d.ts +12 -0
- package/dist/workspace/utopia-ui/src/Components/Input/TextInput.d.ts +14 -0
- package/dist/workspace/utopia-ui/src/Components/Input/index.d.ts +3 -0
- package/dist/workspace/utopia-ui/src/Components/Map/ItemForm.d.ts +18 -0
- package/dist/workspace/utopia-ui/src/Components/Map/ItemView.d.ts +16 -0
- package/dist/workspace/utopia-ui/src/Components/Map/Layer.d.ts +2 -0
- package/dist/workspace/utopia-ui/src/Components/Map/Permissions.d.ts +6 -0
- package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/AddButton.d.ts +4 -0
- package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/Controls/Control.d.ts +6 -0
- package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/Controls/LayerControl.d.ts +1 -0
- package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/Controls/LocateControl.d.ts +3 -0
- package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/Controls/QuestControl.d.ts +1 -0
- package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/Controls/SearchControl.d.ts +3 -0
- package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/Controls/TagsControl.d.ts +1 -0
- package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/ItemFormPopup.d.ts +11 -0
- package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/ItemPopupComponents/HeaderView.d.ts +7 -0
- package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/ItemPopupComponents/PopupButton.d.ts +8 -0
- package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/ItemPopupComponents/PopupStartEndInput.d.ts +4 -0
- package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/ItemPopupComponents/PopupTextAreaInput.d.ts +7 -0
- package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/ItemPopupComponents/PopupTextInput.d.ts +7 -0
- package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/ItemPopupComponents/StartEndView.d.ts +4 -0
- package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/ItemPopupComponents/TextView.d.ts +6 -0
- package/dist/workspace/utopia-ui/src/Components/Map/Subcomponents/ItemViewPopup.d.ts +9 -0
- package/dist/workspace/utopia-ui/src/Components/Map/Tags.d.ts +5 -0
- package/dist/workspace/utopia-ui/src/Components/Map/UtopiaMap.d.ts +11 -0
- package/dist/workspace/utopia-ui/src/Components/Map/hooks/useDebounce.d.ts +1 -0
- package/dist/workspace/utopia-ui/src/Components/Map/hooks/useFilter.d.ts +32 -0
- package/dist/workspace/utopia-ui/src/Components/Map/hooks/useItems.d.ts +26 -0
- package/dist/workspace/utopia-ui/src/Components/Map/hooks/useLayers.d.ts +14 -0
- package/dist/workspace/utopia-ui/src/Components/Map/hooks/useLeafletRefs.d.ts +22 -0
- package/dist/workspace/utopia-ui/src/Components/Map/hooks/usePermissions.d.ts +20 -0
- package/dist/workspace/utopia-ui/src/Components/Map/hooks/useTags.d.ts +22 -0
- package/dist/workspace/utopia-ui/src/Components/Map/hooks/useTimeout.d.ts +4 -0
- package/dist/workspace/utopia-ui/src/Components/Map/hooks/useWindowDimension.d.ts +4 -0
- package/dist/workspace/utopia-ui/src/Components/Map/index.d.ts +12 -0
- package/dist/workspace/utopia-ui/src/Components/Profile/ColorPicker.d.ts +6 -0
- package/dist/workspace/utopia-ui/src/Components/Profile/Editor.d.ts +4 -0
- package/dist/workspace/utopia-ui/src/Components/Profile/OverlayProfile.d.ts +1 -0
- package/dist/workspace/utopia-ui/src/Components/Profile/OverlayProfileSettings.d.ts +1 -0
- package/dist/workspace/utopia-ui/src/Components/Profile/OverlayUserSettings.d.ts +1 -0
- package/dist/workspace/utopia-ui/src/Components/Profile/ProfileSettings.d.ts +3 -0
- package/dist/workspace/utopia-ui/src/Components/Profile/TagsWidget.d.ts +6 -0
- package/dist/workspace/utopia-ui/src/Components/Profile/UserSettings.d.ts +3 -0
- package/dist/workspace/utopia-ui/src/Components/Profile/index.d.ts +5 -0
- package/dist/workspace/utopia-ui/src/Components/Profile/useClickOutside.d.ts +2 -0
- package/dist/workspace/utopia-ui/src/Components/Templates/CardPage.d.ts +10 -0
- package/dist/workspace/utopia-ui/src/Components/Templates/CircleLayout.d.ts +5 -0
- package/dist/workspace/utopia-ui/src/Components/Templates/DialogModal.d.ts +10 -0
- package/dist/workspace/utopia-ui/src/Components/Templates/ItemsIndexPage.d.ts +15 -0
- package/dist/workspace/utopia-ui/src/Components/Templates/MapOverlayPage.d.ts +7 -0
- package/dist/workspace/utopia-ui/src/Components/Templates/MoonCalendar.d.ts +1 -0
- package/dist/workspace/utopia-ui/src/Components/Templates/TagView.d.ts +6 -0
- package/dist/workspace/utopia-ui/src/Components/Templates/TitleCard.d.ts +11 -0
- package/dist/workspace/utopia-ui/src/Components/Templates/index.d.ts +6 -0
- package/dist/workspace/utopia-ui/src/Components/Typography/ErrorText.d.ts +5 -0
- package/dist/workspace/utopia-ui/src/Components/Typography/Subtitle.d.ts +6 -0
- package/dist/workspace/utopia-ui/src/Utils/FormatTags.d.ts +2 -0
- package/dist/workspace/utopia-ui/src/Utils/GetValue.d.ts +1 -0
- package/dist/workspace/utopia-ui/src/Utils/HashTagRegex.d.ts +1 -0
- package/dist/workspace/utopia-ui/src/Utils/MarkerIconFactory.d.ts +3 -0
- package/dist/workspace/utopia-ui/src/Utils/Moon.d.ts +7 -0
- package/dist/workspace/utopia-ui/src/Utils/RandomColor.d.ts +1 -0
- package/dist/workspace/utopia-ui/src/Utils/ReplaceURLs.d.ts +3 -0
- package/dist/workspace/utopia-ui/src/Utils/TimeAgo.d.ts +1 -0
- package/dist/workspace/utopia-ui/src/index.d.ts +13 -0
- package/dist/workspace/utopia-ui/src/types.d.ts +108 -0
- package/package.json +18 -6
- package/LICENSE.md +0 -5
- package/dist/Components/Auth/authDirectus.d.ts +0 -30
- package/dist/Components/Input/InputText.d.ts +0 -12
- package/dist/Components/TitleCard.d.ts +0 -9
- package/dist/Utils/HeighlightTags.d.ts +0 -2
@@ -0,0 +1,38 @@
|
|
1
|
+
import * as React from "react";
|
2
|
+
import { LayerProps, Tag } from "../../../types";
|
3
|
+
declare type UseFilterManagerResult = ReturnType<typeof useFilterManager>;
|
4
|
+
declare function useFilterManager(initialTags: Tag[]): {
|
5
|
+
filterTags: Tag[];
|
6
|
+
searchPhrase: string;
|
7
|
+
visibleLayers: LayerProps[];
|
8
|
+
addFilterTag: (tag: Tag) => void;
|
9
|
+
removeFilterTag: (name: string) => void;
|
10
|
+
resetFilterTags: () => void;
|
11
|
+
setSearchPhrase: (phrase: string) => void;
|
12
|
+
addVisibleLayer: (layer: LayerProps) => void;
|
13
|
+
toggleVisibleLayer: (layer: LayerProps) => void;
|
14
|
+
resetVisibleLayers: () => void;
|
15
|
+
isLayerVisible: (layer: LayerProps) => boolean;
|
16
|
+
addVisibleGroupType: (groupType: string) => void;
|
17
|
+
toggleVisibleGroupType: (groupType: string) => void;
|
18
|
+
isGroupTypeVisible: (groupType: string) => boolean;
|
19
|
+
};
|
20
|
+
export declare const FilterProvider: React.FunctionComponent<{
|
21
|
+
initialTags: Tag[];
|
22
|
+
children?: React.ReactNode;
|
23
|
+
}>;
|
24
|
+
export declare const useFilterTags: () => Tag[];
|
25
|
+
export declare const useAddFilterTag: () => UseFilterManagerResult["addFilterTag"];
|
26
|
+
export declare const useRemoveFilterTag: () => UseFilterManagerResult["removeFilterTag"];
|
27
|
+
export declare const useResetFilterTags: () => UseFilterManagerResult["resetFilterTags"];
|
28
|
+
export declare const useSearchPhrase: () => UseFilterManagerResult["searchPhrase"];
|
29
|
+
export declare const useSetSearchPhrase: () => UseFilterManagerResult["setSearchPhrase"];
|
30
|
+
export declare const useVisibleLayer: () => UseFilterManagerResult["visibleLayers"];
|
31
|
+
export declare const useAddVisibleLayer: () => UseFilterManagerResult["addVisibleLayer"];
|
32
|
+
export declare const useToggleVisibleLayer: () => UseFilterManagerResult["toggleVisibleLayer"];
|
33
|
+
export declare const useResetVisibleLayers: () => UseFilterManagerResult["resetVisibleLayers"];
|
34
|
+
export declare const useIsLayerVisible: () => UseFilterManagerResult["isLayerVisible"];
|
35
|
+
export declare const useAddVisibleGroupType: () => UseFilterManagerResult["addVisibleGroupType"];
|
36
|
+
export declare const useToggleVisibleGroupType: () => UseFilterManagerResult["toggleVisibleGroupType"];
|
37
|
+
export declare const useIsGroupTypeVisible: () => UseFilterManagerResult["isGroupTypeVisible"];
|
38
|
+
export {};
|
@@ -7,6 +7,9 @@ declare function useItemsManager(initialItems: Item[]): {
|
|
7
7
|
updateItem: (item: Item) => void;
|
8
8
|
removeItem: (item: Item) => void;
|
9
9
|
resetItems: (layer: LayerProps) => void;
|
10
|
+
setItemsApi: (layer: LayerProps) => void;
|
11
|
+
setItemsData: (layer: LayerProps) => void;
|
12
|
+
allItemsLoaded: boolean;
|
10
13
|
};
|
11
14
|
export declare const ItemsProvider: React.FunctionComponent<{
|
12
15
|
initialItems: Item[];
|
@@ -17,4 +20,7 @@ export declare const useAddItem: () => UseItemManagerResult["addItem"];
|
|
17
20
|
export declare const useUpdateItem: () => UseItemManagerResult["updateItem"];
|
18
21
|
export declare const useRemoveItem: () => UseItemManagerResult["removeItem"];
|
19
22
|
export declare const useResetItems: () => UseItemManagerResult["resetItems"];
|
23
|
+
export declare const useSetItemsApi: () => UseItemManagerResult["setItemsApi"];
|
24
|
+
export declare const useSetItemsData: () => UseItemManagerResult["setItemsData"];
|
25
|
+
export declare const useAllItemsLoaded: () => UseItemManagerResult["allItemsLoaded"];
|
20
26
|
export {};
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import * as React from "react";
|
2
|
+
import { Item } from "../../../types";
|
3
|
+
import { Marker, Popup } from "leaflet";
|
4
|
+
declare type LeafletRef = {
|
5
|
+
item: Item;
|
6
|
+
marker: Marker;
|
7
|
+
popup: Popup;
|
8
|
+
};
|
9
|
+
declare type UseLeafletRefsManagerResult = ReturnType<typeof useLeafletRefsManager>;
|
10
|
+
declare function useLeafletRefsManager(initialLeafletRefs: {}): {
|
11
|
+
leafletRefs: Record<string, LeafletRef>;
|
12
|
+
addMarker: (item: Item, marker: Marker) => void;
|
13
|
+
addPopup: (item: Item, popup: Popup) => void;
|
14
|
+
};
|
15
|
+
export declare const LeafletRefsProvider: React.FunctionComponent<{
|
16
|
+
initialLeafletRefs: {};
|
17
|
+
children?: React.ReactNode;
|
18
|
+
}>;
|
19
|
+
export declare const useLeafletRefs: () => Record<string, LeafletRef>;
|
20
|
+
export declare const useAddMarker: () => UseLeafletRefsManagerResult["addMarker"];
|
21
|
+
export declare const useAddPopup: () => UseLeafletRefsManagerResult["addPopup"];
|
22
|
+
export {};
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import * as React from "react";
|
2
|
+
import { Item, ItemsApi, LayerProps, Permission, PermissionAction } from "../../../types";
|
3
|
+
declare type UsePermissionManagerResult = ReturnType<typeof usePermissionsManager>;
|
4
|
+
declare function usePermissionsManager(initialPermissions: Permission[]): {
|
5
|
+
permissions: Permission[];
|
6
|
+
setPermissionApi: (api: ItemsApi<any>) => void;
|
7
|
+
setPermissionData: (data: Permission[]) => void;
|
8
|
+
setAdminRole: (adminRole: string) => void;
|
9
|
+
hasUserPermission: (collectionName: string, action: PermissionAction, item?: Item, layer?: LayerProps) => boolean;
|
10
|
+
};
|
11
|
+
export declare const PermissionsProvider: React.FunctionComponent<{
|
12
|
+
initialPermissions: Permission[];
|
13
|
+
children?: React.ReactNode;
|
14
|
+
}>;
|
15
|
+
export declare const usePermissions: () => Permission[];
|
16
|
+
export declare const useSetPermissionApi: () => UsePermissionManagerResult["setPermissionApi"];
|
17
|
+
export declare const useSetPermissionData: () => UsePermissionManagerResult["setPermissionData"];
|
18
|
+
export declare const useHasUserPermission: () => UsePermissionManagerResult["hasUserPermission"];
|
19
|
+
export declare const useSetAdminRole: () => UsePermissionManagerResult["setAdminRole"];
|
20
|
+
export {};
|
@@ -0,0 +1,23 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { Item, LayerProps } from '../../../types';
|
3
|
+
import { LatLng } from "leaflet";
|
4
|
+
import { ItemFormPopupProps } from "../Subcomponents/ItemFormPopup";
|
5
|
+
declare type PolygonClickedProps = {
|
6
|
+
position: LatLng;
|
7
|
+
setItemFormPopup: React.Dispatch<React.SetStateAction<ItemFormPopupProps | null>>;
|
8
|
+
};
|
9
|
+
declare type UseSelectPositionManagerResult = ReturnType<typeof useSelectPositionManager>;
|
10
|
+
declare function useSelectPositionManager(): {
|
11
|
+
selectPosition: Item | LayerProps | null;
|
12
|
+
setSelectPosition: React.Dispatch<React.SetStateAction<Item | LayerProps | null>>;
|
13
|
+
setMarkerClicked: React.Dispatch<React.SetStateAction<Item>>;
|
14
|
+
setMapClicked: React.Dispatch<React.SetStateAction<PolygonClickedProps | undefined>>;
|
15
|
+
};
|
16
|
+
export declare const SelectPositionProvider: React.FunctionComponent<{
|
17
|
+
children?: React.ReactNode;
|
18
|
+
}>;
|
19
|
+
export declare const useSelectPosition: () => Item | LayerProps | null;
|
20
|
+
export declare const useSetSelectPosition: () => UseSelectPositionManagerResult["setSelectPosition"];
|
21
|
+
export declare const useSetMarkerClicked: () => UseSelectPositionManagerResult["setMarkerClicked"];
|
22
|
+
export declare const useSetMapClicked: () => UseSelectPositionManagerResult["setMapClicked"];
|
23
|
+
export {};
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { Item, LayerProps } from '../../../types';
|
3
|
+
declare type UseSelectPositionManagerResult = ReturnType<typeof useSelectPositionManager>;
|
4
|
+
declare function useSelectPositionManager(): {
|
5
|
+
selectPosition: Item | LayerProps | null;
|
6
|
+
setSelectPosition: React.Dispatch<React.SetStateAction<Item | LayerProps | null>>;
|
7
|
+
};
|
8
|
+
export declare const SelectPositionProvider: React.FunctionComponent<{
|
9
|
+
children?: React.ReactNode;
|
10
|
+
}>;
|
11
|
+
export declare const useSelectPosition: () => Item | LayerProps | null;
|
12
|
+
export declare const useSetSelectPosition: () => UseSelectPositionManagerResult["setSelectPosition"];
|
13
|
+
export {};
|
@@ -1,10 +1,13 @@
|
|
1
1
|
import * as React from "react";
|
2
|
-
import { Tag } from "../../../types";
|
2
|
+
import { Item, ItemsApi, Tag } from "../../../types";
|
3
3
|
declare type UseTagManagerResult = ReturnType<typeof useTagsManager>;
|
4
4
|
declare function useTagsManager(initialTags: Tag[]): {
|
5
5
|
tags: Tag[];
|
6
6
|
addTag: (tag: Tag) => void;
|
7
|
-
|
7
|
+
setTagApi: (api: ItemsApi<Tag>) => void;
|
8
|
+
setTagData: (data: Tag[]) => void;
|
9
|
+
getItemTags: (item: Item) => Tag[];
|
10
|
+
allTagsLoaded: boolean;
|
8
11
|
};
|
9
12
|
export declare const TagsProvider: React.FunctionComponent<{
|
10
13
|
initialTags: Tag[];
|
@@ -12,5 +15,8 @@ export declare const TagsProvider: React.FunctionComponent<{
|
|
12
15
|
}>;
|
13
16
|
export declare const useTags: () => Tag[];
|
14
17
|
export declare const useAddTag: () => UseTagManagerResult["addTag"];
|
15
|
-
export declare const
|
18
|
+
export declare const useSetTagApi: () => UseTagManagerResult["setTagApi"];
|
19
|
+
export declare const useSetTagData: () => UseTagManagerResult["setTagData"];
|
20
|
+
export declare const useGetItemTags: () => UseTagManagerResult["getItemTags"];
|
21
|
+
export declare const useAllTagsLoaded: () => UseTagManagerResult["allTagsLoaded"];
|
16
22
|
export {};
|
@@ -1,3 +1,13 @@
|
|
1
|
-
export { UtopiaMap
|
1
|
+
export { UtopiaMap } from './UtopiaMap';
|
2
2
|
export { Layer } from './Layer';
|
3
3
|
export { Tags } from "./Tags";
|
4
|
+
export { Permissions } from "./Permissions";
|
5
|
+
export { ItemForm } from './ItemForm';
|
6
|
+
export { ItemView } from './ItemView';
|
7
|
+
export { PopupTextAreaInput } from './Subcomponents/ItemPopupComponents/PopupTextAreaInput';
|
8
|
+
export { PopupStartEndInput } from './Subcomponents/ItemPopupComponents/PopupStartEndInput';
|
9
|
+
export { PopupTextInput } from './Subcomponents/ItemPopupComponents/PopupTextInput';
|
10
|
+
export { PopupCheckboxInput } from './Subcomponents/ItemPopupComponents/PopupCheckboxInput';
|
11
|
+
export { TextView } from './Subcomponents/ItemPopupComponents/TextView';
|
12
|
+
export { StartEndView } from './Subcomponents/ItemPopupComponents/StartEndView';
|
13
|
+
export { PopupButton } from './Subcomponents/ItemPopupComponents/PopupButton';
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const setItemLocation: () => import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { Item } from "../../types";
|
2
|
+
export declare function ActionButton({ item, triggerAddButton, triggerItemSelected, existingRelations, itemType, colorField, collection, customStyle }: {
|
3
|
+
triggerAddButton?: any;
|
4
|
+
triggerItemSelected?: any;
|
5
|
+
existingRelations: Item[];
|
6
|
+
itemType?: string;
|
7
|
+
colorField?: string;
|
8
|
+
collection?: string;
|
9
|
+
customStyle?: string;
|
10
|
+
item: Item;
|
11
|
+
}): import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const OverlayItemProfileSettings: () => import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { Item } from "../../types";
|
2
|
+
export declare function LinkedItemsHeaderView({ item, unlinkCallback, itemNameField, itemAvatarField, loading, unlinkPermission, itemSubnameField }: {
|
3
|
+
item: Item;
|
4
|
+
unlinkCallback?: any;
|
5
|
+
itemNameField?: string;
|
6
|
+
itemAvatarField?: string;
|
7
|
+
itemSubnameField?: string;
|
8
|
+
loading?: boolean;
|
9
|
+
unlinkPermission: boolean;
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function OverlayProfile(): import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function OverlayProfileSettings(): import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function OverlayUserSettings(): import("react/jsx-runtime").JSX.Element;
|
@@ -1 +1,8 @@
|
|
1
|
-
export {
|
1
|
+
export { UserSettings } from './UserSettings';
|
2
|
+
export { ProfileSettings } from './ProfileSettings';
|
3
|
+
export { OverlayProfile } from './OverlayProfile';
|
4
|
+
export { OverlayProfileSettings } from './OverlayProfileSettings';
|
5
|
+
export { OverlayUserSettings } from './OverlayUserSettings';
|
6
|
+
export { OverlayItemProfile } from './OverlayItemProfile';
|
7
|
+
export { OverlayItemProfileSettings } from './OverlayItemProfileSettings';
|
8
|
+
export { PlusButton } from "./PlusButton";
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import * as React from "react";
|
2
|
+
export declare function CardPage({ title, hideTitle, children, parents }: {
|
3
|
+
title: string;
|
4
|
+
hideTitle?: boolean;
|
5
|
+
children?: React.ReactNode;
|
6
|
+
parents?: Array<{
|
7
|
+
name: string;
|
8
|
+
path: string;
|
9
|
+
}>;
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import * as React from "react";
|
2
|
+
declare type Props = {
|
3
|
+
title: string;
|
4
|
+
isOpened: boolean;
|
5
|
+
onClose: () => void;
|
6
|
+
children: React.ReactNode;
|
7
|
+
showCloseButton?: boolean;
|
8
|
+
closeOnClickOutside?: boolean;
|
9
|
+
className?: string;
|
10
|
+
};
|
11
|
+
declare const DialogModal: ({ title, isOpened, onClose, children, showCloseButton, closeOnClickOutside, className, }: Props) => import("react/jsx-runtime").JSX.Element;
|
12
|
+
export default DialogModal;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { Item } from '../../types';
|
2
|
+
export declare const ItemCard: ({ i, loading, url, parameterField, deleteCallback }: {
|
3
|
+
i: Item;
|
4
|
+
loading: boolean;
|
5
|
+
url: string;
|
6
|
+
parameterField: string;
|
7
|
+
deleteCallback: any;
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { ItemsApi } from "../../types";
|
2
|
+
declare type breadcrumb = {
|
3
|
+
name: string;
|
4
|
+
path: string;
|
5
|
+
};
|
6
|
+
export declare const ItemViewPage: ({ api, parents, itemNameField, itemTextField, itemImageField, itemSymbolField }: {
|
7
|
+
api: ItemsApi<any>;
|
8
|
+
parents: Array<breadcrumb>;
|
9
|
+
itemNameField: string;
|
10
|
+
itemTextField: string;
|
11
|
+
itemImageField: string;
|
12
|
+
itemSymbolField: string;
|
13
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
14
|
+
export {};
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { ReactNode } from 'react';
|
2
|
+
import { ItemsApi } from '../../types';
|
3
|
+
declare type breadcrumb = {
|
4
|
+
name: string;
|
5
|
+
path: string;
|
6
|
+
};
|
7
|
+
export declare const ItemsIndexPage: ({ api, url, parameterField, breadcrumbs, itemNameField, itemTextField, itemImageField, itemSymbolField, itemSubnameField, children }: {
|
8
|
+
api: ItemsApi<any>;
|
9
|
+
url: string;
|
10
|
+
parameterField: string;
|
11
|
+
breadcrumbs: Array<breadcrumb>;
|
12
|
+
itemNameField: string;
|
13
|
+
itemTextField: string;
|
14
|
+
itemImageField: string;
|
15
|
+
itemSymbolField: string;
|
16
|
+
itemSubnameField: string;
|
17
|
+
children?: ReactNode;
|
18
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
19
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const MoonCalendar: () => import("react/jsx-runtime").JSX.Element;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import * as React from "react";
|
2
|
+
interface TitleCardProps {
|
3
|
+
title?: string;
|
4
|
+
hideTitle?: boolean;
|
5
|
+
children?: React.ReactNode;
|
6
|
+
topMargin?: string;
|
7
|
+
className?: string;
|
8
|
+
TopSideButtons?: any;
|
9
|
+
}
|
10
|
+
export declare function TitleCard({ title, hideTitle, children, topMargin, TopSideButtons, className }: TitleCardProps): import("react/jsx-runtime").JSX.Element;
|
11
|
+
export {};
|
@@ -0,0 +1,8 @@
|
|
1
|
+
export { CardPage } from './CardPage';
|
2
|
+
export { TitleCard } from './TitleCard';
|
3
|
+
export { MapOverlayPage } from './MapOverlayPage';
|
4
|
+
export { CircleLayout } from './CircleLayout';
|
5
|
+
export { MoonCalendar } from './MoonCalendar';
|
6
|
+
export { ItemsIndexPage } from "./ItemsIndexPage";
|
7
|
+
export { ItemViewPage } from "./ItemViewPage";
|
8
|
+
export { OverlayItemsIndexPage } from "./OverlayItemsIndexPage";
|
@@ -1,6 +1,6 @@
|
|
1
|
-
|
1
|
+
import * as React from "react";
|
2
2
|
declare function Subtitle({ styleClass, children }: {
|
3
|
-
styleClass:
|
4
|
-
children:
|
5
|
-
}): JSX.Element;
|
3
|
+
styleClass: string;
|
4
|
+
children: React.ReactNode;
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
6
6
|
export default Subtitle;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function getValue(obj: any, path: any): any;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const hashTagRegex: RegExp;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
export declare const LUNAR_MONTH: number;
|
2
|
+
export declare const getJulianDate: (date?: Date) => number;
|
3
|
+
export declare const normalize: (value: number) => number;
|
4
|
+
export declare const getLunarAgePercent: (date?: Date) => number;
|
5
|
+
export declare const getLunarAge: (date?: Date) => number;
|
6
|
+
export declare const getNextNewMoon: () => Date;
|
7
|
+
export declare const getLastNewMoon: (date?: Date) => Date;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const randomColor: () => string;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function reverseGeocode(lat: number, lon: number): Promise<string>;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const timeAgo: (date: string | number | Date) => string;
|
package/dist/index.d.ts
CHANGED
@@ -1,8 +1,10 @@
|
|
1
|
-
export { UtopiaMap, Layer, Tags,
|
1
|
+
export { UtopiaMap, Layer, Tags, Permissions, ItemForm, ItemView, PopupTextAreaInput, PopupStartEndInput, PopupTextInput, PopupButton, TextView, StartEndView, PopupCheckboxInput } from './Components/Map';
|
2
2
|
export { AppShell, Content, SideBar } from "./Components/AppShell";
|
3
|
-
export {
|
4
|
-
export {
|
3
|
+
export { AuthProvider, useAuth, LoginPage, SignupPage, RequestPasswordPage, SetNewPasswordPage } from "./Components/Auth";
|
4
|
+
export { UserSettings, ProfileSettings, OverlayProfile, OverlayProfileSettings, OverlayUserSettings, OverlayItemProfile, OverlayItemProfileSettings } from './Components/Profile';
|
5
5
|
export { Quests, Modal } from './Components/Gaming';
|
6
|
+
export { TitleCard, CardPage, MapOverlayPage, OverlayItemsIndexPage, CircleLayout, MoonCalendar, ItemsIndexPage, ItemViewPage } from './Components/Templates';
|
7
|
+
export { TextInput, TextAreaInput, SelectBox } from './Components/Input';
|
6
8
|
import "./index.css";
|
7
9
|
declare global {
|
8
10
|
interface Window {
|