utopia-ui 3.0.0-alpha.4 → 3.0.0-alpha.6
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/Components/Input/FancyTextAreaInput.d.ts +13 -0
- package/dist/Components/Input/TributeTextAreaInput copy.d.ts +13 -0
- package/dist/Components/Input/TributeTextAreaInput.d.ts +13 -0
- package/dist/Components/Map/Subcomponents/FilterControl.d.ts +2 -0
- package/dist/Components/Map/Subcomponents/ItemFormPopup.d.ts +1 -2
- package/dist/Components/Map/Subcomponents/SearchBar.d.ts +2 -0
- package/dist/Components/Map/Subcomponents/TagFilterControl.d.ts +2 -0
- package/dist/Components/Map/Tags.d.ts +4 -3
- package/dist/Components/Map/hooks/useFilter.d.ts +22 -0
- package/dist/Components/Map/hooks/useItems.d.ts +4 -0
- package/dist/Components/Map/hooks/useTags.d.ts +5 -1
- package/dist/Utils/HashTagRegex.d.ts +1 -0
- package/dist/Utils/HeighlightTags.d.ts +1 -2
- package/dist/Utils/RandomColor.d.ts +1 -0
- package/dist/Utils/ReplaceURLs.d.ts +3 -1
- package/dist/Utils/TaggedText.d.ts +3 -0
- package/dist/index.js +490 -173
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +3 -4
- package/package.json +3 -1
@@ -0,0 +1,13 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
declare type TextAreaProps = {
|
3
|
+
labelTitle?: string;
|
4
|
+
labelStyle?: string;
|
5
|
+
containerStyle?: string;
|
6
|
+
dataField?: string;
|
7
|
+
inputStyle?: string;
|
8
|
+
defaultValue: string;
|
9
|
+
placeholder?: string;
|
10
|
+
updateFormValue?: (value: string) => void;
|
11
|
+
};
|
12
|
+
export declare function FancyTextAreaInput({ labelTitle, dataField, labelStyle, containerStyle, inputStyle, defaultValue, placeholder, updateFormValue }: TextAreaProps): JSX.Element;
|
13
|
+
export {};
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
declare type TextAreaProps = {
|
3
|
+
labelTitle?: string;
|
4
|
+
labelStyle?: string;
|
5
|
+
containerStyle?: string;
|
6
|
+
dataField?: string;
|
7
|
+
inputStyle?: string;
|
8
|
+
defaultValue: string;
|
9
|
+
placeholder?: string;
|
10
|
+
updateFormValue?: (value: string) => void;
|
11
|
+
};
|
12
|
+
export declare function TextAreaInput({ labelTitle, dataField, labelStyle, containerStyle, inputStyle, defaultValue, placeholder, updateFormValue }: TextAreaProps): JSX.Element;
|
13
|
+
export {};
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
declare type TextAreaProps = {
|
3
|
+
labelTitle?: string;
|
4
|
+
labelStyle?: string;
|
5
|
+
containerStyle?: string;
|
6
|
+
dataField?: string;
|
7
|
+
inputStyle?: string;
|
8
|
+
defaultValue: string;
|
9
|
+
placeholder?: string;
|
10
|
+
updateFormValue?: (value: string) => void;
|
11
|
+
};
|
12
|
+
export declare function TributeTextAreaInput({ labelTitle, dataField, labelStyle, containerStyle, inputStyle, defaultValue, placeholder, updateFormValue }: TextAreaProps): JSX.Element;
|
13
|
+
export {};
|
@@ -1,11 +1,10 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import { LatLng } from 'leaflet';
|
3
|
-
import { LayerProps, Item
|
3
|
+
import { LayerProps, Item } from '../../../types';
|
4
4
|
export interface ItemFormPopupProps {
|
5
5
|
position: LatLng;
|
6
6
|
layer: LayerProps;
|
7
7
|
item?: Item;
|
8
|
-
api?: ItemsApi<any>;
|
9
8
|
children?: React.ReactNode;
|
10
9
|
setItemFormPopup: React.Dispatch<React.SetStateAction<any>>;
|
11
10
|
}
|
@@ -1,5 +1,6 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import { Tag } from '../../types';
|
3
|
-
export declare function Tags({ data }: {
|
4
|
-
data
|
2
|
+
import { ItemsApi, Tag } from '../../types';
|
3
|
+
export declare function Tags({ data, api }: {
|
4
|
+
data?: Tag[];
|
5
|
+
api?: ItemsApi<Tag>;
|
5
6
|
}): JSX.Element;
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import * as React from "react";
|
2
|
+
import { Tag } from "../../../types";
|
3
|
+
declare type UseFilterManagerResult = ReturnType<typeof useFilterManager>;
|
4
|
+
declare function useFilterManager(initialTags: Tag[]): {
|
5
|
+
filterTags: Tag[];
|
6
|
+
searchPhrase: string;
|
7
|
+
addFilterTag: (tag: Tag) => void;
|
8
|
+
removeFilterTag: (id: string) => void;
|
9
|
+
resetFilterTags: () => void;
|
10
|
+
setSearchPhrase: (phrase: string) => void;
|
11
|
+
};
|
12
|
+
export declare const FilterProvider: React.FunctionComponent<{
|
13
|
+
initialTags: Tag[];
|
14
|
+
children?: React.ReactNode;
|
15
|
+
}>;
|
16
|
+
export declare const useFilterTags: () => Tag[];
|
17
|
+
export declare const useAddFilterTag: () => UseFilterManagerResult["addFilterTag"];
|
18
|
+
export declare const useRemoveFilterTag: () => UseFilterManagerResult["removeFilterTag"];
|
19
|
+
export declare const useResetFilterTags: () => UseFilterManagerResult["resetFilterTags"];
|
20
|
+
export declare const useSearchPhrase: () => UseFilterManagerResult["searchPhrase"];
|
21
|
+
export declare const useSetSearchPhrase: () => UseFilterManagerResult["setSearchPhrase"];
|
22
|
+
export {};
|
@@ -7,6 +7,8 @@ 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;
|
10
12
|
};
|
11
13
|
export declare const ItemsProvider: React.FunctionComponent<{
|
12
14
|
initialItems: Item[];
|
@@ -17,4 +19,6 @@ export declare const useAddItem: () => UseItemManagerResult["addItem"];
|
|
17
19
|
export declare const useUpdateItem: () => UseItemManagerResult["updateItem"];
|
18
20
|
export declare const useRemoveItem: () => UseItemManagerResult["removeItem"];
|
19
21
|
export declare const useResetItems: () => UseItemManagerResult["resetItems"];
|
22
|
+
export declare const useSetItemsApi: () => UseItemManagerResult["setItemsApi"];
|
23
|
+
export declare const useSetItemsData: () => UseItemManagerResult["setItemsData"];
|
20
24
|
export {};
|
@@ -1,10 +1,12 @@
|
|
1
1
|
import * as React from "react";
|
2
|
-
import { Tag } from "../../../types";
|
2
|
+
import { 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
|
removeTag: (id: string) => void;
|
8
|
+
setTagApi: (api: ItemsApi<Tag>) => void;
|
9
|
+
setTagData: (data: Tag[]) => void;
|
8
10
|
};
|
9
11
|
export declare const TagsProvider: React.FunctionComponent<{
|
10
12
|
initialTags: Tag[];
|
@@ -13,4 +15,6 @@ export declare const TagsProvider: React.FunctionComponent<{
|
|
13
15
|
export declare const useTags: () => Tag[];
|
14
16
|
export declare const useAddTag: () => UseTagManagerResult["addTag"];
|
15
17
|
export declare const useRemoveTag: () => UseTagManagerResult["removeTag"];
|
18
|
+
export declare const useSetTagApi: () => UseTagManagerResult["setTagApi"];
|
19
|
+
export declare const useSetTagData: () => UseTagManagerResult["setTagData"];
|
16
20
|
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const hashTagRegex: RegExp;
|
@@ -1,2 +1 @@
|
|
1
|
-
|
2
|
-
export declare function heighlightTags(message: string, tags: Tag[]): string;
|
1
|
+
export declare const hashTagRegex: RegExp;
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const randomColor: () => string;
|