@strapi/upload 5.3.0 → 5.4.0

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 (118) hide show
  1. package/dist/_chunks/{index-DCAQ4hHN.mjs → App-D1ayH-QS.mjs} +94 -87
  2. package/dist/_chunks/App-D1ayH-QS.mjs.map +1 -0
  3. package/dist/_chunks/{index-Bl2-6oC8.js → App-Dqqn78jO.js} +94 -87
  4. package/dist/_chunks/App-Dqqn78jO.js.map +1 -0
  5. package/dist/_chunks/{index-C_cWV2yS.mjs → ConfigureTheView-B2Syy3q5.mjs} +24 -23
  6. package/dist/_chunks/ConfigureTheView-B2Syy3q5.mjs.map +1 -0
  7. package/dist/_chunks/{index-BM9Ayh_r.js → ConfigureTheView-fwDgErsi.js} +42 -23
  8. package/dist/_chunks/ConfigureTheView-fwDgErsi.js.map +1 -0
  9. package/dist/_chunks/{index-BWIqjWzC.mjs → SettingsPage-BYC3ism8.mjs} +45 -43
  10. package/dist/_chunks/SettingsPage-BYC3ism8.mjs.map +1 -0
  11. package/dist/_chunks/{index-C1MSWEyZ.js → SettingsPage-oDEVs3XV.js} +61 -41
  12. package/dist/_chunks/SettingsPage-oDEVs3XV.js.map +1 -0
  13. package/dist/_chunks/{index-YwynuEzj.js → index-B7NW5XiM.js} +115 -211
  14. package/dist/_chunks/index-B7NW5XiM.js.map +1 -0
  15. package/dist/_chunks/{index-BwEfHu6y.mjs → index-Clesg6BA.mjs} +138 -233
  16. package/dist/_chunks/index-Clesg6BA.mjs.map +1 -0
  17. package/dist/admin/index.js +2 -2
  18. package/dist/admin/index.mjs +2 -2
  19. package/dist/admin/src/components/AssetCard/AssetCardBase.d.ts +1 -1
  20. package/dist/admin/src/components/AssetCard/UploadingAssetCard.d.ts +1 -1
  21. package/dist/admin/src/components/AssetCard/VideoPreview.d.ts +1 -1
  22. package/dist/admin/src/components/AssetDialog/BrowseStep/{index.d.ts → BrowseStep.d.ts} +1 -1
  23. package/dist/admin/src/components/AssetDialog/BrowseStep/PageSize.d.ts +2 -2
  24. package/dist/admin/src/components/AssetDialog/BrowseStep/PaginationFooter/Pagination.d.ts +4 -0
  25. package/dist/admin/src/components/AssetDialog/BrowseStep/PaginationFooter/PaginationFooter.d.ts +9 -0
  26. package/dist/admin/src/components/AssetDialog/BrowseStep/SearchAsset/{index.d.ts → SearchAsset.d.ts} +2 -2
  27. package/dist/admin/src/components/AssetGridList/{index.d.ts → AssetGridList.d.ts} +1 -2
  28. package/dist/admin/src/components/Breadcrumbs/Breadcrumbs.d.ts +1 -2
  29. package/dist/admin/src/components/EditFolderDialog/EditFolderDialog.d.ts +3 -1
  30. package/dist/admin/src/components/EditFolderDialog/RemoveFolderDialog.d.ts +1 -1
  31. package/dist/admin/src/components/FilterList/{index.d.ts → FilterList.d.ts} +3 -3
  32. package/dist/admin/src/components/FilterList/FilterTag.d.ts +3 -3
  33. package/dist/admin/src/components/FilterPopover/{index.d.ts → FilterPopover.d.ts} +3 -3
  34. package/dist/admin/src/components/FilterPopover/FilterValueInput.d.ts +2 -2
  35. package/dist/admin/src/components/FilterPopover/utils/getFilterList.d.ts +2 -2
  36. package/dist/admin/src/components/FolderGridList/FolderGridList.d.ts +1 -2
  37. package/dist/admin/src/components/MediaLibraryDialog/{index.d.ts → MediaLibraryDialog.d.ts} +1 -2
  38. package/dist/admin/src/components/MediaLibraryInput/{index.d.ts → MediaLibraryInput.d.ts} +2 -2
  39. package/dist/admin/src/components/SelectTree/Option.d.ts +2 -2
  40. package/dist/admin/src/components/SelectTree/SelectTree.d.ts +2 -3
  41. package/dist/admin/src/components/SelectTree/utils/flattenTree.d.ts +1 -1
  42. package/dist/admin/src/components/SelectTree/utils/getOpenValues.d.ts +2 -2
  43. package/dist/admin/src/components/SelectTree/utils/getValuesToClose.d.ts +2 -2
  44. package/dist/admin/src/components/SortPicker/{index.d.ts → SortPicker.d.ts} +2 -2
  45. package/dist/admin/src/components/UploadAssetDialog/PendingAssetStep/PendingAssetStep.d.ts +1 -1
  46. package/dist/admin/src/components/UploadAssetDialog/UploadAssetDialog.d.ts +1 -1
  47. package/dist/admin/src/{newConstants.d.ts → constants.d.ts} +1 -0
  48. package/dist/admin/src/hooks/useEditAsset.d.ts +4 -4
  49. package/dist/admin/src/hooks/useEditFolder.d.ts +4 -4
  50. package/dist/admin/src/hooks/useFolderStructure.d.ts +1 -1
  51. package/dist/admin/src/hooks/useModalQueryParams.d.ts +1 -2
  52. package/dist/admin/src/hooks/useSelectionState.d.ts +1 -1
  53. package/dist/admin/src/hooks/useUpload.d.ts +1 -1
  54. package/dist/admin/src/index.d.ts +3 -0
  55. package/dist/admin/src/pages/App/App.d.ts +1 -0
  56. package/dist/admin/src/pages/App/ConfigureTheView/ConfigureTheView.d.ts +6 -0
  57. package/dist/admin/src/pages/App/ConfigureTheView/components/Settings.d.ts +13 -0
  58. package/dist/admin/src/pages/App/ConfigureTheView/state/actionTypes.d.ts +2 -0
  59. package/dist/admin/src/pages/App/ConfigureTheView/state/actions.d.ts +12 -0
  60. package/dist/admin/src/pages/App/ConfigureTheView/state/init.d.ts +8 -0
  61. package/dist/admin/src/pages/App/ConfigureTheView/state/reducer.d.ts +15 -0
  62. package/dist/admin/src/pages/App/MediaLibrary/MediaLibrary.d.ts +1 -0
  63. package/dist/admin/src/pages/App/MediaLibrary/components/BulkActions.d.ts +15 -0
  64. package/dist/admin/src/pages/App/MediaLibrary/components/BulkDeleteButton.d.ts +7 -0
  65. package/dist/admin/src/pages/App/MediaLibrary/components/BulkMoveButton.d.ts +15 -0
  66. package/dist/admin/src/pages/App/MediaLibrary/components/EmptyOrNoPermissions.d.ts +7 -0
  67. package/dist/admin/src/pages/App/MediaLibrary/components/Filters.d.ts +1 -0
  68. package/dist/admin/src/pages/App/MediaLibrary/components/Header.d.ts +22 -0
  69. package/dist/admin/src/pages/App/components/BulkActions.d.ts +15 -0
  70. package/dist/admin/src/pages/App/components/BulkDeleteButton.d.ts +10 -0
  71. package/dist/admin/src/pages/App/components/BulkMoveButton.d.ts +15 -0
  72. package/dist/admin/src/pages/App/components/EmptyOrNoPermissions.d.ts +8 -0
  73. package/dist/admin/src/pages/App/components/Filters.d.ts +1 -0
  74. package/dist/admin/src/pages/App/components/Header.d.ts +13 -0
  75. package/dist/admin/src/pages/SettingsPage/SettingsPage.d.ts +2 -0
  76. package/dist/admin/src/pages/SettingsPage/init.d.ts +2 -0
  77. package/dist/admin/src/pages/SettingsPage/reducer.d.ts +27 -0
  78. package/dist/admin/src/pluginId.d.ts +0 -1
  79. package/dist/admin/src/utils/getBreadcrumbDataML.d.ts +1 -1
  80. package/dist/admin/src/utils/rawFileToAsset.d.ts +2 -2
  81. package/dist/admin/src/utils/toSingularTypes.d.ts +0 -1
  82. package/dist/admin/src/utils/typeFromMime.d.ts +1 -1
  83. package/dist/admin/src/utils/urlsToAssets.d.ts +2 -2
  84. package/dist/shared/contracts/settings.d.ts +3 -2
  85. package/package.json +8 -8
  86. package/dist/_chunks/index-BM9Ayh_r.js.map +0 -1
  87. package/dist/_chunks/index-BWIqjWzC.mjs.map +0 -1
  88. package/dist/_chunks/index-Bl2-6oC8.js.map +0 -1
  89. package/dist/_chunks/index-BwEfHu6y.mjs.map +0 -1
  90. package/dist/_chunks/index-C1MSWEyZ.js.map +0 -1
  91. package/dist/_chunks/index-C_cWV2yS.mjs.map +0 -1
  92. package/dist/_chunks/index-DCAQ4hHN.mjs.map +0 -1
  93. package/dist/_chunks/index-YwynuEzj.js.map +0 -1
  94. package/dist/admin/src/components/AssetDialog/BrowseStep/PaginationFooter/PaginationContext.d.ts +0 -9
  95. package/dist/admin/src/components/AssetDialog/BrowseStep/PaginationFooter/components.d.ts +0 -15
  96. package/dist/admin/src/components/AssetDialog/BrowseStep/PaginationFooter/index.d.ts +0 -9
  97. package/dist/admin/src/components/Breadcrumbs/index.d.ts +0 -1
  98. package/dist/admin/src/components/BulkMoveDialog/index.d.ts +0 -1
  99. package/dist/admin/src/components/ContextInfo/index.d.ts +0 -1
  100. package/dist/admin/src/components/EditFolderDialog/ModalHeader/index.d.ts +0 -2
  101. package/dist/admin/src/components/EditFolderDialog/index.d.ts +0 -1
  102. package/dist/admin/src/components/FolderCard/FolderCard/index.d.ts +0 -1
  103. package/dist/admin/src/components/FolderCard/FolderCardBody/index.d.ts +0 -1
  104. package/dist/admin/src/components/FolderCard/FolderCardCheckbox/index.d.ts +0 -1
  105. package/dist/admin/src/components/FolderCard/index.d.ts +0 -4
  106. package/dist/admin/src/components/FolderGridList/index.d.ts +0 -1
  107. package/dist/admin/src/components/SelectTree/index.d.ts +0 -2
  108. /package/dist/admin/src/components/AssetDialog/{index.d.ts → AssetDialog.d.ts} +0 -0
  109. /package/dist/admin/src/components/AssetDialog/SelectedStep/{index.d.ts → SelectedStep.d.ts} +0 -0
  110. /package/dist/admin/src/components/CopyLinkButton/{index.d.ts → CopyLinkButton.d.ts} +0 -0
  111. /package/dist/admin/src/components/EditAssetDialog/{index.d.ts → EditAssetContent.d.ts} +0 -0
  112. /package/dist/admin/src/components/EditAssetDialog/PreviewBox/{index.d.ts → PreviewBox.d.ts} +0 -0
  113. /package/dist/admin/src/components/EditAssetDialog/PreviewBox/{components.d.ts → PreviewComponents.d.ts} +0 -0
  114. /package/dist/admin/src/components/EmptyAssets/{index.d.ts → EmptyAssets.d.ts} +0 -0
  115. /package/dist/admin/src/components/FolderCard/FolderCardBodyAction/{index.d.ts → FolderCardBodyAction.d.ts} +0 -0
  116. /package/dist/admin/src/components/TableList/{index.d.ts → TableList.d.ts} +0 -0
  117. /package/dist/admin/src/components/UploadProgress/{index.d.ts → UploadProgress.d.ts} +0 -0
  118. /package/dist/admin/src/hooks/utils/{rename-keys.d.ts → renameKeys.d.ts} +0 -0
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
- const index = require("../_chunks/index-YwynuEzj.js");
2
+ const index = require("../_chunks/index-B7NW5XiM.js");
3
3
  require("@strapi/icons");
