@layers-app/shared 0.0.10 → 0.0.12
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/api/giphy/index.d.ts +2 -0
- package/dist/api/giphy/slice.d.ts +11 -0
- package/dist/api/giphy/types.d.ts +127 -0
- package/dist/api/unsplash/index.d.ts +2 -0
- package/dist/api/unsplash/slice.d.ts +11 -0
- package/dist/api/unsplash/types.d.ts +143 -0
- package/dist/components/AlertsBlock/index.d.ts +9 -0
- package/dist/components/AppContainer/AppContainer.d.ts +12 -0
- package/dist/components/AppContainer/components/AllAppsMenu.d.ts +4 -0
- package/dist/components/AppContainer/components/DesktopNavbar.d.ts +3 -0
- package/dist/components/AppContainer/components/MenuUserDropdown.d.ts +29 -0
- package/dist/components/AppContainer/components/MobileNavbar.d.ts +3 -0
- package/dist/components/AppContainer/components/NavbarContent.d.ts +3 -0
- package/dist/components/AppContainer/components/NavbarFooter.d.ts +3 -0
- package/dist/components/AppContainer/components/NavbarHeader.d.ts +3 -0
- package/dist/components/AppContainer/hooks/useAppContainer.d.ts +2 -0
- package/dist/components/AppContainer/hooks/useAppContainerActionsStore.d.ts +2 -0
- package/dist/components/AppContainer/hooks/useAppContainerDataStore.d.ts +2 -0
- package/dist/components/AppContainer/hooks/useAppContainerStore.d.ts +12 -0
- package/dist/components/AppContainer/hooks/useHideHeader.d.ts +1 -0
- package/dist/components/AppContainer/types.d.ts +47 -0
- package/dist/components/AppTour/AppTour.d.ts +7 -0
- package/dist/components/AppTour/FinishModal.d.ts +1 -0
- package/dist/components/AppTour/HelloModal.d.ts +1 -0
- package/dist/components/AppTour/hooks/useAppTour.d.ts +2 -0
- package/dist/components/AppTour/index.d.ts +4 -0
- package/dist/components/AppTour/types.d.ts +17 -0
- package/dist/components/CustomKBD/index.d.ts +19 -0
- package/dist/components/EmojiPicker/EmojiPicker.d.ts +13 -0
- package/dist/components/EmojiPicker/index.d.ts +2 -0
- package/dist/components/EmojiPicker/types.d.ts +8 -0
- package/dist/components/ErrorPage/components/Error404.d.ts +3 -0
- package/dist/components/ErrorPage/components/Error406.d.ts +3 -0
- package/dist/components/ErrorPage/components/Error500.d.ts +3 -0
- package/dist/components/ErrorPage/components/index.d.ts +3 -0
- package/dist/components/ErrorPage/index.d.ts +13 -0
- package/dist/components/ImagePicker/ImagePicker.d.ts +25 -0
- package/dist/components/ImagePicker/ImagePickerGallery.d.ts +5 -0
- package/dist/components/ImagePicker/ImagePickerGiphy.d.ts +6 -0
- package/dist/components/ImagePicker/ImagePickerLink.d.ts +5 -0
- package/dist/components/ImagePicker/ImagePickerSkeletonLoader.d.ts +1 -0
- package/dist/components/ImagePicker/ImagePickerUnsplash.d.ts +6 -0
- package/dist/components/ImagePicker/ImagePickerUpload.d.ts +8 -0
- package/dist/components/ImagePicker/api/giphyApi.d.ts +10 -0
- package/dist/components/ImagePicker/api/unsplashApi.d.ts +10 -0
- package/dist/components/ImagePicker/index.d.ts +1 -0
- package/dist/components/ImagePicker/types.d.ts +29 -0
- package/dist/components/LanguagePicker/index.d.ts +11 -0
- package/dist/components/NavbarResizer/NavbarResizer.d.ts +6 -0
- package/dist/components/NoData/NoData.d.ts +106 -0
- package/dist/components/NoData/index.d.ts +1 -0
- package/dist/components/NotFoundPage/index.d.ts +3 -0
- package/dist/components/Notification/NotificationCard.d.ts +7 -0
- package/dist/components/Notification/index.d.ts +6 -0
- package/dist/components/OnBoarding/OnBoardingPage.d.ts +1 -0
- package/dist/components/OnBoarding/ProjectBoard.d.ts +4 -0
- package/dist/components/OnBoarding/StepsNavBar.d.ts +4 -0
- package/dist/components/OnBoarding/index.d.ts +1 -0
- package/dist/components/OnBoarding/steps/AddMembers/AddMembers.d.ts +2 -0
- package/dist/components/OnBoarding/steps/AddTasks/AddTasksNav.d.ts +2 -0
- package/dist/components/OnBoarding/steps/AddTasks/TasksListBoard.d.ts +2 -0
- package/dist/components/OnBoarding/steps/CreateFirstProject.d.ts +2 -0
- package/dist/components/OnBoarding/steps/InviteUsers/BoardModal.d.ts +2 -0
- package/dist/components/OnBoarding/steps/InviteUsers/InviteUsers.d.ts +2 -0
- package/dist/components/OnBoarding/steps/SelectCategory/CategorySelect.d.ts +2 -0
- package/dist/components/OnBoarding/steps/SelectCategory/SelectCategoryNav.d.ts +2 -0
- package/dist/components/OnBoarding/steps/StartedStep.d.ts +2 -0
- package/dist/components/OnBoarding/steps/Wrapper.d.ts +11 -0
- package/dist/components/SubmitModal/index.d.ts +4 -0
- package/dist/components/UserAvatar/index.d.ts +11 -0
- package/dist/components/WorkspaceAvatar/WorkspaceAvatar.d.ts +8 -0
- package/dist/components/WorkspaceMenu/WorkspaceMenu.d.ts +15 -0
- package/dist/helpers/feature.d.ts +2 -0
- package/dist/helpers/showNotifications.d.ts +10 -0
- package/dist/helpers/themeUtils.d.ts +1 -0
- package/dist/helpers/token.d.ts +3 -0
- package/dist/helpers/validation.d.ts +3 -0
- package/dist/hooks/useDateFnsLocale.d.ts +1 -0
- package/dist/hooks/useFormatDistance.d.ts +1 -0
- package/dist/hooks/useMenu.d.ts +7 -0
- package/dist/hooks/useOAuthErrorParams.d.ts +5 -0
- package/dist/hooks/useSwipeDetect.d.ts +6 -0
- package/dist/index.d.ts +31 -480
- package/dist/index.js +11933 -226
- package/dist/index.umd.cjs +817 -0
- package/dist/store/onboarding.d.ts +17 -0
- package/dist/store/searchModal.d.ts +7 -0
- package/package.json +26 -44
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DropzoneProps, FileWithPath } from '@mantine/dropzone';
|
|
2
|
+
import { ImagePickerLocales } from './types';
|
|
3
|
+
export declare const ImagePickerUpload: ({ locales, uploading, dropZoneProps, onUpload, }: {
|
|
4
|
+
locales: ImagePickerLocales;
|
|
5
|
+
uploading: boolean;
|
|
6
|
+
dropZoneProps?: Omit<DropzoneProps, 'onDrop'>;
|
|
7
|
+
onUpload: (files: FileWithPath[]) => void;
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ApiGiphy } from '../../../api/giphy';
|
|
2
|
+
type Data = {
|
|
3
|
+
items: ApiGiphy.Datum[];
|
|
4
|
+
page: number;
|
|
5
|
+
totalPages: number;
|
|
6
|
+
hasMore: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const fetchGiphyPhotos: (params: ApiGiphy.Request, page?: number, token?: string) => Promise<Data>;
|
|
9
|
+
export declare const useGiphyPhotos: (params: ApiGiphy.Request, page: number, token?: string) => import('@tanstack/react-query').UseQueryResult<Data, Error>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ApiUnsplash } from '../../../api/unsplash';
|
|
2
|
+
type Data = {
|
|
3
|
+
items: ApiUnsplash.Datum[];
|
|
4
|
+
page: number;
|
|
5
|
+
totalPages: number;
|
|
6
|
+
hasMore: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const fetchUnsplashPhotos: (params: ApiUnsplash.Request, clientId?: string, previousData?: Data) => Promise<Data>;
|
|
9
|
+
export declare const useUnsplashPhotos: (params: ApiUnsplash.Request, clientId?: string, rest?: any) => import('@tanstack/react-query').DefinedUseQueryResult<Data, Error>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ImagePicker';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export type ImagePickerGalleryCollection = {
|
|
2
|
+
title: string;
|
|
3
|
+
path: string;
|
|
4
|
+
id: string;
|
|
5
|
+
url: string;
|
|
6
|
+
items: string[];
|
|
7
|
+
};
|
|
8
|
+
export type ImagePickerLocales = {
|
|
9
|
+
gallery?: string;
|
|
10
|
+
link?: string;
|
|
11
|
+
error?: string;
|
|
12
|
+
search?: string;
|
|
13
|
+
upload?: string;
|
|
14
|
+
uploadFile?: string;
|
|
15
|
+
change?: string;
|
|
16
|
+
remove?: string;
|
|
17
|
+
dragOrClickToChoose?: string;
|
|
18
|
+
maxFileSize?: string;
|
|
19
|
+
pasteLink?: string;
|
|
20
|
+
submitLink?: string;
|
|
21
|
+
worksWithAnyImage?: string;
|
|
22
|
+
noImages?: string;
|
|
23
|
+
errors: {
|
|
24
|
+
typeIsNotAllowed?: string;
|
|
25
|
+
shouldNotExceed?: string;
|
|
26
|
+
doNotUploadMoreThanSingleFile?: string;
|
|
27
|
+
invalidLink?: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type Language = {
|
|
2
|
+
value: string;
|
|
3
|
+
label: string;
|
|
4
|
+
};
|
|
5
|
+
interface LanguagePickerProps {
|
|
6
|
+
data: Language[];
|
|
7
|
+
value: string;
|
|
8
|
+
onChange: (value: string) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const LanguagePicker: ({ data, value, onChange, }: LanguagePickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const NavbarResizer: import('react').MemoExoticComponent<({ width, onChange, showResizer, }: {
|
|
3
|
+
width?: number;
|
|
4
|
+
onChange?: (v: number) => void;
|
|
5
|
+
showResizer?: boolean;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element>;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ButtonProps, PolymorphicComponentProps, StackProps, TextProps, TitleProps } from '@mantine/core';
|
|
3
|
+
export declare const illustrationMap: {
|
|
4
|
+
empty: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
|
|
5
|
+
title?: string | undefined;
|
|
6
|
+
titleId?: string | undefined;
|
|
7
|
+
desc?: string | undefined;
|
|
8
|
+
descId?: string | undefined;
|
|
9
|
+
}>;
|
|
10
|
+
noAccess: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
|
|
11
|
+
title?: string | undefined;
|
|
12
|
+
titleId?: string | undefined;
|
|
13
|
+
desc?: string | undefined;
|
|
14
|
+
descId?: string | undefined;
|
|
15
|
+
}>;
|
|
16
|
+
trash: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
|
|
17
|
+
title?: string | undefined;
|
|
18
|
+
titleId?: string | undefined;
|
|
19
|
+
desc?: string | undefined;
|
|
20
|
+
descId?: string | undefined;
|
|
21
|
+
}>;
|
|
22
|
+
noImage: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
|
|
23
|
+
title?: string | undefined;
|
|
24
|
+
titleId?: string | undefined;
|
|
25
|
+
desc?: string | undefined;
|
|
26
|
+
descId?: string | undefined;
|
|
27
|
+
}>;
|
|
28
|
+
noResults: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
|
|
29
|
+
title?: string | undefined;
|
|
30
|
+
titleId?: string | undefined;
|
|
31
|
+
desc?: string | undefined;
|
|
32
|
+
descId?: string | undefined;
|
|
33
|
+
}>;
|
|
34
|
+
noTasks: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
|
|
35
|
+
title?: string | undefined;
|
|
36
|
+
titleId?: string | undefined;
|
|
37
|
+
desc?: string | undefined;
|
|
38
|
+
descId?: string | undefined;
|
|
39
|
+
}>;
|
|
40
|
+
noComments: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
|
|
41
|
+
title?: string | undefined;
|
|
42
|
+
titleId?: string | undefined;
|
|
43
|
+
desc?: string | undefined;
|
|
44
|
+
descId?: string | undefined;
|
|
45
|
+
}>;
|
|
46
|
+
noData: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
|
|
47
|
+
title?: string | undefined;
|
|
48
|
+
titleId?: string | undefined;
|
|
49
|
+
desc?: string | undefined;
|
|
50
|
+
descId?: string | undefined;
|
|
51
|
+
}>;
|
|
52
|
+
addDataR7: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
|
|
53
|
+
title?: string | undefined;
|
|
54
|
+
titleId?: string | undefined;
|
|
55
|
+
desc?: string | undefined;
|
|
56
|
+
descId?: string | undefined;
|
|
57
|
+
}>;
|
|
58
|
+
addDataLayers: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
|
|
59
|
+
title?: string | undefined;
|
|
60
|
+
titleId?: string | undefined;
|
|
61
|
+
desc?: string | undefined;
|
|
62
|
+
descId?: string | undefined;
|
|
63
|
+
}>;
|
|
64
|
+
emptyFolder: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
|
|
65
|
+
title?: string | undefined;
|
|
66
|
+
titleId?: string | undefined;
|
|
67
|
+
desc?: string | undefined;
|
|
68
|
+
descId?: string | undefined;
|
|
69
|
+
}>;
|
|
70
|
+
emptyBoard: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
|
|
71
|
+
title?: string | undefined;
|
|
72
|
+
titleId?: string | undefined;
|
|
73
|
+
desc?: string | undefined;
|
|
74
|
+
descId?: string | undefined;
|
|
75
|
+
}>;
|
|
76
|
+
noTaskResults: import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
|
|
77
|
+
title?: string | undefined;
|
|
78
|
+
titleId?: string | undefined;
|
|
79
|
+
desc?: string | undefined;
|
|
80
|
+
descId?: string | undefined;
|
|
81
|
+
}>;
|
|
82
|
+
'404': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
|
|
83
|
+
title?: string | undefined;
|
|
84
|
+
titleId?: string | undefined;
|
|
85
|
+
desc?: string | undefined;
|
|
86
|
+
descId?: string | undefined;
|
|
87
|
+
}>;
|
|
88
|
+
'500': import('react').FunctionComponent<import('react').SVGProps<SVGSVGElement> & {
|
|
89
|
+
title?: string | undefined;
|
|
90
|
+
titleId?: string | undefined;
|
|
91
|
+
desc?: string | undefined;
|
|
92
|
+
descId?: string | undefined;
|
|
93
|
+
}>;
|
|
94
|
+
};
|
|
95
|
+
type IllustrationType = keyof typeof illustrationMap | string;
|
|
96
|
+
interface NoDataProps {
|
|
97
|
+
title?: ReactNode;
|
|
98
|
+
titleProps?: TitleProps;
|
|
99
|
+
description?: ReactNode;
|
|
100
|
+
descriptionProps?: TextProps;
|
|
101
|
+
buttons?: PolymorphicComponentProps<'button', ButtonProps>[];
|
|
102
|
+
illustration?: IllustrationType;
|
|
103
|
+
size?: number;
|
|
104
|
+
}
|
|
105
|
+
export declare const NoData: React.FC<NoDataProps & StackProps>;
|
|
106
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NoData, illustrationMap } from './NoData';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { UserNotifications } from '../AppContainer/components/MenuUserDropdown';
|
|
2
|
+
interface NotificationCardProps {
|
|
3
|
+
isFocused: boolean;
|
|
4
|
+
notification: UserNotifications;
|
|
5
|
+
}
|
|
6
|
+
declare const NotificationCard: import('react').ForwardRefExoticComponent<NotificationCardProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export default NotificationCard;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
interface NotificationProps {
|
|
2
|
+
isNotificationOpen: boolean;
|
|
3
|
+
setNotificationOpen: (value: boolean) => void;
|
|
4
|
+
}
|
|
5
|
+
declare const Notification: ({ isNotificationOpen, setNotificationOpen, }: NotificationProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export default Notification;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const OnBoardingPage: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './OnBoardingPage';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ButtonProps } from '@mantine/core';
|
|
2
|
+
declare const StepperWrapper: ({ children, title, description, prevButtonProps, nextButtonProps, nextText, prevText, }: {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
title: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
prevButtonProps?: ButtonProps & React.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
7
|
+
nextButtonProps?: ButtonProps & React.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
8
|
+
nextText: string | null;
|
|
9
|
+
prevText: string | null;
|
|
10
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default StepperWrapper;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { AvatarProps } from '@mantine/core';
|
|
3
|
+
import { MenuUser } from '../AppContainer/components/MenuUserDropdown';
|
|
4
|
+
export type ProfilePictureType = {
|
|
5
|
+
url: string;
|
|
6
|
+
};
|
|
7
|
+
interface UserAvatarProps extends AvatarProps, Omit<React.ComponentPropsWithoutRef<'div'>, keyof AvatarProps> {
|
|
8
|
+
user?: MenuUser | null;
|
|
9
|
+
}
|
|
10
|
+
export declare const UserAvatar: React.ForwardRefExoticComponent<UserAvatarProps & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { AvatarProps } from '@mantine/core';
|
|
3
|
+
import { MenuWorkspace } from '../WorkspaceMenu/WorkspaceMenu';
|
|
4
|
+
interface UserAvatarProps extends AvatarProps, Omit<React.ComponentPropsWithoutRef<'div'>, keyof AvatarProps> {
|
|
5
|
+
workspace?: MenuWorkspace | null;
|
|
6
|
+
}
|
|
7
|
+
export declare const WorkspaceAvatar: React.ForwardRefExoticComponent<UserAvatarProps & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
export type MenuWorkspace = {
|
|
3
|
+
workspaceId: string;
|
|
4
|
+
workspaceName: string;
|
|
5
|
+
workspaceIcon: string;
|
|
6
|
+
};
|
|
7
|
+
export type WorkspaceMenuProps<W extends MenuWorkspace = MenuWorkspace> = PropsWithChildren<{
|
|
8
|
+
onCreate?: () => void;
|
|
9
|
+
onClick?: (w: W) => void;
|
|
10
|
+
items: W[];
|
|
11
|
+
active?: W | null;
|
|
12
|
+
settingsLink?: string;
|
|
13
|
+
membersLink?: string;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const WorkspaceMenu: <W extends MenuWorkspace>({ children, onCreate, onClick, active, items, settingsLink, membersLink, }: WorkspaceMenuProps<W>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { NotificationData } from '@mantine/notifications';
|
|
2
|
+
type MessageType = string | number | NotificationData;
|
|
3
|
+
export declare const showRequestNotifications: <Response, Request extends Promise<Response> = Promise<Response>>(request: Request, options?: {
|
|
4
|
+
notifyId?: string;
|
|
5
|
+
successMsg?: ((res: Response) => MessageType) | MessageType;
|
|
6
|
+
errorMsg?: ((err: any) => MessageType) | MessageType;
|
|
7
|
+
}) => Promise<any>;
|
|
8
|
+
export declare const showSuccessNotification: (props: NotificationData) => void;
|
|
9
|
+
export declare const showErrorNotification: (props: NotificationData) => void;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useIsDarkTheme: () => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useDateFnsLocale: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useFormatDistance: () => (timestamp: string) => string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TouchEventHandler } from 'react';
|
|
2
|
+
export declare const useSwipeDetect: (callback: (side: 'left' | 'right') => void) => {
|
|
3
|
+
onTouchStart: TouchEventHandler<HTMLDivElement>;
|
|
4
|
+
onTouchMove: TouchEventHandler<HTMLDivElement>;
|
|
5
|
+
onTouchEnd: TouchEventHandler<HTMLDivElement>;
|
|
6
|
+
};
|