diff --git a/api/@ohos.file.PhotoPickerComponent.d.ets b/api/@ohos.file.PhotoPickerComponent.d.ets index 52885ab0e0a6ceaf1110393a097b0ce687f9727d..1130b7e6e6142e532af59b4310f0f0289fa3ab7e 100644 --- a/api/@ohos.file.PhotoPickerComponent.d.ets +++ b/api/@ohos.file.PhotoPickerComponent.d.ets @@ -301,6 +301,16 @@ export declare class PickerController { */ saveTrustedPhotoAssets(trustedUris: Array, callback: AsyncCallback>, configs?: Array, saveMode?: SaveMode): void; + + /** + * Update options of the PhotoPicker component. + * + * @param { UpdatablePickerOptions } updateConfig - Subset of PickerOptions + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 21 + */ + updatePickerOptions(updatablePickerOptions: UpdatablePickerOptions): Promise; } /** @@ -559,6 +569,37 @@ export declare class BaseItemInfo { * @since 12 */ duration?: number; + + /** + * PhotoSubtype. Asset subtype, non-special type images default to DEFAULT(0). + * + * @type { ?photoAccessHelper.PhotoSubtype } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 20 + */ + photoSubType?: photoAccessHelper.PhotoSubtype + + /** + * DynamicRangeType. Dynamic range type of media files. + * For movingPhoto, this specifically refers to the dynamic range type of the cover image. + * + * @type { ?photoAccessHelper.DynamicRangeType } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 20 + */ + dynamicRangeType?: photoAccessHelper.DynamicRangeType + + /** + * Orientation. Image/Video orientation information. + * + * @type { ?number } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 20 + */ + orientation?: number } /** @@ -688,6 +729,146 @@ export declare class SingleLineConfig { itemGap?: Length; } +/** + * UpdatablePickerOptions + * + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 21 + */ +export declare class UpdatablePickerOptions { + + /** + * The type of the file in the recent photo window. + * + * @type { ?photoAccessHelper.PhotoViewMIMETypes } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 21 + */ + MIMEType?: photoAccessHelper.PhotoViewMIMETypes; + + /** + * Media file filtering configuration. + * + * @type { ?photoAccessHelper.MimeTypeFilter } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 21 + */ + mimeTypeFilter?: photoAccessHelper.MimeTypeFilter; + + /** + * Maximum number of assets for a single selection. + * + * @type { ?number } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 21 + */ + maxSelectNumber?: number; + + /** + * Maximum number of photos for a single selection. + * + * @type { ?number } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 21 + */ + maxPhotoSelectNumber?: number; + + /** + * Maximum number of videos for a single selection. + * + * @type { ?number } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 21 + */ + maxVideoSelectNumber?: number; + + /** + * Select mode of the picker. + * + * @type { ?SelectMode } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 21 + */ + selectMode?: SelectMode; + + /** + * The mode of single selection. + * + * @type { ?photoAccessHelper.SingleSelectionMode } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 21 + */ + singleSelectionMode?: photoAccessHelper.SingleSelectionMode; + + /** + * Support repeat select. + * + * @type { ?boolean } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 21 + */ + isRepeatSelectSupported?: boolean; + + /** + * The uri for the preselected files. + * + * @type { ?Array } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 21 + */ + preselectedUris?: Array; + + /** + * The checkbox color of the picker. + * + * @type { ?string } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 21 + */ + checkBoxColor?: string; + + /** + * The checkbox text color of the picker. + * + * @type { ?string } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 21 + */ + checkboxTextColor?: string; + + /** + * The background color of the picker. + * + * @type { ?string } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 21 + */ + backgroundColor?: string; + + /** + * Support to set photo browser background color mode. + * + * @type { ?PickerColorMode } + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @atomicservice + * @since 21 + */ + photoBrowserBackgroundColorMode?: PickerColorMode; +} + /** * DataType represents the type of the data set to picker component * diff --git a/kits/@kit.MediaLibraryKit.d.ts b/kits/@kit.MediaLibraryKit.d.ts index 901d6bec142f894a0be4ef55a2cbf617cf23189f..a0c03acc668bc1229dd44935e9f4ce4fa4ad0f95 100644 --- a/kits/@kit.MediaLibraryKit.d.ts +++ b/kits/@kit.MediaLibraryKit.d.ts @@ -27,7 +27,7 @@ import { DataType, BaseItemInfo, ItemInfo, PhotoBrowserInfo, AnimatorParams, MaxSelected, ItemType, ClickType, PickerOrientation, SelectMode, PickerColorMode, ReminderMode, MaxCountType, PhotoBrowserRange, - PhotoBrowserUIElement, ItemsDeletedCallback, ExceedMaxSelectedCallback, CurrentAlbumDeletedCallback + PhotoBrowserUIElement, ItemsDeletedCallback, ExceedMaxSelectedCallback, CurrentAlbumDeletedCallback, UpdatablePickerOptions } from '@ohos.file.PhotoPickerComponent'; import { RecentPhotoComponent, RecentPhotoCheckResultCallback, @@ -43,5 +43,5 @@ export { AlbumPickerComponent, AlbumPickerOptions, AlbumInfo, EmptyAreaClickCallback, AlbumPickerController, RecentPhotoComponent, RecentPhotoCheckResultCallback, RecentPhotoClickCallback, RecentPhotoOptions, PhotoSource, - PhotoBrowserUIElement, ItemsDeletedCallback, ExceedMaxSelectedCallback, CurrentAlbumDeletedCallback + PhotoBrowserUIElement, ItemsDeletedCallback, ExceedMaxSelectedCallback, CurrentAlbumDeletedCallback, UpdatablePickerOptions };