@layers-app/shared 0.0.28 → 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.
Files changed (53) hide show
  1. package/dist/components/AppContainer/AppContainer.d.ts +6 -0
  2. package/dist/components/AppContainer/components/DesktopNavbar.d.ts +5 -0
  3. package/dist/components/AppContainer/hooks/useHideHeader.d.ts +1 -1
  4. package/dist/components/AppContainer/hooks/useHideSidebar.d.ts +1 -0
  5. package/dist/components/{ImagePicker/ImagePicker.d.ts → FilePicker/FilePicker.d.ts} +6 -4
  6. package/dist/components/{ImagePicker/ImagePickerGallery.d.ts → FilePicker/FilePickerGallery.d.ts} +1 -1
  7. package/dist/components/FilePicker/FilePickerGiphy.d.ts +6 -0
  8. package/dist/components/FilePicker/FilePickerLink.d.ts +7 -0
  9. package/dist/components/FilePicker/FilePickerSkeletonLoader.d.ts +1 -0
  10. package/dist/components/FilePicker/FilePickerUnsplash.d.ts +6 -0
  11. package/dist/components/{ImagePicker/ImagePickerUpload.d.ts → FilePicker/FilePickerUpload.d.ts} +3 -3
  12. package/dist/components/FilePicker/index.d.ts +1 -0
  13. package/dist/components/{ImagePicker → FilePicker}/types.d.ts +2 -1
  14. package/dist/helpers/validation.d.ts +2 -0
  15. package/dist/hooks/useNumberQueryParam.d.ts +9 -0
  16. package/dist/index.d.ts +5 -6
  17. package/dist/index.js +46264 -103
  18. package/dist/index.umd.cjs +78 -270
  19. package/dist/store/pageUpdateCount.d.ts +12 -0
  20. package/dist/store/timezoneStore.d.ts +1 -1
  21. package/package.json +2 -2
  22. package/dist/components/CommentComposer/index.d.ts +0 -52
  23. package/dist/components/CommentsPanel/components/CommentActions.d.ts +0 -16
  24. package/dist/components/CommentsPanel/components/CommentFilterMenu.d.ts +0 -6
  25. package/dist/components/CommentsPanel/components/CommentPanelListItem.d.ts +0 -22
  26. package/dist/components/CommentsPanel/components/CommentsEmptyPlaceholder.d.ts +0 -3
  27. package/dist/components/CommentsPanel/components/CommentsFilterHeader.d.ts +0 -3
  28. package/dist/components/CommentsPanel/components/CommentsListItemMenu.d.ts +0 -6
  29. package/dist/components/CommentsPanel/components/CommentsMultiSelectUsers.d.ts +0 -6
  30. package/dist/components/CommentsPanel/components/CommentsPanelList.d.ts +0 -19
  31. package/dist/components/CommentsPanel/components/CommentsThreadReplyControls.d.ts +0 -10
  32. package/dist/components/CommentsPanel/components/CommentsUploadFilesPreview.d.ts +0 -5
  33. package/dist/components/CommentsPanel/components/Icon.d.ts +0 -8
  34. package/dist/components/CommentsPanel/components/RemoveConfirmModal.d.ts +0 -11
  35. package/dist/components/CommentsPanel/index.d.ts +0 -21
  36. package/dist/components/CommentsPanel/store.d.ts +0 -19
  37. package/dist/components/CommentsPanel/types.d.ts +0 -243
  38. package/dist/components/CommentsPanel/utils.d.ts +0 -8
  39. package/dist/components/ImagePicker/ImagePickerGiphy.d.ts +0 -6
  40. package/dist/components/ImagePicker/ImagePickerLink.d.ts +0 -5
  41. package/dist/components/ImagePicker/ImagePickerSkeletonLoader.d.ts +0 -1
  42. package/dist/components/ImagePicker/ImagePickerUnsplash.d.ts +0 -6
  43. package/dist/components/ImagePicker/index.d.ts +0 -1
  44. package/dist/helpers/getFileIcons.d.ts +0 -1
  45. package/dist/helpers/getFileType.d.ts +0 -1
  46. package/dist/index-Bz8Yenv3.js +0 -75975
  47. package/dist/layers.C5oAiCeN-DZQs9zcO.js +0 -288
  48. package/dist/layers.CovbS90x-CThbTGYw.js +0 -52
  49. package/dist/layers.CsuN1Q94-BT7000dw.js +0 -170
  50. package/dist/layers.DETHwCxI-BvdKGW_B.js +0 -281
  51. package/dist/layers.vNINlb5t-Bef3Moef.js +0 -289
  52. /package/dist/components/{ImagePicker → FilePicker}/api/giphyApi.d.ts +0 -0
  53. /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 { ImagePickerGalleryCollection, ImagePickerLocales } from './types';
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 ImagePickerProps = PropsWithChildren<{
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?: ImagePickerLocales;
22
+ locales?: FilePickerLocales;
23
+ type?: FileType;
24
+ isValidMediaUrl?: (url: string) => boolean;
23
25
  }>;
24
- export declare const ImagePicker: ({ onChange, onRemove, onUpload, uploading, showTabs, children, width, position, readOnly, hasImage, giphyToken, unsplashClientId, galleryCollection, popoverProps, dropZoneProps, locales, }: PropsWithChildren<ImagePickerProps>) => import("react/jsx-runtime").JSX.Element;
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 {};
@@ -1,5 +1,5 @@
1
1
  import { ImagePickerGalleryCollection } from './types';
2
- export declare const ImagePickerGallery: ({ galleryCollection, onChange, }: {
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,6 @@
1
+ import { FilePickerLocales } from './types';
2
+ export declare const FilePickerGiphy: ({ locales, token, onChange, }: {
3
+ locales: FilePickerLocales;
4
+ token?: string;
5
+ onChange?: (v: string) => void;
6
+ }) => 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;
@@ -0,0 +1,6 @@
1
+ import { FilePickerLocales } from './types';
2
+ export declare const FilePickerUnsplash: ({ locales, onChange, clientId, }: {
3
+ locales: FilePickerLocales;
4
+ clientId?: string;
5
+ onChange?: (v: string) => void;
6
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { DropzoneProps, FileWithPath } from '@mantine/dropzone';
2
- import { ImagePickerLocales } from './types';
3
- export declare const ImagePickerUpload: ({ locales, uploading, dropZoneProps, onUpload, }: {
4
- locales: ImagePickerLocales;
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 ImagePickerLocales = {
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/ImagePicker';
4
- export * from './components/ImagePicker/ImagePickerUpload';
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 './helpers/getFileIcons.tsx';
73
- export * from './helpers/getFileType.ts';
71
+ export * from './hooks/useNumberQueryParam';
72
+ export * from './store/pageUpdateCount.tsx';