1/* 2 * Copyright (c) 2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16import { AlbumDefine, Constants } from '@ohos/common'; 17 18export class FormConstants { 19 public static FORM_ITEM_ALBUM_URI = 'form_itemAlbumUri'; 20 public static FORM_ITEM_DISPLAY_NAME = 'form_itemDisplayName'; 21} 22 23/** 24 * Record parameters passed from outside moduel: FA/third apps 25 * These parameters should not be modified after read from want 26 */ 27export class SelectParams { 28 /* max select count */ 29 maxSelectCount: number; 30 /* select media type */ 31 filterMediaType: string; 32 isFromWallpaper: boolean; 33 /* whether entered from FA */ 34 isFromFa: boolean; 35 /* whether entered from pick photos in FA */ 36 isFromFaPhoto: boolean; 37 /* whether is multiple pick */ 38 isMultiPick: boolean; 39 /* caller bundle name */ 40 bundleName: string; 41 /* whether picker from Camera */ 42 cameraAble: boolean; 43 /* whether picker can edit */ 44 editAble: boolean; 45 uri: string; 46 itemDisplayName: unknown; 47 itemId: string; 48 isFirstEnter: boolean; 49 itemCount: number; 50 itemCoverUri: string; 51 remainingOfWallpapers: number; 52 53 static defaultParam(): SelectParams { 54 return { 55 maxSelectCount: Constants.DEFAULT_MAX_THIRD_SELECT_COUNT, 56 filterMediaType: AlbumDefine.FILTER_MEDIA_TYPE_ALL, 57 isFromWallpaper: false, 58 isFromFa: false, 59 isFromFaPhoto: false, 60 isMultiPick: false, 61 bundleName: '', 62 cameraAble: true, 63 editAble: true, 64 uri: '', 65 itemDisplayName: undefined, 66 itemId: '', 67 isFirstEnter: false, 68 itemCount: 0, 69 itemCoverUri: '', 70 remainingOfWallpapers: 0 71 }; 72 } 73} 74/* storage key begin */ 75export const THIRD_SELECT_IS_ORIGIN = 'third_select_is_origin'; 76 77export const IS_SPLIT_MODE = 'isSplitMode'; 78 79export const LEFT_BLANK = 'leftBlank'; 80 81export const IS_SIDE_BAR = 'isSidebar'; 82 83export const IS_HORIZONTAL = 'isHorizontal'; 84/* storage key end */ 85 86export const THUMBNAIL_WIDTH: number = 256;