4
4
  require("byte-size");
5
5
  require("date-fns");
6
6
  require("qs");
7
- module.exports = index.index;
7
+ module.exports = index.admin;
8
8
  //# sourceMappingURL=index.js.map
@@ -1,9 +1,9 @@
1
- import { J } from "../_chunks/index-BwEfHu6y.mjs";
1
+ import { G } from "../_chunks/index-Clesg6BA.mjs";
2
2
  import "@strapi/icons";
3
3
  import "byte-size";
4
4
  import "date-fns";
5
5
  import "qs";
6
6
  export {
7
- J as default
7
+ G as default
8
8
  };
9
9
  //# sourceMappingURL=index.mjs.map
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import * as React from 'react';
2
2
  export interface AssetCardBaseProps {
3
3
  children?: React.ReactNode;
4
4
  extension: string;
@@ -1,4 +1,4 @@
1
- import { AssetType } from '../../newConstants';
1
+ import { AssetType } from '../../constants';
2
2
  import type { RawFile, File } from '../../../../shared/contracts/files';
3
3
  interface UploadingAssetCardProps {
4
4
  onCancel: (rawFile: RawFile) => void;
@@ -5,5 +5,5 @@ interface VideoPreviewProps {
5
5
  onLoadDuration?: (duration?: number) => void;
6
6
  size?: 'S' | 'M';
7
7
  }
8
- export declare const VideoPreview: ({ url, mime, onLoadDuration, alt, size, ...props }: VideoPreviewProps) => import("react/jsx-runtime").JSX.Element;
8
+ export declare const VideoPreview: ({ url, mime, onLoadDuration, alt, ...props }: VideoPreviewProps) => import("react/jsx-runtime").JSX.Element;
9
9
  export {};
@@ -1,4 +1,4 @@
1
- import { FolderRow, FileRow } from '../../TableList';
1
+ import { FolderRow, FileRow } from '../../TableList/TableList';
2
2
  import type { File, Query, FilterCondition } from '../../../../../shared/contracts/files';
3
3
  import type { Folder } from '../../../../../shared/contracts/folders';
4
4
  import type { AllowedTypes } from '../../AssetCard/AssetCard';
@@ -2,5 +2,5 @@ interface PageSizeProps {
2
2
  onChangePageSize: (value: number) => void;
3
3
  pageSize: number;
4
4
  }
5
- declare const PageSize: ({ onChangePageSize, pageSize }: PageSizeProps) => import("react/jsx-runtime").JSX.Element;
6
- export default PageSize;
5
+ export declare const PageSize: ({ onChangePageSize, pageSize }: PageSizeProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -1,4 +1,8 @@
1
1
  import * as React from 'react';
2
+ export declare const usePagination: () => {
3
+ activePage: number;
4
+ pageCount: number;
5
+ };
2
6
  interface PaginationProps {
3
7
  activePage: number;
4
8
  children: React.ReactNode;
@@ -0,0 +1,9 @@
1
+ interface PaginationFooterProps {
2
+ activePage: number;
3
+ onChangePage: (page: number) => void;
4
+ pagination: {
5
+ pageCount: number;
6
+ };
7
+ }
8
+ export declare const PaginationFooter: ({ activePage, onChangePage, pagination: { pageCount }, }: PaginationFooterProps) => import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -3,5 +3,5 @@ interface SearchAssetProps {
3
3
  onChangeSearch: (_q: Query['_q'] | null) => void;
4
4
  queryValue?: Query['_q'] | null;
5
5
  }
6
- declare const SearchAsset: ({ onChangeSearch, queryValue }: SearchAssetProps) => import("react/jsx-runtime").JSX.Element;
7
- export default SearchAsset;
6
+ export declare const SearchAsset: ({ onChangeSearch, queryValue }: SearchAssetProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -1,6 +1,6 @@
1
1
  import type { File } from '../../../../shared/contracts/files';
2
2
  import type { AllowedTypes } from '../AssetCard/AssetCard';
3
- interface AssetGridListProps {
3
+ export interface AssetGridListProps {
4
4
  allowedTypes?: AllowedTypes[];
5
5
  assets: File[];
6
6
  onEditAsset?: (asset: File) => void;
@@ -11,4 +11,3 @@ interface AssetGridListProps {
11
11
  title?: string | null;
12
12
  }
13
13
  export declare const AssetGridList: ({ allowedTypes, assets, onEditAsset, onSelectAsset, selectedAssets, size, onReorderAsset, title, }: AssetGridListProps) => import("react/jsx-runtime").JSX.Element;
14
- export {};
@@ -1,6 +1,6 @@
1
1
  import { BreadcrumbsProps as BaseBreadcrumbsProps } from '@strapi/design-system';
2
2
  import { MessageDescriptor } from 'react-intl';
3
- type CrumbDefinition = {
3
+ export type CrumbDefinition = {
4
4
  id?: number | null;
5
5
  label?: MessageDescriptor | string;
6
6
  href?: string;
@@ -12,4 +12,3 @@ export interface BreadcrumbsProps extends BaseBreadcrumbsProps {
12
12
  onChangeFolder?: (id: number, path?: string) => void;
13
13
  }
14
14
  export declare const Breadcrumbs: ({ breadcrumbs, onChangeFolder, currentFolderId, ...props }: BreadcrumbsProps) => import("react/jsx-runtime").JSX.Element;
15
- export {};
@@ -4,7 +4,9 @@ export interface EditFolderDialogProps {
4
4
  location?: string;
5
5
  folder?: FolderDefinition;
6
6
  open?: boolean;
7
- onClose: (arg?: any) => void;
7
+ onClose: (payload?: {
8
+ created?: boolean | undefined;
9
+ } | boolean) => void;
8
10
  }
9
11
  export declare const EditFolderContent: ({ onClose, folder, location, parentFolderId, }: EditFolderDialogProps) => import("react/jsx-runtime").JSX.Element;
10
12
  export declare const EditFolderDialog: ({ open, onClose, ...restProps }: EditFolderDialogProps) => import("react/jsx-runtime").JSX.Element;
@@ -4,4 +4,4 @@ interface RemoveFolderDialogProps {
4
4
  open: boolean;
5
5
  }
6
6
  export declare const RemoveFolderDialog: ({ onClose, onConfirm, open }: RemoveFolderDialogProps) => import("react/jsx-runtime").JSX.Element;
7
- export default RemoveFolderDialog;
7
+ export {};
@@ -8,7 +8,7 @@ type MimeFilter = {
8
8
  export type FilterStructure = {
9
9
  [key: string]: MimeFilter | StringFilter | undefined;
10
10
  };
11
- interface FilterListProps {
11
+ export interface FilterListProps {
12
12
  appliedFilters: FilterStructure[];
13
13
  filtersSchema: {
14
14
  name: string;
@@ -29,5 +29,5 @@ interface FilterListProps {
29
29
  }[];
30
30
  onRemoveFilter: (filters: FilterStructure[]) => void;
31
31
  }
32
- declare const FilterList: ({ appliedFilters, filtersSchema, onRemoveFilter }: FilterListProps) => (import("react/jsx-runtime").JSX.Element | null)[];
33
- export default FilterList;
32
+ export declare const FilterList: ({ appliedFilters, filtersSchema, onRemoveFilter }: FilterListProps) => (import("react/jsx-runtime").JSX.Element | null)[];
33
+ export {};
@@ -1,4 +1,4 @@
1
- import type { FilterStructure } from './index';
1
+ import type { FilterStructure } from './FilterList';
2
2
  type FilterTagAttribute = {
3
3
  fieldSchema?: {
4
4
  type?: string;
@@ -19,5 +19,5 @@ interface FilterTagProps {
19
19
  filter: FilterStructure;
20
20
  onClick: (filter: FilterStructure) => void;
21
21
  }
22
- declare const FilterTag: ({ attribute, filter, onClick, operator, value }: FilterTagProps) => import("react/jsx-runtime").JSX.Element;
23
- export default FilterTag;
22
+ export declare const FilterTag: ({ attribute, filter, onClick, operator, value }: FilterTagProps) => import("react/jsx-runtime").JSX.Element;
23
+ export {};
@@ -5,7 +5,7 @@ type Filter = {
5
5
  };
6
6
  } | undefined;
7
7
  };
8
- interface FilterPopoverProps {
8
+ export interface FilterPopoverProps {
9
9
  displayedFilters: {
10
10
  name: string;
11
11
  metadatas?: {
@@ -27,5 +27,5 @@ interface FilterPopoverProps {
27
27
  onSubmit: (filters: Filter[]) => void;
28
28
  onToggle: () => void;
29
29
  }
30
- declare const FilterPopover: ({ displayedFilters, filters, onSubmit, onToggle }: FilterPopoverProps) => import("react/jsx-runtime").JSX.Element;
31
- export default FilterPopover;
30
+ export declare const FilterPopover: ({ displayedFilters, filters, onSubmit, onToggle, }: FilterPopoverProps) => import("react/jsx-runtime").JSX.Element;
31
+ export {};
@@ -8,5 +8,5 @@ interface FilterValueInputProps {
8
8
  type?: string;
9
9
  value?: string;
10
10
  }
11
- declare const FilterValueInput: ({ label, onChange, options, type, value, }: FilterValueInputProps) => import("react/jsx-runtime").JSX.Element;
12
- export default FilterValueInput;
11
+ export declare const FilterValueInput: ({ label, onChange, options, type, value, }: FilterValueInputProps) => import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -11,11 +11,11 @@ interface GetFilterListProps {
11
11
  };
12
12
  };
13
13
  }
14
- declare const getFilterList: ({ fieldSchema: { type: fieldType, mainField } }: GetFilterListProps) => {
14
+ export declare const getFilterList: ({ fieldSchema: { type: fieldType, mainField }, }: GetFilterListProps) => {
15
15
  intlLabel: {
16
16
  id: string;
17
17
  defaultMessage: string;
18
18
  };
19
19
  value: string;
20
20
  }[];
21
- export default getFilterList;
21
+ export {};
@@ -1,7 +1,6 @@
1
1
  import * as React from 'react';
2
- interface FolderGridListProps {
2
+ export interface FolderGridListProps {
3
3
  children: React.ReactNode;
4
4
  title?: string | null;
5
5
  }
6
6
  export declare const FolderGridList: ({ title, children }: FolderGridListProps) => import("react/jsx-runtime").JSX.Element;
7
- export {};
@@ -1,9 +1,8 @@
1
1
  import type { File } from '../../../../shared/contracts/files';
2
2
  import type { AllowedTypes } from '../AssetCard/AssetCard';
3
- interface MediaLibraryDialogProps {
3
+ export interface MediaLibraryDialogProps {
4
4
  allowedTypes?: AllowedTypes[];
5
5
  onClose: () => void;
6
6
  onSelectAssets: (selectedAssets: File[]) => void;
7
7
  }
8
8
  export declare const MediaLibraryDialog: ({ onClose, onSelectAssets, allowedTypes, }: MediaLibraryDialogProps) => import("react/jsx-runtime").JSX.Element;
9
- export {};
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { CarouselAssetsProps } from './Carousel/CarouselAssets';
3
- import type { AllowedTypes } from '../AssetCard/AssetCard';
4
- interface MediaLibraryInputProps {
3
+ type AllowedTypes = 'files' | 'images' | 'videos' | 'audios';
4
+ export interface MediaLibraryInputProps {
5
5
  required?: boolean;
6
6
  name: string;
7
7
  labelAction?: React.ReactNode;
@@ -12,5 +12,5 @@ interface FolderWithDepth extends Folder {
12
12
  interface OptionProps extends ReactSelectOptionProps<FolderWithDepth, false> {
13
13
  selectProps: SelectProps & ReactSelectOptionProps<FolderWithDepth, false>['selectProps'];
14
14
  }
15
- declare const Option: ({ children, data, selectProps, ...props }: OptionProps) => import("react/jsx-runtime").JSX.Element;
16
- export default Option;
15
+ export declare const Option: ({ children, data, selectProps, ...props }: OptionProps) => import("react/jsx-runtime").JSX.Element;
16
+ export {};
@@ -10,7 +10,7 @@ export interface SelectTreeProps<Option = unknown, IsMulti extends boolean = fal
10
10
  value?: string | number | null;
11
11
  };
12
12
  options: OptionSelectTree[];
13
- onChange?: (value: any) => void;
13
+ onChange?: (value: Record<string, string | number>) => void;
14
14
  name?: string;
15
15
  menuPortalTarget?: HTMLElement | null;
16
16
  inputId?: string;
@@ -19,5 +19,4 @@ export interface SelectTreeProps<Option = unknown, IsMulti extends boolean = fal
19
19
  isDisabled?: boolean;
20
20
  disabled?: boolean;
21
21
  }
22
- declare const SelectTree: ({ options: defaultOptions, maxDisplayDepth, defaultValue, ...props }: SelectTreeProps) => import("react/jsx-runtime").JSX.Element;
23
- export default SelectTree;
22
+ export declare const SelectTree: ({ options: defaultOptions, maxDisplayDepth, defaultValue, ...props }: SelectTreeProps) => import("react/jsx-runtime").JSX.Element;
@@ -10,5 +10,5 @@ export type FlattenedNode<T> = {
10
10
  label?: string;
11
11
  children?: TreeNode<T>[];
12
12
  };
13
- export default function flattenTree<T>(tree: TreeNode<T>[], parent?: TreeNode<T> | null, depth?: number): FlattenedNode<T>[];
13
+ export declare function flattenTree<T>(tree: TreeNode<T>[], parent?: TreeNode<T> | null, depth?: number): FlattenedNode<T>[];
14
14
  export {};
@@ -5,5 +5,5 @@ interface Option {
5
5
  interface DefaultValue {
6
6
  value?: number | string | null;
7
7
  }
8
- declare function getOpenValues(options: Option[], defaultValue?: DefaultValue): (string | number | null)[];
9
- export default getOpenValues;
8
+ export declare function getOpenValues(options: Option[], defaultValue?: DefaultValue): (string | number | null)[];
9
+ export {};
@@ -2,5 +2,5 @@ interface Option {
2
2
  value: string | number | null;
3
3
  depth: number;
4
4
  }
5
- declare function getValuesToClose(options: Option[], value: number | string | null): (string | number | null)[];
6
- export default getValuesToClose;
5
+ export declare function getValuesToClose(options: Option[], value: number | string | null): (string | number | null)[];
6
+ export {};
@@ -3,5 +3,5 @@ interface SortPickerProps {
3
3
  onChangeSort: (value: Query['sort'] | string) => void;
4
4
  value?: string;
5
5
  }
6
- declare const SortPicker: ({ onChangeSort, value }: SortPickerProps) => import("react/jsx-runtime").JSX.Element;
7
- export default SortPicker;
6
+ export declare const SortPicker: ({ onChangeSort, value }: SortPickerProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -1,4 +1,4 @@
1
- import { AssetType } from '../../../newConstants';
1
+ import { AssetType } from '../../../constants';
2
2
  import type { File, RawFile } from '../../../../../shared/contracts/files';
3
3
  interface Asset extends File {
4
4
  rawFile?: RawFile;
@@ -1,5 +1,5 @@
1
- import type { AllowedFiles } from '../../utils';
2
1
  import type { File, RawFile } from '../../../../shared/contracts/files';
2
+ import type { AllowedFiles } from '../../utils';
3
3
  type FileWithoutIdHash = Omit<File, 'id' | 'hash'>;
4
4
  export interface Asset extends Omit<File, 'folder'> {
5
5
  isLocal?: boolean;
@@ -59,6 +59,7 @@ export declare const sortOptions: {
59
59
  key: string;
60
60
  value: string;
61
61
  }[];
62
+ export declare const pageSizes: number[];
62
63
  export declare const localStorageKeys: {
63
64
  modalView: string;
64
65
  view: string;
@@ -12,7 +12,7 @@ export declare const useEditAsset: () => {
12
12
  cancel: () => void;
13
13
  editAsset: (asset: FileAsset, file: File) => Promise<FileAsset>;
14
14
  progress: number;
15
- status: "loading" | "success" | "error" | "idle";
15
+ status: "error" | "success" | "idle" | "loading";
16
16
  data: undefined;
17
17
  error: null;
18
18
  isError: false;
@@ -39,7 +39,7 @@ export declare const useEditAsset: () => {
39
39
  cancel: () => void;
40
40
  editAsset: (asset: FileAsset, file: File) => Promise<FileAsset>;
41
41
  progress: number;
42
- status: "loading" | "success" | "error" | "idle";
42
+ status: "error" | "success" | "idle" | "loading";
43
43
  data: undefined;
44
44
  error: null;
45
45
  isError: false;
@@ -66,7 +66,7 @@ export declare const useEditAsset: () => {
66
66
  cancel: () => void;
67
67
  editAsset: (asset: FileAsset, file: File) => Promise<FileAsset>;
68
68
  progress: number;
69
- status: "loading" | "success" | "error" | "idle";
69
+ status: "error" | "success" | "idle" | "loading";
70
70
  data: undefined;
71
71
  error: ErrorMutation;
72
72
  isError: true;
@@ -93,7 +93,7 @@ export declare const useEditAsset: () => {
93
93
  cancel: () => void;
94
94
  editAsset: (asset: FileAsset, file: File) => Promise<FileAsset>;
95
95
  progress: number;
96
- status: "loading" | "success" | "error" | "idle";
96
+ status: "error" | "success" | "idle" | "loading";
97
97
  data: FileAsset;
98
98
  error: null;
99
99
  isError: false;
@@ -5,7 +5,7 @@ interface EditFolderRequestParams {
5
5
  }
6
6
  export declare const useEditFolder: () => {
7
7
  editFolder: (attrs: EditFolderRequestParams['attrs'], id?: EditFolderRequestParams['id']) => Promise<import("../../../shared/contracts/folders").Folder>;
8
- status: "loading" | "success" | "error" | "idle";
8
+ status: "error" | "success" | "idle" | "loading";
9
9
  data: undefined;
10
10
  error: null;
11
11
  isError: false;
@@ -21,7 +21,7 @@ export declare const useEditFolder: () => {
21
21
  mutateAsync: import("react-query").UseMutateAsyncFunction<import("../../../shared/contracts/folders").Folder, import("@strapi/utils/dist/errors").ApplicationError<"ApplicationError", string, unknown> | import("@strapi/utils/dist/errors").NotFoundError<string, unknown> | import("@strapi/utils/dist/errors").ValidationError<string, unknown> | undefined, EditFolderRequestParams, unknown>;
22
22
  } | {
23
23
  editFolder: (attrs: EditFolderRequestParams['attrs'], id?: EditFolderRequestParams['id']) => Promise<import("../../../shared/contracts/folders").Folder>;
24
- status: "loading" | "success" | "error" | "idle";
24
+ status: "error" | "success" | "idle" | "loading";
25
25
  data: undefined;
26
26
  error: null;
27
27
  isError: false;
@@ -37,7 +37,7 @@ export declare const useEditFolder: () => {
37
37
  mutateAsync: import("react-query").UseMutateAsyncFunction<import("../../../shared/contracts/folders").Folder, import("@strapi/utils/dist/errors").ApplicationError<"ApplicationError", string, unknown> | import("@strapi/utils/dist/errors").NotFoundError<string, unknown> | import("@strapi/utils/dist/errors").ValidationError<string, unknown> | undefined, EditFolderRequestParams, unknown>;
38
38
  } | {
39
39
  editFolder: (attrs: EditFolderRequestParams['attrs'], id?: EditFolderRequestParams['id']) => Promise<import("../../../shared/contracts/folders").Folder>;
40
- status: "loading" | "success" | "error" | "idle";
40
+ status: "error" | "success" | "idle" | "loading";
41
41
  data: undefined;
42
42
  error: import("@strapi/utils/dist/errors").ApplicationError<"ApplicationError", string, unknown> | import("@strapi/utils/dist/errors").NotFoundError<string, unknown> | import("@strapi/utils/dist/errors").ValidationError<string, unknown> | undefined;
43
43
  isError: true;
@@ -53,7 +53,7 @@ export declare const useEditFolder: () => {
53
53
  mutateAsync: import("react-query").UseMutateAsyncFunction<import("../../../shared/contracts/folders").Folder, import("@strapi/utils/dist/errors").ApplicationError<"ApplicationError", string, unknown> | import("@strapi/utils/dist/errors").NotFoundError<string, unknown> | import("@strapi/utils/dist/errors").ValidationError<string, unknown> | undefined, EditFolderRequestParams, unknown>;
54
54
  } | {
55
55
  editFolder: (attrs: EditFolderRequestParams['attrs'], id?: EditFolderRequestParams['id']) => Promise<import("../../../shared/contracts/folders").Folder>;
56
- status: "loading" | "success" | "error" | "idle";
56
+ status: "error" | "success" | "idle" | "loading";
57
57
  data: import("../../../shared/contracts/folders").Folder;
58
58
  error: null;
59
59
  isError: false;
@@ -10,7 +10,7 @@ export declare const useFolderStructure: ({ enabled }?: {
10
10
  data: {
11
11
  value: null;
12
12
  label: string;
13
- children: import("./utils/rename-keys").DeepRecord<FolderNodeWithChildren>[];
13
+ children: import("./utils/renameKeys").DeepRecord<FolderNodeWithChildren>[];
14
14
  }[] | undefined;
15
15
  error: unknown;
16
16
  isLoading: boolean;
@@ -1,5 +1,5 @@
1
1
  import type { Query, FilterCondition } from '../../../shared/contracts/files';
2
- declare const useModalQueryParams: (initialState?: Partial<Query>) => ({
2
+ export declare const useModalQueryParams: (initialState?: Partial<Query>) => ({
3
3
  queryObject: Query;
4
4
  rawQuery: string;
5
5
  onChangeFilters?: undefined;
@@ -18,4 +18,3 @@ declare const useModalQueryParams: (initialState?: Partial<Query>) => ({
18
18
  queryObject?: undefined;
19
19
  rawQuery?: undefined;
20
20
  })[];
21
- export default useModalQueryParams;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  export declare const useSelectionState: <TValues extends object>(keys: Array<keyof TValues>, initialValue: TValues[]) => readonly [TValues[], {
3
3
  readonly selectOne: (selection: TValues) => void;
4
- readonly selectAll: (nextSelections: TValues[]) => void;
4
+ readonly selectAll: (nextSelections?: TValues[]) => void;
5
5
  readonly selectOnly: (nextSelection: TValues) => void;
6
6
  readonly selectMultiple: (nextSelections: TValues[]) => void;
7
7
  readonly deselectMultiple: (nextSelections: TValues[]) => void;
@@ -10,6 +10,6 @@ export declare const useUpload: () => {
10
10
  cancel: () => void;
11
11
  error: import("@strapi/utils/dist/errors").ApplicationError<"ApplicationError", string, unknown> | import("@strapi/utils/dist/errors").ValidationError<string, unknown> | null | undefined;
12
12
  progress: number;
13
- status: "loading" | "success" | "error" | "idle";
13
+ status: "error" | "success" | "idle" | "loading";
14
14
  };
15
15
  export {};
@@ -0,0 +1,3 @@
1
+ import type { Plugin } from '@strapi/types';
2
+ declare const admin: Plugin.Config.AdminInput;
3
+ export default admin;
@@ -0,0 +1 @@
1
+ export declare const Upload: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import type { Configuration } from '../../../../../shared/contracts/configuration';
2
+ interface ConfigureTheViewProps {
3
+ config: Configuration;
4
+ }
5
+ export declare const ConfigureTheView: ({ config }: ConfigureTheViewProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,13 @@
1
+ import type { Configuration } from '../../../../../../shared/contracts/configuration';
2
+ interface SettingsProps {
3
+ sort: string;
4
+ pageSize: string | number;
5
+ onChange: ({ target: { name, value }, }: {
6
+ target: {
7
+ name: keyof Configuration;
8
+ value: string | number;
9
+ };
10
+ }) => void;
11
+ }
12
+ declare const Settings: ({ sort, pageSize, onChange }: SettingsProps) => import("react/jsx-runtime").JSX.Element;
13
+ export { Settings };
@@ -0,0 +1,2 @@
1
+ export declare const ON_CHANGE: string;
2
+ export declare const SET_LOADED: string;
@@ -0,0 +1,12 @@
1
+ import type { InitialState } from './init';
2
+ export declare const onChange: ({ name, value, }: {
3
+ name: keyof NonNullable<InitialState['initialData']>;
4
+ value: number | string;
5
+ }) => {
6
+ type: string;
7
+ keys: keyof import("../../../../../../shared/contracts/configuration").Configuration;
8
+ value: string | number;
9
+ };
10
+ export declare const setLoaded: () => {
11
+ type: string;
12
+ };
@@ -0,0 +1,8 @@
1
+ import type { Configuration } from '../../../../../../shared/contracts/configuration';
2
+ export type InitialState = {
3
+ initialData: Partial<Configuration>;
4
+ modifiedData: Partial<Configuration>;
5
+ };
6
+ declare const initialState: InitialState;
7
+ declare const init: (configData: InitialState['initialData']) => InitialState;
8
+ export { init, initialState };
@@ -0,0 +1,15 @@
1
+ import type { InitialState } from './init';
2
+ export interface ActionOnChange {
3
+ type: string;
4
+ keys?: string;
5
+ value: string | number;
6
+ }
7
+ export interface ActionSetLoaded {
8
+ type: string;
9
+ }
10
+ interface ActionInitialValue {
11
+ type: string;
12
+ }
13
+ export type Action = ActionSetLoaded | ActionOnChange | ActionInitialValue;
14
+ export declare const reducer: (state?: InitialState, action?: Action) => InitialState;
15
+ export {};
@@ -0,0 +1 @@
1
+ export declare const MediaLibrary: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import type { File } from '../../../../../../shared/contracts/files';
2
+ import type { FolderDefinition, Folder as FolderInitial } from '../../../../../../shared/contracts/folders';
3
+ interface FolderWithType extends FolderInitial {
4
+ type: string;
5
+ }
6
+ export interface FileWithType extends File {
7
+ type: string;
8
+ }
9
+ export interface BulkActionsProps {
10
+ selected: Array<FileWithType | FolderDefinition> | Array<FolderWithType | FileWithType>;
11
+ onSuccess: () => void;
12
+ currentFolder?: FolderWithType;
13
+ }
14
+ export declare const BulkActions: ({ selected, onSuccess, currentFolder }: BulkActionsProps) => import("react/jsx-runtime").JSX.Element;
15
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { FolderDefinition } from '../../../../../../shared/contracts/folders';
2
+ import type { FileWithType } from '../../../../hooks/useBulkRemove';
3
+ export interface BulkDeleteButtonProps {
4
+ selected: Array<FileWithType | FolderDefinition>;
5
+ onSuccess: () => void;
6
+ }
7
+ export declare const BulkDeleteButton: ({ selected, onSuccess }: BulkDeleteButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import type { File } from '../../../../../../shared/contracts/files';
2
+ import type { Folder as FolderDefinition } from '../../../../../../shared/contracts/folders';
3
+ interface FolderWithType extends FolderDefinition {
4
+ type: string;
5
+ }
6
+ interface FileWithType extends File {
7
+ type: string;
8
+ }
9
+ export interface BulkMoveButtonProps {
10
+ onSuccess: () => void;
11
+ currentFolder?: FolderWithType;
12
+ selected?: Array<FolderWithType | FileWithType>;
13
+ }
14
+ export declare const BulkMoveButton: ({ selected, onSuccess, currentFolder, }: BulkMoveButtonProps) => import("react/jsx-runtime").JSX.Element;
15
+ export {};
@@ -0,0 +1,7 @@
1
+ export interface EmptyOrNoPermissionsProps {
2
+ canCreate: boolean;
3
+ canRead: boolean;
4
+ isFiltering: boolean;
5
+ onActionClick: () => void;
6
+ }
7
+ export declare const EmptyOrNoPermissions: ({ canCreate, isFiltering, canRead, onActionClick, }: EmptyOrNoPermissionsProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const Filters: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,22 @@
1
+ import type { Folder } from '../../../../../../shared/contracts/folders';
2
+ import type { CrumbDefinition } from '../../../../components/Breadcrumbs/Breadcrumbs';
3
+ interface FolderDefinition extends Omit<Folder, 'children' | 'files' | 'parent'> {
4
+ children: {
5
+ count: number;
6
+ };
7
+ files: {
8
+ count: number;
9
+ };
10
+ parent?: FolderDefinition;
11
+ }
12
+ export interface HeaderProps {
13
+ breadcrumbs?: Array<CrumbDefinition> | null;
14
+ canCreate: boolean;
15
+ folder?: FolderDefinition | null;
16
+ onToggleEditFolderDialog: ({ created }?: {
17
+ created?: boolean;
18
+ }) => void;
19
+ onToggleUploadAssetDialog: () => void;
20
+ }
21
+ export declare const Header: ({ breadcrumbs, canCreate, folder, onToggleEditFolderDialog, onToggleUploadAssetDialog, }: HeaderProps) => import("react/jsx-runtime").JSX.Element;
22
+ export {};