@ckbox/core 1.1.1-dev.0 → 1.2.0-dev.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.
- package/README.md +3 -3
- package/dist/components/assetSize/AssetSize.d.ts +12 -0
- package/dist/components/assetSize/getAssetSize.d.ts +1 -0
- package/dist/components/assetSize/index.d.ts +2 -0
- package/dist/components/assets/Assets.d.ts +72 -0
- package/dist/components/assets/AssetsBottombar.d.ts +33 -0
- package/dist/components/assets/AssetsTopbar.d.ts +71 -0
- package/dist/components/assets/asset/Asset.d.ts +45 -0
- package/dist/components/assets/asset/AssetPreview.d.ts +45 -0
- package/dist/components/assets/asset/index.d.ts +1 -0
- package/dist/components/assets/assetEditForm/AssetEditForm.d.ts +39 -0
- package/dist/components/assets/assetEditForm/index.d.ts +1 -0
- package/dist/components/assets/assetEditForm/useFormValidation.d.ts +8 -0
- package/dist/components/assets/assetPropertiesDialog/AssetPropertiesDialog.d.ts +27 -0
- package/dist/components/assets/assetPropertiesDialog/index.d.ts +1 -0
- package/dist/components/assets/assetPropertiesDialog/useFormValidation.d.ts +8 -0
- package/dist/components/assets/assetPropertiesDrawer/AssetPropertiesDrawer.d.ts +35 -0
- package/dist/components/assets/assetPropertiesDrawer/index.d.ts +1 -0
- package/dist/components/assets/assetsActions/index.d.ts +1 -0
- package/dist/components/assets/assetsActions/useAssetsActions.d.ts +35 -0
- package/dist/components/assets/assetsContent/AssetGalleryItem.d.ts +73 -0
- package/dist/components/assets/assetsContent/AssetsContent.d.ts +51 -0
- package/dist/components/assets/assetsContent/index.d.ts +1 -0
- package/dist/components/assets/assetsDeleteDialog/AssetsDeleteDialog.d.ts +22 -0
- package/dist/components/assets/assetsDeleteDialog/index.d.ts +1 -0
- package/dist/components/assets/assetsPagination/index.d.ts +1 -0
- package/dist/components/assets/assetsPagination/useAssetsPagination.d.ts +38 -0
- package/dist/components/assets/assetsPreview/AssetsPreview.d.ts +54 -0
- package/dist/components/assets/assetsPreview/index.d.ts +1 -0
- package/dist/components/assets/assetsSearchDialog/AssetsSearchDialog.d.ts +18 -0
- package/dist/components/assets/assetsSearchDialog/constants.d.ts +12 -0
- package/dist/components/assets/assetsSearchDialog/form/AssetsSearchDialogForm.d.ts +22 -0
- package/dist/components/assets/assetsSearchDialog/form/index.d.ts +1 -0
- package/dist/components/assets/assetsSearchDialog/index.d.ts +1 -0
- package/dist/components/assets/assetsSearchDialog/recentSearchItem/RecentSearchItem.d.ts +23 -0
- package/dist/components/assets/assetsSearchDialog/recentSearchItem/index.d.ts +1 -0
- package/dist/components/assets/assetsSearchDialog/utils.d.ts +82 -0
- package/dist/components/assets/assetsSelection/index.d.ts +1 -0
- package/dist/components/assets/assetsSelection/useAssetsSelection.d.ts +25 -0
- package/dist/components/assets/constants/constants.d.ts +13 -0
- package/dist/components/assets/constants/index.d.ts +1 -0
- package/dist/components/assets/displayOptions/DisplayOptions.d.ts +55 -0
- package/dist/components/assets/displayOptions/index.d.ts +2 -0
- package/dist/components/assets/index.d.ts +1 -0
- package/dist/components/assets/loader/GalleryLoader.d.ts +25 -0
- package/dist/components/assets/loader/index.d.ts +2 -0
- package/dist/components/assets/loader/useLoader.d.ts +14 -0
- package/dist/components/assets/srcSet/index.d.ts +1 -0
- package/dist/components/assets/srcSet/useSrcSet.d.ts +37 -0
- package/dist/components/assets/uploadIndicator/UploadIndicator.d.ts +3 -0
- package/dist/components/assets/uploadIndicator/index.d.ts +1 -0
- package/dist/components/categoryPropertiesDrawer/CategoryPropertiesDrawer.d.ts +38 -0
- package/dist/components/categoryPropertiesDrawer/index.d.ts +1 -0
- package/dist/components/date/Date.d.ts +12 -0
- package/dist/components/date/index.d.ts +1 -0
- package/dist/components/errorContainer/ErrorContainer.d.ts +9 -0
- package/dist/components/errorContainer/index.d.ts +1 -0
- package/dist/components/index.d.ts +9 -0
- package/dist/components/notifications/Notifications.d.ts +3 -0
- package/dist/components/notifications/index.d.ts +1 -0
- package/dist/components/timeLeft/TimeLeft.d.ts +15 -0
- package/dist/components/timeLeft/index.d.ts +1 -0
- package/dist/components/uploadButton/UploadButton.d.ts +10 -0
- package/dist/components/uploadButton/index.d.ts +1 -0
- package/dist/components/uploadDialog/UploadDialog.d.ts +3 -0
- package/dist/components/uploadDialog/index.d.ts +1 -0
- package/dist/components/uploadDialog/uploadDialogFooter/UploadDialogFooter.d.ts +18 -0
- package/dist/components/uploadDialog/uploadDialogFooter/index.d.ts +1 -0
- package/dist/components/uploadDialog/uploadProgressPanel/UploadProgressPanel.d.ts +50 -0
- package/dist/components/uploadDialog/uploadProgressPanel/index.d.ts +1 -0
- package/dist/components/uploadDialog/uploadProgressPanel/utils.d.ts +29 -0
- package/dist/components/uploadDialog/uploadQueue/UploadQueue.d.ts +18 -0
- package/dist/components/uploadDialog/uploadQueue/index.d.ts +1 -0
- package/dist/components/uploadDialog/utils.d.ts +12 -0
- package/dist/constants/constants.d.ts +36 -0
- package/dist/constants/index.d.ts +1 -0
- package/dist/core/Core.d.ts +5 -0
- package/dist/core/CoreContext.d.ts +44 -0
- package/dist/core/CoreErrorBoundary.d.ts +26 -0
- package/dist/core/CoreFallbackProviders.d.ts +9 -0
- package/dist/core/CoreProviders.d.ts +3 -0
- package/dist/core/index.d.ts +4 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +1 -1
- package/dist/providers/api/ApiContext.d.ts +12 -0
- package/dist/providers/api/ApiProvider.d.ts +17 -0
- package/dist/providers/api/index.d.ts +3 -0
- package/dist/providers/api/useApi.d.ts +42 -0
- package/dist/providers/assetsConfig/AssetsConfigContext.d.ts +41 -0
- package/dist/providers/assetsConfig/AssetsConfigProvider.d.ts +16 -0
- package/dist/providers/assetsConfig/index.d.ts +3 -0
- package/dist/providers/assetsConfig/utils.d.ts +11 -0
- package/dist/providers/auth/AuthContext.d.ts +16 -0
- package/dist/providers/auth/AuthProvider.d.ts +14 -0
- package/dist/providers/auth/index.d.ts +3 -0
- package/dist/providers/auth/useAuth.d.ts +4 -0
- package/dist/providers/categoriesConfig/CategoriesConfigContext.d.ts +24 -0
- package/dist/providers/categoriesConfig/CategoriesConfigProvider.d.ts +10 -0
- package/dist/providers/categoriesConfig/index.d.ts +2 -0
- package/dist/providers/categoriesConfig/utils.d.ts +16 -0
- package/dist/providers/data/hooks/assets/index.d.ts +7 -0
- package/dist/providers/data/hooks/assets/useDeleteAssets.d.ts +71 -0
- package/dist/providers/data/hooks/assets/useGetAsset.d.ts +6 -0
- package/dist/providers/data/hooks/assets/useGetCategoryAssets.d.ts +11 -0
- package/dist/providers/data/hooks/assets/useGetRecentAssets.d.ts +10 -0
- package/dist/providers/data/hooks/assets/useLazyGetAsset.d.ts +10 -0
- package/dist/providers/data/hooks/assets/useUpdateAsset.d.ts +77 -0
- package/dist/providers/data/hooks/assets/useUpdateAssetLastUse.d.ts +71 -0
- package/dist/providers/data/hooks/categories/index.d.ts +8 -0
- package/dist/providers/data/hooks/categories/useCreateCategory.d.ts +71 -0
- package/dist/providers/data/hooks/categories/useDeleteCategory.d.ts +74 -0
- package/dist/providers/data/hooks/categories/useGetAdminCategories.d.ts +7 -0
- package/dist/providers/data/hooks/categories/useGetCategories.d.ts +6 -0
- package/dist/providers/data/hooks/categories/useGetCategory.d.ts +6 -0
- package/dist/providers/data/hooks/categories/useStageCategory.d.ts +14 -0
- package/dist/providers/data/hooks/categories/useUpdateCategoriesOrder.d.ts +71 -0
- package/dist/providers/data/hooks/categories/useUpdateCategory.d.ts +82 -0
- package/dist/providers/data/hooks/errors/index.d.ts +3 -0
- package/dist/providers/data/hooks/errors/useApiErrors.d.ts +4 -0
- package/dist/providers/data/hooks/errors/useAssetErrors.d.ts +3 -0
- package/dist/providers/data/hooks/errors/useCategoryErrors.d.ts +3 -0
- package/dist/providers/data/hooks/images/index.d.ts +2 -0
- package/dist/providers/data/hooks/images/useGetImagesConfig.d.ts +6 -0
- package/dist/providers/data/hooks/images/useUpdateImageFormatConfig.d.ts +76 -0
- package/dist/providers/data/hooks/index.d.ts +5 -0
- package/dist/providers/data/hooks/limits/index.d.ts +1 -0
- package/dist/providers/data/hooks/limits/useGetPlanLimits.d.ts +6 -0
- package/dist/providers/data/hooks/search/index.d.ts +1 -0
- package/dist/providers/data/hooks/search/useSearch.d.ts +12 -0
- package/dist/providers/data/hooks/useMutation.d.ts +67 -0
- package/dist/providers/data/hooks/useQuery.d.ts +3 -0
- package/dist/providers/data/index.d.ts +2 -0
- package/dist/providers/data/parsers/assets/index.d.ts +3 -0
- package/dist/providers/data/parsers/assets/parseAsset.d.ts +9 -0
- package/dist/providers/data/parsers/assets/parseAssets.d.ts +9 -0
- package/dist/providers/data/parsers/assets/types.d.ts +39 -0
- package/dist/providers/data/parsers/assetsMetadata/index.d.ts +2 -0
- package/dist/providers/data/parsers/assetsMetadata/parseAssetMetadata.d.ts +9 -0
- package/dist/providers/data/parsers/assetsMetadata/types.d.ts +22 -0
- package/dist/providers/data/parsers/categories/index.d.ts +4 -0
- package/dist/providers/data/parsers/categories/parseAdminCategories.d.ts +13 -0
- package/dist/providers/data/parsers/categories/parseCategories.d.ts +9 -0
- package/dist/providers/data/parsers/categories/parseCategory.d.ts +9 -0
- package/dist/providers/data/parsers/categories/types.d.ts +39 -0
- package/dist/providers/data/parsers/index.d.ts +3 -0
- package/dist/providers/index.d.ts +12 -0
- package/dist/providers/language/LanguageProvider.d.ts +4 -0
- package/dist/providers/language/index.d.ts +2 -0
- package/dist/providers/language/types.d.ts +22 -0
- package/dist/providers/language/utils.d.ts +16 -0
- package/dist/providers/limits/PlanLimitsContext.d.ts +11 -0
- package/dist/providers/limits/PlanLimitsProvider.d.ts +9 -0
- package/dist/providers/limits/index.d.ts +2 -0
- package/dist/providers/limits/utils.d.ts +7 -0
- package/dist/providers/notifications/NotificationsContext.d.ts +53 -0
- package/dist/providers/notifications/NotificationsProvider.d.ts +9 -0
- package/dist/providers/notifications/index.d.ts +2 -0
- package/dist/providers/query/QueryProvider.d.ts +12 -0
- package/dist/providers/query/index.d.ts +1 -0
- package/dist/providers/ui/UIProvider.d.ts +22 -0
- package/dist/providers/ui/UIProviderContainerMode.d.ts +4 -0
- package/dist/providers/ui/UIProviderDialogMode.d.ts +20 -0
- package/dist/providers/ui/index.d.ts +2 -0
- package/dist/providers/ui/types.d.ts +19 -0
- package/dist/providers/upload/UploadContext.d.ts +48 -0
- package/dist/providers/upload/UploadProvider.d.ts +14 -0
- package/dist/providers/upload/constants.d.ts +142 -0
- package/dist/providers/upload/index.d.ts +5 -0
- package/dist/providers/upload/types.d.ts +282 -0
- package/dist/providers/upload/uploadStateReducer.d.ts +10 -0
- package/dist/providers/upload/useStartUpload.d.ts +10 -0
- package/dist/providers/upload/useUpload.d.ts +21 -0
- package/dist/providers/upload/useUploadComponents.d.ts +21 -0
- package/dist/providers/upload/utils.d.ts +136 -0
- package/dist/providers/user/UserContext.d.ts +68 -0
- package/dist/providers/user/UserProvider.d.ts +13 -0
- package/dist/providers/user/constants.d.ts +19 -0
- package/dist/providers/user/index.d.ts +3 -0
- package/dist/providers/user/persistData.d.ts +14 -0
- package/dist/providers/user/types.d.ts +149 -0
- package/dist/providers/user/useUserData.d.ts +50 -0
- package/dist/services/api/api/api.d.ts +41 -0
- package/dist/services/api/api/index.d.ts +1 -0
- package/dist/services/api/assets/assets.d.ts +98 -0
- package/dist/services/api/assets/index.d.ts +1 -0
- package/dist/services/api/categories/categories.d.ts +50 -0
- package/dist/services/api/categories/index.d.ts +1 -0
- package/dist/services/api/client/ApiClient.d.ts +108 -0
- package/dist/services/api/client/ApiClientError.d.ts +37 -0
- package/dist/services/api/client/index.d.ts +3 -0
- package/dist/services/api/client/types.d.ts +19 -0
- package/dist/services/api/errors/ApiErrorHandler.d.ts +53 -0
- package/dist/services/api/errors/index.d.ts +2 -0
- package/dist/services/api/errors/types.d.ts +6 -0
- package/dist/services/api/images/images.d.ts +18 -0
- package/dist/services/api/images/index.d.ts +1 -0
- package/dist/services/api/index.d.ts +5 -0
- package/dist/services/api/limits/index.d.ts +1 -0
- package/dist/services/api/limits/limits.d.ts +10 -0
- package/dist/services/api/search/index.d.ts +1 -0
- package/dist/services/api/search/search.d.ts +10 -0
- package/dist/services/api/types/assets.d.ts +131 -0
- package/dist/services/api/types/assetsMetadata.d.ts +24 -0
- package/dist/services/api/types/categories.d.ts +86 -0
- package/dist/services/api/types/common.d.ts +16 -0
- package/dist/services/api/types/images.d.ts +8 -0
- package/dist/services/api/types/index.d.ts +7 -0
- package/dist/services/api/types/limits.d.ts +11 -0
- package/dist/services/api/types/search.d.ts +122 -0
- package/dist/services/auth/AuthClient.d.ts +89 -0
- package/dist/services/auth/Token.d.ts +55 -0
- package/dist/services/auth/error.d.ts +6 -0
- package/dist/services/auth/index.d.ts +3 -0
- package/dist/services/auth/types.d.ts +27 -0
- package/dist/services/index.d.ts +2 -0
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/es-la.js +1 -1
- package/dist/translations/es-mx.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fr-ca.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/mr.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/zh-tw.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/views/adminPanel/AdminPanel.d.ts +3 -0
- package/dist/views/adminPanel/assetCategories/AssetCategories.d.ts +9 -0
- package/dist/views/adminPanel/assetCategories/AssetCategoryPanel.d.ts +23 -0
- package/dist/views/adminPanel/assetCategories/AssetCategoryPanelEdit.d.ts +26 -0
- package/dist/views/adminPanel/assetCategories/AssetCategoryPanelLoader.d.ts +9 -0
- package/dist/views/adminPanel/assetCategories/ConfirmCategoryDialog.d.ts +29 -0
- package/dist/views/adminPanel/assetCategories/index.d.ts +1 -0
- package/dist/views/adminPanel/assetCategories/useAssetCategories.d.ts +28 -0
- package/dist/views/adminPanel/assetCategories/useFormValidation.d.ts +10 -0
- package/dist/views/adminPanel/imagesSettings/ImageFormatSettingsPanel.d.ts +22 -0
- package/dist/views/adminPanel/imagesSettings/ImageFormatSettingsPanelLoader.d.ts +3 -0
- package/dist/views/adminPanel/imagesSettings/ImagesSettings.d.ts +3 -0
- package/dist/views/adminPanel/imagesSettings/constants.d.ts +5 -0
- package/dist/views/adminPanel/imagesSettings/index.d.ts +1 -0
- package/dist/views/adminPanel/imagesSettings/useImageSettings.d.ts +9 -0
- package/dist/views/adminPanel/index.d.ts +1 -0
- package/dist/views/category/Category.d.ts +18 -0
- package/dist/views/category/index.d.ts +1 -0
- package/dist/views/category/utils/index.d.ts +1 -0
- package/dist/views/category/utils/utils.d.ts +12 -0
- package/dist/views/index.d.ts +1 -0
- package/dist/views/recentAssets/RecentAssets.d.ts +19 -0
- package/dist/views/recentAssets/index.d.ts +1 -0
- package/dist/views/search/Search.d.ts +15 -0
- package/dist/views/search/index.d.ts +1 -0
- package/dist/views/search/utils.d.ts +19 -0
- package/dist/views/views/Views.d.ts +3 -0
- package/dist/views/views/index.d.ts +1 -0
- package/dist/views/views/navbar/Navbar.d.ts +46 -0
- package/dist/views/views/navbar/index.d.ts +1 -0
- package/package.json +8 -7
- package/dist/translations/lv.js +0 -1
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
interface AssetsPaginationProps {
|
|
2
|
+
/**
|
|
3
|
+
* Number of assets per page.
|
|
4
|
+
*/
|
|
5
|
+
assetsPerPage: number;
|
|
6
|
+
/**
|
|
7
|
+
* Container element for list of assets.
|
|
8
|
+
*/
|
|
9
|
+
containerEl: HTMLElement | null;
|
|
10
|
+
/**
|
|
11
|
+
* Estimated number of assets.
|
|
12
|
+
*/
|
|
13
|
+
estimatedTotalAssetsCount?: number;
|
|
14
|
+
/**
|
|
15
|
+
* Current page number.
|
|
16
|
+
*/
|
|
17
|
+
pageNumber: number;
|
|
18
|
+
/**
|
|
19
|
+
* Callback invoked when page changes.
|
|
20
|
+
*/
|
|
21
|
+
onPageChange: (page: number) => void;
|
|
22
|
+
/**
|
|
23
|
+
* Total number of assets.
|
|
24
|
+
*/
|
|
25
|
+
totalAssetsCount: number;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Holds common pagination logic for components used to render assets.
|
|
29
|
+
*
|
|
30
|
+
* @param hook props
|
|
31
|
+
* @returns pagination state and actions
|
|
32
|
+
*/
|
|
33
|
+
export declare const useAssetsPagination: ({ assetsPerPage, containerEl, estimatedTotalAssetsCount, pageNumber, onPageChange, totalAssetsCount, }: AssetsPaginationProps) => {
|
|
34
|
+
onPageChangeWithScroll: (page: number) => void;
|
|
35
|
+
estimatedTotalPagesCount: number | undefined;
|
|
36
|
+
totalPagesCount: number;
|
|
37
|
+
};
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ParsedAsset } from '../../../providers';
|
|
3
|
+
declare const AssetsPreview: React.FC<Props>;
|
|
4
|
+
interface Props {
|
|
5
|
+
/**
|
|
6
|
+
* List of assets for the current page.
|
|
7
|
+
*/
|
|
8
|
+
assets: ParsedAsset[];
|
|
9
|
+
/**
|
|
10
|
+
* Number of assets per page.
|
|
11
|
+
*/
|
|
12
|
+
assetsPerPage: number;
|
|
13
|
+
/**
|
|
14
|
+
* Indicates if requests associated with download (like asset verification) are in progress.
|
|
15
|
+
*/
|
|
16
|
+
isDownloading?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Indicates that assets for a page might be still loading.
|
|
19
|
+
*/
|
|
20
|
+
isLoading?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Callback invoked whenever asset changes.
|
|
23
|
+
*/
|
|
24
|
+
onAssetChange: (id: string) => void;
|
|
25
|
+
/**
|
|
26
|
+
* Callback invoked when preview is closed.
|
|
27
|
+
*/
|
|
28
|
+
onClose: () => void;
|
|
29
|
+
/**
|
|
30
|
+
* Callback invoked when download is requested.
|
|
31
|
+
*/
|
|
32
|
+
onDownload: () => void;
|
|
33
|
+
/**
|
|
34
|
+
* Callback invoked when page is changed.
|
|
35
|
+
*/
|
|
36
|
+
onPageChange: (page: number) => void;
|
|
37
|
+
/**
|
|
38
|
+
* Current page number.
|
|
39
|
+
*/
|
|
40
|
+
pageNumber: number;
|
|
41
|
+
/**
|
|
42
|
+
* ID of an asset to start with.
|
|
43
|
+
*/
|
|
44
|
+
previewedAssetId: string;
|
|
45
|
+
/**
|
|
46
|
+
* Total number of assets.
|
|
47
|
+
*/
|
|
48
|
+
totalAssetsCount: number;
|
|
49
|
+
/**
|
|
50
|
+
* Total number of pages.
|
|
51
|
+
*/
|
|
52
|
+
totalPagesCount: number;
|
|
53
|
+
}
|
|
54
|
+
export default AssetsPreview;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './AssetsPreview';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ParsedCategory } from '../../../providers';
|
|
3
|
+
declare const AssetsSearchDialog: React.FC<Props>;
|
|
4
|
+
export interface Props {
|
|
5
|
+
/**
|
|
6
|
+
* Determines if dialog should be rendered open or not.
|
|
7
|
+
*/
|
|
8
|
+
isOpen: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Callback invoked on dialog being closed.
|
|
11
|
+
*/
|
|
12
|
+
onClose: () => void;
|
|
13
|
+
/**
|
|
14
|
+
* List of available categories.
|
|
15
|
+
*/
|
|
16
|
+
categoriesData: ParsedCategory[];
|
|
17
|
+
}
|
|
18
|
+
export default AssetsSearchDialog;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SelectOption } from '@ckbox/components';
|
|
2
|
+
import { PredefinedDateMode } from '../../../services';
|
|
3
|
+
export declare const DOCS_EXTENSIONS: SelectOption[];
|
|
4
|
+
export declare const IMAGES_EXTENSIONS: SelectOption[];
|
|
5
|
+
export declare const ARCHIVES_EXTENSIONS: SelectOption[];
|
|
6
|
+
export declare const AUDIO_EXTENSIONS: SelectOption[];
|
|
7
|
+
export declare const VIDEO_EXTENSIONS: SelectOption[];
|
|
8
|
+
export declare const EXTENSIONS: SelectOption[];
|
|
9
|
+
export declare const DATES: {
|
|
10
|
+
label: string;
|
|
11
|
+
id: PredefinedDateMode;
|
|
12
|
+
}[];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { SelectOption } from '@ckbox/components';
|
|
3
|
+
declare const AssetsSearchDialogFilterForm: React.FC<Props>;
|
|
4
|
+
export interface Props {
|
|
5
|
+
/**
|
|
6
|
+
* Options with available categories.
|
|
7
|
+
*/
|
|
8
|
+
availableCategoryOptions: SelectOption[];
|
|
9
|
+
/**
|
|
10
|
+
* Available extensions.
|
|
11
|
+
*/
|
|
12
|
+
availableExtensions: SelectOption[];
|
|
13
|
+
/**
|
|
14
|
+
* Callback invoked when Cancel button is clicked.
|
|
15
|
+
*/
|
|
16
|
+
onCancel: () => void;
|
|
17
|
+
/**
|
|
18
|
+
* Callback invoked when Search button is clicked.
|
|
19
|
+
*/
|
|
20
|
+
onSearch: () => void;
|
|
21
|
+
}
|
|
22
|
+
export default AssetsSearchDialogFilterForm;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './AssetsSearchDialogForm';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './AssetsSearchDialog';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { SearchCriteria } from '../../../../services';
|
|
3
|
+
import { ParsedCategory } from '../../../../providers';
|
|
4
|
+
declare const RecentSearchItem: React.FC<Props>;
|
|
5
|
+
export interface Props {
|
|
6
|
+
/**
|
|
7
|
+
* Object containing search criteria to show.
|
|
8
|
+
*/
|
|
9
|
+
searchData: SearchCriteria;
|
|
10
|
+
/**
|
|
11
|
+
* Callback invoked when list item is clicked.
|
|
12
|
+
*/
|
|
13
|
+
onClick: (clickedSearch: SearchCriteria) => void;
|
|
14
|
+
/**
|
|
15
|
+
* Callback invoked when delete button is clicked.
|
|
16
|
+
*/
|
|
17
|
+
onDelete: (deletedSearch: SearchCriteria) => void;
|
|
18
|
+
/**
|
|
19
|
+
* List of available categories.
|
|
20
|
+
*/
|
|
21
|
+
categoriesData: ParsedCategory[];
|
|
22
|
+
}
|
|
23
|
+
export default RecentSearchItem;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './RecentSearchItem';
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { SelectOption } from '@ckbox/components';
|
|
2
|
+
import { useTranslation } from '@ckbox/i18n';
|
|
3
|
+
import { PredefinedDateMode, SearchCriteria } from '../../../services';
|
|
4
|
+
import { AssetSearchDialogProps } from './types';
|
|
5
|
+
import { ParsedCategory } from '../../../providers';
|
|
6
|
+
declare type TFn = ReturnType<typeof useTranslation>['t'];
|
|
7
|
+
/**
|
|
8
|
+
* Creates handler for toggling value in Select component with multiple values.
|
|
9
|
+
*
|
|
10
|
+
* @param onChange form's onChange callback
|
|
11
|
+
* @param value current enabled values
|
|
12
|
+
*/
|
|
13
|
+
export declare const createMultiSelectToggleHandler: (onChange: (value: SelectOption[]) => void, value: SelectOption[]) => (toggled: SelectOption) => void;
|
|
14
|
+
/**
|
|
15
|
+
* Creates handler for toggling value in Select component with single value.
|
|
16
|
+
*
|
|
17
|
+
* @param onChange form's onChange callback
|
|
18
|
+
*/
|
|
19
|
+
export declare const createSingleSelectToggleHandler: (onChange: (value: SelectOption) => void) => (toggled: SelectOption) => void;
|
|
20
|
+
/**
|
|
21
|
+
* Joins labels of given SelectOption objects
|
|
22
|
+
*
|
|
23
|
+
* @param options options to join
|
|
24
|
+
*/
|
|
25
|
+
export declare const joinLabels: (options: SelectOption[]) => string;
|
|
26
|
+
/**
|
|
27
|
+
* Adds all unselected extensions belonging to a given group.
|
|
28
|
+
*
|
|
29
|
+
* @param extensions current selected extensions
|
|
30
|
+
* @param fixedExtensions extensions to add
|
|
31
|
+
*/
|
|
32
|
+
export declare const mergeExtensions: (extensions: SelectOption[], fixedExtensions: SelectOption[]) => SelectOption[];
|
|
33
|
+
/**
|
|
34
|
+
* Removes all selected extensions belonging to a given group.
|
|
35
|
+
*
|
|
36
|
+
* @param extensions current selected extensions
|
|
37
|
+
* @param fixedExtensions extensions to remove
|
|
38
|
+
*/
|
|
39
|
+
export declare const removeExtensions: (extensions: SelectOption[], fixedExtensions: SelectOption[]) => SelectOption[];
|
|
40
|
+
/**
|
|
41
|
+
* Checks if all extensions belonging to a given group, are selected.
|
|
42
|
+
*
|
|
43
|
+
* @param extensions current selected extensions
|
|
44
|
+
* @param fixedExtensions extensions to check
|
|
45
|
+
*/
|
|
46
|
+
export declare const checkBtnActive: (extensions: SelectOption[], fixedExtensions: SelectOption[]) => boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Retrieves category name for given category id.
|
|
49
|
+
*
|
|
50
|
+
* @param id id to check
|
|
51
|
+
* @param categoriesData list of all categories
|
|
52
|
+
*/
|
|
53
|
+
export declare const getCategoryNameForId: (id: string, categoriesData: ParsedCategory[]) => string | undefined;
|
|
54
|
+
/**
|
|
55
|
+
* Gets translated label for specific predefined date mode.
|
|
56
|
+
*
|
|
57
|
+
* @param dateMode predefined date mode
|
|
58
|
+
* @param t translation function
|
|
59
|
+
*/
|
|
60
|
+
export declare const getTranslatedPredefinedDate: (dateMode: PredefinedDateMode, t: TFn) => string;
|
|
61
|
+
/**
|
|
62
|
+
* Builds a multi line message describing properties of a given search criteria object.
|
|
63
|
+
*
|
|
64
|
+
* @param searchData search criteria data
|
|
65
|
+
* @param t translation
|
|
66
|
+
* @param categoryNames readable names of categories
|
|
67
|
+
*/
|
|
68
|
+
export declare const buildTooltipMessage: (searchData: SearchCriteria, t: TFn, categoryNames?: string[]) => string;
|
|
69
|
+
/**
|
|
70
|
+
* Builds form's state object from given SearchFilters.
|
|
71
|
+
*
|
|
72
|
+
* @param apiSearchPayload search filters object
|
|
73
|
+
* @param availableCategories all available categories
|
|
74
|
+
*/
|
|
75
|
+
export declare const buildFormStateFromPayload: (apiSearchPayload: SearchCriteria, availableCategories: SelectOption[], availableExtensions: SelectOption[]) => AssetSearchDialogProps;
|
|
76
|
+
/**
|
|
77
|
+
* Builds SearchFilters object from given form's state.
|
|
78
|
+
*
|
|
79
|
+
* @param data form state object
|
|
80
|
+
*/
|
|
81
|
+
export declare const buildPayloadFromFormState: (data: AssetSearchDialogProps) => SearchCriteria;
|
|
82
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useAssetsSelection } from './useAssetsSelection';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { SelectionAreaCoords } from '@ckbox/components';
|
|
3
|
+
import { ParsedAsset } from '../../../providers';
|
|
4
|
+
export declare const useAssetsSelection: (assets: ParsedAsset[]) => {
|
|
5
|
+
containerEl: HTMLDivElement | null;
|
|
6
|
+
createSetAssetRef: (id: string) => (element: HTMLDivElement | null) => void;
|
|
7
|
+
onContainerKeyDown: (evt: {
|
|
8
|
+
readonly key: string;
|
|
9
|
+
readonly code: string;
|
|
10
|
+
readonly ctrlKey: boolean;
|
|
11
|
+
readonly metaKey: boolean;
|
|
12
|
+
readonly shiftKey: boolean;
|
|
13
|
+
readonly altKey: boolean;
|
|
14
|
+
preventDefault: () => void;
|
|
15
|
+
stopPropagation: () => void;
|
|
16
|
+
}) => void;
|
|
17
|
+
onContainerMouseDown: (evt: React.MouseEvent<HTMLElement>) => void;
|
|
18
|
+
onSelectionAreaChange: (area: SelectionAreaCoords) => void;
|
|
19
|
+
selectedAssets: Set<string>;
|
|
20
|
+
selectRange: (id: string) => void;
|
|
21
|
+
selectSingle: (id: string) => void;
|
|
22
|
+
selectSingleWithFocus: (id: string) => void;
|
|
23
|
+
setContainerEl: React.Dispatch<React.SetStateAction<HTMLDivElement | null>>;
|
|
24
|
+
toggleSelection: (id: string) => void;
|
|
25
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DocIconName } from '@ckbox/components';
|
|
2
|
+
/**
|
|
3
|
+
* Selector for identifying asset tiles.
|
|
4
|
+
*/
|
|
5
|
+
export declare const ASSET_TILE_SELECTOR = "[data-gallery-item]";
|
|
6
|
+
/**
|
|
7
|
+
* Thumbnail of the following resolutions will be shown as asset image preview.
|
|
8
|
+
*/
|
|
9
|
+
export declare const THUMBNAIL_BREAKPOINTS: number[];
|
|
10
|
+
/**
|
|
11
|
+
* For the following extensions a predefined fallback icon will be shown.
|
|
12
|
+
*/
|
|
13
|
+
export declare const DOC_ICONS: Record<string, DocIconName>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './constants';
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ApiSortingOrder } from '../../../services';
|
|
3
|
+
declare const DisplayOptions: React.FC<Props>;
|
|
4
|
+
export interface Props {
|
|
5
|
+
/**
|
|
6
|
+
* Assets to show per page.
|
|
7
|
+
*/
|
|
8
|
+
assetsPerPage: number;
|
|
9
|
+
/**
|
|
10
|
+
* Available options of assets per page.
|
|
11
|
+
*/
|
|
12
|
+
assetsPerPageOptions: {
|
|
13
|
+
label: string;
|
|
14
|
+
onSelect: () => void;
|
|
15
|
+
}[];
|
|
16
|
+
/**
|
|
17
|
+
* Allows cover mode for thumbnails.
|
|
18
|
+
*/
|
|
19
|
+
allowCover: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Callback invoked if "Keep Aspect Ratio" option changes.
|
|
22
|
+
*/
|
|
23
|
+
onCoverModeToggle: () => void;
|
|
24
|
+
/**
|
|
25
|
+
* Callback invoked if preferred thumb size changes.
|
|
26
|
+
*/
|
|
27
|
+
onThumbSizeChange: (thumbSize: number) => void;
|
|
28
|
+
/**
|
|
29
|
+
* Label of the current sort option.
|
|
30
|
+
*/
|
|
31
|
+
sort?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Order of the current sort option.
|
|
34
|
+
*/
|
|
35
|
+
sortOrder?: ApiSortingOrder;
|
|
36
|
+
/**
|
|
37
|
+
* Callback invoked when sort order changes.
|
|
38
|
+
*/
|
|
39
|
+
onSortOrderToggle?: () => void;
|
|
40
|
+
/**
|
|
41
|
+
* Available sort options.
|
|
42
|
+
*
|
|
43
|
+
* List of available options depends on category type.
|
|
44
|
+
* Regular categories have different options than Recent pseudo-category.
|
|
45
|
+
*/
|
|
46
|
+
sortOptions?: {
|
|
47
|
+
label: string;
|
|
48
|
+
onSelect: () => void;
|
|
49
|
+
}[];
|
|
50
|
+
/**
|
|
51
|
+
* Indicates how zoomed the assets are. Pass a relative value in range 0 .. 1.
|
|
52
|
+
*/
|
|
53
|
+
thumbSize: number;
|
|
54
|
+
}
|
|
55
|
+
export default DisplayOptions;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Assets';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare const GalleryLoader: React.FC<Props>;
|
|
3
|
+
export interface Props {
|
|
4
|
+
/**
|
|
5
|
+
* Assets to show per page.
|
|
6
|
+
*/
|
|
7
|
+
assetsPerPage: number;
|
|
8
|
+
/**
|
|
9
|
+
* Specifies the estimated number of assets.
|
|
10
|
+
*/
|
|
11
|
+
estimatedTotalAssetsCount?: number;
|
|
12
|
+
/**
|
|
13
|
+
* Specifies the estimated number of pages.
|
|
14
|
+
*/
|
|
15
|
+
estimatedTotalPagesCount?: number;
|
|
16
|
+
/**
|
|
17
|
+
* Current page number for pagination.
|
|
18
|
+
*/
|
|
19
|
+
pageNumber: number;
|
|
20
|
+
/**
|
|
21
|
+
* Represents relative size of a thumb.
|
|
22
|
+
*/
|
|
23
|
+
thumbSize: number;
|
|
24
|
+
}
|
|
25
|
+
export default GalleryLoader;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This hook encapsulates logic related to toggling loading effects.
|
|
3
|
+
*
|
|
4
|
+
* A primary loading effect is the one associated with loading initial data.
|
|
5
|
+
* A secondary loading effect is associated with loading subsequent pages of assets.
|
|
6
|
+
*
|
|
7
|
+
* @param isInitDataLoading flag indicating if initial data load is in progress
|
|
8
|
+
* @param isNextDataLoading flag indicating if subsequent data load is in progress
|
|
9
|
+
* @returns flags for toggling loading effects
|
|
10
|
+
*/
|
|
11
|
+
export declare const useLoader: (isInitDataLoading: boolean, isNextDataLoading: boolean) => {
|
|
12
|
+
showPrimaryLoader: boolean;
|
|
13
|
+
showSecondaryLoader: boolean;
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useSrcSet';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
interface AssetInfo {
|
|
2
|
+
/**
|
|
3
|
+
* Asset's id.
|
|
4
|
+
*/
|
|
5
|
+
id: string;
|
|
6
|
+
/**
|
|
7
|
+
* Asset's original width.
|
|
8
|
+
*/
|
|
9
|
+
originalWidth?: number;
|
|
10
|
+
/**
|
|
11
|
+
* Asset's original height.
|
|
12
|
+
*/
|
|
13
|
+
originalHeight?: number;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Returns `srcSet` that can be used for constructing `srcset` attribute of `img` element.
|
|
17
|
+
*
|
|
18
|
+
* Checks for which breakpoints asset can be displayed as a cover.
|
|
19
|
+
*
|
|
20
|
+
* @param breakpoints available breakpoints
|
|
21
|
+
* @param info asset's info
|
|
22
|
+
* @returns asset's image srcSet
|
|
23
|
+
*/
|
|
24
|
+
export declare const useSrcSet: (breakpoints: number[], { id, originalHeight, originalWidth }: AssetInfo) => {
|
|
25
|
+
srcSet: {
|
|
26
|
+
optional: never[];
|
|
27
|
+
default: never[];
|
|
28
|
+
};
|
|
29
|
+
cover?: undefined;
|
|
30
|
+
} | {
|
|
31
|
+
srcSet: {
|
|
32
|
+
optional: string[];
|
|
33
|
+
default: string[];
|
|
34
|
+
};
|
|
35
|
+
cover: Record<number, boolean>;
|
|
36
|
+
};
|
|
37
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './UploadIndicator';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { CategoryIconProps, ParsedAsset } from '../../providers';
|
|
3
|
+
declare const CategoryPropertiesDrawer: React.FC<Props>;
|
|
4
|
+
export interface Props {
|
|
5
|
+
/**
|
|
6
|
+
* Total number of assets in the category.
|
|
7
|
+
*/
|
|
8
|
+
assetsCount: number;
|
|
9
|
+
/**
|
|
10
|
+
* List of allowed extensions for the category.
|
|
11
|
+
*/
|
|
12
|
+
extensions?: string[];
|
|
13
|
+
/**
|
|
14
|
+
* Properties of displayed category icon.
|
|
15
|
+
*/
|
|
16
|
+
iconProps: CategoryIconProps;
|
|
17
|
+
/**
|
|
18
|
+
* Maximum allowed file size.
|
|
19
|
+
*/
|
|
20
|
+
maxFileSize?: number;
|
|
21
|
+
/**
|
|
22
|
+
* Maximum allowed image resolution.
|
|
23
|
+
*/
|
|
24
|
+
maxImgResolution?: number;
|
|
25
|
+
/**
|
|
26
|
+
* Category name to display.
|
|
27
|
+
*/
|
|
28
|
+
name: string;
|
|
29
|
+
/**
|
|
30
|
+
* Callback invoked when drawer is closed.
|
|
31
|
+
*/
|
|
32
|
+
onClose: () => void;
|
|
33
|
+
/**
|
|
34
|
+
* List of recently modified assets for the category.
|
|
35
|
+
*/
|
|
36
|
+
recentlyModified?: ParsedAsset[];
|
|
37
|
+
}
|
|
38
|
+
export default CategoryPropertiesDrawer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './CategoryPropertiesDrawer';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Component responsible for displaying date in a user-friendly way in accordance with user's locale.
|
|
4
|
+
*/
|
|
5
|
+
declare const DateComponent: React.FC<Props>;
|
|
6
|
+
export interface Props {
|
|
7
|
+
/**
|
|
8
|
+
* Date value in ISO format.
|
|
9
|
+
*/
|
|
10
|
+
isoValue?: string;
|
|
11
|
+
}
|
|
12
|
+
export default DateComponent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Date';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './ErrorContainer';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { default as Assets } from './assets';
|
|
2
|
+
export { default as AssetSize } from './assetSize';
|
|
3
|
+
export { default as CategoryPropertiesDrawer } from './categoryPropertiesDrawer';
|
|
4
|
+
export { default as Date } from './date';
|
|
5
|
+
export { default as ErrorContainer } from './errorContainer';
|
|
6
|
+
export { default as Notifications } from './notifications';
|
|
7
|
+
export { default as TimeLeft } from './timeLeft';
|
|
8
|
+
export { default as UploadButton } from './uploadButton';
|
|
9
|
+
export { default as UploadDialog } from './uploadDialog';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Notifications';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Component responsible for displaying time distance in a user-friendly way.
|
|
4
|
+
*
|
|
5
|
+
* Translation message is created by concatenating multiple time unit translation messages.
|
|
6
|
+
* Such approach is usually an anti-pattern but it allows us to work around all possible permutations of multiple plurals within a single phrase.
|
|
7
|
+
*/
|
|
8
|
+
declare const TimeLeft: React.FC<Props>;
|
|
9
|
+
export interface Props {
|
|
10
|
+
/**
|
|
11
|
+
* Time distance (in s).
|
|
12
|
+
*/
|
|
13
|
+
time: number;
|
|
14
|
+
}
|
|
15
|
+
export default TimeLeft;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './TimeLeft';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './UploadButton';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './UploadDialog';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { UploadAsset } from '../../../providers';
|
|
3
|
+
declare const UploadDialogFooter: React.FC<Props>;
|
|
4
|
+
interface Props {
|
|
5
|
+
/**
|
|
6
|
+
* Upload queue.
|
|
7
|
+
*/
|
|
8
|
+
queue: UploadAsset[];
|
|
9
|
+
/**
|
|
10
|
+
* Callback invoked upon clicking on abort button.
|
|
11
|
+
*/
|
|
12
|
+
onAbortClick: () => void;
|
|
13
|
+
/**
|
|
14
|
+
* Callback invoked upon clicking on error counter.
|
|
15
|
+
*/
|
|
16
|
+
onErrorClick: () => void;
|
|
17
|
+
}
|
|
18
|
+
export default UploadDialogFooter;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './UploadDialogFooter';
|