@emailmaker/filemanager 0.10.68 → 0.10.70
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/components/ControlledImage/ControlledImage.d.ts +10 -0
- package/components/FileContent/FileContentHeader.d.ts +2 -0
- package/components/FolderTree/FolderTree.d.ts +1 -1
- package/components/ImageIcons/IconsGrid.d.ts +3 -3
- package/file-manager.css +22 -0
- package/file-manager.d.ts +12 -3
- package/file-manager.esm.js +8 -23
- package/file-manager.js +1 -1
- package/file-manager.js.LICENSE.txt +0 -15
- package/hooks/core/types.d.ts +7 -2
- package/hooks/index.d.ts +2 -0
- package/hooks/notifications/notificationDedupe.d.ts +6 -0
- package/hooks/useControlledImageLoader.d.ts +18 -0
- package/hooks/useViewportMetricsSync.d.ts +2 -0
- package/index.d.ts +1 -1
- package/notification.d.ts +9 -0
- package/package.json +1 -1
- package/presentation/file-list/FileListAdapter.d.ts +4 -1
- package/presentation/file-list/types.d.ts +1 -0
- package/presentation/file-list/useFileListEngine.d.ts +3 -2
- package/presentation/list-core/types.d.ts +22 -1
- package/presentation/media-list/MediaListAdapter.d.ts +9 -0
- package/presentation/media-list/types.d.ts +8 -0
- package/presentation/media-list/useMediaListEngine.d.ts +34 -0
- package/types.d.ts +59 -4
- package/utils/dedupeUploadNamesOnClient.d.ts +6 -0
- package/utils/jsonDataProvider.d.ts +2 -1
- package/utils/nameNormalization.d.ts +2 -1
- package/utils/resolveItemMeta.d.ts +9 -0
- package/utils/resolveUniqueUploadName.d.ts +5 -0
- package/utils/urlNormalization.d.ts +5 -0
- package/utils/urlValidation.d.ts +1 -0
- package/file-manager.esm.js.map +0 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ControlledImageLoader } from '../../hooks/useControlledImageLoader';
|
|
3
|
+
export interface ControlledImageProps extends Omit<React.ImgHTMLAttributes<HTMLImageElement>, 'src'> {
|
|
4
|
+
imageId: string;
|
|
5
|
+
sourceUrl: string;
|
|
6
|
+
shouldLoad?: boolean;
|
|
7
|
+
loader: ControlledImageLoader;
|
|
8
|
+
}
|
|
9
|
+
export declare const ControlledImage: React.FC<ControlledImageProps>;
|
|
10
|
+
export default ControlledImage;
|
|
@@ -15,6 +15,8 @@ interface FileContentHeaderProps {
|
|
|
15
15
|
setViewMode: (value: 'grid' | 'table') => void;
|
|
16
16
|
handleSearch: (searchTerm: string) => void;
|
|
17
17
|
handleSortOptionChange: (option: SortOptionType) => void;
|
|
18
|
+
/** Если задан непустой массив — в дропдауне только эти варианты. Пустой/undefined — все. */
|
|
19
|
+
sortOptions?: SortOptionType[];
|
|
18
20
|
onClearSelection: () => void;
|
|
19
21
|
onRename: (selectedFileId?: string) => void;
|
|
20
22
|
onDelete: (file?: AppFile) => void;
|
|
@@ -13,7 +13,7 @@ interface FolderTreeProps {
|
|
|
13
13
|
fetchChildFolders?: (parentId: string | null) => Promise<Folder[]>;
|
|
14
14
|
disabledFolders?: string[];
|
|
15
15
|
showFileCounts?: boolean;
|
|
16
|
-
folderFileCounts?: Record<string, number>;
|
|
16
|
+
folderFileCounts?: Record<string, number | null>;
|
|
17
17
|
className?: string;
|
|
18
18
|
expandedKeys?: Key[];
|
|
19
19
|
setExpandedKeys?: (keys: Key[]) => void;
|
|
@@ -2,15 +2,15 @@ import React from 'react';
|
|
|
2
2
|
import type { StreamlineSearchItem } from '../../types';
|
|
3
3
|
export interface IconsGridProps {
|
|
4
4
|
items: StreamlineSearchItem[];
|
|
5
|
-
hasMore: boolean;
|
|
6
5
|
loading: boolean;
|
|
6
|
+
isCollectingResults?: boolean;
|
|
7
|
+
hasMore?: boolean;
|
|
7
8
|
hasQuery: boolean;
|
|
8
9
|
mode: 'global' | 'family';
|
|
9
10
|
selectedHash: string | null;
|
|
10
|
-
onLoadMore: () => void;
|
|
11
11
|
onItemClick: (item: StreamlineSearchItem) => void;
|
|
12
12
|
onInsert: (item: StreamlineSearchItem) => void;
|
|
13
|
-
|
|
13
|
+
onLoadMore?: () => void;
|
|
14
14
|
colorVars?: {
|
|
15
15
|
colorHex: string;
|
|
16
16
|
colorHex2: string;
|
package/file-manager.css
CHANGED
|
@@ -197,6 +197,7 @@
|
|
|
197
197
|
}
|
|
198
198
|
|
|
199
199
|
.em-filemanager .tableImagePreview {
|
|
200
|
+
display: block !important;
|
|
200
201
|
object-fit: contain;
|
|
201
202
|
border-radius: calc(var(--borderRadius) * 1px);
|
|
202
203
|
}
|
|
@@ -1270,6 +1271,11 @@
|
|
|
1270
1271
|
width: 100%;
|
|
1271
1272
|
}
|
|
1272
1273
|
|
|
1274
|
+
.em-filemanager .virtualCanvas {
|
|
1275
|
+
position: relative;
|
|
1276
|
+
width: 100%;
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1273
1279
|
.em-filemanager .myMasonryGrid {
|
|
1274
1280
|
display: flex;
|
|
1275
1281
|
width: auto;
|
|
@@ -1441,6 +1447,11 @@
|
|
|
1441
1447
|
line-height: calc(var(--formControlHeight) * 1px);
|
|
1442
1448
|
}
|
|
1443
1449
|
|
|
1450
|
+
.em-filemanager .virtualCanvas {
|
|
1451
|
+
position: relative;
|
|
1452
|
+
width: 100%;
|
|
1453
|
+
}
|
|
1454
|
+
|
|
1444
1455
|
.em-filemanager .blocksSearchDividerWrapper {
|
|
1445
1456
|
margin: 0;
|
|
1446
1457
|
}
|
|
@@ -2108,12 +2119,23 @@
|
|
|
2108
2119
|
overflow: hidden !important;
|
|
2109
2120
|
}
|
|
2110
2121
|
|
|
2122
|
+
.em-filemanager .iconsGridLoadingMore {
|
|
2123
|
+
display: flex;
|
|
2124
|
+
justify-content: center;
|
|
2125
|
+
padding: 16px 0;
|
|
2126
|
+
}
|
|
2127
|
+
|
|
2111
2128
|
.em-filemanager .iconsGridGrid {
|
|
2112
2129
|
display: grid;
|
|
2113
2130
|
grid-template-columns: repeat(auto-fill, minmax(var(--icons-grid-min-col, 148px), 1fr));
|
|
2114
2131
|
gap: 16px;
|
|
2115
2132
|
}
|
|
2116
2133
|
|
|
2134
|
+
.em-filemanager .iconsGridVirtualCanvas {
|
|
2135
|
+
position: relative;
|
|
2136
|
+
width: 100%;
|
|
2137
|
+
}
|
|
2138
|
+
|
|
2117
2139
|
.em-filemanager .iconsGridItem {
|
|
2118
2140
|
position: relative;
|
|
2119
2141
|
border-radius: 8px;
|
package/file-manager.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { Config, CustomIcons, File, FileManagerDataProviders, PixieSavePayload, NotifyListener, Notify, NotifyEvent, ThumbnailFile } from './types';
|
|
2
|
+
import type { Config, CustomIcons, EditorSaveMeta, File, FileManagerDataProviders, PixieSavePayload, NotifyListener, Notify, NotifyEvent, ThumbnailFile } from './types';
|
|
3
3
|
import './styles/index.scss';
|
|
4
4
|
export declare const FileManagerAppWithContext: (props: FileManagerAppProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export interface Options {
|
|
@@ -11,7 +11,7 @@ export interface Options {
|
|
|
11
11
|
id: string;
|
|
12
12
|
folderId: string | undefined;
|
|
13
13
|
name: string;
|
|
14
|
-
}) => void;
|
|
14
|
+
}, meta?: EditorSaveMeta) => void;
|
|
15
15
|
onChangeSelection?: (files: File[]) => void;
|
|
16
16
|
searchQuery?: string;
|
|
17
17
|
sortBySize?: string;
|
|
@@ -41,7 +41,7 @@ export interface FileManagerAppProps {
|
|
|
41
41
|
id: string;
|
|
42
42
|
folderId: string | undefined;
|
|
43
43
|
name: string;
|
|
44
|
-
}) => void;
|
|
44
|
+
}, meta?: EditorSaveMeta) => void;
|
|
45
45
|
searchQuery?: string;
|
|
46
46
|
sortBySize?: string;
|
|
47
47
|
dataProviders?: FileManagerDataProviders;
|
|
@@ -74,6 +74,7 @@ export interface InitPixieEditorOptions {
|
|
|
74
74
|
type?: string;
|
|
75
75
|
extension?: string;
|
|
76
76
|
dataProviders?: FileManagerDataProviders;
|
|
77
|
+
/** PixieSavePayload.mode — «save» или «saveCopy» (сохранить / сохранить копию). */
|
|
77
78
|
onSave?: (updatedFile: File, payload?: PixieSavePayload) => Promise<void> | void;
|
|
78
79
|
onClose?: () => void;
|
|
79
80
|
theme?: Config['theme'];
|
|
@@ -89,6 +90,14 @@ export interface InitPixieEditorOptions {
|
|
|
89
90
|
handleNotify?: NotifyListener<NotifyEvent>;
|
|
90
91
|
handleError?: NotifyListener<Notify.ErrorEvent>;
|
|
91
92
|
handleSuccess?: NotifyListener<Notify.SuccessEvent>;
|
|
93
|
+
/** Как в Config: пагинация списка (запросы/UI), не путать с dedupeUploadNamesOnClient */
|
|
94
|
+
hasPagination?: boolean;
|
|
95
|
+
disablePagination?: boolean;
|
|
96
|
+
paginationAvailable?: boolean;
|
|
97
|
+
/** Как в Config.dedupeUploadNamesOnClient — только уникальность имён при сохранении копии */
|
|
98
|
+
dedupeUploadNamesOnClient?: boolean;
|
|
99
|
+
/** Как в Config.saveCopyToCurrentFolder — сохранить копию в текущую папку вместо `noFolder`. */
|
|
100
|
+
saveCopyToCurrentFolder?: boolean;
|
|
92
101
|
}
|
|
93
102
|
export declare const PixieOnlyApp: React.FC<Omit<InitPixieEditorOptions, 'element'>>;
|
|
94
103
|
export declare const initPixieEditor: (options: InitPixieEditorOptions) => void;
|