• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
42  static defaultParam() {
43    return {
44      maxSelectCount: Constants.DEFAULT_MAX_THIRD_SELECT_COUNT,
45      filterMediaType: AlbumDefine.FILTER_MEDIA_TYPE_ALL,
46      isFromWallpaper: false,
47      isFromFa: false,
48      isFromFaPhoto: false,
49      isMultiPick: false,
50      bundleName: ''
51    }
52  }
53}
54
55/* storage key begin */
56export const THIRD_SELECT_IS_ORIGIN = 'third_select_is_origin';
57
58export const IS_SPLIT_MODE = 'isSplitMode';
59
60export const LEFT_BLANK = 'leftBlank';
61
62export const IS_SIDE_BAR = 'isSidebar';
63
64export const IS_HORIZONTAL = 'isHorizontal';
65/* storage key end */
66
67export const THUMBNAIL_WIDTH: number = 256;