@layers-app/shared 0.0.28-comment-1 → 0.0.29
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/AppContainer/AppContainer.d.ts +6 -0
- package/dist/components/AppContainer/components/DesktopNavbar.d.ts +5 -0
- package/dist/components/AppContainer/hooks/useHideHeader.d.ts +1 -1
- package/dist/components/AppContainer/hooks/useHideSidebar.d.ts +1 -0
- package/dist/components/{ImagePicker/ImagePicker.d.ts → FilePicker/FilePicker.d.ts} +6 -4
- package/dist/components/{ImagePicker/ImagePickerGallery.d.ts → FilePicker/FilePickerGallery.d.ts} +1 -1
- package/dist/components/FilePicker/FilePickerGiphy.d.ts +6 -0
- package/dist/components/FilePicker/FilePickerLink.d.ts +7 -0
- package/dist/components/FilePicker/FilePickerSkeletonLoader.d.ts +1 -0
- package/dist/components/FilePicker/FilePickerUnsplash.d.ts +6 -0
- package/dist/components/{ImagePicker/ImagePickerUpload.d.ts → FilePicker/FilePickerUpload.d.ts} +3 -3
- package/dist/components/FilePicker/index.d.ts +1 -0
- package/dist/components/{ImagePicker → FilePicker}/types.d.ts +2 -1
- package/dist/helpers/validation.d.ts +2 -0
- package/dist/hooks/useNumberQueryParam.d.ts +9 -0
- package/dist/index.d.ts +5 -6
- package/dist/index.js +46264 -103
- package/dist/index.umd.cjs +81 -270
- package/dist/store/pageUpdateCount.d.ts +12 -0
- package/dist/store/timezoneStore.d.ts +1 -1
- package/package.json +2 -2
- package/dist/components/CommentComposer/index.d.ts +0 -52
- package/dist/components/CommentsPanel/components/CommentActions.d.ts +0 -16
- package/dist/components/CommentsPanel/components/CommentFilterMenu.d.ts +0 -6
- package/dist/components/CommentsPanel/components/CommentPanelListItem.d.ts +0 -22
- package/dist/components/CommentsPanel/components/CommentsEmptyPlaceholder.d.ts +0 -3
- package/dist/components/CommentsPanel/components/CommentsFilterHeader.d.ts +0 -3
- package/dist/components/CommentsPanel/components/CommentsListItemMenu.d.ts +0 -6
- package/dist/components/CommentsPanel/components/CommentsMultiSelectUsers.d.ts +0 -6
- package/dist/components/CommentsPanel/components/CommentsPanelList.d.ts +0 -19
- package/dist/components/CommentsPanel/components/CommentsThreadReplyControls.d.ts +0 -11
- package/dist/components/CommentsPanel/components/CommentsUploadFilesPreview.d.ts +0 -5
- package/dist/components/CommentsPanel/components/Icon.d.ts +0 -8
- package/dist/components/CommentsPanel/components/RemoveConfirmModal.d.ts +0 -11
- package/dist/components/CommentsPanel/index.d.ts +0 -21
- package/dist/components/CommentsPanel/store.d.ts +0 -19
- package/dist/components/CommentsPanel/types.d.ts +0 -243
- package/dist/components/CommentsPanel/utils.d.ts +0 -8
- package/dist/components/ImagePicker/ImagePickerGiphy.d.ts +0 -6
- package/dist/components/ImagePicker/ImagePickerLink.d.ts +0 -5
- package/dist/components/ImagePicker/ImagePickerSkeletonLoader.d.ts +0 -1
- package/dist/components/ImagePicker/ImagePickerUnsplash.d.ts +0 -6
- package/dist/components/ImagePicker/index.d.ts +0 -1
- package/dist/helpers/getFileIcons.d.ts +0 -1
- package/dist/helpers/getFileType.d.ts +0 -1
- package/dist/index-yRiJQ6TU.js +0 -68447
- package/dist/layers.8IsVFZzu-CB5GuqMu.js +0 -281
- package/dist/layers.mZsUCWha-CmKB_QIl.js +0 -343
- /package/dist/components/{ImagePicker → FilePicker}/api/giphyApi.d.ts +0 -0
- /package/dist/components/{ImagePicker → FilePicker}/api/unsplashApi.d.ts +0 -0
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { AppContainerProps } from './types';
|
|
2
|
+
declare global {
|
|
3
|
+
interface Window {
|
|
4
|
+
publicMode?: boolean;
|
|
5
|
+
preSignMode?: boolean;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
2
8
|
export declare const AppContainer: (({ header, content, navbar, navbarTitle, }: AppContainerProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
3
9
|
NavbarContent: ({ children }: {
|
|
4
10
|
children?: import('react').ReactNode;
|
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
import { AppContainerProps } from '../types';
|
|
2
|
+
declare global {
|
|
3
|
+
interface Window {
|
|
4
|
+
openTemplatesModal?: () => void;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
2
7
|
export declare const DesktopNavbar: (props: Pick<AppContainerProps, 'navbar' | 'navbarTitle'>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useHideHeader: () => void;
|
|
1
|
+
export declare const useHideHeader: (enabled?: boolean) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useHideSidebar: (enabled?: boolean) => void;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { FloatingPosition, PopoverProps } from '@mantine/core';
|
|
3
3
|
import { DropzoneProps, FileWithPath } from '@mantine/dropzone';
|
|
4
|
-
import {
|
|
4
|
+
import { FilePickerLocales, FileType, ImagePickerGalleryCollection } from './types';
|
|
5
5
|
declare const baseTabsList: readonly ["gallery", "upload", "link", "unsplash", "giphy"];
|
|
6
6
|
type TabType = (typeof baseTabsList)[number];
|
|
7
|
-
export type
|
|
7
|
+
export type FilePickerProps = PropsWithChildren<{
|
|
8
8
|
onChange?: (v: string) => void;
|
|
9
9
|
onRemove?: () => void;
|
|
10
10
|
onUpload?: (files: FileWithPath[], setOpened: (state: boolean) => void) => void;
|
|
@@ -19,7 +19,9 @@ export type ImagePickerProps = PropsWithChildren<{
|
|
|
19
19
|
galleryCollection?: ImagePickerGalleryCollection[];
|
|
20
20
|
popoverProps?: PopoverProps;
|
|
21
21
|
dropZoneProps?: Omit<DropzoneProps, 'onDrop'>;
|
|
22
|
-
locales?:
|
|
22
|
+
locales?: FilePickerLocales;
|
|
23
|
+
type?: FileType;
|
|
24
|
+
isValidMediaUrl?: (url: string) => boolean;
|
|
23
25
|
}>;
|
|
24
|
-
export declare const
|
|
26
|
+
export declare const FilePicker: ({ onChange, onRemove, onUpload, uploading, showTabs, children, width, position, readOnly, hasImage, giphyToken, unsplashClientId, type, galleryCollection, isValidMediaUrl, popoverProps, dropZoneProps, locales, }: PropsWithChildren<FilePickerProps>) => import("react/jsx-runtime").JSX.Element;
|
|
25
27
|
export {};
|
package/dist/components/{ImagePicker/ImagePickerGallery.d.ts → FilePicker/FilePickerGallery.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ImagePickerGalleryCollection } from './types';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const FilePickerGallery: ({ galleryCollection, onChange, }: {
|
|
3
3
|
galleryCollection: ImagePickerGalleryCollection[];
|
|
4
4
|
onChange?: (v: string) => void;
|
|
5
5
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FilePickerLocales, FileType } from './types';
|
|
2
|
+
export declare const FilePickerLink: ({ locales, onChange, type, isValidMediaUrl, }: {
|
|
3
|
+
locales: FilePickerLocales;
|
|
4
|
+
onChange?: (v: string) => void;
|
|
5
|
+
type: FileType;
|
|
6
|
+
isValidMediaUrl?: (url: string) => boolean;
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const FilePickerSkeletonLoader: () => import("react/jsx-runtime").JSX.Element;
|
package/dist/components/{ImagePicker/ImagePickerUpload.d.ts → FilePicker/FilePickerUpload.d.ts}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DropzoneProps, FileWithPath } from '@mantine/dropzone';
|
|
2
|
-
import {
|
|
3
|
-
export declare const
|
|
4
|
-
locales:
|
|
2
|
+
import { FilePickerLocales } from './types';
|
|
3
|
+
export declare const FilePickerUpload: ({ locales, uploading, dropZoneProps, onUpload, }: {
|
|
4
|
+
locales: FilePickerLocales;
|
|
5
5
|
uploading: boolean;
|
|
6
6
|
dropZoneProps?: Omit<DropzoneProps, 'onDrop'>;
|
|
7
7
|
onUpload: (files: FileWithPath[]) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './FilePicker';
|
|
@@ -5,7 +5,7 @@ export type ImagePickerGalleryCollection = {
|
|
|
5
5
|
url: string;
|
|
6
6
|
items: string[];
|
|
7
7
|
};
|
|
8
|
-
export type
|
|
8
|
+
export type FilePickerLocales = {
|
|
9
9
|
gallery?: string;
|
|
10
10
|
link?: string;
|
|
11
11
|
error?: string;
|
|
@@ -27,3 +27,4 @@ export type ImagePickerLocales = {
|
|
|
27
27
|
invalidLink?: string;
|
|
28
28
|
};
|
|
29
29
|
};
|
|
30
|
+
export type FileType = 'file' | 'image' | 'audio' | 'video';
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export declare const isValidEmail: (v: string) => boolean;
|
|
2
2
|
export declare const isImageUrl: (url: string) => Promise<unknown>;
|
|
3
|
+
export declare const isAudioUrl: (url: string, timeoutMs?: number) => Promise<boolean>;
|
|
4
|
+
export declare const isVideoUrl: (url: string, timeoutMs?: number) => Promise<boolean>;
|
|
3
5
|
export declare const isValidUrl: (urlString: string) => boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const isNumberValue: (value: unknown) => value is number;
|
|
2
|
+
/**
|
|
3
|
+
* Hook to get URL route parameter value
|
|
4
|
+
*/
|
|
5
|
+
export declare const useRouteParam: (paramName: 'folderId' | 'sprintId' | 'taskId' | 'flowId' | 'pageId' | 'storageId') => string | null;
|
|
6
|
+
/**
|
|
7
|
+
* Hook to get URL query parameter value (from ?param=value)
|
|
8
|
+
*/
|
|
9
|
+
export declare const useQueryParam: (paramName: string) => string | null;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from './components/NoData/NoData';
|
|
2
2
|
export * from './components/LanguagePicker';
|
|
3
|
-
export * from './components/
|
|
4
|
-
export * from './components/
|
|
3
|
+
export * from './components/FilePicker';
|
|
4
|
+
export * from './components/FilePicker/FilePickerUpload';
|
|
5
5
|
export * from './components/EmojiPicker/EmojiPicker';
|
|
6
6
|
export * from './components/AppContainer/AppContainer';
|
|
7
7
|
export * from './components/CustomKBD';
|
|
@@ -27,6 +27,7 @@ export * from './components/AppContainer/hooks/useAppContainer';
|
|
|
27
27
|
export * from './components/AppContainer/hooks/useAppContainerStore';
|
|
28
28
|
export * from './components/AppContainer/hooks/useAppContainerDataStore';
|
|
29
29
|
export * from './components/AppContainer/hooks/useHideHeader';
|
|
30
|
+
export * from './components/AppContainer/hooks/useHideSidebar';
|
|
30
31
|
export * from './components/AppContainer/types';
|
|
31
32
|
export * from './components/ErrorPage';
|
|
32
33
|
export * from './components/RichText';
|
|
@@ -66,8 +67,6 @@ export * from './store/workspacesOrder.ts';
|
|
|
66
67
|
export * from './store/timezoneStore.ts';
|
|
67
68
|
export * from './hooks/useDateUtils';
|
|
68
69
|
export * from './components/ThemeIndicator';
|
|
69
|
-
export * from './components/CommentsPanel';
|
|
70
|
-
export * from './components/CommentComposer';
|
|
71
70
|
export * from './components/PinModal';
|
|
72
|
-
export * from './
|
|
73
|
-
export * from './
|
|
71
|
+
export * from './hooks/useNumberQueryParam';
|
|
72
|
+
export * from './store/pageUpdateCount.tsx';
|