mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-13 07:46:10 +00:00
remove new lines
This commit is contained in:
parent
2f77dde3da
commit
6d3f2bf38c
@ -12,7 +12,6 @@ const AssetContext = createContext<UseAssetManagerResult>({
|
|||||||
|
|
||||||
function useAssetsManager(): {
|
function useAssetsManager(): {
|
||||||
api: AssetsApi
|
api: AssetsApi
|
||||||
|
|
||||||
setAssetsApi: (api: AssetsApi) => void
|
setAssetsApi: (api: AssetsApi) => void
|
||||||
} {
|
} {
|
||||||
const [api, setApi] = useState<AssetsApi>({} as AssetsApi)
|
const [api, setApi] = useState<AssetsApi>({} as AssetsApi)
|
||||||
|
|||||||
@ -16,18 +16,13 @@ type AuthCredentials = {
|
|||||||
type AuthContextProps = {
|
type AuthContextProps = {
|
||||||
isAuthenticated: boolean
|
isAuthenticated: boolean
|
||||||
user: UserItem | null
|
user: UserItem | null
|
||||||
|
|
||||||
login: (credentials: AuthCredentials) => Promise<UserItem | undefined>
|
login: (credentials: AuthCredentials) => Promise<UserItem | undefined>
|
||||||
|
|
||||||
register: (credentials: AuthCredentials, userName: string) => Promise<UserItem | undefined>
|
register: (credentials: AuthCredentials, userName: string) => Promise<UserItem | undefined>
|
||||||
loading: boolean
|
loading: boolean
|
||||||
logout: () => Promise<any>
|
logout: () => Promise<any>
|
||||||
|
|
||||||
updateUser: (user: UserItem) => any
|
updateUser: (user: UserItem) => any
|
||||||
token: string | null
|
token: string | null
|
||||||
|
|
||||||
requestPasswordReset: (email: string, reset_url: string) => Promise<any>
|
requestPasswordReset: (email: string, reset_url: string) => Promise<any>
|
||||||
|
|
||||||
passwordReset: (token: string, new_password: string) => Promise<any>
|
passwordReset: (token: string, new_password: string) => Promise<any>
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,7 +106,6 @@ export const AuthProvider = ({ userApi, children }: AuthProviderProps) => {
|
|||||||
|
|
||||||
const updateUser = async (user: UserItem) => {
|
const updateUser = async (user: UserItem) => {
|
||||||
setLoading(true)
|
setLoading(true)
|
||||||
|
|
||||||
const { id, ...userRest } = user
|
const { id, ...userRest } = user
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
@ -5,7 +5,6 @@ interface ComboBoxProps {
|
|||||||
id?: string
|
id?: string
|
||||||
options: { value: string; label: string }[]
|
options: { value: string; label: string }[]
|
||||||
value: string
|
value: string
|
||||||
|
|
||||||
onValueChange: (newValue: string) => void
|
onValueChange: (newValue: string) => void
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -11,7 +11,6 @@ type TextAreaProps = {
|
|||||||
inputStyle?: string
|
inputStyle?: string
|
||||||
defaultValue: string
|
defaultValue: string
|
||||||
placeholder?: string
|
placeholder?: string
|
||||||
|
|
||||||
updateFormValue?: (value: string) => void
|
updateFormValue?: (value: string) => void
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -5,9 +5,7 @@ import { Item } from '../../../../types'
|
|||||||
type StartEndInputProps = {
|
type StartEndInputProps = {
|
||||||
item?: Item
|
item?: Item
|
||||||
showLabels?: boolean
|
showLabels?: boolean
|
||||||
|
|
||||||
updateStartValue?: (value: string) => void
|
updateStartValue?: (value: string) => void
|
||||||
|
|
||||||
updateEndValue?: (value: string) => void
|
updateEndValue?: (value: string) => void
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -32,7 +32,6 @@ const FilterContext = createContext<UseFilterManagerResult>({
|
|||||||
toggleVisibleLayer: () => {},
|
toggleVisibleLayer: () => {},
|
||||||
resetVisibleLayers: () => {},
|
resetVisibleLayers: () => {},
|
||||||
isLayerVisible: () => true,
|
isLayerVisible: () => true,
|
||||||
|
|
||||||
addVisibleGroupType: () => {},
|
addVisibleGroupType: () => {},
|
||||||
toggleVisibleGroupType: () => {},
|
toggleVisibleGroupType: () => {},
|
||||||
isGroupTypeVisible: () => true,
|
isGroupTypeVisible: () => true,
|
||||||
@ -45,23 +44,15 @@ function useFilterManager(initialTags: Tag[]): {
|
|||||||
visibleGroupTypes: string[]
|
visibleGroupTypes: string[]
|
||||||
|
|
||||||
addFilterTag: (tag: Tag) => void
|
addFilterTag: (tag: Tag) => void
|
||||||
|
|
||||||
removeFilterTag: (name: string) => void
|
removeFilterTag: (name: string) => void
|
||||||
resetFilterTags: () => void
|
resetFilterTags: () => void
|
||||||
|
|
||||||
setSearchPhrase: (phrase: string) => void
|
setSearchPhrase: (phrase: string) => void
|
||||||
|
|
||||||
addVisibleLayer: (layer: LayerProps) => void
|
addVisibleLayer: (layer: LayerProps) => void
|
||||||
|
|
||||||
toggleVisibleLayer: (layer: LayerProps) => void
|
toggleVisibleLayer: (layer: LayerProps) => void
|
||||||
resetVisibleLayers: () => void
|
resetVisibleLayers: () => void
|
||||||
|
|
||||||
isLayerVisible: (layer: LayerProps) => boolean
|
isLayerVisible: (layer: LayerProps) => boolean
|
||||||
|
|
||||||
addVisibleGroupType: (groupType: string) => void
|
addVisibleGroupType: (groupType: string) => void
|
||||||
|
|
||||||
toggleVisibleGroupType: (groupType: string) => void
|
toggleVisibleGroupType: (groupType: string) => void
|
||||||
|
|
||||||
isGroupTypeVisible: (groupType: string) => boolean
|
isGroupTypeVisible: (groupType: string) => boolean
|
||||||
} {
|
} {
|
||||||
const [filterTags, dispatchTags] = useReducer((state: Tag[], action: ActionType) => {
|
const [filterTags, dispatchTags] = useReducer((state: Tag[], action: ActionType) => {
|
||||||
|
|||||||
@ -25,17 +25,11 @@ const ItemContext = createContext<UseItemManagerResult>({
|
|||||||
|
|
||||||
function useItemsManager(initialItems: Item[]): {
|
function useItemsManager(initialItems: Item[]): {
|
||||||
items: Item[]
|
items: Item[]
|
||||||
|
|
||||||
addItem: (item: Item) => void
|
addItem: (item: Item) => void
|
||||||
|
|
||||||
updateItem: (item: Item) => void
|
updateItem: (item: Item) => void
|
||||||
|
|
||||||
removeItem: (item: Item) => void
|
removeItem: (item: Item) => void
|
||||||
|
|
||||||
resetItems: (layer: LayerProps) => void
|
resetItems: (layer: LayerProps) => void
|
||||||
|
|
||||||
setItemsApi: (layer: LayerProps) => void
|
setItemsApi: (layer: LayerProps) => void
|
||||||
|
|
||||||
setItemsData: (layer: LayerProps) => void
|
setItemsData: (layer: LayerProps) => void
|
||||||
allItemsLoaded: boolean
|
allItemsLoaded: boolean
|
||||||
} {
|
} {
|
||||||
|
|||||||
@ -13,7 +13,6 @@ const LayerContext = createContext<UseItemManagerResult>({
|
|||||||
|
|
||||||
function useLayerManager(initialLayers: LayerProps[]): {
|
function useLayerManager(initialLayers: LayerProps[]): {
|
||||||
layers: LayerProps[]
|
layers: LayerProps[]
|
||||||
|
|
||||||
addLayer: (layer: LayerProps) => void
|
addLayer: (layer: LayerProps) => void
|
||||||
} {
|
} {
|
||||||
const [layers, dispatch] = useReducer((state: LayerProps[], action: ActionType) => {
|
const [layers, dispatch] = useReducer((state: LayerProps[], action: ActionType) => {
|
||||||
|
|||||||
@ -23,9 +23,7 @@ const LeafletRefsContext = createContext<UseLeafletRefsManagerResult>({
|
|||||||
|
|
||||||
function useLeafletRefsManager(initialLeafletRefs: {}): {
|
function useLeafletRefsManager(initialLeafletRefs: {}): {
|
||||||
leafletRefs: Record<string, LeafletRef>
|
leafletRefs: Record<string, LeafletRef>
|
||||||
|
|
||||||
addMarker: (item: Item, marker: Marker) => void
|
addMarker: (item: Item, marker: Marker) => void
|
||||||
|
|
||||||
addPopup: (item: Item, popup: Popup) => void
|
addPopup: (item: Item, popup: Popup) => void
|
||||||
} {
|
} {
|
||||||
const [leafletRefs, dispatch] = useReducer(
|
const [leafletRefs, dispatch] = useReducer(
|
||||||
|
|||||||
@ -17,13 +17,9 @@ const PermissionContext = createContext<UsePermissionManagerResult>({
|
|||||||
|
|
||||||
function usePermissionsManager(initialPermissions: Permission[]): {
|
function usePermissionsManager(initialPermissions: Permission[]): {
|
||||||
permissions: Permission[]
|
permissions: Permission[]
|
||||||
|
|
||||||
setPermissionApi: (api: ItemsApi<any>) => void
|
setPermissionApi: (api: ItemsApi<any>) => void
|
||||||
|
|
||||||
setPermissionData: (data: Permission[]) => void
|
setPermissionData: (data: Permission[]) => void
|
||||||
|
|
||||||
setAdminRole: (adminRole: string) => void
|
setAdminRole: (adminRole: string) => void
|
||||||
|
|
||||||
hasUserPermission: (
|
hasUserPermission: (
|
||||||
collectionName: string,
|
collectionName: string,
|
||||||
action: PermissionAction,
|
action: PermissionAction,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user