@ckbox/core 1.2.0-dev.0 → 1.2.0-dev.1
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/README.md +3 -3
- package/dist/index.js +1 -1
- package/package.json +3 -3
- package/dist/components/assetSize/AssetSize.d.ts +0 -12
- package/dist/components/assetSize/getAssetSize.d.ts +0 -1
- package/dist/components/assetSize/index.d.ts +0 -2
- package/dist/components/assets/Assets.d.ts +0 -72
- package/dist/components/assets/AssetsBottombar.d.ts +0 -33
- package/dist/components/assets/AssetsTopbar.d.ts +0 -71
- package/dist/components/assets/asset/Asset.d.ts +0 -45
- package/dist/components/assets/asset/AssetPreview.d.ts +0 -45
- package/dist/components/assets/asset/index.d.ts +0 -1
- package/dist/components/assets/assetEditForm/AssetEditForm.d.ts +0 -39
- package/dist/components/assets/assetEditForm/index.d.ts +0 -1
- package/dist/components/assets/assetEditForm/useFormValidation.d.ts +0 -8
- package/dist/components/assets/assetPropertiesDialog/AssetPropertiesDialog.d.ts +0 -27
- package/dist/components/assets/assetPropertiesDialog/index.d.ts +0 -1
- package/dist/components/assets/assetPropertiesDialog/useFormValidation.d.ts +0 -8
- package/dist/components/assets/assetPropertiesDrawer/AssetPropertiesDrawer.d.ts +0 -35
- package/dist/components/assets/assetPropertiesDrawer/index.d.ts +0 -1
- package/dist/components/assets/assetsActions/index.d.ts +0 -1
- package/dist/components/assets/assetsActions/useAssetsActions.d.ts +0 -35
- package/dist/components/assets/assetsContent/AssetGalleryItem.d.ts +0 -73
- package/dist/components/assets/assetsContent/AssetsContent.d.ts +0 -51
- package/dist/components/assets/assetsContent/index.d.ts +0 -1
- package/dist/components/assets/assetsDeleteDialog/AssetsDeleteDialog.d.ts +0 -22
- package/dist/components/assets/assetsDeleteDialog/index.d.ts +0 -1
- package/dist/components/assets/assetsPagination/index.d.ts +0 -1
- package/dist/components/assets/assetsPagination/useAssetsPagination.d.ts +0 -38
- package/dist/components/assets/assetsPreview/AssetsPreview.d.ts +0 -54
- package/dist/components/assets/assetsPreview/index.d.ts +0 -1
- package/dist/components/assets/assetsSearchDialog/AssetsSearchDialog.d.ts +0 -18
- package/dist/components/assets/assetsSearchDialog/constants.d.ts +0 -12
- package/dist/components/assets/assetsSearchDialog/form/AssetsSearchDialogForm.d.ts +0 -22
- package/dist/components/assets/assetsSearchDialog/form/index.d.ts +0 -1
- package/dist/components/assets/assetsSearchDialog/index.d.ts +0 -1
- package/dist/components/assets/assetsSearchDialog/recentSearchItem/RecentSearchItem.d.ts +0 -23
- package/dist/components/assets/assetsSearchDialog/recentSearchItem/index.d.ts +0 -1
- package/dist/components/assets/assetsSearchDialog/utils.d.ts +0 -82
- package/dist/components/assets/assetsSelection/index.d.ts +0 -1
- package/dist/components/assets/assetsSelection/useAssetsSelection.d.ts +0 -25
- package/dist/components/assets/constants/constants.d.ts +0 -13
- package/dist/components/assets/constants/index.d.ts +0 -1
- package/dist/components/assets/displayOptions/DisplayOptions.d.ts +0 -55
- package/dist/components/assets/displayOptions/index.d.ts +0 -2
- package/dist/components/assets/index.d.ts +0 -1
- package/dist/components/assets/loader/GalleryLoader.d.ts +0 -25
- package/dist/components/assets/loader/index.d.ts +0 -2
- package/dist/components/assets/loader/useLoader.d.ts +0 -14
- package/dist/components/assets/srcSet/index.d.ts +0 -1
- package/dist/components/assets/srcSet/useSrcSet.d.ts +0 -37
- package/dist/components/assets/uploadIndicator/UploadIndicator.d.ts +0 -3
- package/dist/components/assets/uploadIndicator/index.d.ts +0 -1
- package/dist/components/categoryPropertiesDrawer/CategoryPropertiesDrawer.d.ts +0 -38
- package/dist/components/categoryPropertiesDrawer/index.d.ts +0 -1
- package/dist/components/date/Date.d.ts +0 -12
- package/dist/components/date/index.d.ts +0 -1
- package/dist/components/errorContainer/ErrorContainer.d.ts +0 -9
- package/dist/components/errorContainer/index.d.ts +0 -1
- package/dist/components/index.d.ts +0 -9
- package/dist/components/notifications/Notifications.d.ts +0 -3
- package/dist/components/notifications/index.d.ts +0 -1
- package/dist/components/timeLeft/TimeLeft.d.ts +0 -15
- package/dist/components/timeLeft/index.d.ts +0 -1
- package/dist/components/uploadButton/UploadButton.d.ts +0 -10
- package/dist/components/uploadButton/index.d.ts +0 -1
- package/dist/components/uploadDialog/UploadDialog.d.ts +0 -3
- package/dist/components/uploadDialog/index.d.ts +0 -1
- package/dist/components/uploadDialog/uploadDialogFooter/UploadDialogFooter.d.ts +0 -18
- package/dist/components/uploadDialog/uploadDialogFooter/index.d.ts +0 -1
- package/dist/components/uploadDialog/uploadProgressPanel/UploadProgressPanel.d.ts +0 -50
- package/dist/components/uploadDialog/uploadProgressPanel/index.d.ts +0 -1
- package/dist/components/uploadDialog/uploadProgressPanel/utils.d.ts +0 -29
- package/dist/components/uploadDialog/uploadQueue/UploadQueue.d.ts +0 -18
- package/dist/components/uploadDialog/uploadQueue/index.d.ts +0 -1
- package/dist/components/uploadDialog/utils.d.ts +0 -12
- package/dist/constants/constants.d.ts +0 -36
- package/dist/constants/index.d.ts +0 -1
- package/dist/core/Core.d.ts +0 -5
- package/dist/core/CoreContext.d.ts +0 -44
- package/dist/core/CoreErrorBoundary.d.ts +0 -26
- package/dist/core/CoreFallbackProviders.d.ts +0 -9
- package/dist/core/CoreProviders.d.ts +0 -3
- package/dist/core/index.d.ts +0 -4
- package/dist/providers/api/ApiContext.d.ts +0 -12
- package/dist/providers/api/ApiProvider.d.ts +0 -17
- package/dist/providers/api/index.d.ts +0 -3
- package/dist/providers/api/useApi.d.ts +0 -42
- package/dist/providers/assetsConfig/AssetsConfigContext.d.ts +0 -41
- package/dist/providers/assetsConfig/AssetsConfigProvider.d.ts +0 -16
- package/dist/providers/assetsConfig/index.d.ts +0 -3
- package/dist/providers/assetsConfig/utils.d.ts +0 -11
- package/dist/providers/auth/AuthContext.d.ts +0 -16
- package/dist/providers/auth/AuthProvider.d.ts +0 -14
- package/dist/providers/auth/index.d.ts +0 -3
- package/dist/providers/auth/useAuth.d.ts +0 -4
- package/dist/providers/categoriesConfig/CategoriesConfigContext.d.ts +0 -24
- package/dist/providers/categoriesConfig/CategoriesConfigProvider.d.ts +0 -10
- package/dist/providers/categoriesConfig/index.d.ts +0 -2
- package/dist/providers/categoriesConfig/utils.d.ts +0 -16
- package/dist/providers/data/hooks/assets/index.d.ts +0 -7
- package/dist/providers/data/hooks/assets/useDeleteAssets.d.ts +0 -71
- package/dist/providers/data/hooks/assets/useGetAsset.d.ts +0 -6
- package/dist/providers/data/hooks/assets/useGetCategoryAssets.d.ts +0 -11
- package/dist/providers/data/hooks/assets/useGetRecentAssets.d.ts +0 -10
- package/dist/providers/data/hooks/assets/useLazyGetAsset.d.ts +0 -10
- package/dist/providers/data/hooks/assets/useUpdateAsset.d.ts +0 -77
- package/dist/providers/data/hooks/assets/useUpdateAssetLastUse.d.ts +0 -71
- package/dist/providers/data/hooks/categories/index.d.ts +0 -8
- package/dist/providers/data/hooks/categories/useCreateCategory.d.ts +0 -71
- package/dist/providers/data/hooks/categories/useDeleteCategory.d.ts +0 -74
- package/dist/providers/data/hooks/categories/useGetAdminCategories.d.ts +0 -7
- package/dist/providers/data/hooks/categories/useGetCategories.d.ts +0 -6
- package/dist/providers/data/hooks/categories/useGetCategory.d.ts +0 -6
- package/dist/providers/data/hooks/categories/useStageCategory.d.ts +0 -14
- package/dist/providers/data/hooks/categories/useUpdateCategoriesOrder.d.ts +0 -71
- package/dist/providers/data/hooks/categories/useUpdateCategory.d.ts +0 -82
- package/dist/providers/data/hooks/errors/index.d.ts +0 -3
- package/dist/providers/data/hooks/errors/useApiErrors.d.ts +0 -4
- package/dist/providers/data/hooks/errors/useAssetErrors.d.ts +0 -3
- package/dist/providers/data/hooks/errors/useCategoryErrors.d.ts +0 -3
- package/dist/providers/data/hooks/images/index.d.ts +0 -2
- package/dist/providers/data/hooks/images/useGetImagesConfig.d.ts +0 -6
- package/dist/providers/data/hooks/images/useUpdateImageFormatConfig.d.ts +0 -76
- package/dist/providers/data/hooks/index.d.ts +0 -5
- package/dist/providers/data/hooks/limits/index.d.ts +0 -1
- package/dist/providers/data/hooks/limits/useGetPlanLimits.d.ts +0 -6
- package/dist/providers/data/hooks/search/index.d.ts +0 -1
- package/dist/providers/data/hooks/search/useSearch.d.ts +0 -12
- package/dist/providers/data/hooks/useMutation.d.ts +0 -67
- package/dist/providers/data/hooks/useQuery.d.ts +0 -3
- package/dist/providers/data/index.d.ts +0 -2
- package/dist/providers/data/parsers/assets/index.d.ts +0 -3
- package/dist/providers/data/parsers/assets/parseAsset.d.ts +0 -9
- package/dist/providers/data/parsers/assets/parseAssets.d.ts +0 -9
- package/dist/providers/data/parsers/assets/types.d.ts +0 -39
- package/dist/providers/data/parsers/assetsMetadata/index.d.ts +0 -2
- package/dist/providers/data/parsers/assetsMetadata/parseAssetMetadata.d.ts +0 -9
- package/dist/providers/data/parsers/assetsMetadata/types.d.ts +0 -22
- package/dist/providers/data/parsers/categories/index.d.ts +0 -4
- package/dist/providers/data/parsers/categories/parseAdminCategories.d.ts +0 -13
- package/dist/providers/data/parsers/categories/parseCategories.d.ts +0 -9
- package/dist/providers/data/parsers/categories/parseCategory.d.ts +0 -9
- package/dist/providers/data/parsers/categories/types.d.ts +0 -39
- package/dist/providers/data/parsers/index.d.ts +0 -3
- package/dist/providers/index.d.ts +0 -12
- package/dist/providers/language/LanguageProvider.d.ts +0 -4
- package/dist/providers/language/index.d.ts +0 -2
- package/dist/providers/language/types.d.ts +0 -22
- package/dist/providers/language/utils.d.ts +0 -16
- package/dist/providers/limits/PlanLimitsContext.d.ts +0 -11
- package/dist/providers/limits/PlanLimitsProvider.d.ts +0 -9
- package/dist/providers/limits/index.d.ts +0 -2
- package/dist/providers/limits/utils.d.ts +0 -7
- package/dist/providers/notifications/NotificationsContext.d.ts +0 -53
- package/dist/providers/notifications/NotificationsProvider.d.ts +0 -9
- package/dist/providers/notifications/index.d.ts +0 -2
- package/dist/providers/query/QueryProvider.d.ts +0 -12
- package/dist/providers/query/index.d.ts +0 -1
- package/dist/providers/ui/UIProvider.d.ts +0 -22
- package/dist/providers/ui/UIProviderContainerMode.d.ts +0 -4
- package/dist/providers/ui/UIProviderDialogMode.d.ts +0 -20
- package/dist/providers/ui/index.d.ts +0 -2
- package/dist/providers/ui/types.d.ts +0 -19
- package/dist/providers/upload/UploadContext.d.ts +0 -48
- package/dist/providers/upload/UploadProvider.d.ts +0 -14
- package/dist/providers/upload/constants.d.ts +0 -142
- package/dist/providers/upload/index.d.ts +0 -5
- package/dist/providers/upload/types.d.ts +0 -282
- package/dist/providers/upload/uploadStateReducer.d.ts +0 -10
- package/dist/providers/upload/useStartUpload.d.ts +0 -10
- package/dist/providers/upload/useUpload.d.ts +0 -21
- package/dist/providers/upload/useUploadComponents.d.ts +0 -21
- package/dist/providers/upload/utils.d.ts +0 -136
- package/dist/providers/user/UserContext.d.ts +0 -68
- package/dist/providers/user/UserProvider.d.ts +0 -13
- package/dist/providers/user/constants.d.ts +0 -19
- package/dist/providers/user/index.d.ts +0 -3
- package/dist/providers/user/persistData.d.ts +0 -14
- package/dist/providers/user/types.d.ts +0 -149
- package/dist/providers/user/useUserData.d.ts +0 -50
- package/dist/services/api/api/api.d.ts +0 -41
- package/dist/services/api/api/index.d.ts +0 -1
- package/dist/services/api/assets/assets.d.ts +0 -98
- package/dist/services/api/assets/index.d.ts +0 -1
- package/dist/services/api/categories/categories.d.ts +0 -50
- package/dist/services/api/categories/index.d.ts +0 -1
- package/dist/services/api/client/ApiClient.d.ts +0 -108
- package/dist/services/api/client/ApiClientError.d.ts +0 -37
- package/dist/services/api/client/index.d.ts +0 -3
- package/dist/services/api/client/types.d.ts +0 -19
- package/dist/services/api/errors/ApiErrorHandler.d.ts +0 -53
- package/dist/services/api/errors/index.d.ts +0 -2
- package/dist/services/api/errors/types.d.ts +0 -6
- package/dist/services/api/images/images.d.ts +0 -18
- package/dist/services/api/images/index.d.ts +0 -1
- package/dist/services/api/index.d.ts +0 -5
- package/dist/services/api/limits/index.d.ts +0 -1
- package/dist/services/api/limits/limits.d.ts +0 -10
- package/dist/services/api/search/index.d.ts +0 -1
- package/dist/services/api/search/search.d.ts +0 -10
- package/dist/services/api/types/assets.d.ts +0 -131
- package/dist/services/api/types/assetsMetadata.d.ts +0 -24
- package/dist/services/api/types/categories.d.ts +0 -86
- package/dist/services/api/types/common.d.ts +0 -16
- package/dist/services/api/types/images.d.ts +0 -8
- package/dist/services/api/types/index.d.ts +0 -7
- package/dist/services/api/types/limits.d.ts +0 -11
- package/dist/services/api/types/search.d.ts +0 -122
- package/dist/services/auth/AuthClient.d.ts +0 -89
- package/dist/services/auth/Token.d.ts +0 -55
- package/dist/services/auth/error.d.ts +0 -6
- package/dist/services/auth/index.d.ts +0 -3
- package/dist/services/auth/types.d.ts +0 -27
- package/dist/services/index.d.ts +0 -2
- package/dist/views/adminPanel/AdminPanel.d.ts +0 -3
- package/dist/views/adminPanel/assetCategories/AssetCategories.d.ts +0 -9
- package/dist/views/adminPanel/assetCategories/AssetCategoryPanel.d.ts +0 -23
- package/dist/views/adminPanel/assetCategories/AssetCategoryPanelEdit.d.ts +0 -26
- package/dist/views/adminPanel/assetCategories/AssetCategoryPanelLoader.d.ts +0 -9
- package/dist/views/adminPanel/assetCategories/ConfirmCategoryDialog.d.ts +0 -29
- package/dist/views/adminPanel/assetCategories/index.d.ts +0 -1
- package/dist/views/adminPanel/assetCategories/useAssetCategories.d.ts +0 -28
- package/dist/views/adminPanel/assetCategories/useFormValidation.d.ts +0 -10
- package/dist/views/adminPanel/imagesSettings/ImageFormatSettingsPanel.d.ts +0 -22
- package/dist/views/adminPanel/imagesSettings/ImageFormatSettingsPanelLoader.d.ts +0 -3
- package/dist/views/adminPanel/imagesSettings/ImagesSettings.d.ts +0 -3
- package/dist/views/adminPanel/imagesSettings/constants.d.ts +0 -5
- package/dist/views/adminPanel/imagesSettings/index.d.ts +0 -1
- package/dist/views/adminPanel/imagesSettings/useImageSettings.d.ts +0 -9
- package/dist/views/adminPanel/index.d.ts +0 -1
- package/dist/views/category/Category.d.ts +0 -18
- package/dist/views/category/index.d.ts +0 -1
- package/dist/views/category/utils/index.d.ts +0 -1
- package/dist/views/category/utils/utils.d.ts +0 -12
- package/dist/views/index.d.ts +0 -1
- package/dist/views/recentAssets/RecentAssets.d.ts +0 -19
- package/dist/views/recentAssets/index.d.ts +0 -1
- package/dist/views/search/Search.d.ts +0 -15
- package/dist/views/search/index.d.ts +0 -1
- package/dist/views/search/utils.d.ts +0 -19
- package/dist/views/views/Views.d.ts +0 -3
- package/dist/views/views/index.d.ts +0 -1
- package/dist/views/views/navbar/Navbar.d.ts +0 -46
- package/dist/views/views/navbar/index.d.ts +0 -1
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { MutationFunction } from '@tanstack/react-query';
|
|
2
|
-
import { UseExtendedMutationOptions, ErrorSuppressedMutateFunction } from './types';
|
|
3
|
-
export declare const useMutation: <TData = unknown, TError extends Error = Error, TVariables = void, TContext = unknown>(mutationFn: MutationFunction<TData, TVariables>, options?: UseExtendedMutationOptions<TData, TError, TVariables, TContext> | undefined) => {
|
|
4
|
-
mutateAsync: ErrorSuppressedMutateFunction<TData, TError, TVariables, TContext>;
|
|
5
|
-
data: undefined;
|
|
6
|
-
error: null;
|
|
7
|
-
isError: false;
|
|
8
|
-
isIdle: true;
|
|
9
|
-
isLoading: false;
|
|
10
|
-
isSuccess: false;
|
|
11
|
-
status: "idle";
|
|
12
|
-
mutate: import("@tanstack/react-query").UseMutateFunction<TData, TError, TVariables, TContext>;
|
|
13
|
-
reset: () => void;
|
|
14
|
-
context: TContext | undefined;
|
|
15
|
-
failureCount: number;
|
|
16
|
-
failureReason: TError | null;
|
|
17
|
-
isPaused: boolean;
|
|
18
|
-
variables: TVariables | undefined;
|
|
19
|
-
} | {
|
|
20
|
-
mutateAsync: ErrorSuppressedMutateFunction<TData, TError, TVariables, TContext>;
|
|
21
|
-
data: undefined;
|
|
22
|
-
error: null;
|
|
23
|
-
isError: false;
|
|
24
|
-
isIdle: false;
|
|
25
|
-
isLoading: true;
|
|
26
|
-
isSuccess: false;
|
|
27
|
-
status: "loading";
|
|
28
|
-
mutate: import("@tanstack/react-query").UseMutateFunction<TData, TError, TVariables, TContext>;
|
|
29
|
-
reset: () => void;
|
|
30
|
-
context: TContext | undefined;
|
|
31
|
-
failureCount: number;
|
|
32
|
-
failureReason: TError | null;
|
|
33
|
-
isPaused: boolean;
|
|
34
|
-
variables: TVariables | undefined;
|
|
35
|
-
} | {
|
|
36
|
-
mutateAsync: ErrorSuppressedMutateFunction<TData, TError, TVariables, TContext>;
|
|
37
|
-
data: undefined;
|
|
38
|
-
error: TError;
|
|
39
|
-
isError: true;
|
|
40
|
-
isIdle: false;
|
|
41
|
-
isLoading: false;
|
|
42
|
-
isSuccess: false;
|
|
43
|
-
status: "error";
|
|
44
|
-
mutate: import("@tanstack/react-query").UseMutateFunction<TData, TError, TVariables, TContext>;
|
|
45
|
-
reset: () => void;
|
|
46
|
-
context: TContext | undefined;
|
|
47
|
-
failureCount: number;
|
|
48
|
-
failureReason: TError | null;
|
|
49
|
-
isPaused: boolean;
|
|
50
|
-
variables: TVariables | undefined;
|
|
51
|
-
} | {
|
|
52
|
-
mutateAsync: ErrorSuppressedMutateFunction<TData, TError, TVariables, TContext>;
|
|
53
|
-
data: TData;
|
|
54
|
-
error: null;
|
|
55
|
-
isError: false;
|
|
56
|
-
isIdle: false;
|
|
57
|
-
isLoading: false;
|
|
58
|
-
isSuccess: true;
|
|
59
|
-
status: "success";
|
|
60
|
-
mutate: import("@tanstack/react-query").UseMutateFunction<TData, TError, TVariables, TContext>;
|
|
61
|
-
reset: () => void;
|
|
62
|
-
context: TContext | undefined;
|
|
63
|
-
failureCount: number;
|
|
64
|
-
failureReason: TError | null;
|
|
65
|
-
isPaused: boolean;
|
|
66
|
-
variables: TVariables | undefined;
|
|
67
|
-
};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { QueryFunction, QueryKey } from '@tanstack/react-query';
|
|
2
|
-
import { UseExtendedQueryOptions } from './types';
|
|
3
|
-
export declare const useQuery: <TQueryFnData = unknown, TError extends Error = Error, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(queryKey: TQueryKey, queryFn: QueryFunction<TQueryFnData, TQueryKey>, options?: UseExtendedQueryOptions<TQueryFnData, TError, TData, TQueryKey> | undefined) => import("@tanstack/react-query").UseQueryResult<TData, TError>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ApiAsset } from '../../../../services';
|
|
2
|
-
import { ParsedAsset } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Parses asset from API. Provides fallback value if needed.
|
|
5
|
-
*
|
|
6
|
-
* @param asset asset to parse
|
|
7
|
-
* @returns parsed asset
|
|
8
|
-
*/
|
|
9
|
-
export declare const parseAsset: (asset?: ApiAsset) => ParsedAsset;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ApiAsset } from '../../../../services';
|
|
2
|
-
import { ParsedAsset } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Parses a list of assets. Provides fallback if needed.
|
|
5
|
-
*
|
|
6
|
-
* @param assets list of assets to parse
|
|
7
|
-
* @returns list of parsed assets
|
|
8
|
-
*/
|
|
9
|
-
export declare const parseAssets: (assets?: ApiAsset[]) => ParsedAsset[];
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { ParsedAssetMetadata } from '../assetsMetadata';
|
|
2
|
-
export interface ParsedAsset {
|
|
3
|
-
/**
|
|
4
|
-
* Asset id.
|
|
5
|
-
*/
|
|
6
|
-
id: string;
|
|
7
|
-
/**
|
|
8
|
-
* Asset name.
|
|
9
|
-
*/
|
|
10
|
-
name: string;
|
|
11
|
-
/**
|
|
12
|
-
* Asset file extension.
|
|
13
|
-
*/
|
|
14
|
-
extension: string;
|
|
15
|
-
/**
|
|
16
|
-
* Converted asset size.
|
|
17
|
-
*/
|
|
18
|
-
size?: number;
|
|
19
|
-
/**
|
|
20
|
-
* Asset last modification time.
|
|
21
|
-
*/
|
|
22
|
-
lastModifiedAt?: string;
|
|
23
|
-
/**
|
|
24
|
-
* Asset upload date.
|
|
25
|
-
*/
|
|
26
|
-
uploadedAt?: string;
|
|
27
|
-
/**
|
|
28
|
-
* Asset metadata.
|
|
29
|
-
*/
|
|
30
|
-
metadata: ParsedAssetMetadata;
|
|
31
|
-
/**
|
|
32
|
-
* Asset category id.
|
|
33
|
-
*/
|
|
34
|
-
categoryId: string;
|
|
35
|
-
/**
|
|
36
|
-
* Asset tags.
|
|
37
|
-
*/
|
|
38
|
-
tags: string[];
|
|
39
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ApiAssetMetadata } from '../../../../services';
|
|
2
|
-
import { ParsedAssetMetadata } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Parses asset's metadata. Provides fallback values if necessary.
|
|
5
|
-
*
|
|
6
|
-
* @param metadata asset's metadata to parse
|
|
7
|
-
* @returns parsed metadata
|
|
8
|
-
*/
|
|
9
|
-
export declare const parseAssetMetadata: (metadata?: ApiAssetMetadata) => ParsedAssetMetadata;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export interface ParsedAssetMetadata {
|
|
2
|
-
/**
|
|
3
|
-
* Asset blurhash.
|
|
4
|
-
*/
|
|
5
|
-
blurHash?: string;
|
|
6
|
-
/**
|
|
7
|
-
* Asset description.
|
|
8
|
-
*/
|
|
9
|
-
description: string;
|
|
10
|
-
/**
|
|
11
|
-
* Asset width in px.
|
|
12
|
-
*/
|
|
13
|
-
width?: number;
|
|
14
|
-
/**
|
|
15
|
-
* Asset height in px.
|
|
16
|
-
*/
|
|
17
|
-
height?: number;
|
|
18
|
-
/**
|
|
19
|
-
* Set of custom attributes.
|
|
20
|
-
*/
|
|
21
|
-
customAttributes?: Record<string, unknown>;
|
|
22
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ApiAdminCategories } from '../../../../services';
|
|
2
|
-
import { ParsedAdminCategory } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Parses admin categories from API. Merges them with existing ones. Provides fallbacks if needed.
|
|
5
|
-
*
|
|
6
|
-
* Categories fetched from the backend must be merged manully with existing ones.
|
|
7
|
-
* This is due to the fact that new categories might be in staging phase, e.g. newly added or updated categories (but not saved yet).
|
|
8
|
-
*
|
|
9
|
-
* @param categories categories from API
|
|
10
|
-
* @param cachedCategories cached categories
|
|
11
|
-
* @returns parsed categories
|
|
12
|
-
*/
|
|
13
|
-
export declare const parseAdminCategories: (categories?: ApiAdminCategories, cachedCategories?: ParsedAdminCategory[]) => ParsedAdminCategory[];
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ApiCategory, Maybe } from '../../../../services';
|
|
2
|
-
import { ParsedCategory } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Parses a list of categories. Provides fallback if needed.
|
|
5
|
-
*
|
|
6
|
-
* @param categories categories from API
|
|
7
|
-
* @returns parsed category
|
|
8
|
-
*/
|
|
9
|
-
export declare const parseCategories: (categories: Maybe<ApiCategory[]>) => ParsedCategory[];
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ApiCategory, Maybe } from '../../../../services';
|
|
2
|
-
import { ParsedCategory } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Parses API category.
|
|
5
|
-
*
|
|
6
|
-
* @param category category from API
|
|
7
|
-
* @returns parsed category
|
|
8
|
-
*/
|
|
9
|
-
export declare const parseCategory: (category: Maybe<ApiCategory>) => ParsedCategory;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
export interface ParsedCategory {
|
|
2
|
-
/**
|
|
3
|
-
* Category id.
|
|
4
|
-
*/
|
|
5
|
-
id: string;
|
|
6
|
-
/**
|
|
7
|
-
* Total number of assets in the category.
|
|
8
|
-
*/
|
|
9
|
-
assetsCount: number;
|
|
10
|
-
/**
|
|
11
|
-
* Category name.
|
|
12
|
-
*/
|
|
13
|
-
name: string;
|
|
14
|
-
/**
|
|
15
|
-
* Allowed extensions.
|
|
16
|
-
*/
|
|
17
|
-
extensions: string[];
|
|
18
|
-
}
|
|
19
|
-
export interface ParsedAdminCategory extends ParsedCategory {
|
|
20
|
-
/**
|
|
21
|
-
* Extensions in use.
|
|
22
|
-
*/
|
|
23
|
-
extensionsInUse: string[];
|
|
24
|
-
/**
|
|
25
|
-
* Additional data that can be added to a category.
|
|
26
|
-
* A category with `stage` property is in staging phase.
|
|
27
|
-
* These are newly added or updated categories (but not saved yet).
|
|
28
|
-
*/
|
|
29
|
-
stage?: {
|
|
30
|
-
/**
|
|
31
|
-
* Indicates if category is in editing mode.
|
|
32
|
-
*/
|
|
33
|
-
edit?: boolean;
|
|
34
|
-
/**
|
|
35
|
-
* Indicates if this is a newly added category.
|
|
36
|
-
*/
|
|
37
|
-
newlyAdded?: boolean;
|
|
38
|
-
};
|
|
39
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export * from './api';
|
|
2
|
-
export * from './assetsConfig';
|
|
3
|
-
export * from './auth';
|
|
4
|
-
export * from './categoriesConfig';
|
|
5
|
-
export * from './data';
|
|
6
|
-
export * from './language';
|
|
7
|
-
export * from './query';
|
|
8
|
-
export * from './upload';
|
|
9
|
-
export * from './user';
|
|
10
|
-
export * from './notifications';
|
|
11
|
-
export * from './ui';
|
|
12
|
-
export * from './limits';
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export interface LanguageConfig {
|
|
3
|
-
/**
|
|
4
|
-
* Turns on debugging mode for simplifying translation process (info logged to JS console).
|
|
5
|
-
*/
|
|
6
|
-
debug?: boolean;
|
|
7
|
-
/**
|
|
8
|
-
* Defines language code in case if an object is passed, e.g. 'en'.
|
|
9
|
-
*/
|
|
10
|
-
ui?: string;
|
|
11
|
-
}
|
|
12
|
-
export declare type LanguageConfigProp = string | LanguageConfig;
|
|
13
|
-
export interface LanguageProps {
|
|
14
|
-
/**
|
|
15
|
-
* Main content.
|
|
16
|
-
*/
|
|
17
|
-
children: React.ReactNode;
|
|
18
|
-
/**
|
|
19
|
-
* Takes language code, e.g. 'en' or a detailed configuration options object.
|
|
20
|
-
*/
|
|
21
|
-
language?: LanguageConfigProp;
|
|
22
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { I18nProps, I18nTranslations } from '@ckbox/i18n';
|
|
2
|
-
import { LanguageConfigProp } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Gets resources from global scope.
|
|
5
|
-
*
|
|
6
|
-
* @param locale requested language
|
|
7
|
-
* @returns translations
|
|
8
|
-
*/
|
|
9
|
-
export declare const getTranslations: (locale: string) => I18nTranslations;
|
|
10
|
-
/**
|
|
11
|
-
* Maps language-related props exposed by `core` public API to internal `i18n` props.
|
|
12
|
-
*
|
|
13
|
-
* @param language language code or config
|
|
14
|
-
* @returns config for `i18n` module
|
|
15
|
-
*/
|
|
16
|
-
export declare const mapLangToI18n: (language?: LanguageConfigProp) => I18nProps;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ApiPlanLimits } from '../../services';
|
|
3
|
-
declare type PlanLimits = ApiPlanLimits & {
|
|
4
|
-
isPersonalPlan: boolean;
|
|
5
|
-
};
|
|
6
|
-
/**
|
|
7
|
-
* Defines React context for the subscription plan limits.
|
|
8
|
-
*/
|
|
9
|
-
export declare const PlanLimitsContext: React.Context<PlanLimits>;
|
|
10
|
-
export declare const usePlanLimits: () => PlanLimits;
|
|
11
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ApiPlanLimits } from '../../services/api/types';
|
|
2
|
-
/**
|
|
3
|
-
* Returns true if applied environment limits meet the Personal subscription plan.
|
|
4
|
-
*
|
|
5
|
-
* @param planLimits - Environment plan limits
|
|
6
|
-
*/
|
|
7
|
-
export declare const hasPersonalPlan: (planLimits: ApiPlanLimits | undefined) => boolean;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export interface Notification {
|
|
3
|
-
/**
|
|
4
|
-
* Notification id.
|
|
5
|
-
*/
|
|
6
|
-
id: string;
|
|
7
|
-
/**
|
|
8
|
-
* Notification type.
|
|
9
|
-
*/
|
|
10
|
-
type: 'success' | 'error' | 'info';
|
|
11
|
-
/**
|
|
12
|
-
* Notification title.
|
|
13
|
-
*/
|
|
14
|
-
title: string;
|
|
15
|
-
/**
|
|
16
|
-
* Notification details.
|
|
17
|
-
*/
|
|
18
|
-
details?: React.ReactNode;
|
|
19
|
-
}
|
|
20
|
-
interface NotificationsContextShape {
|
|
21
|
-
/**
|
|
22
|
-
* Method for dismissing notification by id.
|
|
23
|
-
*/
|
|
24
|
-
dismissNotification: (id: string) => void;
|
|
25
|
-
/**
|
|
26
|
-
* Optional element rendered below notification's container.
|
|
27
|
-
* Container's position should be adjusted in accordance with provided element's height.
|
|
28
|
-
*/
|
|
29
|
-
bottomOffsetEl?: HTMLElement | null;
|
|
30
|
-
/**
|
|
31
|
-
* Root element to which notifications container should be mounted to. Defaults to UI root container.
|
|
32
|
-
*/
|
|
33
|
-
notificationsRootEl?: HTMLElement | null;
|
|
34
|
-
/**
|
|
35
|
-
* List of the notifications within the context.
|
|
36
|
-
*/
|
|
37
|
-
notifications: Notification[];
|
|
38
|
-
/**
|
|
39
|
-
* Method for pushing new notification.
|
|
40
|
-
*/
|
|
41
|
-
pushNotification: (notification: Omit<Notification, 'id'>) => void;
|
|
42
|
-
/**
|
|
43
|
-
* Setter for bottom offset element.
|
|
44
|
-
*/
|
|
45
|
-
setBottomOffsetEl: (el: HTMLElement | null) => void;
|
|
46
|
-
/**
|
|
47
|
-
* Setter for notifications root element.
|
|
48
|
-
*/
|
|
49
|
-
setNotificationsRootEl: (el: HTMLElement | null) => void;
|
|
50
|
-
}
|
|
51
|
-
export declare const NotificationsContext: React.Context<NotificationsContextShape>;
|
|
52
|
-
export declare const useNotifications: () => NotificationsContextShape;
|
|
53
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Configures `@tanstack/react-query` provider.
|
|
4
|
-
*/
|
|
5
|
-
declare const QueryProvider: React.FC<Props>;
|
|
6
|
-
export interface Props {
|
|
7
|
-
/**
|
|
8
|
-
* Main content.
|
|
9
|
-
*/
|
|
10
|
-
children: React.ReactNode;
|
|
11
|
-
}
|
|
12
|
-
export default QueryProvider;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as QueryProvider } from './QueryProvider';
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { DialogProps } from './types';
|
|
3
|
-
declare const UIProvider: React.FC<Props>;
|
|
4
|
-
export interface Props {
|
|
5
|
-
/**
|
|
6
|
-
* Main content.
|
|
7
|
-
*/
|
|
8
|
-
children: React.ReactNode;
|
|
9
|
-
/**
|
|
10
|
-
* Dialog mode options.
|
|
11
|
-
*/
|
|
12
|
-
dialog?: DialogProps;
|
|
13
|
-
/**
|
|
14
|
-
* Name of the selected theme.
|
|
15
|
-
*/
|
|
16
|
-
theme?: string;
|
|
17
|
-
/**
|
|
18
|
-
* Aria label to set on root element.
|
|
19
|
-
*/
|
|
20
|
-
label?: string;
|
|
21
|
-
}
|
|
22
|
-
export default UIProvider;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { UIProviderProps } from '@ckbox/components';
|
|
3
|
-
import { DialogProps } from './types';
|
|
4
|
-
import { DialogDimensions } from '../user';
|
|
5
|
-
declare const UIProviderDialogMode: React.FC<Props>;
|
|
6
|
-
export interface Props extends Omit<UIProviderProps, 'dialog'> {
|
|
7
|
-
/**
|
|
8
|
-
* Dialog mode options.
|
|
9
|
-
*/
|
|
10
|
-
dialog: DialogProps;
|
|
11
|
-
/**
|
|
12
|
-
* Initial dialog dimensions.
|
|
13
|
-
*/
|
|
14
|
-
dialogDimensions?: DialogDimensions;
|
|
15
|
-
/**
|
|
16
|
-
* Callback invoked when dialog dimensions change.
|
|
17
|
-
*/
|
|
18
|
-
onDialogDimensionsChange: (dimensions: DialogDimensions) => void;
|
|
19
|
-
}
|
|
20
|
-
export default UIProviderDialogMode;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export interface DialogModeProps {
|
|
2
|
-
/**
|
|
3
|
-
* Initial dialog height.
|
|
4
|
-
*/
|
|
5
|
-
height?: string | number;
|
|
6
|
-
/**
|
|
7
|
-
* Toggles dialog.
|
|
8
|
-
*/
|
|
9
|
-
open: boolean;
|
|
10
|
-
/**
|
|
11
|
-
* Callback invoked upon clicking on close button.
|
|
12
|
-
*/
|
|
13
|
-
onClose?: () => void;
|
|
14
|
-
/**
|
|
15
|
-
* Initial dialog width.
|
|
16
|
-
*/
|
|
17
|
-
width?: string | number;
|
|
18
|
-
}
|
|
19
|
-
export declare type DialogProps = boolean | DialogModeProps;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Defines React context for upload dialog.
|
|
4
|
-
*/
|
|
5
|
-
export declare const UploadComponentsContext: React.Context<{
|
|
6
|
-
autoScroll: boolean;
|
|
7
|
-
isDialogOpen: boolean;
|
|
8
|
-
isIndicatorOpen: boolean;
|
|
9
|
-
closeDialog: (uploadConcluded?: boolean) => void;
|
|
10
|
-
disableAutoHide: () => void;
|
|
11
|
-
disableAutoFeats: () => void;
|
|
12
|
-
onUploadConcluded: (assets: import("./types").UploadAsset[]) => void;
|
|
13
|
-
openDialog: () => void;
|
|
14
|
-
openIndicator: () => void;
|
|
15
|
-
toggleDialog: (uploadConcluded?: boolean) => void;
|
|
16
|
-
setUploadIndicatorEl: React.Dispatch<React.SetStateAction<HTMLElement | null>>;
|
|
17
|
-
uploadIndicatorEl: HTMLElement | null;
|
|
18
|
-
}>;
|
|
19
|
-
/**
|
|
20
|
-
* Defines React context for upload state.
|
|
21
|
-
*/
|
|
22
|
-
export declare const UploadStateContext: React.Context<import("./types").UploadState>;
|
|
23
|
-
/**
|
|
24
|
-
* Defines React context for upload actions.
|
|
25
|
-
*/
|
|
26
|
-
export declare const UploadUpdaterContext: React.Context<{
|
|
27
|
-
abortUpload: (assets: import("./types").UploadAsset[]) => void;
|
|
28
|
-
processFiles: (category: import("..").ParsedCategory, files: File[]) => void;
|
|
29
|
-
}>;
|
|
30
|
-
export declare const useUploadComponents: () => {
|
|
31
|
-
autoScroll: boolean;
|
|
32
|
-
isDialogOpen: boolean;
|
|
33
|
-
isIndicatorOpen: boolean;
|
|
34
|
-
closeDialog: (uploadConcluded?: boolean) => void;
|
|
35
|
-
disableAutoHide: () => void;
|
|
36
|
-
disableAutoFeats: () => void;
|
|
37
|
-
onUploadConcluded: (assets: import("./types").UploadAsset[]) => void;
|
|
38
|
-
openDialog: () => void;
|
|
39
|
-
openIndicator: () => void;
|
|
40
|
-
toggleDialog: (uploadConcluded?: boolean) => void;
|
|
41
|
-
setUploadIndicatorEl: React.Dispatch<React.SetStateAction<HTMLElement | null>>;
|
|
42
|
-
uploadIndicatorEl: HTMLElement | null;
|
|
43
|
-
};
|
|
44
|
-
export declare const useUploadState: () => import("./types").UploadState;
|
|
45
|
-
export declare const useUploadUpdater: () => {
|
|
46
|
-
abortUpload: (assets: import("./types").UploadAsset[]) => void;
|
|
47
|
-
processFiles: (category: import("..").ParsedCategory, files: File[]) => void;
|
|
48
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { UploadProps } from './types';
|
|
3
|
-
declare const UploadProvider: React.FC<Props>;
|
|
4
|
-
export interface Props {
|
|
5
|
-
/**
|
|
6
|
-
* Main content.
|
|
7
|
-
*/
|
|
8
|
-
children: React.ReactNode;
|
|
9
|
-
/**
|
|
10
|
-
* Upload config.
|
|
11
|
-
*/
|
|
12
|
-
upload?: UploadProps;
|
|
13
|
-
}
|
|
14
|
-
export default UploadProvider;
|